"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.iamUpdateUserRequestDtoFromJSON = exports.iamUpdateUserRequestDtoToJSON = exports.IamUpdateUserRequestDto$ = exports.IamUpdateUserRequestDto$outboundSchema = exports.IamUpdateUserRequestDto$inboundSchema = exports.iamUpdateUserRequestDtoStatusFromJSON = exports.iamUpdateUserRequestDtoStatusToJSON = exports.IamUpdateUserRequestDtoStatus$ = exports.IamUpdateUserRequestDtoStatus$outboundSchema = exports.IamUpdateUserRequestDtoStatus$inboundSchema = exports.IamUpdateUserRequestDtoValue$ = exports.IamUpdateUserRequestDtoValue$outboundSchema = exports.IamUpdateUserRequestDtoValue$inboundSchema = exports.iamUpdateUserRequestDtoSourceValueFromJSON = exports.iamUpdateUserRequestDtoSourceValueToJSON = exports.IamUpdateUserRequestDtoSourceValue$ = exports.IamUpdateUserRequestDtoSourceValue$outboundSchema = exports.IamUpdateUserRequestDtoSourceValue$inboundSchema = exports.iamUpdateUserRequestDto4FromJSON = exports.iamUpdateUserRequestDto4ToJSON = exports.IamUpdateUserRequestDto4$ = exports.IamUpdateUserRequestDto4$outboundSchema = exports.IamUpdateUserRequestDto4$inboundSchema = exports.isBotUserFromJSON = exports.isBotUserToJSON = exports.IsBotUser$ = exports.IsBotUser$outboundSchema = exports.IsBotUser$inboundSchema = exports.IamUpdateUserRequestDto2$ = exports.IamUpdateUserRequestDto2$outboundSchema = exports.IamUpdateUserRequestDto2$inboundSchema = exports.IamUpdateUserRequestDtoValue = exports.IamUpdateUserRequestDto2 = 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 IamUpdateUserRequestDto2;
(function (IamUpdateUserRequestDto2) {
    IamUpdateUserRequestDto2["True"] = "true";
    IamUpdateUserRequestDto2["False"] = "false";
})(IamUpdateUserRequestDto2 || (exports.IamUpdateUserRequestDto2 = IamUpdateUserRequestDto2 = {}));
/**
 * The status of the user, e.g. whether the user is enabled, has been disabled (eg. by an admin), or is pending (ie: awaiting approval by the user or an admin).
 */
