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

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

export type GetJudgesV1ObservabilityJudgesGetRequest = {
  /**
   * Filter by judge output types
   */
  typeFilter?: Array<components.JudgeOutputType> | null | undefined;
  /**
   * Filter by model names
   */
  modelFilter?: Array<string> | null | undefined;
  pageSize?: number | undefined;
  page?: number | undefined;
  q?: string | null | undefined;
};

/** @internal */
export type GetJudgesV1ObservabilityJudgesGetRequest$Outbound = {
  type_filter?: Array<string> | null | undefined;
  model_filter?: Array<string> | null | undefined;
  page_size: number;
  page: number;
  q?: string | null | undefined;
};

/** @internal */
export const GetJudgesV1ObservabilityJudgesGetRequest$outboundSchema: z.ZodType<
  GetJudgesV1ObservabilityJudgesGetRequest$Outbound,
  GetJudgesV1ObservabilityJudgesGetRequest
> = z.object({
  typeFilter: z.nullable(z.array(components.JudgeOutputType$outboundSchema))
    .optional(),
  modelFilter: z.nullable(z.array(z.string())).optional(),
  pageSize: z.int().default(50),
  page: z.int().default(1),
  q: z.nullable(z.string()).optional(),
}).transform((v) => {
  return remap$(v, {
    typeFilter: "type_filter",
    modelFilter: "model_filter",
    pageSize: "page_size",
  });
});

export function getJudgesV1ObservabilityJudgesGetRequestToJSON(
  getJudgesV1ObservabilityJudgesGetRequest:
    GetJudgesV1ObservabilityJudgesGetRequest,
): string {
  return JSON.stringify(
    GetJudgesV1ObservabilityJudgesGetRequest$outboundSchema.parse(
      getJudgesV1ObservabilityJudgesGetRequest,
    ),
  );
}
