"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.HrisShift$ = exports.HrisShift$outboundSchema = exports.HrisShift$inboundSchema = exports.HrisShiftStatus$ = exports.HrisShiftStatus$outboundSchema = exports.HrisShiftStatus$inboundSchema = exports.HrisShiftSchemasValue$ = exports.HrisShiftSchemasValue$outboundSchema = exports.HrisShiftSchemasValue$inboundSchema = exports.HrisShiftSchemasSourceValue$ = exports.HrisShiftSchemasSourceValue$outboundSchema = exports.HrisShiftSchemasSourceValue$inboundSchema = exports.HrisShiftSchemas4$ = exports.HrisShiftSchemas4$outboundSchema = exports.HrisShiftSchemas4$inboundSchema = exports.ApprovalStatus$ = exports.ApprovalStatus$outboundSchema = exports.ApprovalStatus$inboundSchema = exports.HrisShiftValue$ = exports.HrisShiftValue$outboundSchema = exports.HrisShiftValue$inboundSchema = exports.HrisShiftSourceValue$ = exports.HrisShiftSourceValue$outboundSchema = exports.HrisShiftSourceValue$inboundSchema = exports.HrisShift4$ = exports.HrisShift4$outboundSchema = exports.HrisShift4$inboundSchema = exports.HrisShiftSchemasValue = exports.HrisShiftValue = void 0;
exports.hrisShift4ToJSON = hrisShift4ToJSON;
exports.hrisShift4FromJSON = hrisShift4FromJSON;
exports.hrisShiftSourceValueToJSON = hrisShiftSourceValueToJSON;
exports.hrisShiftSourceValueFromJSON = hrisShiftSourceValueFromJSON;
exports.approvalStatusToJSON = approvalStatusToJSON;
exports.approvalStatusFromJSON = approvalStatusFromJSON;
exports.hrisShiftSchemas4ToJSON = hrisShiftSchemas4ToJSON;
exports.hrisShiftSchemas4FromJSON = hrisShiftSchemas4FromJSON;
exports.hrisShiftSchemasSourceValueToJSON = hrisShiftSchemasSourceValueToJSON;
exports.hrisShiftSchemasSourceValueFromJSON = hrisShiftSchemasSourceValueFromJSON;
exports.hrisShiftStatusToJSON = hrisShiftStatusToJSON;
exports.hrisShiftStatusFromJSON = hrisShiftStatusFromJSON;
exports.hrisShiftToJSON = hrisShiftToJSON;
exports.hrisShiftFromJSON = hrisShiftFromJSON;
const z = __importStar(require("zod/v3"));
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 shiftbreak_js_1 = require("./shiftbreak.js");
/**
 * The approval status of the shift
 */
var HrisShiftValue;
(function (HrisShiftValue) {
    HrisShiftValue["Pending"] = "pending";
    HrisShiftValue["Approved"] = "approved";
    HrisShiftValue["Rejected"] = "rejected";
    HrisShiftValue["UnmappedValue"] = "unmapped_value";
})(HrisShiftValue || (exports.HrisShiftValue = HrisShiftValue = {}));
/**
 * The status of the shift
 */
var HrisShiftSchemasValue;
(function (HrisShiftSchemasValue) {
    HrisShiftSchemasValue["Draft"] = "draft";
    HrisShiftSchemasValue["Published"] = "published";
    HrisShiftSchemasValue["Confirmed"] = "confirmed";
    HrisShiftSchemasValue["Cancelled"] = "cancelled";
    HrisShiftSchemasValue["UnmappedValue"] = "unmapped_value";
})(HrisShiftSchemasValue || (exports.HrisShiftSchemasValue = HrisShiftSchemasValue = {}));
/** @internal */
exports.HrisShift4$inboundSchema = z.object({});
/** @internal */
exports.HrisShift4$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 HrisShift4$;
(function (HrisShift4$) {
    /** @deprecated use `HrisShift4$inboundSchema` instead. */
    HrisShift4$.inboundSchema = exports.HrisShift4$inboundSchema;
    /** @deprecated use `HrisShift4$outboundSchema` instead. */
    HrisShift4$.outboundSchema = exports.HrisShift4$outboundSchema;
})(HrisShift4$ || (exports.HrisShift4$ = HrisShift4$ = {}));
function hrisShift4ToJSON(hrisShift4) {
    return JSON.stringify(exports.HrisShift4$outboundSchema.parse(hrisShift4));
}
function hrisShift4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShift4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShift4' from JSON`);
}
/** @internal */
exports.HrisShiftSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShift4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.HrisShiftSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShift4$outboundSchema),
    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 HrisShiftSourceValue$;
