Class: OCI::Opsi::Models::AwrSourceSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::AwrSourceSummary
- Defined in:
- lib/oci/opsi/models/awr_source_summary.rb
Overview
Summary of an AwrSource.
Instance Attribute Summary collapse
-
#awr_hub_id ⇒ String
[Required] AWR Hub OCID.
-
#awr_source_database_id ⇒ String
[Required] DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
-
#hours_since_last_import ⇒ Float
[Required] Number of hours since last AWR snapshots import happened from the Source database.
-
#max_snapshot_identifier ⇒ Float
[Required] The maximum snapshot identifier of the source database for which AWR data is uploaded to AWR Hub.
-
#min_snapshot_identifier ⇒ Float
[Required] The minimum snapshot identifier of the source database for which AWR data is uploaded to AWR Hub.
-
#name ⇒ String
[Required] Database name of the Source database for which AWR Data will be uploaded to AWR Hub.
-
#snapshots_uploaded ⇒ Float
[Required] Number of AWR snapshots uploaded from the Source database.
-
#time_first_snapshot_generated ⇒ DateTime
[Required] The time at which the earliest snapshot was generated in the source database for which data is uploaded to AWR Hub.
-
#time_last_snapshot_generated ⇒ DateTime
[Required] The time at which the latest snapshot was generated in the source database for which data is uploaded to AWR Hub.
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 = {}) ⇒ AwrSourceSummary
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 = {}) ⇒ AwrSourceSummary
Initializes the object
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 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 96 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_hub_id = attributes[:'awrHubId'] if attributes[:'awrHubId'] raise 'You cannot provide both :awrHubId and :awr_hub_id' if attributes.key?(:'awrHubId') && attributes.key?(:'awr_hub_id') self.awr_hub_id = attributes[:'awr_hub_id'] if attributes[:'awr_hub_id'] self.name = attributes[:'name'] if attributes[:'name'] self.awr_source_database_id = attributes[:'awrSourceDatabaseId'] if attributes[:'awrSourceDatabaseId'] raise 'You cannot provide both :awrSourceDatabaseId and :awr_source_database_id' if attributes.key?(:'awrSourceDatabaseId') && attributes.key?(:'awr_source_database_id') self.awr_source_database_id = attributes[:'awr_source_database_id'] if attributes[:'awr_source_database_id'] self.snapshots_uploaded = attributes[:'snapshotsUploaded'] if attributes[:'snapshotsUploaded'] raise 'You cannot provide both :snapshotsUploaded and :snapshots_uploaded' if attributes.key?(:'snapshotsUploaded') && attributes.key?(:'snapshots_uploaded') self.snapshots_uploaded = attributes[:'snapshots_uploaded'] if attributes[:'snapshots_uploaded'] self.min_snapshot_identifier = attributes[:'minSnapshotIdentifier'] if attributes[:'minSnapshotIdentifier'] raise 'You cannot provide both :minSnapshotIdentifier and :min_snapshot_identifier' if attributes.key?(:'minSnapshotIdentifier') && attributes.key?(:'min_snapshot_identifier') self.min_snapshot_identifier = attributes[:'min_snapshot_identifier'] if attributes[:'min_snapshot_identifier'] self.max_snapshot_identifier = attributes[:'maxSnapshotIdentifier'] if attributes[:'maxSnapshotIdentifier'] raise 'You cannot provide both :maxSnapshotIdentifier and :max_snapshot_identifier' if attributes.key?(:'maxSnapshotIdentifier') && attributes.key?(:'max_snapshot_identifier') self.max_snapshot_identifier = attributes[:'max_snapshot_identifier'] if attributes[:'max_snapshot_identifier'] self.time_first_snapshot_generated = attributes[:'timeFirstSnapshotGenerated'] if attributes[:'timeFirstSnapshotGenerated'] raise 'You cannot provide both :timeFirstSnapshotGenerated and :time_first_snapshot_generated' if attributes.key?(:'timeFirstSnapshotGenerated') && attributes.key?(:'time_first_snapshot_generated') self.time_first_snapshot_generated = attributes[:'time_first_snapshot_generated'] if attributes[:'time_first_snapshot_generated'] self.time_last_snapshot_generated = attributes[:'timeLastSnapshotGenerated'] if attributes[:'timeLastSnapshotGenerated'] raise 'You cannot provide both :timeLastSnapshotGenerated and :time_last_snapshot_generated' if attributes.key?(:'timeLastSnapshotGenerated') && attributes.key?(:'time_last_snapshot_generated') self.time_last_snapshot_generated = attributes[:'time_last_snapshot_generated'] if attributes[:'time_last_snapshot_generated'] self.hours_since_last_import = attributes[:'hoursSinceLastImport'] if attributes[:'hoursSinceLastImport'] raise 'You cannot provide both :hoursSinceLastImport and :hours_since_last_import' if attributes.key?(:'hoursSinceLastImport') && attributes.key?(:'hours_since_last_import') self.hours_since_last_import = attributes[:'hours_since_last_import'] if attributes[:'hours_since_last_import'] end |
Instance Attribute Details
#awr_hub_id ⇒ String
[Required] AWR Hub OCID
13 14 15 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 13 def awr_hub_id @awr_hub_id end |
#awr_source_database_id ⇒ String
[Required] DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
21 22 23 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 21 def awr_source_database_id @awr_source_database_id end |
#hours_since_last_import ⇒ Float
[Required] Number of hours since last AWR snapshots import happened from the Source database.
45 46 47 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 45 def hours_since_last_import @hours_since_last_import end |
#max_snapshot_identifier ⇒ Float
[Required] The maximum snapshot identifier of the source database for which AWR data is uploaded to AWR Hub.
33 34 35 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 33 def max_snapshot_identifier @max_snapshot_identifier end |
#min_snapshot_identifier ⇒ Float
[Required] The minimum snapshot identifier of the source database for which AWR data is uploaded to AWR Hub.
29 30 31 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 29 def min_snapshot_identifier @min_snapshot_identifier end |
#name ⇒ String
[Required] Database name of the Source database for which AWR Data will be uploaded to AWR Hub.
17 18 19 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 17 def name @name end |
#snapshots_uploaded ⇒ Float
[Required] Number of AWR snapshots uploaded from the Source database.
25 26 27 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 25 def snapshots_uploaded @snapshots_uploaded end |
#time_first_snapshot_generated ⇒ DateTime
[Required] The time at which the earliest snapshot was generated in the source database for which data is uploaded to AWR Hub. An RFC3339 formatted datetime string
37 38 39 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 37 def time_first_snapshot_generated @time_first_snapshot_generated end |
#time_last_snapshot_generated ⇒ DateTime
[Required] The time at which the latest snapshot was generated in the source database for which data is uploaded to AWR Hub. An RFC3339 formatted datetime string
41 42 43 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 41 def time_last_snapshot_generated @time_last_snapshot_generated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'awr_hub_id': :'awrHubId', 'name': :'name', 'awr_source_database_id': :'awrSourceDatabaseId', 'snapshots_uploaded': :'snapshotsUploaded', 'min_snapshot_identifier': :'minSnapshotIdentifier', 'max_snapshot_identifier': :'maxSnapshotIdentifier', 'time_first_snapshot_generated': :'timeFirstSnapshotGenerated', 'time_last_snapshot_generated': :'timeLastSnapshotGenerated', 'hours_since_last_import': :'hoursSinceLastImport' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'awr_hub_id': :'String', 'name': :'String', 'awr_source_database_id': :'String', 'snapshots_uploaded': :'Float', 'min_snapshot_identifier': :'Float', 'max_snapshot_identifier': :'Float', 'time_first_snapshot_generated': :'DateTime', 'time_last_snapshot_generated': :'DateTime', 'hours_since_last_import': :'Float' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 160 def ==(other) return true if equal?(other) self.class == other.class && awr_hub_id == other.awr_hub_id && name == other.name && awr_source_database_id == other.awr_source_database_id && snapshots_uploaded == other.snapshots_uploaded && min_snapshot_identifier == other.min_snapshot_identifier && max_snapshot_identifier == other.max_snapshot_identifier && time_first_snapshot_generated == other.time_first_snapshot_generated && time_last_snapshot_generated == other.time_last_snapshot_generated && hours_since_last_import == other.hours_since_last_import end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 198 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
178 179 180 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 178 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
187 188 189 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 187 def hash [awr_hub_id, name, awr_source_database_id, snapshots_uploaded, min_snapshot_identifier, max_snapshot_identifier, time_first_snapshot_generated, time_last_snapshot_generated, hours_since_last_import].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 231 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
225 226 227 |
# File 'lib/oci/opsi/models/awr_source_summary.rb', line 225 def to_s to_hash.to_s end |