/* tslint:disable */ /* eslint-disable */ /** * Keycloak Admin REST API * This is a REST API reference for the Keycloak Admin * * The version of the OpenAPI document: 1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { RoleRepresentationComposites, RoleRepresentationCompositesFromJSON, RoleRepresentationCompositesFromJSONTyped, RoleRepresentationCompositesToJSON, } from './'; /** * * @export * @interface RoleRepresentation */ export interface RoleRepresentation { /** * * @type {{ [key: string]: object; }} * @memberof RoleRepresentation */ attributes?: { [key: string]: object; }; /** * * @type {boolean} * @memberof RoleRepresentation */ clientRole?: boolean; /** * * @type {boolean} * @memberof RoleRepresentation */ composite?: boolean; /** * * @type {RoleRepresentationComposites} * @memberof RoleRepresentation */ composites?: RoleRepresentationComposites; /** * * @type {string} * @memberof RoleRepresentation */ containerId?: string; /** * * @type {string} * @memberof RoleRepresentation */ description?: string; /** * * @type {string} * @memberof RoleRepresentation */ id?: string; /** * * @type {string} * @memberof RoleRepresentation */ name?: string; } export function RoleRepresentationFromJSON(json: any): RoleRepresentation { return RoleRepresentationFromJSONTyped(json, false); } export function RoleRepresentationFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleRepresentation { if ((json === undefined) || (json === null)) { return json; } return { 'attributes': !exists(json, 'attributes') ? undefined : json['attributes'], 'clientRole': !exists(json, 'clientRole') ? undefined : json['clientRole'], 'composite': !exists(json, 'composite') ? undefined : json['composite'], 'composites': !exists(json, 'composites') ? undefined : RoleRepresentationCompositesFromJSON(json['composites']), 'containerId': !exists(json, 'containerId') ? undefined : json['containerId'], 'description': !exists(json, 'description') ? undefined : json['description'], 'id': !exists(json, 'id') ? undefined : json['id'], 'name': !exists(json, 'name') ? undefined : json['name'], }; } export function RoleRepresentationToJSON(value?: RoleRepresentation | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'attributes': value.attributes, 'clientRole': value.clientRole, 'composite': value.composite, 'composites': RoleRepresentationCompositesToJSON(value.composites), 'containerId': value.containerId, 'description': value.description, 'id': value.id, 'name': value.name, }; }