Class: OCI::IdentityDomains::Models::UserExtGrants
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::UserExtGrants
- Defined in:
- lib/oci/identity_domains/models/user_ext_grants.rb
Overview
Grants to this User. Each value of this attribute refers to a Grant to this User of some App (and optionally of some entitlement). Therefore, this attribute is a convenience that allows one to see on each User all of the Grants to that User.
SCIM++ Properties: - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none
Constant Summary collapse
- GRANT_MECHANISM_ENUM =
[ GRANT_MECHANISM_IMPORT_APPROLE_MEMBERS = 'IMPORT_APPROLE_MEMBERS'.freeze, GRANT_MECHANISM_ADMINISTRATOR_TO_USER = 'ADMINISTRATOR_TO_USER'.freeze, GRANT_MECHANISM_ADMINISTRATOR_TO_GROUP = 'ADMINISTRATOR_TO_GROUP'.freeze, GRANT_MECHANISM_SERVICE_MANAGER_TO_USER = 'SERVICE_MANAGER_TO_USER'.freeze, GRANT_MECHANISM_ADMINISTRATOR_TO_APP = 'ADMINISTRATOR_TO_APP'.freeze, GRANT_MECHANISM_SERVICE_MANAGER_TO_APP = 'SERVICE_MANAGER_TO_APP'.freeze, GRANT_MECHANISM_OPC_INFRA_TO_APP = 'OPC_INFRA_TO_APP'.freeze, GRANT_MECHANISM_GROUP_MEMBERSHIP = 'GROUP_MEMBERSHIP'.freeze, GRANT_MECHANISM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#app_id ⇒ String
The ID of the App in this Grant.
-
#grant_mechanism ⇒ String
Each value of grantMechanism indicates how (or by what component) some App (or App-Entitlement) was granted.
-
#grantor_id ⇒ String
Grantor identifier.
-
#ref ⇒ String
The URI of this Grant to this User.
-
#value ⇒ String
The ID of this Grant to this User.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UserExtGrants
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UserExtGrants
Initializes the object
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 171 172 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 145 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.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.grant_mechanism = attributes[:'grantMechanism'] if attributes[:'grantMechanism'] raise 'You cannot provide both :grantMechanism and :grant_mechanism' if attributes.key?(:'grantMechanism') && attributes.key?(:'grant_mechanism') self.grant_mechanism = attributes[:'grant_mechanism'] if attributes[:'grant_mechanism'] self.grantor_id = attributes[:'grantorId'] if attributes[:'grantorId'] raise 'You cannot provide both :grantorId and :grantor_id' if attributes.key?(:'grantorId') && attributes.key?(:'grantor_id') self.grantor_id = attributes[:'grantor_id'] if attributes[:'grantor_id'] end |
Instance Attribute Details
#app_id ⇒ String
The ID of the App in this Grant.
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
72 73 74 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 72 def app_id @app_id end |
#grant_mechanism ⇒ String
Each value of grantMechanism indicates how (or by what component) some App (or App-Entitlement) was granted. A customer or the UI should use only grantMechanism values that start with 'ADMINISTRATOR': - 'ADMINISTRATOR_TO_USER' is for a direct grant to a specific User. - 'ADMINISTRATOR_TO_GROUP' is for a grant to a specific Group, which results in indirect grants to Users who are members of that Group. - 'ADMINISTRATOR_TO_APP' is for a grant to a specific App. The grantee (client) App gains access to the granted (server) App.
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
90 91 92 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 90 def grant_mechanism @grant_mechanism end |
#grantor_id ⇒ String
Grantor identifier
Added In: 20.1.3
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
106 107 108 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 106 def grantor_id @grantor_id end |
#ref ⇒ String
The URI of this Grant to this User.
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: reference - uniqueness: none
58 59 60 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 58 def ref @ref end |
#value ⇒ String
The ID of this Grant to this User.
SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
45 46 47 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 45 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 109 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'value': :'value', 'ref': :'$ref', 'app_id': :'appId', 'grant_mechanism': :'grantMechanism', 'grantor_id': :'grantorId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 122 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'value': :'String', 'ref': :'String', 'app_id': :'String', 'grant_mechanism': :'String', 'grantor_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 194 def ==(other) return true if equal?(other) self.class == other.class && value == other.value && ref == other.ref && app_id == other.app_id && grant_mechanism == other.grant_mechanism && grantor_id == other.grantor_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 228 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
208 209 210 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 208 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
217 218 219 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 217 def hash [value, ref, app_id, grant_mechanism, grantor_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
261 262 263 264 265 266 267 268 269 270 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 261 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_s ⇒ String
Returns the string representation of the object
255 256 257 |
# File 'lib/oci/identity_domains/models/user_ext_grants.rb', line 255 def to_s to_hash.to_s end |