/* * 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 Check withdrawal transfer schedule */ export type CancelCheckWithdrawalScheduleRequestCreate = { /** * A comment as to why the Check withdrawal schedule is being canceled */ comment?: string | undefined; /** * The name of the Check withdrawal transfer schedule to cancel */ name: string; }; /** @internal */ export const CancelCheckWithdrawalScheduleRequestCreate$inboundSchema: z.ZodType = z.object({ comment: z.string().optional(), name: z.string(), }); /** @internal */ export type CancelCheckWithdrawalScheduleRequestCreate$Outbound = { comment?: string | undefined; name: string; }; /** @internal */ export const CancelCheckWithdrawalScheduleRequestCreate$outboundSchema: z.ZodType< CancelCheckWithdrawalScheduleRequestCreate$Outbound, z.ZodTypeDef, CancelCheckWithdrawalScheduleRequestCreate > = 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 CancelCheckWithdrawalScheduleRequestCreate$ { /** @deprecated use `CancelCheckWithdrawalScheduleRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelCheckWithdrawalScheduleRequestCreate$inboundSchema; /** @deprecated use `CancelCheckWithdrawalScheduleRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelCheckWithdrawalScheduleRequestCreate$outboundSchema; /** @deprecated use `CancelCheckWithdrawalScheduleRequestCreate$Outbound` instead. */ export type Outbound = CancelCheckWithdrawalScheduleRequestCreate$Outbound; } export function cancelCheckWithdrawalScheduleRequestCreateToJSON( cancelCheckWithdrawalScheduleRequestCreate: CancelCheckWithdrawalScheduleRequestCreate, ): string { return JSON.stringify( CancelCheckWithdrawalScheduleRequestCreate$outboundSchema.parse( cancelCheckWithdrawalScheduleRequestCreate, ), ); } export function cancelCheckWithdrawalScheduleRequestCreateFromJSON( jsonString: string, ): SafeParseResult< CancelCheckWithdrawalScheduleRequestCreate, SDKValidationError > { return safeParse( jsonString, (x) => CancelCheckWithdrawalScheduleRequestCreate$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CancelCheckWithdrawalScheduleRequestCreate' from JSON`, ); }