"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.InvokeAgentState$inboundSchema = exports.InvokeAgentKind$outboundSchema = exports.InvokeAgentKind$inboundSchema = exports.InvokeAgentRequest$outboundSchema = exports.InvokeAgentRequest$inboundSchema = exports.InvokeAgentRequestBody$outboundSchema = exports.InvokeAgentRequestBody$inboundSchema = exports.Memory$outboundSchema = exports.Memory$inboundSchema = exports.InvokeAgentThread$outboundSchema = exports.InvokeAgentThread$inboundSchema = exports.Contact$outboundSchema = exports.Contact$inboundSchema = exports.Message$outboundSchema = exports.Message$inboundSchema = exports.PublicMessagePart$outboundSchema = exports.PublicMessagePart$inboundSchema = exports.TextPart$outboundSchema = exports.TextPart$inboundSchema = exports.Kind$outboundSchema = exports.Kind$inboundSchema = exports.FilePart$outboundSchema = exports.FilePart$inboundSchema = exports.PublicMessagePartFile$outboundSchema = exports.PublicMessagePartFile$inboundSchema = exports.BinaryFormat$outboundSchema = exports.BinaryFormat$inboundSchema = exports.FileInURIFormat$outboundSchema = exports.FileInURIFormat$inboundSchema = exports.PublicMessagePartKind$outboundSchema = exports.PublicMessagePartKind$inboundSchema = exports.ToolResultPart$outboundSchema = exports.ToolResultPart$inboundSchema = exports.InvokeAgentPublicMessagePartKind$outboundSchema = exports.InvokeAgentPublicMessagePartKind$inboundSchema = exports.InvokeAgentRole$outboundSchema = exports.InvokeAgentRole$inboundSchema = exports.RoleUserMessage$outboundSchema = exports.RoleUserMessage$inboundSchema = exports.RoleToolMessage$outboundSchema = exports.RoleToolMessage$inboundSchema = exports.InvokeAgentAgentsRole = exports.InvokeAgentAgentsKind = exports.InvokeAgentState = exports.InvokeAgentKind = exports.Kind = exports.PublicMessagePartKind = exports.InvokeAgentPublicMessagePartKind = exports.RoleUserMessage = exports.RoleToolMessage = void 0;
exports.InvokeAgentResponseBody$outboundSchema = exports.InvokeAgentResponseBody$inboundSchema = exports.InvokeAgentStatus$outboundSchema = exports.InvokeAgentStatus$inboundSchema = exports.InvokeAgentMessage$outboundSchema = exports.InvokeAgentMessage$inboundSchema = exports.InvokeAgentAgentsRole$outboundSchema = exports.InvokeAgentAgentsRole$inboundSchema = exports.InvokeAgentAgentsKind$outboundSchema = exports.InvokeAgentAgentsKind$inboundSchema = exports.InvokeAgentState$outboundSchema = void 0;
exports.invokeAgentRoleToJSON = invokeAgentRoleToJSON;
exports.invokeAgentRoleFromJSON = invokeAgentRoleFromJSON;
exports.toolResultPartToJSON = toolResultPartToJSON;
exports.toolResultPartFromJSON = toolResultPartFromJSON;
exports.fileInURIFormatToJSON = fileInURIFormatToJSON;
exports.fileInURIFormatFromJSON = fileInURIFormatFromJSON;
exports.binaryFormatToJSON = binaryFormatToJSON;
exports.binaryFormatFromJSON = binaryFormatFromJSON;
exports.publicMessagePartFileToJSON = publicMessagePartFileToJSON;
exports.publicMessagePartFileFromJSON = publicMessagePartFileFromJSON;
exports.filePartToJSON = filePartToJSON;
exports.filePartFromJSON = filePartFromJSON;
exports.textPartToJSON = textPartToJSON;
exports.textPartFromJSON = textPartFromJSON;
exports.publicMessagePartToJSON = publicMessagePartToJSON;
exports.publicMessagePartFromJSON = publicMessagePartFromJSON;
exports.messageToJSON = messageToJSON;
exports.messageFromJSON = messageFromJSON;
exports.contactToJSON = contactToJSON;
exports.contactFromJSON = contactFromJSON;
exports.invokeAgentThreadToJSON = invokeAgentThreadToJSON;
exports.invokeAgentThreadFromJSON = invokeAgentThreadFromJSON;
exports.memoryToJSON = memoryToJSON;
exports.memoryFromJSON = memoryFromJSON;
exports.invokeAgentRequestBodyToJSON = invokeAgentRequestBodyToJSON;
exports.invokeAgentRequestBodyFromJSON = invokeAgentRequestBodyFromJSON;
exports.invokeAgentRequestToJSON = invokeAgentRequestToJSON;
exports.invokeAgentRequestFromJSON = invokeAgentRequestFromJSON;
exports.invokeAgentMessageToJSON = invokeAgentMessageToJSON;
exports.invokeAgentMessageFromJSON = invokeAgentMessageFromJSON;
exports.invokeAgentStatusToJSON = invokeAgentStatusToJSON;
exports.invokeAgentStatusFromJSON = invokeAgentStatusFromJSON;
exports.invokeAgentResponseBodyToJSON = invokeAgentResponseBodyToJSON;
exports.invokeAgentResponseBodyFromJSON = invokeAgentResponseBodyFromJSON;
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.RoleToolMessage = {
    Tool: "tool",
};
/**
 * User message
 */
