183 lines
5.0 KiB
TypeScript
183 lines
5.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 {
|
|
ResourceRepresentation,
|
|
ResourceRepresentationFromJSON,
|
|
ResourceRepresentationFromJSONTyped,
|
|
ResourceRepresentationToJSON,
|
|
ScopeRepresentation,
|
|
ScopeRepresentationFromJSON,
|
|
ScopeRepresentationFromJSONTyped,
|
|
ScopeRepresentationToJSON,
|
|
} from './';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface PolicyRepresentation
|
|
*/
|
|
export interface PolicyRepresentation {
|
|
/**
|
|
*
|
|
* @type {{ [key: string]: object; }}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
config?: { [key: string]: object; };
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
decisionStrategy?: PolicyRepresentationDecisionStrategyEnum;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
description?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
id?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
logic?: PolicyRepresentationLogicEnum;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
name?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
owner?: string;
|
|
/**
|
|
*
|
|
* @type {Array<string>}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
policies?: Array<string>;
|
|
/**
|
|
*
|
|
* @type {Array<string>}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
resources?: Array<string>;
|
|
/**
|
|
*
|
|
* @type {Array<ResourceRepresentation>}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
resourcesData?: Array<ResourceRepresentation>;
|
|
/**
|
|
*
|
|
* @type {Array<string>}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
scopes?: Array<string>;
|
|
/**
|
|
*
|
|
* @type {Array<ScopeRepresentation>}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
scopesData?: Array<ScopeRepresentation>;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PolicyRepresentation
|
|
*/
|
|
type?: string;
|
|
}
|
|
|
|
export function PolicyRepresentationFromJSON(json: any): PolicyRepresentation {
|
|
return PolicyRepresentationFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function PolicyRepresentationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyRepresentation {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'config': !exists(json, 'config') ? undefined : json['config'],
|
|
'decisionStrategy': !exists(json, 'decisionStrategy') ? undefined : json['decisionStrategy'],
|
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'logic': !exists(json, 'logic') ? undefined : json['logic'],
|
|
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
'owner': !exists(json, 'owner') ? undefined : json['owner'],
|
|
'policies': !exists(json, 'policies') ? undefined : json['policies'],
|
|
'resources': !exists(json, 'resources') ? undefined : json['resources'],
|
|
'resourcesData': !exists(json, 'resourcesData') ? undefined : ((json['resourcesData'] as Array<any>).map(ResourceRepresentationFromJSON)),
|
|
'scopes': !exists(json, 'scopes') ? undefined : json['scopes'],
|
|
'scopesData': !exists(json, 'scopesData') ? undefined : ((json['scopesData'] as Array<any>).map(ScopeRepresentationFromJSON)),
|
|
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
};
|
|
}
|
|
|
|
export function PolicyRepresentationToJSON(value?: PolicyRepresentation | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'config': value.config,
|
|
'decisionStrategy': value.decisionStrategy,
|
|
'description': value.description,
|
|
'id': value.id,
|
|
'logic': value.logic,
|
|
'name': value.name,
|
|
'owner': value.owner,
|
|
'policies': value.policies,
|
|
'resources': value.resources,
|
|
'resourcesData': value.resourcesData === undefined ? undefined : ((value.resourcesData as Array<any>).map(ResourceRepresentationToJSON)),
|
|
'scopes': value.scopes,
|
|
'scopesData': value.scopesData === undefined ? undefined : ((value.scopesData as Array<any>).map(ScopeRepresentationToJSON)),
|
|
'type': value.type,
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @export
|
|
* @enum {string}
|
|
*/
|
|
export enum PolicyRepresentationDecisionStrategyEnum {
|
|
AFFIRMATIVE = 'AFFIRMATIVE',
|
|
UNANIMOUS = 'UNANIMOUS',
|
|
CONSENSUS = 'CONSENSUS'
|
|
}
|
|
/**
|
|
* @export
|
|
* @enum {string}
|
|
*/
|
|
export enum PolicyRepresentationLogicEnum {
|
|
POSITIVE = 'POSITIVE',
|
|
NEGATIVE = 'NEGATIVE'
|
|
}
|
|
|
|
|