Class: MicrosoftGraph::Models::LongRunningOperation

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

Direct Known Subclasses

RichLongRunningOperation

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 longRunningOperation and sets the default values.



29
30
31
# File 'lib/models/long_running_operation.rb', line 29

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 long_running_operation

Raises:

  • (StandardError)


52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/models/long_running_operation.rb', line 52

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.richLongRunningOperation"
                return RichLongRunningOperation.new
        end
    end
    return LongRunningOperation.new
end

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



36
37
38
# File 'lib/models/long_running_operation.rb', line 36

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the created_date_time property.

Returns:

  • a void



44
45
46
# File 'lib/models/long_running_operation.rb', line 44

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



68
69
70
71
72
73
74
75
76
# File 'lib/models/long_running_operation.rb', line 68

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "lastActionDateTime" => lambda {|n| @last_action_date_time = n.get_date_time_value() },
        "resourceLocation" => lambda {|n| @resource_location = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::LongRunningOperationStatus) },
        "statusDetail" => lambda {|n| @status_detail = n.get_string_value() },
    })
end

#last_action_date_timeObject

Gets the lastActionDateTime property value. The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



81
82
83
# File 'lib/models/long_running_operation.rb', line 81

def last_action_date_time
    return @last_action_date_time
end

#last_action_date_time=(value) ⇒ Object

Sets the lastActionDateTime property value. The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the last_action_date_time property.

Returns:

  • a void



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

def last_action_date_time=(value)
    @last_action_date_time = value
end

#resource_locationObject

Gets the resourceLocation property value. URI of the resource that the operation is performed on.

Returns:

  • a string



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

def resource_location
    return @resource_location
end

#resource_location=(value) ⇒ Object

Sets the resourceLocation property value. URI of the resource that the operation is performed on.

Parameters:

  • value

    Value to set for the resource_location property.

Returns:

  • a void



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

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


112
113
114
115
116
117
118
119
120
# File 'lib/models/long_running_operation.rb', line 112

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_date_time_value("lastActionDateTime", @last_action_date_time)
    writer.write_string_value("resourceLocation", @resource_location)
    writer.write_enum_value("status", @status)
    writer.write_string_value("statusDetail", @status_detail)
end

#statusObject

Gets the status property value. The status of the operation. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue.

Returns:

  • a long_running_operation_status



125
126
127
# File 'lib/models/long_running_operation.rb', line 125

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. The status of the operation. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



133
134
135
# File 'lib/models/long_running_operation.rb', line 133

def status=(value)
    @status = value
end

#status_detailObject

Gets the statusDetail property value. Details about the status of the operation.

Returns:

  • a string



140
141
142
# File 'lib/models/long_running_operation.rb', line 140

def status_detail
    return @status_detail
end

#status_detail=(value) ⇒ Object

Sets the statusDetail property value. Details about the status of the operation.

Parameters:

  • value

    Value to set for the status_detail property.

Returns:

  • a void



148
149
150
# File 'lib/models/long_running_operation.rb', line 148

def status_detail=(value)
    @status_detail = value
end