Class: KeycloakAdmin::ClientAuthzPolicyConfigRepresentation

Inherits:
Representation
  • Object
show all
Defined in:
lib/keycloak-admin/representation/client_authz_policy_config_representation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Representation

#as_json, from_json, #to_json

Methods included from CamelJson

#camelize

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/keycloak-admin/representation/client_authz_policy_config_representation.rb', line 3

def code
  @code
end

#rolesObject

Returns the value of attribute roles.



3
4
5
# File 'lib/keycloak-admin/representation/client_authz_policy_config_representation.rb', line 3

def roles
  @roles
end

Class Method Details

.from_hash(hash) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/keycloak-admin/representation/client_authz_policy_config_representation.rb', line 6

def self.from_hash(hash)
  resource                      = new
  resource.code                 = hash["code"]
  resource.roles               = JSON.parse(hash["roles"] || '[]').map do |str|
    RoleRepresentation.from_hash(str)
  end
  resource
end