"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.hrisGroupFromJSON = exports.hrisGroupToJSON = exports.HRISGroup$ = exports.HRISGroup$outboundSchema = exports.HRISGroup$inboundSchema = exports.hrisGroupTypeFromJSON = exports.hrisGroupTypeToJSON = exports.HRISGroupType$ = exports.HRISGroupType$outboundSchema = exports.HRISGroupType$inboundSchema = exports.HRISGroupValue$ = exports.HRISGroupValue$outboundSchema = exports.HRISGroupValue$inboundSchema = exports.hrisGroupSourceValueFromJSON = exports.hrisGroupSourceValueToJSON = exports.HRISGroupSourceValue$ = exports.HRISGroupSourceValue$outboundSchema = exports.HRISGroupSourceValue$inboundSchema = exports.hrisGroup4FromJSON = exports.hrisGroup4ToJSON = exports.HRISGroup4$ = exports.HRISGroup4$outboundSchema = exports.HRISGroup4$inboundSchema = exports.HRISGroupValue = 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 HRISGroupValue;
(function (HRISGroupValue) {
    HRISGroupValue["Workspace"] = "workspace";
    HRISGroupValue["Team"] = "team";
    HRISGroupValue["Department"] = "department";
    HRISGroupValue["Group"] = "group";
    HRISGroupValue["Organization"] = "organization";
    HRISGroupValue["UnmappedValue"] = "unmapped_value";
    HRISGroupValue["CostCenter"] = "cost_center";
})(HRISGroupValue || (exports.HRISGroupValue = HRISGroupValue = {}));
/** @internal */
exports.HRISGroup4$inboundSchema = z.object({});
/** @internal */
exports.HRISGroup4$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 HRISGroup4$;
(function (HRISGroup4$) {
    /** @deprecated use `HRISGroup4$inboundSchema` instead. */
    HRISGroup4$.inboundSchema = exports.HRISGroup4$inboundSchema;
    /** @deprecated use `HRISGroup4$outboundSchema` instead. */
    HRISGroup4$.outboundSchema = exports.HRISGroup4$outboundSchema;
})(HRISGroup4$ || (exports.HRISGroup4$ = HRISGroup4$ = {}));
function hrisGroup4ToJSON(hrisGroup4) {
    return JSON.stringify(exports.HRISGroup4$outboundSchema.parse(hrisGroup4));
}
exports.hrisGroup4ToJSON = hrisGroup4ToJSON;
function hrisGroup4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISGroup4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISGroup4' from JSON`);
}
exports.hrisGroup4FromJSON = hrisGroup4FromJSON;
/** @internal */
exports.HRISGroupSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.HRISGroup4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.HRISGroupSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.HRISGroup4$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 HRISGroupSourceValue$;
(function (HRISGroupSourceValue$) {
    /** @deprecated use `HRISGroupSourceValue$inboundSchema` instead. */
    HRISGroupSourceValue$.inboundSchema = exports.HRISGroupSourceValue$inboundSchema;
    /** @deprecated use `HRISGroupSourceValue$outboundSchema` instead. */
    HRISGroupSourceValue$.outboundSchema = exports.HRISGroupSourceValue$outboundSchema;
})(HRISGroupSourceValue$ || (exports.HRISGroupSourceValue$ = HRISGroupSourceValue$ = {}));
function hrisGroupSourceValueToJSON(hrisGroupSourceValue) {
    return JSON.stringify(exports.HRISGroupSourceValue$outboundSchema.parse(hrisGroupSourceValue));
}
exports.hrisGroupSourceValueToJSON = hrisGroupSourceValueToJSON;
function hrisGroupSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISGroupSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISGroupSourceValue' from JSON`);
}
exports.hrisGroupSourceValueFromJSON = hrisGroupSourceValueFromJSON;
/** @internal */
exports.HRISGroupValue$inboundSchema = z
    .union([
    z.nativeEnum(HRISGroupValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HRISGroupValue$outboundSchema = z.union([
    z.nativeEnum(HRISGroupValue),
    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 HRISGroupValue$;
(function (HRISGroupValue$) {
    /** @deprecated use `HRISGroupValue$inboundSchema` instead. */
    HRISGroupValue$.inboundSchema = exports.HRISGroupValue$inboundSchema;
    /** @deprecated use `HRISGroupValue$outboundSchema` instead. */
    HRISGroupValue$.outboundSchema = exports.HRISGroupValue$outboundSchema;
})(HRISGroupValue$ || (exports.HRISGroupValue$ = HRISGroupValue$ = {}));
/** @internal */
exports.HRISGroupType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.HRISGroup4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISGroupValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HRISGroupType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.HRISGroup4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISGroupValue$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 HRISGroupType$;
(function (HRISGroupType$) {
    /** @deprecated use `HRISGroupType$inboundSchema` instead. */
    HRISGroupType$.inboundSchema = exports.HRISGroupType$inboundSchema;
    /** @deprecated use `HRISGroupType$outboundSchema` instead. */
    HRISGroupType$.outboundSchema = exports.HRISGroupType$outboundSchema;
})(HRISGroupType$ || (exports.HRISGroupType$ = HRISGroupType$ = {}));
function hrisGroupTypeToJSON(hrisGroupType) {
    return JSON.stringify(exports.HRISGroupType$outboundSchema.parse(hrisGroupType));
}
exports.hrisGroupTypeToJSON = hrisGroupTypeToJSON;
function hrisGroupTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISGroupType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISGroupType' from JSON`);
}
exports.hrisGroupTypeFromJSON = hrisGroupTypeFromJSON;
/** @internal */
exports.HRISGroup$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.HRISGroupType$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.HRISGroup$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.HRISGroupType$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 HRISGroup$;
(function (HRISGroup$) {
    /** @deprecated use `HRISGroup$inboundSchema` instead. */
    HRISGroup$.inboundSchema = exports.HRISGroup$inboundSchema;
    /** @deprecated use `HRISGroup$outboundSchema` instead. */
    HRISGroup$.outboundSchema = exports.HRISGroup$outboundSchema;
})(HRISGroup$ || (exports.HRISGroup$ = HRISGroup$ = {}));
function hrisGroupToJSON(hrisGroup) {
    return JSON.stringify(exports.HRISGroup$outboundSchema.parse(hrisGroup));
}
exports.hrisGroupToJSON = hrisGroupToJSON;
function hrisGroupFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISGroup' from JSON`);
}
exports.hrisGroupFromJSON = hrisGroupFromJSON;
//# sourceMappingURL=hrisgroup.js.map