/*
 * 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 AgentsApiV1ConversationsAppendStreamRequest = {
  /**
   * ID of the conversation to which we append entries.
   */
  conversationId: string;
  conversationAppendStreamRequest: components.ConversationAppendStreamRequest;
};

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

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

export function agentsApiV1ConversationsAppendStreamRequestToJSON(
  agentsApiV1ConversationsAppendStreamRequest:
    AgentsApiV1ConversationsAppendStreamRequest,
): string {
  return JSON.stringify(
    AgentsApiV1ConversationsAppendStreamRequest$outboundSchema.parse(
      agentsApiV1ConversationsAppendStreamRequest,
    ),
  );
}
