"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.atsUpdateApplicationRequestDtoFromJSON = exports.atsUpdateApplicationRequestDtoToJSON = exports.AtsUpdateApplicationRequestDto$ = exports.AtsUpdateApplicationRequestDto$outboundSchema = exports.AtsUpdateApplicationRequestDto$inboundSchema = exports.atsUpdateApplicationRequestDtoSourceFromJSON = exports.atsUpdateApplicationRequestDtoSourceToJSON = exports.AtsUpdateApplicationRequestDtoSource$ = exports.AtsUpdateApplicationRequestDtoSource$outboundSchema = exports.AtsUpdateApplicationRequestDtoSource$inboundSchema = exports.atsUpdateApplicationRequestDtoApplicationStatusFromJSON = exports.atsUpdateApplicationRequestDtoApplicationStatusToJSON = exports.AtsUpdateApplicationRequestDtoApplicationStatus$ = exports.AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema = exports.AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema = exports.AtsUpdateApplicationRequestDtoValue$ = exports.AtsUpdateApplicationRequestDtoValue$outboundSchema = exports.AtsUpdateApplicationRequestDtoValue$inboundSchema = exports.atsUpdateApplicationRequestDtoSourceValueFromJSON = exports.atsUpdateApplicationRequestDtoSourceValueToJSON = exports.AtsUpdateApplicationRequestDtoSourceValue$ = exports.AtsUpdateApplicationRequestDtoSourceValue$outboundSchema = exports.AtsUpdateApplicationRequestDtoSourceValue$inboundSchema = exports.atsUpdateApplicationRequestDto4FromJSON = exports.atsUpdateApplicationRequestDto4ToJSON = exports.AtsUpdateApplicationRequestDto4$ = exports.AtsUpdateApplicationRequestDto4$outboundSchema = exports.AtsUpdateApplicationRequestDto4$inboundSchema = exports.AtsUpdateApplicationRequestDtoValue = 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");
/**
 * The status of the application.
 */
