Class: OCI::DatabaseManagement::Models::AwrDbSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::AwrDbSummary
- Defined in:
- lib/oci/database_management/models/awr_db_summary.rb
Overview
The AWR summary for a database.
Instance Attribute Summary collapse
-
#awr_db_id ⇒ String
[Required] The internal ID of the database.
-
#container_id ⇒ Integer
ID of the database container.
-
#db_name ⇒ String
[Required] The name of the database.
-
#db_unique_name ⇒ String
The unique name of the database.
-
#db_version ⇒ String
The version of the database.
-
#first_snapshot_id ⇒ Integer
The ID of the earliest snapshot.
-
#instance_list ⇒ Array<Integer>
The database instance numbers.
-
#latest_snapshot_id ⇒ Integer
The ID of the latest snapshot.
-
#snapshot_count ⇒ Integer
The total number of snapshots.
-
#snapshot_interval_in_min ⇒ Integer
The interval time between snapshots (in minutes).
-
#snapshot_timezone ⇒ String
The time zone of the snapshot.
-
#src_db_id ⇒ String
The internal ID of the database where the AWR snapshot data was collected.
-
#src_db_name ⇒ String
The name of the database where the AWR snapshot data was collected.
-
#time_db_startup ⇒ DateTime
The timestamp of the database startup.
-
#time_first_snapshot_begin ⇒ DateTime
The start time of the earliest snapshot.
-
#time_latest_snapshot_end ⇒ DateTime
The end time of the latest snapshot.
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 = {}) ⇒ AwrDbSummary
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 = {}) ⇒ AwrDbSummary
Initializes the object
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 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 157 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.awr_db_id = attributes[:'awrDbId'] if attributes[:'awrDbId'] raise 'You cannot provide both :awrDbId and :awr_db_id' if attributes.key?(:'awrDbId') && attributes.key?(:'awr_db_id') self.awr_db_id = attributes[:'awr_db_id'] if attributes[:'awr_db_id'] self.db_name = attributes[:'dbName'] if attributes[:'dbName'] raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name') self.db_name = attributes[:'db_name'] if attributes[:'db_name'] 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.src_db_id = attributes[:'srcDbId'] if attributes[:'srcDbId'] raise 'You cannot provide both :srcDbId and :src_db_id' if attributes.key?(:'srcDbId') && attributes.key?(:'src_db_id') self.src_db_id = attributes[:'src_db_id'] if attributes[:'src_db_id'] self.src_db_name = attributes[:'srcDbName'] if attributes[:'srcDbName'] raise 'You cannot provide both :srcDbName and :src_db_name' if attributes.key?(:'srcDbName') && attributes.key?(:'src_db_name') self.src_db_name = attributes[:'src_db_name'] if attributes[:'src_db_name'] self.instance_list = attributes[:'instanceList'] if attributes[:'instanceList'] raise 'You cannot provide both :instanceList and :instance_list' if attributes.key?(:'instanceList') && attributes.key?(:'instance_list') self.instance_list = attributes[:'instance_list'] if attributes[:'instance_list'] self.time_db_startup = attributes[:'timeDbStartup'] if attributes[:'timeDbStartup'] raise 'You cannot provide both :timeDbStartup and :time_db_startup' if attributes.key?(:'timeDbStartup') && attributes.key?(:'time_db_startup') self.time_db_startup = attributes[:'time_db_startup'] if attributes[:'time_db_startup'] self.time_first_snapshot_begin = attributes[:'timeFirstSnapshotBegin'] if attributes[:'timeFirstSnapshotBegin'] raise 'You cannot provide both :timeFirstSnapshotBegin and :time_first_snapshot_begin' if attributes.key?(:'timeFirstSnapshotBegin') && attributes.key?(:'time_first_snapshot_begin') self.time_first_snapshot_begin = attributes[:'time_first_snapshot_begin'] if attributes[:'time_first_snapshot_begin'] self.time_latest_snapshot_end = attributes[:'timeLatestSnapshotEnd'] if attributes[:'timeLatestSnapshotEnd'] raise 'You cannot provide both :timeLatestSnapshotEnd and :time_latest_snapshot_end' if attributes.key?(:'timeLatestSnapshotEnd') && attributes.key?(:'time_latest_snapshot_end') self.time_latest_snapshot_end = attributes[:'time_latest_snapshot_end'] if attributes[:'time_latest_snapshot_end'] self.first_snapshot_id = attributes[:'firstSnapshotId'] if attributes[:'firstSnapshotId'] raise 'You cannot provide both :firstSnapshotId and :first_snapshot_id' if attributes.key?(:'firstSnapshotId') && attributes.key?(:'first_snapshot_id') self.first_snapshot_id = attributes[:'first_snapshot_id'] if attributes[:'first_snapshot_id'] self.latest_snapshot_id = attributes[:'latestSnapshotId'] if attributes[:'latestSnapshotId'] raise 'You cannot provide both :latestSnapshotId and :latest_snapshot_id' if attributes.key?(:'latestSnapshotId') && attributes.key?(:'latest_snapshot_id') self.latest_snapshot_id = attributes[:'latest_snapshot_id'] if attributes[:'latest_snapshot_id'] self.snapshot_count = attributes[:'snapshotCount'] if attributes[:'snapshotCount'] raise 'You cannot provide both :snapshotCount and :snapshot_count' if attributes.key?(:'snapshotCount') && attributes.key?(:'snapshot_count') self.snapshot_count = attributes[:'snapshot_count'] if attributes[:'snapshot_count'] self.snapshot_interval_in_min = attributes[:'snapshotIntervalInMin'] if attributes[:'snapshotIntervalInMin'] raise 'You cannot provide both :snapshotIntervalInMin and :snapshot_interval_in_min' if attributes.key?(:'snapshotIntervalInMin') && attributes.key?(:'snapshot_interval_in_min') self.snapshot_interval_in_min = attributes[:'snapshot_interval_in_min'] if attributes[:'snapshot_interval_in_min'] self.container_id = attributes[:'containerId'] if attributes[:'containerId'] raise 'You cannot provide both :containerId and :container_id' if attributes.key?(:'containerId') && attributes.key?(:'container_id') self.container_id = attributes[:'container_id'] if attributes[:'container_id'] self.db_version = attributes[:'dbVersion'] if attributes[:'dbVersion'] raise 'You cannot provide both :dbVersion and :db_version' if attributes.key?(:'dbVersion') && attributes.key?(:'db_version') self.db_version = attributes[:'db_version'] if attributes[:'db_version'] self.snapshot_timezone = attributes[:'snapshotTimezone'] if attributes[:'snapshotTimezone'] raise 'You cannot provide both :snapshotTimezone and :snapshot_timezone' if attributes.key?(:'snapshotTimezone') && attributes.key?(:'snapshot_timezone') self.snapshot_timezone = attributes[:'snapshot_timezone'] if attributes[:'snapshot_timezone'] end |
Instance Attribute Details
#awr_db_id ⇒ String
[Required] The internal ID of the database. The internal ID of the database is not the OCID. It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs
16 17 18 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 16 def awr_db_id @awr_db_id end |
#container_id ⇒ Integer
ID of the database container. The database container ID is not the OCID. It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges
77 78 79 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 77 def container_id @container_id end |
#db_name ⇒ String
[Required] The name of the database.
20 21 22 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 20 def db_name @db_name end |
#db_unique_name ⇒ String
The unique name of the database.
24 25 26 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 24 def db_unique_name @db_unique_name end |
#db_version ⇒ String
The version of the database.
81 82 83 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 81 def db_version @db_version end |
#first_snapshot_id ⇒ Integer
The ID of the earliest snapshot. The snapshot ID is not the OCID. It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbSnapshots
55 56 57 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 55 def first_snapshot_id @first_snapshot_id end |
#instance_list ⇒ Array<Integer>
The database instance numbers.
36 37 38 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 36 def instance_list @instance_list end |
#latest_snapshot_id ⇒ Integer
The ID of the latest snapshot. The snapshot ID is not the OCID. It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbSnapshots
62 63 64 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 62 def latest_snapshot_id @latest_snapshot_id end |
#snapshot_count ⇒ Integer
The total number of snapshots.
66 67 68 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 66 def snapshot_count @snapshot_count end |
#snapshot_interval_in_min ⇒ Integer
The interval time between snapshots (in minutes).
70 71 72 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 70 def snapshot_interval_in_min @snapshot_interval_in_min end |
#snapshot_timezone ⇒ String
The time zone of the snapshot.
85 86 87 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 85 def snapshot_timezone @snapshot_timezone end |
#src_db_id ⇒ String
The internal ID of the database where the AWR snapshot data was collected.
28 29 30 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 28 def src_db_id @src_db_id end |
#src_db_name ⇒ String
The name of the database where the AWR snapshot data was collected.
32 33 34 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 32 def src_db_name @src_db_name end |
#time_db_startup ⇒ DateTime
The timestamp of the database startup.
40 41 42 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 40 def time_db_startup @time_db_startup end |
#time_first_snapshot_begin ⇒ DateTime
The start time of the earliest snapshot.
44 45 46 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 44 def time_first_snapshot_begin @time_first_snapshot_begin end |
#time_latest_snapshot_end ⇒ DateTime
The end time of the latest snapshot.
48 49 50 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 48 def time_latest_snapshot_end @time_latest_snapshot_end end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 88 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'awr_db_id': :'awrDbId', 'db_name': :'dbName', 'db_unique_name': :'dbUniqueName', 'src_db_id': :'srcDbId', 'src_db_name': :'srcDbName', 'instance_list': :'instanceList', 'time_db_startup': :'timeDbStartup', 'time_first_snapshot_begin': :'timeFirstSnapshotBegin', 'time_latest_snapshot_end': :'timeLatestSnapshotEnd', 'first_snapshot_id': :'firstSnapshotId', 'latest_snapshot_id': :'latestSnapshotId', 'snapshot_count': :'snapshotCount', 'snapshot_interval_in_min': :'snapshotIntervalInMin', 'container_id': :'containerId', 'db_version': :'dbVersion', 'snapshot_timezone': :'snapshotTimezone' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 112 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'awr_db_id': :'String', 'db_name': :'String', 'db_unique_name': :'String', 'src_db_id': :'String', 'src_db_name': :'String', 'instance_list': :'Array<Integer>', 'time_db_startup': :'DateTime', 'time_first_snapshot_begin': :'DateTime', 'time_latest_snapshot_end': :'DateTime', 'first_snapshot_id': :'Integer', 'latest_snapshot_id': :'Integer', 'snapshot_count': :'Integer', 'snapshot_interval_in_min': :'Integer', 'container_id': :'Integer', 'db_version': :'String', 'snapshot_timezone': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 267 def ==(other) return true if equal?(other) self.class == other.class && awr_db_id == other.awr_db_id && db_name == other.db_name && db_unique_name == other.db_unique_name && src_db_id == other.src_db_id && src_db_name == other.src_db_name && instance_list == other.instance_list && time_db_startup == other.time_db_startup && time_first_snapshot_begin == other.time_first_snapshot_begin && time_latest_snapshot_end == other.time_latest_snapshot_end && first_snapshot_id == other.first_snapshot_id && latest_snapshot_id == other.latest_snapshot_id && snapshot_count == other.snapshot_count && snapshot_interval_in_min == other.snapshot_interval_in_min && container_id == other.container_id && db_version == other.db_version && snapshot_timezone == other.snapshot_timezone end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 312 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
292 293 294 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 292 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
301 302 303 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 301 def hash [awr_db_id, db_name, db_unique_name, src_db_id, src_db_name, instance_list, time_db_startup, time_first_snapshot_begin, time_latest_snapshot_end, first_snapshot_id, latest_snapshot_id, snapshot_count, snapshot_interval_in_min, container_id, db_version, snapshot_timezone].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
345 346 347 348 349 350 351 352 353 354 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 345 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
339 340 341 |
# File 'lib/oci/database_management/models/awr_db_summary.rb', line 339 def to_s to_hash.to_s end |