Class: OCI::Dns::Models::KskDnssecKeyVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/dns/models/ksk_dnssec_key_version.rb

Overview

A key signing key (KSK) version. The version information contains timing and configuration data corresponding to the KSK that is used to apply DNSSEC on the zone.

Constant Summary collapse

ALGORITHM_ENUM =
[
  ALGORITHM_RSASHA256 = 'RSASHA256'.freeze,
  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 = {}) ⇒ KskDnssecKeyVersion

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
# File 'lib/oci/dns/models/ksk_dnssec_key_version.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.uuid = attributes[:'uuid'] if attributes[:'uuid']

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

  self.length_in_bytes = attributes[:'lengthInBytes'] if attributes[:'lengthInBytes']

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

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

  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_published = attributes[:'timePublished'] if attributes[:'timePublished']

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

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

  self.time_activated = attributes[:'timeActivated'] if attributes[:'timeActivated']

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

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

  self.time_inactivated = attributes[:'timeInactivated'] if attributes[:'timeInactivated']

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

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

  self.time_unpublished = attributes[:'timeUnpublished'] if attributes[:'timeUnpublished']

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

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

  self.time_expired = attributes[:'timeExpired'] if attributes[:'timeExpired']

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

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

  self.time_promoted = attributes[:'timePromoted'] if attributes[:'timePromoted']

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

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

  self.predecessor_dnssec_key_version_uuid = attributes[:'predecessorDnssecKeyVersionUuid'] if attributes[:'predecessorDnssecKeyVersionUuid']

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

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

  self.successor_dnssec_key_version_uuid = attributes[:'successorDnssecKeyVersionUuid'] if attributes[:'successorDnssecKeyVersionUuid']

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

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

  self.key_tag = attributes[:'keyTag'] if attributes[:'keyTag']

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

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

  self.ds_data = attributes[:'dsData'] if attributes[:'dsData']

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

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

Instance Attribute Details

#algorithmString

The signing algorithm used for the key.

Returns:

  • (String)


27
28
29
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 27

def algorithm
  @algorithm
end

#ds_dataArray<OCI::Dns::Models::DnssecKeyVersionDsData>

An array of data for DS records corresponding with this key version. An entry will exist for each supported DS digest algorithm.



116
117
118
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 116

def ds_data
  @ds_data
end

#key_tagInteger

The key tag associated with the DnssecKeyVersion. This key tag will be present in the RRSIG and DS records associated with the key material for this DnssecKeyVersion. For more information about key tags, see RFC 4034.

Returns:

  • (Integer)


110
111
112
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 110

def key_tag
  @key_tag
end

#length_in_bytesInteger

The length of the corresponding private key in bytes, expressed as an integer.

Returns:

  • (Integer)


32
33
34
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 32

def length_in_bytes
  @length_in_bytes
end

#predecessor_dnssec_key_version_uuidString

When populated, this is the UUID of the DnssecKeyVersion that this DnssecKeyVersion will replace or has replaced.

Returns:

  • (String)


97
98
99
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 97

def predecessor_dnssec_key_version_uuid
  @predecessor_dnssec_key_version_uuid
end

#successor_dnssec_key_version_uuidString

When populated, this is the UUID of the DnssecKeyVersion that will replace, or has replaced, this DnssecKeyVersion.

Returns:

  • (String)


103
104
105
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 103

def successor_dnssec_key_version_uuid
  @successor_dnssec_key_version_uuid
end

#time_activatedDateTime

The date and time the key version went, or will go, active, expressed in RFC 3339 timestamp format. This is when the key material will be used to generate RRSIGs.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


55
56
57
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 55

def time_activated
  @time_activated
end

#time_createdDateTime

The date and time the key version was created, expressed in RFC 3339 timestamp format.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


39
40
41
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 39

def time_created
  @time_created
end

#time_expiredDateTime

The date and time at which the recommended key version publication/activation lifetime ends, expressed in RFC 3339 timestamp format. This is when the corresponding DNSKEY should no longer exist in zone contents and no longer be used to generate RRSIGs. For a key sigining key (KSK), if PromoteZoneDnssecKeyVersion has not been called on this DnssecKeyVersion's successor then it will remain active for arbitrarily long past its recommended lifetime. This prevents service disruption at the potential increased risk of key compromise.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


