"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AtsCreateJobRequestDto$outboundSchema = exports.JobStatus$outboundSchema = exports.AtsCreateJobRequestDtoValue$outboundSchema = exports.AtsCreateJobRequestDtoSourceValue$outboundSchema = exports.AtsCreateJobRequestDto4$outboundSchema = exports.Confidential$outboundSchema = exports.AtsCreateJobRequestDtoValue = exports.Confidential = void 0;
exports.atsCreateJobRequestDto4ToJSON = atsCreateJobRequestDto4ToJSON;
exports.atsCreateJobRequestDtoSourceValueToJSON = atsCreateJobRequestDtoSourceValueToJSON;
exports.jobStatusToJSON = jobStatusToJSON;
exports.atsCreateJobRequestDtoToJSON = atsCreateJobRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(require("../../types/enums.js"));
const atsjobhiringteam_js_1 = require("./atsjobhiringteam.js");
const customfields_js_1 = require("./customfields.js");
const interviewstage_js_1 = require("./interviewstage.js");
/**
 * Confidential status of the job
 */
var Confidential;
(function (Confidential) {
    Confidential["True"] = "true";
    Confidential["False"] = "false";
    Confidential["UnmappedValue"] = "unmapped_value";
})(Confidential || (exports.Confidential = Confidential = {}));
/**
 * The status of the job.
 */
var AtsCreateJobRequestDtoValue;
(function (AtsCreateJobRequestDtoValue) {
    AtsCreateJobRequestDtoValue["Published"] = "published";
    AtsCreateJobRequestDtoValue["Draft"] = "draft";
    AtsCreateJobRequestDtoValue["Pending"] = "pending";
    AtsCreateJobRequestDtoValue["Internal"] = "internal";
    AtsCreateJobRequestDtoValue["Archived"] = "archived";
    AtsCreateJobRequestDtoValue["Closed"] = "closed";
    AtsCreateJobRequestDtoValue["Open"] = "open";
    AtsCreateJobRequestDtoValue["Deleted"] = "deleted";
    AtsCreateJobRequestDtoValue["OnHold"] = "on_hold";
    AtsCreateJobRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsCreateJobRequestDtoValue || (exports.AtsCreateJobRequestDtoValue = AtsCreateJobRequestDtoValue = {}));
/** @internal */
exports.Confidential$outboundSchema = openEnums.outboundSchema(Confidential);
/** @internal */
exports.AtsCreateJobRequestDto4$outboundSchema = z.object({});
function atsCreateJobRequestDto4ToJSON(atsCreateJobRequestDto4) {
    return JSON.stringify(exports.AtsCreateJobRequestDto4$outboundSchema.parse(atsCreateJobRequestDto4));
}
/** @internal */
exports.AtsCreateJobRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AtsCreateJobRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function atsCreateJobRequestDtoSourceValueToJSON(atsCreateJobRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsCreateJobRequestDtoSourceValue$outboundSchema.parse(atsCreateJobRequestDtoSourceValue));
}
/** @internal */
exports.AtsCreateJobRequestDtoValue$outboundSchema = openEnums.outboundSchema(AtsCreateJobRequestDtoValue);
/** @internal */
exports.JobStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AtsCreateJobRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateJobRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function jobStatusToJSON(jobStatus) {
    return JSON.stringify(exports.JobStatus$outboundSchema.parse(jobStatus));
}
/** @internal */
exports.AtsCreateJobRequestDto$outboundSchema = z.object({
    code: z.nullable(z.string()).optional(),
    confidential: z.nullable(exports.Confidential$outboundSchema).optional(),
    customFields: z.nullable(z.array(customfields_js_1.CustomFields$outboundSchema)).optional(),
    departmentIds: z.nullable(z.array(z.string())).optional(),
    description: z.nullable(z.string()).optional(),
    hiringTeam: z.nullable(z.array(atsjobhiringteam_js_1.AtsJobHiringTeam$outboundSchema)).optional(),
    interviewStages: z.nullable(z.array(interviewstage_js_1.InterviewStage$outboundSchema))
        .optional(),
    jobStatus: z.nullable(z.lazy(() => exports.JobStatus$outboundSchema)).optional(),
    locationIds: z.nullable(z.array(z.string())).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    status: z.nullable(z.string()).optional(),
    title: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        customFields: "custom_fields",
        departmentIds: "department_ids",
        hiringTeam: "hiring_team",
        interviewStages: "interview_stages",
        jobStatus: "job_status",
        locationIds: "location_ids",
        unifiedCustomFields: "unified_custom_fields",
    });
});
function atsCreateJobRequestDtoToJSON(atsCreateJobRequestDto) {
    return JSON.stringify(exports.AtsCreateJobRequestDto$outboundSchema.parse(atsCreateJobRequestDto));
}
//# sourceMappingURL=atscreatejobrequestdto.js.map