"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$inboundSchema = exports.HrisShiftStatus$inboundSchema = exports.HrisShiftSchemasValue$inboundSchema = exports.HrisShiftSchemasSourceValue$inboundSchema = exports.HrisShiftSchemas4$inboundSchema = exports.ApprovalStatus$inboundSchema = exports.HrisShiftValue$inboundSchema = exports.HrisShiftSourceValue$inboundSchema = exports.HrisShift4$inboundSchema = exports.HrisShiftSchemasValue = exports.HrisShiftValue = void 0;
exports.hrisShift4FromJSON = hrisShift4FromJSON;
exports.hrisShiftSourceValueFromJSON = hrisShiftSourceValueFromJSON;
exports.approvalStatusFromJSON = approvalStatusFromJSON;
exports.hrisShiftSchemas4FromJSON = hrisShiftSchemas4FromJSON;
exports.hrisShiftSchemasSourceValueFromJSON = hrisShiftSchemasSourceValueFromJSON;
exports.hrisShiftStatusFromJSON = hrisShiftStatusFromJSON;
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 openEnums = __importStar(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({});
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()),
]);
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 = openEnums.inboundSchema(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",
    });
});
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({});
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()),
]);
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 = openEnums.inboundSchema(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",
    });
});
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",
    });
});
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