"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.ApplicationAttachment$inboundSchema = exports.ContentType$inboundSchema = exports.ApplicationAttachmentValue$inboundSchema = exports.ApplicationAttachmentSourceValue$inboundSchema = exports.ApplicationAttachment4$inboundSchema = exports.ApplicationAttachmentValue = void 0;
exports.applicationAttachment4FromJSON = applicationAttachment4FromJSON;
exports.applicationAttachmentSourceValueFromJSON = applicationAttachmentSourceValueFromJSON;
exports.contentTypeFromJSON = contentTypeFromJSON;
exports.applicationAttachmentFromJSON = applicationAttachmentFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const openEnums = __importStar(require("../../types/enums.js"));
/**
 * The content type of the attachment.
 */
var ApplicationAttachmentValue;
(function (ApplicationAttachmentValue) {
    ApplicationAttachmentValue["Text"] = "text";
    ApplicationAttachmentValue["Pdf"] = "pdf";
    ApplicationAttachmentValue["Video"] = "video";
    ApplicationAttachmentValue["Other"] = "other";
    ApplicationAttachmentValue["UnmappedValue"] = "unmapped_value";
})(ApplicationAttachmentValue || (exports.ApplicationAttachmentValue = ApplicationAttachmentValue = {}));
/** @internal */
exports.ApplicationAttachment4$inboundSchema = z.object({});
function applicationAttachment4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ApplicationAttachment4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ApplicationAttachment4' from JSON`);
}
/** @internal */
exports.ApplicationAttachmentSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.ApplicationAttachment4$inboundSchema),
    z.array(z.any()),
]);
function applicationAttachmentSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ApplicationAttachmentSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ApplicationAttachmentSourceValue' from JSON`);
}
/** @internal */
exports.ApplicationAttachmentValue$inboundSchema = openEnums.inboundSchema(ApplicationAttachmentValue);
/** @internal */
exports.ContentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.ApplicationAttachment4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.ApplicationAttachmentValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function contentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ContentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContentType' from JSON`);
}
/** @internal */
exports.ApplicationAttachment$inboundSchema = z.object({
    content: z.nullable(z.string()).optional(),
    content_type: z.nullable(z.lazy(() => exports.ContentType$inboundSchema)).optional(),
    file_name: z.nullable(z.string()).optional(),
    url: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "content_type": "contentType",
        "file_name": "fileName",
    });
});
function applicationAttachmentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ApplicationAttachment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ApplicationAttachment' from JSON`);
}
//# sourceMappingURL=applicationattachment.js.map