Class: MicrosoftGraph::Models::OmaSetting

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

Overview

OMA Settings definition.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new omaSetting and sets the default values.



45
46
47
# File 'lib/models/oma_setting.rb', line 45

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 oma_setting

Raises:

  • (StandardError)


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/oma_setting.rb', line 53

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.omaSettingBase64"
                return OmaSettingBase64.new
            when "#microsoft.graph.omaSettingBoolean"
                return OmaSettingBoolean.new
            when "#microsoft.graph.omaSettingDateTime"
                return OmaSettingDateTime.new
            when "#microsoft.graph.omaSettingFloatingPoint"
                return OmaSettingFloatingPoint.new
            when "#microsoft.graph.omaSettingInteger"
                return OmaSettingInteger.new
            when "#microsoft.graph.omaSettingString"
                return OmaSettingString.new
            when "#microsoft.graph.omaSettingStringXml"
                return OmaSettingStringXml.new
        end
    end
    return OmaSetting.new
end

Instance Method Details

#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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#descriptionObject

Gets the description property value. Description.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Description.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Display Name.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display Name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "omaUri" => lambda {|n| @oma_uri = n.get_string_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



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

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



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

def odata_type=(value)
    @odata_type = value
end

#oma_uriObject

Gets the omaUri property value. OMA.

Returns:

  • a string



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

def oma_uri
    return @oma_uri
end

#oma_uri=(value) ⇒ Object

Sets the omaUri property value. OMA.

Parameters:

  • value

    Value to set for the omaUri property.

Returns:

  • a void



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

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


154
155
156
157
158
159
160
161
# File 'lib/models/oma_setting.rb', line 154

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("omaUri", @oma_uri)
    writer.write_additional_data(@additional_data)
end