/* 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';

/**
 * DummyStage Serializer
 * @export
 * @interface PatchedDummyStageRequest
 */
export interface PatchedDummyStageRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedDummyStageRequest
     */
    name?: string;
    /**
     * 
     * @type {Array<FlowSetRequest>}
     * @memberof PatchedDummyStageRequest
     */
    flowSet?: Array<FlowSetRequest>;
    /**
     * 
     * @type {boolean}
     * @memberof PatchedDummyStageRequest
     */
    throwError?: boolean;
}

/**
 * Check if a given object implements the PatchedDummyStageRequest interface.
 */
export function instanceOfPatchedDummyStageRequest(value: object): value is PatchedDummyStageRequest {
    return true;
}

export function PatchedDummyStageRequestFromJSON(json: any): PatchedDummyStageRequest {
    return PatchedDummyStageRequestFromJSONTyped(json, false);
}

export function PatchedDummyStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDummyStageRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : json['name'],
        'flowSet': json['flow_set'] == null ? undefined : ((json['flow_set'] as Array<any>).map(FlowSetRequestFromJSON)),
        'throwError': json['throw_error'] == null ? undefined : json['throw_error'],
    };
}

export function PatchedDummyStageRequestToJSON(json: any): PatchedDummyStageRequest {
    return PatchedDummyStageRequestToJSONTyped(json, false);
}

export function PatchedDummyStageRequestToJSONTyped(value?: PatchedDummyStageRequest | 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)),
        'throw_error': value['throwError'],
    };
}

