Class: MicrosoftGraph::Models::DeviceActionResult

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/device_action_result.rb

Overview

Device action result

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new deviceActionResult and sets the default values.



79
80
81
# File 'lib/models/device_action_result.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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a device_action_result

Raises:

  • (StandardError)


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/models/device_action_result.rb', line 87

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.deleteUserFromSharedAppleDeviceActionResult"
                return DeleteUserFromSharedAppleDeviceActionResult.new
            when "#microsoft.graph.locateDeviceActionResult"
                return LocateDeviceActionResult.new
            when "#microsoft.graph.remoteLockActionResult"
                return RemoteLockActionResult.new
            when "#microsoft.graph.resetPasscodeActionResult"
                return ResetPasscodeActionResult.new
            when "#microsoft.graph.windowsDefenderScanActionResult"
                return WindowsDefenderScanActionResult.new
        end
    end
    return DeviceActionResult.new
end

Instance Method Details

#action_nameObject

Gets the actionName property value. Action name

Returns:

  • a string



34
35
36
# File 'lib/models/device_action_result.rb', line 34

def action_name
    return @action_name
end

#action_name=(value) ⇒ Object

Sets the actionName property value. Action name

Parameters:

  • value

    Value to set for the actionName property.

Returns:

  • a void



42
43
44
# File 'lib/models/device_action_result.rb', line 42

def action_name=(value)
    @action_name = value
end

#action_stateObject

Gets the actionState property value. State of the action on the device

Returns:

  • a action_state



49
50
51
# File 'lib/models/device_action_result.rb', line 49

def action_state
    return @action_state
end

#action_state=(value) ⇒ Object

Sets the actionState property value. State of the action on the device

Parameters:

  • value

    Value to set for the actionState property.

Returns:

  • a void



57
58
59
# File 'lib/models/device_action_result.rb', line 57

def action_state=(value)
    @action_state = value
end

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



64
65
66
# File 'lib/models/device_action_result.rb', line 64

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.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



72
73
74
# File 'lib/models/device_action_result.rb', line 72

def additional_data=(value)
    @additional_data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "actionName" => lambda {|n| @action_name = n.get_string_value() },
        "actionState" => lambda {|n| @action_state = n.get_enum_value(MicrosoftGraph::Models::ActionState) },
        "lastUpdatedDateTime" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
    }
end

#last_updated_date_timeObject

Gets the lastUpdatedDateTime property value. Time the action state was last updated

Returns:

  • a date_time



124
125
126
# File 'lib/models/device_action_result.rb', line 124

def last_updated_date_time
    return @last_updated_date_time
end

#last_updated_date_time=(value) ⇒ Object

Sets the lastUpdatedDateTime property value. Time the action state was last updated

Parameters:

  • value

    Value to set for the lastUpdatedDateTime property.

Returns:

  • a void



132
133
134
# File 'lib/models/device_action_result.rb', line 132

def last_updated_date_time=(value)
    @last_updated_date_time = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



139
140
141
# File 'lib/models/device_action_result.rb', line 139

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



147
148
149
# File 'lib/models/device_action_result.rb', line 147

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


155
156
157
158
159
160
161
162
163
# File 'lib/models/device_action_result.rb', line 155

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("actionName", @action_name)
    writer.write_enum_value("actionState", @action_state)
    writer.write_date_time_value("lastUpdatedDateTime", @last_updated_date_time)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_additional_data(@additional_data)
end

#start_date_timeObject

Gets the startDateTime property value. Time the action was initiated

Returns:

  • a date_time



168
169
170
# File 'lib/models/device_action_result.rb', line 168

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

Sets the startDateTime property value. Time the action was initiated

Parameters:

  • value

    Value to set for the startDateTime property.

Returns:

  • a void



176
177
178
# File 'lib/models/device_action_result.rb', line 176

def start_date_time=(value)
    @start_date_time = value
end