/* * 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 option instruction */ export type CancelOptionInstructionRequestCreate = { /** * The name of the instruction to be cancelled. */ name: string; }; /** @internal */ export const CancelOptionInstructionRequestCreate$inboundSchema: z.ZodType< CancelOptionInstructionRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), }); /** @internal */ export type CancelOptionInstructionRequestCreate$Outbound = { name: string; }; /** @internal */ export const CancelOptionInstructionRequestCreate$outboundSchema: z.ZodType< CancelOptionInstructionRequestCreate$Outbound, z.ZodTypeDef, CancelOptionInstructionRequestCreate > = z.object({ 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 CancelOptionInstructionRequestCreate$ { /** @deprecated use `CancelOptionInstructionRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelOptionInstructionRequestCreate$inboundSchema; /** @deprecated use `CancelOptionInstructionRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelOptionInstructionRequestCreate$outboundSchema; /** @deprecated use `CancelOptionInstructionRequestCreate$Outbound` instead. */ export type Outbound = CancelOptionInstructionRequestCreate$Outbound; } export function cancelOptionInstructionRequestCreateToJSON( cancelOptionInstructionRequestCreate: CancelOptionInstructionRequestCreate, ): string { return JSON.stringify( CancelOptionInstructionRequestCreate$outboundSchema.parse( cancelOptionInstructionRequestCreate, ), ); } export function cancelOptionInstructionRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelOptionInstructionRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelOptionInstructionRequestCreate' from JSON`, ); }