/* 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 { ScopeRepresentation, ScopeRepresentationFromJSON, ScopeRepresentationFromJSONTyped, ScopeRepresentationToJSON, } from './'; /** * * @export * @interface ResourceRepresentation */ export interface ResourceRepresentation { /** * * @type {string} * @memberof ResourceRepresentation */ id?: string; /** * * @type {{ [key: string]: object; }} * @memberof ResourceRepresentation */ attributes?: { [key: string]: object; }; /** * * @type {string} * @memberof ResourceRepresentation */ displayName?: string; /** * * @type {string} * @memberof ResourceRepresentation */ iconUri?: string; /** * * @type {string} * @memberof ResourceRepresentation */ name?: string; /** * * @type {boolean} * @memberof ResourceRepresentation */ ownerManagedAccess?: boolean; /** * * @type {Array} * @memberof ResourceRepresentation */ scopes?: Array; /** * * @type {string} * @memberof ResourceRepresentation */ type?: string; /** * * @type {Array} * @memberof ResourceRepresentation */ uris?: Array; } export function ResourceRepresentationFromJSON(json: any): ResourceRepresentation { return ResourceRepresentationFromJSONTyped(json, false); } export function ResourceRepresentationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceRepresentation { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'attributes': !exists(json, 'attributes') ? undefined : json['attributes'], 'displayName': !exists(json, 'displayName') ? undefined : json['displayName'], 'iconUri': !exists(json, 'icon_uri') ? undefined : json['icon_uri'], 'name': !exists(json, 'name') ? undefined : json['name'], 'ownerManagedAccess': !exists(json, 'ownerManagedAccess') ? undefined : json['ownerManagedAccess'], 'scopes': !exists(json, 'scopes') ? undefined : ((json['scopes'] as Array).map(ScopeRepresentationFromJSON)), 'type': !exists(json, 'type') ? undefined : json['type'], 'uris': !exists(json, 'uris') ? undefined : json['uris'], }; } export function ResourceRepresentationToJSON(value?: ResourceRepresentation | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'attributes': value.attributes, 'displayName': value.displayName, 'icon_uri': value.iconUri, 'name': value.name, 'ownerManagedAccess': value.ownerManagedAccess, 'scopes': value.scopes === undefined ? undefined : ((value.scopes as Array).map(ScopeRepresentationToJSON)), 'type': value.type, 'uris': value.uris, }; }