/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteMemoryEntryRequest = { ifMatch?: string | undefined; }; /** @internal */ export const DeleteMemoryEntryRequest$inboundSchema: z.ZodType< DeleteMemoryEntryRequest, z.ZodTypeDef, unknown > = z.object({ if_match: z.string().optional(), }).transform((v) => { return remap$(v, { "if_match": "ifMatch", }); }); /** @internal */ export type DeleteMemoryEntryRequest$Outbound = { if_match?: string | undefined; }; /** @internal */ export const DeleteMemoryEntryRequest$outboundSchema: z.ZodType< DeleteMemoryEntryRequest$Outbound, z.ZodTypeDef, DeleteMemoryEntryRequest > = z.object({ ifMatch: z.string().optional(), }).transform((v) => { return remap$(v, { ifMatch: "if_match", }); }); export function deleteMemoryEntryRequestToJSON( deleteMemoryEntryRequest: DeleteMemoryEntryRequest, ): string { return JSON.stringify( DeleteMemoryEntryRequest$outboundSchema.parse(deleteMemoryEntryRequest), ); } export function deleteMemoryEntryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteMemoryEntryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteMemoryEntryRequest' from JSON`, ); }