"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.hrisCostCenterFromJSON = exports.hrisCostCenterToJSON = exports.HRISCostCenter$ = exports.HRISCostCenter$outboundSchema = exports.HRISCostCenter$inboundSchema = exports.hrisCostCenterTypeFromJSON = exports.hrisCostCenterTypeToJSON = exports.HRISCostCenterType$ = exports.HRISCostCenterType$outboundSchema = exports.HRISCostCenterType$inboundSchema = exports.HRISCostCenterValue$ = exports.HRISCostCenterValue$outboundSchema = exports.HRISCostCenterValue$inboundSchema = exports.hrisCostCenterSourceValueFromJSON = exports.hrisCostCenterSourceValueToJSON = exports.HRISCostCenterSourceValue$ = exports.HRISCostCenterSourceValue$outboundSchema = exports.HRISCostCenterSourceValue$inboundSchema = exports.hrisCostCenter4FromJSON = exports.hrisCostCenter4ToJSON = exports.HRISCostCenter4$ = exports.HRISCostCenter4$outboundSchema = exports.HRISCostCenter4$inboundSchema = exports.HRISCostCenterValue = 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 HRISCostCenterValue;
(function (HRISCostCenterValue) {
    HRISCostCenterValue["Workspace"] = "workspace";
    HRISCostCenterValue["Team"] = "team";
    HRISCostCenterValue["Department"] = "department";
    HRISCostCenterValue["Group"] = "group";
    HRISCostCenterValue["Organization"] = "organization";
    HRISCostCenterValue["UnmappedValue"] = "unmapped_value";
    HRISCostCenterValue["CostCenter"] = "cost_center";
})(HRISCostCenterValue || (exports.HRISCostCenterValue = HRISCostCenterValue = {}));
/** @internal */
exports.HRISCostCenter4$inboundSchema = z.object({});
/** @internal */
exports.HRISCostCenter4$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 HRISCostCenter4$;
(function (HRISCostCenter4$) {
    /** @deprecated use `HRISCostCenter4$inboundSchema` instead. */
    HRISCostCenter4$.inboundSchema = exports.HRISCostCenter4$inboundSchema;
    /** @deprecated use `HRISCostCenter4$outboundSchema` instead. */
    HRISCostCenter4$.outboundSchema = exports.HRISCostCenter4$outboundSchema;
})(HRISCostCenter4$ || (exports.HRISCostCenter4$ = HRISCostCenter4$ = {}));
function hrisCostCenter4ToJSON(hrisCostCenter4) {
    return JSON.stringify(exports.HRISCostCenter4$outboundSchema.parse(hrisCostCenter4));
}
exports.hrisCostCenter4ToJSON = hrisCostCenter4ToJSON;
function hrisCostCenter4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISCostCenter4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISCostCenter4' from JSON`);
}
exports.hrisCostCenter4FromJSON = hrisCostCenter4FromJSON;
/** @internal */
exports.HRISCostCenterSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.HRISCostCenter4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.HRISCostCenterSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.HRISCostCenter4$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 HRISCostCenterSourceValue$;
(function (HRISCostCenterSourceValue$) {
    /** @deprecated use `HRISCostCenterSourceValue$inboundSchema` instead. */
    HRISCostCenterSourceValue$.inboundSchema = exports.HRISCostCenterSourceValue$inboundSchema;
    /** @deprecated use `HRISCostCenterSourceValue$outboundSchema` instead. */
    HRISCostCenterSourceValue$.outboundSchema = exports.HRISCostCenterSourceValue$outboundSchema;
})(HRISCostCenterSourceValue$ || (exports.HRISCostCenterSourceValue$ = HRISCostCenterSourceValue$ = {}));
function hrisCostCenterSourceValueToJSON(hrisCostCenterSourceValue) {
    return JSON.stringify(exports.HRISCostCenterSourceValue$outboundSchema.parse(hrisCostCenterSourceValue));
}
exports.hrisCostCenterSourceValueToJSON = hrisCostCenterSourceValueToJSON;
function hrisCostCenterSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISCostCenterSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISCostCenterSourceValue' from JSON`);
}
exports.hrisCostCenterSourceValueFromJSON = hrisCostCenterSourceValueFromJSON;
/** @internal */
exports.HRISCostCenterValue$inboundSchema = z
    .union([
    z.nativeEnum(HRISCostCenterValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HRISCostCenterValue$outboundSchema = z.union([
    z.nativeEnum(HRISCostCenterValue),
    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 HRISCostCenterValue$;
(function (HRISCostCenterValue$) {
    /** @deprecated use `HRISCostCenterValue$inboundSchema` instead. */
    HRISCostCenterValue$.inboundSchema = exports.HRISCostCenterValue$inboundSchema;
    /** @deprecated use `HRISCostCenterValue$outboundSchema` instead. */
    HRISCostCenterValue$.outboundSchema = exports.HRISCostCenterValue$outboundSchema;
})(HRISCostCenterValue$ || (exports.HRISCostCenterValue$ = HRISCostCenterValue$ = {}));
/** @internal */
exports.HRISCostCenterType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.HRISCostCenter4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISCostCenterValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HRISCostCenterType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.HRISCostCenter4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISCostCenterValue$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 HRISCostCenterType$;
(function (HRISCostCenterType$) {
    /** @deprecated use `HRISCostCenterType$inboundSchema` instead. */
    HRISCostCenterType$.inboundSchema = exports.HRISCostCenterType$inboundSchema;
    /** @deprecated use `HRISCostCenterType$outboundSchema` instead. */
    HRISCostCenterType$.outboundSchema = exports.HRISCostCenterType$outboundSchema;
})(HRISCostCenterType$ || (exports.HRISCostCenterType$ = HRISCostCenterType$ = {}));
function hrisCostCenterTypeToJSON(hrisCostCenterType) {
    return JSON.stringify(exports.HRISCostCenterType$outboundSchema.parse(hrisCostCenterType));
}
exports.hrisCostCenterTypeToJSON = hrisCostCenterTypeToJSON;
function hrisCostCenterTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISCostCenterType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISCostCenterType' from JSON`);
}
exports.hrisCostCenterTypeFromJSON = hrisCostCenterTypeFromJSON;
/** @internal */
exports.HRISCostCenter$inboundSchema = z.object({
    company_id: z.nullable(z.string()).optional(),
    distribution_percentage: z.nullable(z.number()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    owner_ids: z.nullable(z.array(z.string())).optional(),
    parent_ids: z.nullable(z.array(z.string())).optional(),
    remote_company_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    remote_owner_ids: z.nullable(z.array(z.string())).optional(),
    remote_parent_ids: z.nullable(z.array(z.string())).optional(),
    type: z.nullable(z.lazy(() => exports.HRISCostCenterType$inboundSchema)).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "company_id": "companyId",
        "distribution_percentage": "distributionPercentage",
        "owner_ids": "ownerIds",
        "parent_ids": "parentIds",
        "remote_company_id": "remoteCompanyId",
        "remote_id": "remoteId",
        "remote_owner_ids": "remoteOwnerIds",
        "remote_parent_ids": "remoteParentIds",
        "unified_custom_fields": "unifiedCustomFields",
    });
});
/** @internal */
exports.HRISCostCenter$outboundSchema = z.object({
    companyId: z.nullable(z.string()).optional(),
    distributionPercentage: z.nullable(z.number()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    ownerIds: z.nullable(z.array(z.string())).optional(),
    parentIds: z.nullable(z.array(z.string())).optional(),
    remoteCompanyId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    remoteOwnerIds: z.nullable(z.array(z.string())).optional(),
    remoteParentIds: z.nullable(z.array(z.string())).optional(),
    type: z.nullable(z.lazy(() => exports.HRISCostCenterType$outboundSchema)).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        companyId: "company_id",
        distributionPercentage: "distribution_percentage",
        ownerIds: "owner_ids",
        parentIds: "parent_ids",
        remoteCompanyId: "remote_company_id",
        remoteId: "remote_id",
        remoteOwnerIds: "remote_owner_ids",
        remoteParentIds: "remote_parent_ids",
        unifiedCustomFields: "unified_custom_fields",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var HRISCostCenter$;
(function (HRISCostCenter$) {
    /** @deprecated use `HRISCostCenter$inboundSchema` instead. */
    HRISCostCenter$.inboundSchema = exports.HRISCostCenter$inboundSchema;
    /** @deprecated use `HRISCostCenter$outboundSchema` instead. */
    HRISCostCenter$.outboundSchema = exports.HRISCostCenter$outboundSchema;
})(HRISCostCenter$ || (exports.HRISCostCenter$ = HRISCostCenter$ = {}));
function hrisCostCenterToJSON(hrisCostCenter) {
    return JSON.stringify(exports.HRISCostCenter$outboundSchema.parse(hrisCostCenter));
}
exports.hrisCostCenterToJSON = hrisCostCenterToJSON;
function hrisCostCenterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISCostCenter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISCostCenter' from JSON`);
}
exports.hrisCostCenterFromJSON = hrisCostCenterFromJSON;
//# sourceMappingURL=hriscostcenter.js.map