"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.StreamAgentResponseBody$outboundSchema = exports.StreamAgentResponseBody$inboundSchema = exports.StreamAgentRequest$outboundSchema = exports.StreamAgentRequest$inboundSchema = exports.StreamAgentRequestBody$outboundSchema = exports.StreamAgentRequestBody$inboundSchema = exports.StreamAgentMemory$outboundSchema = exports.StreamAgentMemory$inboundSchema = exports.StreamAgentThread$outboundSchema = exports.StreamAgentThread$inboundSchema = exports.StreamAgentContact$outboundSchema = exports.StreamAgentContact$inboundSchema = exports.StreamAgentMessage$outboundSchema = exports.StreamAgentMessage$inboundSchema = exports.StreamAgentPublicMessagePart$outboundSchema = exports.StreamAgentPublicMessagePart$inboundSchema = exports.StreamAgentPublicMessagePartTextPart$outboundSchema = exports.StreamAgentPublicMessagePartTextPart$inboundSchema = exports.StreamAgentPublicMessagePartKind$outboundSchema = exports.StreamAgentPublicMessagePartKind$inboundSchema = exports.StreamAgentPublicMessagePartFilePart$outboundSchema = exports.StreamAgentPublicMessagePartFilePart$inboundSchema = exports.StreamAgentPublicMessagePartFile$outboundSchema = exports.StreamAgentPublicMessagePartFile$inboundSchema = exports.StreamAgentFileBinaryFormat$outboundSchema = exports.StreamAgentFileBinaryFormat$inboundSchema = exports.StreamAgentFileFileInURIFormat$outboundSchema = exports.StreamAgentFileFileInURIFormat$inboundSchema = exports.StreamAgentPublicMessagePartAgentsKind$outboundSchema = exports.StreamAgentPublicMessagePartAgentsKind$inboundSchema = exports.StreamAgentPublicMessagePartToolResultPart$outboundSchema = exports.StreamAgentPublicMessagePartToolResultPart$inboundSchema = exports.StreamAgentPublicMessagePartAgentsRequestKind$outboundSchema = exports.StreamAgentPublicMessagePartAgentsRequestKind$inboundSchema = exports.StreamAgentRole$outboundSchema = exports.StreamAgentRole$inboundSchema = exports.StreamAgentRoleUserMessage$outboundSchema = exports.StreamAgentRoleUserMessage$inboundSchema = exports.StreamAgentRoleToolMessage$outboundSchema = exports.StreamAgentRoleToolMessage$inboundSchema = exports.StreamAgentPublicMessagePartKind = exports.StreamAgentPublicMessagePartAgentsKind = exports.StreamAgentPublicMessagePartAgentsRequestKind = exports.StreamAgentRoleUserMessage = exports.StreamAgentRoleToolMessage = void 0;
exports.streamAgentRoleToJSON = streamAgentRoleToJSON;
exports.streamAgentRoleFromJSON = streamAgentRoleFromJSON;
exports.streamAgentPublicMessagePartToolResultPartToJSON = streamAgentPublicMessagePartToolResultPartToJSON;
exports.streamAgentPublicMessagePartToolResultPartFromJSON = streamAgentPublicMessagePartToolResultPartFromJSON;
exports.streamAgentFileFileInURIFormatToJSON = streamAgentFileFileInURIFormatToJSON;
exports.streamAgentFileFileInURIFormatFromJSON = streamAgentFileFileInURIFormatFromJSON;
exports.streamAgentFileBinaryFormatToJSON = streamAgentFileBinaryFormatToJSON;
exports.streamAgentFileBinaryFormatFromJSON = streamAgentFileBinaryFormatFromJSON;
exports.streamAgentPublicMessagePartFileToJSON = streamAgentPublicMessagePartFileToJSON;
exports.streamAgentPublicMessagePartFileFromJSON = streamAgentPublicMessagePartFileFromJSON;
exports.streamAgentPublicMessagePartFilePartToJSON = streamAgentPublicMessagePartFilePartToJSON;
exports.streamAgentPublicMessagePartFilePartFromJSON = streamAgentPublicMessagePartFilePartFromJSON;
exports.streamAgentPublicMessagePartTextPartToJSON = streamAgentPublicMessagePartTextPartToJSON;
exports.streamAgentPublicMessagePartTextPartFromJSON = streamAgentPublicMessagePartTextPartFromJSON;
exports.streamAgentPublicMessagePartToJSON = streamAgentPublicMessagePartToJSON;
exports.streamAgentPublicMessagePartFromJSON = streamAgentPublicMessagePartFromJSON;
exports.streamAgentMessageToJSON = streamAgentMessageToJSON;
exports.streamAgentMessageFromJSON = streamAgentMessageFromJSON;
exports.streamAgentContactToJSON = streamAgentContactToJSON;
exports.streamAgentContactFromJSON = streamAgentContactFromJSON;
exports.streamAgentThreadToJSON = streamAgentThreadToJSON;
exports.streamAgentThreadFromJSON = streamAgentThreadFromJSON;
exports.streamAgentMemoryToJSON = streamAgentMemoryToJSON;
exports.streamAgentMemoryFromJSON = streamAgentMemoryFromJSON;
exports.streamAgentRequestBodyToJSON = streamAgentRequestBodyToJSON;
exports.streamAgentRequestBodyFromJSON = streamAgentRequestBodyFromJSON;
exports.streamAgentRequestToJSON = streamAgentRequestToJSON;
exports.streamAgentRequestFromJSON = streamAgentRequestFromJSON;
exports.streamAgentResponseBodyToJSON = streamAgentResponseBodyToJSON;
exports.streamAgentResponseBodyFromJSON = streamAgentResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * Tool message
 */