exports.RoleUserMessage = {
    User: "user",
};
exports.InvokeAgentPublicMessagePartKind = {
    ToolResult: "tool_result",
};
exports.PublicMessagePartKind = {
    File: "file",
};
exports.Kind = {
    Text: "text",
};
/**
 * A2A entity type
 */
exports.InvokeAgentKind = {
    Task: "task",
};
/**
 * Current task state
 */
exports.InvokeAgentState = {
    Submitted: "submitted",
    Working: "working",
    InputRequired: "input-required",
    Completed: "completed",
    Failed: "failed",
    Canceled: "canceled",
    Rejected: "rejected",
    AuthRequired: "auth-required",
    Unknown: "unknown",
};
exports.InvokeAgentAgentsKind = {
    Message: "message",
};
/**
 * Extended A2A message role
 */
exports.InvokeAgentAgentsRole = {
    User: "user",
    Agent: "agent",
    Tool: "tool",
    System: "system",
};
/** @internal */
exports.RoleToolMessage$inboundSchema = z.nativeEnum(exports.RoleToolMessage);
/** @internal */
exports.RoleToolMessage$outboundSchema = exports.RoleToolMessage$inboundSchema;
/** @internal */
exports.RoleUserMessage$inboundSchema = z.nativeEnum(exports.RoleUserMessage);
/** @internal */
exports.RoleUserMessage$outboundSchema = exports.RoleUserMessage$inboundSchema;
/** @internal */
exports.InvokeAgentRole$inboundSchema = z.union([exports.RoleUserMessage$inboundSchema, exports.RoleToolMessage$inboundSchema]);
/** @internal */
exports.InvokeAgentRole$outboundSchema = z.union([exports.RoleUserMessage$outboundSchema, exports.RoleToolMessage$outboundSchema]);
function invokeAgentRoleToJSON(invokeAgentRole) {
    return JSON.stringify(exports.InvokeAgentRole$outboundSchema.parse(invokeAgentRole));
}
function invokeAgentRoleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentRole' from JSON`);
}
/** @internal */
exports.InvokeAgentPublicMessagePartKind$inboundSchema = z.nativeEnum(exports.InvokeAgentPublicMessagePartKind);
/** @internal */
exports.InvokeAgentPublicMessagePartKind$outboundSchema = exports.InvokeAgentPublicMessagePartKind$inboundSchema;
/** @internal */
exports.ToolResultPart$inboundSchema = z.object({
    kind: exports.InvokeAgentPublicMessagePartKind$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.ToolResultPart$outboundSchema = z.object({
    kind: exports.InvokeAgentPublicMessagePartKind$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 toolResultPartToJSON(toolResultPart) {
    return JSON.stringify(exports.ToolResultPart$outboundSchema.parse(toolResultPart));
}
function toolResultPartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolResultPart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolResultPart' from JSON`);
}
/** @internal */
exports.PublicMessagePartKind$inboundSchema = z.nativeEnum(exports.PublicMessagePartKind);
/** @internal */
exports.PublicMessagePartKind$outboundSchema = exports.PublicMessagePartKind$inboundSchema;
/** @internal */
exports.FileInURIFormat$inboundSchema = z.object({
    uri: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
/** @internal */
exports.FileInURIFormat$outboundSchema = z.object({
    uri: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
function fileInURIFormatToJSON(fileInURIFormat) {
    return JSON.stringify(exports.FileInURIFormat$outboundSchema.parse(fileInURIFormat));
}
function fileInURIFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FileInURIFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FileInURIFormat' from JSON`);
}
/** @internal */
exports.BinaryFormat$inboundSchema = z.object({
    bytes: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
/** @internal */
exports.BinaryFormat$outboundSchema = z.object({
    bytes: z.string(),
    mimeType: z.string().optional(),
    name: z.string().optional(),
});
function binaryFormatToJSON(binaryFormat) {
    return JSON.stringify(exports.BinaryFormat$outboundSchema.parse(binaryFormat));
}
function binaryFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BinaryFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BinaryFormat' from JSON`);
}
/** @internal */
exports.PublicMessagePartFile$inboundSchema = z.union([
    z.lazy(() => exports.BinaryFormat$inboundSchema),
    z.lazy(() => exports.FileInURIFormat$inboundSchema),
]);
/** @internal */
exports.PublicMessagePartFile$outboundSchema = z.union([
    z.lazy(() => exports.BinaryFormat$outboundSchema),
    z.lazy(() => exports.FileInURIFormat$outboundSchema),
]);
function publicMessagePartFileToJSON(publicMessagePartFile) {
    return JSON.stringify(exports.PublicMessagePartFile$outboundSchema.parse(publicMessagePartFile));
}
function publicMessagePartFileFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PublicMessagePartFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PublicMessagePartFile' from JSON`);
}
/** @internal */
exports.FilePart$inboundSchema = z.object({
    kind: exports.PublicMessagePartKind$inboundSchema,
    file: z.union([
        z.lazy(() => exports.BinaryFormat$inboundSchema),
        z.lazy(() => exports.FileInURIFormat$inboundSchema),
    ]),
    metadata: z.record(z.any()).optional(),
});
/** @internal */
exports.FilePart$outboundSchema = z.object({
    kind: exports.PublicMessagePartKind$outboundSchema,
    file: z.union([
        z.lazy(() => exports.BinaryFormat$outboundSchema),
        z.lazy(() => exports.FileInURIFormat$outboundSchema),
    ]),
    metadata: z.record(z.any()).optional(),
});
function filePartToJSON(filePart) {
    return JSON.stringify(exports.FilePart$outboundSchema.parse(filePart));
}
function filePartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FilePart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilePart' from JSON`);
}
/** @internal */
exports.Kind$inboundSchema = z.nativeEnum(exports.Kind);
/** @internal */
exports.Kind$outboundSchema = exports.Kind$inboundSchema;
/** @internal */
exports.TextPart$inboundSchema = z.object({
    kind: exports.Kind$inboundSchema,
    text: z.string(),
});
/** @internal */
exports.TextPart$outboundSchema = z.object({
    kind: exports.Kind$outboundSchema,
    text: z.string(),
});
function textPartToJSON(textPart) {
    return JSON.stringify(exports.TextPart$outboundSchema.parse(textPart));
}
function textPartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TextPart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TextPart' from JSON`);
}
/** @internal */
exports.PublicMessagePart$inboundSchema = z.union([
    z.lazy(() => exports.TextPart$inboundSchema),
    z.lazy(() => exports.FilePart$inboundSchema),
    z.lazy(() => exports.ToolResultPart$inboundSchema),
]);
/** @internal */
exports.PublicMessagePart$outboundSchema = z.union([
    z.lazy(() => exports.TextPart$outboundSchema),
    z.lazy(() => exports.FilePart$outboundSchema),
    z.lazy(() => exports.ToolResultPart$outboundSchema),
]);
function publicMessagePartToJSON(publicMessagePart) {
    return JSON.stringify(exports.PublicMessagePart$outboundSchema.parse(publicMessagePart));
}
function publicMessagePartFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PublicMessagePart$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PublicMessagePart' from JSON`);
}
/** @internal */
exports.Message$inboundSchema = z.object({
    messageId: z.string().optional(),
    role: z.union([
        exports.RoleUserMessage$inboundSchema,
        exports.RoleToolMessage$inboundSchema,
    ]),
    parts: z.array(z.union([
        z.lazy(() => exports.TextPart$inboundSchema),
        z.lazy(() => exports.FilePart$inboundSchema),
        z.lazy(() => exports.ToolResultPart$inboundSchema),
    ])),
});
/** @internal */
exports.Message$outboundSchema = z.object({
    messageId: z.string().optional(),
    role: z.union([
        exports.RoleUserMessage$outboundSchema,
        exports.RoleToolMessage$outboundSchema,
    ]),
    parts: z.array(z.union([
        z.lazy(() => exports.TextPart$outboundSchema),
        z.lazy(() => exports.FilePart$outboundSchema),
        z.lazy(() => exports.ToolResultPart$outboundSchema),
    ])),
});
function messageToJSON(message) {
    return JSON.stringify(exports.Message$outboundSchema.parse(message));
}
function messageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Message$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Message' from JSON`);
}
/** @internal */
exports.Contact$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.Contact$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 contactToJSON(contact) {
    return JSON.stringify(exports.Contact$outboundSchema.parse(contact));
}
function contactFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Contact$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Contact' from JSON`);
}
/** @internal */
exports.InvokeAgentThread$inboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
/** @internal */
exports.InvokeAgentThread$outboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
function invokeAgentThreadToJSON(invokeAgentThread) {
    return JSON.stringify(exports.InvokeAgentThread$outboundSchema.parse(invokeAgentThread));
}
function invokeAgentThreadFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentThread$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentThread' from JSON`);
}
/** @internal */
exports.Memory$inboundSchema = z
    .object({
    entity_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "entity_id": "entityId",
    });
});
/** @internal */
exports.Memory$outboundSchema = z.object({
    entityId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        entityId: "entity_id",
    });
});
function memoryToJSON(memory) {
    return JSON.stringify(exports.Memory$outboundSchema.parse(memory));
}
function memoryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Memory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Memory' from JSON`);
}
/** @internal */
exports.InvokeAgentRequestBody$inboundSchema = z.object({
    task_id: z.string().optional(),
    message: z.lazy(() => exports.Message$inboundSchema),
    variables: z.record(z.any()).optional(),
    contact: z.lazy(() => exports.Contact$inboundSchema).optional(),
    thread: z.lazy(() => exports.InvokeAgentThread$inboundSchema).optional(),
    memory: z.lazy(() => exports.Memory$inboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "task_id": "taskId",
    });
});
/** @internal */
exports.InvokeAgentRequestBody$outboundSchema = z.object({
    taskId: z.string().optional(),
    message: z.lazy(() => exports.Message$outboundSchema),
    variables: z.record(z.any()).optional(),
    contact: z.lazy(() => exports.Contact$outboundSchema).optional(),
    thread: z.lazy(() => exports.InvokeAgentThread$outboundSchema).optional(),
    memory: z.lazy(() => exports.Memory$outboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        taskId: "task_id",
    });
});
function invokeAgentRequestBodyToJSON(invokeAgentRequestBody) {
    return JSON.stringify(exports.InvokeAgentRequestBody$outboundSchema.parse(invokeAgentRequestBody));
}
function invokeAgentRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentRequestBody' from JSON`);
}
/** @internal */
exports.InvokeAgentRequest$inboundSchema = z.object({
    key: z.string(),
    RequestBody: z.lazy(() => exports.InvokeAgentRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.InvokeAgentRequest$outboundSchema = z.object({
    key: z.string(),
    requestBody: z.lazy(() => exports.InvokeAgentRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requestBody: "RequestBody",
    });
});
function invokeAgentRequestToJSON(invokeAgentRequest) {
    return JSON.stringify(exports.InvokeAgentRequest$outboundSchema.parse(invokeAgentRequest));
}
function invokeAgentRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentRequest' from JSON`);
}
/** @internal */
exports.InvokeAgentKind$inboundSchema = z.nativeEnum(exports.InvokeAgentKind);
/** @internal */
exports.InvokeAgentKind$outboundSchema = exports.InvokeAgentKind$inboundSchema;
/** @internal */
exports.InvokeAgentState$inboundSchema = z.nativeEnum(exports.InvokeAgentState);
/** @internal */
exports.InvokeAgentState$outboundSchema = exports.InvokeAgentState$inboundSchema;
/** @internal */
exports.InvokeAgentAgentsKind$inboundSchema = z.nativeEnum(exports.InvokeAgentAgentsKind);
/** @internal */
exports.InvokeAgentAgentsKind$outboundSchema = exports.InvokeAgentAgentsKind$inboundSchema;
/** @internal */
exports.InvokeAgentAgentsRole$inboundSchema = z.nativeEnum(exports.InvokeAgentAgentsRole);
/** @internal */
exports.InvokeAgentAgentsRole$outboundSchema = exports.InvokeAgentAgentsRole$inboundSchema;
/** @internal */
exports.InvokeAgentMessage$inboundSchema = z.object({
    kind: exports.InvokeAgentAgentsKind$inboundSchema,
    messageId: z.string(),
    role: exports.InvokeAgentAgentsRole$inboundSchema,
    parts: z.array(z.any()),
});
/** @internal */
exports.InvokeAgentMessage$outboundSchema = z.object({
    kind: exports.InvokeAgentAgentsKind$outboundSchema,
    messageId: z.string(),
    role: exports.InvokeAgentAgentsRole$outboundSchema,
    parts: z.array(z.any()),
});
function invokeAgentMessageToJSON(invokeAgentMessage) {
    return JSON.stringify(exports.InvokeAgentMessage$outboundSchema.parse(invokeAgentMessage));
}
function invokeAgentMessageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentMessage' from JSON`);
}
/** @internal */
exports.InvokeAgentStatus$inboundSchema = z.object({
    state: exports.InvokeAgentState$inboundSchema,
    timestamp: z.string().optional(),
    message: z.lazy(() => exports.InvokeAgentMessage$inboundSchema).optional(),
});
/** @internal */
exports.InvokeAgentStatus$outboundSchema = z.object({
    state: exports.InvokeAgentState$outboundSchema,
    timestamp: z.string().optional(),
    message: z.lazy(() => exports.InvokeAgentMessage$outboundSchema).optional(),
});
function invokeAgentStatusToJSON(invokeAgentStatus) {
    return JSON.stringify(exports.InvokeAgentStatus$outboundSchema.parse(invokeAgentStatus));
}
function invokeAgentStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentStatus' from JSON`);
}
/** @internal */
exports.InvokeAgentResponseBody$inboundSchema = z.object({
    id: z.string(),
    contextId: z.string(),
    kind: exports.InvokeAgentKind$inboundSchema,
    status: z.lazy(() => exports.InvokeAgentStatus$inboundSchema),
    metadata: z.record(z.any()).optional(),
});
/** @internal */
exports.InvokeAgentResponseBody$outboundSchema = z.object({
    id: z.string(),
    contextId: z.string(),
    kind: exports.InvokeAgentKind$outboundSchema,
    status: z.lazy(() => exports.InvokeAgentStatus$outboundSchema),
    metadata: z.record(z.any()).optional(),
});
function invokeAgentResponseBodyToJSON(invokeAgentResponseBody) {
    return JSON.stringify(exports.InvokeAgentResponseBody$outboundSchema.parse(invokeAgentResponseBody));
}
function invokeAgentResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeAgentResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeAgentResponseBody' from JSON`);
}
//# sourceMappingURL=invokeagent.js.map