/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 71ce8aa7b819
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type WorkflowUpdateRequest = {
  /**
   * New display name value
   */
  displayName?: string | null | undefined;
  /**
   * New description value
   */
  description?: string | null | undefined;
  /**
   * Whether to make the workflow available in the chat assistant
   */
  availableInChatAssistant?: boolean | null | undefined;
};

/** @internal */
export type WorkflowUpdateRequest$Outbound = {
  display_name?: string | null | undefined;
  description?: string | null | undefined;
  available_in_chat_assistant?: boolean | null | undefined;
};

/** @internal */
export const WorkflowUpdateRequest$outboundSchema: z.ZodType<
  WorkflowUpdateRequest$Outbound,
  WorkflowUpdateRequest
> = z.object({
  displayName: z.nullable(z.string()).optional(),
  description: z.nullable(z.string()).optional(),
  availableInChatAssistant: z.nullable(z.boolean()).optional(),
}).transform((v) => {
  return remap$(v, {
    displayName: "display_name",
    availableInChatAssistant: "available_in_chat_assistant",
  });
});

export function workflowUpdateRequestToJSON(
  workflowUpdateRequest: WorkflowUpdateRequest,
): string {
  return JSON.stringify(
    WorkflowUpdateRequest$outboundSchema.parse(workflowUpdateRequest),
  );
}
