"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.employmentManagerApiModelFromJSON = exports.employmentManagerApiModelToJSON = exports.EmploymentManagerApiModel$ = exports.EmploymentManagerApiModel$outboundSchema = exports.EmploymentManagerApiModel$inboundSchema = exports.roleFromJSON = exports.roleToJSON = exports.Role$ = exports.Role$outboundSchema = exports.Role$inboundSchema = exports.roleTypeFromJSON = exports.roleTypeToJSON = exports.RoleType$ = exports.RoleType$outboundSchema = exports.RoleType$inboundSchema = exports.EmploymentManagerApiModelValue$ = exports.EmploymentManagerApiModelValue$outboundSchema = exports.EmploymentManagerApiModelValue$inboundSchema = exports.employmentManagerApiModelSourceValueFromJSON = exports.employmentManagerApiModelSourceValueToJSON = exports.EmploymentManagerApiModelSourceValue$ = exports.EmploymentManagerApiModelSourceValue$outboundSchema = exports.EmploymentManagerApiModelSourceValue$inboundSchema = exports.employmentManagerApiModel4FromJSON = exports.employmentManagerApiModel4ToJSON = exports.EmploymentManagerApiModel4$ = exports.EmploymentManagerApiModel4$outboundSchema = exports.EmploymentManagerApiModel4$inboundSchema = exports.EmploymentManagerApiModelValue = 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 EmploymentManagerApiModelValue;
(function (EmploymentManagerApiModelValue) {
    EmploymentManagerApiModelValue["Admin"] = "admin";
    EmploymentManagerApiModelValue["Viewer"] = "viewer";
    EmploymentManagerApiModelValue["Editor"] = "editor";
    EmploymentManagerApiModelValue["Basic"] = "basic";
    EmploymentManagerApiModelValue["Guest"] = "guest";
    EmploymentManagerApiModelValue["Unassigned"] = "unassigned";
    EmploymentManagerApiModelValue["Restricted"] = "restricted";
    EmploymentManagerApiModelValue["UnmappedValue"] = "unmapped_value";
})(EmploymentManagerApiModelValue || (exports.EmploymentManagerApiModelValue = EmploymentManagerApiModelValue = {}));
/** @internal */
exports.EmploymentManagerApiModel4$inboundSchema = z.object({});
/** @internal */
exports.EmploymentManagerApiModel4$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 EmploymentManagerApiModel4$;
(function (EmploymentManagerApiModel4$) {
    /** @deprecated use `EmploymentManagerApiModel4$inboundSchema` instead. */
    EmploymentManagerApiModel4$.inboundSchema = exports.EmploymentManagerApiModel4$inboundSchema;
    /** @deprecated use `EmploymentManagerApiModel4$outboundSchema` instead. */
    EmploymentManagerApiModel4$.outboundSchema = exports.EmploymentManagerApiModel4$outboundSchema;
})(EmploymentManagerApiModel4$ || (exports.EmploymentManagerApiModel4$ = EmploymentManagerApiModel4$ = {}));
function employmentManagerApiModel4ToJSON(employmentManagerApiModel4) {
    return JSON.stringify(exports.EmploymentManagerApiModel4$outboundSchema.parse(employmentManagerApiModel4));
}
exports.employmentManagerApiModel4ToJSON = employmentManagerApiModel4ToJSON;
function employmentManagerApiModel4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentManagerApiModel4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentManagerApiModel4' from JSON`);
}
exports.employmentManagerApiModel4FromJSON = employmentManagerApiModel4FromJSON;
/** @internal */
exports.EmploymentManagerApiModelSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.EmploymentManagerApiModel4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.EmploymentManagerApiModelSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.EmploymentManagerApiModel4$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 EmploymentManagerApiModelSourceValue$;
(function (EmploymentManagerApiModelSourceValue$) {
    /** @deprecated use `EmploymentManagerApiModelSourceValue$inboundSchema` instead. */
    EmploymentManagerApiModelSourceValue$.inboundSchema = exports.EmploymentManagerApiModelSourceValue$inboundSchema;
    /** @deprecated use `EmploymentManagerApiModelSourceValue$outboundSchema` instead. */
    EmploymentManagerApiModelSourceValue$.outboundSchema = exports.EmploymentManagerApiModelSourceValue$outboundSchema;
})(EmploymentManagerApiModelSourceValue$ || (exports.EmploymentManagerApiModelSourceValue$ = EmploymentManagerApiModelSourceValue$ = {}));
function employmentManagerApiModelSourceValueToJSON(employmentManagerApiModelSourceValue) {
    return JSON.stringify(exports.EmploymentManagerApiModelSourceValue$outboundSchema.parse(employmentManagerApiModelSourceValue));
}
exports.employmentManagerApiModelSourceValueToJSON = employmentManagerApiModelSourceValueToJSON;
function employmentManagerApiModelSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentManagerApiModelSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentManagerApiModelSourceValue' from JSON`);
}
exports.employmentManagerApiModelSourceValueFromJSON = employmentManagerApiModelSourceValueFromJSON;
/** @internal */
exports.EmploymentManagerApiModelValue$inboundSchema = z
    .union([
    z.nativeEnum(EmploymentManagerApiModelValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.EmploymentManagerApiModelValue$outboundSchema = z.union([
    z.nativeEnum(EmploymentManagerApiModelValue),
    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 EmploymentManagerApiModelValue$;
(function (EmploymentManagerApiModelValue$) {
    /** @deprecated use `EmploymentManagerApiModelValue$inboundSchema` instead. */
    EmploymentManagerApiModelValue$.inboundSchema = exports.EmploymentManagerApiModelValue$inboundSchema;
    /** @deprecated use `EmploymentManagerApiModelValue$outboundSchema` instead. */
    EmploymentManagerApiModelValue$.outboundSchema = exports.EmploymentManagerApiModelValue$outboundSchema;
})(EmploymentManagerApiModelValue$ || (exports.EmploymentManagerApiModelValue$ = EmploymentManagerApiModelValue$ = {}));
/** @internal */
exports.RoleType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.EmploymentManagerApiModel4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentManagerApiModelValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.RoleType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.EmploymentManagerApiModel4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.EmploymentManagerApiModelValue$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 RoleType$;
(function (RoleType$) {
    /** @deprecated use `RoleType$inboundSchema` instead. */
    RoleType$.inboundSchema = exports.RoleType$inboundSchema;
    /** @deprecated use `RoleType$outboundSchema` instead. */
    RoleType$.outboundSchema = exports.RoleType$outboundSchema;
})(RoleType$ || (exports.RoleType$ = RoleType$ = {}));
function roleTypeToJSON(roleType) {
    return JSON.stringify(exports.RoleType$outboundSchema.parse(roleType));
}
exports.roleTypeToJSON = roleTypeToJSON;
function roleTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RoleType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RoleType' from JSON`);
}
exports.roleTypeFromJSON = roleTypeFromJSON;
/** @internal */
exports.Role$inboundSchema = z
    .object({
    id: z.nullable(z.string()).optional(),
    label: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    role_type: z.nullable(z.lazy(() => exports.RoleType$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
        "role_type": "roleType",
    });
});
/** @internal */
exports.Role$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    label: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    roleType: z.nullable(z.lazy(() => exports.RoleType$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
        roleType: "role_type",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Role$;
(function (Role$) {
    /** @deprecated use `Role$inboundSchema` instead. */
    Role$.inboundSchema = exports.Role$inboundSchema;
    /** @deprecated use `Role$outboundSchema` instead. */
    Role$.outboundSchema = exports.Role$outboundSchema;
})(Role$ || (exports.Role$ = Role$ = {}));
function roleToJSON(role) {
    return JSON.stringify(exports.Role$outboundSchema.parse(role));
}
exports.roleToJSON = roleToJSON;
function roleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Role$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Role' from JSON`);
}
exports.roleFromJSON = roleFromJSON;
/** @internal */
exports.EmploymentManagerApiModel$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    role: z.nullable(z.lazy(() => exports.Role$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.EmploymentManagerApiModel$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    role: z.nullable(z.lazy(() => exports.Role$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var EmploymentManagerApiModel$;
(function (EmploymentManagerApiModel$) {
    /** @deprecated use `EmploymentManagerApiModel$inboundSchema` instead. */
    EmploymentManagerApiModel$.inboundSchema = exports.EmploymentManagerApiModel$inboundSchema;
    /** @deprecated use `EmploymentManagerApiModel$outboundSchema` instead. */
    EmploymentManagerApiModel$.outboundSchema = exports.EmploymentManagerApiModel$outboundSchema;
})(EmploymentManagerApiModel$ || (exports.EmploymentManagerApiModel$ = EmploymentManagerApiModel$ = {}));
function employmentManagerApiModelToJSON(employmentManagerApiModel) {
    return JSON.stringify(exports.EmploymentManagerApiModel$outboundSchema.parse(employmentManagerApiModel));
}
exports.employmentManagerApiModelToJSON = employmentManagerApiModelToJSON;
function employmentManagerApiModelFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EmploymentManagerApiModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmploymentManagerApiModel' from JSON`);
}
exports.employmentManagerApiModelFromJSON = employmentManagerApiModelFromJSON;
//# sourceMappingURL=employmentmanagerapimodel.js.map