Class: OCI::CertificatesManagement::Models::CertificateSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/certificates_management/models/certificate_summary.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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CertificateSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 207

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.issuer_certificate_authority_id = 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.issuer_certificate_authority_id = 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.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.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.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.current_version_summary = attributes[:'currentVersionSummary'] if attributes[:'currentVersionSummary']

  raise 'You cannot provide both :currentVersionSummary and :current_version_summary' if attributes.key?(:'currentVersionSummary') && attributes.key?(:'current_version_summary')

  self.current_version_summary = attributes[:'current_version_summary'] if attributes[:'current_version_summary']

  self.subject = attributes[:'subject'] if attributes[:'subject']

  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.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
end

Instance Attribute Details

#certificate_profile_typeString

The name of the profile used to create the certificate, which depends on the type of certificate you need.

Returns:

  • (String)


118
119
120
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 118

def certificate_profile_type
  @certificate_profile_type
end

#certificate_rulesArray<OCI::CertificatesManagement::Models::CertificateRule>

An optional list of rules that control how the certificate is used and managed.



96
97
98
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 96

def certificate_rules
  @certificate_rules
end

#compartment_idString

[Required] The OCID of the compartment that contains the certificate.

Returns:

  • (String)


92
93
94
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 92

def compartment_id
  @compartment_id
end

#config_typeString

[Required] The origin of the certificate.

Returns:

  • (String)


106
107
108
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 106

def config_type
  @config_type
end

#current_version_summaryOCI::CertificatesManagement::Models::CertificateVersionSummary



99
100
101
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 99

def current_version_summary
  @current_version_summary
end

#defined_tagsHash<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\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


132
133
134
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 132

def defined_tags
  @defined_tags
end

#descriptionString

A brief description of the certificate.

Returns:

  • (String)


72
73
74
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 72

def description
  @description
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


125
126
127
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 125

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the certificate.

Returns:

  • (String)


60
61
62
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 60

def id
  @id
end

#issuer_certificate_authority_idString

The OCID of the certificate authority (CA) that issued the certificate.

Returns:

  • (String)


64
65
66
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 64

def issuer_certificate_authority_id
  @issuer_certificate_authority_id
end

#key_algorithmString

The algorithm used to create key pairs.

Returns:

  • (String)


110
111
112
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 110

def key_algorithm
  @key_algorithm
end

#lifecycle_stateString

[Required] The current lifecycle state of the certificate.

Returns:

  • (String)


88
89
90
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 88

def lifecycle_state
  @lifecycle_state
end

#nameString

[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.

Returns:

  • (String)


68
69
70
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 68

def name
  @name
end

#signature_algorithmString

The algorithm used to sign the public key certificate.

Returns:

  • (String)


114
115
116
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 114

def signature_algorithm
  @signature_algorithm
end

#subjectOCI::CertificatesManagement::Models::CertificateSubject



102
103
104
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 102

def subject
  @subject
end

#time_createdDateTime

[Required] A property indicating when the certificate was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns:

  • (DateTime)


78
79
80
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 78

def time_created
  @time_created
end

#time_of_deletionDateTime

An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z

Returns:

  • (DateTime)


84
85
86
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 84

def time_of_deletion
  @time_of_deletion
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 135

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'issuer_certificate_authority_id': :'issuerCertificateAuthorityId',
    'name': :'name',
    'description': :'description',
    'time_created': :'timeCreated',
    'time_of_deletion': :'timeOfDeletion',
    'lifecycle_state': :'lifecycleState',
    'compartment_id': :'compartmentId',
    'certificate_rules': :'certificateRules',
    'current_version_summary': :'currentVersionSummary',
    'subject': :'subject',
    '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_typesObject

Attribute type mapping.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 160

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'issuer_certificate_authority_id': :'String',
    'name': :'String',
    'description': :'String',
    'time_created': :'DateTime',
    'time_of_deletion': :'DateTime',
    'lifecycle_state': :'String',
    'compartment_id': :'String',
    'certificate_rules': :'Array<OCI::CertificatesManagement::Models::CertificateRule>',
    'current_version_summary': :'OCI::CertificatesManagement::Models::CertificateVersionSummary',
    'subject': :'OCI::CertificatesManagement::Models::CertificateSubject',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 373

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    issuer_certificate_authority_id == other.issuer_certificate_authority_id &&
    name == other.name &&
    description == other.description &&
    time_created == other.time_created &&
    time_of_deletion == other.time_of_deletion &&
    lifecycle_state == other.lifecycle_state &&
    compartment_id == other.compartment_id &&
    certificate_rules == other.certificate_rules &&
    current_version_summary == other.current_version_summary &&
    subject == other.subject &&
    config_type == other.config_type &&
    key_algorithm == other.key_algorithm &&
    signature_algorithm == other.signature_algorithm &&
    certificate_profile_type == other.certificate_profile_type &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 419

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


399
400
401
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 399

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



408
409
410
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 408

def hash
  [id, issuer_certificate_authority_id, name, description, time_created, time_of_deletion, lifecycle_state, compartment_id, certificate_rules, current_version_summary, subject, config_type, key_algorithm, signature_algorithm, certificate_profile_type, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



452
453
454
455
456
457
458
459
460
461
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 452

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



446
447
448
# File 'lib/oci/certificates_management/models/certificate_summary.rb', line 446

def to_s
  to_hash.to_s
end