Class: Falcon::RisksUnionCloudRisk

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RisksUnionCloudRisk

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 191

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



34
35
36
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 34

def 
  @account_id
end

#account_nameObject

Returns the value of attribute account_name.



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

def 
  @account_name
end

#adversariesObject

Returns the value of attribute adversaries.



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

def adversaries
  @adversaries
end

#agv2_idObject

Returns the value of attribute agv2_id.



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

def agv2_id
  @agv2_id
end

#asset_gcrnObject

Returns the value of attribute asset_gcrn.



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

def asset_gcrn
  @asset_gcrn
end

#asset_idObject

Returns the value of attribute asset_id.



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

def asset_id
  @asset_id
end

#asset_nameObject

Returns the value of attribute asset_name.



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

def asset_name
  @asset_name
end

#asset_regionObject

Returns the value of attribute asset_region.



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

def asset_region
  @asset_region
end

#asset_tagsObject

Returns the value of attribute asset_tags.



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

def asset_tags
  @asset_tags
end

#asset_typeObject

Returns the value of attribute asset_type.



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

def asset_type
  @asset_type
end

#cidObject

Returns the value of attribute cid.



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

def cid
  @cid
end

#cloud_groupsObject

Returns the value of attribute cloud_groups.



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

def cloud_groups
  @cloud_groups
end

#commentsObject

Returns the value of attribute comments.



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

def comments
  @comments
end

#crnObject

Returns the value of attribute crn.



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

def crn
  @crn
end

#disabledObject

Returns the value of attribute disabled.



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

def disabled
  @disabled
end

#edgesObject

Returns the value of attribute edges.



64
65
66
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 64

def edges
  @edges
end

#first_seenObject

Returns the value of attribute first_seen.



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

def first_seen
  @first_seen
end

#graphObject

Returns the value of attribute graph.



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

def graph
  @graph
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#insight_categoriesObject

Returns the value of attribute insight_categories.



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

def insight_categories
  @insight_categories
end

#last_seenObject

Returns the value of attribute last_seen.



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

def last_seen
  @last_seen
end

#providerObject

Returns the value of attribute provider.



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

def provider
  @provider
end

#resolved_atObject

Returns the value of attribute resolved_at.



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

def resolved_at
  @resolved_at
end

#risk_factorsObject

Returns the value of attribute risk_factors.



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

def risk_factors
  @risk_factors
end

#rule_descriptionObject

Returns the value of attribute rule_description.



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

def rule_description
  @rule_description
end

#rule_idObject

Returns the value of attribute rule_id.



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

def rule_id
  @rule_id
end

#rule_nameObject

Returns the value of attribute rule_name.



86
87
88
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 86

def rule_name
  @rule_name
end

#scoreObject

Returns the value of attribute score.



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

def score
  @score
end

#service_categoryObject

Returns the value of attribute service_category.



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

def service_category
  @service_category
end

#severityObject

Returns the value of attribute severity.



92
93
94
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 92

def severity
  @severity
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#suppressionObject

Returns the value of attribute suppression.



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

def suppression
  @suppression
end

#verticesObject

Returns the value of attribute vertices.



98
99
100
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 98

def vertices
  @vertices
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



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

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 101

def self.attribute_map
  {
    :'account_id' => :'account_id',
    :'account_name' => :'account_name',
    :'adversaries' => :'adversaries',
    :'agv2_id' => :'agv2_id',
    :'asset_gcrn' => :'asset_gcrn',
    :'asset_id' => :'asset_id',
    :'asset_name' => :'asset_name',
    :'asset_region' => :'asset_region',
    :'asset_tags' => :'asset_tags',
    :'asset_type' => :'asset_type',
    :'cid' => :'cid',
    :'cloud_groups' => :'cloud_groups',
    :'comments' => :'comments',
    :'crn' => :'crn',
    :'disabled' => :'disabled',
    :'edges' => :'edges',
    :'first_seen' => :'first_seen',
    :'graph' => :'graph',
    :'id' => :'id',
    :'insight_categories' => :'insight_categories',
    :'last_seen' => :'last_seen',
    :'provider' => :'provider',
    :'resolved_at' => :'resolved_at',
    :'risk_factors' => :'risk_factors',
    :'rule_description' => :'rule_description',
    :'rule_id' => :'rule_id',
    :'rule_name' => :'rule_name',
    :'score' => :'score',
    :'service_category' => :'service_category',
    :'severity' => :'severity',
    :'status' => :'status',
    :'suppression' => :'suppression',
    :'vertices' => :'vertices'
  }
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



