Class: MistApi::ResponseCertificate
- Defined in:
- lib/mist_api/models/response_certificate.rb
Overview
If the current Org CA certificate is set to expire within 30 days, a pending certificate will be returned along with the expected auto-renewal timestamp.
Instance Attribute Summary collapse
-
#cert ⇒ String
TODO: Write general description for this method.
-
#pending_cert ⇒ String
TODO: Write general description for this method.
-
#pending_cert_expiry ⇒ Integer
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(cert = nil, pending_cert = SKIP, pending_cert_expiry = SKIP) ⇒ ResponseCertificate
constructor
A new instance of ResponseCertificate.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(cert = nil, pending_cert = SKIP, pending_cert_expiry = SKIP) ⇒ ResponseCertificate
Returns a new instance of ResponseCertificate.
47 48 49 50 51 |
# File 'lib/mist_api/models/response_certificate.rb', line 47 def initialize(cert = nil, pending_cert = SKIP, pending_cert_expiry = SKIP) @cert = cert @pending_cert = pending_cert unless pending_cert == SKIP @pending_cert_expiry = pending_cert_expiry unless pending_cert_expiry == SKIP end |
Instance Attribute Details
#cert ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/mist_api/models/response_certificate.rb', line 15 def cert @cert end |
#pending_cert ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/mist_api/models/response_certificate.rb', line 19 def pending_cert @pending_cert end |
#pending_cert_expiry ⇒ Integer
TODO: Write general description for this method
23 24 25 |
# File 'lib/mist_api/models/response_certificate.rb', line 23 def pending_cert_expiry @pending_cert_expiry end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/mist_api/models/response_certificate.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cert = hash.key?('cert') ? hash['cert'] : nil pending_cert = hash.key?('pending_cert') ? hash['pending_cert'] : SKIP pending_cert_expiry = hash.key?('pending_cert_expiry') ? hash['pending_cert_expiry'] : SKIP # Create object from extracted values. ResponseCertificate.new(cert, pending_cert, pending_cert_expiry) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/mist_api/models/response_certificate.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['cert'] = 'cert' @_hash['pending_cert'] = 'pending_cert' @_hash['pending_cert_expiry'] = 'pending_cert_expiry' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/response_certificate.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/mist_api/models/response_certificate.rb', line 35 def self.optionals %w[ pending_cert pending_cert_expiry ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
77 78 79 80 81 |
# File 'lib/mist_api/models/response_certificate.rb', line 77 def inspect class_name = self.class.name.split('::').last "<#{class_name} cert: #{@cert.inspect}, pending_cert: #{@pending_cert.inspect},"\ " pending_cert_expiry: #{@pending_cert_expiry.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
70 71 72 73 74 |
# File 'lib/mist_api/models/response_certificate.rb', line 70 def to_s class_name = self.class.name.split('::').last "<#{class_name} cert: #{@cert}, pending_cert: #{@pending_cert}, pending_cert_expiry:"\ " #{@pending_cert_expiry}>" end |