"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.jobPostingQuestionnaireFromJSON = exports.jobPostingQuestionnaireToJSON = exports.JobPostingQuestionnaire$ = exports.JobPostingQuestionnaire$outboundSchema = exports.JobPostingQuestionnaire$inboundSchema = exports.jobPostingQuestionnaireInternalFromJSON = exports.jobPostingQuestionnaireInternalToJSON = exports.JobPostingQuestionnaireInternal$ = exports.JobPostingQuestionnaireInternal$outboundSchema = exports.JobPostingQuestionnaireInternal$inboundSchema = exports.JobPostingQuestionnaire2$ = exports.JobPostingQuestionnaire2$outboundSchema = exports.JobPostingQuestionnaire2$inboundSchema = exports.JobPostingQuestionnaire2 = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const question_js_1 = require("./question.js");
var JobPostingQuestionnaire2;
(function (JobPostingQuestionnaire2) {
    JobPostingQuestionnaire2["True"] = "true";
    JobPostingQuestionnaire2["False"] = "false";
})(JobPostingQuestionnaire2 || (exports.JobPostingQuestionnaire2 = JobPostingQuestionnaire2 = {}));
/** @internal */
exports.JobPostingQuestionnaire2$inboundSchema = z.nativeEnum(JobPostingQuestionnaire2);
/** @internal */
exports.JobPostingQuestionnaire2$outboundSchema = exports.JobPostingQuestionnaire2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobPostingQuestionnaire2$;
(function (JobPostingQuestionnaire2$) {
    /** @deprecated use `JobPostingQuestionnaire2$inboundSchema` instead. */
    JobPostingQuestionnaire2$.inboundSchema = exports.JobPostingQuestionnaire2$inboundSchema;
    /** @deprecated use `JobPostingQuestionnaire2$outboundSchema` instead. */
    JobPostingQuestionnaire2$.outboundSchema = exports.JobPostingQuestionnaire2$outboundSchema;
})(JobPostingQuestionnaire2$ || (exports.JobPostingQuestionnaire2$ = JobPostingQuestionnaire2$ = {}));
/** @internal */
exports.JobPostingQuestionnaireInternal$inboundSchema = z.union([z.boolean(), exports.JobPostingQuestionnaire2$inboundSchema]);
/** @internal */
exports.JobPostingQuestionnaireInternal$outboundSchema = z.union([z.boolean(), exports.JobPostingQuestionnaire2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobPostingQuestionnaireInternal$;
(function (JobPostingQuestionnaireInternal$) {
    /** @deprecated use `JobPostingQuestionnaireInternal$inboundSchema` instead. */
    JobPostingQuestionnaireInternal$.inboundSchema = exports.JobPostingQuestionnaireInternal$inboundSchema;
    /** @deprecated use `JobPostingQuestionnaireInternal$outboundSchema` instead. */
    JobPostingQuestionnaireInternal$.outboundSchema = exports.JobPostingQuestionnaireInternal$outboundSchema;
})(JobPostingQuestionnaireInternal$ || (exports.JobPostingQuestionnaireInternal$ = JobPostingQuestionnaireInternal$ = {}));
function jobPostingQuestionnaireInternalToJSON(jobPostingQuestionnaireInternal) {
    return JSON.stringify(exports.JobPostingQuestionnaireInternal$outboundSchema.parse(jobPostingQuestionnaireInternal));
}
exports.jobPostingQuestionnaireInternalToJSON = jobPostingQuestionnaireInternalToJSON;
function jobPostingQuestionnaireInternalFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingQuestionnaireInternal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingQuestionnaireInternal' from JSON`);
}
exports.jobPostingQuestionnaireInternalFromJSON = jobPostingQuestionnaireInternalFromJSON;
/** @internal */
exports.JobPostingQuestionnaire$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(z.union([z.boolean(), exports.JobPostingQuestionnaire2$inboundSchema])).optional(),
    name: z.nullable(z.string()).optional(),
    questions: z.nullable(z.array(question_js_1.Question$inboundSchema)).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.JobPostingQuestionnaire$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(z.union([z.boolean(), exports.JobPostingQuestionnaire2$outboundSchema])).optional(),
    name: z.nullable(z.string()).optional(),
    questions: z.nullable(z.array(question_js_1.Question$outboundSchema)).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        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 JobPostingQuestionnaire$;
(function (JobPostingQuestionnaire$) {
    /** @deprecated use `JobPostingQuestionnaire$inboundSchema` instead. */
    JobPostingQuestionnaire$.inboundSchema = exports.JobPostingQuestionnaire$inboundSchema;
    /** @deprecated use `JobPostingQuestionnaire$outboundSchema` instead. */
    JobPostingQuestionnaire$.outboundSchema = exports.JobPostingQuestionnaire$outboundSchema;
})(JobPostingQuestionnaire$ || (exports.JobPostingQuestionnaire$ = JobPostingQuestionnaire$ = {}));
function jobPostingQuestionnaireToJSON(jobPostingQuestionnaire) {
    return JSON.stringify(exports.JobPostingQuestionnaire$outboundSchema.parse(jobPostingQuestionnaire));
}
exports.jobPostingQuestionnaireToJSON = jobPostingQuestionnaireToJSON;
function jobPostingQuestionnaireFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingQuestionnaire$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingQuestionnaire' from JSON`);
}
exports.jobPostingQuestionnaireFromJSON = jobPostingQuestionnaireFromJSON;
//# sourceMappingURL=jobpostingquestionnaire.js.map