Class: OCI::DatabaseManagement::Models::MySqlDatabaseUsageMetrics
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::MySqlDatabaseUsageMetrics
- Defined in:
- lib/oci/database_management/models/my_sql_database_usage_metrics.rb
Overview
The list of aggregated metrics for Managed MySQL Databases in the fleet.
Constant Summary collapse
- DATABASE_STATUS_ENUM =
[ DATABASE_STATUS_UP = 'UP'.freeze, DATABASE_STATUS_DOWN = 'DOWN'.freeze, DATABASE_STATUS_UNKNOWN = 'UNKNOWN'.freeze, DATABASE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where the Managed MySQL Database resides.
-
#database_name ⇒ String
[Required] The display name of the Managed MySQL Database.
-
#database_status ⇒ String
[Required] The status of the MySQL Database.
-
#database_type ⇒ String
[Required] Indicates MySQL Database type, ONPREMISE or MySQL Database System.
-
#database_version ⇒ String
[Required] The version of the MySQL Database.
-
#db_id ⇒ String
[Required] The OCID of the Managed MySQL Database.
-
#heat_wave_cluster_display_name ⇒ String
The name of the HeatWave cluster.
-
#heat_wave_node_count ⇒ Integer
The number of nodes in the HeatWave cluster.
-
#is_heat_wave_enabled ⇒ BOOLEAN
Indicates whether HeatWave is enabled for the MySQL Database System or not.
-
#mds_deployment_type ⇒ String
[Required] The type of MySQL Database System.
-
#mdslifecycle_state ⇒ String
[Required] The lifecycle state of the MySQL Database System.
-
#metrics ⇒ Array<OCI::DatabaseManagement::Models::MySqlFleetMetricDefinition>
[Required] A list of the database health metrics like CPU, Storage, and Memory.
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 = {}) ⇒ MySqlDatabaseUsageMetrics
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 = {}) ⇒ MySqlDatabaseUsageMetrics
Initializes the object
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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 127 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.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.database_name = attributes[:'databaseName'] if attributes[:'databaseName'] raise 'You cannot provide both :databaseName and :database_name' if attributes.key?(:'databaseName') && attributes.key?(:'database_name') self.database_name = attributes[:'database_name'] if attributes[:'database_name'] self.database_type = attributes[:'databaseType'] if attributes[:'databaseType'] raise 'You cannot provide both :databaseType and :database_type' if attributes.key?(:'databaseType') && attributes.key?(:'database_type') self.database_type = attributes[:'database_type'] if attributes[:'database_type'] self.mds_deployment_type = attributes[:'mdsDeploymentType'] if attributes[:'mdsDeploymentType'] raise 'You cannot provide both :mdsDeploymentType and :mds_deployment_type' if attributes.key?(:'mdsDeploymentType') && attributes.key?(:'mds_deployment_type') self.mds_deployment_type = attributes[:'mds_deployment_type'] if attributes[:'mds_deployment_type'] self.mdslifecycle_state = attributes[:'mdslifecycleState'] if attributes[:'mdslifecycleState'] raise 'You cannot provide both :mdslifecycleState and :mdslifecycle_state' if attributes.key?(:'mdslifecycleState') && attributes.key?(:'mdslifecycle_state') self.mdslifecycle_state = attributes[:'mdslifecycle_state'] if attributes[:'mdslifecycle_state'] self.database_version = attributes[:'databaseVersion'] if attributes[:'databaseVersion'] raise 'You cannot provide both :databaseVersion and :database_version' if attributes.key?(:'databaseVersion') && attributes.key?(:'database_version') self.database_version = attributes[:'database_version'] if attributes[:'database_version'] self.db_id = attributes[:'dbId'] if attributes[:'dbId'] raise 'You cannot provide both :dbId and :db_id' if attributes.key?(:'dbId') && attributes.key?(:'db_id') self.db_id = attributes[:'db_id'] if attributes[:'db_id'] self.database_status = attributes[:'databaseStatus'] if attributes[:'databaseStatus'] raise 'You cannot provide both :databaseStatus and :database_status' if attributes.key?(:'databaseStatus') && attributes.key?(:'database_status') self.database_status = attributes[:'database_status'] if attributes[:'database_status'] self.is_heat_wave_enabled = attributes[:'isHeatWaveEnabled'] unless attributes[:'isHeatWaveEnabled'].nil? raise 'You cannot provide both :isHeatWaveEnabled and :is_heat_wave_enabled' if attributes.key?(:'isHeatWaveEnabled') && attributes.key?(:'is_heat_wave_enabled') self.is_heat_wave_enabled = attributes[:'is_heat_wave_enabled'] unless attributes[:'is_heat_wave_enabled'].nil? self.heat_wave_cluster_display_name = attributes[:'heatWaveClusterDisplayName'] if attributes[:'heatWaveClusterDisplayName'] raise 'You cannot provide both :heatWaveClusterDisplayName and :heat_wave_cluster_display_name' if attributes.key?(:'heatWaveClusterDisplayName') && attributes.key?(:'heat_wave_cluster_display_name') self.heat_wave_cluster_display_name = attributes[:'heat_wave_cluster_display_name'] if attributes[:'heat_wave_cluster_display_name'] self.heat_wave_node_count = attributes[:'heatWaveNodeCount'] if attributes[:'heatWaveNodeCount'] raise 'You cannot provide both :heatWaveNodeCount and :heat_wave_node_count' if attributes.key?(:'heatWaveNodeCount') && attributes.key?(:'heat_wave_node_count') self.heat_wave_node_count = attributes[:'heat_wave_node_count'] if attributes[:'heat_wave_node_count'] self.metrics = attributes[:'metrics'] if attributes[:'metrics'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment where the Managed MySQL Database resides.
21 22 23 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 21 def compartment_id @compartment_id end |
#database_name ⇒ String
[Required] The display name of the Managed MySQL Database.
25 26 27 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 25 def database_name @database_name end |
#database_status ⇒ String
[Required] The status of the MySQL Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
51 52 53 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 51 def database_status @database_status end |
#database_type ⇒ String
[Required] Indicates MySQL Database type, ONPREMISE or MySQL Database System.
29 30 31 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 29 def database_type @database_type end |
#database_version ⇒ String
[Required] The version of the MySQL Database.
41 42 43 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 41 def database_version @database_version end |
#db_id ⇒ String
[Required] The OCID of the Managed MySQL Database.
45 46 47 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 45 def db_id @db_id end |
#heat_wave_cluster_display_name ⇒ String
The name of the HeatWave cluster.
59 60 61 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 59 def heat_wave_cluster_display_name @heat_wave_cluster_display_name end |
#heat_wave_node_count ⇒ Integer
The number of nodes in the HeatWave cluster.
63 64 65 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 63 def heat_wave_node_count @heat_wave_node_count end |
#is_heat_wave_enabled ⇒ BOOLEAN
Indicates whether HeatWave is enabled for the MySQL Database System or not.
55 56 57 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 55 def is_heat_wave_enabled @is_heat_wave_enabled end |
#mds_deployment_type ⇒ String
[Required] The type of MySQL Database System.
33 34 35 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 33 def mds_deployment_type @mds_deployment_type end |
#mdslifecycle_state ⇒ String
[Required] The lifecycle state of the MySQL Database System.
37 38 39 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 37 def mdslifecycle_state @mdslifecycle_state end |
#metrics ⇒ Array<OCI::DatabaseManagement::Models::MySqlFleetMetricDefinition>
[Required] A list of the database health metrics like CPU, Storage, and Memory.
67 68 69 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 67 def metrics @metrics end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 70 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'database_name': :'databaseName', 'database_type': :'databaseType', 'mds_deployment_type': :'mdsDeploymentType', 'mdslifecycle_state': :'mdslifecycleState', 'database_version': :'databaseVersion', 'db_id': :'dbId', 'database_status': :'databaseStatus', 'is_heat_wave_enabled': :'isHeatWaveEnabled', 'heat_wave_cluster_display_name': :'heatWaveClusterDisplayName', 'heat_wave_node_count': :'heatWaveNodeCount', 'metrics': :'metrics' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'database_name': :'String', 'database_type': :'String', 'mds_deployment_type': :'String', 'mdslifecycle_state': :'String', 'database_version': :'String', 'db_id': :'String', 'database_status': :'String', 'is_heat_wave_enabled': :'BOOLEAN', 'heat_wave_cluster_display_name': :'String', 'heat_wave_node_count': :'Integer', 'metrics': :'Array<OCI::DatabaseManagement::Models::MySqlFleetMetricDefinition>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 222 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && database_name == other.database_name && database_type == other.database_type && mds_deployment_type == other.mds_deployment_type && mdslifecycle_state == other.mdslifecycle_state && database_version == other.database_version && db_id == other.db_id && database_status == other.database_status && is_heat_wave_enabled == other.is_heat_wave_enabled && heat_wave_cluster_display_name == other.heat_wave_cluster_display_name && heat_wave_node_count == other.heat_wave_node_count && metrics == other.metrics end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 263 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
243 244 245 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 243 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
252 253 254 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 252 def hash [compartment_id, database_name, database_type, mds_deployment_type, mdslifecycle_state, database_version, db_id, database_status, is_heat_wave_enabled, heat_wave_cluster_display_name, heat_wave_node_count, metrics].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
296 297 298 299 300 301 302 303 304 305 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 296 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
290 291 292 |
# File 'lib/oci/database_management/models/my_sql_database_usage_metrics.rb', line 290 def to_s to_hash.to_s end |