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

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import {
  ToolConfiguration,
  ToolConfiguration$Outbound,
  ToolConfiguration$outboundSchema,
} from "./toolconfiguration.js";

export type ImageGenerationTool = {
  toolConfiguration?: ToolConfiguration | null | undefined;
  type: "image_generation";
};

/** @internal */
export type ImageGenerationTool$Outbound = {
  tool_configuration?: ToolConfiguration$Outbound | null | undefined;
  type: "image_generation";
};

/** @internal */
export const ImageGenerationTool$outboundSchema: z.ZodType<
  ImageGenerationTool$Outbound,
  ImageGenerationTool
> = z.object({
  toolConfiguration: z.nullable(ToolConfiguration$outboundSchema).optional(),
  type: z.literal("image_generation"),
}).transform((v) => {
  return remap$(v, {
    toolConfiguration: "tool_configuration",
  });
});

export function imageGenerationToolToJSON(
  imageGenerationTool: ImageGenerationTool,
): string {
  return JSON.stringify(
    ImageGenerationTool$outboundSchema.parse(imageGenerationTool),
  );
}