84
85
86
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 84

def time_expired
  @time_expired
end

#time_inactivatedDateTime

The date and time the key version went, or will go, inactive, expressed in RFC 3339 timestamp format. This is when the key material will no longer be used to generate RRSIGs. For a key signing key (KSK) DnssecKeyVersion, this is populated after PromoteZoneDnssecKeyVersion has been called on its successor DnssecKeyVersion.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


64
65
66
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 64

def time_inactivated
  @time_inactivated
end

#time_promotedDateTime

The date and time the key version was promoted expressed in RFC 3339 timestamp format.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


91
92
93
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 91

def time_promoted
  @time_promoted
end

#time_publishedDateTime

The date and time the key version was, or will be, published, expressed in RFC 3339 timestamp format. This is when the zone contents will include a DNSKEY record corresponding to the key material.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


47
48
49
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 47

def time_published
  @time_published
end

#time_unpublishedDateTime

The date and time the key version was, or will be, unpublished, expressed in RFC 3339 timestamp format. This is when the corresponding DNSKEY will be removed from zone contents. For a key signing key (KSK) DnssecKeyVersion, this is populated after PromoteZoneDnssecKeyVersion has been called on its successor DnssecKeyVersion.

Example: 2016-07-22T17:23:59:00Z

Returns:

  • (DateTime)


73
74
75
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 73

def time_unpublished
  @time_unpublished
end

#uuidString

The UUID of the DnssecKeyVersion.

Returns:

  • (String)


22
23
24
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 22

def uuid
  @uuid
end

Class Method Details

.attribute_mapObject

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



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 119

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'uuid': :'uuid',
    'algorithm': :'algorithm',
    'length_in_bytes': :'lengthInBytes',
    'time_created': :'timeCreated',
    'time_published': :'timePublished',
    'time_activated': :'timeActivated',
    'time_inactivated': :'timeInactivated',
    'time_unpublished': :'timeUnpublished',
    'time_expired': :'timeExpired',
    'time_promoted': :'timePromoted',
    'predecessor_dnssec_key_version_uuid': :'predecessorDnssecKeyVersionUuid',
    'successor_dnssec_key_version_uuid': :'successorDnssecKeyVersionUuid',
    'key_tag': :'keyTag',
    'ds_data': :'dsData'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 141

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'uuid': :'String',
    'algorithm': :'String',
    'length_in_bytes': :'Integer',
    'time_created': :'DateTime',
    'time_published': :'DateTime',
    'time_activated': :'DateTime',
    'time_inactivated': :'DateTime',
    'time_unpublished': :'DateTime',
    'time_expired': :'DateTime',
    'time_promoted': :'DateTime',
    'predecessor_dnssec_key_version_uuid': :'String',
    'successor_dnssec_key_version_uuid': :'String',
    'key_tag': :'Integer',
    'ds_data': :'Array<OCI::Dns::Models::DnssecKeyVersionDsData>'
    # 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



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 285

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

  self.class == other.class &&
    uuid == other.uuid &&
    algorithm == other.algorithm &&
    length_in_bytes == other.length_in_bytes &&
    time_created == other.time_created &&
    time_published == other.time_published &&
    time_activated == other.time_activated &&
    time_inactivated == other.time_inactivated &&
    time_unpublished == other.time_unpublished &&
    time_expired == other.time_expired &&
    time_promoted == other.time_promoted &&
    predecessor_dnssec_key_version_uuid == other.predecessor_dnssec_key_version_uuid &&
    successor_dnssec_key_version_uuid == other.successor_dnssec_key_version_uuid &&
    key_tag == other.key_tag &&
    ds_data == other.ds_data
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



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 328

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


308
309
310
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 308

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



317
318
319
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 317

def hash
  [uuid, algorithm, length_in_bytes, time_created, time_published, time_activated, time_inactivated, time_unpublished, time_expired, time_promoted, predecessor_dnssec_key_version_uuid, successor_dnssec_key_version_uuid, key_tag, ds_data].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



361
362
363
364
365
366
367
368
369
370
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 361

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



355
356
357
# File 'lib/oci/dns/models/ksk_dnssec_key_version.rb', line 355

def to_s
  to_hash.to_s
end