/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1963f6ec6798 */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Content that has been generated or extrapolated from the documents present in the document field. */ export type GeneratedAttachmentContent = { /** * The header describing the generated content. */ displayHeader?: string | undefined; /** * The content that has been generated. */ text?: string | undefined; }; /** @internal */ export const GeneratedAttachmentContent$inboundSchema: z.ZodType< GeneratedAttachmentContent, z.ZodTypeDef, unknown > = z.object({ displayHeader: z.string().optional(), text: z.string().optional(), }); export function generatedAttachmentContentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GeneratedAttachmentContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GeneratedAttachmentContent' from JSON`, ); }