"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.TimeOffSchemasValue$outboundSchema = exports.TimeOffSchemasValue$inboundSchema = exports.timeOffSchemasSourceValueFromJSON = exports.timeOffSchemasSourceValueToJSON = exports.TimeOffSchemasSourceValue$ = exports.TimeOffSchemasSourceValue$outboundSchema = exports.TimeOffSchemasSourceValue$inboundSchema = exports.timeOffSchemas4FromJSON = exports.timeOffSchemas4ToJSON = exports.TimeOffSchemas4$ = exports.TimeOffSchemas4$outboundSchema = exports.TimeOffSchemas4$inboundSchema = exports.timeOffStatusFromJSON = exports.timeOffStatusToJSON = exports.TimeOffStatus$ = exports.TimeOffStatus$outboundSchema = exports.TimeOffStatus$inboundSchema = exports.TimeOffValue$ = exports.TimeOffValue$outboundSchema = exports.TimeOffValue$inboundSchema = exports.timeOffSourceValueFromJSON = exports.timeOffSourceValueToJSON = exports.TimeOffSourceValue$ = exports.TimeOffSourceValue$outboundSchema = exports.TimeOffSourceValue$inboundSchema = exports.timeOff4FromJSON = exports.timeOff4ToJSON = exports.TimeOff4$ = exports.TimeOff4$outboundSchema = exports.TimeOff4$inboundSchema = exports.timeOffStartHalfDayFromJSON = exports.timeOffStartHalfDayToJSON = exports.TimeOffStartHalfDay$ = exports.TimeOffStartHalfDay$outboundSchema = exports.TimeOffStartHalfDay$inboundSchema = exports.TimeOffSchemas2$ = exports.TimeOffSchemas2$outboundSchema = exports.TimeOffSchemas2$inboundSchema = exports.timeOffEndHalfDayFromJSON = exports.timeOffEndHalfDayToJSON = exports.TimeOffEndHalfDay$ = exports.TimeOffEndHalfDay$outboundSchema = exports.TimeOffEndHalfDay$inboundSchema = exports.TimeOff2$ = exports.TimeOff2$outboundSchema = exports.TimeOff2$inboundSchema = exports.TimeOffSchemasValue = exports.TimeOffValue = exports.TimeOffSchemas2 = exports.TimeOff2 = void 0;
exports.timeOffFromJSON = exports.timeOffToJSON = exports.TimeOff$ = exports.TimeOff$outboundSchema = exports.TimeOff$inboundSchema = exports.timeOffTypeFromJSON = exports.timeOffTypeToJSON = exports.TimeOffType$ = exports.TimeOffType$outboundSchema = exports.TimeOffType$inboundSchema = exports.TimeOffSchemasValue$ = 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 TimeOff2;
(function (TimeOff2) {
    TimeOff2["True"] = "true";
    TimeOff2["False"] = "false";
})(TimeOff2 || (exports.TimeOff2 = TimeOff2 = {}));
var TimeOffSchemas2;
(function (TimeOffSchemas2) {
    TimeOffSchemas2["True"] = "true";
    TimeOffSchemas2["False"] = "false";
})(TimeOffSchemas2 || (exports.TimeOffSchemas2 = TimeOffSchemas2 = {}));
var TimeOffValue;
(function (TimeOffValue) {
    TimeOffValue["Approved"] = "approved";
    TimeOffValue["Cancelled"] = "cancelled";
    TimeOffValue["Rejected"] = "rejected";
    TimeOffValue["Pending"] = "pending";
    TimeOffValue["UnmappedValue"] = "unmapped_value";
})(TimeOffValue || (exports.TimeOffValue = TimeOffValue = {}));
var TimeOffSchemasValue;
(function (TimeOffSchemasValue) {
    TimeOffSchemasValue["Sick"] = "sick";
    TimeOffSchemasValue["UnmappedValue"] = "unmapped_value";
    TimeOffSchemasValue["Vacation"] = "vacation";
    TimeOffSchemasValue["LongTermDisability"] = "long_term_disability";
    TimeOffSchemasValue["ShortTermDisability"] = "short_term_disability";
    TimeOffSchemasValue["Absent"] = "absent";
    TimeOffSchemasValue["CompTime"] = "comp_time";
    TimeOffSchemasValue["Training"] = "training";
    TimeOffSchemasValue["AnnualLeave"] = "annual_leave";
    TimeOffSchemasValue["LeaveOfAbsence"] = "leave_of_absence";
    TimeOffSchemasValue["Break"] = "break";
    TimeOffSchemasValue["ChildCareLeave"] = "child_care_leave";
    TimeOffSchemasValue["MaternityLeave"] = "maternity_leave";
    TimeOffSchemasValue["JuryDuty"] = "jury_duty";
    TimeOffSchemasValue["BereavementLeave"] = "bereavement_leave";
    TimeOffSchemasValue["Sabbatical"] = "sabbatical";
    TimeOffSchemasValue["Accident"] = "accident";
})(TimeOffSchemasValue || (exports.TimeOffSchemasValue = TimeOffSchemasValue = {}));
/** @internal */
exports.TimeOff2$inboundSchema = z
    .nativeEnum(TimeOff2);
