Class: Falcon::DetectsBehavior

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DetectsBehavior

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsBehavior` 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::DetectsBehavior`. 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?(:'alleged_filetype')
    self.alleged_filetype = attributes[:'alleged_filetype']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'sha256')
    self.sha256 = attributes[:'sha256']
  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?(:'technique')
    self.technique = attributes[:'technique']
  end

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

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

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

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

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

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

Instance Attribute Details

#alleged_filetypeObject

Returns the value of attribute alleged_filetype.



35
36
37
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 35

def alleged_filetype
  @alleged_filetype
end

#behavior_idObject

Returns the value of attribute behavior_id.



37
38
39
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 37

def behavior_id
  @behavior_id
end

#cmdlineObject

Returns the value of attribute cmdline.



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

def cmdline
  @cmdline
end

#confidenceObject

Returns the value of attribute confidence.



41
42
43
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 41

def confidence
  @confidence
end

#container_idObject

Returns the value of attribute container_id.



43
44
45
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 43

def container_id
  @container_id
end

#control_graph_idObject

Returns the value of attribute control_graph_id.



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

def control_graph_id
  @control_graph_id
end

#descriptionObject

Returns the value of attribute description.



47
48
49
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 47

def description
  @description
end

#device_idObject

Returns the value of attribute device_id.



49
50
51
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 49

def device_id
  @device_id
end

#display_nameObject

Returns the value of attribute display_name.



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

def display_name
  @display_name
end

#filenameObject

Returns the value of attribute filename.



53
54
55
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 53

def filename
  @filename
end

#filepathObject

Returns the value of attribute filepath.



55
56
57
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 55

def filepath
  @filepath
end

#ioc_descriptionObject

Returns the value of attribute ioc_description.



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

def ioc_description
  @ioc_description
end

#ioc_sourceObject

Returns the value of attribute ioc_source.



59
60
61
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 59

def ioc_source
  @ioc_source
end

#ioc_typeObject

Returns the value of attribute ioc_type.



61
62
63
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 61

def ioc_type
  @ioc_type
end

#ioc_valueObject

Returns the value of attribute ioc_value.



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

def ioc_value
  @ioc_value
end

#md5Object

Returns the value of attribute md5.



65
66
67
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 65

def md5
  @md5
end

#objectiveObject

Returns the value of attribute objective.



67
68
69
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 67

def objective
  @objective
end

#parent_detailsObject

Returns the value of attribute parent_details.



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

def parent_details
  @parent_details
end

#pattern_dispositionObject

Returns the value of attribute pattern_disposition.



71
72
73
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 71

def pattern_disposition
  @pattern_disposition
end

#pattern_disposition_detailsObject

Returns the value of attribute pattern_disposition_details.



73
74
75
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 73

def pattern_disposition_details
  @pattern_disposition_details
end

#rule_instance_idObject

Returns the value of attribute rule_instance_id.



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

def rule_instance_id
  @rule_instance_id
end

#rule_instance_versionObject

Returns the value of attribute rule_instance_version.



77
78
79
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 77

def rule_instance_version
  @rule_instance_version
end

#scenarioObject

Returns the value of attribute scenario.



79
80
81
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 79

def scenario
  @scenario
end

#severityObject

Returns the value of attribute severity.



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

def severity
  @severity
end

#sha256Object

Returns the value of attribute sha256.



83
84
85
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 83

def sha256
  @sha256
end

#tacticObject

Returns the value of attribute tactic.



85
86
87
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 85

def tactic
  @tactic
end

#tactic_idObject

Returns the value of attribute tactic_id.



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

def tactic_id
  @tactic_id
end

#techniqueObject

Returns the value of attribute technique.



89
90
91
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 89

def technique
  @technique
end

#technique_idObject

Returns the value of attribute technique_id.



91
92
93
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 91

def technique_id
  @technique_id
end

#template_instance_idObject

Returns the value of attribute template_instance_id.



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

def template_instance_id
  @template_instance_id
end

#timestampObject

Returns the value of attribute timestamp.



95
96
97
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 95

def timestamp
  @timestamp
end

#triggering_process_graph_idObject

Returns the value of attribute triggering_process_graph_id.



97
98
99
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 97

def triggering_process_graph_id
  @triggering_process_graph_id
end

#user_idObject

Returns the value of attribute user_id.



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

def user_id
  @user_id
end

#user_nameObject

Returns the value of attribute user_name.



101
102
103
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 101

def user_name
  @user_name
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



