Class: MicrosoftGraph::Models::CommsOperation

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



37
38
39
# File 'lib/models/comms_operation.rb', line 37

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 comms_operation

Raises:

  • (StandardError)


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/models/comms_operation.rb', line 45

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.addLargeGalleryViewOperation"
                return AddLargeGalleryViewOperation.new
            when "#microsoft.graph.cancelMediaProcessingOperation"
                return CancelMediaProcessingOperation.new
            when "#microsoft.graph.inviteParticipantsOperation"
                return InviteParticipantsOperation.new
            when "#microsoft.graph.muteParticipantOperation"
                return MuteParticipantOperation.new
            when "#microsoft.graph.playPromptOperation"
                return PlayPromptOperation.new
            when "#microsoft.graph.recordOperation"
                return RecordOperation.new
            when "#microsoft.graph.startHoldMusicOperation"
                return StartHoldMusicOperation.new
            when "#microsoft.graph.stopHoldMusicOperation"
                return StopHoldMusicOperation.new
            when "#microsoft.graph.subscribeToToneOperation"
                return SubscribeToToneOperation.new
            when "#microsoft.graph.unmuteParticipantOperation"
                return UnmuteParticipantOperation.new
            when "#microsoft.graph.updateRecordingStatusOperation"
                return UpdateRecordingStatusOperation.new
        end
    end
    return CommsOperation.new
end

Instance Method Details

#client_contextObject

Gets the clientContext property value. Unique Client Context string. Max limit is 256 chars.

Returns:

  • a string



22
23
24
# File 'lib/models/comms_operation.rb', line 22

def client_context
    return @client_context
end

#client_context=(value) ⇒ Object

Sets the clientContext property value. Unique Client Context string. Max limit is 256 chars.

Parameters:

  • value

    Value to set for the clientContext property.

Returns:

  • a void



30
31
32
# File 'lib/models/comms_operation.rb', line 30

def client_context=(value)
    @client_context = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



81
82
83
84
85
86
87
# File 'lib/models/comms_operation.rb', line 81

def get_field_deserializers()
    return super.merge({
        "clientContext" => lambda {|n| @client_context = n.get_string_value() },
        "resultInfo" => lambda {|n| @result_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResultInfo.create_from_discriminator_value(pn) }) },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::OperationStatus) },
    })
end

#result_infoObject

Gets the resultInfo property value. The result information. Read-only.

Returns:

  • a result_info



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

def result_info
    return @result_info
end

#result_info=(value) ⇒ Object

Sets the resultInfo property value. The result information. Read-only.

Parameters:

  • value

    Value to set for the resultInfo property.

Returns:

  • a void



100
101
102
# File 'lib/models/comms_operation.rb', line 100

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


108
109
110
111
112
113
114
# File 'lib/models/comms_operation.rb', line 108

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("clientContext", @client_context)
    writer.write_object_value("resultInfo", @result_info)
    writer.write_enum_value("status", @status)
end

#statusObject

Gets the status property value. The status property

Returns:

  • a operation_status



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

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



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

def status=(value)
    @status = value
end