Class: OCI::DatabaseManagement::Models::AwrDbSnapshotRangeSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::AwrDbSnapshotRangeSummary
- Defined in:
- lib/oci/database_management/models/awr_db_snapshot_range_summary.rb
Overview
The summary data for a range of AWR snapshots.
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_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.
-
#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 = {}) ⇒ AwrDbSnapshotRangeSummary
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 = {}) ⇒ AwrDbSnapshotRangeSummary
Initializes the object
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 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 135 def initialize(attributes = {}) return unless attributes.is_a?(Hash) 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.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](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs
15 16 17 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 15 def awr_db_id @awr_db_id end |
#container_id ⇒ Integer
ID of the database container. The database container ID is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges
64 65 66 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 64 def container_id @container_id end |
#db_name ⇒ String
[Required] The name of the database.
19 20 21 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 19 def db_name @db_name end |
#db_version ⇒ String
The version of the database.
68 69 70 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 68 def db_version @db_version end |
#first_snapshot_id ⇒ Integer
The ID of the earliest snapshot. The snapshot ID is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbSnapshots
42 43 44 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 42 def first_snapshot_id @first_snapshot_id end |
#instance_list ⇒ Array<Integer>
The database instance numbers.
23 24 25 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 23 def instance_list @instance_list end |
#latest_snapshot_id ⇒ Integer
The ID of the latest snapshot. The snapshot ID is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbSnapshots
49 50 51 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 49 def latest_snapshot_id @latest_snapshot_id end |
#snapshot_count ⇒ Integer
The total number of snapshots.
53 54 55 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 53 def snapshot_count @snapshot_count end |
#snapshot_interval_in_min ⇒ Integer
The interval time between snapshots (in minutes).
57 58 59 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 57 def snapshot_interval_in_min @snapshot_interval_in_min end |
#snapshot_timezone ⇒ String
The time zone of the snapshot.
72 73 74 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 72 def snapshot_timezone @snapshot_timezone end |
#time_db_startup ⇒ DateTime
The timestamp of the database startup.
27 28 29 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 27 def time_db_startup @time_db_startup end |
#time_first_snapshot_begin ⇒ DateTime
The start time of the earliest snapshot.
31 32 33 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 31 def time_first_snapshot_begin @time_first_snapshot_begin end |
#time_latest_snapshot_end ⇒ DateTime
The end time of the latest snapshot.
35 36 37 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 35 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.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'awr_db_id': :'awrDbId', 'db_name': :'dbName', '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.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 96 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'awr_db_id': :'String', '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.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 224 def ==(other) return true if equal?(other) self.class == other.class && awr_db_id == other.awr_db_id && db_name == other.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
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 266 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
246 247 248 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 246 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
255 256 257 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 255 def hash [awr_db_id, 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
299 300 301 302 303 304 305 306 307 308 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 299 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
293 294 295 |
# File 'lib/oci/database_management/models/awr_db_snapshot_range_summary.rb', line 293 def to_s to_hash.to_s end |