Class: Azure::ARM::Web::Models::Address

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/address.rb

Overview

Address information for domain registration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address1String

Returns Address 1.

Returns:

  • (String)

    Address 1



16
17
18
# File 'lib/azure_mgmt_web/models/address.rb', line 16

def address1
  @address1
end

#address2String

Returns Address 2.

Returns:

  • (String)

    Address 2



19
20
21
# File 'lib/azure_mgmt_web/models/address.rb', line 19

def address2
  @address2
end

#cityString

Returns City.

Returns:

  • (String)

    City



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

def city
  @city
end

#countryString

Returns Country.

Returns:

  • (String)

    Country



25
26
27
# File 'lib/azure_mgmt_web/models/address.rb', line 25

def country
  @country
end

#postal_codeString

Returns Postal code.

Returns:

  • (String)

    Postal code



28
29
30
# File 'lib/azure_mgmt_web/models/address.rb', line 28

def postal_code
  @postal_code
end

#stateString

Returns State.

Returns:

  • (String)

    State



31
32
33
# File 'lib/azure_mgmt_web/models/address.rb', line 31

def state
  @state
end

Class Method Details

.deserialize_object(object) ⇒ Address

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:

  • (Address)

    Deserialized object.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/azure_mgmt_web/models/address.rb', line 75

def self.deserialize_object(object)
  return if object.nil?
  output_object = Address.new

  deserialized_property = object['address1']
  output_object.address1 = deserialized_property

  deserialized_property = object['address2']
  output_object.address2 = deserialized_property

  deserialized_property = object['city']
  output_object.city = deserialized_property

  deserialized_property = object['country']
  output_object.country = deserialized_property

  deserialized_property = object['postalCode']
  output_object.postal_code = deserialized_property

  deserialized_property = object['state']
  output_object.state = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/azure_mgmt_web/models/address.rb', line 45

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.address1
  output_object['address1'] = serialized_property unless serialized_property.nil?

  serialized_property = object.address2
  output_object['address2'] = serialized_property unless serialized_property.nil?

  serialized_property = object.city
  output_object['city'] = serialized_property unless serialized_property.nil?

  serialized_property = object.country
  output_object['country'] = serialized_property unless serialized_property.nil?

  serialized_property = object.postal_code
  output_object['postalCode'] = serialized_property unless serialized_property.nil?

  serialized_property = object.state
  output_object['state'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



36
37
38
# File 'lib/azure_mgmt_web/models/address.rb', line 36

def validate
  # Nothing to validate
end