144
145
146
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 144

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'alleged_filetype' => :'alleged_filetype',
    :'behavior_id' => :'behavior_id',
    :'cmdline' => :'cmdline',
    :'confidence' => :'confidence',
    :'container_id' => :'container_id',
    :'control_graph_id' => :'control_graph_id',
    :'description' => :'description',
    :'device_id' => :'device_id',
    :'display_name' => :'display_name',
    :'filename' => :'filename',
    :'filepath' => :'filepath',
    :'ioc_description' => :'ioc_description',
    :'ioc_source' => :'ioc_source',
    :'ioc_type' => :'ioc_type',
    :'ioc_value' => :'ioc_value',
    :'md5' => :'md5',
    :'objective' => :'objective',
    :'parent_details' => :'parent_details',
    :'pattern_disposition' => :'pattern_disposition',
    :'pattern_disposition_details' => :'pattern_disposition_details',
    :'rule_instance_id' => :'rule_instance_id',
    :'rule_instance_version' => :'rule_instance_version',
    :'scenario' => :'scenario',
    :'severity' => :'severity',
    :'sha256' => :'sha256',
    :'tactic' => :'tactic',
    :'tactic_id' => :'tactic_id',
    :'technique' => :'technique',
    :'technique_id' => :'technique_id',
    :'template_instance_id' => :'template_instance_id',
    :'timestamp' => :'timestamp',
    :'triggering_process_graph_id' => :'triggering_process_graph_id',
    :'user_id' => :'user_id',
    :'user_name' => :'user_name'
  }
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



565
566
567
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 565

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

.openapi_nullableObject

List of attributes with nullable: true



189
190
191
192
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 189

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'alleged_filetype' => :'String',
    :'behavior_id' => :'String',
    :'cmdline' => :'String',
    :'confidence' => :'Integer',
    :'container_id' => :'String',
    :'control_graph_id' => :'String',
    :'description' => :'String',
    :'device_id' => :'String',
    :'display_name' => :'String',
    :'filename' => :'String',
    :'filepath' => :'String',
    :'ioc_description' => :'String',
    :'ioc_source' => :'String',
    :'ioc_type' => :'String',
    :'ioc_value' => :'String',
    :'md5' => :'String',
    :'objective' => :'String',
    :'parent_details' => :'DetectsParentDetails',
    :'pattern_disposition' => :'Integer',
    :'pattern_disposition_details' => :'PatterndispositionPatternDisposition',
    :'rule_instance_id' => :'String',
    :'rule_instance_version' => :'Integer',
    :'scenario' => :'String',
    :'severity' => :'Integer',
    :'sha256' => :'String',
    :'tactic' => :'String',
    :'tactic_id' => :'String',
    :'technique' => :'String',
    :'technique_id' => :'String',
    :'template_instance_id' => :'String',
    :'timestamp' => :'Time',
    :'triggering_process_graph_id' => :'String',
    :'user_id' => :'String',
    :'user_name' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 511

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      alleged_filetype == o.alleged_filetype &&
      behavior_id == o.behavior_id &&
      cmdline == o.cmdline &&
      confidence == o.confidence &&
      container_id == o.container_id &&
      control_graph_id == o.control_graph_id &&
      description == o.description &&
      device_id == o.device_id &&
      display_name == o.display_name &&
      filename == o.filename &&
      filepath == o.filepath &&
      ioc_description == o.ioc_description &&
      ioc_source == o.ioc_source &&
      ioc_type == o.ioc_type &&
      ioc_value == o.ioc_value &&
      md5 == o.md5 &&
      objective == o.objective &&
      parent_details == o.parent_details &&
      pattern_disposition == o.pattern_disposition &&
      pattern_disposition_details == o.pattern_disposition_details &&
      rule_instance_id == o.rule_instance_id &&
      rule_instance_version == o.rule_instance_version &&
      scenario == o.scenario &&
      severity == o.severity &&
      sha256 == o.sha256 &&
      tactic == o.tactic &&
      tactic_id == o.tactic_id &&
      technique == o.technique &&
      technique_id == o.technique_id &&
      template_instance_id == o.template_instance_id &&
      timestamp == o.timestamp &&
      triggering_process_graph_id == o.triggering_process_graph_id &&
      user_id == o.user_id &&
      user_name == o.user_name
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



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 596

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



667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 667

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



572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 572

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


552
553
554
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 552

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



558
559
560
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 558

