Class: OCI::CertificatesManagement::Models::CertificateAuthority
- Inherits:
-
Object
- Object
- OCI::CertificatesManagement::Models::CertificateAuthority
- Defined in:
- lib/oci/certificates_management/models/certificate_authority.rb
Overview
The metadata details of the certificate authority (CA). This object does not contain the CA contents.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze, LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze, LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_PENDING_ACTIVATION = 'PENDING_ACTIVATION'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CONFIG_TYPE_ENUM =
[ CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = 'ROOT_CA_GENERATED_INTERNALLY'.freeze, CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA'.freeze, CONFIG_TYPE_ROOT_CA_MANAGED_EXTERNALLY = 'ROOT_CA_MANAGED_EXTERNALLY'.freeze, CONFIG_TYPE_SUBORDINATE_CA_MANAGED_INTERNALLY_ISSUED_BY_EXTERNAL_CA = 'SUBORDINATE_CA_MANAGED_INTERNALLY_ISSUED_BY_EXTERNAL_CA'.freeze, CONFIG_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SIGNING_ALGORITHM_ENUM =
[ SIGNING_ALGORITHM_SHA256_WITH_RSA = 'SHA256_WITH_RSA'.freeze, SIGNING_ALGORITHM_SHA384_WITH_RSA = 'SHA384_WITH_RSA'.freeze, SIGNING_ALGORITHM_SHA512_WITH_RSA = 'SHA512_WITH_RSA'.freeze, SIGNING_ALGORITHM_SHA256_WITH_ECDSA = 'SHA256_WITH_ECDSA'.freeze, SIGNING_ALGORITHM_SHA384_WITH_ECDSA = 'SHA384_WITH_ECDSA'.freeze, SIGNING_ALGORITHM_SHA512_WITH_ECDSA = 'SHA512_WITH_ECDSA'.freeze, SIGNING_ALGORITHM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#certificate_authority_rules ⇒ Array<OCI::CertificatesManagement::Models::CertificateAuthorityRule>
An optional list of rules that control how the CA is used and managed.
- #certificate_revocation_list_details ⇒ OCI::CertificatesManagement::Models::CertificateRevocationListDetails
-
#compartment_id ⇒ String
[Required] The OCID of the compartment under which the CA is created.
-
#config_type ⇒ String
[Required] The origin of the CA.
- #current_version ⇒ OCI::CertificatesManagement::Models::CertificateAuthorityVersionSummary
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Usage of predefined tag keys.
-
#description ⇒ String
A brief description of the CA.
-
#external_key_description ⇒ String
For externally managed CAs, a description of the externally managed key.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] The OCID of the CA.
-
#issuer_certificate_authority_id ⇒ String
The OCID of the parent CA that issued this CA.
-
#kms_key_id ⇒ String
The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.
-
#lifecycle_details ⇒ String
Additional information about the current CA lifecycle state.
-
#lifecycle_state ⇒ String
[Required] The current lifecycle state of the certificate authority.
-
#name ⇒ String
[Required] A user-friendly name for the CA.
-
#signing_algorithm ⇒ String
The algorithm used to sign public key certificates that the CA issues.
- #subject ⇒ OCI::CertificatesManagement::Models::CertificateSubject
-
#time_created ⇒ DateTime
[Required] A property indicating when the CA 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.
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 = {}) ⇒ CertificateAuthority
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 = {}) ⇒ CertificateAuthority
Initializes the object
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 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 313 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 205 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.id = attributes[:'id'] if attributes[:'id'] self. = attributes[:'issuerCertificateAuthorityId'] if attributes[:'issuerCertificateAuthorityId'] raise 'You cannot provide both :issuerCertificateAuthorityId and :issuer_certificate_authority_id' if attributes.key?(:'issuerCertificateAuthorityId') && attributes.key?(:'issuer_certificate_authority_id') self. = attributes[:'issuer_certificate_authority_id'] if attributes[:'issuer_certificate_authority_id'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.description = "null" if description.nil? && !attributes.key?(:'description') # rubocop:disable Style/StringLiterals self.external_key_description = attributes[:'externalKeyDescription'] if attributes[:'externalKeyDescription'] self.external_key_description = "null" if external_key_description.nil? && !attributes.key?(:'externalKeyDescription') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :externalKeyDescription and :external_key_description' if attributes.key?(:'externalKeyDescription') && attributes.key?(:'external_key_description') self.external_key_description = attributes[:'external_key_description'] if attributes[:'external_key_description'] self.external_key_description = "null" if external_key_description.nil? && !attributes.key?(:'externalKeyDescription') && !attributes.key?(:'external_key_description') # 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.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.kms_key_id = attributes[:'kmsKeyId'] if attributes[:'kmsKeyId'] raise 'You cannot provide both :kmsKeyId and :kms_key_id' if attributes.key?(:'kmsKeyId') && attributes.key?(:'kms_key_id') self.kms_key_id = attributes[:'kms_key_id'] if attributes[:'kms_key_id'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] self.lifecycle_details = "null" if lifecycle_details.nil? && !attributes.key?(:'lifecycleDetails') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.lifecycle_details = "null" if lifecycle_details.nil? && !attributes.key?(:'lifecycleDetails') && !attributes.key?(:'lifecycle_details') # rubocop:disable Style/StringLiterals self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self. = attributes[:'certificateAuthorityRules'] if attributes[:'certificateAuthorityRules'] raise 'You cannot provide both :certificateAuthorityRules and :certificate_authority_rules' if attributes.key?(:'certificateAuthorityRules') && attributes.key?(:'certificate_authority_rules') self. = attributes[:'certificate_authority_rules'] if attributes[:'certificate_authority_rules'] self.current_version = attributes[:'currentVersion'] if attributes[:'currentVersion'] raise 'You cannot provide both :currentVersion and :current_version' if attributes.key?(:'currentVersion') && attributes.key?(:'current_version') self.current_version = attributes[:'current_version'] if attributes[:'current_version'] self.certificate_revocation_list_details = attributes[:'certificateRevocationListDetails'] if attributes[:'certificateRevocationListDetails'] raise 'You cannot provide both :certificateRevocationListDetails and :certificate_revocation_list_details' if attributes.key?(:'certificateRevocationListDetails') && attributes.key?(:'certificate_revocation_list_details') self.certificate_revocation_list_details = attributes[:'certificate_revocation_list_details'] if attributes[:'certificate_revocation_list_details'] self.config_type = attributes[:'configType'] if attributes[:'configType'] raise 'You cannot provide both :configType and :config_type' if attributes.key?(:'configType') && attributes.key?(:'config_type') self.config_type = attributes[:'config_type'] if attributes[:'config_type'] self.subject = attributes[:'subject'] if attributes[:'subject'] self.signing_algorithm = attributes[:'signingAlgorithm'] if attributes[:'signingAlgorithm'] raise 'You cannot provide both :signingAlgorithm and :signing_algorithm' if attributes.key?(:'signingAlgorithm') && attributes.key?(:'signing_algorithm') self.signing_algorithm = attributes[:'signing_algorithm'] if attributes[:'signing_algorithm'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#certificate_authority_rules ⇒ Array<OCI::CertificatesManagement::Models::CertificateAuthorityRule>
An optional list of rules that control how the CA is used and managed.
95 96 97 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 95 def @certificate_authority_rules end |
#certificate_revocation_list_details ⇒ OCI::CertificatesManagement::Models::CertificateRevocationListDetails
101 102 103 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 101 def certificate_revocation_list_details @certificate_revocation_list_details end |
#compartment_id ⇒ String
[Required] The OCID of the compartment under which the CA is created.
91 92 93 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 91 def compartment_id @compartment_id end |
#config_type ⇒ String
[Required] The origin of the CA.
105 106 107 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 105 def config_type @config_type end |
#current_version ⇒ OCI::CertificatesManagement::Models::CertificateAuthorityVersionSummary
98 99 100 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 98 def current_version @current_version end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
124 125 126 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 124 def @defined_tags end |
#description ⇒ String
A brief description of the CA.
59 60 61 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 59 def description @description end |
#external_key_description ⇒ String
For externally managed CAs, a description of the externally managed key. Avoid entering confidential information.
63 64 65 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 63 def external_key_description @external_key_description end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
118 119 120 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 118 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the CA.
46 47 48 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 46 def id @id end |
#issuer_certificate_authority_id ⇒ String
The OCID of the parent CA that issued this CA. If this is the root CA, then this value is null.
51 52 53 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 51 def @issuer_certificate_authority_id end |
#kms_key_id ⇒ String
The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.
79 80 81 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 79 def kms_key_id @kms_key_id end |
#lifecycle_details ⇒ String
Additional information about the current CA lifecycle state.
87 88 89 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 87 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current lifecycle state of the certificate authority.
83 84 85 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 83 def lifecycle_state @lifecycle_state end |
#name ⇒ String
[Required] A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.
55 56 57 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 55 def name @name end |
#signing_algorithm ⇒ String
The algorithm used to sign public key certificates that the CA issues.
112 113 114 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 112 def signing_algorithm @signing_algorithm end |
#subject ⇒ OCI::CertificatesManagement::Models::CertificateSubject
108 109 110 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 108 def subject @subject end |
#time_created ⇒ DateTime
[Required] A property indicating when the CA was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
69 70 71 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 69 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
75 76 77 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 75 def time_of_deletion @time_of_deletion end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 127 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'issuer_certificate_authority_id': :'issuerCertificateAuthorityId', 'name': :'name', 'description': :'description', 'external_key_description': :'externalKeyDescription', 'time_created': :'timeCreated', 'time_of_deletion': :'timeOfDeletion', 'kms_key_id': :'kmsKeyId', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'compartment_id': :'compartmentId', 'certificate_authority_rules': :'certificateAuthorityRules', 'current_version': :'currentVersion', 'certificate_revocation_list_details': :'certificateRevocationListDetails', 'config_type': :'configType', 'subject': :'subject', 'signing_algorithm': :'signingAlgorithm', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 154 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'issuer_certificate_authority_id': :'String', 'name': :'String', 'description': :'String', 'external_key_description': :'String', 'time_created': :'DateTime', 'time_of_deletion': :'DateTime', 'kms_key_id': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'compartment_id': :'String', 'certificate_authority_rules': :'Array<OCI::CertificatesManagement::Models::CertificateAuthorityRule>', 'current_version': :'OCI::CertificatesManagement::Models::CertificateAuthorityVersionSummary', 'certificate_revocation_list_details': :'OCI::CertificatesManagement::Models::CertificateRevocationListDetails', 'config_type': :'String', 'subject': :'OCI::CertificatesManagement::Models::CertificateSubject', 'signing_algorithm': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 361 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && == other. && name == other.name && description == other.description && external_key_description == other.external_key_description && time_created == other.time_created && time_of_deletion == other.time_of_deletion && kms_key_id == other.kms_key_id && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && compartment_id == other.compartment_id && == other. && current_version == other.current_version && certificate_revocation_list_details == other.certificate_revocation_list_details && config_type == other.config_type && subject == other.subject && signing_algorithm == other.signing_algorithm && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 409 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
389 390 391 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 389 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
398 399 400 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 398 def hash [id, , name, description, external_key_description, time_created, time_of_deletion, kms_key_id, lifecycle_state, lifecycle_details, compartment_id, , current_version, certificate_revocation_list_details, config_type, subject, signing_algorithm, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
442 443 444 445 446 447 448 449 450 451 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 442 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
436 437 438 |
# File 'lib/oci/certificates_management/models/certificate_authority.rb', line 436 def to_s to_hash.to_s end |