/* * 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"; /** * A request for canceling a single execution. */ export type CancelExecutionRequestCreate = { /** * The name of the execution to cancel. */ name: string; }; /** @internal */ export const CancelExecutionRequestCreate$inboundSchema: z.ZodType< CancelExecutionRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), }); /** @internal */ export type CancelExecutionRequestCreate$Outbound = { name: string; }; /** @internal */ export const CancelExecutionRequestCreate$outboundSchema: z.ZodType< CancelExecutionRequestCreate$Outbound, z.ZodTypeDef, CancelExecutionRequestCreate > = 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 CancelExecutionRequestCreate$ { /** @deprecated use `CancelExecutionRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelExecutionRequestCreate$inboundSchema; /** @deprecated use `CancelExecutionRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelExecutionRequestCreate$outboundSchema; /** @deprecated use `CancelExecutionRequestCreate$Outbound` instead. */ export type Outbound = CancelExecutionRequestCreate$Outbound; } export function cancelExecutionRequestCreateToJSON( cancelExecutionRequestCreate: CancelExecutionRequestCreate, ): string { return JSON.stringify( CancelExecutionRequestCreate$outboundSchema.parse( cancelExecutionRequestCreate, ), ); } export function cancelExecutionRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelExecutionRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelExecutionRequestCreate' from JSON`, ); }