(function (HrisShiftSourceValue$) {
    /** @deprecated use `HrisShiftSourceValue$inboundSchema` instead. */
    HrisShiftSourceValue$.inboundSchema = exports.HrisShiftSourceValue$inboundSchema;
    /** @deprecated use `HrisShiftSourceValue$outboundSchema` instead. */
    HrisShiftSourceValue$.outboundSchema = exports.HrisShiftSourceValue$outboundSchema;
})(HrisShiftSourceValue$ || (exports.HrisShiftSourceValue$ = HrisShiftSourceValue$ = {}));
function hrisShiftSourceValueToJSON(hrisShiftSourceValue) {
    return JSON.stringify(exports.HrisShiftSourceValue$outboundSchema.parse(hrisShiftSourceValue));
}
function hrisShiftSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftSourceValue' from JSON`);
}
/** @internal */
exports.HrisShiftValue$inboundSchema = z
    .union([
    z.nativeEnum(HrisShiftValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HrisShiftValue$outboundSchema = z.union([
    z.nativeEnum(HrisShiftValue),
    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 HrisShiftValue$;
(function (HrisShiftValue$) {
    /** @deprecated use `HrisShiftValue$inboundSchema` instead. */
    HrisShiftValue$.inboundSchema = exports.HrisShiftValue$inboundSchema;
    /** @deprecated use `HrisShiftValue$outboundSchema` instead. */
    HrisShiftValue$.outboundSchema = exports.HrisShiftValue$outboundSchema;
})(HrisShiftValue$ || (exports.HrisShiftValue$ = HrisShiftValue$ = {}));
/** @internal */
exports.ApprovalStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShift4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.ApprovalStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShift4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftValue$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 ApprovalStatus$;
(function (ApprovalStatus$) {
    /** @deprecated use `ApprovalStatus$inboundSchema` instead. */
    ApprovalStatus$.inboundSchema = exports.ApprovalStatus$inboundSchema;
    /** @deprecated use `ApprovalStatus$outboundSchema` instead. */
    ApprovalStatus$.outboundSchema = exports.ApprovalStatus$outboundSchema;
})(ApprovalStatus$ || (exports.ApprovalStatus$ = ApprovalStatus$ = {}));
function approvalStatusToJSON(approvalStatus) {
    return JSON.stringify(exports.ApprovalStatus$outboundSchema.parse(approvalStatus));
}
function approvalStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ApprovalStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ApprovalStatus' from JSON`);
}
/** @internal */
exports.HrisShiftSchemas4$inboundSchema = z.object({});
/** @internal */
exports.HrisShiftSchemas4$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 HrisShiftSchemas4$;
(function (HrisShiftSchemas4$) {
    /** @deprecated use `HrisShiftSchemas4$inboundSchema` instead. */
    HrisShiftSchemas4$.inboundSchema = exports.HrisShiftSchemas4$inboundSchema;
    /** @deprecated use `HrisShiftSchemas4$outboundSchema` instead. */
    HrisShiftSchemas4$.outboundSchema = exports.HrisShiftSchemas4$outboundSchema;
})(HrisShiftSchemas4$ || (exports.HrisShiftSchemas4$ = HrisShiftSchemas4$ = {}));
function hrisShiftSchemas4ToJSON(hrisShiftSchemas4) {
    return JSON.stringify(exports.HrisShiftSchemas4$outboundSchema.parse(hrisShiftSchemas4));
}
function hrisShiftSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftSchemas4' from JSON`);
}
/** @internal */
exports.HrisShiftSchemasSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShiftSchemas4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.HrisShiftSchemasSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShiftSchemas4$outboundSchema),
    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 HrisShiftSchemasSourceValue$;
(function (HrisShiftSchemasSourceValue$) {
    /** @deprecated use `HrisShiftSchemasSourceValue$inboundSchema` instead. */
    HrisShiftSchemasSourceValue$.inboundSchema = exports.HrisShiftSchemasSourceValue$inboundSchema;
    /** @deprecated use `HrisShiftSchemasSourceValue$outboundSchema` instead. */
    HrisShiftSchemasSourceValue$.outboundSchema = exports.HrisShiftSchemasSourceValue$outboundSchema;
})(HrisShiftSchemasSourceValue$ || (exports.HrisShiftSchemasSourceValue$ = HrisShiftSchemasSourceValue$ = {}));
function hrisShiftSchemasSourceValueToJSON(hrisShiftSchemasSourceValue) {
    return JSON.stringify(exports.HrisShiftSchemasSourceValue$outboundSchema.parse(hrisShiftSchemasSourceValue));
}
function hrisShiftSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftSchemasSourceValue' from JSON`);
}
/** @internal */
exports.HrisShiftSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(HrisShiftSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HrisShiftSchemasValue$outboundSchema = z.union([
    z.nativeEnum(HrisShiftSchemasValue),
    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 HrisShiftSchemasValue$;
(function (HrisShiftSchemasValue$) {
    /** @deprecated use `HrisShiftSchemasValue$inboundSchema` instead. */
    HrisShiftSchemasValue$.inboundSchema = exports.HrisShiftSchemasValue$inboundSchema;
    /** @deprecated use `HrisShiftSchemasValue$outboundSchema` instead. */
    HrisShiftSchemasValue$.outboundSchema = exports.HrisShiftSchemasValue$outboundSchema;
})(HrisShiftSchemasValue$ || (exports.HrisShiftSchemasValue$ = HrisShiftSchemasValue$ = {}));
/** @internal */
exports.HrisShiftStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShiftSchemas4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HrisShiftStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShiftSchemas4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftSchemasValue$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 HrisShiftStatus$;
(function (HrisShiftStatus$) {
    /** @deprecated use `HrisShiftStatus$inboundSchema` instead. */
    HrisShiftStatus$.inboundSchema = exports.HrisShiftStatus$inboundSchema;
    /** @deprecated use `HrisShiftStatus$outboundSchema` instead. */
    HrisShiftStatus$.outboundSchema = exports.HrisShiftStatus$outboundSchema;
})(HrisShiftStatus$ || (exports.HrisShiftStatus$ = HrisShiftStatus$ = {}));
function hrisShiftStatusToJSON(hrisShiftStatus) {
    return JSON.stringify(exports.HrisShiftStatus$outboundSchema.parse(hrisShiftStatus));
}
function hrisShiftStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftStatus' from JSON`);
}
/** @internal */
exports.HrisShift$inboundSchema = z.object({
    approval_status: z.nullable(z.lazy(() => exports.ApprovalStatus$inboundSchema))
        .optional(),
    break_duration: z.nullable(z.string()).optional(),
    breaks: z.nullable(z.array(shiftbreak_js_1.ShiftBreak$inboundSchema)).optional(),
    company_id: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    employee_id: z.nullable(z.string()).optional(),
    end_time: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    location_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    start_time: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.HrisShiftStatus$inboundSchema)).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, {
        "approval_status": "approvalStatus",
        "break_duration": "breakDuration",
        "company_id": "companyId",
        "created_at": "createdAt",
        "employee_id": "employeeId",
        "end_time": "endTime",
        "location_id": "locationId",
        "remote_id": "remoteId",
        "start_time": "startTime",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.HrisShift$outboundSchema = z.object({
    approvalStatus: z.nullable(z.lazy(() => exports.ApprovalStatus$outboundSchema))
        .optional(),
    breakDuration: z.nullable(z.string()).optional(),
    breaks: z.nullable(z.array(shiftbreak_js_1.ShiftBreak$outboundSchema)).optional(),
    companyId: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    employeeId: z.nullable(z.string()).optional(),
    endTime: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    locationId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    startTime: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.HrisShiftStatus$outboundSchema)).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        approvalStatus: "approval_status",
        breakDuration: "break_duration",
        companyId: "company_id",
        createdAt: "created_at",
        employeeId: "employee_id",
        endTime: "end_time",
        locationId: "location_id",
        remoteId: "remote_id",
        startTime: "start_time",
        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 HrisShift$;
(function (HrisShift$) {
    /** @deprecated use `HrisShift$inboundSchema` instead. */
    HrisShift$.inboundSchema = exports.HrisShift$inboundSchema;
    /** @deprecated use `HrisShift$outboundSchema` instead. */
    HrisShift$.outboundSchema = exports.HrisShift$outboundSchema;
})(HrisShift$ || (exports.HrisShift$ = HrisShift$ = {}));
function hrisShiftToJSON(hrisShift) {
    return JSON.stringify(exports.HrisShift$outboundSchema.parse(hrisShift));
}
function hrisShiftFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShift$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShift' from JSON`);
}
//# sourceMappingURL=hrisshift.js.map