Class: OCI::Opsi::Models::AddmDbFindingsTimeSeriesSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::AddmDbFindingsTimeSeriesSummary
- Defined in:
- lib/oci/opsi/models/addm_db_findings_time_series_summary.rb
Overview
ADDM findings time series data
Instance Attribute Summary collapse
-
#analysis_avg_active_sessions ⇒ Float
DB avg active sessions for the snapshot.
-
#analysis_db_time_in_secs ⇒ Float
DB time in seconds for the snapshot.
-
#category_display_name ⇒ String
[Required] Category display name.
-
#category_name ⇒ String
[Required] Category name.
-
#finding_id ⇒ String
[Required] Unique finding id.
-
#id ⇒ String
[Required] The OCID of the Database insight.
-
#impact_avg_active_sessions ⇒ Float
[Required] Impact in terms of average active sessions.
-
#impact_db_time_in_secs ⇒ Float
Impact in seconds.
-
#impact_percent ⇒ Float
[Required] Impact in terms of percentage of total activity.
-
#message ⇒ String
[Required] Finding message.
-
#name ⇒ String
[Required] Finding name.
-
#task_id ⇒ Integer
[Required] Unique ADDM task id.
-
#task_name ⇒ String
[Required] ADDM task name.
-
#time_analysis_ended ⇒ DateTime
End Timestamp of snapshot.
-
#time_analysis_started ⇒ DateTime
Start Timestamp of snapshot.
-
#timestamp ⇒ DateTime
[Required] Timestamp when finding was generated.
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 = {}) ⇒ AddmDbFindingsTimeSeriesSummary
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 = {}) ⇒ AddmDbFindingsTimeSeriesSummary
Initializes the object
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 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 145 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.id = attributes[:'id'] if attributes[:'id'] self.task_id = attributes[:'taskId'] if attributes[:'taskId'] raise 'You cannot provide both :taskId and :task_id' if attributes.key?(:'taskId') && attributes.key?(:'task_id') self.task_id = attributes[:'task_id'] if attributes[:'task_id'] self.task_name = attributes[:'taskName'] if attributes[:'taskName'] raise 'You cannot provide both :taskName and :task_name' if attributes.key?(:'taskName') && attributes.key?(:'task_name') self.task_name = attributes[:'task_name'] if attributes[:'task_name'] self.finding_id = attributes[:'findingId'] if attributes[:'findingId'] raise 'You cannot provide both :findingId and :finding_id' if attributes.key?(:'findingId') && attributes.key?(:'finding_id') self.finding_id = attributes[:'finding_id'] if attributes[:'finding_id'] self. = attributes[:'timestamp'] if attributes[:'timestamp'] self.time_analysis_started = attributes[:'timeAnalysisStarted'] if attributes[:'timeAnalysisStarted'] raise 'You cannot provide both :timeAnalysisStarted and :time_analysis_started' if attributes.key?(:'timeAnalysisStarted') && attributes.key?(:'time_analysis_started') self.time_analysis_started = attributes[:'time_analysis_started'] if attributes[:'time_analysis_started'] self.time_analysis_ended = attributes[:'timeAnalysisEnded'] if attributes[:'timeAnalysisEnded'] raise 'You cannot provide both :timeAnalysisEnded and :time_analysis_ended' if attributes.key?(:'timeAnalysisEnded') && attributes.key?(:'time_analysis_ended') self.time_analysis_ended = attributes[:'time_analysis_ended'] if attributes[:'time_analysis_ended'] self.category_name = attributes[:'categoryName'] if attributes[:'categoryName'] raise 'You cannot provide both :categoryName and :category_name' if attributes.key?(:'categoryName') && attributes.key?(:'category_name') self.category_name = attributes[:'category_name'] if attributes[:'category_name'] self.category_display_name = attributes[:'categoryDisplayName'] if attributes[:'categoryDisplayName'] raise 'You cannot provide both :categoryDisplayName and :category_display_name' if attributes.key?(:'categoryDisplayName') && attributes.key?(:'category_display_name') self.category_display_name = attributes[:'category_display_name'] if attributes[:'category_display_name'] self.name = attributes[:'name'] if attributes[:'name'] self. = attributes[:'message'] if attributes[:'message'] self.analysis_db_time_in_secs = attributes[:'analysisDbTimeInSecs'] if attributes[:'analysisDbTimeInSecs'] raise 'You cannot provide both :analysisDbTimeInSecs and :analysis_db_time_in_secs' if attributes.key?(:'analysisDbTimeInSecs') && attributes.key?(:'analysis_db_time_in_secs') self.analysis_db_time_in_secs = attributes[:'analysis_db_time_in_secs'] if attributes[:'analysis_db_time_in_secs'] self.analysis_avg_active_sessions = attributes[:'analysisAvgActiveSessions'] if attributes[:'analysisAvgActiveSessions'] raise 'You cannot provide both :analysisAvgActiveSessions and :analysis_avg_active_sessions' if attributes.key?(:'analysisAvgActiveSessions') && attributes.key?(:'analysis_avg_active_sessions') self.analysis_avg_active_sessions = attributes[:'analysis_avg_active_sessions'] if attributes[:'analysis_avg_active_sessions'] self.impact_db_time_in_secs = attributes[:'impactDbTimeInSecs'] if attributes[:'impactDbTimeInSecs'] raise 'You cannot provide both :impactDbTimeInSecs and :impact_db_time_in_secs' if attributes.key?(:'impactDbTimeInSecs') && attributes.key?(:'impact_db_time_in_secs') self.impact_db_time_in_secs = attributes[:'impact_db_time_in_secs'] if attributes[:'impact_db_time_in_secs'] self.impact_percent = attributes[:'impactPercent'] if attributes[:'impactPercent'] raise 'You cannot provide both :impactPercent and :impact_percent' if attributes.key?(:'impactPercent') && attributes.key?(:'impact_percent') self.impact_percent = attributes[:'impact_percent'] if attributes[:'impact_percent'] self.impact_avg_active_sessions = attributes[:'impactAvgActiveSessions'] if attributes[:'impactAvgActiveSessions'] raise 'You cannot provide both :impactAvgActiveSessions and :impact_avg_active_sessions' if attributes.key?(:'impactAvgActiveSessions') && attributes.key?(:'impact_avg_active_sessions') self.impact_avg_active_sessions = attributes[:'impact_avg_active_sessions'] if attributes[:'impact_avg_active_sessions'] end |
Instance Attribute Details
#analysis_avg_active_sessions ⇒ Float
DB avg active sessions for the snapshot
61 62 63 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 61 def analysis_avg_active_sessions @analysis_avg_active_sessions end |
#analysis_db_time_in_secs ⇒ Float
DB time in seconds for the snapshot
57 58 59 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 57 def analysis_db_time_in_secs @analysis_db_time_in_secs end |
#category_display_name ⇒ String
[Required] Category display name
45 46 47 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 45 def category_display_name @category_display_name end |
#category_name ⇒ String
[Required] Category name
41 42 43 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 41 def category_name @category_name end |
#finding_id ⇒ String
[Required] Unique finding id
25 26 27 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 25 def finding_id @finding_id end |
#id ⇒ String
[Required] The OCID of the Database insight.
13 14 15 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 13 def id @id end |
#impact_avg_active_sessions ⇒ Float
[Required] Impact in terms of average active sessions
73 74 75 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 73 def impact_avg_active_sessions @impact_avg_active_sessions end |
#impact_db_time_in_secs ⇒ Float
Impact in seconds
65 66 67 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 65 def impact_db_time_in_secs @impact_db_time_in_secs end |
#impact_percent ⇒ Float
[Required] Impact in terms of percentage of total activity
69 70 71 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 69 def impact_percent @impact_percent end |
#message ⇒ String
[Required] Finding message
53 54 55 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 53 def @message end |
#name ⇒ String
[Required] Finding name
49 50 51 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 49 def name @name end |
#task_id ⇒ Integer
[Required] Unique ADDM task id
17 18 19 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 17 def task_id @task_id end |
#task_name ⇒ String
[Required] ADDM task name
21 22 23 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 21 def task_name @task_name end |
#time_analysis_ended ⇒ DateTime
End Timestamp of snapshot
37 38 39 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 37 def time_analysis_ended @time_analysis_ended end |
#time_analysis_started ⇒ DateTime
Start Timestamp of snapshot
33 34 35 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 33 def time_analysis_started @time_analysis_started end |
#timestamp ⇒ DateTime
[Required] Timestamp when finding was generated
29 30 31 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 29 def @timestamp end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'task_id': :'taskId', 'task_name': :'taskName', 'finding_id': :'findingId', 'timestamp': :'timestamp', 'time_analysis_started': :'timeAnalysisStarted', 'time_analysis_ended': :'timeAnalysisEnded', 'category_name': :'categoryName', 'category_display_name': :'categoryDisplayName', 'name': :'name', 'message': :'message', 'analysis_db_time_in_secs': :'analysisDbTimeInSecs', 'analysis_avg_active_sessions': :'analysisAvgActiveSessions', 'impact_db_time_in_secs': :'impactDbTimeInSecs', 'impact_percent': :'impactPercent', 'impact_avg_active_sessions': :'impactAvgActiveSessions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 100 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'task_id': :'Integer', 'task_name': :'String', 'finding_id': :'String', 'timestamp': :'DateTime', 'time_analysis_started': :'DateTime', 'time_analysis_ended': :'DateTime', 'category_name': :'String', 'category_display_name': :'String', 'name': :'String', 'message': :'String', 'analysis_db_time_in_secs': :'Float', 'analysis_avg_active_sessions': :'Float', 'impact_db_time_in_secs': :'Float', 'impact_percent': :'Float', 'impact_avg_active_sessions': :'Float' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 239 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && task_id == other.task_id && task_name == other.task_name && finding_id == other.finding_id && == other. && time_analysis_started == other.time_analysis_started && time_analysis_ended == other.time_analysis_ended && category_name == other.category_name && category_display_name == other.category_display_name && name == other.name && == other. && analysis_db_time_in_secs == other.analysis_db_time_in_secs && analysis_avg_active_sessions == other.analysis_avg_active_sessions && impact_db_time_in_secs == other.impact_db_time_in_secs && impact_percent == other.impact_percent && impact_avg_active_sessions == other.impact_avg_active_sessions end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 284 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
264 265 266 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 264 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
273 274 275 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 273 def hash [id, task_id, task_name, finding_id, , time_analysis_started, time_analysis_ended, category_name, category_display_name, name, , analysis_db_time_in_secs, analysis_avg_active_sessions, impact_db_time_in_secs, impact_percent, impact_avg_active_sessions].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 317 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
311 312 313 |
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 311 def to_s to_hash.to_s end |