"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.HrisShiftResult$inboundSchema = exports.HrisShiftResultData$inboundSchema = exports.HrisShiftResultStatus$inboundSchema = exports.HrisShiftResultSchemasValue$inboundSchema = exports.HrisShiftResultSchemasSourceValue$inboundSchema = exports.HrisShiftResultSchemas4$inboundSchema = exports.HrisShiftResultApprovalStatus$inboundSchema = exports.HrisShiftResultValue$inboundSchema = exports.HrisShiftResultSourceValue$inboundSchema = exports.HrisShiftResult4$inboundSchema = exports.HrisShiftResultSchemasValue = exports.HrisShiftResultValue = void 0;
exports.hrisShiftResult4FromJSON = hrisShiftResult4FromJSON;
exports.hrisShiftResultSourceValueFromJSON = hrisShiftResultSourceValueFromJSON;
exports.hrisShiftResultApprovalStatusFromJSON = hrisShiftResultApprovalStatusFromJSON;
exports.hrisShiftResultSchemas4FromJSON = hrisShiftResultSchemas4FromJSON;
exports.hrisShiftResultSchemasSourceValueFromJSON = hrisShiftResultSchemasSourceValueFromJSON;
exports.hrisShiftResultStatusFromJSON = hrisShiftResultStatusFromJSON;
exports.hrisShiftResultDataFromJSON = hrisShiftResultDataFromJSON;
exports.hrisShiftResultFromJSON = hrisShiftResultFromJSON;
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 rawresponse_js_1 = require("./rawresponse.js");
const shiftbreak_js_1 = require("./shiftbreak.js");
/**
 * The approval status of the shift
 */
var HrisShiftResultValue;
(function (HrisShiftResultValue) {
    HrisShiftResultValue["Pending"] = "pending";
    HrisShiftResultValue["Approved"] = "approved";
    HrisShiftResultValue["Rejected"] = "rejected";
    HrisShiftResultValue["UnmappedValue"] = "unmapped_value";
})(HrisShiftResultValue || (exports.HrisShiftResultValue = HrisShiftResultValue = {}));
/**
 * The status of the shift
 */
var HrisShiftResultSchemasValue;
(function (HrisShiftResultSchemasValue) {
    HrisShiftResultSchemasValue["Draft"] = "draft";
    HrisShiftResultSchemasValue["Published"] = "published";
    HrisShiftResultSchemasValue["Confirmed"] = "confirmed";
    HrisShiftResultSchemasValue["Cancelled"] = "cancelled";
    HrisShiftResultSchemasValue["UnmappedValue"] = "unmapped_value";
})(HrisShiftResultSchemasValue || (exports.HrisShiftResultSchemasValue = HrisShiftResultSchemasValue = {}));
/** @internal */
exports.HrisShiftResult4$inboundSchema = z.object({});
function hrisShiftResult4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResult4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResult4' from JSON`);
}
/** @internal */
exports.HrisShiftResultSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShiftResult4$inboundSchema),
    z.array(z.any()),
]);
function hrisShiftResultSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultSourceValue' from JSON`);
}
/** @internal */
exports.HrisShiftResultValue$inboundSchema = openEnums.inboundSchema(HrisShiftResultValue);
/** @internal */
exports.HrisShiftResultApprovalStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShiftResult4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftResultValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function hrisShiftResultApprovalStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultApprovalStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultApprovalStatus' from JSON`);
}
/** @internal */
exports.HrisShiftResultSchemas4$inboundSchema = z.object({});
function hrisShiftResultSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultSchemas4' from JSON`);
}
/** @internal */
exports.HrisShiftResultSchemasSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HrisShiftResultSchemas4$inboundSchema),
    z.array(z.any()),
]);
function hrisShiftResultSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultSchemasSourceValue' from JSON`);
}
/** @internal */
exports.HrisShiftResultSchemasValue$inboundSchema = openEnums.inboundSchema(HrisShiftResultSchemasValue);
/** @internal */
exports.HrisShiftResultStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HrisShiftResultSchemas4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HrisShiftResultSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function hrisShiftResultStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultStatus' from JSON`);
}
/** @internal */
exports.HrisShiftResultData$inboundSchema = z.object({
    approval_status: z.nullable(z.lazy(() => exports.HrisShiftResultApprovalStatus$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.HrisShiftResultStatus$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 hrisShiftResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResultData' from JSON`);
}
/** @internal */
exports.HrisShiftResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.HrisShiftResultData$inboundSchema)).optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
function hrisShiftResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisShiftResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisShiftResult' from JSON`);
}
//# sourceMappingURL=hrisshiftresult.js.map