Class: MicrosoftGraph::Models::ApprovalSettings
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::ApprovalSettings
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/approval_settings.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#approval_mode ⇒ Object
Gets the approvalMode property value.
-
#approval_mode=(value) ⇒ Object
Sets the approvalMode property value.
-
#approval_stages ⇒ Object
Gets the approvalStages property value.
-
#approval_stages=(value) ⇒ Object
Sets the approvalStages property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new approvalSettings and sets the default values.
-
#is_approval_required ⇒ Object
Gets the isApprovalRequired property value.
-
#is_approval_required=(value) ⇒ Object
Sets the isApprovalRequired property value.
-
#is_approval_required_for_extension ⇒ Object
Gets the isApprovalRequiredForExtension property value.
-
#is_approval_required_for_extension=(value) ⇒ Object
Sets the isApprovalRequiredForExtension property value.
-
#is_requestor_justification_required ⇒ Object
Gets the isRequestorJustificationRequired property value.
-
#is_requestor_justification_required=(value) ⇒ Object
Sets the isRequestorJustificationRequired property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new approvalSettings and sets the default values.
79 80 81 |
# File 'lib/models/approval_settings.rb', line 79 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
87 88 89 90 |
# File 'lib/models/approval_settings.rb', line 87 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return ApprovalSettings.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
34 35 36 |
# File 'lib/models/approval_settings.rb', line 34 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.
42 43 44 |
# File 'lib/models/approval_settings.rb', line 42 def additional_data=(value) @additional_data = value end |
#approval_mode ⇒ Object
Gets the approvalMode property value. One of SingleStage, Serial, Parallel, NoApproval (default). NoApproval is used when isApprovalRequired is false.
49 50 51 |
# File 'lib/models/approval_settings.rb', line 49 def approval_mode return @approval_mode end |
#approval_mode=(value) ⇒ Object
Sets the approvalMode property value. One of SingleStage, Serial, Parallel, NoApproval (default). NoApproval is used when isApprovalRequired is false.
57 58 59 |
# File 'lib/models/approval_settings.rb', line 57 def approval_mode=(value) @approval_mode = value end |
#approval_stages ⇒ Object
Gets the approvalStages property value. If approval is required, the one or two elements of this collection define each of the stages of approval. An empty array if no approval is required.
64 65 66 |
# File 'lib/models/approval_settings.rb', line 64 def approval_stages return @approval_stages end |
#approval_stages=(value) ⇒ Object
Sets the approvalStages property value. If approval is required, the one or two elements of this collection define each of the stages of approval. An empty array if no approval is required.
72 73 74 |
# File 'lib/models/approval_settings.rb', line 72 def approval_stages=(value) @approval_stages = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/models/approval_settings.rb', line 95 def get_field_deserializers() return { "approvalMode" => lambda {|n| @approval_mode = n.get_string_value() }, "approvalStages" => lambda {|n| @approval_stages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UnifiedApprovalStage.create_from_discriminator_value(pn) }) }, "isApprovalRequired" => lambda {|n| @is_approval_required = n.get_boolean_value() }, "isApprovalRequiredForExtension" => lambda {|n| @is_approval_required_for_extension = n.get_boolean_value() }, "isRequestorJustificationRequired" => lambda {|n| @is_requestor_justification_required = n.get_boolean_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, } end |
#is_approval_required ⇒ Object
Gets the isApprovalRequired property value. Indicates whether approval is required for requests in this policy.
109 110 111 |
# File 'lib/models/approval_settings.rb', line 109 def is_approval_required return @is_approval_required end |
#is_approval_required=(value) ⇒ Object
Sets the isApprovalRequired property value. Indicates whether approval is required for requests in this policy.
117 118 119 |
# File 'lib/models/approval_settings.rb', line 117 def is_approval_required=(value) @is_approval_required = value end |
#is_approval_required_for_extension ⇒ Object
Gets the isApprovalRequiredForExtension property value. Indicates whether approval is required for a user to extend their assignment.
124 125 126 |
# File 'lib/models/approval_settings.rb', line 124 def is_approval_required_for_extension return @is_approval_required_for_extension end |
#is_approval_required_for_extension=(value) ⇒ Object
Sets the isApprovalRequiredForExtension property value. Indicates whether approval is required for a user to extend their assignment.
132 133 134 |
# File 'lib/models/approval_settings.rb', line 132 def is_approval_required_for_extension=(value) @is_approval_required_for_extension = value end |
#is_requestor_justification_required ⇒ Object
Gets the isRequestorJustificationRequired property value. Indicates whether the requestor is required to supply a justification in their request.
139 140 141 |
# File 'lib/models/approval_settings.rb', line 139 def is_requestor_justification_required return @is_requestor_justification_required end |
#is_requestor_justification_required=(value) ⇒ Object
Sets the isRequestorJustificationRequired property value. Indicates whether the requestor is required to supply a justification in their request.
147 148 149 |
# File 'lib/models/approval_settings.rb', line 147 def is_requestor_justification_required=(value) @is_requestor_justification_required = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
154 155 156 |
# File 'lib/models/approval_settings.rb', line 154 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
162 163 164 |
# File 'lib/models/approval_settings.rb', line 162 def odata_type=(value) @odata_type = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
170 171 172 173 174 175 176 177 178 179 |
# File 'lib/models/approval_settings.rb', line 170 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("approvalMode", @approval_mode) writer.write_collection_of_object_values("approvalStages", @approval_stages) writer.write_boolean_value("isApprovalRequired", @is_approval_required) writer.write_boolean_value("isApprovalRequiredForExtension", @is_approval_required_for_extension) writer.write_boolean_value("isRequestorJustificationRequired", @is_requestor_justification_required) writer.write_string_value("@odata.type", @odata_type) writer.write_additional_data(@additional_data) end |