Class: OCI::Certificates::Models::CertificateAuthorityBundle
- Inherits:
-
Object
- Object
- OCI::Certificates::Models::CertificateAuthorityBundle
- Defined in:
- lib/oci/certificates/models/certificate_authority_bundle.rb
Overview
The contents of the certificate, properties of the certificate (and certificate version), and user-provided contextual metadata for the certificate.
Constant Summary collapse
- STAGES_ENUM =
[ STAGES_CURRENT = 'CURRENT'.freeze, STAGES_PENDING = 'PENDING'.freeze, STAGES_LATEST = 'LATEST'.freeze, STAGES_PREVIOUS = 'PREVIOUS'.freeze, STAGES_DEPRECATED = 'DEPRECATED'.freeze, STAGES_FAILED = 'FAILED'.freeze, STAGES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cert_chain_pem ⇒ String
The certificate chain (in PEM format) for this CA version.
-
#certificate_authority_id ⇒ String
**[Required]** The OCID of the certificate authority (CA).
-
#certificate_authority_name ⇒ String
**[Required]** The name of the CA.
-
#certificate_pem ⇒ String
**[Required]** The certificate (in PEM format) for this CA version.
- #revocation_status ⇒ OCI::Certificates::Models::RevocationStatus
-
#serial_number ⇒ String
**[Required]** A unique certificate identifier used in certificate revocation tracking, formatted as octets.
-
#stages ⇒ Array<String>
**[Required]** A list of rotation states for this CA.
-
#time_created ⇒ DateTime
**[Required]** A property indicating when the CA was created, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
-
#validity ⇒ OCI::Certificates::Models::Validity
This attribute is required.
-
#version_name ⇒ String
The name of the CA.
-
#version_number ⇒ Integer
**[Required]** The version number of the CA.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CertificateAuthorityBundle
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ CertificateAuthorityBundle
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 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/oci/certificates/models/certificate_authority_bundle.rb', line 124 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self. = attributes[:'certificateAuthorityId'] if attributes[:'certificateAuthorityId'] raise 'You cannot provide both :certificateAuthorityId and :certificate_authority_id' if attributes.key?(:'certificateAuthorityId') && attributes.key?(:'certificate_authority_id') self. = attributes[:'certificate_authority_id'] if attributes[:'certificate_authority_id'] self. = attributes[:'certificateAuthorityName'] if attributes[:'certificateAuthorityName'] raise 'You cannot provide both :certificateAuthorityName and :certificate_authority_name' if attributes.key?(:'certificateAuthorityName') && attributes.key?(:'certificate_authority_name') self. = attributes[:'certificate_authority_name'] if attributes[:'certificate_authority_name'] self.serial_number = attributes[:'serialNumber'] if attributes[:'serialNumber'] raise 'You cannot provide both :serialNumber and :serial_number' if attributes.key?(:'serialNumber') && attributes.key?(:'serial_number') self.serial_number = attributes[:'serial_number'] if attributes[:'serial_number'] self.certificate_pem = attributes[:'certificatePem'] if attributes[:'certificatePem'] raise 'You cannot provide both :certificatePem and :certificate_pem' if attributes.key?(:'certificatePem') && attributes.key?(:'certificate_pem') self.certificate_pem = attributes[:'certificate_pem'] if attributes[:'certificate_pem'] self.cert_chain_pem = attributes[:'certChainPem'] if attributes[:'certChainPem'] self.cert_chain_pem = "null" if cert_chain_pem.nil? && !attributes.key?(:'certChainPem') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :certChainPem and :cert_chain_pem' if attributes.key?(:'certChainPem') && attributes.key?(:'cert_chain_pem') self.cert_chain_pem = attributes[:'cert_chain_pem'] if attributes[:'cert_chain_pem'] self.cert_chain_pem = "null" if cert_chain_pem.nil? && !attributes.key?(:'certChainPem') && !attributes.key?(:'cert_chain_pem') # rubocop:disable Style/StringLiterals self.version_name = attributes[:'versionName'] if attributes[:'versionName'] self.version_name = "null" if version_name.nil? && !attributes.key?(:'versionName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :versionName and :version_name' if attributes.key?(:'versionName') && attributes.key?(:'version_name') self.version_name = attributes[:'version_name'] if attributes[:'version_name'] self.version_name = "null" if version_name.nil? && !attributes.key?(:'versionName') && !attributes.key?(:'version_name') # rubocop:disable Style/StringLiterals self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.version_number = attributes[:'versionNumber'] if attributes[:'versionNumber'] raise 'You cannot provide both :versionNumber and :version_number' if attributes.key?(:'versionNumber') && attributes.key?(:'version_number') self.version_number = attributes[:'version_number'] if attributes[:'version_number'] self.validity = attributes[:'validity'] if attributes[:'validity'] self.stages = attributes[:'stages'] if attributes[:'stages'] self.revocation_status = attributes[:'revocationStatus'] if attributes[:'revocationStatus'] raise 'You cannot provide both :revocationStatus and :revocation_status' if attributes.key?(:'revocationStatus') && attributes.key?(:'revocation_status') self.revocation_status = attributes[:'revocation_status'] if attributes[:'revocation_status'] end |
Instance Attribute Details
#cert_chain_pem ⇒ String
The certificate chain (in PEM format) for this CA version.
42 43 44 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 42 def cert_chain_pem @cert_chain_pem end |
#certificate_authority_id ⇒ String
**[Required]** The OCID of the certificate authority (CA).
24 25 26 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 24 def @certificate_authority_id end |
#certificate_authority_name ⇒ String
**[Required]** The name of the CA.
28 29 30 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 28 def @certificate_authority_name end |
#certificate_pem ⇒ String
**[Required]** The certificate (in PEM format) for this CA version.
38 39 40 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 38 def certificate_pem @certificate_pem end |
#revocation_status ⇒ OCI::Certificates::Models::RevocationStatus
67 68 69 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 67 def revocation_status @revocation_status end |
#serial_number ⇒ String
**[Required]** A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`
34 35 36 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 34 def serial_number @serial_number end |
#stages ⇒ Array<String>
**[Required]** A list of rotation states for this CA.
64 65 66 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 64 def stages @stages end |
#time_created ⇒ DateTime
**[Required]** A property indicating when the CA was created, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format. Example: `2019-04-03T21:10:29.600Z`
52 53 54 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 52 def time_created @time_created end |
#validity ⇒ OCI::Certificates::Models::Validity
This attribute is required.
60 61 62 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 60 def validity @validity end |
#version_name ⇒ String
The name of the CA.
46 47 48 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 46 def version_name @version_name end |
#version_number ⇒ Integer
**[Required]** The version number of the CA.
56 57 58 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 56 def version_number @version_number end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 70 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'certificate_authority_id': :'certificateAuthorityId', 'certificate_authority_name': :'certificateAuthorityName', 'serial_number': :'serialNumber', 'certificate_pem': :'certificatePem', 'cert_chain_pem': :'certChainPem', 'version_name': :'versionName', 'time_created': :'timeCreated', 'version_number': :'versionNumber', 'validity': :'validity', 'stages': :'stages', 'revocation_status': :'revocationStatus' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'certificate_authority_id': :'String', 'certificate_authority_name': :'String', 'serial_number': :'String', 'certificate_pem': :'String', 'cert_chain_pem': :'String', 'version_name': :'String', 'time_created': :'DateTime', 'version_number': :'Integer', 'validity': :'OCI::Certificates::Models::Validity', 'stages': :'Array<String>', 'revocation_status': :'OCI::Certificates::Models::RevocationStatus' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 220 def ==(other) return true if equal?(other) self.class == other.class && == other. && == other. && serial_number == other.serial_number && certificate_pem == other.certificate_pem && cert_chain_pem == other.cert_chain_pem && version_name == other.version_name && time_created == other.time_created && version_number == other.version_number && validity == other.validity && stages == other.stages && revocation_status == other.revocation_status end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 260 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
240 241 242 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 240 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
249 250 251 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 249 def hash [, , serial_number, certificate_pem, cert_chain_pem, version_name, time_created, version_number, validity, stages, revocation_status].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 293 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
287 288 289 |
# File 'lib/oci/certificates/models/certificate_authority_bundle.rb', line 287 def to_s to_hash.to_s end |