def hash
  [alleged_filetype, behavior_id, cmdline, confidence, container_id, control_graph_id, description, device_id, display_name, filename, filepath, ioc_description, ioc_source, ioc_type, ioc_value, md5, objective, parent_details, pattern_disposition, pattern_disposition_details, rule_instance_id, rule_instance_version, scenario, severity, sha256, tactic, tactic_id, technique, technique_id, template_instance_id, timestamp, triggering_process_graph_id, user_id, user_name].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 348

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

  if @behavior_id.nil?
    invalid_properties.push('invalid value for "behavior_id", behavior_id cannot be nil.')
  end

  if @cmdline.nil?
    invalid_properties.push('invalid value for "cmdline", cmdline cannot be nil.')
  end

  if @confidence.nil?
    invalid_properties.push('invalid value for "confidence", confidence cannot be nil.')
  end

  if @control_graph_id.nil?
    invalid_properties.push('invalid value for "control_graph_id", control_graph_id cannot be nil.')
  end

  if @description.nil?
    invalid_properties.push('invalid value for "description", description cannot be nil.')
  end

  if @device_id.nil?
    invalid_properties.push('invalid value for "device_id", device_id cannot be nil.')
  end

  if @display_name.nil?
    invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
  end

  if @filename.nil?
    invalid_properties.push('invalid value for "filename", filename cannot be nil.')
  end

  if @filepath.nil?
    invalid_properties.push('invalid value for "filepath", filepath cannot be nil.')
  end

  if @ioc_description.nil?
    invalid_properties.push('invalid value for "ioc_description", ioc_description cannot be nil.')
  end

  if @ioc_source.nil?
    invalid_properties.push('invalid value for "ioc_source", ioc_source cannot be nil.')
  end

  if @ioc_type.nil?
    invalid_properties.push('invalid value for "ioc_type", ioc_type cannot be nil.')
  end

  if @ioc_value.nil?
    invalid_properties.push('invalid value for "ioc_value", ioc_value cannot be nil.')
  end

  if @md5.nil?
    invalid_properties.push('invalid value for "md5", md5 cannot be nil.')
  end

  if @objective.nil?
    invalid_properties.push('invalid value for "objective", objective cannot be nil.')
  end

  if @parent_details.nil?
    invalid_properties.push('invalid value for "parent_details", parent_details cannot be nil.')
  end

  if @pattern_disposition.nil?
    invalid_properties.push('invalid value for "pattern_disposition", pattern_disposition cannot be nil.')
  end

  if @pattern_disposition_details.nil?
    invalid_properties.push('invalid value for "pattern_disposition_details", pattern_disposition_details cannot be nil.')
  end

  if @scenario.nil?
    invalid_properties.push('invalid value for "scenario", scenario cannot be nil.')
  end

  if @severity.nil?
    invalid_properties.push('invalid value for "severity", severity cannot be nil.')
  end

  if @sha256.nil?
    invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.')
  end

  if @tactic.nil?
    invalid_properties.push('invalid value for "tactic", tactic cannot be nil.')
  end

  if @tactic_id.nil?
    invalid_properties.push('invalid value for "tactic_id", tactic_id cannot be nil.')
  end

  if @technique.nil?
    invalid_properties.push('invalid value for "technique", technique cannot be nil.')
  end

  if @technique_id.nil?
    invalid_properties.push('invalid value for "technique_id", technique_id cannot be nil.')
  end

  if @timestamp.nil?
    invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
  end

  if @triggering_process_graph_id.nil?
    invalid_properties.push('invalid value for "triggering_process_graph_id", triggering_process_graph_id cannot be nil.')
  end

  if @user_id.nil?
    invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
  end

  if @user_name.nil?
    invalid_properties.push('invalid value for "user_name", user_name 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



643
644
645
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 643

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



649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 649

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



637
638
639
# File 'lib/crimson-falcon/models/detects_behavior.rb', line 637

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



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

def valid?
  return false if @alleged_filetype.nil?
  return false if @behavior_id.nil?
  return false if @cmdline.nil?
  return false if @confidence.nil?
  return false if @control_graph_id.nil?
  return false if @description.nil?
  return false if @device_id.nil?
  return false if @display_name.nil?
  return false if @filename.nil?
  return false if @filepath.nil?
  return false if @ioc_description.nil?
  return false if @ioc_source.nil?
  return false if @ioc_type.nil?
  return false if @ioc_value.nil?
  return false if @md5.nil?
  return false if @objective.nil?
  return false if @parent_details.nil?
  return false if @pattern_disposition.nil?
  return false if @pattern_disposition_details.nil?
  return false if @scenario.nil?
  return false if @severity.nil?
  return false if @sha256.nil?
  return false if @tactic.nil?
  return false if @tactic_id.nil?
  return false if @technique.nil?
  return false if @technique_id.nil?
  return false if @timestamp.nil?
  return false if @triggering_process_graph_id.nil?
  return false if @user_id.nil?
  return false if @user_name.nil?
  true
end