/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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"; /** * Response to download an investment document. */ export type DownloadAlternativeInvestmentDocumentResponse = { /** * The URI to download the investment document file. */ downloadUri?: string | undefined; }; /** @internal */ export const DownloadAlternativeInvestmentDocumentResponse$inboundSchema: z.ZodType< DownloadAlternativeInvestmentDocumentResponse, z.ZodTypeDef, unknown > = z.object({ download_uri: z.string().optional(), }).transform((v) => { return remap$(v, { "download_uri": "downloadUri", }); }); /** @internal */ export type DownloadAlternativeInvestmentDocumentResponse$Outbound = { download_uri?: string | undefined; }; /** @internal */ export const DownloadAlternativeInvestmentDocumentResponse$outboundSchema: z.ZodType< DownloadAlternativeInvestmentDocumentResponse$Outbound, z.ZodTypeDef, DownloadAlternativeInvestmentDocumentResponse > = z.object({ downloadUri: z.string().optional(), }).transform((v) => { return remap$(v, { downloadUri: "download_uri", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DownloadAlternativeInvestmentDocumentResponse$ { /** @deprecated use `DownloadAlternativeInvestmentDocumentResponse$inboundSchema` instead. */ export const inboundSchema = DownloadAlternativeInvestmentDocumentResponse$inboundSchema; /** @deprecated use `DownloadAlternativeInvestmentDocumentResponse$outboundSchema` instead. */ export const outboundSchema = DownloadAlternativeInvestmentDocumentResponse$outboundSchema; /** @deprecated use `DownloadAlternativeInvestmentDocumentResponse$Outbound` instead. */ export type Outbound = DownloadAlternativeInvestmentDocumentResponse$Outbound; } export function downloadAlternativeInvestmentDocumentResponseToJSON( downloadAlternativeInvestmentDocumentResponse: DownloadAlternativeInvestmentDocumentResponse, ): string { return JSON.stringify( DownloadAlternativeInvestmentDocumentResponse$outboundSchema.parse( downloadAlternativeInvestmentDocumentResponse, ), ); } export function downloadAlternativeInvestmentDocumentResponseFromJSON( jsonString: string, ): SafeParseResult< DownloadAlternativeInvestmentDocumentResponse, SDKValidationError > { return safeParse( jsonString, (x) => DownloadAlternativeInvestmentDocumentResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DownloadAlternativeInvestmentDocumentResponse' from JSON`, ); }