"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPrompt = instanceOfPrompt;
exports.PromptFromJSON = PromptFromJSON;
exports.PromptFromJSONTyped = PromptFromJSONTyped;
exports.PromptToJSON = PromptToJSON;
exports.PromptToJSONTyped = PromptToJSONTyped;
const PromptStage_1 = require("./PromptStage");
const PromptTypeEnum_1 = require("./PromptTypeEnum");
/**
 * Check if a given object implements the Prompt interface.
 */
function instanceOfPrompt(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('fieldKey' in value) || value['fieldKey'] === undefined)
        return false;
    if (!('label' in value) || value['label'] === undefined)
        return false;
    if (!('type' in value) || value['type'] === undefined)
        return false;
    if (!('promptStagesObj' in value) || value['promptStagesObj'] === undefined)
        return false;
    return true;
}
function PromptFromJSON(json) {
    return PromptFromJSONTyped(json, false);
}
function PromptFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'name': json['name'],
        'fieldKey': json['field_key'],
        'label': json['label'],
        'type': (0, PromptTypeEnum_1.PromptTypeEnumFromJSON)(json['type']),
        'required': json['required'] == null ? undefined : json['required'],
        'placeholder': json['placeholder'] == null ? undefined : json['placeholder'],
        'initialValue': json['initial_value'] == null ? undefined : json['initial_value'],
        'order': json['order'] == null ? undefined : json['order'],
        'promptStagesObj': (json['prompt_stages_obj'].map(PromptStage_1.PromptStageFromJSON)),
        'subText': json['sub_text'] == null ? undefined : json['sub_text'],
        'placeholderExpression': json['placeholder_expression'] == null ? undefined : json['placeholder_expression'],
        'initialValueExpression': json['initial_value_expression'] == null ? undefined : json['initial_value_expression'],
    };
}
function PromptToJSON(json) {
    return PromptToJSONTyped(json, false);
}
function PromptToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'field_key': value['fieldKey'],
        'label': value['label'],
        'type': (0, PromptTypeEnum_1.PromptTypeEnumToJSON)(value['type']),
        'required': value['required'],
        'placeholder': value['placeholder'],
        'initial_value': value['initialValue'],
        'order': value['order'],
        'sub_text': value['subText'],
        'placeholder_expression': value['placeholderExpression'],
        'initial_value_expression': value['initialValueExpression'],
    };
}
//# sourceMappingURL=Prompt.js.map