/* 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.
 */

/**
 * Serializer for a single Choice field
 * @export
 * @interface PromptChoice
 */
export interface PromptChoice {
    /**
     *
     * @type {string}
     * @memberof PromptChoice
     */
    value: string;
    /**
     *
     * @type {string}
     * @memberof PromptChoice
     */
    label: string;
}

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

export function PromptChoiceFromJSON(json: any): PromptChoice {
    return PromptChoiceFromJSONTyped(json, false);
}

export function PromptChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptChoice {
    if (json == null) {
        return json;
    }
    return {
        value: json["value"],
        label: json["label"],
    };
}

export function PromptChoiceToJSON(json: any): PromptChoice {
    return PromptChoiceToJSONTyped(json, false);
}

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

    return {
        value: value["value"],
        label: value["label"],
    };
}
