/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest = { /** * The asset id. */ assetId: string; /** * The alternativeInvestmentDocument id. */ alternativeInvestmentDocumentId: string; }; export type AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse = { httpMeta: components.HTTPMetadata; /** * OK */ downloadAlternativeInvestmentDocumentResponse?: | components.DownloadAlternativeInvestmentDocumentResponse | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. * * @remarks * FAILED_PRECONDITION: The requested resource is not in the expected state. */ status?: components.Status | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest, z.ZodTypeDef, unknown > = z.object({ asset_id: z.string(), alternativeInvestmentDocument_id: z.string(), }).transform((v) => { return remap$(v, { "asset_id": "assetId", "alternativeInvestmentDocument_id": "alternativeInvestmentDocumentId", }); }); /** @internal */ export type AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$Outbound = { asset_id: string; alternativeInvestmentDocument_id: string; }; /** @internal */ export const AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest > = z.object({ assetId: z.string(), alternativeInvestmentDocumentId: z.string(), }).transform((v) => { return remap$(v, { assetId: "asset_id", alternativeInvestmentDocumentId: "alternativeInvestmentDocument_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$ { /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$Outbound; } export function alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequestToJSON( alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest: AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest, ): string { return JSON.stringify( AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$outboundSchema .parse( alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest, ), ); } export function alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequestFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentRequest' from JSON`, ); } /** @internal */ export const AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, DownloadAlternativeInvestmentDocumentResponse: components .DownloadAlternativeInvestmentDocumentResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "DownloadAlternativeInvestmentDocumentResponse": "downloadAlternativeInvestmentDocumentResponse", "Status": "status", }); }); /** @internal */ export type AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; DownloadAlternativeInvestmentDocumentResponse?: | components.DownloadAlternativeInvestmentDocumentResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, downloadAlternativeInvestmentDocumentResponse: components .DownloadAlternativeInvestmentDocumentResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", downloadAlternativeInvestmentDocumentResponse: "DownloadAlternativeInvestmentDocumentResponse", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$ { /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$Outbound; } export function alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponseToJSON( alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse: AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse, ): string { return JSON.stringify( AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$outboundSchema .parse( alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse, ), ); } export function alternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponseFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsDownloadAlternativeInvestmentDocumentResponse' from JSON`, ); }