Class: OCI::Database::Models::AutonomousDbVersionSummary

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

Overview

The supported Autonomous AI Database version.

Constant Summary collapse

DB_WORKLOAD_ENUM =
[
  DB_WORKLOAD_OLTP = 'OLTP'.freeze,
  DB_WORKLOAD_DW = 'DW'.freeze,
  DB_WORKLOAD_AJD = 'AJD'.freeze,
  DB_WORKLOAD_APEX = 'APEX'.freeze,
  DB_WORKLOAD_LH = 'LH'.freeze,
  DB_WORKLOAD_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AutonomousDbVersionSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :version (String)

    The value to assign to the #version property

  • :db_workload (String)

    The value to assign to the #db_workload property

  • :is_dedicated (BOOLEAN)

    The value to assign to the #is_dedicated property

  • :details (String)

    The value to assign to the #details property

  • :is_free_tier_enabled (BOOLEAN)

    The value to assign to the #is_free_tier_enabled property

  • :is_dev_tier_enabled (BOOLEAN)

    The value to assign to the #is_dev_tier_enabled property

  • :is_paid_enabled (BOOLEAN)

    The value to assign to the #is_paid_enabled property

  • :is_default_for_free (BOOLEAN)

    The value to assign to the #is_default_for_free property

  • :is_default_for_paid (BOOLEAN)

    The value to assign to the #is_default_for_paid property



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
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 126

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

  self.db_workload = attributes[:'dbWorkload'] if attributes[:'dbWorkload']

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

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

  self.is_dedicated = attributes[:'isDedicated'] unless attributes[:'isDedicated'].nil?

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

  self.is_dedicated = attributes[:'is_dedicated'] unless attributes[:'is_dedicated'].nil?

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

  self.is_free_tier_enabled = attributes[:'isFreeTierEnabled'] unless attributes[:'isFreeTierEnabled'].nil?

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

  self.is_free_tier_enabled = attributes[:'is_free_tier_enabled'] unless attributes[:'is_free_tier_enabled'].nil?

  self.is_dev_tier_enabled = attributes[:'isDevTierEnabled'] unless attributes[:'isDevTierEnabled'].nil?

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

  self.is_dev_tier_enabled = attributes[:'is_dev_tier_enabled'] unless attributes[:'is_dev_tier_enabled'].nil?

  self.is_paid_enabled = attributes[:'isPaidEnabled'] unless attributes[:'isPaidEnabled'].nil?

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

  self.is_paid_enabled = attributes[:'is_paid_enabled'] unless attributes[:'is_paid_enabled'].nil?

  self.is_default_for_free = attributes[:'isDefaultForFree'] unless attributes[:'isDefaultForFree'].nil?

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

  self.is_default_for_free = attributes[:'is_default_for_free'] unless attributes[:'is_default_for_free'].nil?

  self.is_default_for_paid = attributes[:'isDefaultForPaid'] unless attributes[:'isDefaultForPaid'].nil?

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

  self.is_default_for_paid = attributes[:'is_default_for_paid'] unless attributes[:'is_default_for_paid'].nil?
end

Instance Attribute Details

#db_workloadString

The Autonomous AI Database workload type. The following values are valid: - OLTP - indicates an Autonomous AI Transaction Processing database - DW - indicates an Autonomous AI Lakehouse database - AJD - indicates an Autonomous AI JSON Database - APEX - indicates an Autonomous AI Database with the Oracle APEX AI Application Development workload type. - LH - indicates an Oracle Autonomous AI Lakehouse database

Note Starting December 2026, DW will not be supported as a valid value for this parameter. When creating an Autonomous AI Database, if this parameter is not specified, the default value is OLTP.

This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier.

Returns:

  • (String)


46
47
48
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 46

def db_workload
  @db_workload
end

#detailsString

A URL that points to a detailed description of the Autonomous AI Database version.

Returns:

  • (String)


55
56
57
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 55

def details
  @details
end

#is_dedicatedBOOLEAN

True if the database uses dedicated Exadata infrastructure.

Returns:

  • (BOOLEAN)


51
52
53
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 51

def is_dedicated
  @is_dedicated
end

#is_default_for_freeBOOLEAN

True if this version of the Oracle AI Database software's default is free.

Returns:

  • (BOOLEAN)


71
72
73
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 71

def is_default_for_free
  @is_default_for_free
end

#is_default_for_paidBOOLEAN

True if this version of the Oracle AI Database software's default is paid.

Returns:

  • (BOOLEAN)


75
76
77
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 75

def is_default_for_paid
  @is_default_for_paid
end

#is_dev_tier_enabledBOOLEAN

True if this Oracle AI Database software version can be used for Autonomous AI Databases for Developers.

Returns:

  • (BOOLEAN)


63
64
65
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 63

def is_dev_tier_enabled
  @is_dev_tier_enabled
end

#is_free_tier_enabledBOOLEAN

True if this version of the Oracle AI Database software can be used for Always-Free Autonomous AI Databases.

Returns:

  • (BOOLEAN)


59
60
61
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 59

def is_free_tier_enabled
  @is_free_tier_enabled
end

#is_paid_enabledBOOLEAN

True if this version of the Oracle AI Database software has payments enabled.

Returns:

  • (BOOLEAN)


67
68
69
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 67

def is_paid_enabled
  @is_paid_enabled
end

#versionString

[Required] A valid Oracle AI Database version for Autonomous AI Database. When you specify 23ai for dbversion, the system will provision a 23ai database, but the UI will display it as 26ai. When you specify 26ai for dbversion, the system will provision and display a 26ai database as expected. For new databases, it is recommended to use either 19c or 26ai.

Note Starting December 2026, 23ai will not be supported as a valid value for this parameter.

Returns:

  • (String)


30
31
32
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 30

def version
  @version
end

Class Method Details

.attribute_mapObject

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 78

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'version': :'version',
    'db_workload': :'dbWorkload',
    'is_dedicated': :'isDedicated',
    'details': :'details',
    'is_free_tier_enabled': :'isFreeTierEnabled',
    'is_dev_tier_enabled': :'isDevTierEnabled',
    'is_paid_enabled': :'isPaidEnabled',
    'is_default_for_free': :'isDefaultForFree',
    'is_default_for_paid': :'isDefaultForPaid'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 95

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'version': :'String',
    'db_workload': :'String',
    'is_dedicated': :'BOOLEAN',
    'details': :'String',
    'is_free_tier_enabled': :'BOOLEAN',
    'is_dev_tier_enabled': :'BOOLEAN',
    'is_paid_enabled': :'BOOLEAN',
    'is_default_for_free': :'BOOLEAN',
    'is_default_for_paid': :'BOOLEAN'
    # 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



199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 199

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

  self.class == other.class &&
    version == other.version &&
    db_workload == other.db_workload &&
    is_dedicated == other.is_dedicated &&
    details == other.details &&
    is_free_tier_enabled == other.is_free_tier_enabled &&
    is_dev_tier_enabled == other.is_dev_tier_enabled &&
    is_paid_enabled == other.is_paid_enabled &&
    is_default_for_free == other.is_default_for_free &&
    is_default_for_paid == other.is_default_for_paid
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



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 237

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


217
218
219
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 217

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



226
227
228
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 226

def hash
  [version, db_workload, is_dedicated, details, is_free_tier_enabled, is_dev_tier_enabled, is_paid_enabled, is_default_for_free, is_default_for_paid].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



270
271
272
273
274
275
276
277
278
279
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 270

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



264
265
266
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 264

def to_s
  to_hash.to_s
end