"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.User$inboundSchema = void 0;
exports.userFromJSON = userFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const types = __importStar(require("../../types/primitives.js"));
const address_js_1 = require("./address.js");
const email_js_1 = require("./email.js");
const passthroughbody_js_1 = require("./passthroughbody.js");
const phonenumber_js_1 = require("./phonenumber.js");
/** @internal */
exports.User$inboundSchema = z
    .object({
    id: types.optional(types.string()),
    parent_id: z.nullable(types.string()).optional(),
    username: z.nullable(types.string()).optional(),
    first_name: z.nullable(types.string()).optional(),
    last_name: z.nullable(types.string()).optional(),
    title: z.nullable(types.string()).optional(),
    division: z.nullable(types.string()).optional(),
    department: z.nullable(types.string()).optional(),
    company_name: z.nullable(types.string()).optional(),
    employee_number: z.nullable(types.string()).optional(),
    description: z.nullable(types.string()).optional(),
    image: z.nullable(types.string()).optional(),
    language: z.nullable(types.string()).optional(),
    status: z.nullable(types.string()).optional(),
    addresses: types.optional(z.array(address_js_1.Address$inboundSchema)),
    phone_numbers: types.optional(z.array(phonenumber_js_1.PhoneNumber$inboundSchema)),
    emails: z.array(email_js_1.Email$inboundSchema),
    custom_mappings: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(types.string()).optional(),
    created_at: z.nullable(types.string()).optional(),
    pass_through: types.optional(z.array(passthroughbody_js_1.PassThroughBody$inboundSchema)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "parent_id": "parentId",
        "first_name": "firstName",
        "last_name": "lastName",
        "company_name": "companyName",
        "employee_number": "employeeNumber",
        "phone_numbers": "phoneNumbers",
        "custom_mappings": "customMappings",
        "updated_at": "updatedAt",
        "created_at": "createdAt",
        "pass_through": "passThrough",
    });
});
function userFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.User$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'User' from JSON`);
}
//# sourceMappingURL=user.js.map