"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAnswerFromJSON = exports.createAnswerToJSON = exports.CreateAnswer$ = exports.CreateAnswer$outboundSchema = exports.CreateAnswer$inboundSchema = exports.createAnswerTypeFromJSON = exports.createAnswerTypeToJSON = exports.CreateAnswerType$ = exports.CreateAnswerType$outboundSchema = exports.CreateAnswerType$inboundSchema = exports.CreateAnswerValue$ = exports.CreateAnswerValue$outboundSchema = exports.CreateAnswerValue$inboundSchema = exports.createAnswerSourceValueFromJSON = exports.createAnswerSourceValueToJSON = exports.CreateAnswerSourceValue$ = exports.CreateAnswerSourceValue$outboundSchema = exports.CreateAnswerSourceValue$inboundSchema = exports.createAnswer4FromJSON = exports.createAnswer4ToJSON = exports.CreateAnswer4$ = exports.CreateAnswer4$outboundSchema = exports.CreateAnswer4$inboundSchema = exports.CreateAnswerValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
/**
 * The type of the answer.
 */
var CreateAnswerValue;
(function (CreateAnswerValue) {
    CreateAnswerValue["ShortText"] = "short_text";
    CreateAnswerValue["LongText"] = "long_text";
    CreateAnswerValue["Attachment"] = "attachment";
    CreateAnswerValue["MultiSelect"] = "multi_select";
    CreateAnswerValue["SingleSelect"] = "single_select";
    CreateAnswerValue["Boolean"] = "boolean";
    CreateAnswerValue["Number"] = "number";
    CreateAnswerValue["Date"] = "date";
    CreateAnswerValue["Video"] = "video";
})(CreateAnswerValue || (exports.CreateAnswerValue = CreateAnswerValue = {}));
/** @internal */
exports.CreateAnswer4$inboundSchema = z.object({});
/** @internal */
exports.CreateAnswer4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAnswer4$;
(function (CreateAnswer4$) {
    /** @deprecated use `CreateAnswer4$inboundSchema` instead. */
    CreateAnswer4$.inboundSchema = exports.CreateAnswer4$inboundSchema;
    /** @deprecated use `CreateAnswer4$outboundSchema` instead. */
    CreateAnswer4$.outboundSchema = exports.CreateAnswer4$outboundSchema;
})(CreateAnswer4$ || (exports.CreateAnswer4$ = CreateAnswer4$ = {}));
function createAnswer4ToJSON(createAnswer4) {
    return JSON.stringify(exports.CreateAnswer4$outboundSchema.parse(createAnswer4));
}
exports.createAnswer4ToJSON = createAnswer4ToJSON;
function createAnswer4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAnswer4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAnswer4' from JSON`);
}
exports.createAnswer4FromJSON = createAnswer4FromJSON;
/** @internal */
exports.CreateAnswerSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.CreateAnswer4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.CreateAnswerSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.CreateAnswer4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAnswerSourceValue$;
(function (CreateAnswerSourceValue$) {
    /** @deprecated use `CreateAnswerSourceValue$inboundSchema` instead. */
    CreateAnswerSourceValue$.inboundSchema = exports.CreateAnswerSourceValue$inboundSchema;
    /** @deprecated use `CreateAnswerSourceValue$outboundSchema` instead. */
    CreateAnswerSourceValue$.outboundSchema = exports.CreateAnswerSourceValue$outboundSchema;
})(CreateAnswerSourceValue$ || (exports.CreateAnswerSourceValue$ = CreateAnswerSourceValue$ = {}));
function createAnswerSourceValueToJSON(createAnswerSourceValue) {
    return JSON.stringify(exports.CreateAnswerSourceValue$outboundSchema.parse(createAnswerSourceValue));
}
exports.createAnswerSourceValueToJSON = createAnswerSourceValueToJSON;
function createAnswerSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAnswerSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAnswerSourceValue' from JSON`);
}
exports.createAnswerSourceValueFromJSON = createAnswerSourceValueFromJSON;
/** @internal */
exports.CreateAnswerValue$inboundSchema = z
    .union([
    z.nativeEnum(CreateAnswerValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.CreateAnswerValue$outboundSchema = z.union([
    z.nativeEnum(CreateAnswerValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAnswerValue$;
(function (CreateAnswerValue$) {
    /** @deprecated use `CreateAnswerValue$inboundSchema` instead. */
    CreateAnswerValue$.inboundSchema = exports.CreateAnswerValue$inboundSchema;
    /** @deprecated use `CreateAnswerValue$outboundSchema` instead. */
    CreateAnswerValue$.outboundSchema = exports.CreateAnswerValue$outboundSchema;
})(CreateAnswerValue$ || (exports.CreateAnswerValue$ = CreateAnswerValue$ = {}));
/** @internal */
exports.CreateAnswerType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.CreateAnswer4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CreateAnswerValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.CreateAnswerType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.CreateAnswer4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CreateAnswerValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAnswerType$;
(function (CreateAnswerType$) {
    /** @deprecated use `CreateAnswerType$inboundSchema` instead. */
    CreateAnswerType$.inboundSchema = exports.CreateAnswerType$inboundSchema;
    /** @deprecated use `CreateAnswerType$outboundSchema` instead. */
    CreateAnswerType$.outboundSchema = exports.CreateAnswerType$outboundSchema;
})(CreateAnswerType$ || (exports.CreateAnswerType$ = CreateAnswerType$ = {}));
function createAnswerTypeToJSON(createAnswerType) {
    return JSON.stringify(exports.CreateAnswerType$outboundSchema.parse(createAnswerType));
}
exports.createAnswerTypeToJSON = createAnswerTypeToJSON;
function createAnswerTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAnswerType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAnswerType' from JSON`);
}
exports.createAnswerTypeFromJSON = createAnswerTypeFromJSON;
/** @internal */
exports.CreateAnswer$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.CreateAnswerType$inboundSchema)).optional(),
    values: z.nullable(z.array(z.string())).optional(),
});
/** @internal */
exports.CreateAnswer$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.CreateAnswerType$outboundSchema)).optional(),
    values: z.nullable(z.array(z.string())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateAnswer$;
(function (CreateAnswer$) {
    /** @deprecated use `CreateAnswer$inboundSchema` instead. */
    CreateAnswer$.inboundSchema = exports.CreateAnswer$inboundSchema;
    /** @deprecated use `CreateAnswer$outboundSchema` instead. */
    CreateAnswer$.outboundSchema = exports.CreateAnswer$outboundSchema;
})(CreateAnswer$ || (exports.CreateAnswer$ = CreateAnswer$ = {}));
function createAnswerToJSON(createAnswer) {
    return JSON.stringify(exports.CreateAnswer$outboundSchema.parse(createAnswer));
}
exports.createAnswerToJSON = createAnswerToJSON;
function createAnswerFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAnswer' from JSON`);
}
exports.createAnswerFromJSON = createAnswerFromJSON;
//# sourceMappingURL=createanswer.js.map