Class: OCI::IdentityDomains::Models::UserExtAppRoles

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

Overview

A list of all AppRoles to which this User belongs directly, indirectly or implicitly. The User could belong directly because the User is a member of the AppRole, could belong indirectly because the User is a member of a Group that is a member of the AppRole, or could belong implicitly because the AppRole is public.

SCIM++ Properties: - idcsCompositeKey: [value] - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none

Constant Summary collapse

TYPE_ENUM =
[
  TYPE_DIRECT = 'direct'.freeze,
  TYPE_INDIRECT = 'indirect'.freeze,
  TYPE_IMPLICIT = 'implicit'.freeze,
  TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserExtAppRoles

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

  • :type (String)

    The value to assign to the #type 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



181
182
183
184
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
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 181

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

  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: - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


120
121
122
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 120

def admin_role
  @admin_role
end

#app_idString

The ID of the App that defines this AppRole.

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

Returns:

  • (String)


94
95
96
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 94

def app_id
  @app_id
end

#app_nameString

The name (Client ID) of the App that defines this AppRole.

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

Returns:

  • (String)


107
108
109
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 107

def app_name
  @app_name
end

#displayString

The display name of the AppRole assigned to the User.

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

Returns:

  • (String)


66
67
68
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 66

def display
  @display
end

#legacy_group_nameString

The name (if any) under which this AppRole should appear in this User's group-memberships for reasons of backward compatibility. Oracle Identity Cloud Service distinguishes between Groups and AppRoles, but some services still expect AppRoles appear as if they were service-instance-specific Groups.

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

Returns:

  • (String)


133
134
135
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 133

def legacy_group_name
  @legacy_group_name
end

#refString

The URI of the AppRole assigned to the User.

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

Returns:

  • (String)


53
54
55
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 53

def ref
  @ref
end

#typeString

The kind of membership this User has in the AppRole. A value of 'direct' indicates that the User is a member of the AppRole. A value of 'indirect' indicates that the User is a member of a Group that is a member of the AppRole. A value of 'implicit' indicates that the AppRole is public.

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

Returns:

  • (String)


80
81
82
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 80

def type
  @type
end

#valueString

[Required] The Id of the AppRole assigned to the User.

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

Returns:

  • (String)


40
41
42
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 40

def value
  @value
end

Class Method Details

.attribute_mapObject

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



136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 136

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

.swagger_typesObject

Attribute type mapping.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 152

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



240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 240

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

  self.class == other.class &&
    value == other.value &&
    ref == other.ref &&
    display == other.display &&
    type == other.type &&
    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



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 277

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


257
258
259
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 257

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



266
267
268
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 266

def hash
  [value, ref, display, type, 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



310
311
312
313
314
315
316
317
318
319
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 310

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



304
305
306
# File 'lib/oci/identity_domains/models/user_ext_app_roles.rb', line 304

def to_s
  to_hash.to_s
end