Class: OCI::DatabaseManagement::Models::PerformanceMetricsData
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::PerformanceMetricsData
- Defined in:
- lib/oci/database_management/models/performance_metrics_data.rb
Overview
The list of Data Guard performance metrics for Managed Databases.
Constant Summary collapse
- DB_ROLE_ENUM =
[ DB_ROLE_SNAPSHOT_STANDBY = 'SNAPSHOT_STANDBY'.freeze, DB_ROLE_LOGICAL_STANDBY = 'LOGICAL_STANDBY'.freeze, DB_ROLE_PHYSICAL_STANDBY = 'PHYSICAL_STANDBY'.freeze, DB_ROLE_PRIMARY = 'PRIMARY'.freeze, DB_ROLE_FAR_SYNC = 'FAR_SYNC'.freeze, DB_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
The OCID of the compartment in which the Managed Database resides.
-
#database_id ⇒ String
The database ID of the Managed Database.
-
#db_role ⇒ String
The database role of the Managed Database.
-
#db_unique_name ⇒ String
The database unique name of the Managed Database.
-
#deployment_type ⇒ String
The deployment type of the Managed Database.
-
#metrics ⇒ Array<OCI::DatabaseManagement::Models::PerformanceMetrics>
The list of Data Guard performance metrics such as ApplyLag, TransportLag and RedoApplyRate for the Managed Databases.
-
#primary_db_id ⇒ String
The ID of the primary database.
-
#primary_db_unique_name ⇒ String
The primary database unique name of the Managed Database.
-
#resource_id ⇒ String
The OCID of the Managed Database.
-
#resource_name ⇒ String
The resource name of the Managed 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 = {}) ⇒ PerformanceMetricsData
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 = {}) ⇒ PerformanceMetricsData
Initializes the object
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 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 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 113 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.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] self.primary_db_id = attributes[:'primaryDbId'] if attributes[:'primaryDbId'] raise 'You cannot provide both :primaryDbId and :primary_db_id' if attributes.key?(:'primaryDbId') && attributes.key?(:'primary_db_id') self.primary_db_id = attributes[:'primary_db_id'] if attributes[:'primary_db_id'] self.primary_db_unique_name = attributes[:'primaryDbUniqueName'] if attributes[:'primaryDbUniqueName'] raise 'You cannot provide both :primaryDbUniqueName and :primary_db_unique_name' if attributes.key?(:'primaryDbUniqueName') && attributes.key?(:'primary_db_unique_name') self.primary_db_unique_name = attributes[:'primary_db_unique_name'] if attributes[:'primary_db_unique_name'] self.database_id = attributes[:'databaseId'] if attributes[:'databaseId'] raise 'You cannot provide both :databaseId and :database_id' if attributes.key?(:'databaseId') && attributes.key?(:'database_id') self.database_id = attributes[:'database_id'] if attributes[:'database_id'] self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName'] raise 'You cannot provide both :dbUniqueName and :db_unique_name' if attributes.key?(:'dbUniqueName') && attributes.key?(:'db_unique_name') self.db_unique_name = attributes[:'db_unique_name'] if attributes[:'db_unique_name'] self.deployment_type = attributes[:'deploymentType'] if attributes[:'deploymentType'] raise 'You cannot provide both :deploymentType and :deployment_type' if attributes.key?(:'deploymentType') && attributes.key?(:'deployment_type') self.deployment_type = attributes[:'deployment_type'] if attributes[:'deployment_type'] self.resource_name = attributes[:'resourceName'] if attributes[:'resourceName'] raise 'You cannot provide both :resourceName and :resource_name' if attributes.key?(:'resourceName') && attributes.key?(:'resource_name') self.resource_name = attributes[:'resource_name'] if attributes[:'resource_name'] self.db_role = attributes[:'dbRole'] if attributes[:'dbRole'] raise 'You cannot provide both :dbRole and :db_role' if attributes.key?(:'dbRole') && attributes.key?(:'db_role') self.db_role = attributes[:'db_role'] if attributes[:'db_role'] self.metrics = attributes[:'metrics'] if attributes[:'metrics'] end |
Instance Attribute Details
#compartment_id ⇒ String
The OCID of the compartment in which the Managed Database resides.
23 24 25 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 23 def compartment_id @compartment_id end |
#database_id ⇒ String
The database ID of the Managed Database. Every database had its own ID and that value is captured here.
39 40 41 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 39 def database_id @database_id end |
#db_role ⇒ String
The database role of the Managed Database.
55 56 57 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 55 def db_role @db_role end |
#db_unique_name ⇒ String
The database unique name of the Managed Database.
43 44 45 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 43 def db_unique_name @db_unique_name end |
#deployment_type ⇒ String
The deployment type of the Managed Database.
47 48 49 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 47 def deployment_type @deployment_type end |
#metrics ⇒ Array<OCI::DatabaseManagement::Models::PerformanceMetrics>
The list of Data Guard performance metrics such as ApplyLag, TransportLag and RedoApplyRate for the Managed Databases.
59 60 61 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 59 def metrics @metrics end |
#primary_db_id ⇒ String
The ID of the primary database.
31 32 33 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 31 def primary_db_id @primary_db_id end |
#primary_db_unique_name ⇒ String
The primary database unique name of the Managed Database.
35 36 37 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 35 def primary_db_unique_name @primary_db_unique_name end |
#resource_id ⇒ String
The OCID of the Managed Database.
27 28 29 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 27 def resource_id @resource_id end |
#resource_name ⇒ String
The resource name of the Managed Database.
51 52 53 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 51 def resource_name @resource_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'resource_id': :'resourceId', 'primary_db_id': :'primaryDbId', 'primary_db_unique_name': :'primaryDbUniqueName', 'database_id': :'databaseId', 'db_unique_name': :'dbUniqueName', 'deployment_type': :'deploymentType', 'resource_name': :'resourceName', 'db_role': :'dbRole', 'metrics': :'metrics' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'resource_id': :'String', 'primary_db_id': :'String', 'primary_db_unique_name': :'String', 'database_id': :'String', 'db_unique_name': :'String', 'deployment_type': :'String', 'resource_name': :'String', 'db_role': :'String', 'metrics': :'Array<OCI::DatabaseManagement::Models::PerformanceMetrics>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 196 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && resource_id == other.resource_id && primary_db_id == other.primary_db_id && primary_db_unique_name == other.primary_db_unique_name && database_id == other.database_id && db_unique_name == other.db_unique_name && deployment_type == other.deployment_type && resource_name == other.resource_name && db_role == other.db_role && metrics == other.metrics end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 235 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
215 216 217 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 215 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
224 225 226 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 224 def hash [compartment_id, resource_id, primary_db_id, primary_db_unique_name, database_id, db_unique_name, deployment_type, resource_name, db_role, metrics].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
268 269 270 271 272 273 274 275 276 277 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 268 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
262 263 264 |
# File 'lib/oci/database_management/models/performance_metrics_data.rb', line 262 def to_s to_hash.to_s end |