"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.MessagingAttachmentResult$ = exports.MessagingAttachmentResult$outboundSchema = exports.MessagingAttachmentResult$inboundSchema = exports.MessagingAttachmentResultData$ = exports.MessagingAttachmentResultData$outboundSchema = exports.MessagingAttachmentResultData$inboundSchema = void 0;
exports.messagingAttachmentResultDataToJSON = messagingAttachmentResultDataToJSON;
exports.messagingAttachmentResultDataFromJSON = messagingAttachmentResultDataFromJSON;
exports.messagingAttachmentResultToJSON = messagingAttachmentResultToJSON;
exports.messagingAttachmentResultFromJSON = messagingAttachmentResultFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const rawresponse_js_1 = require("./rawresponse.js");
/** @internal */
exports.MessagingAttachmentResultData$inboundSchema = z.object({
    file_name: z.nullable(z.string()).optional(),
    file_size: z.nullable(z.number()).optional(),
    file_type: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "file_name": "fileName",
        "file_size": "fileSize",
        "file_type": "fileType",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.MessagingAttachmentResultData$outboundSchema = z.object({
    fileName: z.nullable(z.string()).optional(),
    fileSize: z.nullable(z.number()).optional(),
    fileType: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        fileName: "file_name",
        fileSize: "file_size",
        fileType: "file_type",
        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 MessagingAttachmentResultData$;
(function (MessagingAttachmentResultData$) {
    /** @deprecated use `MessagingAttachmentResultData$inboundSchema` instead. */
    MessagingAttachmentResultData$.inboundSchema = exports.MessagingAttachmentResultData$inboundSchema;
    /** @deprecated use `MessagingAttachmentResultData$outboundSchema` instead. */
    MessagingAttachmentResultData$.outboundSchema = exports.MessagingAttachmentResultData$outboundSchema;
})(MessagingAttachmentResultData$ || (exports.MessagingAttachmentResultData$ = MessagingAttachmentResultData$ = {}));
function messagingAttachmentResultDataToJSON(messagingAttachmentResultData) {
    return JSON.stringify(exports.MessagingAttachmentResultData$outboundSchema.parse(messagingAttachmentResultData));
}
function messagingAttachmentResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingAttachmentResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingAttachmentResultData' from JSON`);
}
/** @internal */
exports.MessagingAttachmentResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.MessagingAttachmentResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.MessagingAttachmentResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.MessagingAttachmentResultData$outboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingAttachmentResult$;
(function (MessagingAttachmentResult$) {
    /** @deprecated use `MessagingAttachmentResult$inboundSchema` instead. */
    MessagingAttachmentResult$.inboundSchema = exports.MessagingAttachmentResult$inboundSchema;
    /** @deprecated use `MessagingAttachmentResult$outboundSchema` instead. */
    MessagingAttachmentResult$.outboundSchema = exports.MessagingAttachmentResult$outboundSchema;
})(MessagingAttachmentResult$ || (exports.MessagingAttachmentResult$ = MessagingAttachmentResult$ = {}));
function messagingAttachmentResultToJSON(messagingAttachmentResult) {
    return JSON.stringify(exports.MessagingAttachmentResult$outboundSchema.parse(messagingAttachmentResult));
}
function messagingAttachmentResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingAttachmentResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingAttachmentResult' from JSON`);
}
//# sourceMappingURL=messagingattachmentresult.js.map