/*
 * 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 AgentsApiV1AgentsCreateOrUpdateAliasRequest = {
  agentId: string;
  alias: string;
  version: number;
};

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

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

export function agentsApiV1AgentsCreateOrUpdateAliasRequestToJSON(
  agentsApiV1AgentsCreateOrUpdateAliasRequest:
    AgentsApiV1AgentsCreateOrUpdateAliasRequest,
): string {
  return JSON.stringify(
    AgentsApiV1AgentsCreateOrUpdateAliasRequest$outboundSchema.parse(
      agentsApiV1AgentsCreateOrUpdateAliasRequest,
    ),
  );
}
