/* * 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 InvestorCommunicationServiceBatchCreateUploadLinksResponse = { httpMeta: components.HTTPMetadata; /** * OK */ batchCreateUploadLinksResponse?: | components.BatchCreateUploadLinksResponse | undefined; /** * INVALID_ARGUMENT: The request was not well formed. */ status?: components.Status | undefined; }; /** @internal */ export const InvestorCommunicationServiceBatchCreateUploadLinksResponse$inboundSchema: z.ZodType< InvestorCommunicationServiceBatchCreateUploadLinksResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, BatchCreateUploadLinksResponse: components .BatchCreateUploadLinksResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "BatchCreateUploadLinksResponse": "batchCreateUploadLinksResponse", "Status": "status", }); }); /** @internal */ export type InvestorCommunicationServiceBatchCreateUploadLinksResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; BatchCreateUploadLinksResponse?: | components.BatchCreateUploadLinksResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const InvestorCommunicationServiceBatchCreateUploadLinksResponse$outboundSchema: z.ZodType< InvestorCommunicationServiceBatchCreateUploadLinksResponse$Outbound, z.ZodTypeDef, InvestorCommunicationServiceBatchCreateUploadLinksResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, batchCreateUploadLinksResponse: components .BatchCreateUploadLinksResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", batchCreateUploadLinksResponse: "BatchCreateUploadLinksResponse", 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 InvestorCommunicationServiceBatchCreateUploadLinksResponse$ { /** @deprecated use `InvestorCommunicationServiceBatchCreateUploadLinksResponse$inboundSchema` instead. */ export const inboundSchema = InvestorCommunicationServiceBatchCreateUploadLinksResponse$inboundSchema; /** @deprecated use `InvestorCommunicationServiceBatchCreateUploadLinksResponse$outboundSchema` instead. */ export const outboundSchema = InvestorCommunicationServiceBatchCreateUploadLinksResponse$outboundSchema; /** @deprecated use `InvestorCommunicationServiceBatchCreateUploadLinksResponse$Outbound` instead. */ export type Outbound = InvestorCommunicationServiceBatchCreateUploadLinksResponse$Outbound; } export function investorCommunicationServiceBatchCreateUploadLinksResponseToJSON( investorCommunicationServiceBatchCreateUploadLinksResponse: InvestorCommunicationServiceBatchCreateUploadLinksResponse, ): string { return JSON.stringify( InvestorCommunicationServiceBatchCreateUploadLinksResponse$outboundSchema .parse(investorCommunicationServiceBatchCreateUploadLinksResponse), ); } export function investorCommunicationServiceBatchCreateUploadLinksResponseFromJSON( jsonString: string, ): SafeParseResult< InvestorCommunicationServiceBatchCreateUploadLinksResponse, SDKValidationError > { return safeParse( jsonString, (x) => InvestorCommunicationServiceBatchCreateUploadLinksResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'InvestorCommunicationServiceBatchCreateUploadLinksResponse' from JSON`, ); }