Class: Falcon::ResourcesCloudResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ResourcesCloudResource

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



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

def 
  @account_id
end

#account_nameObject

Returns the value of attribute account_name.



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

def 
  @account_name
end

#activeObject

Returns the value of attribute active.



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

def active
  @active
end

#arnObject

Returns the value of attribute arn.



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

def arn
  @arn
end

#categoryObject

Returns the value of attribute category.



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

def category
  @category
end

#cidObject

Returns the value of attribute cid.



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

def cid
  @cid
end

#cloud_contextObject

Returns the value of attribute cloud_context.



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

def cloud_context
  @cloud_context
end

#cloud_groupsObject

Returns the value of attribute cloud_groups.



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

def cloud_groups
  @cloud_groups
end

#cloud_groups_v2Object

Returns the value of attribute cloud_groups_v2.



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

def cloud_groups_v2
  @cloud_groups_v2
end

#cloud_labelsObject

Returns the value of attribute cloud_labels.



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

def cloud_labels
  @cloud_labels
end

#cloud_providerObject

Returns the value of attribute cloud_provider.



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

def cloud_provider
  @cloud_provider
end

#cluster_idObject

Returns the value of attribute cluster_id.



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

def cluster_id
  @cluster_id
end

#cluster_nameObject

Returns the value of attribute cluster_name.



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

def cluster_name
  @cluster_name
end

#compartment_nameObject

Returns the value of attribute compartment_name.



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

def compartment_name
  @compartment_name
end

#compartment_ocidObject

Returns the value of attribute compartment_ocid.



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

def compartment_ocid
  @compartment_ocid
end

#compartment_pathObject

Returns the value of attribute compartment_path.



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

def compartment_path
  @compartment_path
end

#configurationObject

Returns the value of attribute configuration.



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

def configuration
  @configuration
end

#configuration_metadataObject

Returns the value of attribute configuration_metadata.



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

def 
  @configuration_metadata
end

#creation_timeObject

Returns the value of attribute creation_time.



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

def creation_time
  @creation_time
end

#first_seenObject

Returns the value of attribute first_seen.



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

def first_seen
  @first_seen
end

#gcrnObject

Returns the value of attribute gcrn.



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

def gcrn
  @gcrn
end

#groupsObject

Returns the value of attribute groups.



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

def groups
  @groups
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



583
584
585
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 583

def hash
  @hash
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#locationObject

Returns the value of attribute location.



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

def location
  @location
end

#organization_idObject

Returns the value of attribute organization_id.



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

def organization_id
  @organization_id
end

#parentObject

Returns the value of attribute parent.



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

def parent
  @parent
end

#project_idObject

Returns the value of attribute project_id.



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

def project_id
  @project_id
end

#project_numberObject

Returns the value of attribute project_number.



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

def project_number
  @project_number
end

#regionObject

Returns the value of attribute region.



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

def region
  @region
end

#relationshipsObject

Returns the value of attribute relationships.



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

def relationships
  @relationships
end

#resource_groupObject

Returns the value of attribute resource_group.



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

def resource_group
  @resource_group
end

#resource_idObject

Returns the value of attribute resource_id.



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

def resource_id
  @resource_id
end

#resource_nameObject

Returns the value of attribute resource_name.



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

def resource_name
  @resource_name
end

#resource_numberObject

Returns the value of attribute resource_number.



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

def resource_number
  @resource_number
end

#resource_typeObject

Returns the value of attribute resource_type.



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

def resource_type
  @resource_type
end

#resource_type_nameObject

Returns the value of attribute resource_type_name.



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

def resource_type_name
  @resource_type_name
end

#resource_urlObject

Returns the value of attribute resource_url.



108
109
110
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 108

def resource_url
  @resource_url
end

#revisionObject

Returns the value of attribute revision.



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

def revision
  @revision
end

#serviceObject

Returns the value of attribute service.



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

def service
  @service
end

#service_categoryObject

Returns the value of attribute service_category.



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

def service_category
  @service_category
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#supplementary_configurationObject

Returns the value of attribute supplementary_configuration.



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

def supplementary_configuration
  @supplementary_configuration
end

#tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
end

#tenancy_nameObject

Returns the value of attribute tenancy_name.



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

def tenancy_name
  @tenancy_name
end

#tenancy_ocidObject

Returns the value of attribute tenancy_ocid.



126
127
128
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 126

def tenancy_ocid
  @tenancy_ocid
end

#tenancy_typeObject

Returns the value of attribute tenancy_type.



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

def tenancy_type
  @tenancy_type
end

#tenant_idObject

Returns the value of attribute tenant_id.



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

def tenant_id
  @tenant_id
end

#updated_atObject

Returns the value of attribute updated_at.



132
133
134
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 132

def updated_at
  @updated_at
end

#zoneObject

Returns the value of attribute zone.



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

def zone
  @zone
end

#zonesObject

Returns the value of attribute zones.



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

def zones
  @zones
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



197
198
199
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 197

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



139
140
141
142
143
144
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
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 139

