Class: MicrosoftGraph::Models::ApprovalStage

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/approval_stage.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new approvalStage and sets the default values.



50
51
52
# File 'lib/models/approval_stage.rb', line 50

def initialize()
    super
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 approval_stage

Raises:

  • (StandardError)


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

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

Instance Method Details

#assigned_to_meObject

Gets the assignedToMe property value. Indicates whether the stage is assigned to the calling user to review. Read-only.

Returns:

  • a boolean



35
36
37
# File 'lib/models/approval_stage.rb', line 35

def assigned_to_me
    return @assigned_to_me
end

#assigned_to_me=(value) ⇒ Object

Sets the assignedToMe property value. Indicates whether the stage is assigned to the calling user to review. Read-only.

Parameters:

  • value

    Value to set for the assignedToMe property.

Returns:

  • a void



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

def assigned_to_me=(value)
    @assigned_to_me = value
end

#display_nameObject

Gets the displayName property value. The label provided by the policy creator to identify an approval stage. Read-only.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The label provided by the policy creator to identify an approval stage. Read-only.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/models/approval_stage.rb', line 81

def get_field_deserializers()
    return super.merge({
        "assignedToMe" => lambda {|n| @assigned_to_me = n.get_boolean_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "justification" => lambda {|n| @justification = n.get_string_value() },
        "reviewResult" => lambda {|n| @review_result = n.get_string_value() },
        "reviewedBy" => lambda {|n| @reviewed_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Identity.create_from_discriminator_value(pn) }) },
        "reviewedDateTime" => lambda {|n| @reviewed_date_time = n.get_date_time_value() },
        "status" => lambda {|n| @status = n.get_string_value() },
    })
end

#justificationObject

Gets the justification property value. The justification associated with the approval stage decision.

Returns:

  • a string



96
97
98
# File 'lib/models/approval_stage.rb', line 96

def justification
    return @justification
end

#justification=(value) ⇒ Object

Sets the justification property value. The justification associated with the approval stage decision.

Parameters:

  • value

    Value to set for the justification property.

Returns:

  • a void



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

def justification=(value)
    @justification = value
end

#review_resultObject

Gets the reviewResult property value. The result of this approval record. Possible values include: NotReviewed, Approved, Denied.

Returns:

  • a string



111
112
113
# File 'lib/models/approval_stage.rb', line 111

def review_result
    return @review_result
end

#review_result=(value) ⇒ Object

Sets the reviewResult property value. The result of this approval record. Possible values include: NotReviewed, Approved, Denied.

Parameters:

  • value

    Value to set for the reviewResult property.

Returns:

  • a void



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

def review_result=(value)
    @review_result = value
end

#reviewed_byObject

Gets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn’t reviewed. Read-only.

Returns:

  • a identity



126
127
128
# File 'lib/models/approval_stage.rb', line 126

def reviewed_by
    return @reviewed_by
end

#reviewed_by=(value) ⇒ Object

Sets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn’t reviewed. Read-only.

Parameters:

  • value

    Value to set for the reviewedBy property.

Returns:

  • a void



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

def reviewed_by=(value)
    @reviewed_by = value
end

#reviewed_date_timeObject

Gets the reviewedDateTime property value. The date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.

Returns:

  • a date_time



141
142
143
# File 'lib/models/approval_stage.rb', line 141

def reviewed_date_time
    return @reviewed_date_time
end

#reviewed_date_time=(value) ⇒ Object

Sets the reviewedDateTime property value. The date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.

Parameters:

  • value

    Value to set for the reviewedDateTime property.

Returns:

  • a void



149
150
151
# File 'lib/models/approval_stage.rb', line 149

def reviewed_date_time=(value)
    @reviewed_date_time = 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)


157
158
159
160
161
162
163
164
165
166
167
# File 'lib/models/approval_stage.rb', line 157

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("assignedToMe", @assigned_to_me)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("justification", @justification)
    writer.write_string_value("reviewResult", @review_result)
    writer.write_object_value("reviewedBy", @reviewed_by)
    writer.write_date_time_value("reviewedDateTime", @reviewed_date_time)
    writer.write_string_value("status", @status)
end

#statusObject

Gets the status property value. The stage status. Possible values: InProgress, Initializing, Completed, Expired. Read-only.

Returns:

  • a string



172
173
174
# File 'lib/models/approval_stage.rb', line 172

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. The stage status. Possible values: InProgress, Initializing, Completed, Expired. Read-only.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



180
181
182
# File 'lib/models/approval_stage.rb', line 180

def status=(value)
    @status = value
end