Class: MicrosoftGraph::Models::UnifiedApprovalStage

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/unified_approval_stage.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new unifiedApprovalStage and sets the default values.



67
68
69
# File 'lib/models/unified_approval_stage.rb', line 67

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a unified_approval_stage

Raises:

  • (StandardError)


75
76
77
78
# File 'lib/models/unified_approval_stage.rb', line 75

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UnifiedApprovalStage.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



37
38
39
# File 'lib/models/unified_approval_stage.rb', line 37

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



45
46
47
# File 'lib/models/unified_approval_stage.rb', line 45

def additional_data=(value)
    @additional_data = value
end

#approval_stage_time_out_in_daysObject

Gets the approvalStageTimeOutInDays property value. The number of days that a request can be pending a response before it is automatically denied.

Returns:

  • a integer



52
53
54
# File 'lib/models/unified_approval_stage.rb', line 52

def approval_stage_time_out_in_days
    return @approval_stage_time_out_in_days
end

#approval_stage_time_out_in_days=(value) ⇒ Object

Sets the approvalStageTimeOutInDays property value. The number of days that a request can be pending a response before it is automatically denied.

Parameters:

  • value

    Value to set for the approvalStageTimeOutInDays property.

Returns:

  • a void



60
61
62
# File 'lib/models/unified_approval_stage.rb', line 60

def approval_stage_time_out_in_days=(value)
    @approval_stage_time_out_in_days = value
end

#escalation_approversObject

Gets the escalationApprovers property value. The escalation approvers for this stage when the primary approvers don’t respond.

Returns:

  • a subject_set



83
84
85
# File 'lib/models/unified_approval_stage.rb', line 83

def escalation_approvers
    return @escalation_approvers
end

#escalation_approvers=(value) ⇒ Object

Sets the escalationApprovers property value. The escalation approvers for this stage when the primary approvers don’t respond.

Parameters:

  • value

    Value to set for the escalationApprovers property.

Returns:

  • a void



91
92
93
# File 'lib/models/unified_approval_stage.rb', line 91

def escalation_approvers=(value)
    @escalation_approvers = value
end

#escalation_time_in_minutesObject

Gets the escalationTimeInMinutes property value. The time a request can be pending a response from a primary approver before it can be escalated to the escalation approvers.

Returns:

  • a integer



98
99
100
# File 'lib/models/unified_approval_stage.rb', line 98

def escalation_time_in_minutes
    return @escalation_time_in_minutes
end

#escalation_time_in_minutes=(value) ⇒ Object

Sets the escalationTimeInMinutes property value. The time a request can be pending a response from a primary approver before it can be escalated to the escalation approvers.

Parameters:

  • value

    Value to set for the escalationTimeInMinutes property.

Returns:

  • a void



106
107
108
# File 'lib/models/unified_approval_stage.rb', line 106

def escalation_time_in_minutes=(value)
    @escalation_time_in_minutes = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/models/unified_approval_stage.rb', line 113

def get_field_deserializers()
    return {
        "approvalStageTimeOutInDays" => lambda {|n| @approval_stage_time_out_in_days = n.get_number_value() },
        "escalationApprovers" => lambda {|n| @escalation_approvers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) },
        "escalationTimeInMinutes" => lambda {|n| @escalation_time_in_minutes = n.get_number_value() },
        "isApproverJustificationRequired" => lambda {|n| @is_approver_justification_required = n.get_boolean_value() },
        "isEscalationEnabled" => lambda {|n| @is_escalation_enabled = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "primaryApprovers" => lambda {|n| @primary_approvers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) },
    }
end

#is_approver_justification_requiredObject

Gets the isApproverJustificationRequired property value. Indicates whether the approver must provide justification for their reponse.

Returns:

  • a boolean



128
129
130
# File 'lib/models/unified_approval_stage.rb', line 128

def is_approver_justification_required
    return @is_approver_justification_required
end

#is_approver_justification_required=(value) ⇒ Object

Sets the isApproverJustificationRequired property value. Indicates whether the approver must provide justification for their reponse.

Parameters:

  • value

    Value to set for the isApproverJustificationRequired property.

Returns:

  • a void



136
137
138
# File 'lib/models/unified_approval_stage.rb', line 136

def is_approver_justification_required=(value)
    @is_approver_justification_required = value
end

#is_escalation_enabledObject

Gets the isEscalationEnabled property value. Indicates whether escalation if enabled.

Returns:

  • a boolean



143
144
145
# File 'lib/models/unified_approval_stage.rb', line 143

def is_escalation_enabled
    return @is_escalation_enabled
end

#is_escalation_enabled=(value) ⇒ Object

Sets the isEscalationEnabled property value. Indicates whether escalation if enabled.

Parameters:

  • value

    Value to set for the isEscalationEnabled property.

Returns:

  • a void



151
152
153
# File 'lib/models/unified_approval_stage.rb', line 151

def is_escalation_enabled=(value)
    @is_escalation_enabled = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



158
159
160
# File 'lib/models/unified_approval_stage.rb', line 158

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



166
167
168
# File 'lib/models/unified_approval_stage.rb', line 166

def odata_type=(value)
    @odata_type = value
end

#primary_approversObject

Gets the primaryApprovers property value. The primary approvers of this stage.

Returns:

  • a subject_set



173
174
175
# File 'lib/models/unified_approval_stage.rb', line 173

def primary_approvers
    return @primary_approvers
end

#primary_approvers=(value) ⇒ Object

Sets the primaryApprovers property value. The primary approvers of this stage.

Parameters:

  • value

    Value to set for the primaryApprovers property.

Returns:

  • a void



181
182
183
# File 'lib/models/unified_approval_stage.rb', line 181

def primary_approvers=(value)
    @primary_approvers = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


189
190
191
192
193
194
195
196
197
198
199
# File 'lib/models/unified_approval_stage.rb', line 189

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("approvalStageTimeOutInDays", @approval_stage_time_out_in_days)
    writer.write_collection_of_object_values("escalationApprovers", @escalation_approvers)
    writer.write_number_value("escalationTimeInMinutes", @escalation_time_in_minutes)
    writer.write_boolean_value("isApproverJustificationRequired", @is_approver_justification_required)
    writer.write_boolean_value("isEscalationEnabled", @is_escalation_enabled)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_collection_of_object_values("primaryApprovers", @primary_approvers)
    writer.write_additional_data(@additional_data)
end