"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.employmentSchemasPayFrequencySourceValueFromJSON = exports.employmentSchemasPayFrequencySourceValueToJSON = exports.EmploymentSchemasPayFrequencySourceValue$ = exports.EmploymentSchemasPayFrequencySourceValue$outboundSchema = exports.EmploymentSchemasPayFrequencySourceValue$inboundSchema = exports.employmentSchemasPayFrequency4FromJSON = exports.employmentSchemasPayFrequency4ToJSON = exports.EmploymentSchemasPayFrequency4$ = exports.EmploymentSchemasPayFrequency4$outboundSchema = exports.EmploymentSchemasPayFrequency4$inboundSchema = exports.employmentEmploymentTypeFromJSON = exports.employmentEmploymentTypeToJSON = exports.EmploymentEmploymentType$ = exports.EmploymentEmploymentType$outboundSchema = exports.EmploymentEmploymentType$inboundSchema = exports.EmploymentSchemasValue$ = exports.EmploymentSchemasValue$outboundSchema = exports.EmploymentSchemasValue$inboundSchema = exports.employmentSchemasSourceValueFromJSON = exports.employmentSchemasSourceValueToJSON = exports.EmploymentSchemasSourceValue$ = exports.EmploymentSchemasSourceValue$outboundSchema = exports.EmploymentSchemasSourceValue$inboundSchema = exports.employmentSchemas4FromJSON = exports.employmentSchemas4ToJSON = exports.EmploymentSchemas4$ = exports.EmploymentSchemas4$outboundSchema = exports.EmploymentSchemas4$inboundSchema = exports.employmentEmploymentContractTypeFromJSON = exports.employmentEmploymentContractTypeToJSON = exports.EmploymentEmploymentContractType$ = exports.EmploymentEmploymentContractType$outboundSchema = exports.EmploymentEmploymentContractType$inboundSchema = exports.EmploymentValue$ = exports.EmploymentValue$outboundSchema = exports.EmploymentValue$inboundSchema = exports.employmentSourceValueFromJSON = exports.employmentSourceValueToJSON = exports.EmploymentSourceValue$ = exports.EmploymentSourceValue$outboundSchema = exports.EmploymentSourceValue$inboundSchema = exports.employment4FromJSON = exports.employment4ToJSON = exports.Employment4$ = exports.Employment4$outboundSchema = exports.Employment4$inboundSchema = exports.EmploymentSchemasPayPeriodValue = exports.EmploymentSchemasPayFrequencyValue = exports.EmploymentSchemasValue = exports.EmploymentValue = void 0;
exports.employmentFromJSON = exports.employmentToJSON = exports.Employment$ = exports.Employment$outboundSchema = exports.Employment$inboundSchema = exports.employmentPayPeriodFromJSON = exports.employmentPayPeriodToJSON = exports.EmploymentPayPeriod$ = exports.EmploymentPayPeriod$outboundSchema = exports.EmploymentPayPeriod$inboundSchema = exports.EmploymentSchemasPayPeriodValue$ = exports.EmploymentSchemasPayPeriodValue$outboundSchema = exports.EmploymentSchemasPayPeriodValue$inboundSchema = exports.employmentSchemasPayPeriodSourceValueFromJSON = exports.employmentSchemasPayPeriodSourceValueToJSON = exports.EmploymentSchemasPayPeriodSourceValue$ = exports.EmploymentSchemasPayPeriodSourceValue$outboundSchema = exports.EmploymentSchemasPayPeriodSourceValue$inboundSchema = exports.employmentSchemasPayPeriod4FromJSON = exports.employmentSchemasPayPeriod4ToJSON = exports.EmploymentSchemasPayPeriod4$ = exports.EmploymentSchemasPayPeriod4$outboundSchema = exports.EmploymentSchemasPayPeriod4$inboundSchema = exports.employmentPayFrequencyFromJSON = exports.employmentPayFrequencyToJSON = exports.EmploymentPayFrequency$ = exports.EmploymentPayFrequency$outboundSchema = exports.EmploymentPayFrequency$inboundSchema = exports.EmploymentSchemasPayFrequencyValue$ = exports.EmploymentSchemasPayFrequencyValue$outboundSchema = exports.EmploymentSchemasPayFrequencyValue$inboundSchema = 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");
var EmploymentValue;
(function (EmploymentValue) {
    EmploymentValue["FullTime"] = "full_time";
    EmploymentValue["Shifts"] = "shifts";
    EmploymentValue["PartTime"] = "part_time";
    EmploymentValue["UnmappedValue"] = "unmapped_value";
})(EmploymentValue || (exports.EmploymentValue = EmploymentValue = {}));
/**
 * The type of the employment.
 */
