Class: Falcon::DomainMalwareDocument

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

Overview

JSON definition of a Malware, also known as a Threat

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DomainMalwareDocument

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
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
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
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 300

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#actors_countObject

Returns the value of attribute actors_count.



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

def actors_count
  @actors_count
end

#all_systemsObject

All the Systems affected (i.e AWS, Lambda)



38
39
40
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 38

def all_systems
  @all_systems
end

#associated_actorsObject

All the actors related to this Malware



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

def associated_actors
  @associated_actors
end

#capabilitiesObject

Returns the value of attribute capabilities.



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

def capabilities
  @capabilities
end

#community_identifiersObject

Malware’s community identifiers



46
47
48
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 46

def community_identifiers
  @community_identifiers
end

#created_timestampObject

Malware’s creation date when it was added to CKB in unix timestamp format



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

def created_timestamp
  @created_timestamp
end

#descriptionObject

Malware’s text description



52
53
54
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 52

def description
  @description
end

#description_text_lengthObject

Returns the value of attribute description_text_length.



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

def description_text_length
  @description_text_length
end

#developed_byObject

Actors that developed this Malware



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

def developed_by
  @developed_by
end

#developed_by_countObject

Returns the value of attribute developed_by_count.



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

def developed_by_count
  @developed_by_count
end

#distinct_indicator_countObject

Returns the value of attribute distinct_indicator_count.



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

def distinct_indicator_count
  @distinct_indicator_count
end

#files_containing_threat_countObject

Returns the value of attribute files_containing_threat_count.



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

def files_containing_threat_count
  @files_containing_threat_count
end

#idObject

Alphanumeric ID for the Malware



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

def id
  @id
end

#indicator_countObject

Returns the value of attribute indicator_count.



68
69
70
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 68

def indicator_count
  @indicator_count
end

#kill_chainObject

Returns the value of attribute kill_chain.



70
71
72
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 70

def kill_chain
  @kill_chain
end

#last_updatedObject

Malware’s last updated date in unix timestamp format



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

def last_updated
  @last_updated
end

#mitreObject

MITRE used by this Malware



76
77
78
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 76

def mitre
  @mitre
end

#mitre_attack_countObject

Returns the value of attribute mitre_attack_count.



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

def mitre_attack_count
  @mitre_attack_count
end

#mitre_tactic_countObject

Returns the value of attribute mitre_tactic_count.



80
81
82
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 80

def mitre_tactic_count
  @mitre_tactic_count
end

#mitre_technique_countObject

Returns the value of attribute mitre_technique_count.



82
83
84
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 82

def mitre_technique_count
  @mitre_technique_count
end

#motivationObject

Malware’s activity motivation, one of: State-Sponsored, Criminal, Hacktivism



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

def motivation
  @motivation
end

#nameObject

Malware’s family name



88
89
90
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 88

def name
  @name
end

#next_stage_ofObject

The previous stage of this Malware



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

def next_stage_of
  @next_stage_of
end

#next_stagesObject

The next stages of this Malware



94
95
96
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 94

def next_stages
  @next_stages
end

#plugin_ofObject

The parent of this Malware



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

def plugin_of
  @plugin_of
end

#pluginsObject

The plugins of this Malware



100
101
102
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 100

def plugins
  @plugins
end

#purchased_byObject

Actors that purchase this Malware



103
104
105
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 103

def purchased_by
  @purchased_by
end

#purchased_by_countObject

Returns the value of attribute purchased_by_count.



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

def purchased_by_count
  @purchased_by_count
end

#report_countObject

Returns the value of attribute report_count.



107
108
109
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 107

def report_count
  @report_count
end

#reportsObject

Reports that contain this Malware



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

def reports
  @reports
end

#seen_in_environmentObject

Returns the value of attribute seen_in_environment.



112
113
114
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 112

def seen_in_environment
  @seen_in_environment
end

#slugObject

Name in url friendly format, lowercased and spaces replaced with dash



115
116
117
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 115

def slug
  @slug
end

#sold_byObject

Actors that sell this Malware



118
119
120
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 118

def sold_by
  @sold_by
end

#sold_by_countObject