exports.StreamAgentRoleToolMessage = {
    Tool: "tool",
};
/**
 * User message
 */
exports.StreamAgentRoleUserMessage = {
    User: "user",
};
exports.StreamAgentPublicMessagePartAgentsRequestKind = {
    ToolResult: "tool_result",
};
exports.StreamAgentPublicMessagePartAgentsKind = {
    File: "file",
};
exports.StreamAgentPublicMessagePartKind = {
    Text: "text",
};
/** @internal */
exports.StreamAgentRoleToolMessage$inboundSchema = z.nativeEnum(exports.StreamAgentRoleToolMessage);
/** @internal */
exports.StreamAgentRoleToolMessage$outboundSchema = exports.StreamAgentRoleToolMessage$inboundSchema;
/** @internal */
exports.StreamAgentRoleUserMessage$inboundSchema = z.nativeEnum(exports.StreamAgentRoleUserMessage);
/** @internal */
exports.StreamAgentRoleUserMessage$outboundSchema = exports.StreamAgentRoleUserMessage$inboundSchema;
/** @internal */
exports.StreamAgentRole$inboundSchema = z.union([
    exports.StreamAgentRoleUserMessage$inboundSchema,
    exports.StreamAgentRoleToolMessage$inboundSchema,
]);
/** @internal */
exports.StreamAgentRole$outboundSchema = z.union([
    exports.StreamAgentRoleUserMessage$outboundSchema,
    exports.StreamAgentRoleToolMessage$outboundSchema,
]);
function streamAgentRoleToJSON(streamAgentRole) {
    return JSON.stringify(exports.StreamAgentRole$outboundSchema.parse(streamAgentRole));
}
function streamAgentRoleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentRole' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePartAgentsRequestKind$inboundSchema = z
    .nativeEnum(exports.StreamAgentPublicMessagePartAgentsRequestKind);
