Class: OCI::FusionApps::Models::FusionEnvironment

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/fusion_apps/models/fusion_environment.rb

Overview

Description of FusionEnvironment.

Constant Summary collapse

FUSION_ENVIRONMENT_TYPE_ENUM =
[
  FUSION_ENVIRONMENT_TYPE_PRODUCTION = 'PRODUCTION'.freeze,
  FUSION_ENVIRONMENT_TYPE_TEST = 'TEST'.freeze,
  FUSION_ENVIRONMENT_TYPE_DEVELOPMENT = 'DEVELOPMENT'.freeze,
  FUSION_ENVIRONMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FusionEnvironment

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 256

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.id = attributes[:'id'] if attributes[:'id']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.maintenance_policy = attributes[:'maintenancePolicy'] if attributes[:'maintenancePolicy']

  raise 'You cannot provide both :maintenancePolicy and :maintenance_policy' if attributes.key?(:'maintenancePolicy') && attributes.key?(:'maintenance_policy')

  self.maintenance_policy = attributes[:'maintenance_policy'] if attributes[:'maintenance_policy']

  self.time_upcoming_maintenance = attributes[:'timeUpcomingMaintenance'] if attributes[:'timeUpcomingMaintenance']

  raise 'You cannot provide both :timeUpcomingMaintenance and :time_upcoming_maintenance' if attributes.key?(:'timeUpcomingMaintenance') && attributes.key?(:'time_upcoming_maintenance')

  self.time_upcoming_maintenance = attributes[:'time_upcoming_maintenance'] if attributes[:'time_upcoming_maintenance']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.fusion_environment_family_id = attributes[:'fusionEnvironmentFamilyId'] if attributes[:'fusionEnvironmentFamilyId']

  raise 'You cannot provide both :fusionEnvironmentFamilyId and :fusion_environment_family_id' if attributes.key?(:'fusionEnvironmentFamilyId') && attributes.key?(:'fusion_environment_family_id')

  self.fusion_environment_family_id = attributes[:'fusion_environment_family_id'] if attributes[:'fusion_environment_family_id']

  self.subscription_ids = attributes[:'subscriptionIds'] if attributes[:'subscriptionIds']

  raise 'You cannot provide both :subscriptionIds and :subscription_ids' if attributes.key?(:'subscriptionIds') && attributes.key?(:'subscription_ids')

  self.subscription_ids = attributes[:'subscription_ids'] if attributes[:'subscription_ids']

  self.fusion_environment_type = attributes[:'fusionEnvironmentType'] if attributes[:'fusionEnvironmentType']

  raise 'You cannot provide both :fusionEnvironmentType and :fusion_environment_type' if attributes.key?(:'fusionEnvironmentType') && attributes.key?(:'fusion_environment_type')

  self.fusion_environment_type = attributes[:'fusion_environment_type'] if attributes[:'fusion_environment_type']

  self.kms_key_id = attributes[:'kmsKeyId'] if attributes[:'kmsKeyId']

  raise 'You cannot provide both :kmsKeyId and :kms_key_id' if attributes.key?(:'kmsKeyId') && attributes.key?(:'kms_key_id')

  self.kms_key_id = attributes[:'kms_key_id'] if attributes[:'kms_key_id']

  self.kms_key_info = attributes[:'kmsKeyInfo'] if attributes[:'kmsKeyInfo']

  raise 'You cannot provide both :kmsKeyInfo and :kms_key_info' if attributes.key?(:'kmsKeyInfo') && attributes.key?(:'kms_key_info')

  self.kms_key_info = attributes[:'kms_key_info'] if attributes[:'kms_key_info']

  self.domain_id = attributes[:'domainId'] if attributes[:'domainId']

  raise 'You cannot provide both :domainId and :domain_id' if attributes.key?(:'domainId') && attributes.key?(:'domain_id')

  self.domain_id = attributes[:'domain_id'] if attributes[:'domain_id']

  self.idcs_domain_url = attributes[:'idcsDomainUrl'] if attributes[:'idcsDomainUrl']

  raise 'You cannot provide both :idcsDomainUrl and :idcs_domain_url' if attributes.key?(:'idcsDomainUrl') && attributes.key?(:'idcs_domain_url')

  self.idcs_domain_url = attributes[:'idcs_domain_url'] if attributes[:'idcs_domain_url']

  self.applied_patch_bundles = attributes[:'appliedPatchBundles'] if attributes[:'appliedPatchBundles']

  raise 'You cannot provide both :appliedPatchBundles and :applied_patch_bundles' if attributes.key?(:'appliedPatchBundles') && attributes.key?(:'applied_patch_bundles')

  self.applied_patch_bundles = attributes[:'applied_patch_bundles'] if attributes[:'applied_patch_bundles']

  self.version = attributes[:'version'] if attributes[:'version']

  self.public_url = attributes[:'publicUrl'] if attributes[:'publicUrl']

  raise 'You cannot provide both :publicUrl and :public_url' if attributes.key?(:'publicUrl') && attributes.key?(:'public_url')

  self.public_url = attributes[:'public_url'] if attributes[:'public_url']

  self.dns_prefix = attributes[:'dnsPrefix'] if attributes[:'dnsPrefix']

  raise 'You cannot provide both :dnsPrefix and :dns_prefix' if attributes.key?(:'dnsPrefix') && attributes.key?(:'dns_prefix')

  self.dns_prefix = attributes[:'dns_prefix'] if attributes[:'dns_prefix']

  self.additional_language_packs = attributes[:'additionalLanguagePacks'] if attributes[:'additionalLanguagePacks']

  raise 'You cannot provide both :additionalLanguagePacks and :additional_language_packs' if attributes.key?(:'additionalLanguagePacks') && attributes.key?(:'additional_language_packs')

  self.additional_language_packs = attributes[:'additional_language_packs'] if attributes[:'additional_language_packs']

  self.lockbox_id = attributes[:'lockboxId'] if attributes[:'lockboxId']

  raise 'You cannot provide both :lockboxId and :lockbox_id' if attributes.key?(:'lockboxId') && attributes.key?(:'lockbox_id')

  self.lockbox_id = attributes[:'lockbox_id'] if attributes[:'lockbox_id']

  self.is_break_glass_enabled = attributes[:'isBreakGlassEnabled'] unless attributes[:'isBreakGlassEnabled'].nil?
  self.is_break_glass_enabled = false if is_break_glass_enabled.nil? && !attributes.key?(:'isBreakGlassEnabled') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isBreakGlassEnabled and :is_break_glass_enabled' if attributes.key?(:'isBreakGlassEnabled') && attributes.key?(:'is_break_glass_enabled')

  self.is_break_glass_enabled = attributes[:'is_break_glass_enabled'] unless attributes[:'is_break_glass_enabled'].nil?
  self.is_break_glass_enabled = false if is_break_glass_enabled.nil? && !attributes.key?(:'isBreakGlassEnabled') && !attributes.key?(:'is_break_glass_enabled') # rubocop:disable Style/StringLiterals

  self.refresh = attributes[:'refresh'] if attributes[:'refresh']

  self.rules = attributes[:'rules'] if attributes[:'rules']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

  raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated')

  self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

  raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details')

  self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details']

  self.system_name = attributes[:'systemName'] if attributes[:'systemName']

  raise 'You cannot provide both :systemName and :system_name' if attributes.key?(:'systemName') && attributes.key?(:'system_name')

  self.system_name = attributes[:'system_name'] if attributes[:'system_name']

  self.environment_role = attributes[:'environmentRole'] if attributes[:'environmentRole']

  raise 'You cannot provide both :environmentRole and :environment_role' if attributes.key?(:'environmentRole') && attributes.key?(:'environment_role')

  self.environment_role = attributes[:'environment_role'] if attributes[:'environment_role']

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
end

Instance Attribute Details

#additional_language_packsArray<String>

Language packs

Returns:

  • (Array<String>)


95
96
97
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 95

def additional_language_packs
  @additional_language_packs
end

#applied_patch_bundlesArray<String>

Patch bundle names

Returns:

  • (Array<String>)


79
80
81
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 79

def applied_patch_bundles
  @applied_patch_bundles
end

#compartment_idString

[Required] Compartment Identifier

Returns:

  • (String)


47
48
49
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 47

def compartment_id
  @compartment_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


145
146
147
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 145

def defined_tags
  @defined_tags
end

#display_nameString

[Required] FusionEnvironment Identifier, can be renamed

Returns:

  • (String)


36
37
38
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 36

def display_name
  @display_name
end

#dns_prefixString

DNS prefix

Returns:

  • (String)


91
92
93
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 91

def dns_prefix
  @dns_prefix
end

#domain_idString

The IDCS domain created for the fusion instance

Returns:

  • (String)


71
72
73
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 71

def domain_id
  @domain_id
end

#environment_roleOCI::FusionApps::Models::EnvironmentRole



133
134
135
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 133

def environment_role
  @environment_role
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


139
140
141
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 139

def freeform_tags
  @freeform_tags
end

#fusion_environment_family_idString

FusionEnvironmentFamily Identifier

Returns:

  • (String)


51
52
53
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 51

def fusion_environment_family_id
  @fusion_environment_family_id
end

#fusion_environment_typeString

[Required] Type of the FusionEnvironment.

Returns:

  • (String)


59
60
61
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 59

def fusion_environment_type
  @fusion_environment_type
end

#idString

[Required] Unique identifier that is immutable on creation

Returns:

  • (String)


32
33
34
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 32

def id
  @id
end

#idcs_domain_urlString

The IDCS Domain URL

Returns:

  • (String)


75
76
77
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 75

def idcs_domain_url
  @idcs_domain_url
end

#is_break_glass_enabledBOOLEAN

If it's true, then the Break Glass feature is enabled

Returns:

  • (BOOLEAN)


103
104
105
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 103

def is_break_glass_enabled
  @is_break_glass_enabled
end

#kms_key_idString

BYOK key id

Returns:

  • (String)


63
64
65
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 63

def kms_key_id
  @kms_key_id
end

#kms_key_infoObject

BYOK key info

Returns:

  • (Object)


67
68
69
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 67

def kms_key_info
  @kms_key_info
end

#lifecycle_detailsString

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

Returns:

  • (String)


126
127
128
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 126

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the ServiceInstance.

Returns:

  • (String)


122
123
124
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 122

def lifecycle_state
  @lifecycle_state
end

#lockbox_idString

The lockbox Id of this fusion environment. If there's no lockbox id, this field will be null

Returns:

  • (String)


99
100
101
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 99

def lockbox_id
  @lockbox_id
end

#maintenance_policyOCI::FusionApps::Models::GetMaintenancePolicyDetails



39
40
41
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 39

def maintenance_policy
  @maintenance_policy
end

#public_urlString

Public URL

Returns:

  • (String)


87
88
89
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 87

def public_url
  @public_url
end

#refreshOCI::FusionApps::Models::RefreshDetails



106
107
108
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 106

def refresh
  @refresh
end

#rulesArray<OCI::FusionApps::Models::Rule>

Network Access Control Rules

Returns:



110
111
112
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 110

def rules
  @rules
end

#subscription_idsArray<String>

List of subscription IDs.

Returns:

  • (Array<String>)


55
56
57
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 55

def subscription_ids
  @subscription_ids
end

#system_nameString

Environment Specific Guid/ System Name

Returns:

  • (String)


130
131
132
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 130

def system_name
  @system_name
end

#time_createdDateTime

The time the the FusionEnvironment was created. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


114
115
116
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 114

def time_created
  @time_created
end

#time_upcoming_maintenanceDateTime

The next maintenance for this environment

Returns:

  • (DateTime)


43
44
45
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 43

def time_upcoming_maintenance
  @time_upcoming_maintenance
end

#time_updatedDateTime

The time the FusionEnvironment was updated. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


118
119
120
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 118

def time_updated
  @time_updated
end

#versionString

Version of Fusion Apps used by this environment

Returns:

  • (String)


83
84
85
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 83

def version
  @version
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 148

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'maintenance_policy': :'maintenancePolicy',
    'time_upcoming_maintenance': :'timeUpcomingMaintenance',
    'compartment_id': :'compartmentId',
    'fusion_environment_family_id': :'fusionEnvironmentFamilyId',
    'subscription_ids': :'subscriptionIds',
    'fusion_environment_type': :'fusionEnvironmentType',
    'kms_key_id': :'kmsKeyId',
    'kms_key_info': :'kmsKeyInfo',
    'domain_id': :'domainId',
    'idcs_domain_url': :'idcsDomainUrl',
    'applied_patch_bundles': :'appliedPatchBundles',
    'version': :'version',
    'public_url': :'publicUrl',
    'dns_prefix': :'dnsPrefix',
    'additional_language_packs': :'additionalLanguagePacks',
    'lockbox_id': :'lockboxId',
    'is_break_glass_enabled': :'isBreakGlassEnabled',
    'refresh': :'refresh',
    'rules': :'rules',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'system_name': :'systemName',
    'environment_role': :'environmentRole',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 185

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'maintenance_policy': :'OCI::FusionApps::Models::GetMaintenancePolicyDetails',
    'time_upcoming_maintenance': :'DateTime',
    'compartment_id': :'String',
    'fusion_environment_family_id': :'String',
    'subscription_ids': :'Array<String>',
    'fusion_environment_type': :'String',
    'kms_key_id': :'String',
    'kms_key_info': :'Object',
    'domain_id': :'String',
    'idcs_domain_url': :'String',
    'applied_patch_bundles': :'Array<String>',
    'version': :'String',
    'public_url': :'String',
    'dns_prefix': :'String',
    'additional_language_packs': :'Array<String>',
    'lockbox_id': :'String',
    'is_break_glass_enabled': :'BOOLEAN',
    'refresh': :'OCI::FusionApps::Models::RefreshDetails',
    'rules': :'Array<OCI::FusionApps::Models::Rule>',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'system_name': :'String',
    'environment_role': :'OCI::FusionApps::Models::EnvironmentRole',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



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
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 456

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    maintenance_policy == other.maintenance_policy &&
    time_upcoming_maintenance == other.time_upcoming_maintenance &&
    compartment_id == other.compartment_id &&
    fusion_environment_family_id == other.fusion_environment_family_id &&
    subscription_ids == other.subscription_ids &&
    fusion_environment_type == other.fusion_environment_type &&
    kms_key_id == other.kms_key_id &&
    kms_key_info == other.kms_key_info &&
    domain_id == other.domain_id &&
    idcs_domain_url == other.idcs_domain_url &&
    applied_patch_bundles == other.applied_patch_bundles &&
    version == other.version &&
    public_url == other.public_url &&
    dns_prefix == other.dns_prefix &&
    additional_language_packs == other.additional_language_packs &&
    lockbox_id == other.lockbox_id &&
    is_break_glass_enabled == other.is_break_glass_enabled &&
    refresh == other.refresh &&
    rules == other.rules &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    system_name == other.system_name &&
    environment_role == other.environment_role &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 514

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


494
495
496
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 494

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



503
504
505
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 503

def hash
  [id, display_name, maintenance_policy, time_upcoming_maintenance, compartment_id, fusion_environment_family_id, subscription_ids, fusion_environment_type, kms_key_id, kms_key_info, domain_id, idcs_domain_url, applied_patch_bundles, version, public_url, dns_prefix, additional_language_packs, lockbox_id, is_break_glass_enabled, refresh, rules, time_created, time_updated, lifecycle_state, lifecycle_details, system_name, environment_role, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



547
548
549
550
551
552
553
554
555
556
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 547

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



541
542
543
# File 'lib/oci/fusion_apps/models/fusion_environment.rb', line 541

def to_s
  to_hash.to_s
end