Class: KeycloakAdmin::ClientAuthzResourceRepresentation
- Inherits:
-
Representation
- Object
- Representation
- KeycloakAdmin::ClientAuthzResourceRepresentation
- Defined in:
- lib/keycloak-admin/representation/client_authz_resource_representation.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner_managed_access ⇒ Object
Returns the value of attribute owner_managed_access.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#type ⇒ Object
Returns the value of attribute type.
-
#uris ⇒ Object
Returns the value of attribute uris.
Class Method Summary collapse
Methods inherited from Representation
Methods included from CamelJson
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def attributes @attributes end |
#display_name ⇒ Object
Returns the value of attribute display_name.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def name @name end |
#owner_managed_access ⇒ Object
Returns the value of attribute owner_managed_access.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def owner_managed_access @owner_managed_access end |
#scopes ⇒ Object
Returns the value of attribute scopes.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def scopes @scopes end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def type @type end |
#uris ⇒ Object
Returns the value of attribute uris.
4 5 6 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 4 def uris @uris end |
Class Method Details
.from_hash(hash) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/keycloak-admin/representation/client_authz_resource_representation.rb', line 13 def self.from_hash(hash) resource = new resource.id = hash["_id"] resource.type = hash["type"] resource.name = hash["name"] resource.owner_managed_access = hash["ownerManagedAccess"] resource.uris = hash["uris"] resource.display_name = hash["displayName"] resource.attributes = hash.fetch("attributes", {}).map { |k, v| [k.to_sym, Array(v)] }.to_h resource.scopes = (hash["scopes"] || []).map { |scope_hash| ClientAuthzScopeRepresentation.from_hash(scope_hash) } resource end |