Class: MicrosoftGraph::Models::AccessPackageApprovalStage

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new accessPackageApprovalStage and sets the default values.



58
59
60
# File 'lib/models/access_package_approval_stage.rb', line 58

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 access_package_approval_stage

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return AccessPackageApprovalStage.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



43
44
45
# File 'lib/models/access_package_approval_stage.rb', line 43

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



51
52
53
# File 'lib/models/access_package_approval_stage.rb', line 51

def additional_data=(value)
    @additional_data = value
end

#duration_before_automatic_denialObject

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

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



74
75
76
# File 'lib/models/access_package_approval_stage.rb', line 74

def duration_before_automatic_denial
    return @duration_before_automatic_denial
end

#duration_before_automatic_denial=(value) ⇒ Object

Sets the durationBeforeAutomaticDenial 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 durationBeforeAutomaticDenial property.

Returns:

  • a void



82
83
84
# File 'lib/models/access_package_approval_stage.rb', line 82

def duration_before_automatic_denial=(value)
    @duration_before_automatic_denial = value
end

#duration_before_escalationObject

Gets the durationBeforeEscalation property value. If escalation is required, the time a request can be pending a response from a primary approver.

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



89
90
91
# File 'lib/models/access_package_approval_stage.rb', line 89

def duration_before_escalation
    return @duration_before_escalation
end

#duration_before_escalation=(value) ⇒ Object

Sets the durationBeforeEscalation property value. If escalation is required, the time a request can be pending a response from a primary approver.

Parameters:

  • value

    Value to set for the durationBeforeEscalation property.

Returns:

  • a void



97
98
99
# File 'lib/models/access_package_approval_stage.rb', line 97

def duration_before_escalation=(value)
    @duration_before_escalation = value
end

#escalation_approversObject

Gets the escalationApprovers property value. If escalation is enabled and the primary approvers do not respond before the escalation time, the escalationApprovers are the users who will be asked to approve requests.

Returns:

  • a subject_set



104
105
106
# File 'lib/models/access_package_approval_stage.rb', line 104

def escalation_approvers
    return @escalation_approvers
end

#escalation_approvers=(value) ⇒ Object

Sets the escalationApprovers property value. If escalation is enabled and the primary approvers do not respond before the escalation time, the escalationApprovers are the users who will be asked to approve requests.

Parameters:

  • value

    Value to set for the escalationApprovers property.

Returns:

  • a void



112
113
114
# File 'lib/models/access_package_approval_stage.rb', line 112

def escalation_approvers=(value)
    @escalation_approvers = value
end

#fallback_escalation_approversObject

Gets the fallbackEscalationApprovers property value. The subjects, typically users, who are the fallback escalation approvers.

Returns:

  • a subject_set



119
120
121
# File 'lib/models/access_package_approval_stage.rb', line 119

def fallback_escalation_approvers
    return @fallback_escalation_approvers
end

#fallback_escalation_approvers=(value) ⇒ Object

Sets the fallbackEscalationApprovers property value. The subjects, typically users, who are the fallback escalation approvers.

Parameters:

  • value

    Value to set for the fallbackEscalationApprovers property.

Returns:

  • a void



127
128
129
# File 'lib/models/access_package_approval_stage.rb', line 127

def fallback_escalation_approvers=(value)
    @fallback_escalation_approvers = value
end

#fallback_primary_approversObject

Gets the fallbackPrimaryApprovers property value. The subjects, typically users, who are the fallback primary approvers.

Returns:

  • a subject_set



134
135
136
# File 'lib/models/access_package_approval_stage.rb', line 134

def fallback_primary_approvers
    return @fallback_primary_approvers
end

#fallback_primary_approvers=(value) ⇒ Object

Sets the fallbackPrimaryApprovers property value. The subjects, typically users, who are the fallback primary approvers.

Parameters:

  • value

    Value to set for the fallbackPrimaryApprovers property.

Returns:

  • a void



142
143
144
# File 'lib/models/access_package_approval_stage.rb', line 142

def fallback_primary_approvers=(value)
    @fallback_primary_approvers = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/models/access_package_approval_stage.rb', line 149

def get_field_deserializers()
    return {
        "durationBeforeAutomaticDenial" => lambda {|n| @duration_before_automatic_denial = n.get_duration_value() },
        "durationBeforeEscalation" => lambda {|n| @duration_before_escalation = n.get_duration_value() },
        "escalationApprovers" => lambda {|n| @escalation_approvers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) },
        "fallbackEscalationApprovers" => lambda {|n| @fallback_escalation_approvers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) },
        "fallbackPrimaryApprovers" => lambda {|n| @fallback_primary_approvers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) },
        "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 is required to provide a justification for approving a request.

Returns:

  • a boolean



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

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 is required to provide a justification for approving a request.

Parameters:

  • value

    Value to set for the isApproverJustificationRequired property.

Returns:

  • a void



174
175
176
# File 'lib/models/access_package_approval_stage.rb', line 174

def is_approver_justification_required=(value)
    @is_approver_justification_required = value
end

#is_escalation_enabledObject

Gets the isEscalationEnabled property value. If true, then one or more escalationApprovers are configured in this approval stage.

Returns:

  • a boolean



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

def is_escalation_enabled
    return @is_escalation_enabled
end

#is_escalation_enabled=(value) ⇒ Object

Sets the isEscalationEnabled property value. If true, then one or more escalationApprovers are configured in this approval stage.

Parameters:

  • value

    Value to set for the isEscalationEnabled property.

Returns:

  • a void



189
190
191
# File 'lib/models/access_package_approval_stage.rb', line 189

def is_escalation_enabled=(value)
    @is_escalation_enabled = value
end

#odata_typeObject

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

Returns:

  • a string



196
197
198
# File 'lib/models/access_package_approval_stage.rb', line 196

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



204
205
206
# File 'lib/models/access_package_approval_stage.rb', line 204

def odata_type=(value)
    @odata_type = value
end

#primary_approversObject

Gets the primaryApprovers property value. The subjects, typically users, who will be asked to approve requests. A collection of singleUser, groupMembers, requestorManager, internalSponsors or externalSponsors.

Returns:

  • a subject_set



211
212
213
# File 'lib/models/access_package_approval_stage.rb', line 211

def primary_approvers
    return @primary_approvers
end

#primary_approvers=(value) ⇒ Object

Sets the primaryApprovers property value. The subjects, typically users, who will be asked to approve requests. A collection of singleUser, groupMembers, requestorManager, internalSponsors or externalSponsors.

Parameters:

  • value

    Value to set for the primaryApprovers property.

Returns:

  • a void



219
220
221
# File 'lib/models/access_package_approval_stage.rb', line 219

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)


227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/models/access_package_approval_stage.rb', line 227

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_duration_value("durationBeforeAutomaticDenial", @duration_before_automatic_denial)
    writer.write_duration_value("durationBeforeEscalation", @duration_before_escalation)
    writer.write_collection_of_object_values("escalationApprovers", @escalation_approvers)
    writer.write_collection_of_object_values("fallbackEscalationApprovers", @fallback_escalation_approvers)
    writer.write_collection_of_object_values("fallbackPrimaryApprovers", @fallback_primary_approvers)
    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