var EmploymentSchemasValue;
(function (EmploymentSchemasValue) {
    EmploymentSchemasValue["Contractor"] = "contractor";
    EmploymentSchemasValue["Intern"] = "intern";
    EmploymentSchemasValue["Permanent"] = "permanent";
    EmploymentSchemasValue["Apprentice"] = "apprentice";
    EmploymentSchemasValue["Freelance"] = "freelance";
    EmploymentSchemasValue["Terminated"] = "terminated";
    EmploymentSchemasValue["Temporary"] = "temporary";
    EmploymentSchemasValue["Seasonal"] = "seasonal";
    EmploymentSchemasValue["Volunteer"] = "volunteer";
    EmploymentSchemasValue["Probation"] = "probation";
    EmploymentSchemasValue["Internal"] = "internal";
    EmploymentSchemasValue["External"] = "external";
    EmploymentSchemasValue["Expatriate"] = "expatriate";
    EmploymentSchemasValue["EmployerOfRecord"] = "employer_of_record";
    EmploymentSchemasValue["Casual"] = "casual";
    EmploymentSchemasValue["Programme"] = "Programme";
    EmploymentSchemasValue["UnmappedValue"] = "unmapped_value";
})(EmploymentSchemasValue || (exports.EmploymentSchemasValue = EmploymentSchemasValue = {}));
/**
 * The pay frequency of the job postings.
 */
var EmploymentSchemasPayFrequencyValue;
(function (EmploymentSchemasPayFrequencyValue) {
    EmploymentSchemasPayFrequencyValue["Hourly"] = "hourly";
    EmploymentSchemasPayFrequencyValue["Weekly"] = "weekly";
    EmploymentSchemasPayFrequencyValue["BiWeekly"] = "bi_weekly";
    EmploymentSchemasPayFrequencyValue["FourWeekly"] = "four_weekly";
    EmploymentSchemasPayFrequencyValue["SemiMonthly"] = "semi_monthly";
    EmploymentSchemasPayFrequencyValue["Monthly"] = "monthly";
    EmploymentSchemasPayFrequencyValue["BiMonthly"] = "bi_monthly";
    EmploymentSchemasPayFrequencyValue["Quarterly"] = "quarterly";
    EmploymentSchemasPayFrequencyValue["SemiAnnually"] = "semi_annually";
    EmploymentSchemasPayFrequencyValue["Yearly"] = "yearly";
    EmploymentSchemasPayFrequencyValue["ThirteenMonthly"] = "thirteen_monthly";
    EmploymentSchemasPayFrequencyValue["ProRata"] = "pro_rata";
    EmploymentSchemasPayFrequencyValue["UnmappedValue"] = "unmapped_value";
    EmploymentSchemasPayFrequencyValue["HalfYearly"] = "half_yearly";
    EmploymentSchemasPayFrequencyValue["Daily"] = "daily";
})(EmploymentSchemasPayFrequencyValue || (exports.EmploymentSchemasPayFrequencyValue = EmploymentSchemasPayFrequencyValue = {}));
/**
 * The pay period of the job postings.
 */
