"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.hrisTeamFromJSON = exports.hrisTeamToJSON = exports.HRISTeam$ = exports.HRISTeam$outboundSchema = exports.HRISTeam$inboundSchema = exports.hrisTeamTypeFromJSON = exports.hrisTeamTypeToJSON = exports.HRISTeamType$ = exports.HRISTeamType$outboundSchema = exports.HRISTeamType$inboundSchema = exports.HRISTeamValue$ = exports.HRISTeamValue$outboundSchema = exports.HRISTeamValue$inboundSchema = exports.hrisTeamSourceValueFromJSON = exports.hrisTeamSourceValueToJSON = exports.HRISTeamSourceValue$ = exports.HRISTeamSourceValue$outboundSchema = exports.HRISTeamSourceValue$inboundSchema = exports.hrisTeam4FromJSON = exports.hrisTeam4ToJSON = exports.HRISTeam4$ = exports.HRISTeam4$outboundSchema = exports.HRISTeam4$inboundSchema = exports.HRISTeamValue = 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 HRISTeamValue;
(function (HRISTeamValue) {
    HRISTeamValue["Team"] = "team";
    HRISTeamValue["UnmappedValue"] = "unmapped_value";
})(HRISTeamValue || (exports.HRISTeamValue = HRISTeamValue = {}));
/** @internal */
exports.HRISTeam4$inboundSchema = z.object({});
/** @internal */
exports.HRISTeam4$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 HRISTeam4$;
(function (HRISTeam4$) {
    /** @deprecated use `HRISTeam4$inboundSchema` instead. */
    HRISTeam4$.inboundSchema = exports.HRISTeam4$inboundSchema;
    /** @deprecated use `HRISTeam4$outboundSchema` instead. */
    HRISTeam4$.outboundSchema = exports.HRISTeam4$outboundSchema;
})(HRISTeam4$ || (exports.HRISTeam4$ = HRISTeam4$ = {}));
function hrisTeam4ToJSON(hrisTeam4) {
    return JSON.stringify(exports.HRISTeam4$outboundSchema.parse(hrisTeam4));
}
exports.hrisTeam4ToJSON = hrisTeam4ToJSON;
function hrisTeam4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISTeam4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISTeam4' from JSON`);
}
exports.hrisTeam4FromJSON = hrisTeam4FromJSON;
/** @internal */
exports.HRISTeamSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.HRISTeam4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.HRISTeamSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.HRISTeam4$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 HRISTeamSourceValue$;
(function (HRISTeamSourceValue$) {
    /** @deprecated use `HRISTeamSourceValue$inboundSchema` instead. */
    HRISTeamSourceValue$.inboundSchema = exports.HRISTeamSourceValue$inboundSchema;
    /** @deprecated use `HRISTeamSourceValue$outboundSchema` instead. */
    HRISTeamSourceValue$.outboundSchema = exports.HRISTeamSourceValue$outboundSchema;
})(HRISTeamSourceValue$ || (exports.HRISTeamSourceValue$ = HRISTeamSourceValue$ = {}));
function hrisTeamSourceValueToJSON(hrisTeamSourceValue) {
    return JSON.stringify(exports.HRISTeamSourceValue$outboundSchema.parse(hrisTeamSourceValue));
}
exports.hrisTeamSourceValueToJSON = hrisTeamSourceValueToJSON;
function hrisTeamSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISTeamSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISTeamSourceValue' from JSON`);
}
exports.hrisTeamSourceValueFromJSON = hrisTeamSourceValueFromJSON;
/** @internal */
exports.HRISTeamValue$inboundSchema = z
    .union([
    z.nativeEnum(HRISTeamValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.HRISTeamValue$outboundSchema = z.union([
    z.nativeEnum(HRISTeamValue),
    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 HRISTeamValue$;
(function (HRISTeamValue$) {
    /** @deprecated use `HRISTeamValue$inboundSchema` instead. */
    HRISTeamValue$.inboundSchema = exports.HRISTeamValue$inboundSchema;
    /** @deprecated use `HRISTeamValue$outboundSchema` instead. */
    HRISTeamValue$.outboundSchema = exports.HRISTeamValue$outboundSchema;
})(HRISTeamValue$ || (exports.HRISTeamValue$ = HRISTeamValue$ = {}));
/** @internal */
exports.HRISTeamType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.HRISTeam4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISTeamValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.HRISTeamType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.HRISTeam4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.HRISTeamValue$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 HRISTeamType$;
(function (HRISTeamType$) {
    /** @deprecated use `HRISTeamType$inboundSchema` instead. */
    HRISTeamType$.inboundSchema = exports.HRISTeamType$inboundSchema;
    /** @deprecated use `HRISTeamType$outboundSchema` instead. */
    HRISTeamType$.outboundSchema = exports.HRISTeamType$outboundSchema;
})(HRISTeamType$ || (exports.HRISTeamType$ = HRISTeamType$ = {}));
function hrisTeamTypeToJSON(hrisTeamType) {
    return JSON.stringify(exports.HRISTeamType$outboundSchema.parse(hrisTeamType));
}
exports.hrisTeamTypeToJSON = hrisTeamTypeToJSON;
function hrisTeamTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISTeamType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISTeamType' from JSON`);
}
exports.hrisTeamTypeFromJSON = hrisTeamTypeFromJSON;
/** @internal */
exports.HRISTeam$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.HRISTeamType$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.HRISTeam$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.HRISTeamType$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 HRISTeam$;
(function (HRISTeam$) {
    /** @deprecated use `HRISTeam$inboundSchema` instead. */
    HRISTeam$.inboundSchema = exports.HRISTeam$inboundSchema;
    /** @deprecated use `HRISTeam$outboundSchema` instead. */
    HRISTeam$.outboundSchema = exports.HRISTeam$outboundSchema;
})(HRISTeam$ || (exports.HRISTeam$ = HRISTeam$ = {}));
function hrisTeamToJSON(hrisTeam) {
    return JSON.stringify(exports.HRISTeam$outboundSchema.parse(hrisTeam));
}
exports.hrisTeamToJSON = hrisTeamToJSON;
function hrisTeamFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HRISTeam$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HRISTeam' from JSON`);
}
exports.hrisTeamFromJSON = hrisTeamFromJSON;
//# sourceMappingURL=hristeam.js.map