/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 1f94791cc6e1
 */

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

export type CreateVespaSchemaRequest = {
  name: string;
  documentCount?: number | null | undefined;
};

/** @internal */
export type CreateVespaSchemaRequest$Outbound = {
  name: string;
  document_count?: number | null | undefined;
};

/** @internal */
export const CreateVespaSchemaRequest$outboundSchema: z.ZodType<
  CreateVespaSchemaRequest$Outbound,
  CreateVespaSchemaRequest
> = z.object({
  name: z.string(),
  documentCount: z.nullable(z.int()).optional(),
}).transform((v) => {
  return remap$(v, {
    documentCount: "document_count",
  });
});

export function createVespaSchemaRequestToJSON(
  createVespaSchemaRequest: CreateVespaSchemaRequest,
): string {
  return JSON.stringify(
    CreateVespaSchemaRequest$outboundSchema.parse(createVespaSchemaRequest),
  );
}