var IamUpdateUserRequestDtoValue;
(function (IamUpdateUserRequestDtoValue) {
    IamUpdateUserRequestDtoValue["Enabled"] = "enabled";
    IamUpdateUserRequestDtoValue["Disabled"] = "disabled";
    IamUpdateUserRequestDtoValue["Pending"] = "pending";
    IamUpdateUserRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(IamUpdateUserRequestDtoValue || (exports.IamUpdateUserRequestDtoValue = IamUpdateUserRequestDtoValue = {}));
/** @internal */
exports.IamUpdateUserRequestDto2$inboundSchema = z.nativeEnum(IamUpdateUserRequestDto2);
/** @internal */
exports.IamUpdateUserRequestDto2$outboundSchema = exports.IamUpdateUserRequestDto2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var IamUpdateUserRequestDto2$;
(function (IamUpdateUserRequestDto2$) {
    /** @deprecated use `IamUpdateUserRequestDto2$inboundSchema` instead. */
    IamUpdateUserRequestDto2$.inboundSchema = exports.IamUpdateUserRequestDto2$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDto2$outboundSchema` instead. */
    IamUpdateUserRequestDto2$.outboundSchema = exports.IamUpdateUserRequestDto2$outboundSchema;
})(IamUpdateUserRequestDto2$ || (exports.IamUpdateUserRequestDto2$ = IamUpdateUserRequestDto2$ = {}));
/** @internal */
exports.IsBotUser$inboundSchema = z.union([z.boolean(), exports.IamUpdateUserRequestDto2$inboundSchema]);
/** @internal */
exports.IsBotUser$outboundSchema = z.union([z.boolean(), exports.IamUpdateUserRequestDto2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var IsBotUser$;
(function (IsBotUser$) {
    /** @deprecated use `IsBotUser$inboundSchema` instead. */
    IsBotUser$.inboundSchema = exports.IsBotUser$inboundSchema;
    /** @deprecated use `IsBotUser$outboundSchema` instead. */
    IsBotUser$.outboundSchema = exports.IsBotUser$outboundSchema;
})(IsBotUser$ || (exports.IsBotUser$ = IsBotUser$ = {}));
function isBotUserToJSON(isBotUser) {
    return JSON.stringify(exports.IsBotUser$outboundSchema.parse(isBotUser));
}
exports.isBotUserToJSON = isBotUserToJSON;
function isBotUserFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IsBotUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IsBotUser' from JSON`);
}
exports.isBotUserFromJSON = isBotUserFromJSON;
/** @internal */
exports.IamUpdateUserRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.IamUpdateUserRequestDto4$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 IamUpdateUserRequestDto4$;
(function (IamUpdateUserRequestDto4$) {
    /** @deprecated use `IamUpdateUserRequestDto4$inboundSchema` instead. */
    IamUpdateUserRequestDto4$.inboundSchema = exports.IamUpdateUserRequestDto4$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDto4$outboundSchema` instead. */
    IamUpdateUserRequestDto4$.outboundSchema = exports.IamUpdateUserRequestDto4$outboundSchema;
})(IamUpdateUserRequestDto4$ || (exports.IamUpdateUserRequestDto4$ = IamUpdateUserRequestDto4$ = {}));
function iamUpdateUserRequestDto4ToJSON(iamUpdateUserRequestDto4) {
    return JSON.stringify(exports.IamUpdateUserRequestDto4$outboundSchema.parse(iamUpdateUserRequestDto4));
}
exports.iamUpdateUserRequestDto4ToJSON = iamUpdateUserRequestDto4ToJSON;
function iamUpdateUserRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IamUpdateUserRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IamUpdateUserRequestDto4' from JSON`);
}
exports.iamUpdateUserRequestDto4FromJSON = iamUpdateUserRequestDto4FromJSON;
/** @internal */
exports.IamUpdateUserRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.IamUpdateUserRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.IamUpdateUserRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.IamUpdateUserRequestDto4$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 IamUpdateUserRequestDtoSourceValue$;
(function (IamUpdateUserRequestDtoSourceValue$) {
    /** @deprecated use `IamUpdateUserRequestDtoSourceValue$inboundSchema` instead. */
    IamUpdateUserRequestDtoSourceValue$.inboundSchema = exports.IamUpdateUserRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDtoSourceValue$outboundSchema` instead. */
    IamUpdateUserRequestDtoSourceValue$.outboundSchema = exports.IamUpdateUserRequestDtoSourceValue$outboundSchema;
})(IamUpdateUserRequestDtoSourceValue$ || (exports.IamUpdateUserRequestDtoSourceValue$ = IamUpdateUserRequestDtoSourceValue$ = {}));
function iamUpdateUserRequestDtoSourceValueToJSON(iamUpdateUserRequestDtoSourceValue) {
    return JSON.stringify(exports.IamUpdateUserRequestDtoSourceValue$outboundSchema.parse(iamUpdateUserRequestDtoSourceValue));
}
exports.iamUpdateUserRequestDtoSourceValueToJSON = iamUpdateUserRequestDtoSourceValueToJSON;
function iamUpdateUserRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IamUpdateUserRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IamUpdateUserRequestDtoSourceValue' from JSON`);
}
exports.iamUpdateUserRequestDtoSourceValueFromJSON = iamUpdateUserRequestDtoSourceValueFromJSON;
/** @internal */
exports.IamUpdateUserRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(IamUpdateUserRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.IamUpdateUserRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(IamUpdateUserRequestDtoValue),
    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 IamUpdateUserRequestDtoValue$;
(function (IamUpdateUserRequestDtoValue$) {
    /** @deprecated use `IamUpdateUserRequestDtoValue$inboundSchema` instead. */
    IamUpdateUserRequestDtoValue$.inboundSchema = exports.IamUpdateUserRequestDtoValue$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDtoValue$outboundSchema` instead. */
    IamUpdateUserRequestDtoValue$.outboundSchema = exports.IamUpdateUserRequestDtoValue$outboundSchema;
})(IamUpdateUserRequestDtoValue$ || (exports.IamUpdateUserRequestDtoValue$ = IamUpdateUserRequestDtoValue$ = {}));
/** @internal */
exports.IamUpdateUserRequestDtoStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.IamUpdateUserRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.IamUpdateUserRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.IamUpdateUserRequestDtoStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.IamUpdateUserRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.IamUpdateUserRequestDtoValue$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 IamUpdateUserRequestDtoStatus$;
(function (IamUpdateUserRequestDtoStatus$) {
    /** @deprecated use `IamUpdateUserRequestDtoStatus$inboundSchema` instead. */
    IamUpdateUserRequestDtoStatus$.inboundSchema = exports.IamUpdateUserRequestDtoStatus$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDtoStatus$outboundSchema` instead. */
    IamUpdateUserRequestDtoStatus$.outboundSchema = exports.IamUpdateUserRequestDtoStatus$outboundSchema;
})(IamUpdateUserRequestDtoStatus$ || (exports.IamUpdateUserRequestDtoStatus$ = IamUpdateUserRequestDtoStatus$ = {}));
function iamUpdateUserRequestDtoStatusToJSON(iamUpdateUserRequestDtoStatus) {
    return JSON.stringify(exports.IamUpdateUserRequestDtoStatus$outboundSchema.parse(iamUpdateUserRequestDtoStatus));
}
exports.iamUpdateUserRequestDtoStatusToJSON = iamUpdateUserRequestDtoStatusToJSON;
function iamUpdateUserRequestDtoStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IamUpdateUserRequestDtoStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IamUpdateUserRequestDtoStatus' from JSON`);
}
exports.iamUpdateUserRequestDtoStatusFromJSON = iamUpdateUserRequestDtoStatusFromJSON;
/** @internal */
exports.IamUpdateUserRequestDto$inboundSchema = z.object({
    first_name: z.nullable(z.string()).optional(),
    is_bot_user: z.nullable(z.union([z.boolean(), exports.IamUpdateUserRequestDto2$inboundSchema])).optional(),
    last_name: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    primary_email_address: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.IamUpdateUserRequestDtoStatus$inboundSchema))
        .optional(),
    username: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "first_name": "firstName",
        "is_bot_user": "isBotUser",
        "last_name": "lastName",
        "primary_email_address": "primaryEmailAddress",
    });
});
/** @internal */
exports.IamUpdateUserRequestDto$outboundSchema = z.object({
    firstName: z.nullable(z.string()).optional(),
    isBotUser: z.nullable(z.union([z.boolean(), exports.IamUpdateUserRequestDto2$outboundSchema])).optional(),
    lastName: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    primaryEmailAddress: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.IamUpdateUserRequestDtoStatus$outboundSchema))
        .optional(),
    username: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        firstName: "first_name",
        isBotUser: "is_bot_user",
        lastName: "last_name",
        primaryEmailAddress: "primary_email_address",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var IamUpdateUserRequestDto$;
(function (IamUpdateUserRequestDto$) {
    /** @deprecated use `IamUpdateUserRequestDto$inboundSchema` instead. */
    IamUpdateUserRequestDto$.inboundSchema = exports.IamUpdateUserRequestDto$inboundSchema;
    /** @deprecated use `IamUpdateUserRequestDto$outboundSchema` instead. */
    IamUpdateUserRequestDto$.outboundSchema = exports.IamUpdateUserRequestDto$outboundSchema;
})(IamUpdateUserRequestDto$ || (exports.IamUpdateUserRequestDto$ = IamUpdateUserRequestDto$ = {}));
function iamUpdateUserRequestDtoToJSON(iamUpdateUserRequestDto) {
    return JSON.stringify(exports.IamUpdateUserRequestDto$outboundSchema.parse(iamUpdateUserRequestDto));
}
exports.iamUpdateUserRequestDtoToJSON = iamUpdateUserRequestDtoToJSON;
function iamUpdateUserRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IamUpdateUserRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IamUpdateUserRequestDto' from JSON`);
}
exports.iamUpdateUserRequestDtoFromJSON = iamUpdateUserRequestDtoFromJSON;
//# sourceMappingURL=iamupdateuserrequestdto.js.map