139 lines
4.4 KiB
TypeScript
139 lines
4.4 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 {
|
|
ClientRepresentation,
|
|
ClientRepresentationFromJSON,
|
|
ClientRepresentationFromJSONTyped,
|
|
ClientRepresentationToJSON,
|
|
GroupRepresentation,
|
|
GroupRepresentationFromJSON,
|
|
GroupRepresentationFromJSONTyped,
|
|
GroupRepresentationToJSON,
|
|
IdentityProviderRepresentation,
|
|
IdentityProviderRepresentationFromJSON,
|
|
IdentityProviderRepresentationFromJSONTyped,
|
|
IdentityProviderRepresentationToJSON,
|
|
RolesRepresentation,
|
|
RolesRepresentationFromJSON,
|
|
RolesRepresentationFromJSONTyped,
|
|
RolesRepresentationToJSON,
|
|
UserRepresentation,
|
|
UserRepresentationFromJSON,
|
|
UserRepresentationFromJSONTyped,
|
|
UserRepresentationToJSON,
|
|
} from './';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface PartialImportRepresentation
|
|
*/
|
|
export interface PartialImportRepresentation {
|
|
/**
|
|
*
|
|
* @type {Array<ClientRepresentation>}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
clients?: Array<ClientRepresentation>;
|
|
/**
|
|
*
|
|
* @type {Array<GroupRepresentation>}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
groups?: Array<GroupRepresentation>;
|
|
/**
|
|
*
|
|
* @type {Array<IdentityProviderRepresentation>}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
identityProviders?: Array<IdentityProviderRepresentation>;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
ifResourceExists?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
policy?: PartialImportRepresentationPolicyEnum;
|
|
/**
|
|
*
|
|
* @type {RolesRepresentation}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
roles?: RolesRepresentation;
|
|
/**
|
|
*
|
|
* @type {Array<UserRepresentation>}
|
|
* @memberof PartialImportRepresentation
|
|
*/
|
|
users?: Array<UserRepresentation>;
|
|
}
|
|
|
|
export function PartialImportRepresentationFromJSON(json: any): PartialImportRepresentation {
|
|
return PartialImportRepresentationFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function PartialImportRepresentationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartialImportRepresentation {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'clients': !exists(json, 'clients') ? undefined : ((json['clients'] as Array<any>).map(ClientRepresentationFromJSON)),
|
|
'groups': !exists(json, 'groups') ? undefined : ((json['groups'] as Array<any>).map(GroupRepresentationFromJSON)),
|
|
'identityProviders': !exists(json, 'identityProviders') ? undefined : ((json['identityProviders'] as Array<any>).map(IdentityProviderRepresentationFromJSON)),
|
|
'ifResourceExists': !exists(json, 'ifResourceExists') ? undefined : json['ifResourceExists'],
|
|
'policy': !exists(json, 'policy') ? undefined : json['policy'],
|
|
'roles': !exists(json, 'roles') ? undefined : RolesRepresentationFromJSON(json['roles']),
|
|
'users': !exists(json, 'users') ? undefined : ((json['users'] as Array<any>).map(UserRepresentationFromJSON)),
|
|
};
|
|
}
|
|
|
|
export function PartialImportRepresentationToJSON(value?: PartialImportRepresentation | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'clients': value.clients === undefined ? undefined : ((value.clients as Array<any>).map(ClientRepresentationToJSON)),
|
|
'groups': value.groups === undefined ? undefined : ((value.groups as Array<any>).map(GroupRepresentationToJSON)),
|
|
'identityProviders': value.identityProviders === undefined ? undefined : ((value.identityProviders as Array<any>).map(IdentityProviderRepresentationToJSON)),
|
|
'ifResourceExists': value.ifResourceExists,
|
|
'policy': value.policy,
|
|
'roles': RolesRepresentationToJSON(value.roles),
|
|
'users': value.users === undefined ? undefined : ((value.users as Array<any>).map(UserRepresentationToJSON)),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @export
|
|
* @enum {string}
|
|
*/
|
|
export enum PartialImportRepresentationPolicyEnum {
|
|
SKIP = 'SKIP',
|
|
OVERWRITE = 'OVERWRITE',
|
|
FAIL = 'FAIL'
|
|
}
|
|
|
|
|