Class: MicrosoftGraph::Models::DeviceConfigurationState

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

Overview

Device Configuration State for a given device.

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



33
34
35
# File 'lib/models/device_configuration_state.rb', line 33

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 device_configuration_state

Raises:

  • (StandardError)


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

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

Instance Method Details

#display_nameObject

Gets the displayName property value. The name of the policy for this policyBase

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the policy for this policyBase

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



64
65
66
67
68
69
70
71
72
73
# File 'lib/models/device_configuration_state.rb', line 64

def get_field_deserializers()
    return super.merge({
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "platformType" => lambda {|n| @platform_type = n.get_enum_value(MicrosoftGraph::Models::PolicyPlatformType) },
        "settingCount" => lambda {|n| @setting_count = n.get_number_value() },
        "settingStates" => lambda {|n| @setting_states = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationSettingState.create_from_discriminator_value(pn) }) },
        "state" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::ComplianceStatus) },
        "version" => lambda {|n| @version = n.get_number_value() },
    })
end

#platform_typeObject

Gets the platformType property value. Supported platform types for policies.

Returns:

  • a policy_platform_type



78
79
80
# File 'lib/models/device_configuration_state.rb', line 78

def platform_type
    return @platform_type
end

#platform_type=(value) ⇒ Object

Sets the platformType property value. Supported platform types for policies.

Parameters:

  • value

    Value to set for the platformType property.

Returns:

  • a void



86
87
88
# File 'lib/models/device_configuration_state.rb', line 86

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


94
95
96
97
98
99
100
101
102
103
# File 'lib/models/device_configuration_state.rb', line 94

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("displayName", @display_name)
    writer.write_enum_value("platformType", @platform_type)
    writer.write_number_value("settingCount", @setting_count)
    writer.write_collection_of_object_values("settingStates", @setting_states)
    writer.write_enum_value("state", @state)
    writer.write_number_value("version", @version)
end

#setting_countObject

Gets the settingCount property value. Count of how many setting a policy holds

Returns:

  • a integer



108
109
110
# File 'lib/models/device_configuration_state.rb', line 108

def setting_count
    return @setting_count
end

#setting_count=(value) ⇒ Object

Sets the settingCount property value. Count of how many setting a policy holds

Parameters:

  • value

    Value to set for the settingCount property.

Returns:

  • a void



116
117
118
# File 'lib/models/device_configuration_state.rb', line 116

def setting_count=(value)
    @setting_count = value
end

#setting_statesObject

Gets the settingStates property value. The settingStates property

Returns:

  • a device_configuration_setting_state



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

def setting_states
    return @setting_states
end

#setting_states=(value) ⇒ Object

Sets the settingStates property value. The settingStates property

Parameters:

  • value

    Value to set for the settingStates property.

Returns:

  • a void



131
132
133
# File 'lib/models/device_configuration_state.rb', line 131

def setting_states=(value)
    @setting_states = value
end

#stateObject

Gets the state property value. The state property

Returns:

  • a compliance_status



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

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The state property

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



146
147
148
# File 'lib/models/device_configuration_state.rb', line 146

def state=(value)
    @state = value
end

#versionObject

Gets the version property value. The version of the policy

Returns:

  • a integer



153
154
155
# File 'lib/models/device_configuration_state.rb', line 153

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. The version of the policy

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



161
162
163
# File 'lib/models/device_configuration_state.rb', line 161

def version=(value)
    @version = value
end