Class: OCI::IdentityDomains::Models::DynamicResourceGroupDynamicGroupAppRoles

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb

Overview

A list of appRoles that are currently granted to this Dynamic Resource Group. The Identity service will assert these AppRoles for any resource that satisfies the matching-rule of this DynamicResourceGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DynamicResourceGroupDynamicGroupAppRoles

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :value (String)

    The value to assign to the #value property

  • :ref (String)

    The value to assign to the #ref property

  • :display (String)

    The value to assign to the #display property

  • :app_id (String)

    The value to assign to the #app_id property

  • :app_name (String)

    The value to assign to the #app_name property

  • :admin_role (BOOLEAN)

    The value to assign to the #admin_role property

  • :legacy_group_name (String)

    The value to assign to the #legacy_group_name property



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
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 151

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

  self.ref = attributes[:'$ref'] if attributes[:'$ref']

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

  self.app_id = attributes[:'appId'] if attributes[:'appId']

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

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

  self.app_name = attributes[:'appName'] if attributes[:'appName']

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

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

  self.admin_role = attributes[:'adminRole'] unless attributes[:'adminRole'].nil?

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

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

  self.legacy_group_name = attributes[:'legacyGroupName'] if attributes[:'legacyGroupName']

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

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

Instance Attribute Details

#admin_roleBOOLEAN

If true, then the role provides administrative access privileges. READ-ONLY.

SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: request - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


93
94
95
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 93

def admin_role
  @admin_role
end

#app_idString

ID of parent App. READ-ONLY.

SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


65
66
67
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 65

def app_id
  @app_id
end

#app_nameString

Name of parent App. READ-ONLY.

SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


79
80
81
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 79

def app_name
  @app_name
end

#displayString

A human readable name, primarily used for display purposes. READ-ONLY.

SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


51
52
53
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 51

def display
  @display
end

#legacy_group_nameString

The name of the legacy group associated with this AppRole.

SCIM++ Properties: - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


106
107
108
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 106

def legacy_group_name
  @legacy_group_name
end

#refString

The URI of the corresponding appRole resource to which the user belongs

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: request - type: reference - uniqueness: none

Returns:

  • (String)


37
38
39
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 37

def ref
  @ref
end

#valueString

[Required] The identifier of the appRole

SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: true - returned: always - type: string - uniqueness: none

Returns:

  • (String)


23
24
25
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 23

def value
  @value
end

Class Method Details

.attribute_mapObject

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



109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 109

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'value': :'value',
    'ref': :'$ref',
    'display': :'display',
    'app_id': :'appId',
    'app_name': :'appName',
    'admin_role': :'adminRole',
    'legacy_group_name': :'legacyGroupName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 124

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'value': :'String',
    'ref': :'String',
    'display': :'String',
    'app_id': :'String',
    'app_name': :'String',
    'admin_role': :'BOOLEAN',
    'legacy_group_name': :'String'
    # 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



195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 195

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

  self.class == other.class &&
    value == other.value &&
    ref == other.ref &&
    display == other.display &&
    app_id == other.app_id &&
    app_name == other.app_name &&
    admin_role == other.admin_role &&
    legacy_group_name == other.legacy_group_name
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



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 231

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


211
212
213
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 211

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



220
221
222
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 220

def hash
  [value, ref, display, app_id, app_name, admin_role, legacy_group_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



264
265
266
267
268
269
270
271
272
273
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 264

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



258
259
260
# File 'lib/oci/identity_domains/models/dynamic_resource_group_dynamic_group_app_roles.rb', line 258

def to_s
  to_hash.to_s
end