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

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

export type AgentsApiV1ConversationsRestartStreamRequest = {
  /**
   * ID of the original conversation which is being restarted.
   */
  conversationId: string;
  conversationRestartStreamRequest: components.ConversationRestartStreamRequest;
};

/** @internal */
export type AgentsApiV1ConversationsRestartStreamRequest$Outbound = {
  conversation_id: string;
  ConversationRestartStreamRequest:
    components.ConversationRestartStreamRequest$Outbound;
};

/** @internal */
export const AgentsApiV1ConversationsRestartStreamRequest$outboundSchema:
  z.ZodType<
    AgentsApiV1ConversationsRestartStreamRequest$Outbound,
    z.ZodTypeDef,
    AgentsApiV1ConversationsRestartStreamRequest
  > = z.object({
    conversationId: z.string(),
    conversationRestartStreamRequest:
      components.ConversationRestartStreamRequest$outboundSchema,
  }).transform((v) => {
    return remap$(v, {
      conversationId: "conversation_id",
      conversationRestartStreamRequest: "ConversationRestartStreamRequest",
    });
  });

export function agentsApiV1ConversationsRestartStreamRequestToJSON(
  agentsApiV1ConversationsRestartStreamRequest:
    AgentsApiV1ConversationsRestartStreamRequest,
): string {
  return JSON.stringify(
    AgentsApiV1ConversationsRestartStreamRequest$outboundSchema.parse(
      agentsApiV1ConversationsRestartStreamRequest,
    ),
  );
}
