Class: Azure::ARM::CDN::Models::CustomDomainProperties
- Inherits:
-
Object
- Object
- Azure::ARM::CDN::Models::CustomDomainProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_cdn/models/custom_domain_properties.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#host_name ⇒ String
The host name of the custom domain.
-
#provisioning_state ⇒ ProvisioningState
Possible values include: ‘Creating’, ‘Succeeded’, ‘Failed’.
-
#resource_state ⇒ CustomDomainResourceState
domain.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ CustomDomainProperties
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
#host_name ⇒ String
Returns The host name of the custom domain.
16 17 18 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 16 def host_name @host_name end |
#provisioning_state ⇒ ProvisioningState
Possible values include: ‘Creating’, ‘Succeeded’, ‘Failed’
24 25 26 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 24 def provisioning_state @provisioning_state end |
#resource_state ⇒ CustomDomainResourceState
domain. Possible values include: ‘Creating’, ‘Active’, ‘Deleting’
20 21 22 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 20 def resource_state @resource_state end |
Class Method Details
.deserialize_object(object) ⇒ CustomDomainProperties
Deserializes given Ruby Hash into Model object.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 59 def self.deserialize_object(object) return if object.nil? output_object = CustomDomainProperties.new deserialized_property = object['hostName'] output_object.host_name = deserialized_property deserialized_property = object['resourceState'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = CustomDomainResourceState.constants.any? { |e| CustomDomainResourceState.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum CustomDomainResourceState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.resource_state = deserialized_property deserialized_property = object['provisioningState'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = ProvisioningState.constants.any? { |e| ProvisioningState.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum ProvisioningState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.provisioning_state = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 38 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.host_name output_object['hostName'] = serialized_property unless serialized_property.nil? serialized_property = object.resource_state output_object['resourceState'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
29 30 31 |
# File 'lib/azure_mgmt_cdn/models/custom_domain_properties.rb', line 29 def validate fail MsRest::ValidationError, 'property host_name is nil' if @host_name.nil? end |