/* * 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"; /** * Request to cancel an existing ICT withdrawal */ export type CancelIctWithdrawalRequestCreate = { /** * Full name of the ICT withdrawal resource, which contains account id and ICT withdrawal id */ name: string; /** * Reason why the ICT withdrawal is being canceled */ reason?: string | undefined; }; /** @internal */ export const CancelIctWithdrawalRequestCreate$inboundSchema: z.ZodType< CancelIctWithdrawalRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type CancelIctWithdrawalRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const CancelIctWithdrawalRequestCreate$outboundSchema: z.ZodType< CancelIctWithdrawalRequestCreate$Outbound, z.ZodTypeDef, CancelIctWithdrawalRequestCreate > = z.object({ name: z.string(), reason: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelIctWithdrawalRequestCreate$ { /** @deprecated use `CancelIctWithdrawalRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelIctWithdrawalRequestCreate$inboundSchema; /** @deprecated use `CancelIctWithdrawalRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelIctWithdrawalRequestCreate$outboundSchema; /** @deprecated use `CancelIctWithdrawalRequestCreate$Outbound` instead. */ export type Outbound = CancelIctWithdrawalRequestCreate$Outbound; } export function cancelIctWithdrawalRequestCreateToJSON( cancelIctWithdrawalRequestCreate: CancelIctWithdrawalRequestCreate, ): string { return JSON.stringify( CancelIctWithdrawalRequestCreate$outboundSchema.parse( cancelIctWithdrawalRequestCreate, ), ); } export function cancelIctWithdrawalRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelIctWithdrawalRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelIctWithdrawalRequestCreate' from JSON`, ); }