"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.atsCreateJobRequestDtoFromJSON = exports.atsCreateJobRequestDtoToJSON = exports.AtsCreateJobRequestDto$ = exports.AtsCreateJobRequestDto$outboundSchema = exports.AtsCreateJobRequestDto$inboundSchema = exports.jobStatusFromJSON = exports.jobStatusToJSON = exports.JobStatus$ = exports.JobStatus$outboundSchema = exports.JobStatus$inboundSchema = exports.AtsCreateJobRequestDtoValue$ = exports.AtsCreateJobRequestDtoValue$outboundSchema = exports.AtsCreateJobRequestDtoValue$inboundSchema = exports.atsCreateJobRequestDtoSourceValueFromJSON = exports.atsCreateJobRequestDtoSourceValueToJSON = exports.AtsCreateJobRequestDtoSourceValue$ = exports.AtsCreateJobRequestDtoSourceValue$outboundSchema = exports.AtsCreateJobRequestDtoSourceValue$inboundSchema = exports.atsCreateJobRequestDto4FromJSON = exports.atsCreateJobRequestDto4ToJSON = exports.AtsCreateJobRequestDto4$ = exports.AtsCreateJobRequestDto4$outboundSchema = exports.AtsCreateJobRequestDto4$inboundSchema = exports.Confidential$ = exports.Confidential$outboundSchema = exports.Confidential$inboundSchema = exports.AtsCreateJobRequestDtoValue = exports.Confidential = 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");
const customfields_js_1 = require("./customfields.js");
const interviewstage_js_1 = require("./interviewstage.js");
const jobhiringteam_js_1 = require("./jobhiringteam.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$inboundSchema = z
    .union([
    z.nativeEnum(Confidential),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.Confidential$outboundSchema = z.union([
    z.nativeEnum(Confidential),
    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 Confidential$;
(function (Confidential$) {
    /** @deprecated use `Confidential$inboundSchema` instead. */
    Confidential$.inboundSchema = exports.Confidential$inboundSchema;
    /** @deprecated use `Confidential$outboundSchema` instead. */
    Confidential$.outboundSchema = exports.Confidential$outboundSchema;
})(Confidential$ || (exports.Confidential$ = Confidential$ = {}));
/** @internal */
exports.AtsCreateJobRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.AtsCreateJobRequestDto4$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 AtsCreateJobRequestDto4$;
(function (AtsCreateJobRequestDto4$) {
    /** @deprecated use `AtsCreateJobRequestDto4$inboundSchema` instead. */
    AtsCreateJobRequestDto4$.inboundSchema = exports.AtsCreateJobRequestDto4$inboundSchema;
    /** @deprecated use `AtsCreateJobRequestDto4$outboundSchema` instead. */
    AtsCreateJobRequestDto4$.outboundSchema = exports.AtsCreateJobRequestDto4$outboundSchema;
})(AtsCreateJobRequestDto4$ || (exports.AtsCreateJobRequestDto4$ = AtsCreateJobRequestDto4$ = {}));
function atsCreateJobRequestDto4ToJSON(atsCreateJobRequestDto4) {
    return JSON.stringify(exports.AtsCreateJobRequestDto4$outboundSchema.parse(atsCreateJobRequestDto4));
}
exports.atsCreateJobRequestDto4ToJSON = atsCreateJobRequestDto4ToJSON;
function atsCreateJobRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateJobRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateJobRequestDto4' from JSON`);
}
exports.atsCreateJobRequestDto4FromJSON = atsCreateJobRequestDto4FromJSON;
/** @internal */
exports.AtsCreateJobRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AtsCreateJobRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AtsCreateJobRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AtsCreateJobRequestDto4$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 AtsCreateJobRequestDtoSourceValue$;
(function (AtsCreateJobRequestDtoSourceValue$) {
    /** @deprecated use `AtsCreateJobRequestDtoSourceValue$inboundSchema` instead. */
    AtsCreateJobRequestDtoSourceValue$.inboundSchema = exports.AtsCreateJobRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `AtsCreateJobRequestDtoSourceValue$outboundSchema` instead. */
    AtsCreateJobRequestDtoSourceValue$.outboundSchema = exports.AtsCreateJobRequestDtoSourceValue$outboundSchema;
})(AtsCreateJobRequestDtoSourceValue$ || (exports.AtsCreateJobRequestDtoSourceValue$ = AtsCreateJobRequestDtoSourceValue$ = {}));
function atsCreateJobRequestDtoSourceValueToJSON(atsCreateJobRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsCreateJobRequestDtoSourceValue$outboundSchema.parse(atsCreateJobRequestDtoSourceValue));
}
exports.atsCreateJobRequestDtoSourceValueToJSON = atsCreateJobRequestDtoSourceValueToJSON;
function atsCreateJobRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateJobRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateJobRequestDtoSourceValue' from JSON`);
}
exports.atsCreateJobRequestDtoSourceValueFromJSON = atsCreateJobRequestDtoSourceValueFromJSON;
/** @internal */
exports.AtsCreateJobRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(AtsCreateJobRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsCreateJobRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(AtsCreateJobRequestDtoValue),
    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 AtsCreateJobRequestDtoValue$;
(function (AtsCreateJobRequestDtoValue$) {
    /** @deprecated use `AtsCreateJobRequestDtoValue$inboundSchema` instead. */
    AtsCreateJobRequestDtoValue$.inboundSchema = exports.AtsCreateJobRequestDtoValue$inboundSchema;
    /** @deprecated use `AtsCreateJobRequestDtoValue$outboundSchema` instead. */
    AtsCreateJobRequestDtoValue$.outboundSchema = exports.AtsCreateJobRequestDtoValue$outboundSchema;
})(AtsCreateJobRequestDtoValue$ || (exports.AtsCreateJobRequestDtoValue$ = AtsCreateJobRequestDtoValue$ = {}));
/** @internal */
exports.JobStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AtsCreateJobRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateJobRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JobStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AtsCreateJobRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateJobRequestDtoValue$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 JobStatus$;
(function (JobStatus$) {
    /** @deprecated use `JobStatus$inboundSchema` instead. */
    JobStatus$.inboundSchema = exports.JobStatus$inboundSchema;
    /** @deprecated use `JobStatus$outboundSchema` instead. */
    JobStatus$.outboundSchema = exports.JobStatus$outboundSchema;
})(JobStatus$ || (exports.JobStatus$ = JobStatus$ = {}));
function jobStatusToJSON(jobStatus) {
    return JSON.stringify(exports.JobStatus$outboundSchema.parse(jobStatus));
}
exports.jobStatusToJSON = jobStatusToJSON;
function jobStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobStatus' from JSON`);
}
exports.jobStatusFromJSON = jobStatusFromJSON;
/** @internal */
exports.AtsCreateJobRequestDto$inboundSchema = z.object({
    code: z.nullable(z.string()).optional(),
    confidential: z.nullable(exports.Confidential$inboundSchema).optional(),
    custom_fields: z.nullable(z.array(customfields_js_1.CustomFields$inboundSchema)).optional(),
    department_ids: z.nullable(z.array(z.string())).optional(),
    description: z.nullable(z.string()).optional(),
    hiring_team: z.nullable(z.array(jobhiringteam_js_1.JobHiringTeam$inboundSchema)).optional(),
    interview_stages: z.nullable(z.array(interviewstage_js_1.InterviewStage$inboundSchema))
        .optional(),
    job_status: z.nullable(z.lazy(() => exports.JobStatus$inboundSchema)).optional(),
    location_ids: 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(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "custom_fields": "customFields",
        "department_ids": "departmentIds",
        "hiring_team": "hiringTeam",
        "interview_stages": "interviewStages",
        "job_status": "jobStatus",
        "location_ids": "locationIds",
        "unified_custom_fields": "unifiedCustomFields",
    });
});
/** @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(jobhiringteam_js_1.JobHiringTeam$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsCreateJobRequestDto$;
(function (AtsCreateJobRequestDto$) {
    /** @deprecated use `AtsCreateJobRequestDto$inboundSchema` instead. */
    AtsCreateJobRequestDto$.inboundSchema = exports.AtsCreateJobRequestDto$inboundSchema;
    /** @deprecated use `AtsCreateJobRequestDto$outboundSchema` instead. */
    AtsCreateJobRequestDto$.outboundSchema = exports.AtsCreateJobRequestDto$outboundSchema;
})(AtsCreateJobRequestDto$ || (exports.AtsCreateJobRequestDto$ = AtsCreateJobRequestDto$ = {}));
function atsCreateJobRequestDtoToJSON(atsCreateJobRequestDto) {
    return JSON.stringify(exports.AtsCreateJobRequestDto$outboundSchema.parse(atsCreateJobRequestDto));
}
exports.atsCreateJobRequestDtoToJSON = atsCreateJobRequestDtoToJSON;
function atsCreateJobRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateJobRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateJobRequestDto' from JSON`);
}
exports.atsCreateJobRequestDtoFromJSON = atsCreateJobRequestDtoFromJSON;
//# sourceMappingURL=atscreatejobrequestdto.js.map