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

import * as z from "zod/v4";

/**
 * Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
 */
export type Prediction = {
  type?: "content" | undefined;
  content?: string | undefined;
};

/** @internal */
export type Prediction$Outbound = {
  type: "content";
  content: string;
};

/** @internal */
export const Prediction$outboundSchema: z.ZodType<
  Prediction$Outbound,
  Prediction
> = z.object({
  type: z.literal("content").default("content" as const),
  content: z.string().default(""),
});

export function predictionToJSON(prediction: Prediction): string {
  return JSON.stringify(Prediction$outboundSchema.parse(prediction));
}
