Class: OCI::Database::Models::AutonomousContainerDatabase

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/autonomous_container_database.rb

Overview

AutonomousContainerDatabase model.

Constant Summary collapse

SERVICE_LEVEL_AGREEMENT_TYPE_ENUM =
[
  SERVICE_LEVEL_AGREEMENT_TYPE_STANDARD = 'STANDARD'.freeze,
  SERVICE_LEVEL_AGREEMENT_TYPE_MISSION_CRITICAL = 'MISSION_CRITICAL'.freeze,
  SERVICE_LEVEL_AGREEMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_RESTORING = 'RESTORING'.freeze,
  LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED'.freeze,
  LIFECYCLE_STATE_RESTARTING = 'RESTARTING'.freeze,
  LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PATCH_MODEL_ENUM =
[
  PATCH_MODEL_RELEASE_UPDATES = 'RELEASE_UPDATES'.freeze,
  PATCH_MODEL_RELEASE_UPDATE_REVISIONS = 'RELEASE_UPDATE_REVISIONS'.freeze,
  PATCH_MODEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AutonomousContainerDatabase

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/oci/database/models/autonomous_container_database.rb', line 183

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

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

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

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

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

  self.service_level_agreement_type = attributes[:'serviceLevelAgreementType'] if attributes[:'serviceLevelAgreementType']

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

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

  self.autonomous_exadata_infrastructure_id = attributes[:'autonomousExadataInfrastructureId'] if attributes[:'autonomousExadataInfrastructureId']

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

  self.autonomous_exadata_infrastructure_id = attributes[:'autonomous_exadata_infrastructure_id'] if attributes[:'autonomous_exadata_infrastructure_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.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

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

  self.last_maintenance_run_id = attributes[:'lastMaintenanceRunId'] if attributes[:'lastMaintenanceRunId']

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

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

  self.next_maintenance_run_id = attributes[:'nextMaintenanceRunId'] if attributes[:'nextMaintenanceRunId']

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

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

  self.maintenance_window = attributes[:'maintenanceWindow'] if attributes[:'maintenanceWindow']

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

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

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

  self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']

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

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

  self.db_version = attributes[:'dbVersion'] if attributes[:'dbVersion']

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

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

  self.backup_config = attributes[:'backupConfig'] if attributes[:'backupConfig']

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

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

Instance Attribute Details

#autonomous_exadata_infrastructure_idString

[Required] The OCID of the Autonomous Exadata Infrastructure.

Returns:

  • (String)


56
57
58
# File 'lib/oci/database/models/autonomous_container_database.rb', line 56

def autonomous_exadata_infrastructure_id
  @autonomous_exadata_infrastructure_id
end

#availability_domainString

The availability domain of the Autonomous Container Database.

Returns:

  • (String)


101
102
103
# File 'lib/oci/database/models/autonomous_container_database.rb', line 101

def availability_domain
  @availability_domain
end

#backup_configOCI::Database::Models::AutonomousContainerDatabaseBackupConfig



108
109
110
# File 'lib/oci/database/models/autonomous_container_database.rb', line 108

def backup_config
  @backup_config
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database/models/autonomous_container_database.rb', line 44

def compartment_id
  @compartment_id
end

#db_versionString

Oracle Database version of the Autonomous Container Database

Returns:

  • (String)


105
106
107
# File 'lib/oci/database/models/autonomous_container_database.rb', line 105

def db_version
  @db_version
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.

Returns:

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


97
98
99
# File 'lib/oci/database/models/autonomous_container_database.rb', line 97

def defined_tags
  @defined_tags
end

#display_nameString

[Required] The user-provided name for the Autonomous Container Database.

Returns:

  • (String)


48
49
50
# File 'lib/oci/database/models/autonomous_container_database.rb', line 48

def display_name
  @display_name
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>)


91
92
93
# File 'lib/oci/database/models/autonomous_container_database.rb', line 91

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the Autonomous Container Database.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database/models/autonomous_container_database.rb', line 40

def id
  @id
end

#last_maintenance_run_idString

The OCID of the last maintenance run.

Returns:

  • (String)


76
77
78
# File 'lib/oci/database/models/autonomous_container_database.rb', line 76

def last_maintenance_run_id
  @last_maintenance_run_id
end

#lifecycle_detailsString

Additional information about the current lifecycleState.

Returns:

  • (String)


64
65
66
# File 'lib/oci/database/models/autonomous_container_database.rb', line 64

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the Autonomous Container Database.

Returns:

  • (String)


60
61
62
# File 'lib/oci/database/models/autonomous_container_database.rb', line 60

def lifecycle_state
  @lifecycle_state
end

#maintenance_windowOCI::Database::Models::MaintenanceWindow



83
84
85
# File 'lib/oci/database/models/autonomous_container_database.rb', line 83

def maintenance_window
  @maintenance_window
end

#next_maintenance_run_idString

The OCID of the next maintenance run.

Returns:

  • (String)


80
81
82
# File 'lib/oci/database/models/autonomous_container_database.rb', line 80

def next_maintenance_run_id
  @next_maintenance_run_id
end

#patch_modelString

[Required] Database patch model preference.

Returns:

  • (String)


72
73
74
# File 'lib/oci/database/models/autonomous_container_database.rb', line 72

def patch_model
  @patch_model
end

#service_level_agreement_typeString

[Required] The service level agreement type of the container database. The default is STANDARD.

Returns:

  • (String)


52
53
54
# File 'lib/oci/database/models/autonomous_container_database.rb', line 52

def service_level_agreement_type
  @service_level_agreement_type
end

#time_createdDateTime

The date and time the Autonomous Container Database was created.

Returns:

  • (DateTime)


68
69
70
# File 'lib/oci/database/models/autonomous_container_database.rb', line 68

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'service_level_agreement_type': :'serviceLevelAgreementType',
    'autonomous_exadata_infrastructure_id': :'autonomousExadataInfrastructureId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'patch_model': :'patchModel',
    'last_maintenance_run_id': :'lastMaintenanceRunId',
    'next_maintenance_run_id': :'nextMaintenanceRunId',
    'maintenance_window': :'maintenanceWindow',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'availability_domain': :'availabilityDomain',
    'db_version': :'dbVersion',
    'backup_config': :'backupConfig'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



136
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/database/models/autonomous_container_database.rb', line 136

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'service_level_agreement_type': :'String',
    'autonomous_exadata_infrastructure_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'patch_model': :'String',
    'last_maintenance_run_id': :'String',
    'next_maintenance_run_id': :'String',
    'maintenance_window': :'OCI::Database::Models::MaintenanceWindow',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'availability_domain': :'String',
    'db_version': :'String',
    'backup_config': :'OCI::Database::Models::AutonomousContainerDatabaseBackupConfig'
    # 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



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/oci/database/models/autonomous_container_database.rb', line 331

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    service_level_agreement_type == other.service_level_agreement_type &&
    autonomous_exadata_infrastructure_id == other.autonomous_exadata_infrastructure_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    patch_model == other.patch_model &&
    last_maintenance_run_id == other.last_maintenance_run_id &&
    next_maintenance_run_id == other.next_maintenance_run_id &&
    maintenance_window == other.maintenance_window &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    availability_domain == other.availability_domain &&
    db_version == other.db_version &&
    backup_config == other.backup_config
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



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/oci/database/models/autonomous_container_database.rb', line 377

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


357
358
359
# File 'lib/oci/database/models/autonomous_container_database.rb', line 357

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



366
367
368
# File 'lib/oci/database/models/autonomous_container_database.rb', line 366

def hash
  [id, compartment_id, display_name, service_level_agreement_type, autonomous_exadata_infrastructure_id, lifecycle_state, lifecycle_details, time_created, patch_model, last_maintenance_run_id, next_maintenance_run_id, maintenance_window, freeform_tags, defined_tags, availability_domain, db_version, backup_config].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



410
411
412
413
414
415
416
417
418
419
# File 'lib/oci/database/models/autonomous_container_database.rb', line 410

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



404
405
406
# File 'lib/oci/database/models/autonomous_container_database.rb', line 404

def to_s
  to_hash.to_s
end