"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.UpdateMemoryResponseBody$inboundSchema = exports.UpdateMemoryRequest$outboundSchema = exports.UpdateMemoryRequestBody$outboundSchema = void 0;
exports.updateMemoryRequestBodyToJSON = updateMemoryRequestBodyToJSON;
exports.updateMemoryRequestToJSON = updateMemoryRequestToJSON;
exports.updateMemoryResponseBodyFromJSON = updateMemoryResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.UpdateMemoryRequestBody$outboundSchema = z.object({
    metadata: z.record(z.string()).optional(),
});
function updateMemoryRequestBodyToJSON(updateMemoryRequestBody) {
    return JSON.stringify(exports.UpdateMemoryRequestBody$outboundSchema.parse(updateMemoryRequestBody));
}
/** @internal */
exports.UpdateMemoryRequest$outboundSchema = z.object({
    memoryStoreKey: z.string(),
    memoryEntityId: z.string(),
    requestBody: z.lazy(() => exports.UpdateMemoryRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        memoryStoreKey: "memory_store_key",
        memoryEntityId: "memory_entity_id",
        requestBody: "RequestBody",
    });
});
function updateMemoryRequestToJSON(updateMemoryRequest) {
    return JSON.stringify(exports.UpdateMemoryRequest$outboundSchema.parse(updateMemoryRequest));
}
/** @internal */
exports.UpdateMemoryResponseBody$inboundSchema = z.object({
    _id: z.string(),
    entity_id: z.string(),
    created: z.string(),
    updated: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    store_id: z.string(),
    workspace_id: z.string(),
    documents_count: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "entity_id": "entityId",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "store_id": "storeId",
        "workspace_id": "workspaceId",
        "documents_count": "documentsCount",
    });
});
function updateMemoryResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateMemoryResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateMemoryResponseBody' from JSON`);
}
//# sourceMappingURL=updatememory.js.map