"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.atsUpdateJobRequestDtoFromJSON = exports.atsUpdateJobRequestDtoToJSON = exports.AtsUpdateJobRequestDto$ = exports.AtsUpdateJobRequestDto$outboundSchema = exports.AtsUpdateJobRequestDto$inboundSchema = exports.atsUpdateJobRequestDtoJobStatusFromJSON = exports.atsUpdateJobRequestDtoJobStatusToJSON = exports.AtsUpdateJobRequestDtoJobStatus$ = exports.AtsUpdateJobRequestDtoJobStatus$outboundSchema = exports.AtsUpdateJobRequestDtoJobStatus$inboundSchema = exports.AtsUpdateJobRequestDtoValue$ = exports.AtsUpdateJobRequestDtoValue$outboundSchema = exports.AtsUpdateJobRequestDtoValue$inboundSchema = exports.atsUpdateJobRequestDtoSourceValueFromJSON = exports.atsUpdateJobRequestDtoSourceValueToJSON = exports.AtsUpdateJobRequestDtoSourceValue$ = exports.AtsUpdateJobRequestDtoSourceValue$outboundSchema = exports.AtsUpdateJobRequestDtoSourceValue$inboundSchema = exports.atsUpdateJobRequestDto4FromJSON = exports.atsUpdateJobRequestDto4ToJSON = exports.AtsUpdateJobRequestDto4$ = exports.AtsUpdateJobRequestDto4$outboundSchema = exports.AtsUpdateJobRequestDto4$inboundSchema = exports.AtsUpdateJobRequestDtoConfidential$ = exports.AtsUpdateJobRequestDtoConfidential$outboundSchema = exports.AtsUpdateJobRequestDtoConfidential$inboundSchema = exports.AtsUpdateJobRequestDtoValue = exports.AtsUpdateJobRequestDtoConfidential = 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 AtsUpdateJobRequestDtoConfidential;
(function (AtsUpdateJobRequestDtoConfidential) {
    AtsUpdateJobRequestDtoConfidential["True"] = "true";
    AtsUpdateJobRequestDtoConfidential["False"] = "false";
    AtsUpdateJobRequestDtoConfidential["UnmappedValue"] = "unmapped_value";
})(AtsUpdateJobRequestDtoConfidential || (exports.AtsUpdateJobRequestDtoConfidential = AtsUpdateJobRequestDtoConfidential = {}));
/**
 * The status of the job.
 */