var AtsUpdateApplicationRequestDtoValue;
(function (AtsUpdateApplicationRequestDtoValue) {
    AtsUpdateApplicationRequestDtoValue["Active"] = "active";
    AtsUpdateApplicationRequestDtoValue["Assessment"] = "assessment";
    AtsUpdateApplicationRequestDtoValue["BackgroundCheck"] = "background_check";
    AtsUpdateApplicationRequestDtoValue["Converted"] = "converted";
    AtsUpdateApplicationRequestDtoValue["DeclinedByCandidate"] = "declined_by_candidate";
    AtsUpdateApplicationRequestDtoValue["Hired"] = "hired";
    AtsUpdateApplicationRequestDtoValue["Interview"] = "interview";
    AtsUpdateApplicationRequestDtoValue["Lead"] = "lead";
    AtsUpdateApplicationRequestDtoValue["Offer"] = "offer";
    AtsUpdateApplicationRequestDtoValue["ReferenceCheck"] = "reference_check";
    AtsUpdateApplicationRequestDtoValue["Rejected"] = "rejected";
    AtsUpdateApplicationRequestDtoValue["Review"] = "review";
    AtsUpdateApplicationRequestDtoValue["Screen"] = "screen";
    AtsUpdateApplicationRequestDtoValue["New"] = "new";
    AtsUpdateApplicationRequestDtoValue["Onboarding"] = "onboarding";
    AtsUpdateApplicationRequestDtoValue["Created"] = "created";
    AtsUpdateApplicationRequestDtoValue["Accepted"] = "accepted";
    AtsUpdateApplicationRequestDtoValue["ShortList"] = "short_list";
    AtsUpdateApplicationRequestDtoValue["Approved"] = "approved";
    AtsUpdateApplicationRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsUpdateApplicationRequestDtoValue || (exports.AtsUpdateApplicationRequestDtoValue = AtsUpdateApplicationRequestDtoValue = {}));
/** @internal */
exports.AtsUpdateApplicationRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.AtsUpdateApplicationRequestDto4$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 AtsUpdateApplicationRequestDto4$;
(function (AtsUpdateApplicationRequestDto4$) {
    /** @deprecated use `AtsUpdateApplicationRequestDto4$inboundSchema` instead. */
    AtsUpdateApplicationRequestDto4$.inboundSchema = exports.AtsUpdateApplicationRequestDto4$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDto4$outboundSchema` instead. */
    AtsUpdateApplicationRequestDto4$.outboundSchema = exports.AtsUpdateApplicationRequestDto4$outboundSchema;
})(AtsUpdateApplicationRequestDto4$ || (exports.AtsUpdateApplicationRequestDto4$ = AtsUpdateApplicationRequestDto4$ = {}));
function atsUpdateApplicationRequestDto4ToJSON(atsUpdateApplicationRequestDto4) {
    return JSON.stringify(exports.AtsUpdateApplicationRequestDto4$outboundSchema.parse(atsUpdateApplicationRequestDto4));
}
exports.atsUpdateApplicationRequestDto4ToJSON = atsUpdateApplicationRequestDto4ToJSON;
function atsUpdateApplicationRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateApplicationRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateApplicationRequestDto4' from JSON`);
}
exports.atsUpdateApplicationRequestDto4FromJSON = atsUpdateApplicationRequestDto4FromJSON;
/** @internal */
exports.AtsUpdateApplicationRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateApplicationRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AtsUpdateApplicationRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateApplicationRequestDto4$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 AtsUpdateApplicationRequestDtoSourceValue$;
(function (AtsUpdateApplicationRequestDtoSourceValue$) {
    /** @deprecated use `AtsUpdateApplicationRequestDtoSourceValue$inboundSchema` instead. */
    AtsUpdateApplicationRequestDtoSourceValue$.inboundSchema = exports.AtsUpdateApplicationRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDtoSourceValue$outboundSchema` instead. */
    AtsUpdateApplicationRequestDtoSourceValue$.outboundSchema = exports.AtsUpdateApplicationRequestDtoSourceValue$outboundSchema;
})(AtsUpdateApplicationRequestDtoSourceValue$ || (exports.AtsUpdateApplicationRequestDtoSourceValue$ = AtsUpdateApplicationRequestDtoSourceValue$ = {}));
function atsUpdateApplicationRequestDtoSourceValueToJSON(atsUpdateApplicationRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsUpdateApplicationRequestDtoSourceValue$outboundSchema.parse(atsUpdateApplicationRequestDtoSourceValue));
}
exports.atsUpdateApplicationRequestDtoSourceValueToJSON = atsUpdateApplicationRequestDtoSourceValueToJSON;
function atsUpdateApplicationRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateApplicationRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateApplicationRequestDtoSourceValue' from JSON`);
}
exports.atsUpdateApplicationRequestDtoSourceValueFromJSON = atsUpdateApplicationRequestDtoSourceValueFromJSON;
/** @internal */
exports.AtsUpdateApplicationRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(AtsUpdateApplicationRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsUpdateApplicationRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(AtsUpdateApplicationRequestDtoValue),
    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 AtsUpdateApplicationRequestDtoValue$;
(function (AtsUpdateApplicationRequestDtoValue$) {
    /** @deprecated use `AtsUpdateApplicationRequestDtoValue$inboundSchema` instead. */
    AtsUpdateApplicationRequestDtoValue$.inboundSchema = exports.AtsUpdateApplicationRequestDtoValue$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDtoValue$outboundSchema` instead. */
    AtsUpdateApplicationRequestDtoValue$.outboundSchema = exports.AtsUpdateApplicationRequestDtoValue$outboundSchema;
})(AtsUpdateApplicationRequestDtoValue$ || (exports.AtsUpdateApplicationRequestDtoValue$ = AtsUpdateApplicationRequestDtoValue$ = {}));
/** @internal */
exports.AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateApplicationRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateApplicationRequestDtoValue$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateApplicationRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateApplicationRequestDtoValue$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 AtsUpdateApplicationRequestDtoApplicationStatus$;
(function (AtsUpdateApplicationRequestDtoApplicationStatus$) {
    /** @deprecated use `AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema` instead. */
    AtsUpdateApplicationRequestDtoApplicationStatus$.inboundSchema = exports.AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema` instead. */
    AtsUpdateApplicationRequestDtoApplicationStatus$.outboundSchema = exports.AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema;
})(AtsUpdateApplicationRequestDtoApplicationStatus$ || (exports.AtsUpdateApplicationRequestDtoApplicationStatus$ = AtsUpdateApplicationRequestDtoApplicationStatus$ = {}));
function atsUpdateApplicationRequestDtoApplicationStatusToJSON(atsUpdateApplicationRequestDtoApplicationStatus) {
    return JSON.stringify(exports.AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema.parse(atsUpdateApplicationRequestDtoApplicationStatus));
}
exports.atsUpdateApplicationRequestDtoApplicationStatusToJSON = atsUpdateApplicationRequestDtoApplicationStatusToJSON;
function atsUpdateApplicationRequestDtoApplicationStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateApplicationRequestDtoApplicationStatus' from JSON`);
}
exports.atsUpdateApplicationRequestDtoApplicationStatusFromJSON = atsUpdateApplicationRequestDtoApplicationStatusFromJSON;
/** @internal */
exports.AtsUpdateApplicationRequestDtoSource$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
});
/** @internal */
exports.AtsUpdateApplicationRequestDtoSource$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsUpdateApplicationRequestDtoSource$;
(function (AtsUpdateApplicationRequestDtoSource$) {
    /** @deprecated use `AtsUpdateApplicationRequestDtoSource$inboundSchema` instead. */
    AtsUpdateApplicationRequestDtoSource$.inboundSchema = exports.AtsUpdateApplicationRequestDtoSource$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDtoSource$outboundSchema` instead. */
    AtsUpdateApplicationRequestDtoSource$.outboundSchema = exports.AtsUpdateApplicationRequestDtoSource$outboundSchema;
})(AtsUpdateApplicationRequestDtoSource$ || (exports.AtsUpdateApplicationRequestDtoSource$ = AtsUpdateApplicationRequestDtoSource$ = {}));
function atsUpdateApplicationRequestDtoSourceToJSON(atsUpdateApplicationRequestDtoSource) {
    return JSON.stringify(exports.AtsUpdateApplicationRequestDtoSource$outboundSchema.parse(atsUpdateApplicationRequestDtoSource));
}
exports.atsUpdateApplicationRequestDtoSourceToJSON = atsUpdateApplicationRequestDtoSourceToJSON;
function atsUpdateApplicationRequestDtoSourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateApplicationRequestDtoSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateApplicationRequestDtoSource' from JSON`);
}
exports.atsUpdateApplicationRequestDtoSourceFromJSON = atsUpdateApplicationRequestDtoSourceFromJSON;
/** @internal */
exports.AtsUpdateApplicationRequestDto$inboundSchema = z.object({
    application_status: z.nullable(z.lazy(() => exports.AtsUpdateApplicationRequestDtoApplicationStatus$inboundSchema)).optional(),
    custom_fields: z.nullable(z.array(customfields_js_1.CustomFields$inboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    source: z.nullable(z.lazy(() => exports.AtsUpdateApplicationRequestDtoSource$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "application_status": "applicationStatus",
        "custom_fields": "customFields",
    });
});
/** @internal */
exports.AtsUpdateApplicationRequestDto$outboundSchema = z.object({
    applicationStatus: z.nullable(z.lazy(() => exports.AtsUpdateApplicationRequestDtoApplicationStatus$outboundSchema)).optional(),
    customFields: z.nullable(z.array(customfields_js_1.CustomFields$outboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    source: z.nullable(z.lazy(() => exports.AtsUpdateApplicationRequestDtoSource$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        applicationStatus: "application_status",
        customFields: "custom_fields",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsUpdateApplicationRequestDto$;
(function (AtsUpdateApplicationRequestDto$) {
    /** @deprecated use `AtsUpdateApplicationRequestDto$inboundSchema` instead. */
    AtsUpdateApplicationRequestDto$.inboundSchema = exports.AtsUpdateApplicationRequestDto$inboundSchema;
    /** @deprecated use `AtsUpdateApplicationRequestDto$outboundSchema` instead. */
    AtsUpdateApplicationRequestDto$.outboundSchema = exports.AtsUpdateApplicationRequestDto$outboundSchema;
})(AtsUpdateApplicationRequestDto$ || (exports.AtsUpdateApplicationRequestDto$ = AtsUpdateApplicationRequestDto$ = {}));
function atsUpdateApplicationRequestDtoToJSON(atsUpdateApplicationRequestDto) {
    return JSON.stringify(exports.AtsUpdateApplicationRequestDto$outboundSchema.parse(atsUpdateApplicationRequestDto));
}
exports.atsUpdateApplicationRequestDtoToJSON = atsUpdateApplicationRequestDtoToJSON;
function atsUpdateApplicationRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateApplicationRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateApplicationRequestDto' from JSON`);
}
exports.atsUpdateApplicationRequestDtoFromJSON = atsUpdateApplicationRequestDtoFromJSON;
//# sourceMappingURL=atsupdateapplicationrequestdto.js.map