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

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

export type AgentsApiV1AgentsUpdateVersionRequest = {
  agentId: string;
  version: number;
};

/** @internal */
export type AgentsApiV1AgentsUpdateVersionRequest$Outbound = {
  agent_id: string;
  version: number;
};

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

export function agentsApiV1AgentsUpdateVersionRequestToJSON(
  agentsApiV1AgentsUpdateVersionRequest: AgentsApiV1AgentsUpdateVersionRequest,
): string {
  return JSON.stringify(
    AgentsApiV1AgentsUpdateVersionRequest$outboundSchema.parse(
      agentsApiV1AgentsUpdateVersionRequest,
    ),
  );
}
