"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.hrisDepartmentFromJSON = exports.hrisDepartmentToJSON = exports.HRISDepartment$ = exports.HRISDepartment$outboundSchema = exports.HRISDepartment$inboundSchema = exports.hrisDepartmentTypeFromJSON = exports.hrisDepartmentTypeToJSON = exports.HRISDepartmentType$ = exports.HRISDepartmentType$outboundSchema = exports.HRISDepartmentType$inboundSchema = exports.HRISDepartmentValue$ = exports.HRISDepartmentValue$outboundSchema = exports.HRISDepartmentValue$inboundSchema = exports.hrisDepartmentSourceValueFromJSON = exports.hrisDepartmentSourceValueToJSON = exports.HRISDepartmentSourceValue$ = exports.HRISDepartmentSourceValue$outboundSchema = exports.HRISDepartmentSourceValue$inboundSchema = exports.hrisDepartment4FromJSON = exports.hrisDepartment4ToJSON = exports.HRISDepartment4$ = exports.HRISDepartment4$outboundSchema = exports.HRISDepartment4$inboundSchema = exports.HRISDepartmentValue = 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 HRISDepartmentValue;
(function (HRISDepartmentValue) {
    HRISDepartmentValue["Department"] = "department";
    HRISDepartmentValue["Company"] = "company";
    HRISDepartmentValue["Division"] = "division";
    HRISDepartmentValue["Group"] = "group";
    HRISDepartmentValue["Project"] = "project";
    HRISDepartmentValue["Team"] = "team";
    HRISDepartmentValue["UnmappedValue"] = "unmapped_value";
})(HRISDepartmentValue || (exports.HRISDepartmentValue = HRISDepartmentValue = {}));
/** @internal */
exports.HRISDepartment4$inboundSchema = z.object({});
/** @internal */
exports.HRISDepartment4$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 HRISDepartment4$;
(function (HRISDepartment4$) {
    /** @deprecated use `HRISDepartment4$inboundSchema` instead. */
    HRISDepartment4$.inboundSchema = exports.HRISDepartment4$inboundSchema;
    /** @deprecated use `HRISDepartment4$outboundSchema` instead. */
    HRISDepartment4$.outboundSchema = exports.HRISDepartment4$outboundSchema;
})(HRISDepartment4$ || (exports.HRISDepartment4$ = HRISDepartment4$ = {}));
function hrisDepartment4ToJSON(hrisDepartment4) {
    return JSON.stringify(exports.HRISDepartment4$outboundSchema.parse(hrisDepartment4));
}
exports.hrisDepartment4ToJSON = hrisDepartment4ToJSON;
function hrisDepartment4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDepartment4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDepartment4' from JSON`);
}
exports.hrisDepartment4FromJSON = hrisDepartment4FromJSON;
/** @internal */
exports.HRISDepartmentSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.HRISDepartment4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.HRISDepartmentSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.HRISDepartment4$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 HRISDepartmentSourceValue$;
(function (HRISDepartmentSourceValue$) {
    /** @deprecated use `HRISDepartmentSourceValue$inboundSchema` instead. */
    HRISDepartmentSourceValue$.inboundSchema = exports.HRISDepartmentSourceValue$inboundSchema;
    /** @deprecated use `HRISDepartmentSourceValue$outboundSchema` instead. */
    HRISDepartmentSourceValue$.outboundSchema = exports.HRISDepartmentSourceValue$outboundSchema;
})(HRISDepartmentSourceValue$ || (exports.HRISDepartmentSourceValue$ = HRISDepartmentSourceValue$ = {}));
function hrisDepartmentSourceValueToJSON(hrisDepartmentSourceValue) {
    return JSON.stringify(exports.HRISDepartmentSourceValue$outboundSchema.parse(hrisDepartmentSourceValue));
}
exports.hrisDepartmentSourceValueToJSON = hrisDepartmentSourceValueToJSON;
function hrisDepartmentSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDepartmentSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDepartmentSourceValue' from JSON`);
}
exports.hrisDepartmentSourceValueFromJSON = hrisDepartmentSourceValueFromJSON;
/** @internal */
exports.HRISDepartmentValue$inboundSchema = z
    .union([
    z.nativeEnum(HRISDepartmentValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HRISDepartmentValue$outboundSchema = z.union([
    z.nativeEnum(HRISDepartmentValue),
    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 HRISDepartmentValue$;
(function (HRISDepartmentValue$) {
    /** @deprecated use `HRISDepartmentValue$inboundSchema` instead. */
    HRISDepartmentValue$.inboundSchema = exports.HRISDepartmentValue$inboundSchema;
    /** @deprecated use `HRISDepartmentValue$outboundSchema` instead. */
    HRISDepartmentValue$.outboundSchema = exports.HRISDepartmentValue$outboundSchema;
})(HRISDepartmentValue$ || (exports.HRISDepartmentValue$ = HRISDepartmentValue$ = {}));
/** @internal */
exports.HRISDepartmentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.HRISDepartment4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISDepartmentValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HRISDepartmentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.HRISDepartment4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISDepartmentValue$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 HRISDepartmentType$;
(function (HRISDepartmentType$) {
    /** @deprecated use `HRISDepartmentType$inboundSchema` instead. */
    HRISDepartmentType$.inboundSchema = exports.HRISDepartmentType$inboundSchema;
    /** @deprecated use `HRISDepartmentType$outboundSchema` instead. */
    HRISDepartmentType$.outboundSchema = exports.HRISDepartmentType$outboundSchema;
})(HRISDepartmentType$ || (exports.HRISDepartmentType$ = HRISDepartmentType$ = {}));
function hrisDepartmentTypeToJSON(hrisDepartmentType) {
    return JSON.stringify(exports.HRISDepartmentType$outboundSchema.parse(hrisDepartmentType));
}
exports.hrisDepartmentTypeToJSON = hrisDepartmentTypeToJSON;
function hrisDepartmentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDepartmentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDepartmentType' from JSON`);
}
exports.hrisDepartmentTypeFromJSON = hrisDepartmentTypeFromJSON;
/** @internal */
exports.HRISDepartment$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.HRISDepartmentType$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.HRISDepartment$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.HRISDepartmentType$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 HRISDepartment$;
(function (HRISDepartment$) {
    /** @deprecated use `HRISDepartment$inboundSchema` instead. */
    HRISDepartment$.inboundSchema = exports.HRISDepartment$inboundSchema;
    /** @deprecated use `HRISDepartment$outboundSchema` instead. */
    HRISDepartment$.outboundSchema = exports.HRISDepartment$outboundSchema;
})(HRISDepartment$ || (exports.HRISDepartment$ = HRISDepartment$ = {}));
function hrisDepartmentToJSON(hrisDepartment) {
    return JSON.stringify(exports.HRISDepartment$outboundSchema.parse(hrisDepartment));
}
exports.hrisDepartmentToJSON = hrisDepartmentToJSON;
function hrisDepartmentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISDepartment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISDepartment' from JSON`);
}
exports.hrisDepartmentFromJSON = hrisDepartmentFromJSON;
//# sourceMappingURL=hrisdepartment.js.map