Class: OCI::IdentityDomains::Models::GroupExtAppRoles

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

Overview

A list of appRoles that the user belongs to, either thorough direct membership, nested groups, or dynamically calculated

SCIM++ Properties: - caseExact: false - idcsCompositeKey: [value] - idcsSearchable: true - 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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GroupExtAppRoles

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



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
220
221
222
223
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 186

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

Returns:

  • (BOOLEAN)


125
126
127
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 125

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)


97
98
99
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 97

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)


111
112
113
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 111

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)


69
70
71
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 69

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: default - type: string - uniqueness: none

Returns:

  • (String)


138
139
140
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 138

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)


55
56
57
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 55

def ref
  @ref
end

#typeString

A label indicating the attribute's function; e.g., 'direct' or 'indirect'.

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

Returns:

  • (String)


83
84
85
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 83

def type
  @type
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)


41
42
43
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 41

def value
  @value
end

Class Method Details

.attribute_mapObject

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



141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 141

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.



157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 157

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



245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 245

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



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 282

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


262
263
264
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 262

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



271
272
273
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 271

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



315
316
317
318
319
320
321
322
323
324
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 315

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



309
310
311
# File 'lib/oci/identity_domains/models/group_ext_app_roles.rb', line 309

def to_s
  to_hash.to_s
end