Class: MicrosoftGraph::Models::TeamsAsyncOperation

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/teams_async_operation.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 teamsAsyncOperation and sets the default values.



53
54
55
# File 'lib/models/teams_async_operation.rb', line 53

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 teams_async_operation

Raises:

  • (StandardError)


76
77
78
79
# File 'lib/models/teams_async_operation.rb', line 76

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

Instance Method Details

#attempts_countObject

Gets the attemptsCount property value. Number of times the operation was attempted before being marked successful or failed.

Returns:

  • a integer



38
39
40
# File 'lib/models/teams_async_operation.rb', line 38

def attempts_count
    return @attempts_count
end

#attempts_count=(value) ⇒ Object

Sets the attemptsCount property value. Number of times the operation was attempted before being marked successful or failed.

Parameters:

  • value

    Value to set for the attemptsCount property.

Returns:

  • a void



46
47
48
# File 'lib/models/teams_async_operation.rb', line 46

def attempts_count=(value)
    @attempts_count = value
end

#created_date_timeObject

Gets the createdDateTime property value. Time when the operation was created.

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Time when the operation was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



68
69
70
# File 'lib/models/teams_async_operation.rb', line 68

def created_date_time=(value)
    @created_date_time = value
end

#errorObject

Gets the error property value. Any error that causes the async operation to fail.

Returns:

  • a operation_error



84
85
86
# File 'lib/models/teams_async_operation.rb', line 84

def error
    return @error
end

#error=(value) ⇒ Object

Sets the error property value. Any error that causes the async operation to fail.

Parameters:

  • value

    Value to set for the error property.

Returns:

  • a void



92
93
94
# File 'lib/models/teams_async_operation.rb', line 92

def error=(value)
    @error = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/models/teams_async_operation.rb', line 99

def get_field_deserializers()
    return super.merge({
        "attemptsCount" => lambda {|n| @attempts_count = n.get_number_value() },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "error" => lambda {|n| @error = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OperationError.create_from_discriminator_value(pn) }) },
        "lastActionDateTime" => lambda {|n| @last_action_date_time = n.get_date_time_value() },
        "operationType" => lambda {|n| @operation_type = n.get_enum_value(MicrosoftGraph::Models::TeamsAsyncOperationType) },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::TeamsAsyncOperationStatus) },
        "targetResourceId" => lambda {|n| @target_resource_id = n.get_string_value() },
        "targetResourceLocation" => lambda {|n| @target_resource_location = n.get_string_value() },
    })
end

#last_action_date_timeObject

Gets the lastActionDateTime property value. Time when the async operation was last updated.

Returns:

  • a date_time



115
116
117
# File 'lib/models/teams_async_operation.rb', line 115

def last_action_date_time
    return @last_action_date_time
end

#last_action_date_time=(value) ⇒ Object

Sets the lastActionDateTime property value. Time when the async operation was last updated.

Parameters:

  • value

    Value to set for the lastActionDateTime property.

Returns:

  • a void



123
124
125
# File 'lib/models/teams_async_operation.rb', line 123

def last_action_date_time=(value)
    @last_action_date_time = value
end

#operation_typeObject

Gets the operationType property value. The operationType property

Returns:

  • a teams_async_operation_type



130
131
132
# File 'lib/models/teams_async_operation.rb', line 130

def operation_type
    return @operation_type
end

#operation_type=(value) ⇒ Object

Sets the operationType property value. The operationType property

Parameters:

  • value

    Value to set for the operationType property.

Returns:

  • a void



138
139
140
# File 'lib/models/teams_async_operation.rb', line 138

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


146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/models/teams_async_operation.rb', line 146

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_number_value("attemptsCount", @attempts_count)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_object_value("error", @error)
    writer.write_date_time_value("lastActionDateTime", @last_action_date_time)
    writer.write_enum_value("operationType", @operation_type)
    writer.write_enum_value("status", @status)
    writer.write_string_value("targetResourceId", @target_resource_id)
    writer.write_string_value("targetResourceLocation", @target_resource_location)
end

#statusObject

Gets the status property value. The status property

Returns:

  • a teams_async_operation_status



162
163
164
# File 'lib/models/teams_async_operation.rb', line 162

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. The status property

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



170
171
172
# File 'lib/models/teams_async_operation.rb', line 170

def status=(value)
    @status = value
end

#target_resource_idObject

Gets the targetResourceId property value. The ID of the object that’s created or modified as result of this async operation, typically a team.

Returns:

  • a string



177
178
179
# File 'lib/models/teams_async_operation.rb', line 177

def target_resource_id
    return @target_resource_id
end

#target_resource_id=(value) ⇒ Object

Sets the targetResourceId property value. The ID of the object that’s created or modified as result of this async operation, typically a team.

Parameters:

  • value

    Value to set for the targetResourceId property.

Returns:

  • a void



185
186
187
# File 'lib/models/teams_async_operation.rb', line 185

def target_resource_id=(value)
    @target_resource_id = value
end

#target_resource_locationObject

Gets the targetResourceLocation property value. The location of the object that’s created or modified as result of this async operation. This URL should be treated as an opaque value and not parsed into its component paths.

Returns:

  • a string



192
193
194
# File 'lib/models/teams_async_operation.rb', line 192

def target_resource_location
    return @target_resource_location
end

#target_resource_location=(value) ⇒ Object

Sets the targetResourceLocation property value. The location of the object that’s created or modified as result of this async operation. This URL should be treated as an opaque value and not parsed into its component paths.

Parameters:

  • value

    Value to set for the targetResourceLocation property.

Returns:

  • a void



200
201
202
# File 'lib/models/teams_async_operation.rb', line 200

def target_resource_location=(value)
    @target_resource_location = value
end