Class: KeycloakAdmin::ClientScopeRepresentation

Inherits:
Representation show all
Defined in:
lib/keycloak-admin/representation/client_scope_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

#attributesObject

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#protocolObject

Returns the value of attribute protocol.



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

def protocol
  @protocol
end

#protocol_mappersObject

Returns the value of attribute protocol_mappers.



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

def protocol_mappers
  @protocol_mappers
end

Class Method Details

.from_hash(hash) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/keycloak-admin/representation/client_scope_representation.rb', line 10

def self.from_hash(hash)
  rep                  = new
  rep.id               = hash["id"]
  rep.name             = hash["name"]
  rep.description      = hash["description"]
  rep.protocol         = hash["protocol"]
  rep.attributes       = hash["attributes"]
  rep.protocol_mappers = (hash["protocolMappers"] || []).map { |m| ProtocolMapperRepresentation.from_hash(m) }
  rep
end