Returns the value of attribute sold_by_count.



120
121
122
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 120

def sold_by_count
  @sold_by_count
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#sub_botnet_ofObject

The parent botnet of this Malware



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

def sub_botnet_of
  @sub_botnet_of
end

#sub_botnetsObject

The sub-botnets of this Malware



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

def sub_botnets
  @sub_botnets
end

#successor_ofObject

The predecessor of this Malware



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

def successor_of
  @successor_of
end

#successorsObject

The successors of this Malware



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

def successors
  @successors
end

#systems_targeted_countObject

Returns the value of attribute systems_targeted_count.



136
137
138
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 136

def systems_targeted_count
  @systems_targeted_count
end

#target_countriesObject

Target countries of malware’s activity and attacks, slug value is a 2 characters code for the country value, some examples: United States,United Kingdom,Germany,India,Japan,France,Australia,Canada,China



139
140
141
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 139

def target_countries
  @target_countries
end

#target_industriesObject

Target economical industries of malware’s activity and attacks. List of available values: Government, Financial Services, Technology, Telecommunications, Healthcare, Energy, Academic, Media, Aerospace, NGO, Manufacturing, Industrials and Engineering, Retail, Hospitality, Consulting and Professional Services, Opportunistic, Aviation, Defense, Transportation, Oil and Gas, Legal, Pharmaceutical, Logistics, Military, Automotive, Food and Beverage, Consumer Goods, Real Estate, Insurance, Agriculture, Chemicals, Utilities, Maritime, Extractive, Travel, Dissident, Cryptocurrency, Entertainment, National Government, Law Enforcement, Think Tanks, Local Government, Sports Organizations, Computer Gaming, Biomedical, Nonprofit, Financial Management & Hedge Funds, Political Parties, Architectural and Engineering, Emergency Services, Social Media, International Government, Nuclear, Research Entities, Vocational and Higher-Level Education, eCommerce



142
143
144
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 142

def target_industries
  @target_industries
end

#targeting_profileObject

Malware’s targeting profile



145
146
147
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 145

def targeting_profile
  @targeting_profile
end

#targets_systemsObject

The System directly targeted by this Malware (i.e Lambda)



148
149
150
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 148

def targets_systems
  @targets_systems
end

#threat_file_countObject

Returns the value of attribute threat_file_count.



150
151
152
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 150

def threat_file_count
  @threat_file_count
end

#threat_propertiesObject

Malware’s properties one of: Commodity, OpenSource, SourceCodeLeaked, Modular, RepurposedLegitimateSoftware



153
154
155
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 153

def threat_properties
  @threat_properties
end

#threat_relations_countObject

Returns the value of attribute threat_relations_count.



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

def threat_relations_count
  @threat_relations_count
end

#used_byObject

Actors that use this Malware



158
159
160
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 158

def used_by
  @used_by
end

#used_by_countObject

Returns the value of attribute used_by_count.



160
161
162
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 160

def used_by_count
  @used_by_count
end

#variant_ofObject

The parent variant of this Malware



163
164
165
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 163

def variant_of
  @variant_of
end

#variantsObject

The variants of this Malware



166
167
168
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 166

def variants
  @variants
end

#vulnerabilitiesObject

Vulnerabilities this Malware exploits



169
170
171
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 169

def vulnerabilities
  @vulnerabilities
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



