/* * 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 a Wire withdrawal transfer schedule */ export type CancelWireWithdrawalScheduleRequestCreate = { /** * A comment as to why the Wire withdrawal schedule is being canceled */ comment?: string | undefined; /** * The name of the Wire withdrawal transfer schedule to cancel */ name: string; }; /** @internal */ export const CancelWireWithdrawalScheduleRequestCreate$inboundSchema: z.ZodType< CancelWireWithdrawalScheduleRequestCreate, z.ZodTypeDef, unknown > = z.object({ comment: z.string().optional(), name: z.string(), }); /** @internal */ export type CancelWireWithdrawalScheduleRequestCreate$Outbound = { comment?: string | undefined; name: string; }; /** @internal */ export const CancelWireWithdrawalScheduleRequestCreate$outboundSchema: z.ZodType< CancelWireWithdrawalScheduleRequestCreate$Outbound, z.ZodTypeDef, CancelWireWithdrawalScheduleRequestCreate > = z.object({ comment: z.string().optional(), name: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelWireWithdrawalScheduleRequestCreate$ { /** @deprecated use `CancelWireWithdrawalScheduleRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelWireWithdrawalScheduleRequestCreate$inboundSchema; /** @deprecated use `CancelWireWithdrawalScheduleRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelWireWithdrawalScheduleRequestCreate$outboundSchema; /** @deprecated use `CancelWireWithdrawalScheduleRequestCreate$Outbound` instead. */ export type Outbound = CancelWireWithdrawalScheduleRequestCreate$Outbound; } export function cancelWireWithdrawalScheduleRequestCreateToJSON( cancelWireWithdrawalScheduleRequestCreate: CancelWireWithdrawalScheduleRequestCreate, ): string { return JSON.stringify( CancelWireWithdrawalScheduleRequestCreate$outboundSchema.parse( cancelWireWithdrawalScheduleRequestCreate, ), ); } export function cancelWireWithdrawalScheduleRequestCreateFromJSON( jsonString: string, ): SafeParseResult< CancelWireWithdrawalScheduleRequestCreate, SDKValidationError > { return safeParse( jsonString, (x) => CancelWireWithdrawalScheduleRequestCreate$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CancelWireWithdrawalScheduleRequestCreate' from JSON`, ); }