Class: Azure::ARM::Web::Models::CertificateProperties

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

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cer_blobString

Returns Raw bytes of .cer file.

Returns:

  • (String)

    Raw bytes of .cer file



52
53
54
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 52

def cer_blob
  @cer_blob
end

#expiration_dateDateTime

Returns Certificate expriration date.

Returns:

  • (DateTime)

    Certificate expriration date



40
41
42
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 40

def expiration_date
  @expiration_date
end

#friendly_nameString

Returns Friendly name of the certificate.

Returns:

  • (String)

    Friendly name of the certificate



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

def friendly_name
  @friendly_name
end

#host_namesArray<String>

Returns Host names the certificate applies to.

Returns:

  • (Array<String>)

    Host names the certificate applies to



22
23
24
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 22

def host_names
  @host_names
end

#hosting_environment_profileHostingEnvironmentProfile

environment (App Service Environment) to use for the certificate

Returns:



59
60
61
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 59

def hosting_environment_profile
  @hosting_environment_profile
end

#issue_dateDateTime

Returns Certificate issue Date.

Returns:

  • (DateTime)

    Certificate issue Date



37
38
39
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 37

def issue_date
  @issue_date
end

#issuerString

Returns Certificate issuer.

Returns:

  • (String)

    Certificate issuer



34
35
36
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 34

def issuer
  @issuer
end

#passwordString

Returns Certificate password.

Returns:

  • (String)

    Certificate password



43
44
45
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 43

def password
  @password
end

#pfx_blobString

Returns Pfx blob.

Returns:

  • (String)

    Pfx blob



25
26
27
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 25

def pfx_blob
  @pfx_blob
end

#public_key_hashString

Returns Public key hash.

Returns:

  • (String)

    Public key hash



55
56
57
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 55

def public_key_hash
  @public_key_hash
end

Returns Self link.

Returns:

  • (String)

    Self link



31
32
33
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 31

def self_link
  @self_link
end

#site_nameString

Returns App name.

Returns:

  • (String)

    App name



28
29
30
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 28

def site_name
  @site_name
end

#subject_nameString

Returns Subject name of the certificate.

Returns:

  • (String)

    Subject name of the certificate



19
20
21
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 19

def subject_name
  @subject_name
end

#thumbprintString

Returns Certificate thumbprint.

Returns:

  • (String)

    Certificate thumbprint



46
47
48
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 46

def thumbprint
  @thumbprint
end

#validBoolean

Returns Is the certificate valid?.

Returns:

  • (Boolean)

    Is the certificate valid?



49
50
51
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 49

def valid
  @valid
end

Class Method Details

.deserialize_object(object) ⇒ CertificateProperties

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 136

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

  deserialized_property = object['friendlyName']
  output_object.friendly_name = deserialized_property

  deserialized_property = object['subjectName']
  output_object.subject_name = deserialized_property

  deserialized_property = object['hostNames']
  output_object.host_names = deserialized_property

  deserialized_property = object['pfxBlob']
  output_object.pfx_blob = deserialized_property

  deserialized_property = object['siteName']
  output_object.site_name = deserialized_property

  deserialized_property = object['selfLink']
  output_object.self_link = deserialized_property

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

  deserialized_property = object['issueDate']
  deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.issue_date = deserialized_property

  deserialized_property = object['expirationDate']
  deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.expiration_date = deserialized_property

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

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

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

  deserialized_property = object['cerBlob']
  output_object.cer_blob = deserialized_property

  deserialized_property = object['publicKeyHash']
  output_object.public_key_hash = deserialized_property

  deserialized_property = object['hostingEnvironmentProfile']
  unless deserialized_property.nil?
    deserialized_property = HostingEnvironmentProfile.deserialize_object(deserialized_property)
  end
  output_object.hosting_environment_profile = 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.



74
75
76
77
78
79
80
81
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
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 74

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

  serialized_property = object.friendly_name
  output_object['friendlyName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.subject_name
  output_object['subjectName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.host_names
  output_object['hostNames'] = serialized_property unless serialized_property.nil?

  serialized_property = object.pfx_blob
  output_object['pfxBlob'] = serialized_property unless serialized_property.nil?

  serialized_property = object.site_name
  output_object['siteName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.self_link
  output_object['selfLink'] = serialized_property unless serialized_property.nil?

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

  serialized_property = object.issue_date
  serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
  output_object['issueDate'] = serialized_property unless serialized_property.nil?

  serialized_property = object.expiration_date
  serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
  output_object['expirationDate'] = serialized_property unless serialized_property.nil?

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

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

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

  serialized_property = object.cer_blob
  output_object['cerBlob'] = serialized_property unless serialized_property.nil?

  serialized_property = object.public_key_hash
  output_object['publicKeyHash'] = serialized_property unless serialized_property.nil?

  serialized_property = object.hosting_environment_profile
  unless serialized_property.nil?
    serialized_property = HostingEnvironmentProfile.serialize_object(serialized_property)
  end
  output_object['hostingEnvironmentProfile'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



64
65
66
67
# File 'lib/azure_mgmt_web/models/certificate_properties.rb', line 64

def validate
  @host_names.each{ |e| e.validate if e.respond_to?(:validate) } unless @host_names.nil?
  @hosting_environment_profile.validate unless @hosting_environment_profile.nil?
end