/* * 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 AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest = { /** * The asset id. */ assetId: string; /** * The alternativeInvestmentDocument id. */ alternativeInvestmentDocumentId: string; }; export type AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse = { httpMeta: components.HTTPMetadata; /** * OK */ alternativeInvestmentDocument?: | components.AlternativeInvestmentDocument | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest, 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 AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$Outbound = { asset_id: string; alternativeInvestmentDocument_id: string; }; /** @internal */ export const AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest > = 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 AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$ { /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$Outbound; } export function alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequestToJSON( alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest: AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest, ): string { return JSON.stringify( AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$outboundSchema .parse( alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest, ), ); } export function alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequestFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentRequest' from JSON`, ); } /** @internal */ export const AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, AlternativeInvestmentDocument: components .AlternativeInvestmentDocument$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "AlternativeInvestmentDocument": "alternativeInvestmentDocument", "Status": "status", }); }); /** @internal */ export type AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; AlternativeInvestmentDocument?: | components.AlternativeInvestmentDocument$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, alternativeInvestmentDocument: components .AlternativeInvestmentDocument$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", alternativeInvestmentDocument: "AlternativeInvestmentDocument", 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 AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$ { /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$Outbound; } export function alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponseToJSON( alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse: AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse, ): string { return JSON.stringify( AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$outboundSchema .parse( alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse, ), ); } export function alternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponseFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsGetAlternativeInvestmentDocumentResponse' from JSON`, ); }