/** @internal */
exports.TimeOff2$outboundSchema = exports.TimeOff2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TimeOff2$;
(function (TimeOff2$) {
    /** @deprecated use `TimeOff2$inboundSchema` instead. */
    TimeOff2$.inboundSchema = exports.TimeOff2$inboundSchema;
    /** @deprecated use `TimeOff2$outboundSchema` instead. */
    TimeOff2$.outboundSchema = exports.TimeOff2$outboundSchema;
})(TimeOff2$ || (exports.TimeOff2$ = TimeOff2$ = {}));
/** @internal */
exports.TimeOffEndHalfDay$inboundSchema = z.union([z.boolean(), exports.TimeOff2$inboundSchema]);
/** @internal */
exports.TimeOffEndHalfDay$outboundSchema = z.union([z.boolean(), exports.TimeOff2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TimeOffEndHalfDay$;
(function (TimeOffEndHalfDay$) {
    /** @deprecated use `TimeOffEndHalfDay$inboundSchema` instead. */
    TimeOffEndHalfDay$.inboundSchema = exports.TimeOffEndHalfDay$inboundSchema;
    /** @deprecated use `TimeOffEndHalfDay$outboundSchema` instead. */
    TimeOffEndHalfDay$.outboundSchema = exports.TimeOffEndHalfDay$outboundSchema;
})(TimeOffEndHalfDay$ || (exports.TimeOffEndHalfDay$ = TimeOffEndHalfDay$ = {}));
function timeOffEndHalfDayToJSON(timeOffEndHalfDay) {
    return JSON.stringify(exports.TimeOffEndHalfDay$outboundSchema.parse(timeOffEndHalfDay));
}
exports.timeOffEndHalfDayToJSON = timeOffEndHalfDayToJSON;
function timeOffEndHalfDayFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffEndHalfDay$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffEndHalfDay' from JSON`);
}
exports.timeOffEndHalfDayFromJSON = timeOffEndHalfDayFromJSON;
/** @internal */
exports.TimeOffSchemas2$inboundSchema = z.nativeEnum(TimeOffSchemas2);
/** @internal */
exports.TimeOffSchemas2$outboundSchema = exports.TimeOffSchemas2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TimeOffSchemas2$;
(function (TimeOffSchemas2$) {
    /** @deprecated use `TimeOffSchemas2$inboundSchema` instead. */
    TimeOffSchemas2$.inboundSchema = exports.TimeOffSchemas2$inboundSchema;
    /** @deprecated use `TimeOffSchemas2$outboundSchema` instead. */
    TimeOffSchemas2$.outboundSchema = exports.TimeOffSchemas2$outboundSchema;
})(TimeOffSchemas2$ || (exports.TimeOffSchemas2$ = TimeOffSchemas2$ = {}));
/** @internal */
exports.TimeOffStartHalfDay$inboundSchema = z.union([z.boolean(), exports.TimeOffSchemas2$inboundSchema]);
/** @internal */
exports.TimeOffStartHalfDay$outboundSchema = z.union([z.boolean(), exports.TimeOffSchemas2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TimeOffStartHalfDay$;
(function (TimeOffStartHalfDay$) {
    /** @deprecated use `TimeOffStartHalfDay$inboundSchema` instead. */
    TimeOffStartHalfDay$.inboundSchema = exports.TimeOffStartHalfDay$inboundSchema;
    /** @deprecated use `TimeOffStartHalfDay$outboundSchema` instead. */
    TimeOffStartHalfDay$.outboundSchema = exports.TimeOffStartHalfDay$outboundSchema;
})(TimeOffStartHalfDay$ || (exports.TimeOffStartHalfDay$ = TimeOffStartHalfDay$ = {}));
function timeOffStartHalfDayToJSON(timeOffStartHalfDay) {
    return JSON.stringify(exports.TimeOffStartHalfDay$outboundSchema.parse(timeOffStartHalfDay));
}
exports.timeOffStartHalfDayToJSON = timeOffStartHalfDayToJSON;
function timeOffStartHalfDayFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffStartHalfDay$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffStartHalfDay' from JSON`);
}
exports.timeOffStartHalfDayFromJSON = timeOffStartHalfDayFromJSON;
/** @internal */
exports.TimeOff4$inboundSchema = z.object({});
/** @internal */
exports.TimeOff4$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 TimeOff4$;
(function (TimeOff4$) {
    /** @deprecated use `TimeOff4$inboundSchema` instead. */
    TimeOff4$.inboundSchema = exports.TimeOff4$inboundSchema;
    /** @deprecated use `TimeOff4$outboundSchema` instead. */
    TimeOff4$.outboundSchema = exports.TimeOff4$outboundSchema;
})(TimeOff4$ || (exports.TimeOff4$ = TimeOff4$ = {}));
function timeOff4ToJSON(timeOff4) {
    return JSON.stringify(exports.TimeOff4$outboundSchema.parse(timeOff4));
}
exports.timeOff4ToJSON = timeOff4ToJSON;
function timeOff4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOff4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOff4' from JSON`);
}
exports.timeOff4FromJSON = timeOff4FromJSON;
/** @internal */
exports.TimeOffSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TimeOff4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TimeOffSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TimeOff4$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 TimeOffSourceValue$;
(function (TimeOffSourceValue$) {
    /** @deprecated use `TimeOffSourceValue$inboundSchema` instead. */
    TimeOffSourceValue$.inboundSchema = exports.TimeOffSourceValue$inboundSchema;
    /** @deprecated use `TimeOffSourceValue$outboundSchema` instead. */
    TimeOffSourceValue$.outboundSchema = exports.TimeOffSourceValue$outboundSchema;
})(TimeOffSourceValue$ || (exports.TimeOffSourceValue$ = TimeOffSourceValue$ = {}));
function timeOffSourceValueToJSON(timeOffSourceValue) {
    return JSON.stringify(exports.TimeOffSourceValue$outboundSchema.parse(timeOffSourceValue));
}
exports.timeOffSourceValueToJSON = timeOffSourceValueToJSON;
function timeOffSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffSourceValue' from JSON`);
}
exports.timeOffSourceValueFromJSON = timeOffSourceValueFromJSON;
/** @internal */
exports.TimeOffValue$inboundSchema = z
    .union([
    z.nativeEnum(TimeOffValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TimeOffValue$outboundSchema = z.union([
    z.nativeEnum(TimeOffValue),
    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 TimeOffValue$;
(function (TimeOffValue$) {
    /** @deprecated use `TimeOffValue$inboundSchema` instead. */
    TimeOffValue$.inboundSchema = exports.TimeOffValue$inboundSchema;
    /** @deprecated use `TimeOffValue$outboundSchema` instead. */
    TimeOffValue$.outboundSchema = exports.TimeOffValue$outboundSchema;
})(TimeOffValue$ || (exports.TimeOffValue$ = TimeOffValue$ = {}));
/** @internal */
exports.TimeOffStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TimeOff4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TimeOffValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TimeOffStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TimeOff4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TimeOffValue$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 TimeOffStatus$;
(function (TimeOffStatus$) {
    /** @deprecated use `TimeOffStatus$inboundSchema` instead. */
    TimeOffStatus$.inboundSchema = exports.TimeOffStatus$inboundSchema;
    /** @deprecated use `TimeOffStatus$outboundSchema` instead. */
    TimeOffStatus$.outboundSchema = exports.TimeOffStatus$outboundSchema;
})(TimeOffStatus$ || (exports.TimeOffStatus$ = TimeOffStatus$ = {}));
function timeOffStatusToJSON(timeOffStatus) {
    return JSON.stringify(exports.TimeOffStatus$outboundSchema.parse(timeOffStatus));
}
exports.timeOffStatusToJSON = timeOffStatusToJSON;
function timeOffStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffStatus' from JSON`);
}
exports.timeOffStatusFromJSON = timeOffStatusFromJSON;
/** @internal */
exports.TimeOffSchemas4$inboundSchema = z.object({});
/** @internal */
exports.TimeOffSchemas4$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 TimeOffSchemas4$;
(function (TimeOffSchemas4$) {
    /** @deprecated use `TimeOffSchemas4$inboundSchema` instead. */
    TimeOffSchemas4$.inboundSchema = exports.TimeOffSchemas4$inboundSchema;
    /** @deprecated use `TimeOffSchemas4$outboundSchema` instead. */
    TimeOffSchemas4$.outboundSchema = exports.TimeOffSchemas4$outboundSchema;
})(TimeOffSchemas4$ || (exports.TimeOffSchemas4$ = TimeOffSchemas4$ = {}));
function timeOffSchemas4ToJSON(timeOffSchemas4) {
    return JSON.stringify(exports.TimeOffSchemas4$outboundSchema.parse(timeOffSchemas4));
}
exports.timeOffSchemas4ToJSON = timeOffSchemas4ToJSON;
function timeOffSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffSchemas4' from JSON`);
}
exports.timeOffSchemas4FromJSON = timeOffSchemas4FromJSON;
/** @internal */
exports.TimeOffSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TimeOffSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TimeOffSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TimeOffSchemas4$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 TimeOffSchemasSourceValue$;
(function (TimeOffSchemasSourceValue$) {
    /** @deprecated use `TimeOffSchemasSourceValue$inboundSchema` instead. */
    TimeOffSchemasSourceValue$.inboundSchema = exports.TimeOffSchemasSourceValue$inboundSchema;
    /** @deprecated use `TimeOffSchemasSourceValue$outboundSchema` instead. */
    TimeOffSchemasSourceValue$.outboundSchema = exports.TimeOffSchemasSourceValue$outboundSchema;
})(TimeOffSchemasSourceValue$ || (exports.TimeOffSchemasSourceValue$ = TimeOffSchemasSourceValue$ = {}));
function timeOffSchemasSourceValueToJSON(timeOffSchemasSourceValue) {
    return JSON.stringify(exports.TimeOffSchemasSourceValue$outboundSchema.parse(timeOffSchemasSourceValue));
}
exports.timeOffSchemasSourceValueToJSON = timeOffSchemasSourceValueToJSON;
function timeOffSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffSchemasSourceValue' from JSON`);
}
exports.timeOffSchemasSourceValueFromJSON = timeOffSchemasSourceValueFromJSON;
/** @internal */
exports.TimeOffSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(TimeOffSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TimeOffSchemasValue$outboundSchema = z.union([
    z.nativeEnum(TimeOffSchemasValue),
    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 TimeOffSchemasValue$;
(function (TimeOffSchemasValue$) {
    /** @deprecated use `TimeOffSchemasValue$inboundSchema` instead. */
    TimeOffSchemasValue$.inboundSchema = exports.TimeOffSchemasValue$inboundSchema;
    /** @deprecated use `TimeOffSchemasValue$outboundSchema` instead. */
    TimeOffSchemasValue$.outboundSchema = exports.TimeOffSchemasValue$outboundSchema;
})(TimeOffSchemasValue$ || (exports.TimeOffSchemasValue$ = TimeOffSchemasValue$ = {}));
/** @internal */
exports.TimeOffType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TimeOffSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TimeOffSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TimeOffType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TimeOffSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TimeOffSchemasValue$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 TimeOffType$;
(function (TimeOffType$) {
    /** @deprecated use `TimeOffType$inboundSchema` instead. */
    TimeOffType$.inboundSchema = exports.TimeOffType$inboundSchema;
    /** @deprecated use `TimeOffType$outboundSchema` instead. */
    TimeOffType$.outboundSchema = exports.TimeOffType$outboundSchema;
})(TimeOffType$ || (exports.TimeOffType$ = TimeOffType$ = {}));
function timeOffTypeToJSON(timeOffType) {
    return JSON.stringify(exports.TimeOffType$outboundSchema.parse(timeOffType));
}
exports.timeOffTypeToJSON = timeOffTypeToJSON;
function timeOffTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOffType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOffType' from JSON`);
}
exports.timeOffTypeFromJSON = timeOffTypeFromJSON;
/** @internal */
exports.TimeOff$inboundSchema = z.object({
    approver_id: z.nullable(z.string()).optional(),
    created_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    duration: z.nullable(z.string()).optional(),
    employee_id: z.nullable(z.string()).optional(),
    end_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    end_half_day: z.nullable(z.union([z.boolean(), exports.TimeOff2$inboundSchema]))
        .optional(),
    id: z.nullable(z.string()).optional(),
    remote_approver_id: z.nullable(z.string()).optional(),
    remote_employee_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    start_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    start_half_day: z.nullable(z.union([z.boolean(), exports.TimeOffSchemas2$inboundSchema])).optional(),
    status: z.nullable(z.lazy(() => exports.TimeOffStatus$inboundSchema)).optional(),
    type: z.nullable(z.lazy(() => exports.TimeOffType$inboundSchema)).optional(),
    updated_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "approver_id": "approverId",
        "created_date": "createdDate",
        "employee_id": "employeeId",
        "end_date": "endDate",
        "end_half_day": "endHalfDay",
        "remote_approver_id": "remoteApproverId",
        "remote_employee_id": "remoteEmployeeId",
        "remote_id": "remoteId",
        "start_date": "startDate",
        "start_half_day": "startHalfDay",
        "updated_date": "updatedDate",
    });
});
/** @internal */
exports.TimeOff$outboundSchema = z.object({
    approverId: z.nullable(z.string()).optional(),
    createdDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    duration: z.nullable(z.string()).optional(),
    employeeId: z.nullable(z.string()).optional(),
    endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    endHalfDay: z.nullable(z.union([z.boolean(), exports.TimeOff2$outboundSchema]))
        .optional(),
    id: z.nullable(z.string()).optional(),
    remoteApproverId: z.nullable(z.string()).optional(),
    remoteEmployeeId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    startHalfDay: z.nullable(z.union([z.boolean(), exports.TimeOffSchemas2$outboundSchema])).optional(),
    status: z.nullable(z.lazy(() => exports.TimeOffStatus$outboundSchema)).optional(),
    type: z.nullable(z.lazy(() => exports.TimeOffType$outboundSchema)).optional(),
    updatedDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        approverId: "approver_id",
        createdDate: "created_date",
        employeeId: "employee_id",
        endDate: "end_date",
        endHalfDay: "end_half_day",
        remoteApproverId: "remote_approver_id",
        remoteEmployeeId: "remote_employee_id",
        remoteId: "remote_id",
        startDate: "start_date",
        startHalfDay: "start_half_day",
        updatedDate: "updated_date",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TimeOff$;
(function (TimeOff$) {
    /** @deprecated use `TimeOff$inboundSchema` instead. */
    TimeOff$.inboundSchema = exports.TimeOff$inboundSchema;
    /** @deprecated use `TimeOff$outboundSchema` instead. */
    TimeOff$.outboundSchema = exports.TimeOff$outboundSchema;
})(TimeOff$ || (exports.TimeOff$ = TimeOff$ = {}));
function timeOffToJSON(timeOff) {
    return JSON.stringify(exports.TimeOff$outboundSchema.parse(timeOff));
}
exports.timeOffToJSON = timeOffToJSON;
function timeOffFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TimeOff$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TimeOff' from JSON`);
}
exports.timeOffFromJSON = timeOffFromJSON;
//# sourceMappingURL=timeoff.js.map