/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

/**
 * PromptStage Serializer
 * @export
 * @interface PromptStageRequest
 */
export interface PromptStageRequest {
    /**
     *
     * @type {string}
     * @memberof PromptStageRequest
     */
    name: string;
    /**
     *
     * @type {Array<string>}
     * @memberof PromptStageRequest
     */
    fields: Array<string>;
    /**
     *
     * @type {Array<string>}
     * @memberof PromptStageRequest
     */
    validationPolicies?: Array<string>;
}

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

export function PromptStageRequestFromJSON(json: any): PromptStageRequest {
    return PromptStageRequestFromJSONTyped(json, false);
}

export function PromptStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PromptStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        fields: json["fields"],
        validationPolicies:
            json["validation_policies"] == null ? undefined : json["validation_policies"],
    };
}

export function PromptStageRequestToJSON(json: any): PromptStageRequest {
    return PromptStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        fields: value["fields"],
        validation_policies: value["validationPolicies"],
    };
}
