Class: Azure::ARM::Web::Models::HostNameSslState
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::HostNameSslState
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/host_name_ssl_state.rb
Overview
Object that represents a SSL-enabled host name.
Instance Attribute Summary collapse
-
#name ⇒ String
Host name.
-
#ssl_state ⇒ SslState
‘SniEnabled’, ‘IpBasedEnabled’.
-
#thumbprint ⇒ String
SSL cert thumbprint.
-
#to_update ⇒ Boolean
Set this flag to update existing host name.
-
#virtual_ip ⇒ String
based SSL is enabled.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ HostNameSslState
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
#name ⇒ String
Returns Host name.
16 17 18 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 16 def name @name end |
#ssl_state ⇒ SslState
‘SniEnabled’, ‘IpBasedEnabled’
20 21 22 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 20 def ssl_state @ssl_state end |
#thumbprint ⇒ String
Returns SSL cert thumbprint.
27 28 29 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 27 def thumbprint @thumbprint end |
#to_update ⇒ Boolean
Returns Set this flag to update existing host name.
30 31 32 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 30 def to_update @to_update end |
#virtual_ip ⇒ String
based SSL is enabled
24 25 26 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 24 def virtual_ip @virtual_ip end |
Class Method Details
.deserialize_object(object) ⇒ HostNameSslState
Deserializes given Ruby Hash into Model object.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 71 def self.deserialize_object(object) return if object.nil? output_object = HostNameSslState.new deserialized_property = object['sslState'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = SslState.constants.any? { |e| SslState.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum SslState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.ssl_state = deserialized_property deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['virtualIP'] output_object.virtual_ip = deserialized_property deserialized_property = object['thumbprint'] output_object.thumbprint = deserialized_property deserialized_property = object['toUpdate'] output_object.to_update = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 44 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.ssl_state output_object['sslState'] = serialized_property unless serialized_property.nil? serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_ip output_object['virtualIP'] = serialized_property unless serialized_property.nil? serialized_property = object.thumbprint output_object['thumbprint'] = serialized_property unless serialized_property.nil? serialized_property = object.to_update output_object['toUpdate'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
35 36 37 |
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 35 def validate fail MsRest::ValidationError, 'property ssl_state is nil' if @ssl_state.nil? end |