Class: OCI::CertificatesManagement::Models::Certificate
- Inherits:
-
Object
- Object
- OCI::CertificatesManagement::Models::Certificate
- Defined in:
- lib/oci/certificates_management/models/certificate.rb
Overview
The details of the certificate. This object does not contain the certificate 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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CONFIG_TYPE_ENUM =
[ CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = 'ISSUED_BY_INTERNAL_CA'.freeze, CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA'.freeze, CONFIG_TYPE_IMPORTED = 'IMPORTED'.freeze, CONFIG_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- KEY_ALGORITHM_ENUM =
[ KEY_ALGORITHM_RSA2048 = 'RSA2048'.freeze, KEY_ALGORITHM_RSA4096 = 'RSA4096'.freeze, KEY_ALGORITHM_ECDSA_P256 = 'ECDSA_P256'.freeze, KEY_ALGORITHM_ECDSA_P384 = 'ECDSA_P384'.freeze, KEY_ALGORITHM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SIGNATURE_ALGORITHM_ENUM =
[ SIGNATURE_ALGORITHM_SHA256_WITH_RSA = 'SHA256_WITH_RSA'.freeze, SIGNATURE_ALGORITHM_SHA384_WITH_RSA = 'SHA384_WITH_RSA'.freeze, SIGNATURE_ALGORITHM_SHA512_WITH_RSA = 'SHA512_WITH_RSA'.freeze, SIGNATURE_ALGORITHM_SHA256_WITH_ECDSA = 'SHA256_WITH_ECDSA'.freeze, SIGNATURE_ALGORITHM_SHA384_WITH_ECDSA = 'SHA384_WITH_ECDSA'.freeze, SIGNATURE_ALGORITHM_SHA512_WITH_ECDSA = 'SHA512_WITH_ECDSA'.freeze, SIGNATURE_ALGORITHM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CERTIFICATE_PROFILE_TYPE_ENUM =
[ CERTIFICATE_PROFILE_TYPE_TLS_SERVER_OR_CLIENT = 'TLS_SERVER_OR_CLIENT'.freeze, CERTIFICATE_PROFILE_TYPE_TLS_SERVER = 'TLS_SERVER'.freeze, CERTIFICATE_PROFILE_TYPE_TLS_CLIENT = 'TLS_CLIENT'.freeze, CERTIFICATE_PROFILE_TYPE_TLS_CODE_SIGN = 'TLS_CODE_SIGN'.freeze, CERTIFICATE_PROFILE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#certificate_profile_type ⇒ String
The name of the profile used to create the certificate, which depends on the type of certificate you need.
- #certificate_revocation_list_details ⇒ OCI::CertificatesManagement::Models::CertificateRevocationListDetails
-
#certificate_rules ⇒ Array<OCI::CertificatesManagement::Models::CertificateRule>
A list of rules that control how the certificate is used and managed.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the certificate.
-
#config_type ⇒ String
[Required] The origin of the certificate.
- #current_version ⇒ OCI::CertificatesManagement::Models::CertificateVersionSummary
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A brief description of the certificate.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the certificate.
-
#issuer_certificate_authority_id ⇒ String
The OCID of the certificate authority (CA) that issued the certificate.
-
#key_algorithm ⇒ String
The algorithm used to create key pairs.
-
#lifecycle_details ⇒ String
Additional information about the current lifecycle state of the certificate.
-
#lifecycle_state ⇒ String
[Required] The current lifecycle state of the certificate.
-
#name ⇒ String
[Required] A user-friendly name for the certificate.
-
#signature_algorithm ⇒ String
The algorithm used to sign the public key certificate.
- #subject ⇒ OCI::CertificatesManagement::Models::CertificateSubject
-
#time_created ⇒ DateTime
[Required] A property indicating when the certificate was created, expressed in RFC 3339 timestamp format.
-
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the certificate 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 = {}) ⇒ Certificate
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 = {}) ⇒ Certificate
Initializes the object
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 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 220 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.certificate_rules = attributes[:'certificateRules'] if attributes[:'certificateRules'] raise 'You cannot provide both :certificateRules and :certificate_rules' if attributes.key?(:'certificateRules') && attributes.key?(:'certificate_rules') self.certificate_rules = attributes[:'certificate_rules'] if attributes[:'certificate_rules'] 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.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.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.subject = attributes[:'subject'] if attributes[:'subject'] 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.key_algorithm = attributes[:'keyAlgorithm'] if attributes[:'keyAlgorithm'] raise 'You cannot provide both :keyAlgorithm and :key_algorithm' if attributes.key?(:'keyAlgorithm') && attributes.key?(:'key_algorithm') self.key_algorithm = attributes[:'key_algorithm'] if attributes[:'key_algorithm'] self.signature_algorithm = attributes[:'signatureAlgorithm'] if attributes[:'signatureAlgorithm'] raise 'You cannot provide both :signatureAlgorithm and :signature_algorithm' if attributes.key?(:'signatureAlgorithm') && attributes.key?(:'signature_algorithm') self.signature_algorithm = attributes[:'signature_algorithm'] if attributes[:'signature_algorithm'] self.certificate_profile_type = attributes[:'certificateProfileType'] if attributes[:'certificateProfileType'] raise 'You cannot provide both :certificateProfileType and :certificate_profile_type' if attributes.key?(:'certificateProfileType') && attributes.key?(:'certificate_profile_type') self.certificate_profile_type = attributes[:'certificate_profile_type'] if attributes[:'certificate_profile_type'] 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_profile_type ⇒ String
The name of the profile used to create the certificate, which depends on the type of certificate you need.
125 126 127 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 125 def certificate_profile_type @certificate_profile_type end |
#certificate_revocation_list_details ⇒ OCI::CertificatesManagement::Models::CertificateRevocationListDetails
109 110 111 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 109 def certificate_revocation_list_details @certificate_revocation_list_details end |
#certificate_rules ⇒ Array<OCI::CertificatesManagement::Models::CertificateRule>
A list of rules that control how the certificate is used and managed.
76 77 78 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 76 def certificate_rules @certificate_rules end |
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the certificate.
100 101 102 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 100 def compartment_id @compartment_id end |
#config_type ⇒ String
[Required] The origin of the certificate.
113 114 115 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 113 def config_type @config_type end |
#current_version ⇒ OCI::CertificatesManagement::Models::CertificateVersionSummary
103 104 105 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 103 def current_version @current_version end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
139 140 141 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 139 def @defined_tags end |
#description ⇒ String
A brief description of the certificate. Avoid entering confidential information.
72 73 74 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 72 def description @description end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
132 133 134 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 132 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the certificate.
60 61 62 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 60 def id @id end |
#issuer_certificate_authority_id ⇒ String
The OCID of the certificate authority (CA) that issued the certificate.
64 65 66 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 64 def @issuer_certificate_authority_id end |
#key_algorithm ⇒ String
The algorithm used to create key pairs.
117 118 119 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 117 def key_algorithm @key_algorithm end |
#lifecycle_details ⇒ String
Additional information about the current lifecycle state of the certificate.
96 97 98 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 96 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current lifecycle state of the certificate.
92 93 94 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 92 def lifecycle_state @lifecycle_state end |
#name ⇒ String
[Required] A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods.
68 69 70 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 68 def name @name end |
#signature_algorithm ⇒ String
The algorithm used to sign the public key certificate.
121 122 123 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 121 def signature_algorithm @signature_algorithm end |
#subject ⇒ OCI::CertificatesManagement::Models::CertificateSubject
106 107 108 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 106 def subject @subject end |
#time_created ⇒ DateTime
[Required] A property indicating when the certificate was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
82 83 84 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 82 def time_created @time_created end |
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
88 89 90 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 88 def time_of_deletion @time_of_deletion end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 142 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'issuer_certificate_authority_id': :'issuerCertificateAuthorityId', 'name': :'name', 'description': :'description', 'certificate_rules': :'certificateRules', 'time_created': :'timeCreated', 'time_of_deletion': :'timeOfDeletion', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'compartment_id': :'compartmentId', 'current_version': :'currentVersion', 'subject': :'subject', 'certificate_revocation_list_details': :'certificateRevocationListDetails', 'config_type': :'configType', 'key_algorithm': :'keyAlgorithm', 'signature_algorithm': :'signatureAlgorithm', 'certificate_profile_type': :'certificateProfileType', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 169 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'issuer_certificate_authority_id': :'String', 'name': :'String', 'description': :'String', 'certificate_rules': :'Array<OCI::CertificatesManagement::Models::CertificateRule>', 'time_created': :'DateTime', 'time_of_deletion': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'compartment_id': :'String', 'current_version': :'OCI::CertificatesManagement::Models::CertificateVersionSummary', 'subject': :'OCI::CertificatesManagement::Models::CertificateSubject', 'certificate_revocation_list_details': :'OCI::CertificatesManagement::Models::CertificateRevocationListDetails', 'config_type': :'String', 'key_algorithm': :'String', 'signature_algorithm': :'String', 'certificate_profile_type': :'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.
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 400 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && == other. && name == other.name && description == other.description && certificate_rules == other.certificate_rules && time_created == other.time_created && time_of_deletion == other.time_of_deletion && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && compartment_id == other.compartment_id && current_version == other.current_version && subject == other.subject && certificate_revocation_list_details == other.certificate_revocation_list_details && config_type == other.config_type && key_algorithm == other.key_algorithm && signature_algorithm == other.signature_algorithm && certificate_profile_type == other.certificate_profile_type && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 448 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
428 429 430 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 428 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
437 438 439 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 437 def hash [id, , name, description, certificate_rules, time_created, time_of_deletion, lifecycle_state, lifecycle_details, compartment_id, current_version, subject, certificate_revocation_list_details, config_type, key_algorithm, signature_algorithm, certificate_profile_type, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
481 482 483 484 485 486 487 488 489 490 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 481 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
475 476 477 |
# File 'lib/oci/certificates_management/models/certificate.rb', line 475 def to_s to_hash.to_s end |