Class: Akeyless::CertificateInfo
- Inherits:
-
Object
- Object
- Akeyless::CertificateInfo
- Defined in:
- lib/akeyless/models/certificate_info.rb
Instance Attribute Summary collapse
-
#crl_distribution_points ⇒ Object
Returns the value of attribute crl_distribution_points.
-
#dns_names ⇒ Object
Returns the value of attribute dns_names.
-
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
-
#ext_key_usage ⇒ Object
Returns the value of attribute ext_key_usage.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#ip_addresses ⇒ Object
Returns the value of attribute ip_addresses.
-
#is_ca ⇒ Object
Returns the value of attribute is_ca.
-
#issuer ⇒ Object
Returns the value of attribute issuer.
-
#issuing_certificate_url ⇒ Object
Returns the value of attribute issuing_certificate_url.
-
#key_size ⇒ Object
Returns the value of attribute key_size.
-
#key_usage ⇒ Object
KeyUsage represents the set of actions that are valid for a given key.
-
#not_after ⇒ Object
Returns the value of attribute not_after.
-
#not_before ⇒ Object
Returns the value of attribute not_before.
-
#ocsp_server ⇒ Object
Returns the value of attribute ocsp_server.
-
#public_key_algorithm_name ⇒ Object
Returns the value of attribute public_key_algorithm_name.
-
#serial_number ⇒ Object
Returns the value of attribute serial_number.
-
#sha_1_fingerprint ⇒ Object
Returns the value of attribute sha_1_fingerprint.
-
#sha_256_fingerprint ⇒ Object
Returns the value of attribute sha_256_fingerprint.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#signature_algorithm_name ⇒ Object
Returns the value of attribute signature_algorithm_name.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#subject_public_key ⇒ Object
Returns the value of attribute subject_public_key.
-
#uris ⇒ Object
Returns the value of attribute uris.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CertificateInfo
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CertificateInfo
Initializes the object
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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/akeyless/models/certificate_info.rb', line 140 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CertificateInfo` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CertificateInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'ext_key_usage') if (value = attributes[:'ext_key_usage']).is_a?(Array) self.ext_key_usage = value end end if attributes.key?(:'key_usage') self.key_usage = attributes[:'key_usage'] end if attributes.key?(:'crl_distribution_points') if (value = attributes[:'crl_distribution_points']).is_a?(Array) self.crl_distribution_points = value end end if attributes.key?(:'dns_names') if (value = attributes[:'dns_names']).is_a?(Array) self.dns_names = value end end if attributes.key?(:'email_addresses') if (value = attributes[:'email_addresses']).is_a?(Array) self.email_addresses = value end end if attributes.key?(:'extensions') if (value = attributes[:'extensions']).is_a?(Array) self.extensions = value end end if attributes.key?(:'ip_addresses') if (value = attributes[:'ip_addresses']).is_a?(Array) self.ip_addresses = value end end if attributes.key?(:'is_ca') self.is_ca = attributes[:'is_ca'] end if attributes.key?(:'issuer') self.issuer = attributes[:'issuer'] end if attributes.key?(:'issuing_certificate_url') if (value = attributes[:'issuing_certificate_url']).is_a?(Array) self.issuing_certificate_url = value end end if attributes.key?(:'key_size') self.key_size = attributes[:'key_size'] end if attributes.key?(:'not_after') self.not_after = attributes[:'not_after'] end if attributes.key?(:'not_before') self.not_before = attributes[:'not_before'] end if attributes.key?(:'ocsp_server') if (value = attributes[:'ocsp_server']).is_a?(Array) self.ocsp_server = value end end if attributes.key?(:'public_key_algorithm_name') self.public_key_algorithm_name = attributes[:'public_key_algorithm_name'] end if attributes.key?(:'serial_number') self.serial_number = attributes[:'serial_number'] end if attributes.key?(:'sha_1_fingerprint') self.sha_1_fingerprint = attributes[:'sha_1_fingerprint'] end if attributes.key?(:'sha_256_fingerprint') self.sha_256_fingerprint = attributes[:'sha_256_fingerprint'] end if attributes.key?(:'signature') self.signature = attributes[:'signature'] end if attributes.key?(:'signature_algorithm_name') self.signature_algorithm_name = attributes[:'signature_algorithm_name'] end if attributes.key?(:'subject') self.subject = attributes[:'subject'] end if attributes.key?(:'subject_public_key') self.subject_public_key = attributes[:'subject_public_key'] end if attributes.key?(:'uris') if (value = attributes[:'uris']).is_a?(Array) self.uris = value end end if attributes.key?(:'version') self.version = attributes[:'version'] end end |
Instance Attribute Details
#crl_distribution_points ⇒ Object
Returns the value of attribute crl_distribution_points.
23 24 25 |
# File 'lib/akeyless/models/certificate_info.rb', line 23 def crl_distribution_points @crl_distribution_points end |
#dns_names ⇒ Object
Returns the value of attribute dns_names.
25 26 27 |
# File 'lib/akeyless/models/certificate_info.rb', line 25 def dns_names @dns_names end |
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
27 28 29 |
# File 'lib/akeyless/models/certificate_info.rb', line 27 def email_addresses @email_addresses end |
#ext_key_usage ⇒ Object
Returns the value of attribute ext_key_usage.
18 19 20 |
# File 'lib/akeyless/models/certificate_info.rb', line 18 def ext_key_usage @ext_key_usage end |
#extensions ⇒ Object
Returns the value of attribute extensions.
29 30 31 |
# File 'lib/akeyless/models/certificate_info.rb', line 29 def extensions @extensions end |
#ip_addresses ⇒ Object
Returns the value of attribute ip_addresses.
31 32 33 |
# File 'lib/akeyless/models/certificate_info.rb', line 31 def ip_addresses @ip_addresses end |
#is_ca ⇒ Object
Returns the value of attribute is_ca.
33 34 35 |
# File 'lib/akeyless/models/certificate_info.rb', line 33 def is_ca @is_ca end |
#issuer ⇒ Object
Returns the value of attribute issuer.
35 36 37 |
# File 'lib/akeyless/models/certificate_info.rb', line 35 def issuer @issuer end |
#issuing_certificate_url ⇒ Object
Returns the value of attribute issuing_certificate_url.
37 38 39 |
# File 'lib/akeyless/models/certificate_info.rb', line 37 def issuing_certificate_url @issuing_certificate_url end |
#key_size ⇒ Object
Returns the value of attribute key_size.
39 40 41 |
# File 'lib/akeyless/models/certificate_info.rb', line 39 def key_size @key_size end |
#key_usage ⇒ Object
KeyUsage represents the set of actions that are valid for a given key. It’s a bitmap of the KeyUsage* constants.
21 22 23 |
# File 'lib/akeyless/models/certificate_info.rb', line 21 def key_usage @key_usage end |
#not_after ⇒ Object
Returns the value of attribute not_after.
41 42 43 |
# File 'lib/akeyless/models/certificate_info.rb', line 41 def not_after @not_after end |
#not_before ⇒ Object
Returns the value of attribute not_before.
43 44 45 |
# File 'lib/akeyless/models/certificate_info.rb', line 43 def not_before @not_before end |
#ocsp_server ⇒ Object
Returns the value of attribute ocsp_server.
45 46 47 |
# File 'lib/akeyless/models/certificate_info.rb', line 45 def ocsp_server @ocsp_server end |
#public_key_algorithm_name ⇒ Object
Returns the value of attribute public_key_algorithm_name.
47 48 49 |
# File 'lib/akeyless/models/certificate_info.rb', line 47 def public_key_algorithm_name @public_key_algorithm_name end |
#serial_number ⇒ Object
Returns the value of attribute serial_number.
49 50 51 |
# File 'lib/akeyless/models/certificate_info.rb', line 49 def serial_number @serial_number end |
#sha_1_fingerprint ⇒ Object
Returns the value of attribute sha_1_fingerprint.
51 52 53 |
# File 'lib/akeyless/models/certificate_info.rb', line 51 def sha_1_fingerprint @sha_1_fingerprint end |
#sha_256_fingerprint ⇒ Object
Returns the value of attribute sha_256_fingerprint.
53 54 55 |
# File 'lib/akeyless/models/certificate_info.rb', line 53 def sha_256_fingerprint @sha_256_fingerprint end |
#signature ⇒ Object
Returns the value of attribute signature.
55 56 57 |
# File 'lib/akeyless/models/certificate_info.rb', line 55 def signature @signature end |
#signature_algorithm_name ⇒ Object
Returns the value of attribute signature_algorithm_name.
57 58 59 |
# File 'lib/akeyless/models/certificate_info.rb', line 57 def signature_algorithm_name @signature_algorithm_name end |
#subject ⇒ Object
Returns the value of attribute subject.
59 60 61 |
# File 'lib/akeyless/models/certificate_info.rb', line 59 def subject @subject end |
#subject_public_key ⇒ Object
Returns the value of attribute subject_public_key.
61 62 63 |
# File 'lib/akeyless/models/certificate_info.rb', line 61 def subject_public_key @subject_public_key end |
#uris ⇒ Object
Returns the value of attribute uris.
63 64 65 |
# File 'lib/akeyless/models/certificate_info.rb', line 63 def uris @uris end |
#version ⇒ Object
Returns the value of attribute version.
65 66 67 |
# File 'lib/akeyless/models/certificate_info.rb', line 65 def version @version end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/akeyless/models/certificate_info.rb', line 353 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Akeyless.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
98 99 100 |
# File 'lib/akeyless/models/certificate_info.rb', line 98 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 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/akeyless/models/certificate_info.rb', line 68 def self.attribute_map { :'ext_key_usage' => :'ExtKeyUsage', :'key_usage' => :'KeyUsage', :'crl_distribution_points' => :'crl_distribution_points', :'dns_names' => :'dns_names', :'email_addresses' => :'email_addresses', :'extensions' => :'extensions', :'ip_addresses' => :'ip_addresses', :'is_ca' => :'is_ca', :'issuer' => :'issuer', :'issuing_certificate_url' => :'issuing_certificate_url', :'key_size' => :'key_size', :'not_after' => :'not_after', :'not_before' => :'not_before', :'ocsp_server' => :'ocsp_server', :'public_key_algorithm_name' => :'public_key_algorithm_name', :'serial_number' => :'serial_number', :'sha_1_fingerprint' => :'sha_1_fingerprint', :'sha_256_fingerprint' => :'sha_256_fingerprint', :'signature' => :'signature', :'signature_algorithm_name' => :'signature_algorithm_name', :'subject' => :'subject', :'subject_public_key' => :'subject_public_key', :'uris' => :'uris', :'version' => :'version' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/akeyless/models/certificate_info.rb', line 329 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
133 134 135 136 |
# File 'lib/akeyless/models/certificate_info.rb', line 133 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 130 |
# File 'lib/akeyless/models/certificate_info.rb', line 103 def self.openapi_types { :'ext_key_usage' => :'Array<Integer>', :'key_usage' => :'Integer', :'crl_distribution_points' => :'Array<String>', :'dns_names' => :'Array<String>', :'email_addresses' => :'Array<String>', :'extensions' => :'Array<Extension>', :'ip_addresses' => :'Array<String>', :'is_ca' => :'Boolean', :'issuer' => :'Name', :'issuing_certificate_url' => :'Array<String>', :'key_size' => :'Integer', :'not_after' => :'Time', :'not_before' => :'Time', :'ocsp_server' => :'Array<String>', :'public_key_algorithm_name' => :'String', :'serial_number' => :'String', :'sha_1_fingerprint' => :'String', :'sha_256_fingerprint' => :'String', :'signature' => :'String', :'signature_algorithm_name' => :'String', :'subject' => :'Name', :'subject_public_key' => :'String', :'uris' => :'Array<String>', :'version' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/akeyless/models/certificate_info.rb', line 285 def ==(o) return true if self.equal?(o) self.class == o.class && ext_key_usage == o.ext_key_usage && key_usage == o.key_usage && crl_distribution_points == o.crl_distribution_points && dns_names == o.dns_names && email_addresses == o.email_addresses && extensions == o.extensions && ip_addresses == o.ip_addresses && is_ca == o.is_ca && issuer == o.issuer && issuing_certificate_url == o.issuing_certificate_url && key_size == o.key_size && not_after == o.not_after && not_before == o.not_before && ocsp_server == o.ocsp_server && public_key_algorithm_name == o.public_key_algorithm_name && serial_number == o.serial_number && sha_1_fingerprint == o.sha_1_fingerprint && sha_256_fingerprint == o.sha_256_fingerprint && signature == o.signature && signature_algorithm_name == o.signature_algorithm_name && subject == o.subject && subject_public_key == o.subject_public_key && uris == o.uris && version == o.version end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/akeyless/models/certificate_info.rb', line 424 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
316 317 318 |
# File 'lib/akeyless/models/certificate_info.rb', line 316 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
322 323 324 |
# File 'lib/akeyless/models/certificate_info.rb', line 322 def hash [ext_key_usage, key_usage, crl_distribution_points, dns_names, email_addresses, extensions, ip_addresses, is_ca, issuer, issuing_certificate_url, key_size, not_after, not_before, ocsp_server, public_key_algorithm_name, serial_number, sha_1_fingerprint, sha_256_fingerprint, signature, signature_algorithm_name, subject, subject_public_key, uris, version].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
270 271 272 273 274 |
# File 'lib/akeyless/models/certificate_info.rb', line 270 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
400 401 402 |
# File 'lib/akeyless/models/certificate_info.rb', line 400 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/akeyless/models/certificate_info.rb', line 406 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
394 395 396 |
# File 'lib/akeyless/models/certificate_info.rb', line 394 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
278 279 280 281 |
# File 'lib/akeyless/models/certificate_info.rb', line 278 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |