Class: Falcon::DetectsAlert

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/models/detects_alert.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DetectsAlert

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
376
377
378
379
380
381
382
383
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/crimson-falcon/models/detects_alert.rb', line 264

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsAlert` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DetectsAlert`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'agent_id')
    self.agent_id = attributes[:'agent_id']
  end

  if attributes.key?(:'aggregate_id')
    self.aggregate_id = attributes[:'aggregate_id']
  end

  if attributes.key?(:'assigned_to_name')
    self.assigned_to_name = attributes[:'assigned_to_name']
  end

  if attributes.key?(:'assigned_to_uid')
    self.assigned_to_uid = attributes[:'assigned_to_uid']
  end

  if attributes.key?(:'assigned_to_uuid')
    self.assigned_to_uuid = attributes[:'assigned_to_uuid']
  end

  if attributes.key?(:'cid')
    self.cid = attributes[:'cid']
  end

  if attributes.key?(:'composite_id')
    self.composite_id = attributes[:'composite_id']
  end

  if attributes.key?(:'confidence')
    self.confidence = attributes[:'confidence']
  end

  if attributes.key?(:'crawl_edge_ids')
    if (value = attributes[:'crawl_edge_ids']).is_a?(Hash)
      self.crawl_edge_ids = value
    end
  end

  if attributes.key?(:'crawl_vertex_ids')
    if (value = attributes[:'crawl_vertex_ids']).is_a?(Hash)
      self.crawl_vertex_ids = value
    end
  end

  if attributes.key?(:'crawled_timestamp')
    self.crawled_timestamp = attributes[:'crawled_timestamp']
  end

  if attributes.key?(:'created_timestamp')
    self.created_timestamp = attributes[:'created_timestamp']
  end

  if attributes.key?(:'data_domains')
    if (value = attributes[:'data_domains']).is_a?(Array)
      self.data_domains = value
    end
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'display_name')
    self.display_name = attributes[:'display_name']
  end

  if attributes.key?(:'email_sent')
    self.email_sent = attributes[:'email_sent']
  end

  if attributes.key?(:'es_doc_id')
    self.es_doc_id = attributes[:'es_doc_id']
  end

  if attributes.key?(:'es_doc_version')
    self.es_doc_version = attributes[:'es_doc_version']
  end

  if attributes.key?(:'es_routing_id')
    self.es_routing_id = attributes[:'es_routing_id']
  end

  if attributes.key?(:'external')
    self.external = attributes[:'external']
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'objective')
    self.objective = attributes[:'objective']
  end

  if attributes.key?(:'pattern_id')
    self.pattern_id = attributes[:'pattern_id']
  end

  if attributes.key?(:'platform')
    self.platform = attributes[:'platform']
  end

  if attributes.key?(:'poly_id')
    self.poly_id = attributes[:'poly_id']
  end

  if attributes.key?(:'product')
    self.product = attributes[:'product']
  end

  if attributes.key?(:'scenario')
    self.scenario = attributes[:'scenario']
  end

  if attributes.key?(:'severity')
    self.severity = attributes[:'severity']
  end

  if attributes.key?(:'show_in_ui')
    self.show_in_ui = attributes[:'show_in_ui']
  end

  if attributes.key?(:'source_products')
    if (value = attributes[:'source_products']).is_a?(Array)
      self.source_products = value
    end
  end

  if attributes.key?(:'source_vendors')
    if (value = attributes[:'source_vendors']).is_a?(Array)
      self.source_vendors = value
    end
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'tactic')
    self.tactic = attributes[:'tactic']
  end

  if attributes.key?(:'tactic_id')
    self.tactic_id = attributes[:'tactic_id']
  end

  if attributes.key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end

  if attributes.key?(:'technique')
    self.technique = attributes[:'technique']
  end

  if attributes.key?(:'technique_id')
    self.technique_id = attributes[:'technique_id']
  end

  if attributes.key?(:'timestamp')
    self.timestamp = attributes[:'timestamp']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.key?(:'updated_timestamp')
    self.updated_timestamp = attributes[:'updated_timestamp']
  end
end

Instance Attribute Details

#agent_idObject

Device or sensor ID for which the Alert was generated



36
37
38
# File 'lib/crimson-falcon/models/detects_alert.rb', line 36

def agent_id
  @agent_id
end

#aggregate_idObject

Common linkage between multiple Alerts that belong so the same detection bouquet



39
40
41
# File 'lib/crimson-falcon/models/detects_alert.rb', line 39

def aggregate_id
  @aggregate_id
end

#assigned_to_nameObject

Name of the person this Alert is assigned to



42
43
44
# File 'lib/crimson-falcon/models/detects_alert.rb', line 42

def assigned_to_name
  @assigned_to_name
end

#assigned_to_uidObject

UserID to which this Alert is assigned to



45
46
47
# File 'lib/crimson-falcon/models/detects_alert.rb', line 45

def assigned_to_uid
  @assigned_to_uid
end

#assigned_to_uuidObject

UUID to which this Alert is assigned to



48
49
50
# File 'lib/crimson-falcon/models/detects_alert.rb', line 48

def assigned_to_uuid
  @assigned_to_uuid
end

#cidObject

Unique ID of CrowdStrike customers



51
52
53
# File 'lib/crimson-falcon/models/detects_alert.rb', line 51

def cid
  @cid
end

#composite_idObject

An opaque internal identifier that can uniquely identify an Alert



54
55
56
# File 'lib/crimson-falcon/models/detects_alert.rb', line 54

def composite_id
  @composite_id
end

#confidenceObject

Confidence is a 1-100 integer value denoting the confidence that, when this Alert fires, it is indicative of malicious activity



57
58
59
# File 'lib/crimson-falcon/models/detects_alert.rb', line 57

def confidence
  @confidence
end

#crawl_edge_idsObject

internal only



60
61
62
# File 'lib/crimson-falcon/models/detects_alert.rb', line 60

def crawl_edge_ids
  @crawl_edge_ids
end

#crawl_vertex_idsObject

internal only



63
64
65
# File 'lib/crimson-falcon/models/detects_alert.rb', line 63

def crawl_vertex_ids
  @crawl_vertex_ids
end

#crawled_timestampObject

indicates when ThreatGraph was crawled to gather info for this alert creation/update



66
67
68
# File 'lib/crimson-falcon/models/detects_alert.rb', line 66

def crawled_timestamp
  @crawled_timestamp
end

#created_timestampObject

indicates when the Alert was first written to backend store



69
70
71
# File 'lib/crimson-falcon/models/detects_alert.rb', line 69

def created_timestamp
  @created_timestamp
end

#data_domainsObject

Data Domains represents domains to which this alert belongs to



72
73
74
# File 'lib/crimson-falcon/models/detects_alert.rb', line 72

def data_domains
  @data_domains
end

#descriptionObject

Short, customer-visible summary of the detected activity



75
76
77
# File 'lib/crimson-falcon/models/detects_alert.rb', line 75

def description
  @description
end

#display_nameObject

Customer visible name for the Alert’s pattern



78
79
80
# File 'lib/crimson-falcon/models/detects_alert.rb', line 78

def display_name
  @display_name
end

#email_sentObject

Boolean to know if we sent email regarding this Alert



81
82
83
# File 'lib/crimson-falcon/models/detects_alert.rb', line 81

def email_sent
  @email_sent
end

#es_doc_idObject

internal only



84
85
86
# File 'lib/crimson-falcon/models/detects_alert.rb', line 84

def es_doc_id
  @es_doc_id
end

#es_doc_versionObject

internal only



87
88
89
# File 'lib/crimson-falcon/models/detects_alert.rb', line 87

def es_doc_version
  @es_doc_version
end

#es_routing_idObject

internal only



90
91
92
# File 'lib/crimson-falcon/models/detects_alert.rb', line 90

def es_routing_id
  @es_routing_id
end

#externalObject

Boolean indicating if this Alert is internal or external



93
94
95
# File 'lib/crimson-falcon/models/detects_alert.rb', line 93

def external
  @external
end

#idObject

Vertex key which triggers the formation of the Alert



96
97
98
# File 'lib/crimson-falcon/models/detects_alert.rb', line 96

def id
  @id
end

#nameObject

Pattern Name coming either from Taxonomy or directly from the ingested Alert



99
100
101
# File 'lib/crimson-falcon/models/detects_alert.rb', line 99

def name
  @name
end

#objectiveObject

End goal that an attack adversary intends to achieve according to MITRE



102
103
104
# File 'lib/crimson-falcon/models/detects_alert.rb', line 102

def objective
  @objective
end

#pattern_idObject

Taxonomy patternID for this Alert



105
106
107
# File 'lib/crimson-falcon/models/detects_alert.rb', line 105

def pattern_id
  @pattern_id
end

#platformObject

Platform that this Alert was triggered on e.g. Android, Windows, etc..



108
109
110
# File 'lib/crimson-falcon/models/detects_alert.rb', line 108

def platform
  @platform
end

#poly_idObject

Returns the value of attribute poly_id.



110
111
112
# File 'lib/crimson-falcon/models/detects_alert.rb', line 110

def poly_id
  @poly_id
end

#productObject

Product specifies the SKU that this Alert belongs to e.g. mobile, idp, epp



113
114
115
# File 'lib/crimson-falcon/models/detects_alert.rb', line 113

def product
  @product
end

#scenarioObject

Scenario was used pre-Handrails to display additional killchain context for UI alerts. With handrails, this field is mostly obsolete in favor of tactic/technique. Still, it can be useful for determining specific pattern types that are not straightforward to distinguish from other fields alone



116
117
118
# File 'lib/crimson-falcon/models/detects_alert.rb', line 116

def scenario
  @scenario
end

#severityObject

Severity is also a 1-100 integer value, but unlike confidence severity impacts how a Alert is displayed in the UI



119
120
121
# File 'lib/crimson-falcon/models/detects_alert.rb', line 119

def severity
  @severity
end

#show_in_uiObject

Boolean indicating if this Alert will be shown in the UI or if it’s hidden’



122
123
124
# File 'lib/crimson-falcon/models/detects_alert.rb', line 122

def show_in_ui
  @show_in_ui
end

#source_productsObject

Source Products are products that produced events which contributed to this alert



125
126
127
# File 'lib/crimson-falcon/models/detects_alert.rb', line 125

def source_products
  @source_products
end

#source_vendorsObject

Source Vendors are vendors that produced events which contributed to this alert



128
129
130
# File 'lib/crimson-falcon/models/detects_alert.rb', line 128

def source_vendors
  @source_vendors
end

#statusObject

Could be one of the following - New, closed, in_progress, reopened



131
132
133
# File 'lib/crimson-falcon/models/detects_alert.rb', line 131

def status
  @status
end

#tacticObject

Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures



134
135
136
# File 'lib/crimson-falcon/models/detects_alert.rb', line 134

def tactic
  @tactic
end

#tactic_idObject

Unique ID for the tactic seen in the Alert



137
138
139
# File 'lib/crimson-falcon/models/detects_alert.rb', line 137

def tactic_id
  @tactic_id
end

#tagsObject

Tags are string values associated with the alert that can be added or removed through the API



140
141
142
# File 'lib/crimson-falcon/models/detects_alert.rb', line 140

def tags
  @tags
end

#techniqueObject

Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures



143
144
145
# File 'lib/crimson-falcon/models/detects_alert.rb', line 143

def technique
  @technique
end

#technique_idObject

Unique ID for the technique seen in the Alert



146
147
148
# File 'lib/crimson-falcon/models/detects_alert.rb', line 146

def technique_id
  @technique_id
end

#timestampObject

stored value coming in directly from the ingested event or set by cloud in the absence of it



149
150
151
# File 'lib/crimson-falcon/models/detects_alert.rb', line 149

def timestamp
  @timestamp
end

#typeObject

Type of definition Detections Extensibility use. Keyed-off of Pattern of the incoming events/Alerts



152
153
154
# File 'lib/crimson-falcon/models/detects_alert.rb', line 152

def type
  @type
end

#updated_timestampObject

indicates when the Alert was last modified



155
156
157
# File 'lib/crimson-falcon/models/detects_alert.rb', line 155

def updated_timestamp
  @updated_timestamp
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



205
206
207
# File 'lib/crimson-falcon/models/detects_alert.rb', line 205

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
# File 'lib/crimson-falcon/models/detects_alert.rb', line 158

def self.attribute_map
  {
    :'agent_id' => :'agent_id',
    :'aggregate_id' => :'aggregate_id',
    :'assigned_to_name' => :'assigned_to_name',
    :'assigned_to_uid' => :'assigned_to_uid',
    :'assigned_to_uuid' => :'assigned_to_uuid',
    :'cid' => :'cid',
    :'composite_id' => :'composite_id',
    :'confidence' => :'confidence',
    :'crawl_edge_ids' => :'crawl_edge_ids',
    :'crawl_vertex_ids' => :'crawl_vertex_ids',
    :'crawled_timestamp' => :'crawled_timestamp',
    :'created_timestamp' => :'created_timestamp',
    :'data_domains' => :'data_domains',
    :'description' => :'description',
    :'display_name' => :'display_name',
    :'email_sent' => :'email_sent',
    :'es_doc_id' => :'es_doc_id',
    :'es_doc_version' => :'es_doc_version',
    :'es_routing_id' => :'es_routing_id',
    :'external' => :'external',
    :'id' => :'id',
    :'name' => :'name',
    :'objective' => :'objective',
    :'pattern_id' => :'pattern_id',
    :'platform' => :'platform',
    :'poly_id' => :'poly_id',
    :'product' => :'product',
    :'scenario' => :'scenario',
    :'severity' => :'severity',
    :'show_in_ui' => :'show_in_ui',
    :'source_products' => :'source_products',
    :'source_vendors' => :'source_vendors',
    :'status' => :'status',
    :'tactic' => :'tactic',
    :'tactic_id' => :'tactic_id',
    :'tags' => :'tags',
    :'technique' => :'technique',
    :'technique_id' => :'technique_id',
    :'timestamp' => :'timestamp',
    :'type' => :'type',
    :'updated_timestamp' => :'updated_timestamp'
  }
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



535
536
537
# File 'lib/crimson-falcon/models/detects_alert.rb', line 535

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



257
258
259
260
# File 'lib/crimson-falcon/models/detects_alert.rb', line 257

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



210
211
212
213
214
215
216
217
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
# File 'lib/crimson-falcon/models/detects_alert.rb', line 210

def self.openapi_types
  {
    :'agent_id' => :'String',
    :'aggregate_id' => :'String',
    :'assigned_to_name' => :'String',
    :'assigned_to_uid' => :'String',
    :'assigned_to_uuid' => :'String',
    :'cid' => :'String',
    :'composite_id' => :'String',
    :'confidence' => :'Integer',
    :'crawl_edge_ids' => :'Hash<String, Array<String>>',
    :'crawl_vertex_ids' => :'Hash<String, Array<String>>',
    :'crawled_timestamp' => :'Time',
    :'created_timestamp' => :'Time',
    :'data_domains' => :'Array<String>',
    :'description' => :'String',
    :'display_name' => :'String',
    :'email_sent' => :'Boolean',
    :'es_doc_id' => :'String',
    :'es_doc_version' => :'Integer',
    :'es_routing_id' => :'String',
    :'external' => :'Boolean',
    :'id' => :'String',
    :'name' => :'String',
    :'objective' => :'String',
    :'pattern_id' => :'Integer',
    :'platform' => :'String',
    :'poly_id' => :'String',
    :'product' => :'String',
    :'scenario' => :'String',
    :'severity' => :'Integer',
    :'show_in_ui' => :'Boolean',
    :'source_products' => :'Array<String>',
    :'source_vendors' => :'Array<String>',
    :'status' => :'String',
    :'tactic' => :'String',
    :'tactic_id' => :'String',
    :'tags' => :'Array<String>',
    :'technique' => :'String',
    :'technique_id' => :'String',
    :'timestamp' => :'Time',
    :'type' => :'String',
    :'updated_timestamp' => :'Time'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/crimson-falcon/models/detects_alert.rb', line 474

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      agent_id == o.agent_id &&
      aggregate_id == o.aggregate_id &&
      assigned_to_name == o.assigned_to_name &&
      assigned_to_uid == o.assigned_to_uid &&
      assigned_to_uuid == o.assigned_to_uuid &&
      cid == o.cid &&
      composite_id == o.composite_id &&
      confidence == o.confidence &&
      crawl_edge_ids == o.crawl_edge_ids &&
      crawl_vertex_ids == o.crawl_vertex_ids &&
      crawled_timestamp == o.crawled_timestamp &&
      created_timestamp == o.created_timestamp &&
      data_domains == o.data_domains &&
      description == o.description &&
      display_name == o.display_name &&
      email_sent == o.email_sent &&
      es_doc_id == o.es_doc_id &&
      es_doc_version == o.es_doc_version &&
      es_routing_id == o.es_routing_id &&
      external == o.external &&
      id == o.id &&
      name == o.name &&
      objective == o.objective &&
      pattern_id == o.pattern_id &&
      platform == o.platform &&
      poly_id == o.poly_id &&
      product == o.product &&
      scenario == o.scenario &&
      severity == o.severity &&
      show_in_ui == o.show_in_ui &&
      source_products == o.source_products &&
      source_vendors == o.source_vendors &&
      status == o.status &&
      tactic == o.tactic &&
      tactic_id == o.tactic_id &&
      tags == o.tags &&
      technique == o.technique &&
      technique_id == o.technique_id &&
      timestamp == o.timestamp &&
      type == o.type &&
      updated_timestamp == o.updated_timestamp
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# File 'lib/crimson-falcon/models/detects_alert.rb', line 566

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = Falcon.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/crimson-falcon/models/detects_alert.rb', line 637

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/crimson-falcon/models/detects_alert.rb', line 542

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


522
523
524
# File 'lib/crimson-falcon/models/detects_alert.rb', line 522

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



528
529
530
# File 'lib/crimson-falcon/models/detects_alert.rb', line 528

def hash
  [agent_id, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, cid, composite_id, confidence, crawl_edge_ids, crawl_vertex_ids, crawled_timestamp, created_timestamp, data_domains, description, display_name, email_sent, es_doc_id, es_doc_version, es_routing_id, external, id, name, objective, pattern_id, platform, poly_id, product, scenario, severity, show_in_ui, source_products, source_vendors, status, tactic, tactic_id, tags, technique, technique_id, timestamp, type, updated_timestamp].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



456
457
458
459
460
461
462
463
# File 'lib/crimson-falcon/models/detects_alert.rb', line 456

def list_invalid_properties
  invalid_properties = Array.new
  if @type.nil?
    invalid_properties.push('invalid value for "type", type cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



613
614
615
# File 'lib/crimson-falcon/models/detects_alert.rb', line 613

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/crimson-falcon/models/detects_alert.rb', line 619

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



607
608
609
# File 'lib/crimson-falcon/models/detects_alert.rb', line 607

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



467
468
469
470
# File 'lib/crimson-falcon/models/detects_alert.rb', line 467

def valid?
  return false if @type.nil?
  true
end