var EmploymentSchemasPayPeriodValue;
(function (EmploymentSchemasPayPeriodValue) {
    EmploymentSchemasPayPeriodValue["Hour"] = "hour";
    EmploymentSchemasPayPeriodValue["Day"] = "day";
    EmploymentSchemasPayPeriodValue["Week"] = "week";
    EmploymentSchemasPayPeriodValue["EveryTwoWeeks"] = "every_two_weeks";
    EmploymentSchemasPayPeriodValue["Month"] = "month";
    EmploymentSchemasPayPeriodValue["TwiceAMonth"] = "twice_a_month";
    EmploymentSchemasPayPeriodValue["EveryTwoMonths"] = "every_two_months";
    EmploymentSchemasPayPeriodValue["Quarter"] = "quarter";
    EmploymentSchemasPayPeriodValue["EverySixMonths"] = "every_six_months";
    EmploymentSchemasPayPeriodValue["Year"] = "year";
    EmploymentSchemasPayPeriodValue["OneOff"] = "one_off";
    EmploymentSchemasPayPeriodValue["None"] = "none";
    EmploymentSchemasPayPeriodValue["UnmappedValue"] = "unmapped_value";
})(EmploymentSchemasPayPeriodValue || (exports.EmploymentSchemasPayPeriodValue = EmploymentSchemasPayPeriodValue = {}));
/** @internal */
exports.Employment4$inboundSchema = z.object({});
/** @internal */
exports.Employment4$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 Employment4$;
(function (Employment4$) {
    /** @deprecated use `Employment4$inboundSchema` instead. */
    Employment4$.inboundSchema = exports.Employment4$inboundSchema;
    /** @deprecated use `Employment4$outboundSchema` instead. */
    Employment4$.outboundSchema = exports.Employment4$outboundSchema;
})(Employment4$ || (exports.Employment4$ = Employment4$ = {}));
function employment4ToJSON(employment4) {
    return JSON.stringify(exports.Employment4$outboundSchema.parse(employment4));
}
exports.employment4ToJSON = employment4ToJSON;
function employment4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Employment4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Employment4' from JSON`);
}
exports.employment4FromJSON = employment4FromJSON;
/** @internal */
exports.EmploymentSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.Employment4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.EmploymentSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.Employment4$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 EmploymentSourceValue$;
(function (EmploymentSourceValue$) {
    /** @deprecated use `EmploymentSourceValue$inboundSchema` instead. */
    EmploymentSourceValue$.inboundSchema = exports.EmploymentSourceValue$inboundSchema;
    /** @deprecated use `EmploymentSourceValue$outboundSchema` instead. */
    EmploymentSourceValue$.outboundSchema = exports.EmploymentSourceValue$outboundSchema;
})(EmploymentSourceValue$ || (exports.EmploymentSourceValue$ = EmploymentSourceValue$ = {}));
function employmentSourceValueToJSON(employmentSourceValue) {
    return JSON.stringify(exports.EmploymentSourceValue$outboundSchema.parse(employmentSourceValue));
}
exports.employmentSourceValueToJSON = employmentSourceValueToJSON;
function employmentSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSourceValue' from JSON`);
}
exports.employmentSourceValueFromJSON = employmentSourceValueFromJSON;
/** @internal */
exports.EmploymentValue$inboundSchema = z
    .union([
    z.nativeEnum(EmploymentValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.EmploymentValue$outboundSchema = z.union([
    z.nativeEnum(EmploymentValue),
    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 EmploymentValue$;
(function (EmploymentValue$) {
    /** @deprecated use `EmploymentValue$inboundSchema` instead. */
    EmploymentValue$.inboundSchema = exports.EmploymentValue$inboundSchema;
    /** @deprecated use `EmploymentValue$outboundSchema` instead. */
    EmploymentValue$.outboundSchema = exports.EmploymentValue$outboundSchema;
})(EmploymentValue$ || (exports.EmploymentValue$ = EmploymentValue$ = {}));
/** @internal */
exports.EmploymentEmploymentContractType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.Employment4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.EmploymentEmploymentContractType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.Employment4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentValue$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 EmploymentEmploymentContractType$;
(function (EmploymentEmploymentContractType$) {
    /** @deprecated use `EmploymentEmploymentContractType$inboundSchema` instead. */
    EmploymentEmploymentContractType$.inboundSchema = exports.EmploymentEmploymentContractType$inboundSchema;
    /** @deprecated use `EmploymentEmploymentContractType$outboundSchema` instead. */
    EmploymentEmploymentContractType$.outboundSchema = exports.EmploymentEmploymentContractType$outboundSchema;
})(EmploymentEmploymentContractType$ || (exports.EmploymentEmploymentContractType$ = EmploymentEmploymentContractType$ = {}));
function employmentEmploymentContractTypeToJSON(employmentEmploymentContractType) {
    return JSON.stringify(exports.EmploymentEmploymentContractType$outboundSchema.parse(employmentEmploymentContractType));
}
exports.employmentEmploymentContractTypeToJSON = employmentEmploymentContractTypeToJSON;
function employmentEmploymentContractTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentEmploymentContractType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentEmploymentContractType' from JSON`);
}
exports.employmentEmploymentContractTypeFromJSON = employmentEmploymentContractTypeFromJSON;
/** @internal */
exports.EmploymentSchemas4$inboundSchema = z.object({});
/** @internal */
exports.EmploymentSchemas4$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 EmploymentSchemas4$;
(function (EmploymentSchemas4$) {
    /** @deprecated use `EmploymentSchemas4$inboundSchema` instead. */
    EmploymentSchemas4$.inboundSchema = exports.EmploymentSchemas4$inboundSchema;
    /** @deprecated use `EmploymentSchemas4$outboundSchema` instead. */
    EmploymentSchemas4$.outboundSchema = exports.EmploymentSchemas4$outboundSchema;
})(EmploymentSchemas4$ || (exports.EmploymentSchemas4$ = EmploymentSchemas4$ = {}));
function employmentSchemas4ToJSON(employmentSchemas4) {
    return JSON.stringify(exports.EmploymentSchemas4$outboundSchema.parse(employmentSchemas4));
}
exports.employmentSchemas4ToJSON = employmentSchemas4ToJSON;
function employmentSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemas4' from JSON`);
}
exports.employmentSchemas4FromJSON = employmentSchemas4FromJSON;
/** @internal */
exports.EmploymentSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.EmploymentSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemas4$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 EmploymentSchemasSourceValue$;
(function (EmploymentSchemasSourceValue$) {
    /** @deprecated use `EmploymentSchemasSourceValue$inboundSchema` instead. */
    EmploymentSchemasSourceValue$.inboundSchema = exports.EmploymentSchemasSourceValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasSourceValue$outboundSchema` instead. */
    EmploymentSchemasSourceValue$.outboundSchema = exports.EmploymentSchemasSourceValue$outboundSchema;
})(EmploymentSchemasSourceValue$ || (exports.EmploymentSchemasSourceValue$ = EmploymentSchemasSourceValue$ = {}));
function employmentSchemasSourceValueToJSON(employmentSchemasSourceValue) {
    return JSON.stringify(exports.EmploymentSchemasSourceValue$outboundSchema.parse(employmentSchemasSourceValue));
}
exports.employmentSchemasSourceValueToJSON = employmentSchemasSourceValueToJSON;
function employmentSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemasSourceValue' from JSON`);
}
exports.employmentSchemasSourceValueFromJSON = employmentSchemasSourceValueFromJSON;
/** @internal */
exports.EmploymentSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(EmploymentSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.EmploymentSchemasValue$outboundSchema = z.union([
    z.nativeEnum(EmploymentSchemasValue),
    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 EmploymentSchemasValue$;
(function (EmploymentSchemasValue$) {
    /** @deprecated use `EmploymentSchemasValue$inboundSchema` instead. */
    EmploymentSchemasValue$.inboundSchema = exports.EmploymentSchemasValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasValue$outboundSchema` instead. */
    EmploymentSchemasValue$.outboundSchema = exports.EmploymentSchemasValue$outboundSchema;
})(EmploymentSchemasValue$ || (exports.EmploymentSchemasValue$ = EmploymentSchemasValue$ = {}));
/** @internal */
exports.EmploymentEmploymentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.EmploymentEmploymentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasValue$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 EmploymentEmploymentType$;
(function (EmploymentEmploymentType$) {
    /** @deprecated use `EmploymentEmploymentType$inboundSchema` instead. */
    EmploymentEmploymentType$.inboundSchema = exports.EmploymentEmploymentType$inboundSchema;
    /** @deprecated use `EmploymentEmploymentType$outboundSchema` instead. */
    EmploymentEmploymentType$.outboundSchema = exports.EmploymentEmploymentType$outboundSchema;
})(EmploymentEmploymentType$ || (exports.EmploymentEmploymentType$ = EmploymentEmploymentType$ = {}));
function employmentEmploymentTypeToJSON(employmentEmploymentType) {
    return JSON.stringify(exports.EmploymentEmploymentType$outboundSchema.parse(employmentEmploymentType));
}
exports.employmentEmploymentTypeToJSON = employmentEmploymentTypeToJSON;
function employmentEmploymentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentEmploymentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentEmploymentType' from JSON`);
}
exports.employmentEmploymentTypeFromJSON = employmentEmploymentTypeFromJSON;
/** @internal */
exports.EmploymentSchemasPayFrequency4$inboundSchema = z.object({});
/** @internal */
exports.EmploymentSchemasPayFrequency4$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 EmploymentSchemasPayFrequency4$;
(function (EmploymentSchemasPayFrequency4$) {
    /** @deprecated use `EmploymentSchemasPayFrequency4$inboundSchema` instead. */
    EmploymentSchemasPayFrequency4$.inboundSchema = exports.EmploymentSchemasPayFrequency4$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayFrequency4$outboundSchema` instead. */
    EmploymentSchemasPayFrequency4$.outboundSchema = exports.EmploymentSchemasPayFrequency4$outboundSchema;
})(EmploymentSchemasPayFrequency4$ || (exports.EmploymentSchemasPayFrequency4$ = EmploymentSchemasPayFrequency4$ = {}));
function employmentSchemasPayFrequency4ToJSON(employmentSchemasPayFrequency4) {
    return JSON.stringify(exports.EmploymentSchemasPayFrequency4$outboundSchema.parse(employmentSchemasPayFrequency4));
}
exports.employmentSchemasPayFrequency4ToJSON = employmentSchemasPayFrequency4ToJSON;
function employmentSchemasPayFrequency4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemasPayFrequency4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemasPayFrequency4' from JSON`);
}
exports.employmentSchemasPayFrequency4FromJSON = employmentSchemasPayFrequency4FromJSON;
/** @internal */
exports.EmploymentSchemasPayFrequencySourceValue$inboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemasPayFrequency4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.EmploymentSchemasPayFrequencySourceValue$outboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemasPayFrequency4$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 EmploymentSchemasPayFrequencySourceValue$;
(function (EmploymentSchemasPayFrequencySourceValue$) {
    /** @deprecated use `EmploymentSchemasPayFrequencySourceValue$inboundSchema` instead. */
    EmploymentSchemasPayFrequencySourceValue$.inboundSchema = exports.EmploymentSchemasPayFrequencySourceValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayFrequencySourceValue$outboundSchema` instead. */
    EmploymentSchemasPayFrequencySourceValue$.outboundSchema = exports.EmploymentSchemasPayFrequencySourceValue$outboundSchema;
})(EmploymentSchemasPayFrequencySourceValue$ || (exports.EmploymentSchemasPayFrequencySourceValue$ = EmploymentSchemasPayFrequencySourceValue$ = {}));
function employmentSchemasPayFrequencySourceValueToJSON(employmentSchemasPayFrequencySourceValue) {
    return JSON.stringify(exports.EmploymentSchemasPayFrequencySourceValue$outboundSchema.parse(employmentSchemasPayFrequencySourceValue));
}
exports.employmentSchemasPayFrequencySourceValueToJSON = employmentSchemasPayFrequencySourceValueToJSON;
function employmentSchemasPayFrequencySourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemasPayFrequencySourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemasPayFrequencySourceValue' from JSON`);
}
exports.employmentSchemasPayFrequencySourceValueFromJSON = employmentSchemasPayFrequencySourceValueFromJSON;
/** @internal */
exports.EmploymentSchemasPayFrequencyValue$inboundSchema = z
    .union([
    z.nativeEnum(EmploymentSchemasPayFrequencyValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.EmploymentSchemasPayFrequencyValue$outboundSchema = z.union([
    z.nativeEnum(EmploymentSchemasPayFrequencyValue),
    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 EmploymentSchemasPayFrequencyValue$;
(function (EmploymentSchemasPayFrequencyValue$) {
    /** @deprecated use `EmploymentSchemasPayFrequencyValue$inboundSchema` instead. */
    EmploymentSchemasPayFrequencyValue$.inboundSchema = exports.EmploymentSchemasPayFrequencyValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayFrequencyValue$outboundSchema` instead. */
    EmploymentSchemasPayFrequencyValue$.outboundSchema = exports.EmploymentSchemasPayFrequencyValue$outboundSchema;
})(EmploymentSchemasPayFrequencyValue$ || (exports.EmploymentSchemasPayFrequencyValue$ = EmploymentSchemasPayFrequencyValue$ = {}));
/** @internal */
exports.EmploymentPayFrequency$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemasPayFrequency4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasPayFrequencyValue$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.EmploymentPayFrequency$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemasPayFrequency4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasPayFrequencyValue$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 EmploymentPayFrequency$;
(function (EmploymentPayFrequency$) {
    /** @deprecated use `EmploymentPayFrequency$inboundSchema` instead. */
    EmploymentPayFrequency$.inboundSchema = exports.EmploymentPayFrequency$inboundSchema;
    /** @deprecated use `EmploymentPayFrequency$outboundSchema` instead. */
    EmploymentPayFrequency$.outboundSchema = exports.EmploymentPayFrequency$outboundSchema;
})(EmploymentPayFrequency$ || (exports.EmploymentPayFrequency$ = EmploymentPayFrequency$ = {}));
function employmentPayFrequencyToJSON(employmentPayFrequency) {
    return JSON.stringify(exports.EmploymentPayFrequency$outboundSchema.parse(employmentPayFrequency));
}
exports.employmentPayFrequencyToJSON = employmentPayFrequencyToJSON;
function employmentPayFrequencyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentPayFrequency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentPayFrequency' from JSON`);
}
exports.employmentPayFrequencyFromJSON = employmentPayFrequencyFromJSON;
/** @internal */
exports.EmploymentSchemasPayPeriod4$inboundSchema = z.object({});
/** @internal */
exports.EmploymentSchemasPayPeriod4$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 EmploymentSchemasPayPeriod4$;
(function (EmploymentSchemasPayPeriod4$) {
    /** @deprecated use `EmploymentSchemasPayPeriod4$inboundSchema` instead. */
    EmploymentSchemasPayPeriod4$.inboundSchema = exports.EmploymentSchemasPayPeriod4$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayPeriod4$outboundSchema` instead. */
    EmploymentSchemasPayPeriod4$.outboundSchema = exports.EmploymentSchemasPayPeriod4$outboundSchema;
})(EmploymentSchemasPayPeriod4$ || (exports.EmploymentSchemasPayPeriod4$ = EmploymentSchemasPayPeriod4$ = {}));
function employmentSchemasPayPeriod4ToJSON(employmentSchemasPayPeriod4) {
    return JSON.stringify(exports.EmploymentSchemasPayPeriod4$outboundSchema.parse(employmentSchemasPayPeriod4));
}
exports.employmentSchemasPayPeriod4ToJSON = employmentSchemasPayPeriod4ToJSON;
function employmentSchemasPayPeriod4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemasPayPeriod4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemasPayPeriod4' from JSON`);
}
exports.employmentSchemasPayPeriod4FromJSON = employmentSchemasPayPeriod4FromJSON;
/** @internal */
exports.EmploymentSchemasPayPeriodSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemasPayPeriod4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.EmploymentSchemasPayPeriodSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.EmploymentSchemasPayPeriod4$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 EmploymentSchemasPayPeriodSourceValue$;
(function (EmploymentSchemasPayPeriodSourceValue$) {
    /** @deprecated use `EmploymentSchemasPayPeriodSourceValue$inboundSchema` instead. */
    EmploymentSchemasPayPeriodSourceValue$.inboundSchema = exports.EmploymentSchemasPayPeriodSourceValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayPeriodSourceValue$outboundSchema` instead. */
    EmploymentSchemasPayPeriodSourceValue$.outboundSchema = exports.EmploymentSchemasPayPeriodSourceValue$outboundSchema;
})(EmploymentSchemasPayPeriodSourceValue$ || (exports.EmploymentSchemasPayPeriodSourceValue$ = EmploymentSchemasPayPeriodSourceValue$ = {}));
function employmentSchemasPayPeriodSourceValueToJSON(employmentSchemasPayPeriodSourceValue) {
    return JSON.stringify(exports.EmploymentSchemasPayPeriodSourceValue$outboundSchema.parse(employmentSchemasPayPeriodSourceValue));
}
exports.employmentSchemasPayPeriodSourceValueToJSON = employmentSchemasPayPeriodSourceValueToJSON;
function employmentSchemasPayPeriodSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentSchemasPayPeriodSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentSchemasPayPeriodSourceValue' from JSON`);
}
exports.employmentSchemasPayPeriodSourceValueFromJSON = employmentSchemasPayPeriodSourceValueFromJSON;
/** @internal */
exports.EmploymentSchemasPayPeriodValue$inboundSchema = z
    .union([
    z.nativeEnum(EmploymentSchemasPayPeriodValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.EmploymentSchemasPayPeriodValue$outboundSchema = z.union([
    z.nativeEnum(EmploymentSchemasPayPeriodValue),
    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 EmploymentSchemasPayPeriodValue$;
(function (EmploymentSchemasPayPeriodValue$) {
    /** @deprecated use `EmploymentSchemasPayPeriodValue$inboundSchema` instead. */
    EmploymentSchemasPayPeriodValue$.inboundSchema = exports.EmploymentSchemasPayPeriodValue$inboundSchema;
    /** @deprecated use `EmploymentSchemasPayPeriodValue$outboundSchema` instead. */
    EmploymentSchemasPayPeriodValue$.outboundSchema = exports.EmploymentSchemasPayPeriodValue$outboundSchema;
})(EmploymentSchemasPayPeriodValue$ || (exports.EmploymentSchemasPayPeriodValue$ = EmploymentSchemasPayPeriodValue$ = {}));
/** @internal */
exports.EmploymentPayPeriod$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemasPayPeriod4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasPayPeriodValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.EmploymentPayPeriod$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.EmploymentSchemasPayPeriod4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentSchemasPayPeriodValue$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 EmploymentPayPeriod$;
(function (EmploymentPayPeriod$) {
    /** @deprecated use `EmploymentPayPeriod$inboundSchema` instead. */
    EmploymentPayPeriod$.inboundSchema = exports.EmploymentPayPeriod$inboundSchema;
    /** @deprecated use `EmploymentPayPeriod$outboundSchema` instead. */
    EmploymentPayPeriod$.outboundSchema = exports.EmploymentPayPeriod$outboundSchema;
})(EmploymentPayPeriod$ || (exports.EmploymentPayPeriod$ = EmploymentPayPeriod$ = {}));
function employmentPayPeriodToJSON(employmentPayPeriod) {
    return JSON.stringify(exports.EmploymentPayPeriod$outboundSchema.parse(employmentPayPeriod));
}
exports.employmentPayPeriodToJSON = employmentPayPeriodToJSON;
function employmentPayPeriodFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentPayPeriod$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentPayPeriod' from JSON`);
}
exports.employmentPayPeriodFromJSON = employmentPayPeriodFromJSON;
/** @internal */
exports.Employment$inboundSchema = z.object({
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    effective_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    employee_id: z.nullable(z.string()).optional(),
    employment_contract_type: z.nullable(z.lazy(() => exports.EmploymentEmploymentContractType$inboundSchema)).optional(),
    employment_type: z.nullable(z.lazy(() => exports.EmploymentEmploymentType$inboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    job_title: z.nullable(z.string()).optional(),
    pay_currency: z.nullable(z.string()).optional(),
    pay_frequency: z.nullable(z.lazy(() => exports.EmploymentPayFrequency$inboundSchema))
        .optional(),
    pay_period: z.nullable(z.lazy(() => exports.EmploymentPayPeriod$inboundSchema))
        .optional(),
    pay_rate: z.nullable(z.string()).optional(),
    remote_employee_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    time_worked: z.nullable(z.string()).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "created_at": "createdAt",
        "effective_date": "effectiveDate",
        "employee_id": "employeeId",
        "employment_contract_type": "employmentContractType",
        "employment_type": "employmentType",
        "job_title": "jobTitle",
        "pay_currency": "payCurrency",
        "pay_frequency": "payFrequency",
        "pay_period": "payPeriod",
        "pay_rate": "payRate",
        "remote_employee_id": "remoteEmployeeId",
        "remote_id": "remoteId",
        "time_worked": "timeWorked",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.Employment$outboundSchema = z.object({
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    effectiveDate: z.nullable(z.date().transform(v => v.toISOString()))
        .optional(),
    employeeId: z.nullable(z.string()).optional(),
    employmentContractType: z.nullable(z.lazy(() => exports.EmploymentEmploymentContractType$outboundSchema)).optional(),
    employmentType: z.nullable(z.lazy(() => exports.EmploymentEmploymentType$outboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    jobTitle: z.nullable(z.string()).optional(),
    payCurrency: z.nullable(z.string()).optional(),
    payFrequency: z.nullable(z.lazy(() => exports.EmploymentPayFrequency$outboundSchema))
        .optional(),
    payPeriod: z.nullable(z.lazy(() => exports.EmploymentPayPeriod$outboundSchema))
        .optional(),
    payRate: z.nullable(z.string()).optional(),
    remoteEmployeeId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    timeWorked: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createdAt: "created_at",
        effectiveDate: "effective_date",
        employeeId: "employee_id",
        employmentContractType: "employment_contract_type",
        employmentType: "employment_type",
        jobTitle: "job_title",
        payCurrency: "pay_currency",
        payFrequency: "pay_frequency",
        payPeriod: "pay_period",
        payRate: "pay_rate",
        remoteEmployeeId: "remote_employee_id",
        remoteId: "remote_id",
        timeWorked: "time_worked",
        unifiedCustomFields: "unified_custom_fields",
        updatedAt: "updated_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Employment$;
(function (Employment$) {
    /** @deprecated use `Employment$inboundSchema` instead. */
    Employment$.inboundSchema = exports.Employment$inboundSchema;
    /** @deprecated use `Employment$outboundSchema` instead. */
    Employment$.outboundSchema = exports.Employment$outboundSchema;
})(Employment$ || (exports.Employment$ = Employment$ = {}));
function employmentToJSON(employment) {
    return JSON.stringify(exports.Employment$outboundSchema.parse(employment));
}
exports.employmentToJSON = employmentToJSON;
function employmentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Employment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Employment' from JSON`);
}
exports.employmentFromJSON = employmentFromJSON;
//# sourceMappingURL=employment.js.map