Class: Azure::ARM::Web::Models::Contact

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

Overview

Contact information for domain registration. If ‘Domain Privacy’ option is not selected then the contact information will be be made publicly available through the Whois directories as per ICANN requirements.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address_mailingAddress

Returns Mailing address.

Returns:



18
19
20
# File 'lib/azure_mgmt_web/models/contact.rb', line 18

def address_mailing
  @address_mailing
end

#emailString

Returns Email address.

Returns:

  • (String)

    Email address



21
22
23
# File 'lib/azure_mgmt_web/models/contact.rb', line 21

def email
  @email
end

#faxString

Returns Fax number.

Returns:

  • (String)

    Fax number



24
25
26
# File 'lib/azure_mgmt_web/models/contact.rb', line 24

def fax
  @fax
end

#job_titleString

Returns Job title.

Returns:

  • (String)

    Job title



27
28
29
# File 'lib/azure_mgmt_web/models/contact.rb', line 27

def job_title
  @job_title
end

#name_firstString

Returns First name.

Returns:

  • (String)

    First name



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

def name_first
  @name_first
end

#name_lastString

Returns Last name.

Returns:

  • (String)

    Last name



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

def name_last
  @name_last
end

#name_middleString

Returns Middle name.

Returns:

  • (String)

    Middle name



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

def name_middle
  @name_middle
end

#organizationString

Returns Organization.

Returns:

  • (String)

    Organization



39
40
41
# File 'lib/azure_mgmt_web/models/contact.rb', line 39

def organization
  @organization
end

#phoneString

Returns Phone number.

Returns:

  • (String)

    Phone number



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

def phone
  @phone
end

Class Method Details

.deserialize_object(object) ⇒ Contact

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:

  • (Contact)

    Deserialized object.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/azure_mgmt_web/models/contact.rb', line 98

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

  deserialized_property = object['addressMailing']
  unless deserialized_property.nil?
    deserialized_property = Address.deserialize_object(deserialized_property)
  end
  output_object.address_mailing = deserialized_property

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

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

  deserialized_property = object['jobTitle']
  output_object.job_title = deserialized_property

  deserialized_property = object['nameFirst']
  output_object.name_first = deserialized_property

  deserialized_property = object['nameLast']
  output_object.name_last = deserialized_property

  deserialized_property = object['nameMiddle']
  output_object.name_middle = deserialized_property

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

  deserialized_property = object['phone']
  output_object.phone = 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.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/azure_mgmt_web/models/contact.rb', line 56

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

  serialized_property = object.address_mailing
  unless serialized_property.nil?
    serialized_property = Address.serialize_object(serialized_property)
  end
  output_object['addressMailing'] = serialized_property unless serialized_property.nil?

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

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

  serialized_property = object.job_title
  output_object['jobTitle'] = serialized_property unless serialized_property.nil?

  serialized_property = object.name_first
  output_object['nameFirst'] = serialized_property unless serialized_property.nil?

  serialized_property = object.name_last
  output_object['nameLast'] = serialized_property unless serialized_property.nil?

  serialized_property = object.name_middle
  output_object['nameMiddle'] = serialized_property unless serialized_property.nil?

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

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

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



47
48
49
# File 'lib/azure_mgmt_web/models/contact.rb', line 47

def validate
  @address_mailing.validate unless @address_mailing.nil?
end