Class: Falcon::DomainActorDocument

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

Overview

JSON definition of an Actor, also known as Adversary

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DomainActorDocument

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 332

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'supports_actors_count')
    self.supports_actors_count = attributes[:'supports_actors_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?(:'target_regions')
    if (value = attributes[:'target_regions']).is_a?(Array)
      self.target_regions = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#activeObject

Boolean field marking if actor is active



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

def active
  @active
end

#actor_typeObject

Actor type, one of: targeted, ecrime



40
41
42
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 40

def actor_type
  @actor_type
end

#animal_classifierObject

Actor’s family.



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

def animal_classifier
  @animal_classifier
end

#capabilitiesObject

actor’s capabilities, some examples: RAT,Ransomware,Spearphishing,Downloader,Backdoor,InformationStealer,exploit,CredentialHarvesting,dropper,DenialOfService,Loader,Phishing



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

def capabilities
  @capabilities
end

#capabilityObject

Returns the value of attribute capability.



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

def capability
  @capability
end

#created_dateObject

Actor’s document creation date when it was added to the Falcon portal in unix timestamp format



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

def created_date
  @created_date
end

#descriptionObject

Actor’s text description, partially containing structured data from other fields



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

def description
  @description
end

#description_lengthObject

Returns the value of attribute description_length.



56
57
58
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 56

def description_length
  @description_length
end

#develops_threatsObject

Returns the value of attribute develops_threats.



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

def develops_threats
  @develops_threats
end

#develops_threats_countObject

Returns the value of attribute develops_threats_count.



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

def develops_threats_count
  @develops_threats_count
end

#ecrime_kill_chainObject

Returns the value of attribute ecrime_kill_chain.



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

def ecrime_kill_chain
  @ecrime_kill_chain
end

#entitlementsObject

Field used to filter user’s access to actor documents



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

def entitlements
  @entitlements
end

#first_activity_dateObject

Actor’s first activity observed date in unix timestamp format



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

def first_activity_date
  @first_activity_date
end

#groupObject

Returns the value of attribute group.



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

def group
  @group
end

#has_subgroupObject

Returns the value of attribute has_subgroup.



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

def has_subgroup
  @has_subgroup
end

#has_subgroup_actors_countObject

Returns the value of attribute has_subgroup_actors_count.



74
75
76
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 74

def has_subgroup_actors_count
  @has_subgroup_actors_count
end

#has_successorObject

Returns the value of attribute has_successor.



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

def has_successor
  @has_successor
end

#has_successor_actors_countObject

Returns the value of attribute has_successor_actors_count.



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

def has_successor_actors_count
  @has_successor_actors_count
end

#idObject

Numerical ID for the Actor



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

def id
  @id
end

#imageObject

Returns the value of attribute image.



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

def image
  @image
end

#in_reportsObject

Returns the value of attribute in_reports.



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

def in_reports
  @in_reports
end

#in_reports_countObject

Returns the value of attribute in_reports_count.



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

def in_reports_count
  @in_reports_count
end

#is_subgroup_ofObject

Returns the value of attribute is_subgroup_of.



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

def is_subgroup_of
  @is_subgroup_of
end

#is_subgroup_of_actors_countObject

Returns the value of attribute is_subgroup_of_actors_count.



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

def is_subgroup_of_actors_count
  @is_subgroup_of_actors_count
end

#is_successor_ofObject

Returns the value of attribute is_successor_of.



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

def is_successor_of
  @is_successor_of
end

#is_successor_of_actors_countObject

Returns the value of attribute is_successor_of_actors_count.



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

def is_successor_of_actors_count
  @is_successor_of_actors_count
end

#is_supported_byObject

Returns the value of attribute is_supported_by.



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

def is_supported_by
  @is_supported_by
end

#is_supported_by_actors_countObject

Returns the value of attribute is_supported_by_actors_count.



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

def is_supported_by_actors_count
  @is_supported_by_actors_count
end

#kill_chainObject

Returns the value of attribute kill_chain.



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

def kill_chain
  @kill_chain
end

#known_asObject

Alternative names and community identifiers of an actor



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

def known_as
  @known_as
end

#last_activity_dateObject

Actor’s last (most recent) activity observed date in unix timestamp format



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

def last_activity_date
  @last_activity_date
end

#last_modified_dateObject

Actor’s document last modified date in unix timestamp format



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

def last_modified_date
  @last_modified_date
end

#motivationsObject

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



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

def motivations
  @motivations
end

#nameObject

Actor’s name, composed of 2 words



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

def name
  @name
end

#notify_usersObject

internal field



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

def notify_users
  @notify_users
end

#objectivesObject

Actor’s activity objectives, one of: IntelligenceGathering, FinancialGain, IntellectualPropertyTheft, defacement, Destruction, DenialOfService



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

def objectives
  @objectives
end

#originsObject

represents origin of actor’s activity and/or members, some examples: China,Russian Federation,Eastern Europe,Iran,East Asia, South Asia



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

def origins
  @origins
end

#recent_alertingObject

Recent CrowdStrike’s finished intelligence alerting date in unix timestamp format



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

def recent_alerting
  @recent_alerting
end

#regionObject

Returns the value of attribute region.



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

def region
  @region
end

#rich_text_descriptionObject

Rich text version of the description field



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

def rich_text_description
  @rich_text_description
end

#sells_threatsObject

Returns the value of attribute sells_threats.



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

def sells_threats
  @sells_threats
end

#sells_threats_countObject

Returns the value of attribute sells_threats_count.



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

def sells_threats_count
  @sells_threats_count
end

#short_descriptionObject

Short version of the description field



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

def short_description
  @short_description
end

#slugObject

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



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

def slug
  @slug
end

#statusObject

Status of an actor, one of: Active, Inactive, Retired



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

def status
  @status
end

#supportsObject

Returns the value of attribute supports.



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

def supports
  @supports
end

#supports_actors_countObject

Returns the value of attribute supports_actors_count.



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

def supports_actors_count
  @supports_actors_count
end

#target_countriesObject

Target countries of actor’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



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

def target_countries
  @target_countries
end

#target_industriesObject

Target economical industries of actor’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



156
157
158
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 156

def target_industries
  @target_industries
end

#target_regionsObject

Target geographic regions of actor’s activity and attacks. List of available values: North America, Western Europe, Southeast Asia, Middle East, Eastern Europe, South Asia, South America, Oceania, East Asia, Central Africa, Northern Europe, Southern Europe, North Africa, Southern Africa, Central America, Central Asia, East Africa, West Africa, Caribbean



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

def target_regions
  @target_regions
end

#thumbnailObject

Returns the value of attribute thumbnail.



161
162
163
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 161

def thumbnail
  @thumbnail
end

#urlObject

URL at which actor profile can be accessed



164
165
166
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 164

def url
  @url
end

#uses_distinct_indicators_countObject

Returns the value of attribute uses_distinct_indicators_count.



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

def uses_distinct_indicators_count
  @uses_distinct_indicators_count
end

#uses_indicators_countObject

Returns the value of attribute uses_indicators_count.



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

def uses_indicators_count
  @uses_indicators_count
end

#uses_mitre_attacks_countObject

Returns the value of attribute uses_mitre_attacks_count.



170
171
172
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 170

def uses_mitre_attacks_count
  @uses_mitre_attacks_count
end

#uses_mitre_tactics_countObject

Returns the value of attribute uses_mitre_tactics_count.



172
173
174
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 172

def uses_mitre_tactics_count
  @uses_mitre_tactics_count
end

#uses_mitre_techniques_countObject

Returns the value of attribute uses_mitre_techniques_count.



174
175
176
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 174

def uses_mitre_techniques_count
  @uses_mitre_techniques_count
end

#uses_threatsObject

Returns the value of attribute uses_threats.



176
177
178
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 176

def uses_threats
  @uses_threats
end

#uses_threats_countObject

Returns the value of attribute uses_threats_count.



178
179
180
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 178

def uses_threats_count
  @uses_threats_count
end

#uses_vulnerabilitiesObject

Comma separated values of vulnerabilities by CVE codes that are exploited by actor



181
182
183
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 181

def uses_vulnerabilities
  @uses_vulnerabilities
end

#vulnerabilities_countObject

Returns the value of attribute vulnerabilities_count.



183
184
185
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 183

def vulnerabilities_count
  @vulnerabilities_count
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



253
254
255
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 253

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 186

def self.attribute_map
  {
    :'active' => :'active',
    :'actor_type' => :'actor_type',
    :'animal_classifier' => :'animal_classifier',
    :'capabilities' => :'capabilities',
    :'capability' => :'capability',
    :'created_date' => :'created_date',
    :'description' => :'description',
    :'description_length' => :'description_length',
    :'develops_threats' => :'develops_threats',
    :'develops_threats_count' => :'develops_threats_count',
    :'ecrime_kill_chain' => :'ecrime_kill_chain',
    :'entitlements' => :'entitlements',
    :'first_activity_date' => :'first_activity_date',
    :'group' => :'group',
    :'has_subgroup' => :'has_subgroup',
    :'has_subgroup_actors_count' => :'has_subgroup_actors_count',
    :'has_successor' => :'has_successor',
    :'has_successor_actors_count' => :'has_successor_actors_count',
    :'id' => :'id',
    :'image' => :'image',
    :'in_reports' => :'in_reports',
    :'in_reports_count' => :'in_reports_count',
    :'is_subgroup_of' => :'is_subgroup_of',
    :'is_subgroup_of_actors_count' => :'is_subgroup_of_actors_count',
    :'is_successor_of' => :'is_successor_of',
    :'is_successor_of_actors_count' => :'is_successor_of_actors_count',
    :'is_supported_by' => :'is_supported_by',
    :'is_supported_by_actors_count' => :'is_supported_by_actors_count',
    :'kill_chain' => :'kill_chain',
    :'known_as' => :'known_as',
    :'last_activity_date' => :'last_activity_date',
    :'last_modified_date' => :'last_modified_date',
    :'motivations' => :'motivations',
    :'name' => :'name',
    :'notify_users' => :'notify_users',
    :'objectives' => :'objectives',
    :'origins' => :'origins',
    :'recent_alerting' => :'recent_alerting',
    :'region' => :'region',
    :'rich_text_description' => :'rich_text_description',
    :'sells_threats' => :'sells_threats',
    :'sells_threats_count' => :'sells_threats_count',
    :'short_description' => :'short_description',
    :'slug' => :'slug',
    :'status' => :'status',
    :'supports' => :'supports',
    :'supports_actors_count' => :'supports_actors_count',
    :'target_countries' => :'target_countries',
    :'target_industries' => :'target_industries',
    :'target_regions' => :'target_regions',
    :'thumbnail' => :'thumbnail',
    :'url' => :'url',
    :'uses_distinct_indicators_count' => :'uses_distinct_indicators_count',
    :'uses_indicators_count' => :'uses_indicators_count',
    :'uses_mitre_attacks_count' => :'uses_mitre_attacks_count',
    :'uses_mitre_tactics_count' => :'uses_mitre_tactics_count',
    :'uses_mitre_techniques_count' => :'uses_mitre_techniques_count',
    :'uses_threats' => :'uses_threats',
    :'uses_threats_count' => :'uses_threats_count',
    :'uses_vulnerabilities' => :'uses_vulnerabilities',
    :'vulnerabilities_count' => :'vulnerabilities_count'
  }
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



809
810
811
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 809

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

.openapi_nullableObject

List of attributes with nullable: true



325
326
327
328
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 325

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'active' => :'Boolean',
    :'actor_type' => :'String',
    :'animal_classifier' => :'String',
    :'capabilities' => :'Array<DomainEntity>',
    :'capability' => :'DomainEntity',
    :'created_date' => :'Integer',
    :'description' => :'String',
    :'description_length' => :'Integer',
    :'develops_threats' => :'Array<DomainThreatEntity>',
    :'develops_threats_count' => :'Integer',
    :'ecrime_kill_chain' => :'DomainECrimeKillChain',
    :'entitlements' => :'Array<DomainEntity>',
    :'first_activity_date' => :'Integer',
    :'group' => :'DomainEntity',
    :'has_subgroup' => :'Array<DomainActorEntity>',
    :'has_subgroup_actors_count' => :'Integer',
    :'has_successor' => :'Array<DomainActorEntity>',
    :'has_successor_actors_count' => :'Integer',
    :'id' => :'Integer',
    :'image' => :'DomainImage',
    :'in_reports' => :'Array<DomainActorNewsDocument>',
    :'in_reports_count' => :'Integer',
    :'is_subgroup_of' => :'Array<DomainActorEntity>',
    :'is_subgroup_of_actors_count' => :'Integer',
    :'is_successor_of' => :'Array<DomainActorEntity>',
    :'is_successor_of_actors_count' => :'Integer',
    :'is_supported_by' => :'Array<DomainActorEntity>',
    :'is_supported_by_actors_count' => :'Integer',
    :'kill_chain' => :'DomainKillChain',
    :'known_as' => :'String',
    :'last_activity_date' => :'Integer',
    :'last_modified_date' => :'Integer',
    :'motivations' => :'Array<DomainEntity>',
    :'name' => :'String',
    :'notify_users' => :'Boolean',
    :'objectives' => :'Array<DomainEntity>',
    :'origins' => :'Array<DomainEntity>',
    :'recent_alerting' => :'Integer',
    :'region' => :'DomainEntity',
    :'rich_text_description' => :'String',
    :'sells_threats' => :'Array<DomainThreatEntity>',
    :'sells_threats_count' => :'Integer',
    :'short_description' => :'String',
    :'slug' => :'String',
    :'status' => :'String',
    :'supports' => :'Array<DomainActorEntity>',
    :'supports_actors_count' => :'Integer',
    :'target_countries' => :'Array<DomainEntity>',
    :'target_industries' => :'Array<DomainEntity>',
    :'target_regions' => :'Array<DomainEntity>',
    :'thumbnail' => :'DomainImage',
    :'url' => :'String',
    :'uses_distinct_indicators_count' => :'Integer',
    :'uses_indicators_count' => :'Integer',
    :'uses_mitre_attacks_count' => :'Integer',
    :'uses_mitre_tactics_count' => :'Integer',
    :'uses_mitre_techniques_count' => :'Integer',
    :'uses_threats' => :'Array<DomainThreatEntity>',
    :'uses_threats_count' => :'Integer',
    :'uses_vulnerabilities' => :'Array<String>',
    :'vulnerabilities_count' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 728

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      active == o.active &&
      actor_type == o.actor_type &&
      animal_classifier == o.animal_classifier &&
      capabilities == o.capabilities &&
      capability == o.capability &&
      created_date == o.created_date &&
      description == o.description &&
      description_length == o.description_length &&
      develops_threats == o.develops_threats &&
      develops_threats_count == o.develops_threats_count &&
      ecrime_kill_chain == o.ecrime_kill_chain &&
      entitlements == o.entitlements &&
      first_activity_date == o.first_activity_date &&
      group == o.group &&
      has_subgroup == o.has_subgroup &&
      has_subgroup_actors_count == o.has_subgroup_actors_count &&
      has_successor == o.has_successor &&
      has_successor_actors_count == o.has_successor_actors_count &&
      id == o.id &&
      image == o.image &&
      in_reports == o.in_reports &&
      in_reports_count == o.in_reports_count &&
      is_subgroup_of == o.is_subgroup_of &&
      is_subgroup_of_actors_count == o.is_subgroup_of_actors_count &&
      is_successor_of == o.is_successor_of &&
      is_successor_of_actors_count == o.is_successor_of_actors_count &&
      is_supported_by == o.is_supported_by &&
      is_supported_by_actors_count == o.is_supported_by_actors_count &&
      kill_chain == o.kill_chain &&
      known_as == o.known_as &&
      last_activity_date == o.last_activity_date &&
      last_modified_date == o.last_modified_date &&
      motivations == o.motivations &&
      name == o.name &&
      notify_users == o.notify_users &&
      objectives == o.objectives &&
      origins == o.origins &&
      recent_alerting == o.recent_alerting &&
      region == o.region &&
      rich_text_description == o.rich_text_description &&
      sells_threats == o.sells_threats &&
      sells_threats_count == o.sells_threats_count &&
      short_description == o.short_description &&
      slug == o.slug &&
      status == o.status &&
      supports == o.supports &&
      supports_actors_count == o.supports_actors_count &&
      target_countries == o.target_countries &&
      target_industries == o.target_industries &&
      target_regions == o.target_regions &&
      thumbnail == o.thumbnail &&
      url == o.url &&
      uses_distinct_indicators_count == o.uses_distinct_indicators_count &&
      uses_indicators_count == o.uses_indicators_count &&
      uses_mitre_attacks_count == o.uses_mitre_attacks_count &&
      uses_mitre_tactics_count == o.uses_mitre_tactics_count &&
      uses_mitre_techniques_count == o.uses_mitre_techniques_count &&
      uses_threats == o.uses_threats &&
      uses_threats_count == o.uses_threats_count &&
      uses_vulnerabilities == o.uses_vulnerabilities &&
      vulnerabilities_count == o.vulnerabilities_count
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



840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 840

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



911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 911

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



816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 816

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


796
797
798
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 796

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



802
803
804
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 802

def hash
  [active, actor_type, animal_classifier, capabilities, capability, created_date, description, description_length, develops_threats, develops_threats_count, ecrime_kill_chain, entitlements, first_activity_date, group, has_subgroup, has_subgroup_actors_count, has_successor, has_successor_actors_count, id, image, in_reports, in_reports_count, is_subgroup_of, is_subgroup_of_actors_count, is_successor_of, is_successor_of_actors_count, is_supported_by, is_supported_by_actors_count, kill_chain, known_as, last_activity_date, last_modified_date, motivations, name, notify_users, objectives, origins, recent_alerting, region, rich_text_description, sells_threats, sells_threats_count, short_description, slug, status, supports, supports_actors_count, target_countries, target_industries, target_regions, thumbnail, url, uses_distinct_indicators_count, uses_indicators_count, uses_mitre_attacks_count, uses_mitre_tactics_count, uses_mitre_techniques_count, uses_threats, uses_threats_count, uses_vulnerabilities, vulnerabilities_count].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 630

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



887
888
889
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 887

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



893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 893

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



881
882
883
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 881

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



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
# File 'lib/crimson-falcon/models/domain_actor_document.rb', line 705

def valid?
  return false if @active.nil?
  return false if @capabilities.nil?
  return false if @created_date.nil?
  return false if @first_activity_date.nil?
  return false if @id.nil?
  return false if @known_as.nil?
  return false if @last_activity_date.nil?
  return false if @last_modified_date.nil?
  return false if @motivations.nil?
  return false if @notify_users.nil?
  return false if @objectives.nil?
  return false if @origins.nil?
  return false if @short_description.nil?
  return false if @status.nil?
  return false if @target_countries.nil?
  return false if @target_industries.nil?
  return false if @target_regions.nil?
  true
end