/*
 * 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 AgentsApiV1AgentsUpdateRequest = {
  agentId: string;
  agentUpdateRequest: components.AgentUpdateRequest;
};

/** @internal */
export type AgentsApiV1AgentsUpdateRequest$Outbound = {
  agent_id: string;
  AgentUpdateRequest: components.AgentUpdateRequest$Outbound;
};

/** @internal */
export const AgentsApiV1AgentsUpdateRequest$outboundSchema: z.ZodType<
  AgentsApiV1AgentsUpdateRequest$Outbound,
  z.ZodTypeDef,
  AgentsApiV1AgentsUpdateRequest
> = z.object({
  agentId: z.string(),
  agentUpdateRequest: components.AgentUpdateRequest$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    agentId: "agent_id",
    agentUpdateRequest: "AgentUpdateRequest",
  });
});

export function agentsApiV1AgentsUpdateRequestToJSON(
  agentsApiV1AgentsUpdateRequest: AgentsApiV1AgentsUpdateRequest,
): string {
  return JSON.stringify(
    AgentsApiV1AgentsUpdateRequest$outboundSchema.parse(
      agentsApiV1AgentsUpdateRequest,
    ),
  );
}
