/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.0-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
import type { FlowSetRequest } from './FlowSetRequest';
import {
    FlowSetRequestFromJSON,
    FlowSetRequestFromJSONTyped,
    FlowSetRequestToJSON,
    FlowSetRequestToJSONTyped,
} from './FlowSetRequest';

/**
 * AuthenticatorEndpointGDTCStage Serializer
 * @export
 * @interface AuthenticatorEndpointGDTCStageRequest
 */
export interface AuthenticatorEndpointGDTCStageRequest {
    /**
     * 
     * @type {string}
     * @memberof AuthenticatorEndpointGDTCStageRequest
     */
    name: string;
    /**
     * 
     * @type {Array<FlowSetRequest>}
     * @memberof AuthenticatorEndpointGDTCStageRequest
     */
    flowSet?: Array<FlowSetRequest>;
    /**
     * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage.
     * @type {string}
     * @memberof AuthenticatorEndpointGDTCStageRequest
     */
    configureFlow?: string | null;
    /**
     * 
     * @type {string}
     * @memberof AuthenticatorEndpointGDTCStageRequest
     */
    friendlyName?: string;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof AuthenticatorEndpointGDTCStageRequest
     */
    credentials: { [key: string]: any; };
}

/**
 * Check if a given object implements the AuthenticatorEndpointGDTCStageRequest interface.
 */
export function instanceOfAuthenticatorEndpointGDTCStageRequest(value: object): value is AuthenticatorEndpointGDTCStageRequest {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('credentials' in value) || value['credentials'] === undefined) return false;
    return true;
}

export function AuthenticatorEndpointGDTCStageRequestFromJSON(json: any): AuthenticatorEndpointGDTCStageRequest {
    return AuthenticatorEndpointGDTCStageRequestFromJSONTyped(json, false);
}

export function AuthenticatorEndpointGDTCStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEndpointGDTCStageRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'flowSet': json['flow_set'] == null ? undefined : ((json['flow_set'] as Array<any>).map(FlowSetRequestFromJSON)),
        'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'],
        'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'],
        'credentials': json['credentials'],
    };
}

export function AuthenticatorEndpointGDTCStageRequestToJSON(json: any): AuthenticatorEndpointGDTCStageRequest {
    return AuthenticatorEndpointGDTCStageRequestToJSONTyped(json, false);
}

export function AuthenticatorEndpointGDTCStageRequestToJSONTyped(value?: AuthenticatorEndpointGDTCStageRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'name': value['name'],
        'flow_set': value['flowSet'] == null ? undefined : ((value['flowSet'] as Array<any>).map(FlowSetRequestToJSON)),
        'configure_flow': value['configureFlow'],
        'friendly_name': value['friendlyName'],
        'credentials': value['credentials'],
    };
}

