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



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

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?(:'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.



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

def actors_count
  @actors_count
end

#all_systemsObject

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



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

def all_systems
  @all_systems
end

#associated_actorsObject

All the actors related to this Malware



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

def associated_actors
  @associated_actors
end

#capabilitiesObject

Returns the value of attribute capabilities.



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

def capabilities
  @capabilities
end

#community_identifiersObject

Malware’s community identifiers



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

def community_identifiers
  @community_identifiers
end

#created_timestampObject

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



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

def created_timestamp
  @created_timestamp
end

#descriptionObject

Malware’s text description



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

def description
  @description
end

#description_text_lengthObject

Returns the value of attribute description_text_length.



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

def description_text_length
  @description_text_length
end

#developed_byObject

Actors that developed this Malware



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

def developed_by
  @developed_by
end

#developed_by_countObject

Returns the value of attribute developed_by_count.



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

def developed_by_count
  @developed_by_count
end

#files_containing_threat_countObject

Returns the value of attribute files_containing_threat_count.



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

def files_containing_threat_count
  @files_containing_threat_count
end

#idObject

Alphanumeric ID for the Malware



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

def id
  @id
end

#indicator_countObject

Returns the value of attribute indicator_count.



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

def indicator_count
  @indicator_count
end

#kill_chainObject

Returns the value of attribute kill_chain.



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

def kill_chain
  @kill_chain
end

#last_updatedObject

Malware’s last updated date in unix timestamp format



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

def last_updated
  @last_updated
end

#mitreObject

MITRE used by this Malware



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

def mitre
  @mitre
end

#mitre_attack_countObject

Returns the value of attribute mitre_attack_count.



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

def mitre_attack_count
  @mitre_attack_count
end

#mitre_tactic_countObject

Returns the value of attribute mitre_tactic_count.



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

def mitre_tactic_count
  @mitre_tactic_count
end

#mitre_technique_countObject

Returns the value of attribute mitre_technique_count.



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

def mitre_technique_count
  @mitre_technique_count
end

#motivationObject

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



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

def motivation
  @motivation
end

#nameObject

Malware’s family name



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

def name
  @name
end

#next_stage_ofObject

The previous stage of this Malware



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

def next_stage_of
  @next_stage_of
end

#next_stagesObject

The next stages of this Malware



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

def next_stages
  @next_stages
end

#plugin_ofObject

The parent of this Malware



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

def plugin_of
  @plugin_of
end

#pluginsObject

The plugins of this Malware



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

def plugins
  @plugins
end

#purchased_byObject

Actors that purchase this Malware



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

def purchased_by
  @purchased_by
end

#purchased_by_countObject

Returns the value of attribute purchased_by_count.



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

def purchased_by_count
  @purchased_by_count
end

#report_countObject

Returns the value of attribute report_count.



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

def report_count
  @report_count
end

#reportsObject

Reports that contain this Malware



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

def reports
  @reports
end

#seen_in_environmentObject

Returns the value of attribute seen_in_environment.



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

def seen_in_environment
  @seen_in_environment
end

#slugObject

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



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

def slug
  @slug
end

#sold_byObject

Actors that sell this Malware



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

def sold_by
  @sold_by
end

#sold_by_countObject

Returns the value of attribute sold_by_count.



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

def sold_by_count
  @sold_by_count
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#sub_botnet_ofObject

The parent botnet of this Malware



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

def sub_botnet_of
  @sub_botnet_of
end

#sub_botnetsObject

The sub-botnets of this Malware



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

def sub_botnets
  @sub_botnets
end

#successor_ofObject

The predecessor of this Malware



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

def successor_of
  @successor_of
end

#successorsObject

The successors of this Malware



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

def successors
  @successors
end

#systems_targeted_countObject

Returns the value of attribute systems_targeted_count.



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

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



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

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



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

def target_industries
  @target_industries
end

#targeting_profileObject

Malware’s targeting profile



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

def targeting_profile
  @targeting_profile
end

#targets_systemsObject

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



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

def targets_systems
  @targets_systems
end

#threat_file_countObject

Returns the value of attribute threat_file_count.



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

def threat_file_count
  @threat_file_count
end

#threat_propertiesObject

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



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

def threat_properties
  @threat_properties
end

#threat_relations_countObject

Returns the value of attribute threat_relations_count.



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

def threat_relations_count
  @threat_relations_count
end

#used_byObject

Actors that use this Malware



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

def used_by
  @used_by
end

#used_by_countObject

Returns the value of attribute used_by_count.



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

def used_by_count
  @used_by_count
end

#variant_ofObject

The parent variant of this Malware



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

def variant_of
  @variant_of
end

#variantsObject

The variants of this Malware



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

def variants
  @variants
end

#vulnerabilitiesObject

Vulnerabilities this Malware exploits



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

def vulnerabilities
  @vulnerabilities
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



228
229
230
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 228

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 171

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',
    :'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



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

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

.openapi_nullableObject

List of attributes with nullable: true



290
291
292
293
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 290

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

.openapi_typesObject

Attribute type mapping.



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

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',
    :'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



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
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 596

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 &&
      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



698
699
700
701
702
703
704
705
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
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 698

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



769
770
771
772
773
774
775
776
777
778
779
780
781
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 769

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



674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 674

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


654
655
656
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 654

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



660
661
662
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 660

def hash
  [actors_count, all_systems, associated_actors, capabilities, community_identifiers, created_timestamp, description, description_text_length, developed_by, developed_by_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



573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 573

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



745
746
747
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 745

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



751
752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 751

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



739
740
741
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 739

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



588
589
590
591
592
# File 'lib/crimson-falcon/models/domain_malware_document.rb', line 588

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