Class: OCI::LogAnalytics::Models::LogAnalyticsWarning

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/log_analytics/models/log_analytics_warning.rb

Overview

LogAnalyticsWarning

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogAnalyticsWarning

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :agent_id (String)

    The value to assign to the #agent_id property

  • :host_name (String)

    The value to assign to the #host_name property

  • :rule_display_name (String)

    The value to assign to the #rule_display_name property

  • :source_name (String)

    The value to assign to the #source_name property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :source_display_name (String)

    The value to assign to the #source_display_name property

  • :entity_name (String)

    The value to assign to the #entity_name property

  • :time_collected (DateTime)

    The value to assign to the #time_collected property

  • :warning_id (String)

    The value to assign to the #warning_id property

  • :time_of_initial_warning (DateTime)

    The value to assign to the #time_of_initial_warning property

  • :is_active (BOOLEAN)

    The value to assign to the #is_active property

  • :is_suppressed (BOOLEAN)

    The value to assign to the #is_suppressed property

  • :time_of_latest_warning (DateTime)

    The value to assign to the #time_of_latest_warning property

  • :warning_level (String)

    The value to assign to the #warning_level property

  • :warning_message (String)

    The value to assign to the #warning_message property

  • :pattern_id (String)

    The value to assign to the #pattern_id property

  • :pattern_text (String)

    The value to assign to the #pattern_text property

  • :rule_id (String)

    The value to assign to the #rule_id property

  • :source_id (String)

    The value to assign to the #source_id property

  • :suppressed_by (String)

    The value to assign to the #suppressed_by property

  • :entity_id (String)

    The value to assign to the #entity_id property

  • :entity_type (String)

    The value to assign to the #entity_type property

  • :entity_type_display_name (String)

    The value to assign to the #entity_type_display_name property

  • :type_display_name (String)

    The value to assign to the #type_display_name property

  • :type_name (String)

    The value to assign to the #type_name property

  • :severity (Integer)

    The value to assign to the #severity property



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 218

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.agent_id = attributes[:'agentId'] if attributes[:'agentId']

  raise 'You cannot provide both :agentId and :agent_id' if attributes.key?(:'agentId') && attributes.key?(:'agent_id')

  self.agent_id = attributes[:'agent_id'] if attributes[:'agent_id']

  self.host_name = attributes[:'hostName'] if attributes[:'hostName']

  raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name')

  self.host_name = attributes[:'host_name'] if attributes[:'host_name']

  self.rule_display_name = attributes[:'ruleDisplayName'] if attributes[:'ruleDisplayName']

  raise 'You cannot provide both :ruleDisplayName and :rule_display_name' if attributes.key?(:'ruleDisplayName') && attributes.key?(:'rule_display_name')

  self.rule_display_name = attributes[:'rule_display_name'] if attributes[:'rule_display_name']

  self.source_name = attributes[:'sourceName'] if attributes[:'sourceName']

  raise 'You cannot provide both :sourceName and :source_name' if attributes.key?(:'sourceName') && attributes.key?(:'source_name')

  self.source_name = attributes[:'source_name'] if attributes[:'source_name']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.source_display_name = attributes[:'sourceDisplayName'] if attributes[:'sourceDisplayName']

  raise 'You cannot provide both :sourceDisplayName and :source_display_name' if attributes.key?(:'sourceDisplayName') && attributes.key?(:'source_display_name')

  self.source_display_name = attributes[:'source_display_name'] if attributes[:'source_display_name']

  self.entity_name = attributes[:'entityName'] if attributes[:'entityName']

  raise 'You cannot provide both :entityName and :entity_name' if attributes.key?(:'entityName') && attributes.key?(:'entity_name')

  self.entity_name = attributes[:'entity_name'] if attributes[:'entity_name']

  self.time_collected = attributes[:'timeCollected'] if attributes[:'timeCollected']

  raise 'You cannot provide both :timeCollected and :time_collected' if attributes.key?(:'timeCollected') && attributes.key?(:'time_collected')

  self.time_collected = attributes[:'time_collected'] if attributes[:'time_collected']

  self.warning_id = attributes[:'warningId'] if attributes[:'warningId']

  raise 'You cannot provide both :warningId and :warning_id' if attributes.key?(:'warningId') && attributes.key?(:'warning_id')

  self.warning_id = attributes[:'warning_id'] if attributes[:'warning_id']

  self.time_of_initial_warning = attributes[:'timeOfInitialWarning'] if attributes[:'timeOfInitialWarning']

  raise 'You cannot provide both :timeOfInitialWarning and :time_of_initial_warning' if attributes.key?(:'timeOfInitialWarning') && attributes.key?(:'time_of_initial_warning')

  self.time_of_initial_warning = attributes[:'time_of_initial_warning'] if attributes[:'time_of_initial_warning']

  self.is_active = attributes[:'isActive'] unless attributes[:'isActive'].nil?

  raise 'You cannot provide both :isActive and :is_active' if attributes.key?(:'isActive') && attributes.key?(:'is_active')

  self.is_active = attributes[:'is_active'] unless attributes[:'is_active'].nil?

  self.is_suppressed = attributes[:'isSuppressed'] unless attributes[:'isSuppressed'].nil?

  raise 'You cannot provide both :isSuppressed and :is_suppressed' if attributes.key?(:'isSuppressed') && attributes.key?(:'is_suppressed')

  self.is_suppressed = attributes[:'is_suppressed'] unless attributes[:'is_suppressed'].nil?

  self.time_of_latest_warning = attributes[:'timeOfLatestWarning'] if attributes[:'timeOfLatestWarning']

  raise 'You cannot provide both :timeOfLatestWarning and :time_of_latest_warning' if attributes.key?(:'timeOfLatestWarning') && attributes.key?(:'time_of_latest_warning')

  self.time_of_latest_warning = attributes[:'time_of_latest_warning'] if attributes[:'time_of_latest_warning']

  self.warning_level = attributes[:'warningLevel'] if attributes[:'warningLevel']

  raise 'You cannot provide both :warningLevel and :warning_level' if attributes.key?(:'warningLevel') && attributes.key?(:'warning_level')

  self.warning_level = attributes[:'warning_level'] if attributes[:'warning_level']

  self.warning_message = attributes[:'warningMessage'] if attributes[:'warningMessage']

  raise 'You cannot provide both :warningMessage and :warning_message' if attributes.key?(:'warningMessage') && attributes.key?(:'warning_message')

  self.warning_message = attributes[:'warning_message'] if attributes[:'warning_message']

  self.pattern_id = attributes[:'patternId'] if attributes[:'patternId']

  raise 'You cannot provide both :patternId and :pattern_id' if attributes.key?(:'patternId') && attributes.key?(:'pattern_id')

  self.pattern_id = attributes[:'pattern_id'] if attributes[:'pattern_id']

  self.pattern_text = attributes[:'patternText'] if attributes[:'patternText']

  raise 'You cannot provide both :patternText and :pattern_text' if attributes.key?(:'patternText') && attributes.key?(:'pattern_text')

  self.pattern_text = attributes[:'pattern_text'] if attributes[:'pattern_text']

  self.rule_id = attributes[:'ruleId'] if attributes[:'ruleId']

  raise 'You cannot provide both :ruleId and :rule_id' if attributes.key?(:'ruleId') && attributes.key?(:'rule_id')

  self.rule_id = attributes[:'rule_id'] if attributes[:'rule_id']

  self.source_id = attributes[:'sourceId'] if attributes[:'sourceId']

  raise 'You cannot provide both :sourceId and :source_id' if attributes.key?(:'sourceId') && attributes.key?(:'source_id')

  self.source_id = attributes[:'source_id'] if attributes[:'source_id']

  self.suppressed_by = attributes[:'suppressedBy'] if attributes[:'suppressedBy']

  raise 'You cannot provide both :suppressedBy and :suppressed_by' if attributes.key?(:'suppressedBy') && attributes.key?(:'suppressed_by')

  self.suppressed_by = attributes[:'suppressed_by'] if attributes[:'suppressed_by']

  self.entity_id = attributes[:'entityId'] if attributes[:'entityId']

  raise 'You cannot provide both :entityId and :entity_id' if attributes.key?(:'entityId') && attributes.key?(:'entity_id')

  self.entity_id = attributes[:'entity_id'] if attributes[:'entity_id']

  self.entity_type = attributes[:'entityType'] if attributes[:'entityType']

  raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type')

  self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type']

  self.entity_type_display_name = attributes[:'entityTypeDisplayName'] if attributes[:'entityTypeDisplayName']

  raise 'You cannot provide both :entityTypeDisplayName and :entity_type_display_name' if attributes.key?(:'entityTypeDisplayName') && attributes.key?(:'entity_type_display_name')

  self.entity_type_display_name = attributes[:'entity_type_display_name'] if attributes[:'entity_type_display_name']

  self.type_display_name = attributes[:'typeDisplayName'] if attributes[:'typeDisplayName']

  raise 'You cannot provide both :typeDisplayName and :type_display_name' if attributes.key?(:'typeDisplayName') && attributes.key?(:'type_display_name')

  self.type_display_name = attributes[:'type_display_name'] if attributes[:'type_display_name']

  self.type_name = attributes[:'typeName'] if attributes[:'typeName']

  raise 'You cannot provide both :typeName and :type_name' if attributes.key?(:'typeName') && attributes.key?(:'type_name')

  self.type_name = attributes[:'type_name'] if attributes[:'type_name']

  self.severity = attributes[:'severity'] if attributes[:'severity']
end

Instance Attribute Details

#agent_idString

The unique identifier of the agent associated with the warning

Returns:

  • (String)


13
14
15
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 13

def agent_id
  @agent_id
end

#compartment_idString

The entity compartment ID.

Returns:

  • (String)


29
30
31
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 29

def compartment_id
  @compartment_id
end

#entity_idString

The unique identifier of the entity associated with the warning

Returns:

  • (String)


96
97
98
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 96

def entity_id
  @entity_id
end

#entity_nameString

The name of the entity associated with the warning

Returns:

  • (String)


37
38
39
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 37

def entity_name
  @entity_name
end

#entity_typeString

The type of the entity associated with the warning

Returns:

  • (String)


100
101
102
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 100

def entity_type
  @entity_type
end

#entity_type_display_nameString

The display name of the entity type associated with the warning

Returns:

  • (String)


104
105
106
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 104

def entity_type_display_name
  @entity_type_display_name
end

#host_nameString

The host containing the agent associated with the warning

Returns:

  • (String)


17
18
19
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 17

def host_name
  @host_name
end

#is_activeBOOLEAN

A flag indicating if the warning is currently active

Returns:

  • (BOOLEAN)


53
54
55
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 53

def is_active
  @is_active
end

#is_suppressedBOOLEAN

A flag indicating if the warning is currently suppressed

Returns:

  • (BOOLEAN)


57
58
59
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 57

def is_suppressed
  @is_suppressed
end

#pattern_idString

The unique identifier of the warning pattern

Returns:

  • (String)


76
77
78
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 76

def pattern_id
  @pattern_id
end

#pattern_textString

The text of the pattern used by the warning

Returns:

  • (String)


80
81
82
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 80

def pattern_text
  @pattern_text
end

#rule_display_nameString

The display name of the rule which triggered the warning

Returns:

  • (String)


21
22
23
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 21

def rule_display_name
  @rule_display_name
end

#rule_idString

The unique identifier of the rule associated with the warning

Returns:

  • (String)


84
85
86
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 84

def rule_id
  @rule_id
end

#severityInteger

The warning severity

Returns:

  • (Integer)


116
117
118
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 116

def severity
  @severity
end

#source_display_nameString

The display name of the source associated with the warning

Returns:

  • (String)


33
34
35
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 33

def source_display_name
  @source_display_name
end

#source_idString

The unique identifier of the source associated with the warning

Returns:

  • (String)


88
89
90
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 88

def source_id
  @source_id
end

#source_nameString

The name of the source associated with the warning

Returns:

  • (String)


25
26
27
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 25

def source_name
  @source_name
end

#suppressed_byString

The user who suppressed the warning, or empty if the warning is not suppressed

Returns:

  • (String)


92
93
94
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 92

def suppressed_by
  @suppressed_by
end

#time_collectedDateTime

The time at which the warning was most recently collected

Returns:

  • (DateTime)


41
42
43
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 41

def time_collected
  @time_collected
end

#time_of_initial_warningDateTime

The date at which the warning was initially triggered

Returns:

  • (DateTime)


49
50
51
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 49

def time_of_initial_warning
  @time_of_initial_warning
end

#time_of_latest_warningDateTime

The most recent date on which the warning was triggered

Returns:

  • (DateTime)


61
62
63
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 61

def time_of_latest_warning
  @time_of_latest_warning
end

#type_display_nameString

The display name of the warning type

Returns:

  • (String)


108
109
110
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 108

def type_display_name
  @type_display_name
end

#type_nameString

The internal name of the warning

