Class: Azure::ARM::Web::Models::Address
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::Address
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/address.rb
Overview
Address information for domain registration
Instance Attribute Summary collapse
-
#address1 ⇒ String
Address 1.
-
#address2 ⇒ String
Address 2.
-
#city ⇒ String
City.
-
#country ⇒ String
Country.
-
#postal_code ⇒ String
Postal code.
-
#state ⇒ String
State.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ Address
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#address1 ⇒ String
Returns Address 1.
16 17 18 |
# File 'lib/azure_mgmt_web/models/address.rb', line 16 def address1 @address1 end |
#address2 ⇒ String
Returns Address 2.
19 20 21 |
# File 'lib/azure_mgmt_web/models/address.rb', line 19 def address2 @address2 end |
#city ⇒ String
Returns City.
22 23 24 |
# File 'lib/azure_mgmt_web/models/address.rb', line 22 def city @city end |
#country ⇒ String
Returns Country.
25 26 27 |
# File 'lib/azure_mgmt_web/models/address.rb', line 25 def country @country end |
#postal_code ⇒ String
Returns Postal code.
28 29 30 |
# File 'lib/azure_mgmt_web/models/address.rb', line 28 def postal_code @postal_code end |
#state ⇒ String
Returns 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.
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.
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
#validate ⇒ Object
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 |