/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DecimalCreate, DecimalCreate$inboundSchema, DecimalCreate$Outbound, DecimalCreate$outboundSchema, } from "./decimalcreate.js"; /** * Rights of Accumulation (ROA). An ROA allows an investor to aggregate their own fund shares with the holdings of certain related parties toward achieving the investment thresholds at which sales charge discounts become available. */ export type RightsOfAccumulationCreate = { /** * A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][]. * * @remarks * * [BigDecimal]: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html * [decimal.Decimal]: https://docs.python.org/3/library/decimal.html */ amount: DecimalCreate; }; /** @internal */ export const RightsOfAccumulationCreate$inboundSchema: z.ZodType< RightsOfAccumulationCreate, z.ZodTypeDef, unknown > = z.object({ amount: DecimalCreate$inboundSchema, }); /** @internal */ export type RightsOfAccumulationCreate$Outbound = { amount: DecimalCreate$Outbound; }; /** @internal */ export const RightsOfAccumulationCreate$outboundSchema: z.ZodType< RightsOfAccumulationCreate$Outbound, z.ZodTypeDef, RightsOfAccumulationCreate > = z.object({ amount: DecimalCreate$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RightsOfAccumulationCreate$ { /** @deprecated use `RightsOfAccumulationCreate$inboundSchema` instead. */ export const inboundSchema = RightsOfAccumulationCreate$inboundSchema; /** @deprecated use `RightsOfAccumulationCreate$outboundSchema` instead. */ export const outboundSchema = RightsOfAccumulationCreate$outboundSchema; /** @deprecated use `RightsOfAccumulationCreate$Outbound` instead. */ export type Outbound = RightsOfAccumulationCreate$Outbound; } export function rightsOfAccumulationCreateToJSON( rightsOfAccumulationCreate: RightsOfAccumulationCreate, ): string { return JSON.stringify( RightsOfAccumulationCreate$outboundSchema.parse(rightsOfAccumulationCreate), ); } export function rightsOfAccumulationCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RightsOfAccumulationCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RightsOfAccumulationCreate' from JSON`, ); }