def self.attribute_map
  {
    :'account_id' => :'account_id',
    :'account_name' => :'account_name',
    :'active' => :'active',
    :'arn' => :'arn',
    :'category' => :'category',
    :'cid' => :'cid',
    :'cloud_context' => :'cloud_context',
    :'cloud_groups' => :'cloud_groups',
    :'cloud_groups_v2' => :'cloud_groups_v2',
    :'cloud_labels' => :'cloud_labels',
    :'cloud_provider' => :'cloud_provider',
    :'cluster_id' => :'cluster_id',
    :'cluster_name' => :'cluster_name',
    :'compartment_name' => :'compartment_name',
    :'compartment_ocid' => :'compartment_ocid',
    :'compartment_path' => :'compartment_path',
    :'configuration' => :'configuration',
    :'configuration_metadata' => :'configuration_metadata',
    :'creation_time' => :'creation_time',
    :'first_seen' => :'first_seen',
    :'gcrn' => :'gcrn',
    :'groups' => :'groups',
    :'hash' => :'hash',
    :'id' => :'id',
    :'location' => :'location',
    :'organization_id' => :'organization_id',
    :'parent' => :'parent',
    :'project_id' => :'project_id',
    :'project_number' => :'project_number',
    :'region' => :'region',
    :'relationships' => :'relationships',
    :'resource_group' => :'resource_group',
    :'resource_id' => :'resource_id',
    :'resource_name' => :'resource_name',
    :'resource_number' => :'resource_number',
    :'resource_type' => :'resource_type',
    :'resource_type_name' => :'resource_type_name',
    :'resource_url' => :'resource_url',
    :'revision' => :'revision',
    :'service' => :'service',
    :'service_category' => :'service_category',
    :'status' => :'status',
    :'subscription_id' => :'subscription_id',
    :'supplementary_configuration' => :'supplementary_configuration',
    :'tags' => :'tags',
    :'tenancy_name' => :'tenancy_name',
    :'tenancy_ocid' => :'tenancy_ocid',
    :'tenancy_type' => :'tenancy_type',
    :'tenant_id' => :'tenant_id',
    :'updated_at' => :'updated_at',
    :'zone' => :'zone',
    :'zones' => :'zones'
  }
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



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

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

.openapi_nullableObject

List of attributes with nullable: true



260
261
262
263
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 260

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'account_id' => :'String',
    :'account_name' => :'String',
    :'active' => :'Boolean',
    :'arn' => :'String',
    :'category' => :'String',
    :'cid' => :'String',
    :'cloud_context' => :'ResourcesCloudContext',
    :'cloud_groups' => :'Array<DomainCloudScope>',
    :'cloud_groups_v2' => :'Array<DomainCloudGroup>',
    :'cloud_labels' => :'Array<ClassificationLabel>',
    :'cloud_provider' => :'String',
    :'cluster_id' => :'String',
    :'cluster_name' => :'String',
    :'compartment_name' => :'String',
    :'compartment_ocid' => :'String',
    :'compartment_path' => :'String',
    :'configuration' => :'Object',
    :'configuration_metadata' => :'Object',
    :'creation_time' => :'Time',
    :'first_seen' => :'Time',
    :'gcrn' => :'String',
    :'groups' => :'Array<String>',
    :'hash' => :'String',
    :'id' => :'String',
    :'location' => :'String',
    :'organization_id' => :'String',
    :'parent' => :'String',
    :'project_id' => :'String',
    :'project_number' => :'String',
    :'region' => :'String',
    :'relationships' => :'Array<ResourcesRelationship>',
    :'resource_group' => :'String',
    :'resource_id' => :'String',
    :'resource_name' => :'String',
    :'resource_number' => :'String',
    :'resource_type' => :'String',
    :'resource_type_name' => :'String',
    :'resource_url' => :'String',
    :'revision' => :'Integer',
    :'service' => :'String',
    :'service_category' => :'String',
    :'status' => :'String',
    :'subscription_id' => :'String',
    :'supplementary_configuration' => :'Object',
    :'tags' => :'Hash<String, String>',
    :'tenancy_name' => :'String',
    :'tenancy_ocid' => :'String',
    :'tenancy_type' => :'String',
    :'tenant_id' => :'String',
    :'updated_at' => :'Time',
    :'zone' => :'String',
    :'zones' => :'Array<Object>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
       == o. &&
      active == o.active &&
      arn == o.arn &&
      category == o.category &&
      cid == o.cid &&
      cloud_context == o.cloud_context &&
      cloud_groups == o.cloud_groups &&
      cloud_groups_v2 == o.cloud_groups_v2 &&
      cloud_labels == o.cloud_labels &&
      cloud_provider == o.cloud_provider &&
      cluster_id == o.cluster_id &&
      cluster_name == o.cluster_name &&
      compartment_name == o.compartment_name &&
      compartment_ocid == o.compartment_ocid &&
      compartment_path == o.compartment_path &&
      configuration == o.configuration &&
       == o. &&
      creation_time == o.creation_time &&
      first_seen == o.first_seen &&
      gcrn == o.gcrn &&
      groups == o.groups &&
      hash == o.hash &&
      id == o.id &&
      location == o.location &&
      organization_id == o.organization_id &&
      parent == o.parent &&
      project_id == o.project_id &&
      project_number == o.project_number &&
      region == o.region &&
      relationships == o.relationships &&
      resource_group == o.resource_group &&
      resource_id == o.resource_id &&
      resource_name == o.resource_name &&
      resource_number == o.resource_number &&
      resource_type == o.resource_type &&
      resource_type_name == o.resource_type_name &&
      resource_url == o.resource_url &&
      revision == o.revision &&
      service == o.service &&
      service_category == o.service_category &&
      status == o.status &&
      subscription_id == o.subscription_id &&
      supplementary_configuration == o.supplementary_configuration &&
      tags == o.tags &&
      tenancy_name == o.tenancy_name &&
      tenancy_ocid == o.tenancy_ocid &&
      tenancy_type == o.tenancy_type &&
      tenant_id == o.tenant_id &&
      updated_at == o.updated_at &&
      zone == o.zone &&
      zones == o.zones
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



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 621

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



692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 692

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



597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 597

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


577
578
579
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 577

def eql?(o)
  self == o
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



505
506
507
508
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 505

def list_invalid_properties
  invalid_properties = Array.new
  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



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

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



674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 674

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



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

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



512
513
514
# File 'lib/crimson-falcon/models/resources_cloud_resource.rb', line 512

def valid?
  true
end