Class: OCI::CertificatesManagement::Models::CertificateAuthorityVersion
- Inherits:
-
Object
- Object
- OCI::CertificatesManagement::Models::CertificateAuthorityVersion
- Defined in:
- lib/oci/certificates_management/models/certificate_authority_version.rb
Overview
The metadata details of the certificate authority (CA) version. This object does not contain the CA contents.
Instance Attribute Summary collapse
-
#certificate_authority_id ⇒ String
[Required] The OCID of the CA.
-
#csr_pem ⇒ String
The certificate signing request (in PEM format).
-
#issuer_ca_version_number ⇒ Integer
The version number of the issuing CA.
- #revocation_status ⇒ OCI::CertificatesManagement::Models::RevocationStatus
-
#serial_number ⇒ String
A unique certificate identifier used in certificate revocation tracking, formatted as octets.
-
#stages ⇒ Array<OCI::CertificatesManagement::Models::VersionStage>
[Required] A list of rotation states for this CA version.
-
#subject_alternative_names ⇒ Array<OCI::CertificatesManagement::Models::CertificateSubjectAlternativeName>
A list of subject alternative names.
-
#time_created ⇒ DateTime
[Required] A optional property indicating when the CA version was created, expressed in RFC 3339 timestamp format.
-
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the CA version, expressed in RFC 3339 timestamp format.
- #validity ⇒ OCI::CertificatesManagement::Models::Validity
-
#version_name ⇒ String
The name of the CA version.
-
#version_number ⇒ Integer
[Required] The version number of this 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 = {}) ⇒ CertificateAuthorityVersion
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 = {}) ⇒ CertificateAuthorityVersion
Initializes the object
122 123 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 192 193 194 195 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 122 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.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.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.issuer_ca_version_number = attributes[:'issuerCaVersionNumber'] if attributes[:'issuerCaVersionNumber'] raise 'You cannot provide both :issuerCaVersionNumber and :issuer_ca_version_number' if attributes.key?(:'issuerCaVersionNumber') && attributes.key?(:'issuer_ca_version_number') self.issuer_ca_version_number = attributes[:'issuer_ca_version_number'] if attributes[:'issuer_ca_version_number'] 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.subject_alternative_names = attributes[:'subjectAlternativeNames'] if attributes[:'subjectAlternativeNames'] raise 'You cannot provide both :subjectAlternativeNames and :subject_alternative_names' if attributes.key?(:'subjectAlternativeNames') && attributes.key?(:'subject_alternative_names') self.subject_alternative_names = attributes[:'subject_alternative_names'] if attributes[:'subject_alternative_names'] self.time_of_deletion = attributes[:'timeOfDeletion'] if attributes[:'timeOfDeletion'] raise 'You cannot provide both :timeOfDeletion and :time_of_deletion' if attributes.key?(:'timeOfDeletion') && attributes.key?(:'time_of_deletion') self.time_of_deletion = attributes[:'time_of_deletion'] if attributes[:'time_of_deletion'] 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'] self.csr_pem = attributes[:'csrPem'] if attributes[:'csrPem'] self.csr_pem = "null" if csr_pem.nil? && !attributes.key?(:'csrPem') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :csrPem and :csr_pem' if attributes.key?(:'csrPem') && attributes.key?(:'csr_pem') self.csr_pem = attributes[:'csr_pem'] if attributes[:'csr_pem'] self.csr_pem = "null" if csr_pem.nil? && !attributes.key?(:'csrPem') && !attributes.key?(:'csr_pem') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#certificate_authority_id ⇒ String
[Required] The OCID of the CA.
13 14 15 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 13 def @certificate_authority_id end |
#csr_pem ⇒ String
The certificate signing request (in PEM format).
62 63 64 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 62 def csr_pem @csr_pem end |
#issuer_ca_version_number ⇒ Integer
The version number of the issuing CA.
33 34 35 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 33 def issuer_ca_version_number @issuer_ca_version_number end |
#revocation_status ⇒ OCI::CertificatesManagement::Models::RevocationStatus
58 59 60 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 58 def revocation_status @revocation_status end |
#serial_number ⇒ String
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
19 20 21 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 19 def serial_number @serial_number end |
#stages ⇒ Array<OCI::CertificatesManagement::Models::VersionStage>
[Required] A list of rotation states for this CA version.
55 56 57 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 55 def stages @stages end |
#subject_alternative_names ⇒ Array<OCI::CertificatesManagement::Models::CertificateSubjectAlternativeName>
A list of subject alternative names. A subject alternative name specifies the domain names, including subdomains, and IP addresses covered by the certificates issued by this CA.
42 43 44 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 42 def subject_alternative_names @subject_alternative_names end |
#time_created ⇒ DateTime
[Required] A optional property indicating when the CA version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
25 26 27 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 25 def time_created @time_created end |
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the CA version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
48 49 50 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 48 def time_of_deletion @time_of_deletion end |
#validity ⇒ OCI::CertificatesManagement::Models::Validity
51 52 53 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 51 def validity @validity end |
#version_name ⇒ String
The name of the CA version. When the value is not null, a name is unique across versions for a given CA.
38 39 40 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 38 def version_name @version_name end |
#version_number ⇒ Integer
[Required] The version number of this CA.
29 30 31 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 29 def version_number @version_number end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'certificate_authority_id': :'certificateAuthorityId', 'serial_number': :'serialNumber', 'time_created': :'timeCreated', 'version_number': :'versionNumber', 'issuer_ca_version_number': :'issuerCaVersionNumber', 'version_name': :'versionName', 'subject_alternative_names': :'subjectAlternativeNames', 'time_of_deletion': :'timeOfDeletion', 'validity': :'validity', 'stages': :'stages', 'revocation_status': :'revocationStatus', 'csr_pem': :'csrPem' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 85 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'certificate_authority_id': :'String', 'serial_number': :'String', 'time_created': :'DateTime', 'version_number': :'Integer', 'issuer_ca_version_number': :'Integer', 'version_name': :'String', 'subject_alternative_names': :'Array<OCI::CertificatesManagement::Models::CertificateSubjectAlternativeName>', 'time_of_deletion': :'DateTime', 'validity': :'OCI::CertificatesManagement::Models::Validity', 'stages': :'Array<OCI::CertificatesManagement::Models::VersionStage>', 'revocation_status': :'OCI::CertificatesManagement::Models::RevocationStatus', 'csr_pem': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 204 def ==(other) return true if equal?(other) self.class == other.class && == other. && serial_number == other.serial_number && time_created == other.time_created && version_number == other.version_number && issuer_ca_version_number == other.issuer_ca_version_number && version_name == other.version_name && subject_alternative_names == other.subject_alternative_names && time_of_deletion == other.time_of_deletion && validity == other.validity && stages == other.stages && revocation_status == other.revocation_status && csr_pem == other.csr_pem end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 245 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
225 226 227 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 225 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
234 235 236 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 234 def hash [, serial_number, time_created, version_number, issuer_ca_version_number, version_name, subject_alternative_names, time_of_deletion, validity, stages, revocation_status, csr_pem].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 278 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
272 273 274 |
# File 'lib/oci/certificates_management/models/certificate_authority_version.rb', line 272 def to_s to_hash.to_s end |