Class: OCI::DatabaseManagement::Models::DatabaseInstanceHomeMetricsDefinition
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::DatabaseInstanceHomeMetricsDefinition
- Defined in:
- lib/oci/database_management/models/database_instance_home_metrics_definition.rb
Overview
The response containing the CPU, Wait, DB Time, and Memory metrics for a specific Oracle Real Application Clusters (Oracle RAC) database instance.
Instance Attribute Summary collapse
-
#activity_time_series_metrics ⇒ Array<OCI::DatabaseManagement::Models::ActivityTimeSeriesMetrics>
[Required] A list of the active session metrics for CPU and Wait time for a specific Oracle Real Application Clusters (Oracle RAC) database instance.
- #cpu_utilization_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::CpuUtilizationAggregateMetrics
-
#db_time_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::DatabaseTimeAggregateMetrics
This attribute is required.
-
#instance_name ⇒ String
[Required] The name of the Oracle Real Application Clusters (Oracle RAC) database instance to which the corresponding metrics belong.
-
#instance_number ⇒ Integer
[Required] The number of Oracle Real Application Clusters (Oracle RAC) database instance to which the corresponding metrics belong.
-
#io_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::DatabaseIOAggregateMetrics
This attribute is required.
-
#memory_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::MemoryAggregateMetrics
This attribute is required.
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 = {}) ⇒ DatabaseInstanceHomeMetricsDefinition
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 = {}) ⇒ DatabaseInstanceHomeMetricsDefinition
Initializes the object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 91 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.instance_name = attributes[:'instanceName'] if attributes[:'instanceName'] raise 'You cannot provide both :instanceName and :instance_name' if attributes.key?(:'instanceName') && attributes.key?(:'instance_name') self.instance_name = attributes[:'instance_name'] if attributes[:'instance_name'] self.instance_number = attributes[:'instanceNumber'] if attributes[:'instanceNumber'] raise 'You cannot provide both :instanceNumber and :instance_number' if attributes.key?(:'instanceNumber') && attributes.key?(:'instance_number') self.instance_number = attributes[:'instance_number'] if attributes[:'instance_number'] self.activity_time_series_metrics = attributes[:'activityTimeSeriesMetrics'] if attributes[:'activityTimeSeriesMetrics'] raise 'You cannot provide both :activityTimeSeriesMetrics and :activity_time_series_metrics' if attributes.key?(:'activityTimeSeriesMetrics') && attributes.key?(:'activity_time_series_metrics') self.activity_time_series_metrics = attributes[:'activity_time_series_metrics'] if attributes[:'activity_time_series_metrics'] self.db_time_aggregate_metrics = attributes[:'dbTimeAggregateMetrics'] if attributes[:'dbTimeAggregateMetrics'] raise 'You cannot provide both :dbTimeAggregateMetrics and :db_time_aggregate_metrics' if attributes.key?(:'dbTimeAggregateMetrics') && attributes.key?(:'db_time_aggregate_metrics') self.db_time_aggregate_metrics = attributes[:'db_time_aggregate_metrics'] if attributes[:'db_time_aggregate_metrics'] self.io_aggregate_metrics = attributes[:'ioAggregateMetrics'] if attributes[:'ioAggregateMetrics'] raise 'You cannot provide both :ioAggregateMetrics and :io_aggregate_metrics' if attributes.key?(:'ioAggregateMetrics') && attributes.key?(:'io_aggregate_metrics') self.io_aggregate_metrics = attributes[:'io_aggregate_metrics'] if attributes[:'io_aggregate_metrics'] self.memory_aggregate_metrics = attributes[:'memoryAggregateMetrics'] if attributes[:'memoryAggregateMetrics'] raise 'You cannot provide both :memoryAggregateMetrics and :memory_aggregate_metrics' if attributes.key?(:'memoryAggregateMetrics') && attributes.key?(:'memory_aggregate_metrics') self.memory_aggregate_metrics = attributes[:'memory_aggregate_metrics'] if attributes[:'memory_aggregate_metrics'] self.cpu_utilization_aggregate_metrics = attributes[:'cpuUtilizationAggregateMetrics'] if attributes[:'cpuUtilizationAggregateMetrics'] raise 'You cannot provide both :cpuUtilizationAggregateMetrics and :cpu_utilization_aggregate_metrics' if attributes.key?(:'cpuUtilizationAggregateMetrics') && attributes.key?(:'cpu_utilization_aggregate_metrics') self.cpu_utilization_aggregate_metrics = attributes[:'cpu_utilization_aggregate_metrics'] if attributes[:'cpu_utilization_aggregate_metrics'] end |
Instance Attribute Details
#activity_time_series_metrics ⇒ Array<OCI::DatabaseManagement::Models::ActivityTimeSeriesMetrics>
[Required] A list of the active session metrics for CPU and Wait time for a specific Oracle Real Application Clusters (Oracle RAC) database instance.
31 32 33 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 31 def activity_time_series_metrics @activity_time_series_metrics end |
#cpu_utilization_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::CpuUtilizationAggregateMetrics
46 47 48 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 46 def cpu_utilization_aggregate_metrics @cpu_utilization_aggregate_metrics end |
#db_time_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::DatabaseTimeAggregateMetrics
This attribute is required.
35 36 37 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 35 def db_time_aggregate_metrics @db_time_aggregate_metrics end |
#instance_name ⇒ String
[Required] The name of the Oracle Real Application Clusters (Oracle RAC) database instance to which the corresponding metrics belong.
18 19 20 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 18 def instance_name @instance_name end |
#instance_number ⇒ Integer
[Required] The number of Oracle Real Application Clusters (Oracle RAC) database instance to which the corresponding metrics belong.
24 25 26 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 24 def instance_number @instance_number end |
#io_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::DatabaseIOAggregateMetrics
This attribute is required.
39 40 41 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 39 def io_aggregate_metrics @io_aggregate_metrics end |
#memory_aggregate_metrics ⇒ OCI::DatabaseManagement::Models::MemoryAggregateMetrics
This attribute is required.
43 44 45 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 43 def memory_aggregate_metrics @memory_aggregate_metrics end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 49 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'instance_name': :'instanceName', 'instance_number': :'instanceNumber', 'activity_time_series_metrics': :'activityTimeSeriesMetrics', 'db_time_aggregate_metrics': :'dbTimeAggregateMetrics', 'io_aggregate_metrics': :'ioAggregateMetrics', 'memory_aggregate_metrics': :'memoryAggregateMetrics', 'cpu_utilization_aggregate_metrics': :'cpuUtilizationAggregateMetrics' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'instance_name': :'String', 'instance_number': :'Integer', 'activity_time_series_metrics': :'Array<OCI::DatabaseManagement::Models::ActivityTimeSeriesMetrics>', 'db_time_aggregate_metrics': :'OCI::DatabaseManagement::Models::DatabaseTimeAggregateMetrics', 'io_aggregate_metrics': :'OCI::DatabaseManagement::Models::DatabaseIOAggregateMetrics', 'memory_aggregate_metrics': :'OCI::DatabaseManagement::Models::MemoryAggregateMetrics', 'cpu_utilization_aggregate_metrics': :'OCI::DatabaseManagement::Models::CpuUtilizationAggregateMetrics' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 147 def ==(other) return true if equal?(other) self.class == other.class && instance_name == other.instance_name && instance_number == other.instance_number && activity_time_series_metrics == other.activity_time_series_metrics && db_time_aggregate_metrics == other.db_time_aggregate_metrics && io_aggregate_metrics == other.io_aggregate_metrics && memory_aggregate_metrics == other.memory_aggregate_metrics && cpu_utilization_aggregate_metrics == other.cpu_utilization_aggregate_metrics end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 183 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
163 164 165 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 172 def hash [instance_name, instance_number, activity_time_series_metrics, db_time_aggregate_metrics, io_aggregate_metrics, memory_aggregate_metrics, cpu_utilization_aggregate_metrics].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 216 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
210 211 212 |
# File 'lib/oci/database_management/models/database_instance_home_metrics_definition.rb', line 210 def to_s to_hash.to_s end |