Class: OCI::Database::Models::FlexComponentSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::FlexComponentSummary
- Defined in:
- lib/oci/database/models/flex_component_summary.rb
Overview
The Flex Components for a DB system. The Flex Component determines resources to allocate to the DB system - CPU cores, memory and storage for Flex shapes.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Constant Summary collapse
- HARDWARE_TYPE_ENUM =
[ HARDWARE_TYPE_COMPUTE = 'COMPUTE'.freeze, HARDWARE_TYPE_CELL = 'CELL'.freeze, HARDWARE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#available_core_count ⇒ Integer
The maximum number of CPU cores that can ben enabled on the DB Server for this Flex Component.
-
#available_db_storage_in_gbs ⇒ Integer
The maximum storage that can be enabled on the Storage Server for this Flex Component.
-
#available_local_storage_in_gbs ⇒ Integer
The maximum local storage that can be enabled on the DB Server for this Flex Component.
-
#available_memory_in_gbs ⇒ Integer
The maximum memory size that can be enabled on the DB Server for this Flex Component.
-
#compute_model ⇒ String
The compute model of the DB Server for this Flex Component.
-
#description_summary ⇒ String
The description summary for this Flex Component.
-
#hardware_type ⇒ String
The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component.
-
#minimum_core_count ⇒ Integer
The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component.
-
#name ⇒ String
[Required] The name of the Flex Component used for the DB system.
-
#runtime_minimum_core_count ⇒ Integer
The runtime minimum number of CPU cores that can be enabled for this Flex Component.
-
#shape ⇒ String
The name of the DB system shape for this Flex Component.
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 = {}) ⇒ FlexComponentSummary
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 = {}) ⇒ FlexComponentSummary
Initializes the object
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 179 180 181 182 183 184 185 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 122 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.name = attributes[:'name'] if attributes[:'name'] self.minimum_core_count = attributes[:'minimumCoreCount'] if attributes[:'minimumCoreCount'] raise 'You cannot provide both :minimumCoreCount and :minimum_core_count' if attributes.key?(:'minimumCoreCount') && attributes.key?(:'minimum_core_count') self.minimum_core_count = attributes[:'minimum_core_count'] if attributes[:'minimum_core_count'] self.available_core_count = attributes[:'availableCoreCount'] if attributes[:'availableCoreCount'] raise 'You cannot provide both :availableCoreCount and :available_core_count' if attributes.key?(:'availableCoreCount') && attributes.key?(:'available_core_count') self.available_core_count = attributes[:'available_core_count'] if attributes[:'available_core_count'] self.available_db_storage_in_gbs = attributes[:'availableDbStorageInGBs'] if attributes[:'availableDbStorageInGBs'] raise 'You cannot provide both :availableDbStorageInGBs and :available_db_storage_in_gbs' if attributes.key?(:'availableDbStorageInGBs') && attributes.key?(:'available_db_storage_in_gbs') self.available_db_storage_in_gbs = attributes[:'available_db_storage_in_gbs'] if attributes[:'available_db_storage_in_gbs'] self.runtime_minimum_core_count = attributes[:'runtimeMinimumCoreCount'] if attributes[:'runtimeMinimumCoreCount'] raise 'You cannot provide both :runtimeMinimumCoreCount and :runtime_minimum_core_count' if attributes.key?(:'runtimeMinimumCoreCount') && attributes.key?(:'runtime_minimum_core_count') self.runtime_minimum_core_count = attributes[:'runtime_minimum_core_count'] if attributes[:'runtime_minimum_core_count'] self.shape = attributes[:'shape'] if attributes[:'shape'] self.available_memory_in_gbs = attributes[:'availableMemoryInGBs'] if attributes[:'availableMemoryInGBs'] raise 'You cannot provide both :availableMemoryInGBs and :available_memory_in_gbs' if attributes.key?(:'availableMemoryInGBs') && attributes.key?(:'available_memory_in_gbs') self.available_memory_in_gbs = attributes[:'available_memory_in_gbs'] if attributes[:'available_memory_in_gbs'] self.available_local_storage_in_gbs = attributes[:'availableLocalStorageInGBs'] if attributes[:'availableLocalStorageInGBs'] raise 'You cannot provide both :availableLocalStorageInGBs and :available_local_storage_in_gbs' if attributes.key?(:'availableLocalStorageInGBs') && attributes.key?(:'available_local_storage_in_gbs') self.available_local_storage_in_gbs = attributes[:'available_local_storage_in_gbs'] if attributes[:'available_local_storage_in_gbs'] self.compute_model = attributes[:'computeModel'] if attributes[:'computeModel'] raise 'You cannot provide both :computeModel and :compute_model' if attributes.key?(:'computeModel') && attributes.key?(:'compute_model') self.compute_model = attributes[:'compute_model'] if attributes[:'compute_model'] self.hardware_type = attributes[:'hardwareType'] if attributes[:'hardwareType'] raise 'You cannot provide both :hardwareType and :hardware_type' if attributes.key?(:'hardwareType') && attributes.key?(:'hardware_type') self.hardware_type = attributes[:'hardware_type'] if attributes[:'hardware_type'] self.description_summary = attributes[:'descriptionSummary'] if attributes[:'descriptionSummary'] raise 'You cannot provide both :descriptionSummary and :description_summary' if attributes.key?(:'descriptionSummary') && attributes.key?(:'description_summary') self.description_summary = attributes[:'description_summary'] if attributes[:'description_summary'] end |
Instance Attribute Details
#available_core_count ⇒ Integer
The maximum number of CPU cores that can ben enabled on the DB Server for this Flex Component.
33 34 35 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 33 def available_core_count @available_core_count end |
#available_db_storage_in_gbs ⇒ Integer
The maximum storage that can be enabled on the Storage Server for this Flex Component.
37 38 39 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 37 def available_db_storage_in_gbs @available_db_storage_in_gbs end |
#available_local_storage_in_gbs ⇒ Integer
The maximum local storage that can be enabled on the DB Server for this Flex Component.
53 54 55 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 53 def available_local_storage_in_gbs @available_local_storage_in_gbs end |
#available_memory_in_gbs ⇒ Integer
The maximum memory size that can be enabled on the DB Server for this Flex Component.
49 50 51 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 49 def available_memory_in_gbs @available_memory_in_gbs end |
#compute_model ⇒ String
The compute model of the DB Server for this Flex Component.
57 58 59 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 57 def compute_model @compute_model end |
#description_summary ⇒ String
The description summary for this Flex Component.
65 66 67 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 65 def description_summary @description_summary end |
#hardware_type ⇒ String
The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component.
61 62 63 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 61 def hardware_type @hardware_type end |
#minimum_core_count ⇒ Integer
The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component.
29 30 31 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 29 def minimum_core_count @minimum_core_count end |
#name ⇒ String
[Required] The name of the Flex Component used for the DB system.
25 26 27 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 25 def name @name end |
#runtime_minimum_core_count ⇒ Integer
The runtime minimum number of CPU cores that can be enabled for this Flex Component.
41 42 43 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 41 def runtime_minimum_core_count @runtime_minimum_core_count end |
#shape ⇒ String
The name of the DB system shape for this Flex Component.
45 46 47 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 45 def shape @shape end |
Class Method Details
.attribute_map ⇒ Object
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 84 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 68 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'minimum_core_count': :'minimumCoreCount', 'available_core_count': :'availableCoreCount', 'available_db_storage_in_gbs': :'availableDbStorageInGBs', 'runtime_minimum_core_count': :'runtimeMinimumCoreCount', 'shape': :'shape', 'available_memory_in_gbs': :'availableMemoryInGBs', 'available_local_storage_in_gbs': :'availableLocalStorageInGBs', 'compute_model': :'computeModel', 'hardware_type': :'hardwareType', 'description_summary': :'descriptionSummary' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 87 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'minimum_core_count': :'Integer', 'available_core_count': :'Integer', 'available_db_storage_in_gbs': :'Integer', 'runtime_minimum_core_count': :'Integer', 'shape': :'String', 'available_memory_in_gbs': :'Integer', 'available_local_storage_in_gbs': :'Integer', 'compute_model': :'String', 'hardware_type': :'String', 'description_summary': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 207 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && minimum_core_count == other.minimum_core_count && available_core_count == other.available_core_count && available_db_storage_in_gbs == other.available_db_storage_in_gbs && runtime_minimum_core_count == other.runtime_minimum_core_count && shape == other.shape && available_memory_in_gbs == other.available_memory_in_gbs && available_local_storage_in_gbs == other.available_local_storage_in_gbs && compute_model == other.compute_model && hardware_type == other.hardware_type && description_summary == other.description_summary end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 247 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
227 228 229 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 227 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
236 237 238 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 236 def hash [name, minimum_core_count, available_core_count, available_db_storage_in_gbs, runtime_minimum_core_count, shape, available_memory_in_gbs, available_local_storage_in_gbs, compute_model, hardware_type, description_summary].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 280 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
274 275 276 |
# File 'lib/oci/database/models/flex_component_summary.rb', line 274 def to_s to_hash.to_s end |