Class: Azure::ARM::Web::Models::HostNameSslState

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameString

Returns Host name.

Returns:

  • (String)

    Host name



16
17
18
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 16

def name
  @name
end

#ssl_stateSslState

‘SniEnabled’, ‘IpBasedEnabled’

Returns:

  • (SslState)

    SSL type. Possible values include: ‘Disabled’,



20
21
22
# File 'lib/azure_mgmt_web/models/host_name_ssl_state.rb', line 20

def ssl_state
  @ssl_state
end

#thumbprintString

Returns SSL cert thumbprint.

Returns:

  • (String)

    SSL cert thumbprint



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

def thumbprint
  @thumbprint
end

#to_updateBoolean

Returns Set this flag to update existing host name.

Returns:

  • (Boolean)

    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_ipString

based SSL is enabled

Returns:

  • (String)

    Virtual IP address assigned to the host name if IP



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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