var AtsUpdateJobRequestDtoValue;
(function (AtsUpdateJobRequestDtoValue) {
    AtsUpdateJobRequestDtoValue["Published"] = "published";
    AtsUpdateJobRequestDtoValue["Draft"] = "draft";
    AtsUpdateJobRequestDtoValue["Pending"] = "pending";
    AtsUpdateJobRequestDtoValue["Internal"] = "internal";
    AtsUpdateJobRequestDtoValue["Archived"] = "archived";
    AtsUpdateJobRequestDtoValue["Closed"] = "closed";
    AtsUpdateJobRequestDtoValue["Open"] = "open";
    AtsUpdateJobRequestDtoValue["Deleted"] = "deleted";
    AtsUpdateJobRequestDtoValue["OnHold"] = "on_hold";
    AtsUpdateJobRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsUpdateJobRequestDtoValue || (exports.AtsUpdateJobRequestDtoValue = AtsUpdateJobRequestDtoValue = {}));
/** @internal */
exports.AtsUpdateJobRequestDtoConfidential$inboundSchema = z
    .union([
    z.nativeEnum(AtsUpdateJobRequestDtoConfidential),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsUpdateJobRequestDtoConfidential$outboundSchema = z.union([
    z.nativeEnum(AtsUpdateJobRequestDtoConfidential),
    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 AtsUpdateJobRequestDtoConfidential$;
(function (AtsUpdateJobRequestDtoConfidential$) {
    /** @deprecated use `AtsUpdateJobRequestDtoConfidential$inboundSchema` instead. */
    AtsUpdateJobRequestDtoConfidential$.inboundSchema = exports.AtsUpdateJobRequestDtoConfidential$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDtoConfidential$outboundSchema` instead. */
    AtsUpdateJobRequestDtoConfidential$.outboundSchema = exports.AtsUpdateJobRequestDtoConfidential$outboundSchema;
})(AtsUpdateJobRequestDtoConfidential$ || (exports.AtsUpdateJobRequestDtoConfidential$ = AtsUpdateJobRequestDtoConfidential$ = {}));
/** @internal */
exports.AtsUpdateJobRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.AtsUpdateJobRequestDto4$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 AtsUpdateJobRequestDto4$;
(function (AtsUpdateJobRequestDto4$) {
    /** @deprecated use `AtsUpdateJobRequestDto4$inboundSchema` instead. */
    AtsUpdateJobRequestDto4$.inboundSchema = exports.AtsUpdateJobRequestDto4$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDto4$outboundSchema` instead. */
    AtsUpdateJobRequestDto4$.outboundSchema = exports.AtsUpdateJobRequestDto4$outboundSchema;
})(AtsUpdateJobRequestDto4$ || (exports.AtsUpdateJobRequestDto4$ = AtsUpdateJobRequestDto4$ = {}));
function atsUpdateJobRequestDto4ToJSON(atsUpdateJobRequestDto4) {
    return JSON.stringify(exports.AtsUpdateJobRequestDto4$outboundSchema.parse(atsUpdateJobRequestDto4));
}
exports.atsUpdateJobRequestDto4ToJSON = atsUpdateJobRequestDto4ToJSON;
function atsUpdateJobRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateJobRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateJobRequestDto4' from JSON`);
}
exports.atsUpdateJobRequestDto4FromJSON = atsUpdateJobRequestDto4FromJSON;
/** @internal */
exports.AtsUpdateJobRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateJobRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AtsUpdateJobRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateJobRequestDto4$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 AtsUpdateJobRequestDtoSourceValue$;
(function (AtsUpdateJobRequestDtoSourceValue$) {
    /** @deprecated use `AtsUpdateJobRequestDtoSourceValue$inboundSchema` instead. */
    AtsUpdateJobRequestDtoSourceValue$.inboundSchema = exports.AtsUpdateJobRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDtoSourceValue$outboundSchema` instead. */
    AtsUpdateJobRequestDtoSourceValue$.outboundSchema = exports.AtsUpdateJobRequestDtoSourceValue$outboundSchema;
})(AtsUpdateJobRequestDtoSourceValue$ || (exports.AtsUpdateJobRequestDtoSourceValue$ = AtsUpdateJobRequestDtoSourceValue$ = {}));
function atsUpdateJobRequestDtoSourceValueToJSON(atsUpdateJobRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsUpdateJobRequestDtoSourceValue$outboundSchema.parse(atsUpdateJobRequestDtoSourceValue));
}
exports.atsUpdateJobRequestDtoSourceValueToJSON = atsUpdateJobRequestDtoSourceValueToJSON;
function atsUpdateJobRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateJobRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateJobRequestDtoSourceValue' from JSON`);
}
exports.atsUpdateJobRequestDtoSourceValueFromJSON = atsUpdateJobRequestDtoSourceValueFromJSON;
/** @internal */
exports.AtsUpdateJobRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(AtsUpdateJobRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsUpdateJobRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(AtsUpdateJobRequestDtoValue),
    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 AtsUpdateJobRequestDtoValue$;
(function (AtsUpdateJobRequestDtoValue$) {
    /** @deprecated use `AtsUpdateJobRequestDtoValue$inboundSchema` instead. */
    AtsUpdateJobRequestDtoValue$.inboundSchema = exports.AtsUpdateJobRequestDtoValue$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDtoValue$outboundSchema` instead. */
    AtsUpdateJobRequestDtoValue$.outboundSchema = exports.AtsUpdateJobRequestDtoValue$outboundSchema;
})(AtsUpdateJobRequestDtoValue$ || (exports.AtsUpdateJobRequestDtoValue$ = AtsUpdateJobRequestDtoValue$ = {}));
/** @internal */
exports.AtsUpdateJobRequestDtoJobStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateJobRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateJobRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.AtsUpdateJobRequestDtoJobStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateJobRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateJobRequestDtoValue$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 AtsUpdateJobRequestDtoJobStatus$;
(function (AtsUpdateJobRequestDtoJobStatus$) {
    /** @deprecated use `AtsUpdateJobRequestDtoJobStatus$inboundSchema` instead. */
    AtsUpdateJobRequestDtoJobStatus$.inboundSchema = exports.AtsUpdateJobRequestDtoJobStatus$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDtoJobStatus$outboundSchema` instead. */
    AtsUpdateJobRequestDtoJobStatus$.outboundSchema = exports.AtsUpdateJobRequestDtoJobStatus$outboundSchema;
})(AtsUpdateJobRequestDtoJobStatus$ || (exports.AtsUpdateJobRequestDtoJobStatus$ = AtsUpdateJobRequestDtoJobStatus$ = {}));
function atsUpdateJobRequestDtoJobStatusToJSON(atsUpdateJobRequestDtoJobStatus) {
    return JSON.stringify(exports.AtsUpdateJobRequestDtoJobStatus$outboundSchema.parse(atsUpdateJobRequestDtoJobStatus));
}
exports.atsUpdateJobRequestDtoJobStatusToJSON = atsUpdateJobRequestDtoJobStatusToJSON;
function atsUpdateJobRequestDtoJobStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateJobRequestDtoJobStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateJobRequestDtoJobStatus' from JSON`);
}
exports.atsUpdateJobRequestDtoJobStatusFromJSON = atsUpdateJobRequestDtoJobStatusFromJSON;
/** @internal */
exports.AtsUpdateJobRequestDto$inboundSchema = z.object({
    code: z.nullable(z.string()).optional(),
    confidential: z.nullable(exports.AtsUpdateJobRequestDtoConfidential$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.AtsUpdateJobRequestDtoJobStatus$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.AtsUpdateJobRequestDto$outboundSchema = z.object({
    code: z.nullable(z.string()).optional(),
    confidential: z.nullable(exports.AtsUpdateJobRequestDtoConfidential$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.AtsUpdateJobRequestDtoJobStatus$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 AtsUpdateJobRequestDto$;
(function (AtsUpdateJobRequestDto$) {
    /** @deprecated use `AtsUpdateJobRequestDto$inboundSchema` instead. */
    AtsUpdateJobRequestDto$.inboundSchema = exports.AtsUpdateJobRequestDto$inboundSchema;
    /** @deprecated use `AtsUpdateJobRequestDto$outboundSchema` instead. */
    AtsUpdateJobRequestDto$.outboundSchema = exports.AtsUpdateJobRequestDto$outboundSchema;
})(AtsUpdateJobRequestDto$ || (exports.AtsUpdateJobRequestDto$ = AtsUpdateJobRequestDto$ = {}));
function atsUpdateJobRequestDtoToJSON(atsUpdateJobRequestDto) {
    return JSON.stringify(exports.AtsUpdateJobRequestDto$outboundSchema.parse(atsUpdateJobRequestDto));
}
exports.atsUpdateJobRequestDtoToJSON = atsUpdateJobRequestDtoToJSON;
function atsUpdateJobRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateJobRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateJobRequestDto' from JSON`);
}
exports.atsUpdateJobRequestDtoFromJSON = atsUpdateJobRequestDtoFromJSON;
//# sourceMappingURL=atsupdatejobrequestdto.js.map