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

/**
 * UserDeleteStage Serializer
 * @export
 * @interface UserDeleteStageRequest
 */
export interface UserDeleteStageRequest {
    /**
     * 
     * @type {string}
     * @memberof UserDeleteStageRequest
     */
    name: string;
    /**
     * 
     * @type {Array<FlowSetRequest>}
     * @memberof UserDeleteStageRequest
     */
    flowSet?: Array<FlowSetRequest>;
}

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

export function UserDeleteStageRequestFromJSON(json: any): UserDeleteStageRequest {
    return UserDeleteStageRequestFromJSONTyped(json, false);
}

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

export function UserDeleteStageRequestToJSON(json: any): UserDeleteStageRequest {
    return UserDeleteStageRequestToJSONTyped(json, false);
}

export function UserDeleteStageRequestToJSONTyped(value?: UserDeleteStageRequest | 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)),
    };
}

