"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.GetAgentTaskResponseBody$outboundSchema = exports.GetAgentTaskResponseBody$inboundSchema = exports.GetAgentTaskStatus$outboundSchema = exports.GetAgentTaskStatus$inboundSchema = exports.GetAgentTaskKind$outboundSchema = exports.GetAgentTaskKind$inboundSchema = exports.GetAgentTaskRequest$outboundSchema = exports.GetAgentTaskRequest$inboundSchema = exports.GetAgentTaskKind = void 0;
exports.getAgentTaskRequestToJSON = getAgentTaskRequestToJSON;
exports.getAgentTaskRequestFromJSON = getAgentTaskRequestFromJSON;
exports.getAgentTaskStatusToJSON = getAgentTaskStatusToJSON;
exports.getAgentTaskStatusFromJSON = getAgentTaskStatusFromJSON;
exports.getAgentTaskResponseBodyToJSON = getAgentTaskResponseBodyToJSON;
exports.getAgentTaskResponseBodyFromJSON = getAgentTaskResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.GetAgentTaskKind = {
    Task: "task",
};
/** @internal */
exports.GetAgentTaskRequest$inboundSchema = z.object({
    agent_key: z.string(),
    task_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "agent_key": "agentKey",
        "task_id": "taskId",
    });
});
/** @internal */
exports.GetAgentTaskRequest$outboundSchema = z.object({
    agentKey: z.string(),
    taskId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        agentKey: "agent_key",
        taskId: "task_id",
    });
});
function getAgentTaskRequestToJSON(getAgentTaskRequest) {
    return JSON.stringify(exports.GetAgentTaskRequest$outboundSchema.parse(getAgentTaskRequest));
}
function getAgentTaskRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAgentTaskRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAgentTaskRequest' from JSON`);
}
/** @internal */
exports.GetAgentTaskKind$inboundSchema = z.nativeEnum(exports.GetAgentTaskKind);
/** @internal */
exports.GetAgentTaskKind$outboundSchema = exports.GetAgentTaskKind$inboundSchema;
/** @internal */
exports.GetAgentTaskStatus$inboundSchema = z.object({
    state: z.string(),
    timestamp: z.string().optional(),
    message: z.any().optional(),
});
/** @internal */
exports.GetAgentTaskStatus$outboundSchema = z.object({
    state: z.string(),
    timestamp: z.string().optional(),
    message: z.any().optional(),
});
function getAgentTaskStatusToJSON(getAgentTaskStatus) {
    return JSON.stringify(exports.GetAgentTaskStatus$outboundSchema.parse(getAgentTaskStatus));
}
function getAgentTaskStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAgentTaskStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAgentTaskStatus' from JSON`);
}
/** @internal */
exports.GetAgentTaskResponseBody$inboundSchema = z.object({
    id: z.string(),
    contextId: z.string(),
    kind: exports.GetAgentTaskKind$inboundSchema,
    status: z.lazy(() => exports.GetAgentTaskStatus$inboundSchema),
    history: z.array(z.any()),
    artifacts: z.array(z.any()).optional(),
    metadata: z.record(z.any()).optional(),
});
/** @internal */
exports.GetAgentTaskResponseBody$outboundSchema = z.object({
    id: z.string(),
    contextId: z.string(),
    kind: exports.GetAgentTaskKind$outboundSchema,
    status: z.lazy(() => exports.GetAgentTaskStatus$outboundSchema),
    history: z.array(z.any()),
    artifacts: z.array(z.any()).optional(),
    metadata: z.record(z.any()).optional(),
});
function getAgentTaskResponseBodyToJSON(getAgentTaskResponseBody) {
    return JSON.stringify(exports.GetAgentTaskResponseBody$outboundSchema.parse(getAgentTaskResponseBody));
}
function getAgentTaskResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAgentTaskResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAgentTaskResponseBody' from JSON`);
}
//# sourceMappingURL=getagenttask.js.map