/*
 * 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 AgentsApiV1ConversationsRestartRequest = {
  /**
   * ID of the original conversation which is being restarted.
   */
  conversationId: string;
  conversationRestartRequest: components.ConversationRestartRequest;
};

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

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

export function agentsApiV1ConversationsRestartRequestToJSON(
  agentsApiV1ConversationsRestartRequest:
    AgentsApiV1ConversationsRestartRequest,
): string {
  return JSON.stringify(
    AgentsApiV1ConversationsRestartRequest$outboundSchema.parse(
      agentsApiV1ConversationsRestartRequest,
    ),
  );
}