Returns:

  • (String)


112
113
114
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 112

def type_name
  @type_name
end

#warning_idString

The unique identifier of the warning

Returns:

  • (String)


45
46
47
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 45

def warning_id
  @warning_id
end

#warning_levelString

The warning level - either pattern, rule, or source.

Returns:

  • (String)


65
66
67
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 65

def warning_level
  @warning_level
end

#warning_messageString

A description of the warning intended for the consumer of the warning. It will usually detail the cause of the warning, may suggest a remedy, and can contain any other relevant information the consumer might find useful

Returns:

  • (String)


72
73
74
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 72

def warning_message
  @warning_message
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 119

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'agent_id': :'agentId',
    'host_name': :'hostName',
    'rule_display_name': :'ruleDisplayName',
    'source_name': :'sourceName',
    'compartment_id': :'compartmentId',
    'source_display_name': :'sourceDisplayName',
    'entity_name': :'entityName',
    'time_collected': :'timeCollected',
    'warning_id': :'warningId',
    'time_of_initial_warning': :'timeOfInitialWarning',
    'is_active': :'isActive',
    'is_suppressed': :'isSuppressed',
    'time_of_latest_warning': :'timeOfLatestWarning',
    'warning_level': :'warningLevel',
    'warning_message': :'warningMessage',
    'pattern_id': :'patternId',
    'pattern_text': :'patternText',
    'rule_id': :'ruleId',
    'source_id': :'sourceId',
    'suppressed_by': :'suppressedBy',
    'entity_id': :'entityId',
    'entity_type': :'entityType',
    'entity_type_display_name': :'entityTypeDisplayName',
    'type_display_name': :'typeDisplayName',
    'type_name': :'typeName',
    'severity': :'severity'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 153

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'agent_id': :'String',
    'host_name': :'String',
    'rule_display_name': :'String',
    'source_name': :'String',
    'compartment_id': :'String',
    'source_display_name': :'String',
    'entity_name': :'String',
    'time_collected': :'DateTime',
    'warning_id': :'String',
    'time_of_initial_warning': :'DateTime',
    'is_active': :'BOOLEAN',
    'is_suppressed': :'BOOLEAN',
    'time_of_latest_warning': :'DateTime',
    'warning_level': :'String',
    'warning_message': :'String',
    'pattern_id': :'String',
    'pattern_text': :'String',
    'rule_id': :'String',
    'source_id': :'String',
    'suppressed_by': :'String',
    'entity_id': :'String',
    'entity_type': :'String',
    'entity_type_display_name': :'String',
    'type_display_name': :'String',
    'type_name': :'String',
    'severity': :'Integer'
    # 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



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 384

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    agent_id == other.agent_id &&
    host_name == other.host_name &&
    rule_display_name == other.rule_display_name &&
    source_name == other.source_name &&
    compartment_id == other.compartment_id &&
    source_display_name == other.source_display_name &&
    entity_name == other.entity_name &&
    time_collected == other.time_collected &&
    warning_id == other.warning_id &&
    time_of_initial_warning == other.time_of_initial_warning &&
    is_active == other.is_active &&
    is_suppressed == other.is_suppressed &&
    time_of_latest_warning == other.time_of_latest_warning &&
    warning_level == other.warning_level &&
    warning_message == other.warning_message &&
    pattern_id == other.pattern_id &&
    pattern_text == other.pattern_text &&
    rule_id == other.rule_id &&
    source_id == other.source_id &&
    suppressed_by == other.suppressed_by &&
    entity_id == other.entity_id &&
    entity_type == other.entity_type &&
    entity_type_display_name == other.entity_type_display_name &&
    type_display_name == other.type_display_name &&
    type_name == other.type_name &&
    severity == other.severity
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



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 439

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


419
420
421
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 419

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



428
429
430
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 428

def hash
  [agent_id, host_name, rule_display_name, source_name, compartment_id, source_display_name, entity_name, time_collected, warning_id, time_of_initial_warning, is_active, is_suppressed, time_of_latest_warning, warning_level, warning_message, pattern_id, pattern_text, rule_id, source_id, suppressed_by, entity_id, entity_type, entity_type_display_name, type_display_name, type_name, severity].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



472
473
474
475
476
477
478
479
480
481
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 472

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



466
467
468
# File 'lib/oci/log_analytics/models/log_analytics_warning.rb', line 466

def to_s
  to_hash.to_s
end