"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.HRISDivision$ = exports.HRISDivision$outboundSchema = exports.HRISDivision$inboundSchema = exports.HRISDivisionType$ = exports.HRISDivisionType$outboundSchema = exports.HRISDivisionType$inboundSchema = exports.HRISDivisionValue$ = exports.HRISDivisionValue$outboundSchema = exports.HRISDivisionValue$inboundSchema = exports.HRISDivisionSourceValue$ = exports.HRISDivisionSourceValue$outboundSchema = exports.HRISDivisionSourceValue$inboundSchema = exports.HRISDivision4$ = exports.HRISDivision4$outboundSchema = exports.HRISDivision4$inboundSchema = exports.HRISDivisionValue = void 0;
exports.hrisDivision4ToJSON = hrisDivision4ToJSON;
exports.hrisDivision4FromJSON = hrisDivision4FromJSON;
exports.hrisDivisionSourceValueToJSON = hrisDivisionSourceValueToJSON;
exports.hrisDivisionSourceValueFromJSON = hrisDivisionSourceValueFromJSON;
exports.hrisDivisionTypeToJSON = hrisDivisionTypeToJSON;
exports.hrisDivisionTypeFromJSON = hrisDivisionTypeFromJSON;
exports.hrisDivisionToJSON = hrisDivisionToJSON;
exports.hrisDivisionFromJSON = hrisDivisionFromJSON;
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");
var HRISDivisionValue;
(function (HRISDivisionValue) {
    HRISDivisionValue["Department"] = "department";
    HRISDivisionValue["Company"] = "company";
    HRISDivisionValue["Division"] = "division";
    HRISDivisionValue["Group"] = "group";
    HRISDivisionValue["Project"] = "project";
    HRISDivisionValue["CostCenter"] = "cost_center";
    HRISDivisionValue["Team"] = "team";
    HRISDivisionValue["UnmappedValue"] = "unmapped_value";
})(HRISDivisionValue || (exports.HRISDivisionValue = HRISDivisionValue = {}));
/** @internal */
exports.HRISDivision4$inboundSchema = z.object({});
/** @internal */
exports.HRISDivision4$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 HRISDivision4$;
(function (HRISDivision4$) {
    /** @deprecated use `HRISDivision4$inboundSchema` instead. */
    HRISDivision4$.inboundSchema = exports.HRISDivision4$inboundSchema;
    /** @deprecated use `HRISDivision4$outboundSchema` instead. */
    HRISDivision4$.outboundSchema = exports.HRISDivision4$outboundSchema;
})(HRISDivision4$ || (exports.HRISDivision4$ = HRISDivision4$ = {}));
function hrisDivision4ToJSON(hrisDivision4) {
    return JSON.stringify(exports.HRISDivision4$outboundSchema.parse(hrisDivision4));
}
function hrisDivision4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDivision4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDivision4' from JSON`);
}
/** @internal */
exports.HRISDivisionSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HRISDivision4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.HRISDivisionSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.HRISDivision4$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 HRISDivisionSourceValue$;
(function (HRISDivisionSourceValue$) {
    /** @deprecated use `HRISDivisionSourceValue$inboundSchema` instead. */
    HRISDivisionSourceValue$.inboundSchema = exports.HRISDivisionSourceValue$inboundSchema;
    /** @deprecated use `HRISDivisionSourceValue$outboundSchema` instead. */
    HRISDivisionSourceValue$.outboundSchema = exports.HRISDivisionSourceValue$outboundSchema;
})(HRISDivisionSourceValue$ || (exports.HRISDivisionSourceValue$ = HRISDivisionSourceValue$ = {}));
function hrisDivisionSourceValueToJSON(hrisDivisionSourceValue) {
    return JSON.stringify(exports.HRISDivisionSourceValue$outboundSchema.parse(hrisDivisionSourceValue));
}
function hrisDivisionSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDivisionSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDivisionSourceValue' from JSON`);
}
/** @internal */
exports.HRISDivisionValue$inboundSchema = z
    .union([
    z.nativeEnum(HRISDivisionValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HRISDivisionValue$outboundSchema = z.union([
    z.nativeEnum(HRISDivisionValue),
    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 HRISDivisionValue$;
(function (HRISDivisionValue$) {
    /** @deprecated use `HRISDivisionValue$inboundSchema` instead. */
    HRISDivisionValue$.inboundSchema = exports.HRISDivisionValue$inboundSchema;
    /** @deprecated use `HRISDivisionValue$outboundSchema` instead. */
    HRISDivisionValue$.outboundSchema = exports.HRISDivisionValue$outboundSchema;
})(HRISDivisionValue$ || (exports.HRISDivisionValue$ = HRISDivisionValue$ = {}));
/** @internal */
exports.HRISDivisionType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HRISDivision4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISDivisionValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HRISDivisionType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.HRISDivision4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISDivisionValue$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 HRISDivisionType$;
(function (HRISDivisionType$) {
    /** @deprecated use `HRISDivisionType$inboundSchema` instead. */
    HRISDivisionType$.inboundSchema = exports.HRISDivisionType$inboundSchema;
    /** @deprecated use `HRISDivisionType$outboundSchema` instead. */
    HRISDivisionType$.outboundSchema = exports.HRISDivisionType$outboundSchema;
})(HRISDivisionType$ || (exports.HRISDivisionType$ = HRISDivisionType$ = {}));
function hrisDivisionTypeToJSON(hrisDivisionType) {
    return JSON.stringify(exports.HRISDivisionType$outboundSchema.parse(hrisDivisionType));
}
function hrisDivisionTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDivisionType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDivisionType' from JSON`);
}
/** @internal */
exports.HRISDivision$inboundSchema = z.object({
    company_id: z.nullable(z.string()).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.HRISDivisionType$inboundSchema)).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "company_id": "companyId",
        "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.HRISDivision$outboundSchema = z.object({
    companyId: z.nullable(z.string()).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.HRISDivisionType$outboundSchema)).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        companyId: "company_id",
        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 HRISDivision$;
(function (HRISDivision$) {
    /** @deprecated use `HRISDivision$inboundSchema` instead. */
    HRISDivision$.inboundSchema = exports.HRISDivision$inboundSchema;
    /** @deprecated use `HRISDivision$outboundSchema` instead. */
    HRISDivision$.outboundSchema = exports.HRISDivision$outboundSchema;
})(HRISDivision$ || (exports.HRISDivision$ = HRISDivision$ = {}));
function hrisDivisionToJSON(hrisDivision) {
    return JSON.stringify(exports.HRISDivision$outboundSchema.parse(hrisDivision));
}
function hrisDivisionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDivision$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDivision' from JSON`);
}
//# sourceMappingURL=hrisdivision.js.map