/** @internal */
exports.StreamAgentPublicMessagePartAgentsRequestKind$outboundSchema = exports.StreamAgentPublicMessagePartAgentsRequestKind$inboundSchema;
/** @internal */
exports.StreamAgentPublicMessagePartToolResultPart$inboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartAgentsRequestKind$inboundSchema,
    tool_call_id: z.string(),
    result: z.any().optional(),
    metadata: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "tool_call_id": "toolCallId",
    });
});
/** @internal */
exports.StreamAgentPublicMessagePartToolResultPart$outboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartAgentsRequestKind$outboundSchema,
    toolCallId: z.string(),
    result: z.any().optional(),
    metadata: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCallId: "tool_call_id",
    });
});
function streamAgentPublicMessagePartToolResultPartToJSON(streamAgentPublicMessagePartToolResultPart) {
    return JSON.stringify(exports.StreamAgentPublicMessagePartToolResultPart$outboundSchema.parse(streamAgentPublicMessagePartToolResultPart));
}
function streamAgentPublicMessagePartToolResultPartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentPublicMessagePartToolResultPart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentPublicMessagePartToolResultPart' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePartAgentsKind$inboundSchema = z.nativeEnum(exports.StreamAgentPublicMessagePartAgentsKind);
/** @internal */
exports.StreamAgentPublicMessagePartAgentsKind$outboundSchema = exports.StreamAgentPublicMessagePartAgentsKind$inboundSchema;
/** @internal */
exports.StreamAgentFileFileInURIFormat$inboundSchema = z.object({
    uri: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
/** @internal */
exports.StreamAgentFileFileInURIFormat$outboundSchema = z.object({
    uri: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
function streamAgentFileFileInURIFormatToJSON(streamAgentFileFileInURIFormat) {
    return JSON.stringify(exports.StreamAgentFileFileInURIFormat$outboundSchema.parse(streamAgentFileFileInURIFormat));
}
function streamAgentFileFileInURIFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentFileFileInURIFormat' from JSON`);
}
/** @internal */
exports.StreamAgentFileBinaryFormat$inboundSchema = z.object({
    bytes: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
/** @internal */
exports.StreamAgentFileBinaryFormat$outboundSchema = z.object({
    bytes: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
function streamAgentFileBinaryFormatToJSON(streamAgentFileBinaryFormat) {
    return JSON.stringify(exports.StreamAgentFileBinaryFormat$outboundSchema.parse(streamAgentFileBinaryFormat));
}
function streamAgentFileBinaryFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentFileBinaryFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentFileBinaryFormat' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePartFile$inboundSchema = z.union([
    z.lazy(() => exports.StreamAgentFileBinaryFormat$inboundSchema),
    z.lazy(() => exports.StreamAgentFileFileInURIFormat$inboundSchema),
]);
/** @internal */
exports.StreamAgentPublicMessagePartFile$outboundSchema = z.union([
    z.lazy(() => exports.StreamAgentFileBinaryFormat$outboundSchema),
    z.lazy(() => exports.StreamAgentFileFileInURIFormat$outboundSchema),
]);
function streamAgentPublicMessagePartFileToJSON(streamAgentPublicMessagePartFile) {
    return JSON.stringify(exports.StreamAgentPublicMessagePartFile$outboundSchema.parse(streamAgentPublicMessagePartFile));
}
function streamAgentPublicMessagePartFileFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentPublicMessagePartFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentPublicMessagePartFile' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePartFilePart$inboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartAgentsKind$inboundSchema,
    file: z.union([
        z.lazy(() => exports.StreamAgentFileBinaryFormat$inboundSchema),
        z.lazy(() => exports.StreamAgentFileFileInURIFormat$inboundSchema),
    ]),
    metadata: z.record(z.any()).optional(),
});
/** @internal */
exports.StreamAgentPublicMessagePartFilePart$outboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartAgentsKind$outboundSchema,
    file: z.union([
        z.lazy(() => exports.StreamAgentFileBinaryFormat$outboundSchema),
        z.lazy(() => exports.StreamAgentFileFileInURIFormat$outboundSchema),
    ]),
    metadata: z.record(z.any()).optional(),
});
function streamAgentPublicMessagePartFilePartToJSON(streamAgentPublicMessagePartFilePart) {
    return JSON.stringify(exports.StreamAgentPublicMessagePartFilePart$outboundSchema.parse(streamAgentPublicMessagePartFilePart));
}
function streamAgentPublicMessagePartFilePartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentPublicMessagePartFilePart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentPublicMessagePartFilePart' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePartKind$inboundSchema = z.nativeEnum(exports.StreamAgentPublicMessagePartKind);
/** @internal */
exports.StreamAgentPublicMessagePartKind$outboundSchema = exports.StreamAgentPublicMessagePartKind$inboundSchema;
/** @internal */
exports.StreamAgentPublicMessagePartTextPart$inboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartKind$inboundSchema,
    text: z.string(),
});
/** @internal */
exports.StreamAgentPublicMessagePartTextPart$outboundSchema = z.object({
    kind: exports.StreamAgentPublicMessagePartKind$outboundSchema,
    text: z.string(),
});
function streamAgentPublicMessagePartTextPartToJSON(streamAgentPublicMessagePartTextPart) {
    return JSON.stringify(exports.StreamAgentPublicMessagePartTextPart$outboundSchema.parse(streamAgentPublicMessagePartTextPart));
}
function streamAgentPublicMessagePartTextPartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentPublicMessagePartTextPart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentPublicMessagePartTextPart' from JSON`);
}
/** @internal */
exports.StreamAgentPublicMessagePart$inboundSchema = z.union([
    z.lazy(() => exports.StreamAgentPublicMessagePartTextPart$inboundSchema),
    z.lazy(() => exports.StreamAgentPublicMessagePartFilePart$inboundSchema),
    z.lazy(() => exports.StreamAgentPublicMessagePartToolResultPart$inboundSchema),
]);
/** @internal */
exports.StreamAgentPublicMessagePart$outboundSchema = z.union([
    z.lazy(() => exports.StreamAgentPublicMessagePartTextPart$outboundSchema),
    z.lazy(() => exports.StreamAgentPublicMessagePartFilePart$outboundSchema),
    z.lazy(() => exports.StreamAgentPublicMessagePartToolResultPart$outboundSchema),
]);
function streamAgentPublicMessagePartToJSON(streamAgentPublicMessagePart) {
    return JSON.stringify(exports.StreamAgentPublicMessagePart$outboundSchema.parse(streamAgentPublicMessagePart));
}
function streamAgentPublicMessagePartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentPublicMessagePart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentPublicMessagePart' from JSON`);
}
/** @internal */
exports.StreamAgentMessage$inboundSchema = z.object({
    messageId: z.string().optional(),
    role: z.union([
        exports.StreamAgentRoleUserMessage$inboundSchema,
        exports.StreamAgentRoleToolMessage$inboundSchema,
    ]),
    parts: z.array(z.union([
        z.lazy(() => exports.StreamAgentPublicMessagePartTextPart$inboundSchema),
        z.lazy(() => exports.StreamAgentPublicMessagePartFilePart$inboundSchema),
        z.lazy(() => exports.StreamAgentPublicMessagePartToolResultPart$inboundSchema),
    ])),
});
/** @internal */
exports.StreamAgentMessage$outboundSchema = z.object({
    messageId: z.string().optional(),
    role: z.union([
        exports.StreamAgentRoleUserMessage$outboundSchema,
        exports.StreamAgentRoleToolMessage$outboundSchema,
    ]),
    parts: z.array(z.union([
        z.lazy(() => exports.StreamAgentPublicMessagePartTextPart$outboundSchema),
        z.lazy(() => exports.StreamAgentPublicMessagePartFilePart$outboundSchema),
        z.lazy(() => exports.StreamAgentPublicMessagePartToolResultPart$outboundSchema),
    ])),
});
function streamAgentMessageToJSON(streamAgentMessage) {
    return JSON.stringify(exports.StreamAgentMessage$outboundSchema.parse(streamAgentMessage));
}
function streamAgentMessageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentMessage' from JSON`);
}
/** @internal */
exports.StreamAgentContact$inboundSchema = z.object({
    id: z.string(),
    display_name: z.string().optional(),
    email: z.string().optional(),
    metadata: z.array(z.record(z.any())).optional(),
    logo_url: z.string().optional(),
    tags: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "logo_url": "logoUrl",
    });
});
/** @internal */
exports.StreamAgentContact$outboundSchema = z.object({
    id: z.string(),
    displayName: z.string().optional(),
    email: z.string().optional(),
    metadata: z.array(z.record(z.any())).optional(),
    logoUrl: z.string().optional(),
    tags: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        logoUrl: "logo_url",
    });
});
function streamAgentContactToJSON(streamAgentContact) {
    return JSON.stringify(exports.StreamAgentContact$outboundSchema.parse(streamAgentContact));
}
function streamAgentContactFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentContact$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentContact' from JSON`);
}
/** @internal */
exports.StreamAgentThread$inboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
/** @internal */
exports.StreamAgentThread$outboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
function streamAgentThreadToJSON(streamAgentThread) {
    return JSON.stringify(exports.StreamAgentThread$outboundSchema.parse(streamAgentThread));
}
function streamAgentThreadFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentThread$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentThread' from JSON`);
}
/** @internal */
exports.StreamAgentMemory$inboundSchema = z.object({
    entity_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "entity_id": "entityId",
    });
});
/** @internal */
exports.StreamAgentMemory$outboundSchema = z.object({
    entityId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        entityId: "entity_id",
    });
});
function streamAgentMemoryToJSON(streamAgentMemory) {
    return JSON.stringify(exports.StreamAgentMemory$outboundSchema.parse(streamAgentMemory));
}
function streamAgentMemoryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentMemory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentMemory' from JSON`);
}
/** @internal */
exports.StreamAgentRequestBody$inboundSchema = z.object({
    task_id: z.string().optional(),
    message: z.lazy(() => exports.StreamAgentMessage$inboundSchema),
    variables: z.record(z.any()).optional(),
    contact: z.lazy(() => exports.StreamAgentContact$inboundSchema).optional(),
    thread: z.lazy(() => exports.StreamAgentThread$inboundSchema).optional(),
    memory: z.lazy(() => exports.StreamAgentMemory$inboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
    stream_timeout_seconds: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "task_id": "taskId",
        "stream_timeout_seconds": "streamTimeoutSeconds",
    });
});
/** @internal */
exports.StreamAgentRequestBody$outboundSchema = z.object({
    taskId: z.string().optional(),
    message: z.lazy(() => exports.StreamAgentMessage$outboundSchema),
    variables: z.record(z.any()).optional(),
    contact: z.lazy(() => exports.StreamAgentContact$outboundSchema).optional(),
    thread: z.lazy(() => exports.StreamAgentThread$outboundSchema).optional(),
    memory: z.lazy(() => exports.StreamAgentMemory$outboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
    streamTimeoutSeconds: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        taskId: "task_id",
        streamTimeoutSeconds: "stream_timeout_seconds",
    });
});
function streamAgentRequestBodyToJSON(streamAgentRequestBody) {
    return JSON.stringify(exports.StreamAgentRequestBody$outboundSchema.parse(streamAgentRequestBody));
}
function streamAgentRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentRequestBody' from JSON`);
}
/** @internal */
exports.StreamAgentRequest$inboundSchema = z.object({
    key: z.string(),
    RequestBody: z.lazy(() => exports.StreamAgentRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.StreamAgentRequest$outboundSchema = z.object({
    key: z.string(),
    requestBody: z.lazy(() => exports.StreamAgentRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requestBody: "RequestBody",
    });
});
function streamAgentRequestToJSON(streamAgentRequest) {
    return JSON.stringify(exports.StreamAgentRequest$outboundSchema.parse(streamAgentRequest));
}
function streamAgentRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentRequest' from JSON`);
}
/** @internal */
exports.StreamAgentResponseBody$inboundSchema = z.object({
    data: z.string(),
});
/** @internal */
exports.StreamAgentResponseBody$outboundSchema = z.object({
    data: z.string(),
});
function streamAgentResponseBodyToJSON(streamAgentResponseBody) {
    return JSON.stringify(exports.StreamAgentResponseBody$outboundSchema.parse(streamAgentResponseBody));
}
function streamAgentResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StreamAgentResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamAgentResponseBody' from JSON`);
}
//# sourceMappingURL=streamagent.js.map