Class: OCI::DelegateAccessControl::Models::DelegationControl

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/delegate_access_control/models/delegation_control.rb

Overview

Delegation Control enables you to grant, audit, or revoke the access Oracle has to your Exadata Cloud infrastructure, and obtain audit reports of all actions taken by a human operator, in a near real-time manner.

Constant Summary collapse

RESOURCE_TYPE_ENUM =
[
  RESOURCE_TYPE_VMCLUSTER = 'VMCLUSTER'.freeze,
  RESOURCE_TYPE_CLOUDVMCLUSTER = 'CLOUDVMCLUSTER'.freeze,
  RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
NOTIFICATION_MESSAGE_FORMAT_ENUM =
[
  NOTIFICATION_MESSAGE_FORMAT_JSON = 'JSON'.freeze,
  NOTIFICATION_MESSAGE_FORMAT_HTML = 'HTML'.freeze,
  NOTIFICATION_MESSAGE_FORMAT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.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 = {}) ⇒ DelegationControl

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :num_approvals_required (Integer)

    The value to assign to the #num_approvals_required property

  • :pre_approved_service_provider_action_names (Array<String>)

    The value to assign to the #pre_approved_service_provider_action_names property

  • :delegation_subscription_ids (Array<String>)

    The value to assign to the #delegation_subscription_ids property

  • :is_auto_approve_during_maintenance (BOOLEAN)

    The value to assign to the #is_auto_approve_during_maintenance property

  • :resource_ids (Array<String>)

    The value to assign to the #resource_ids property

  • :resource_type (String)

    The value to assign to the #resource_type property

  • :notification_topic_id (String)

    The value to assign to the #notification_topic_id property

  • :notification_message_format (String)

    The value to assign to the #notification_message_format property

  • :vault_id (String)

    The value to assign to the #vault_id property

  • :vault_key_id (String)

    The value to assign to the #vault_key_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_state_details (String)

    The value to assign to the #lifecycle_state_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :time_deleted (DateTime)

    The value to assign to the #time_deleted property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

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

    The value to assign to the #defined_tags property

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

    The value to assign to the #system_tags property



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
352
353
354
355
356
357
358
359
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 230

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.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.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.description = attributes[:'description'] if attributes[:'description']

  self.num_approvals_required = attributes[:'numApprovalsRequired'] if attributes[:'numApprovalsRequired']

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

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

  self.pre_approved_service_provider_action_names = attributes[:'preApprovedServiceProviderActionNames'] if attributes[:'preApprovedServiceProviderActionNames']

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

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

  self.delegation_subscription_ids = attributes[:'delegationSubscriptionIds'] if attributes[:'delegationSubscriptionIds']

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

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

  self.is_auto_approve_during_maintenance = attributes[:'isAutoApproveDuringMaintenance'] unless attributes[:'isAutoApproveDuringMaintenance'].nil?

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

  self.is_auto_approve_during_maintenance = attributes[:'is_auto_approve_during_maintenance'] unless attributes[:'is_auto_approve_during_maintenance'].nil?

  self.resource_ids = attributes[:'resourceIds'] if attributes[:'resourceIds']

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

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

  self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType']

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

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

  self.notification_topic_id = attributes[:'notificationTopicId'] if attributes[:'notificationTopicId']

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

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

  self.notification_message_format = attributes[:'notificationMessageFormat'] if attributes[:'notificationMessageFormat']

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

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

  self.vault_id = attributes[:'vaultId'] if attributes[:'vaultId']

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

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

  self.vault_key_id = attributes[:'vaultKeyId'] if attributes[:'vaultKeyId']

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

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

  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_state_details = attributes[:'lifecycleStateDetails'] if attributes[:'lifecycleStateDetails']

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

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

  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.time_deleted = attributes[:'timeDeleted'] if attributes[:'timeDeleted']

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

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

  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']

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment that contains the Delegation Control.

Returns:

  • (String)


42
43
44
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 42

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. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

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


133
134
135
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 133

def defined_tags
  @defined_tags
end

#delegation_subscription_idsArray<String>

List of Delegation Subscription OCID that are allowed for this Delegation Control. The allowed subscriptions will determine the available Service Provider Actions. Only support operators for the allowed subscriptions are allowed to create Delegated Resource Access Request.

Returns:

  • (Array<String>)


64
65
66
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 64

def delegation_subscription_ids
  @delegation_subscription_ids
end

#descriptionString

Description of the Delegation Control.

Returns:

  • (String)


50
51
52
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 50

def description
  @description
end

#display_nameString

[Required] Name of the Delegation Control. The name does not need to be unique.

Returns:

  • (String)


46
47
48
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 46

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


125
126
127
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 125

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the Delegation Control.

Returns:

  • (String)


38
39
40
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 38

def id
  @id
end

#is_auto_approve_during_maintenanceBOOLEAN

Set to true to allow all Delegated Resource Access Request to be approved automatically during maintenance.

Returns:

  • (BOOLEAN)


68
69
70
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 68

def is_auto_approve_during_maintenance
  @is_auto_approve_during_maintenance
end

#lifecycle_stateString

The current lifecycle state of the Delegation Control.

Returns:

  • (String)


96
97
98
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 96

def lifecycle_state
  @lifecycle_state
end

#lifecycle_state_detailsString

Description of the current lifecycle state in more detail.

Returns:

  • (String)


100
101
102
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 100

def lifecycle_state_details
  @lifecycle_state_details
end

#notification_message_formatString

The format of the OCI Notification messages for this Delegation Control.

Returns:

  • (String)


84
85
86
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 84

def notification_message_format
  @notification_message_format
end

#notification_topic_idString

The OCID of the OCI Notification topic to publish messages related to this Delegation Control.

Returns:

  • (String)


80
81
82
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 80

def notification_topic_id
  @notification_topic_id
end

#num_approvals_requiredInteger

number of approvals required.

Returns:

  • (Integer)


54
55
56
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 54

def num_approvals_required
  @num_approvals_required
end

#pre_approved_service_provider_action_namesArray<String>

List of pre-approved Service Provider Action names. The list of pre-defined Service Provider Actions can be obtained from the ListServiceProviderActions API. Delegated Resource Access Requests associated with a resource governed by this Delegation Control will be automatically approved if the Delegated Resource Access Request only contain Service Provider Actions in the pre-approved list.

Returns:

  • (Array<String>)


60
61
62
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 60

def pre_approved_service_provider_action_names
  @pre_approved_service_provider_action_names
end

#resource_idsArray<String>

The OCID of the selected resources that this Delegation Control is applicable to.

Returns:

  • (Array<String>)


72
73
74
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 72

def resource_ids
  @resource_ids
end

#resource_typeString

[Required] Resource type for which the Delegation Control is applicable to.

Returns:

  • (String)


76
77
78
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 76

def resource_type
  @resource_type
end

#system_tagsHash<String, Hash<String, Object>>

System tags for this resource. Each key is predefined and scoped to a namespace.

Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}

