"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.Question$ = exports.Question$outboundSchema = exports.Question$inboundSchema = exports.QuestionType$ = exports.QuestionType$outboundSchema = exports.QuestionType$inboundSchema = exports.QuestionValue$ = exports.QuestionValue$outboundSchema = exports.QuestionValue$inboundSchema = exports.QuestionSourceValue$ = exports.QuestionSourceValue$outboundSchema = exports.QuestionSourceValue$inboundSchema = exports.Question4$ = exports.Question4$outboundSchema = exports.Question4$inboundSchema = exports.QuestionRequired$ = exports.QuestionRequired$outboundSchema = exports.QuestionRequired$inboundSchema = exports.Question2$ = exports.Question2$outboundSchema = exports.Question2$inboundSchema = exports.QuestionValue = exports.Question2 = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const enums_js_1 = require("../../types/enums.js");
const questionmultiplechoiceanswers_js_1 = require("./questionmultiplechoiceanswers.js");
var Question2;
(function (Question2) {
    Question2["True"] = "true";
    Question2["False"] = "false";
})(Question2 || (exports.Question2 = Question2 = {}));
/**
 * The type of the questions.
 */
var QuestionValue;
(function (QuestionValue) {
    QuestionValue["ShortText"] = "short_text";
    QuestionValue["LongText"] = "long_text";
    QuestionValue["Attachment"] = "attachment";
    QuestionValue["MultiSelect"] = "multi_select";
    QuestionValue["SingleSelect"] = "single_select";
    QuestionValue["Boolean"] = "boolean";
    QuestionValue["Number"] = "number";
    QuestionValue["Date"] = "date";
    QuestionValue["Video"] = "video";
})(QuestionValue || (exports.QuestionValue = QuestionValue = {}));
/** @internal */
exports.Question2$inboundSchema = z
    .nativeEnum(Question2);
/** @internal */
exports.Question2$outboundSchema = exports.Question2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Question2$;
(function (Question2$) {
    /** @deprecated use `Question2$inboundSchema` instead. */
    Question2$.inboundSchema = exports.Question2$inboundSchema;
    /** @deprecated use `Question2$outboundSchema` instead. */
    Question2$.outboundSchema = exports.Question2$outboundSchema;
})(Question2$ || (exports.Question2$ = Question2$ = {}));
/** @internal */
exports.QuestionRequired$inboundSchema = z.union([z.boolean(), exports.Question2$inboundSchema]);
/** @internal */
exports.QuestionRequired$outboundSchema = z.union([z.boolean(), exports.Question2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QuestionRequired$;
(function (QuestionRequired$) {
    /** @deprecated use `QuestionRequired$inboundSchema` instead. */
    QuestionRequired$.inboundSchema = exports.QuestionRequired$inboundSchema;
    /** @deprecated use `QuestionRequired$outboundSchema` instead. */
    QuestionRequired$.outboundSchema = exports.QuestionRequired$outboundSchema;
})(QuestionRequired$ || (exports.QuestionRequired$ = QuestionRequired$ = {}));
/** @internal */
exports.Question4$inboundSchema = z.object({});
/** @internal */
exports.Question4$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 Question4$;
(function (Question4$) {
    /** @deprecated use `Question4$inboundSchema` instead. */
    Question4$.inboundSchema = exports.Question4$inboundSchema;
    /** @deprecated use `Question4$outboundSchema` instead. */
    Question4$.outboundSchema = exports.Question4$outboundSchema;
})(Question4$ || (exports.Question4$ = Question4$ = {}));
/** @internal */
exports.QuestionSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.Question4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.QuestionSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.Question4$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 QuestionSourceValue$;
(function (QuestionSourceValue$) {
    /** @deprecated use `QuestionSourceValue$inboundSchema` instead. */
    QuestionSourceValue$.inboundSchema = exports.QuestionSourceValue$inboundSchema;
    /** @deprecated use `QuestionSourceValue$outboundSchema` instead. */
    QuestionSourceValue$.outboundSchema = exports.QuestionSourceValue$outboundSchema;
})(QuestionSourceValue$ || (exports.QuestionSourceValue$ = QuestionSourceValue$ = {}));
/** @internal */
exports.QuestionValue$inboundSchema = z
    .union([
    z.nativeEnum(QuestionValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.QuestionValue$outboundSchema = z.union([
    z.nativeEnum(QuestionValue),
    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 QuestionValue$;
(function (QuestionValue$) {
    /** @deprecated use `QuestionValue$inboundSchema` instead. */
    QuestionValue$.inboundSchema = exports.QuestionValue$inboundSchema;
    /** @deprecated use `QuestionValue$outboundSchema` instead. */
    QuestionValue$.outboundSchema = exports.QuestionValue$outboundSchema;
})(QuestionValue$ || (exports.QuestionValue$ = QuestionValue$ = {}));
/** @internal */
exports.QuestionType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.Question4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.QuestionValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.QuestionType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.Question4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.QuestionValue$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 QuestionType$;
(function (QuestionType$) {
    /** @deprecated use `QuestionType$inboundSchema` instead. */
    QuestionType$.inboundSchema = exports.QuestionType$inboundSchema;
    /** @deprecated use `QuestionType$outboundSchema` instead. */
    QuestionType$.outboundSchema = exports.QuestionType$outboundSchema;
})(QuestionType$ || (exports.QuestionType$ = QuestionType$ = {}));
/** @internal */
exports.Question$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    multiple_choice_answers: z.nullable(z.array(questionmultiplechoiceanswers_js_1.QuestionMultipleChoiceAnswers$inboundSchema)).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    required: z.nullable(z.union([z.boolean(), exports.Question2$inboundSchema]))
        .optional(),
    text: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.QuestionType$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "multiple_choice_answers": "multipleChoiceAnswers",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.Question$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    multipleChoiceAnswers: z.nullable(z.array(questionmultiplechoiceanswers_js_1.QuestionMultipleChoiceAnswers$outboundSchema)).optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    required: z.nullable(z.union([z.boolean(), exports.Question2$outboundSchema]))
        .optional(),
    text: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.QuestionType$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        multipleChoiceAnswers: "multiple_choice_answers",
        remoteId: "remote_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Question$;
(function (Question$) {
    /** @deprecated use `Question$inboundSchema` instead. */
    Question$.inboundSchema = exports.Question$inboundSchema;
    /** @deprecated use `Question$outboundSchema` instead. */
    Question$.outboundSchema = exports.Question$outboundSchema;
})(Question$ || (exports.Question$ = Question$ = {}));
//# sourceMappingURL=question.js.map