"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.IamUpdateUserRequestDto$outboundSchema = exports.IamUpdateUserRequestDtoStatus$outboundSchema = exports.IamUpdateUserRequestDtoValue$outboundSchema = exports.IamUpdateUserRequestDtoSourceValue$outboundSchema = exports.IamUpdateUserRequestDto4$outboundSchema = exports.IsBotUser$outboundSchema = exports.IamUpdateUserRequestDto2$outboundSchema = exports.IamUpdateUserRequestDtoValue = exports.IamUpdateUserRequestDto2 = void 0;
exports.isBotUserToJSON = isBotUserToJSON;
exports.iamUpdateUserRequestDto4ToJSON = iamUpdateUserRequestDto4ToJSON;
exports.iamUpdateUserRequestDtoSourceValueToJSON = iamUpdateUserRequestDtoSourceValueToJSON;
exports.iamUpdateUserRequestDtoStatusToJSON = iamUpdateUserRequestDtoStatusToJSON;
exports.iamUpdateUserRequestDtoToJSON = iamUpdateUserRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(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$outboundSchema = z.nativeEnum(IamUpdateUserRequestDto2);
/** @internal */
exports.IsBotUser$outboundSchema = z.union([z.boolean(), exports.IamUpdateUserRequestDto2$outboundSchema]);
function isBotUserToJSON(isBotUser) {
    return JSON.stringify(exports.IsBotUser$outboundSchema.parse(isBotUser));
}
/** @internal */
exports.IamUpdateUserRequestDto4$outboundSchema = z.object({});
function iamUpdateUserRequestDto4ToJSON(iamUpdateUserRequestDto4) {
    return JSON.stringify(exports.IamUpdateUserRequestDto4$outboundSchema.parse(iamUpdateUserRequestDto4));
}
/** @internal */
exports.IamUpdateUserRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.IamUpdateUserRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function iamUpdateUserRequestDtoSourceValueToJSON(iamUpdateUserRequestDtoSourceValue) {
    return JSON.stringify(exports.IamUpdateUserRequestDtoSourceValue$outboundSchema.parse(iamUpdateUserRequestDtoSourceValue));
}
/** @internal */
exports.IamUpdateUserRequestDtoValue$outboundSchema = openEnums.outboundSchema(IamUpdateUserRequestDtoValue);
/** @internal */
exports.IamUpdateUserRequestDtoStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.IamUpdateUserRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.IamUpdateUserRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function iamUpdateUserRequestDtoStatusToJSON(iamUpdateUserRequestDtoStatus) {
    return JSON.stringify(exports.IamUpdateUserRequestDtoStatus$outboundSchema.parse(iamUpdateUserRequestDtoStatus));
}
/** @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",
    });
});
function iamUpdateUserRequestDtoToJSON(iamUpdateUserRequestDto) {
    return JSON.stringify(exports.IamUpdateUserRequestDto$outboundSchema.parse(iamUpdateUserRequestDto));
}
//# sourceMappingURL=iamupdateuserrequestdto.js.map