Files
auth/backend/keycloak/kc-client/models/ScopeRepresentation.ts
2022-09-05 17:02:45 +02:00

109 lines
3.0 KiB
TypeScript

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