230
231
232
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 230

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'actors_count' => :'actors_count',
    :'all_systems' => :'all_systems',
    :'associated_actors' => :'associated_actors',
    :'capabilities' => :'capabilities',
    :'community_identifiers' => :'community_identifiers',
    :'created_timestamp' => :'created_timestamp',
    :'description' => :'description',
    :'description_text_length' => :'description_text_length',
    :'developed_by' => :'developed_by',
    :'developed_by_count' => :'developed_by_count',
    :'distinct_indicator_count' => :'distinct_indicator_count',
    :'files_containing_threat_count' => :'files_containing_threat_count',
    :'id' => :'id',
    :'indicator_count' => :'indicator_count',
    :'kill_chain' => :'kill_chain',
    :'last_updated' => :'last_updated',
    :'mitre' => :'mitre',
    :'mitre_attack_count' => :'mitre_attack_count',
    :'mitre_tactic_count' => :'mitre_tactic_count',
    :'mitre_technique_count' => :'mitre_technique_count',
    :'motivation' => :'motivation',
    :'name' => :'name',
    :'next_stage_of' => :'next_stage_of',
    :'next_stages' => :'next_stages',
    :'plugin_of' => :'plugin_of',
    :'plugins' => :'plugins',
    :'purchased_by' => :'purchased_by',
    :'purchased_by_count' => :'purchased_by_count',
    :'report_count' => :'report_count',
    :'reports' => :'reports',
    :'seen_in_environment' => :'seen_in_environment',
    :'slug' => :'slug',
    :'sold_by' => :'sold_by',
    :'sold_by_count' => :'sold_by_count',
    :'status' => :'status',
    :'sub_botnet_of' => :'sub_botnet_of',
    :'sub_botnets' => :'sub_botnets',
    :'successor_of' => :'successor_of',
    :'successors' => :'successors',
    :'systems_targeted_count' => :'systems_targeted_count',
    :'target_countries' => :'target_countries',
    :'target_industries' => :'target_industries',
    :'targeting_profile' => :'targeting_profile',
    :'targets_systems' => :'targets_systems',
    :'threat_file_count' => :'threat_file_count',
    :'threat_properties' => :'threat_properties',
    :'threat_relations_count' => :'threat_relations_count',
    :'used_by' => :'used_by',
    :'used_by_count' => :'used_by_count',
    :'variant_of' => :'variant_of',
    :'variants' => :'variants',
    :'vulnerabilities' => :'vulnerabilities'
  }
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



675
676
677
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 675

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

.openapi_nullableObject

List of attributes with nullable: true



