Class: OCI::Certificates::Models::CertificateBundleVersionSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/certificates/models/certificate_bundle_version_summary.rb

Overview

The properties of the certificate bundle. Certificate bundle version summary objects do not include the actual contents of the certificate.

Constant Summary collapse

STAGES_ENUM =
[
  STAGES_CURRENT = 'CURRENT'.freeze,
  STAGES_PENDING = 'PENDING'.freeze,
  STAGES_LATEST = 'LATEST'.freeze,
  STAGES_PREVIOUS = 'PREVIOUS'.freeze,
  STAGES_DEPRECATED = 'DEPRECATED'.freeze,
  STAGES_FAILED = 'FAILED'.freeze,
  STAGES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CertificateBundleVersionSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



119
120
121
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
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 119

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

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

  self.certificate_id = attributes[:'certificate_id'] if attributes[:'certificate_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.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.certificate_name = attributes[:'certificateName'] if attributes[:'certificateName']

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

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

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

  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.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']
end

Instance Attribute Details

#certificate_idString

[Required] The OCID of the certificate.

Returns:

  • (String)


25
26
27
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 25

def certificate_id
  @certificate_id
end

#certificate_nameString

[Required] The name of the certificate.

Returns:

  • (String)


39
40
41
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 39

def certificate_name
  @certificate_name
end

#revocation_statusOCI::Certificates::Models::RevocationStatus



65
66
67
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 65

def revocation_status
  @revocation_status
end

#serial_numberString

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

Returns:

  • (String)


31
32
33
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 31

def serial_number
  @serial_number
end

#stagesArray<String>

[Required] A list of rotation states for this certificate bundle version.

Returns:

  • (Array<String>)


62
63
64
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 62

def stages
  @stages
end

#time_createdDateTime

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

Returns:

  • (DateTime)


49
50
51
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 49

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)


58
59
60
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 58

def time_of_deletion
  @time_of_deletion
end

#validityOCI::Certificates::Models::Validity



52
53
54
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 52

def validity
  @validity
end

#version_nameString

The name of the certificate version.

Returns:

  • (String)


35
36
37
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 35

def version_name
  @version_name
end

#version_numberInteger

[Required] The version number of the certificate.

Returns:

  • (Integer)


43
44
45
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 43

def version_number
  @version_number
end

Class Method Details

.attribute_mapObject

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



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 68

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'certificate_id': :'certificateId',
    'serial_number': :'serialNumber',
    'version_name': :'versionName',
    'certificate_name': :'certificateName',
    'version_number': :'versionNumber',
    'time_created': :'timeCreated',
    'validity': :'validity',
    'time_of_deletion': :'timeOfDeletion',
    'stages': :'stages',
    'revocation_status': :'revocationStatus'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 86

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'certificate_id': :'String',
    'serial_number': :'String',
    'version_name': :'String',
    'certificate_name': :'String',
    'version_number': :'Integer',
    'time_created': :'DateTime',
    'validity': :'OCI::Certificates::Models::Validity',
    'time_of_deletion': :'DateTime',
    'stages': :'Array<String>',
    'revocation_status': :'OCI::Certificates::Models::RevocationStatus'
    # 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



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 207

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

  self.class == other.class &&
    certificate_id == other.certificate_id &&
    serial_number == other.serial_number &&
    version_name == other.version_name &&
    certificate_name == other.certificate_name &&
    version_number == other.version_number &&
    time_created == other.time_created &&
    validity == other.validity &&
    time_of_deletion == other.time_of_deletion &&
    stages == other.stages &&
    revocation_status == other.revocation_status
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



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/models/certificate_bundle_version_summary.rb', line 246

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


226
227
228
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 226

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



235
236
237
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 235

def hash
  [certificate_id, serial_number, version_name, certificate_name, version_number, time_created, validity, time_of_deletion, stages, revocation_status].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



279
280
281
282
283
284
285
286
287
288
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 279

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



273
274
275
# File 'lib/oci/certificates/models/certificate_bundle_version_summary.rb', line 273

def to_s
  to_hash.to_s
end