Class: Azure::ARM::Web::Models::HostName
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::HostName
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/host_name.rb
Overview
Details of a hostname derived from a domain
Instance Attribute Summary collapse
-
#azure_resource_name ⇒ String
to.
-
#azure_resource_type ⇒ AzureResourceType
assigned to.
-
#custom_host_name_dns_record_type ⇒ CustomHostNameDnsRecordType
values include: ‘CName’, ‘A’.
-
#host_name_type ⇒ HostNameType
‘Verified’, ‘Managed’.
-
#name ⇒ String
Name of the hostname.
-
#site_names ⇒ Array<String>
This list will have more than one site only if the hostname is pointing to a Traffic Manager.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ HostName
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
#azure_resource_name ⇒ String
to. If it is assigned to a traffic manager then it will be the traffic manager name otherwise it will be the website name
26 27 28 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 26 def azure_resource_name @azure_resource_name end |
#azure_resource_type ⇒ AzureResourceType
assigned to. Possible values include: ‘Website’, ‘TrafficManager’
30 31 32 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 30 def azure_resource_type @azure_resource_type end |
#custom_host_name_dns_record_type ⇒ CustomHostNameDnsRecordType
values include: ‘CName’, ‘A’
34 35 36 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 34 def custom_host_name_dns_record_type @custom_host_name_dns_record_type end |
#host_name_type ⇒ HostNameType
‘Verified’, ‘Managed’
38 39 40 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 38 def host_name_type @host_name_type end |
#name ⇒ String
Returns Name of the hostname.
16 17 18 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 16 def name @name end |
#site_names ⇒ Array<String>
This list will have more than one site only if the hostname is pointing to a Traffic Manager
21 22 23 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 21 def site_names @site_names end |
Class Method Details
.deserialize_object(object) ⇒ HostName
Deserializes given Ruby Hash into Model object.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 82 def self.deserialize_object(object) return if object.nil? output_object = HostName.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['siteNames'] output_object.site_names = deserialized_property deserialized_property = object['azureResourceName'] output_object.azure_resource_name = deserialized_property deserialized_property = object['azureResourceType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = AzureResourceType.constants.any? { |e| AzureResourceType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum AzureResourceType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.azure_resource_type = deserialized_property deserialized_property = object['customHostNameDnsRecordType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = CustomHostNameDnsRecordType.constants.any? { |e| CustomHostNameDnsRecordType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum CustomHostNameDnsRecordType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.custom_host_name_dns_record_type = deserialized_property deserialized_property = object['hostNameType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = HostNameType.constants.any? { |e| HostNameType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum HostNameType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.host_name_type = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 52 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.site_names output_object['siteNames'] = serialized_property unless serialized_property.nil? serialized_property = object.azure_resource_name output_object['azureResourceName'] = serialized_property unless serialized_property.nil? serialized_property = object.azure_resource_type output_object['azureResourceType'] = serialized_property unless serialized_property.nil? serialized_property = object.custom_host_name_dns_record_type output_object['customHostNameDnsRecordType'] = serialized_property unless serialized_property.nil? serialized_property = object.host_name_type output_object['hostNameType'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
43 44 45 |
# File 'lib/azure_mgmt_web/models/host_name.rb', line 43 def validate @site_names.each{ |e| e.validate if e.respond_to?(:validate) } unless @site_names.nil? end |