Class: OCI::Database::Models::AutonomousDbVersionSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::AutonomousDbVersionSummary
- Defined in:
- lib/oci/database/models/autonomous_db_version_summary.rb
Overview
The supported Autonomous Database version.
Constant Summary collapse
- DB_WORKLOAD_ENUM =
[ DB_WORKLOAD_OLTP = 'OLTP'.freeze, DB_WORKLOAD_DW = 'DW'.freeze, DB_WORKLOAD_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#db_workload ⇒ String
The Autonomous Database workload type.
-
#details ⇒ String
A URL that points to a detailed description of the Autonomous Database version.
-
#is_dedicated ⇒ BOOLEAN
True if the database uses dedicated Exadata infrastructure.
-
#is_free_tier_enabled ⇒ BOOLEAN
True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.
-
#version ⇒ String
[Required] A valid Oracle Database version for Autonomous Database.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AutonomousDbVersionSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ AutonomousDbVersionSummary
Initializes the object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 80 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? end |
Instance Attribute Details
#db_workload ⇒ String
The Autonomous Database workload type. The following values are valid:
-
OLTP - indicates an Autonomous Transaction Processing database
-
DW - indicates an Autonomous Data Warehouse database
28 29 30 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 28 def db_workload @db_workload end |
#details ⇒ String
A URL that points to a detailed description of the Autonomous Database version.
37 38 39 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 37 def details @details end |
#is_dedicated ⇒ BOOLEAN
True if the database uses dedicated Exadata infrastructure.
33 34 35 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 33 def is_dedicated @is_dedicated end |
#is_free_tier_enabled ⇒ BOOLEAN
True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.
41 42 43 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 41 def is_free_tier_enabled @is_free_tier_enabled end |
#version ⇒ String
[Required] A valid Oracle Database version for Autonomous Database.
20 21 22 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 20 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'version': :'version', 'db_workload': :'dbWorkload', 'is_dedicated': :'isDedicated', 'details': :'details', 'is_free_tier_enabled': :'isFreeTierEnabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 57 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'version': :'String', 'db_workload': :'String', 'is_dedicated': :'BOOLEAN', 'details': :'String', 'is_free_tier_enabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 129 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 163 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
143 144 145 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 143 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
152 153 154 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 152 def hash [version, db_workload, is_dedicated, details, is_free_tier_enabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 196 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_s ⇒ String
Returns the string representation of the object
190 191 192 |
# File 'lib/oci/database/models/autonomous_db_version_summary.rb', line 190 def to_s to_hash.to_s end |