Class: OCI::CertificatesManagement::Models::CertificateAuthoritySummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/certificates_management/models/certificate_authority_summary.rb

Overview

The metadata details of the certificate authority (CA). This summary 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_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_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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CertificateAuthoritySummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
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
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 182

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.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.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_authority_rules = 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.certificate_authority_rules = attributes[:'certificate_authority_rules'] if attributes[:'certificate_authority_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.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.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_authority_rulesArray<OCI::CertificatesManagement::Models::CertificateAuthorityRule>

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



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

def certificate_authority_rules
  @certificate_authority_rules
end

#compartment_idString

[Required] The OCID of the compartment under which the CA is created.

Returns:

  • (String)


80
81
82
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 80

def compartment_id
  @compartment_id
end

#config_typeString

[Required] The origin of the CA.

Returns:

  • (String)


94
95
96
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 94

def config_type
  @config_type
end

#current_version_summaryOCI::CertificatesManagement::Models::CertificateAuthorityVersionSummary



87
88
89
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 87

def current_version_summary
  @current_version_summary
end

#defined_tagsHash<String, Hash<String, Object>>

Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

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


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

def defined_tags
  @defined_tags
end

#descriptionString

A brief description of the CA.

Returns:

  • (String)


56
57
58
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 56

def description
  @description
end

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

Returns:

  • (Hash<String, String>)


104
105
106
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 104

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the certificate authority (CA).

Returns:

  • (String)


43
44
45
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 43

def id
  @id
end

#issuer_certificate_authority_idString

The OCID of the parent CA which issued this CA. If this is the root CA, then this value is the same as the id.

Returns:

  • (String)


48
49
50
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 48

def issuer_certificate_authority_id
  @issuer_certificate_authority_id
end

#kms_key_idString

The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.

Returns:

  • (String)


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

def kms_key_id
  @kms_key_id
end

#lifecycle_stateString

[Required] The current lifecycle state of the CA.

Returns:

  • (String)


76
77
78
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 76

def lifecycle_state
  @lifecycle_state
end

#nameString

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

Returns:

  • (String)


52
53
54
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 52

def name
  @name
end

#signing_algorithmString

The algorithm used to sign public key certificates that the CA issues.

Returns:

  • (String)


98
99
100
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 98

def signing_algorithm
  @signing_algorithm
end

#subjectOCI::CertificatesManagement::Models::CertificateSubject



90
91
92
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 90

def subject
  @subject
end

#time_createdDateTime

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

Returns:

  • (DateTime)


62
63
64
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 62

def time_created
  @time_created
end

#time_of_deletionDateTime

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

Returns:

  • (DateTime)


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

def time_of_deletion
  @time_of_deletion
end

Class Method Details

.attribute_mapObject

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



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 113

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',
    'kms_key_id': :'kmsKeyId',
    'lifecycle_state': :'lifecycleState',
    'compartment_id': :'compartmentId',
    'certificate_authority_rules': :'certificateAuthorityRules',
    'current_version_summary': :'currentVersionSummary',
    'subject': :'subject',
    'config_type': :'configType',
    'signing_algorithm': :'signingAlgorithm',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

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',
    'kms_key_id': :'String',
    'lifecycle_state': :'String',
    'compartment_id': :'String',
    'certificate_authority_rules': :'Array<OCI::CertificatesManagement::Models::CertificateAuthorityRule>',
    'current_version_summary': :'OCI::CertificatesManagement::Models::CertificateAuthorityVersionSummary',
    'subject': :'OCI::CertificatesManagement::Models::CertificateSubject',
    'config_type': :'String',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 316

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 &&
    kms_key_id == other.kms_key_id &&
    lifecycle_state == other.lifecycle_state &&
    compartment_id == other.compartment_id &&
    certificate_authority_rules == other.certificate_authority_rules &&
    current_version_summary == other.current_version_summary &&
    subject == other.subject &&
    config_type == other.config_type &&
    signing_algorithm == other.signing_algorithm &&
    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



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 361

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


341
342
343
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 341

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



350
351
352
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 350

def hash
  [id, issuer_certificate_authority_id, name, description, time_created, time_of_deletion, kms_key_id, lifecycle_state, compartment_id, certificate_authority_rules, current_version_summary, subject, config_type, signing_algorithm, 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



394
395
396
397
398
399
400
401
402
403
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 394

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



388
389
390
# File 'lib/oci/certificates_management/models/certificate_authority_summary.rb', line 388

def to_s
  to_hash.to_s
end