Class: MicrosoftGraph::Models::PhysicalAddress

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new physicalAddress and sets the default values.



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

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 physical_address

Raises:

  • (StandardError)


87
88
89
90
# File 'lib/models/physical_address.rb', line 87

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return PhysicalAddress.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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#cityObject

Gets the city property value. The city.

Returns:

  • a string



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

def city
    return @city
end

#city=(value) ⇒ Object

Sets the city property value. The city.

Parameters:

  • value

    Value to set for the city property.

Returns:

  • a void



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

def city=(value)
    @city = value
end

#country_or_regionObject

Gets the countryOrRegion property value. The country or region. It’s a free-format string value, for example, ‘United States’.

Returns:

  • a string



71
72
73
# File 'lib/models/physical_address.rb', line 71

def country_or_region
    return @country_or_region
end

#country_or_region=(value) ⇒ Object

Sets the countryOrRegion property value. The country or region. It’s a free-format string value, for example, ‘United States’.

Parameters:

  • value

    Value to set for the countryOrRegion property.

Returns:

  • a void



79
80
81
# File 'lib/models/physical_address.rb', line 79

def country_or_region=(value)
    @country_or_region = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "city" => lambda {|n| @city = n.get_string_value() },
        "countryOrRegion" => lambda {|n| @country_or_region = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "postalCode" => lambda {|n| @postal_code = n.get_string_value() },
        "state" => lambda {|n| @state = n.get_string_value() },
        "street" => lambda {|n| @street = n.get_string_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



109
110
111
# File 'lib/models/physical_address.rb', line 109

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



117
118
119
# File 'lib/models/physical_address.rb', line 117

def odata_type=(value)
    @odata_type = value
end

#postal_codeObject

Gets the postalCode property value. The postal code.

Returns:

  • a string



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

def postal_code
    return @postal_code
end

#postal_code=(value) ⇒ Object

Sets the postalCode property value. The postal code.

Parameters:

  • value

    Value to set for the postalCode property.

Returns:

  • a void



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

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


140
141
142
143
144
145
146
147
148
149
# File 'lib/models/physical_address.rb', line 140

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("city", @city)
    writer.write_string_value("countryOrRegion", @country_or_region)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("postalCode", @postal_code)
    writer.write_string_value("state", @state)
    writer.write_string_value("street", @street)
    writer.write_additional_data(@additional_data)
end

#stateObject

Gets the state property value. The state.

Returns:

  • a string



154
155
156
# File 'lib/models/physical_address.rb', line 154

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The state.

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



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

def state=(value)
    @state = value
end

#streetObject

Gets the street property value. The street.

Returns:

  • a string



169
170
171
# File 'lib/models/physical_address.rb', line 169

def street
    return @street
end

#street=(value) ⇒ Object

Sets the street property value. The street.

Parameters:

  • value

    Value to set for the street property.

Returns:

  • a void



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

def street=(value)
    @street = value
end