/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";

export type CancelWorkflowInstanceRequest = {
  /**
   * The unique identifier of the account.
   */
  accountId?: string | undefined;
  workflowId?: string | undefined;
  /**
   * Unique identifier for the workflow instance
   */
  instanceId: string;
};

/** @internal */
export type CancelWorkflowInstanceRequest$Outbound = {
  accountId: string;
  workflowId: string;
  instanceId: string;
};

/** @internal */
export const CancelWorkflowInstanceRequest$outboundSchema: z.ZodType<
  CancelWorkflowInstanceRequest$Outbound,
  z.ZodTypeDef,
  CancelWorkflowInstanceRequest
> = z.object({
  accountId: z.string().default("00000000-0000-0000-0000-000000000000"),
  workflowId: z.string().default("00000000-0000-0000-0000-000000000000"),
  instanceId: z.string(),
});

export function cancelWorkflowInstanceRequestToJSON(
  cancelWorkflowInstanceRequest: CancelWorkflowInstanceRequest,
): string {
  return JSON.stringify(
    CancelWorkflowInstanceRequest$outboundSchema.parse(
      cancelWorkflowInstanceRequest,
    ),
  );
}
