Class: OCI::Opsi::Models::AddmDbFindingsTimeSeriesSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/opsi/models/addm_db_findings_time_series_summary.rb

Overview

ADDM findings time series data

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AddmDbFindingsTimeSeriesSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :task_id (Integer)

    The value to assign to the #task_id property

  • :task_name (String)

    The value to assign to the #task_name property

  • :finding_id (String)

    The value to assign to the #finding_id property

  • :timestamp (DateTime)

    The value to assign to the #timestamp property

  • :time_analysis_started (DateTime)

    The value to assign to the #time_analysis_started property

  • :time_analysis_ended (DateTime)

    The value to assign to the #time_analysis_ended property

  • :category_name (String)

    The value to assign to the #category_name property

  • :category_display_name (String)

    The value to assign to the #category_display_name property

  • :name (String)

    The value to assign to the #name property

  • :message (String)

    The value to assign to the #message property

  • :analysis_db_time_in_secs (Float)

    The value to assign to the #analysis_db_time_in_secs property

  • :analysis_avg_active_sessions (Float)

    The value to assign to the #analysis_avg_active_sessions property

  • :impact_db_time_in_secs (Float)

    The value to assign to the #impact_db_time_in_secs property

  • :impact_percent (Float)

    The value to assign to the #impact_percent property

  • :impact_avg_active_sessions (Float)

    The value to assign to the #impact_avg_active_sessions property



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.timestamp = 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.message = 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_sessionsFloat

DB avg active sessions for the snapshot

Returns:

  • (Float)


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_secsFloat

DB time in seconds for the snapshot

Returns:

  • (Float)


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_nameString

[Required] Category display name

Returns:

  • (String)


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_nameString

[Required] Category name

Returns:

  • (String)


41
42
43
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 41

def category_name
  @category_name
end

#finding_idString

[Required] Unique finding id

Returns:

  • (String)


25
26
27
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 25

def finding_id
  @finding_id
end

#idString

[Required] The OCID of the Database insight.

Returns:

  • (String)


13
14
15
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 13

def id
  @id
end

#impact_avg_active_sessionsFloat

[Required] Impact in terms of average active sessions

Returns:

  • (Float)


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_secsFloat

Impact in seconds

Returns:

  • (Float)


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_percentFloat

[Required] Impact in terms of percentage of total activity

Returns:

  • (Float)


69
70
71
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 69

def impact_percent
  @impact_percent
end

#messageString

[Required] Finding message

Returns:

  • (String)


53
54
55
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 53

def message
  @message
end

#nameString

[Required] Finding name

Returns:

  • (String)


49
50
51
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 49

def name
  @name
end

#task_idInteger

[Required] Unique ADDM task id

Returns:

  • (Integer)


17
18
19
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 17

def task_id
  @task_id
end

#task_nameString

[Required] ADDM task name

Returns:

  • (String)


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_endedDateTime

End Timestamp of snapshot

Returns:

  • (DateTime)


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_startedDateTime

Start Timestamp of snapshot

Returns:

  • (DateTime)


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

#timestampDateTime

[Required] Timestamp when finding was generated

Returns:

  • (DateTime)


29
30
31
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 29

def timestamp
  @timestamp
end

Class Method Details

.attribute_mapObject

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_typesObject

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.

Parameters:

  • other (Object)

    the other object to be compared



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 &&
    timestamp == other.timestamp &&
    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 &&
    message == other.message &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


264
265
266
# File 'lib/oci/opsi/models/addm_db_findings_time_series_summary.rb', line 264

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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, timestamp, time_analysis_started, time_analysis_ended, category_name, category_display_name, name, message, analysis_db_time_in_secs, analysis_avg_active_sessions, impact_db_time_in_secs, impact_percent, impact_avg_active_sessions].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation 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