Returns:

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


140
141
142
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 140

def system_tags
  @system_tags
end

#time_createdDateTime

Time when the Delegation Control was created expressed in RFC 3339 timestamp format, e.g. '2020-05-22T21:10:29.600Z'

Returns:

  • (DateTime)


105
106
107
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 105

def time_created
  @time_created
end

#time_deletedDateTime

Time when the Delegation Control was deleted expressed in 3339[https://tools.ietf.org/html/rfc3339]timestamp format, e.g. '2020-05-22T21:10:29.600Z'. Note a deleted Delegation Control still stays in the system, so that you can still audit Service Provider Actions associated with Delegated Resource Access Requests raised on target resources governed by the deleted Delegation Control.

Returns:

  • (DateTime)


117
118
119
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 117

def time_deleted
  @time_deleted
end

#time_updatedDateTime

Time when the Delegation Control was last modified expressed in RFC 3339 timestamp format, e.g. '2020-05-22T21:10:29.600Z'

Returns:

  • (DateTime)


110
111
112
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 110

def time_updated
  @time_updated
end

#vault_idString

The OCID of the OCI Vault that will store the secrets containing the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER. Delegate Access Control Service will generate the SSH keys and store them as secrets in the OCI Vault.

Returns:

  • (String)


88
89
90
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 88

def vault_id
  @vault_id
end

#vault_key_idString

The OCID of the Master Encryption Key in the OCI Vault specified by vaultId. This key will be used to encrypt the SSH keys to access the resource governed by this Delegation Control by Delegate Access Control Service. This property is required when resourceType is CLOUDVMCLUSTER.

Returns:

  • (String)


92
93
94
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 92

def vault_key_id
  @vault_key_id
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 143

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'num_approvals_required': :'numApprovalsRequired',
    'pre_approved_service_provider_action_names': :'preApprovedServiceProviderActionNames',
    'delegation_subscription_ids': :'delegationSubscriptionIds',
    'is_auto_approve_during_maintenance': :'isAutoApproveDuringMaintenance',
    'resource_ids': :'resourceIds',
    'resource_type': :'resourceType',
    'notification_topic_id': :'notificationTopicId',
    'notification_message_format': :'notificationMessageFormat',
    'vault_id': :'vaultId',
    'vault_key_id': :'vaultKeyId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_state_details': :'lifecycleStateDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_deleted': :'timeDeleted',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 173

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'num_approvals_required': :'Integer',
    'pre_approved_service_provider_action_names': :'Array<String>',
    'delegation_subscription_ids': :'Array<String>',
    'is_auto_approve_during_maintenance': :'BOOLEAN',
    'resource_ids': :'Array<String>',
    'resource_type': :'String',
    'notification_topic_id': :'String',
    'notification_message_format': :'String',
    'vault_id': :'String',
    'vault_key_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_state_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'time_deleted': :'DateTime',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_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



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
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 407

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    description == other.description &&
    num_approvals_required == other.num_approvals_required &&
    pre_approved_service_provider_action_names == other.pre_approved_service_provider_action_names &&
    delegation_subscription_ids == other.delegation_subscription_ids &&
    is_auto_approve_during_maintenance == other.is_auto_approve_during_maintenance &&
    resource_ids == other.resource_ids &&
    resource_type == other.resource_type &&
    notification_topic_id == other.notification_topic_id &&
    notification_message_format == other.notification_message_format &&
    vault_id == other.vault_id &&
    vault_key_id == other.vault_key_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_state_details == other.lifecycle_state_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    time_deleted == other.time_deleted &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_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



458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 458

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


438
439
440
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 438

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



447
448
449
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 447

def hash
  [id, compartment_id, display_name, description, num_approvals_required, pre_approved_service_provider_action_names, delegation_subscription_ids, is_auto_approve_during_maintenance, resource_ids, resource_type, notification_topic_id, notification_message_format, vault_id, vault_key_id, lifecycle_state, lifecycle_state_details, time_created, time_updated, time_deleted, freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



491
492
493
494
495
496
497
498
499
500
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 491

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



485
486
487
# File 'lib/oci/delegate_access_control/models/delegation_control.rb', line 485

def to_s
  to_hash.to_s
end