293
294
295
296
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 293

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'actors_count' => :'Integer',
    :'all_systems' => :'Array<String>',
    :'associated_actors' => :'Array<DomainDenormalizedAdversaryReference>',
    :'capabilities' => :'Array<String>',
    :'community_identifiers' => :'Array<String>',
    :'created_timestamp' => :'String',
    :'description' => :'String',
    :'description_text_length' => :'Integer',
    :'developed_by' => :'Array<DomainDenormalizedAdversaryReference>',
    :'developed_by_count' => :'Integer',
    :'distinct_indicator_count' => :'Integer',
    :'files_containing_threat_count' => :'Integer',
    :'id' => :'String',
    :'indicator_count' => :'Integer',
    :'kill_chain' => :'Array<String>',
    :'last_updated' => :'String',
    :'mitre' => :'Array<DomainDenormalizedThreatUsedMitre>',
    :'mitre_attack_count' => :'Integer',
    :'mitre_tactic_count' => :'Integer',
    :'mitre_technique_count' => :'Integer',
    :'motivation' => :'Array<String>',
    :'name' => :'String',
    :'next_stage_of' => :'Array<DomainDenormalizedThreatReference>',
    :'next_stages' => :'Array<DomainDenormalizedThreatReference>',
    :'plugin_of' => :'Array<DomainDenormalizedThreatReference>',
    :'plugins' => :'Array<DomainDenormalizedThreatReference>',
    :'purchased_by' => :'Array<DomainDenormalizedAdversaryReference>',
    :'purchased_by_count' => :'Integer',
    :'report_count' => :'Integer',
    :'reports' => :'Array<DomainDenormalizedReportReference>',
    :'seen_in_environment' => :'DomainMalwareEnvironmentAggregates',
    :'slug' => :'String',
    :'sold_by' => :'Array<DomainDenormalizedAdversaryReference>',
    :'sold_by_count' => :'Integer',
    :'status' => :'String',
    :'sub_botnet_of' => :'Array<DomainDenormalizedThreatReference>',
    :'sub_botnets' => :'Array<DomainDenormalizedThreatReference>',
    :'successor_of' => :'Array<DomainDenormalizedThreatReference>',
    :'successors' => :'Array<DomainDenormalizedThreatReference>',
    :'systems_targeted_count' => :'Integer',
    :'target_countries' => :'Array<DomainDenormalizedCountry>',
    :'target_industries' => :'Array<DomainDenormalizedSector>',
    :'targeting_profile' => :'Array<String>',
    :'targets_systems' => :'Array<DomainDenormalizedCustomerTarget>',
    :'threat_file_count' => :'Integer',
    :'threat_properties' => :'Array<String>',
    :'threat_relations_count' => :'Integer',
    :'used_by' => :'Array<DomainDenormalizedAdversaryReference>',
    :'used_by_count' => :'Integer',
    :'variant_of' => :'Array<DomainDenormalizedThreatReference>',
    :'variants' => :'Array<DomainDenormalizedThreatReference>',
    :'vulnerabilities' => :'Array<DomainVuln>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 603

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      actors_count == o.actors_count &&
      all_systems == o.all_systems &&
      associated_actors == o.associated_actors &&
      capabilities == o.capabilities &&
      community_identifiers == o.community_identifiers &&
      created_timestamp == o.created_timestamp &&
      description == o.description &&
      description_text_length == o.description_text_length &&
      developed_by == o.developed_by &&
      developed_by_count == o.developed_by_count &&
      distinct_indicator_count == o.distinct_indicator_count &&
      files_containing_threat_count == o.files_containing_threat_count &&
      id == o.id &&
      indicator_count == o.indicator_count &&
      kill_chain == o.kill_chain &&
      last_updated == o.last_updated &&
      mitre == o.mitre &&
      mitre_attack_count == o.mitre_attack_count &&
      mitre_tactic_count == o.mitre_tactic_count &&
      mitre_technique_count == o.mitre_technique_count &&
      motivation == o.motivation &&
      name == o.name &&
      next_stage_of == o.next_stage_of &&
      next_stages == o.next_stages &&
      plugin_of == o.plugin_of &&
      plugins == o.plugins &&
      purchased_by == o.purchased_by &&
      purchased_by_count == o.purchased_by_count &&
      report_count == o.report_count &&
      reports == o.reports &&
      seen_in_environment == o.seen_in_environment &&
      slug == o.slug &&
      sold_by == o.sold_by &&
      sold_by_count == o.sold_by_count &&
      status == o.status &&
      sub_botnet_of == o.sub_botnet_of &&
      sub_botnets == o.sub_botnets &&
      successor_of == o.successor_of &&
      successors == o.successors &&
      systems_targeted_count == o.systems_targeted_count &&
      target_countries == o.target_countries &&
      target_industries == o.target_industries &&
      targeting_profile == o.targeting_profile &&
      targets_systems == o.targets_systems &&
      threat_file_count == o.threat_file_count &&
      threat_properties == o.threat_properties &&
      threat_relations_count == o.threat_relations_count &&
      used_by == o.used_by &&
      used_by_count == o.used_by_count &&
      variant_of == o.variant_of &&
      variants == o.variants &&
      vulnerabilities == o.vulnerabilities
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



706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 706

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



777
778
779
780
781
782
783
784
785
786
787
788
789
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 777

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



682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 682

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


662
663
664
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 662

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



668
669
670
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 668

def hash
  [actors_count, all_systems, associated_actors, capabilities, community_identifiers, created_timestamp, description, description_text_length, developed_by, developed_by_count, distinct_indicator_count, files_containing_threat_count, id, indicator_count, kill_chain, last_updated, mitre, mitre_attack_count, mitre_tactic_count, mitre_technique_count, motivation, name, next_stage_of, next_stages, plugin_of, plugins, purchased_by, purchased_by_count, report_count, reports, seen_in_environment, slug, sold_by, sold_by_count, status, sub_botnet_of, sub_botnets, successor_of, successors, systems_targeted_count, target_countries, target_industries, targeting_profile, targets_systems, threat_file_count, threat_properties, threat_relations_count, used_by, used_by_count, variant_of, variants, vulnerabilities].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 580

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

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



753
754
755
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 753

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



759
760
761
762
763
764
765
766
767
768
769
770
771
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 759

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



747
748
749
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 747

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



595
596
597
598
599
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 595

def valid?
  return false if @id.nil?
  return false if @name.nil?
  true
end