526
527
528
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 526

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

.openapi_nullableObject

List of attributes with nullable: true



184
185
186
187
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 184

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

.openapi_typesObject

Attribute type mapping.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 145

def self.openapi_types
  {
    :'account_id' => :'String',
    :'account_name' => :'String',
    :'adversaries' => :'Array<String>',
    :'agv2_id' => :'String',
    :'asset_gcrn' => :'String',
    :'asset_id' => :'String',
    :'asset_name' => :'String',
    :'asset_region' => :'String',
    :'asset_tags' => :'Array<String>',
    :'asset_type' => :'String',
    :'cid' => :'String',
    :'cloud_groups' => :'Array<String>',
    :'comments' => :'Array<RiskComments>',
    :'crn' => :'String',
    :'disabled' => :'Boolean',
    :'edges' => :'Array<RisksEdge>',
    :'first_seen' => :'Time',
    :'graph' => :'RisksGraph',
    :'id' => :'String',
    :'insight_categories' => :'Array<String>',
    :'last_seen' => :'Time',
    :'provider' => :'String',
    :'resolved_at' => :'Time',
    :'risk_factors' => :'Array<Object>',
    :'rule_description' => :'String',
    :'rule_id' => :'String',
    :'rule_name' => :'String',
    :'score' => :'Integer',
    :'service_category' => :'String',
    :'severity' => :'String',
    :'status' => :'String',
    :'suppression' => :'RiskSuppression',
    :'vertices' => :'Array<RisksVertex>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
       == o. &&
      adversaries == o.adversaries &&
      agv2_id == o.agv2_id &&
      asset_gcrn == o.asset_gcrn &&
      asset_id == o.asset_id &&
      asset_name == o.asset_name &&
      asset_region == o.asset_region &&
      asset_tags == o.asset_tags &&
      asset_type == o.asset_type &&
      cid == o.cid &&
      cloud_groups == o.cloud_groups &&
      comments == o.comments &&
      crn == o.crn &&
      disabled == o.disabled &&
      edges == o.edges &&
      first_seen == o.first_seen &&
      graph == o.graph &&
      id == o.id &&
      insight_categories == o.insight_categories &&
      last_seen == o.last_seen &&
      provider == o.provider &&
      resolved_at == o.resolved_at &&
      risk_factors == o.risk_factors &&
      rule_description == o.rule_description &&
      rule_id == o.rule_id &&
      rule_name == o.rule_name &&
      score == o.score &&
      service_category == o.service_category &&
      severity == o.severity &&
      status == o.status &&
      suppression == o.suppression &&
      vertices == o.vertices
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



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

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



628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 628

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



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 533

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


513
514
515
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 513

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



519
520
521
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 519

def hash
  [, , adversaries, agv2_id, asset_gcrn, asset_id, asset_name, asset_region, asset_tags, asset_type, cid, cloud_groups, comments, crn, disabled, edges, first_seen, graph, id, insight_categories, last_seen, provider, resolved_at, risk_factors, rule_description, rule_id, rule_name, score, service_category, severity, status, suppression, vertices].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



604
605
606
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 604

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



610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 610

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



598
599
600
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 598

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



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/crimson-falcon/models/risks_union_cloud_risk.rb', line 446

def valid?
  return false if @account_id.nil?
  return false if @account_name.nil?
  return false if @adversaries.nil?
  return false if @asset_gcrn.nil?
  return false if @asset_id.nil?
  return false if @asset_name.nil?
  return false if @asset_type.nil?
  return false if @cid.nil?
  return false if @cloud_groups.nil?
  return false if @crn.nil?
  return false if @disabled.nil?
  return false if @first_seen.nil?
  return false if @id.nil?
  return false if @provider.nil?
  return false if @rule_description.nil?
  return false if @rule_id.nil?
  return false if @rule_name.nil?
  return false if @score.nil?
  return false if @service_category.nil?
  return false if @severity.nil?
  return false if @status.nil?
  true
end