Class: OCI::Opsi::Models::AwrDatabaseSnapshotRangeSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::AwrDatabaseSnapshotRangeSummary
- Defined in:
- lib/oci/opsi/models/awr_database_snapshot_range_summary.rb
Overview
The summary data for a range of AWR snapshots.
Instance Attribute Summary collapse
-
#awr_source_database_identifier ⇒ String
[Required] The internal ID of the database.
-
#db_name ⇒ String
[Required] The name of the database.
-
#db_version ⇒ String
The version of the database.
-
#first_snapshot_identifier ⇒ Integer
The ID of the earliest snapshot.
-
#instance_list ⇒ Array<Integer>
The database instance numbers.
-
#latest_snapshot_identifier ⇒ 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 = {}) ⇒ AwrDatabaseSnapshotRangeSummary
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 = {}) ⇒ AwrDatabaseSnapshotRangeSummary
Initializes the object
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 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/opsi/models/awr_database_snapshot_range_summary.rb', line 126 def initialize(attributes = {}) return unless attributes.is_a?(Hash) self.awr_source_database_identifier = attributes[:'awrSourceDatabaseIdentifier'] if attributes[:'awrSourceDatabaseIdentifier'] raise 'You cannot provide both :awrSourceDatabaseIdentifier and :awr_source_database_identifier' if attributes.key?(:'awrSourceDatabaseIdentifier') && attributes.key?(:'awr_source_database_identifier') self.awr_source_database_identifier = attributes[:'awr_source_database_identifier'] if attributes[:'awr_source_database_identifier'] 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_identifier = attributes[:'firstSnapshotIdentifier'] if attributes[:'firstSnapshotIdentifier'] raise 'You cannot provide both :firstSnapshotIdentifier and :first_snapshot_identifier' if attributes.key?(:'firstSnapshotIdentifier') && attributes.key?(:'first_snapshot_identifier') self.first_snapshot_identifier = attributes[:'first_snapshot_identifier'] if attributes[:'first_snapshot_identifier'] self.latest_snapshot_identifier = attributes[:'latestSnapshotIdentifier'] if attributes[:'latestSnapshotIdentifier'] raise 'You cannot provide both :latestSnapshotIdentifier and :latest_snapshot_identifier' if attributes.key?(:'latestSnapshotIdentifier') && attributes.key?(:'latest_snapshot_identifier') self.latest_snapshot_identifier = attributes[:'latest_snapshot_identifier'] if attributes[:'latest_snapshot_identifier'] 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.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_source_database_identifier ⇒ 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: /awrHubs/awrHubId/awrDatabases
16 17 18 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 16 def awr_source_database_identifier @awr_source_database_identifier end |
#db_name ⇒ String
[Required] The name of the database.
20 21 22 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 20 def db_name @db_name end |
#db_version ⇒ String
The version of the database.
62 63 64 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 62 def db_version @db_version end |
#first_snapshot_identifier ⇒ Integer
The ID of the earliest snapshot. The snapshot identifier is not the OCID. It can be retrieved from the following endpoint: /awrHubs/awrHubId/awrDatabaseSnapshots
43 44 45 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 43 def first_snapshot_identifier @first_snapshot_identifier end |
#instance_list ⇒ Array<Integer>
The database instance numbers.
24 25 26 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 24 def instance_list @instance_list end |
#latest_snapshot_identifier ⇒ Integer
The ID of the latest snapshot. The snapshot identifier is not the OCID. It can be retrieved from the following endpoint: /awrHubs/awrHubId/awrDatabaseSnapshots
50 51 52 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 50 def latest_snapshot_identifier @latest_snapshot_identifier end |
#snapshot_count ⇒ Integer
The total number of snapshots.
54 55 56 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 54 def snapshot_count @snapshot_count end |
#snapshot_interval_in_min ⇒ Integer
The interval time between snapshots (in minutes).
58 59 60 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 58 def snapshot_interval_in_min @snapshot_interval_in_min end |
#snapshot_timezone ⇒ String
The time zone of the snapshot. sample - snapshotTimezone=+0 00:00:00
66 67 68 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 66 def snapshot_timezone @snapshot_timezone end |
#time_db_startup ⇒ DateTime
The timestamp of the database startup.
28 29 30 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 28 def time_db_startup @time_db_startup end |
#time_first_snapshot_begin ⇒ DateTime
The start time of the earliest snapshot.
32 33 34 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 32 def time_first_snapshot_begin @time_first_snapshot_begin end |
#time_latest_snapshot_end ⇒ DateTime
The end time of the latest snapshot.
36 37 38 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 36 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.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 69 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'awr_source_database_identifier': :'awrSourceDatabaseIdentifier', 'db_name': :'dbName', 'instance_list': :'instanceList', 'time_db_startup': :'timeDbStartup', 'time_first_snapshot_begin': :'timeFirstSnapshotBegin', 'time_latest_snapshot_end': :'timeLatestSnapshotEnd', 'first_snapshot_identifier': :'firstSnapshotIdentifier', 'latest_snapshot_identifier': :'latestSnapshotIdentifier', 'snapshot_count': :'snapshotCount', 'snapshot_interval_in_min': :'snapshotIntervalInMin', 'db_version': :'dbVersion', 'snapshot_timezone': :'snapshotTimezone' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'awr_source_database_identifier': :'String', 'db_name': :'String', 'instance_list': :'Array<Integer>', 'time_db_startup': :'DateTime', 'time_first_snapshot_begin': :'DateTime', 'time_latest_snapshot_end': :'DateTime', 'first_snapshot_identifier': :'Integer', 'latest_snapshot_identifier': :'Integer', 'snapshot_count': :'Integer', 'snapshot_interval_in_min': :'Integer', 'db_version': :'String', 'snapshot_timezone': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 209 def ==(other) return true if equal?(other) self.class == other.class && awr_source_database_identifier == other.awr_source_database_identifier && 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_identifier == other.first_snapshot_identifier && latest_snapshot_identifier == other.latest_snapshot_identifier && snapshot_count == other.snapshot_count && snapshot_interval_in_min == other.snapshot_interval_in_min && db_version == other.db_version && snapshot_timezone == other.snapshot_timezone end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 250 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
230 231 232 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 230 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
239 240 241 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 239 def hash [awr_source_database_identifier, db_name, instance_list, time_db_startup, time_first_snapshot_begin, time_latest_snapshot_end, first_snapshot_identifier, latest_snapshot_identifier, snapshot_count, snapshot_interval_in_min, db_version, snapshot_timezone].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 283 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
277 278 279 |
# File 'lib/oci/opsi/models/awr_database_snapshot_range_summary.rb', line 277 def to_s to_hash.to_s end |