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

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

export type GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest =
  {
    datasetId: string;
    pageSize?: number | undefined;
    page?: number | undefined;
  };

/** @internal */
export type GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$Outbound =
  {
    dataset_id: string;
    page_size: number;
    page: number;
  };

/** @internal */
export const GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$outboundSchema:
  z.ZodType<
    GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$Outbound,
    GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest
  > = z.object({
    datasetId: z.string(),
    pageSize: z.int().default(50),
    page: z.int().default(1),
  }).transform((v) => {
    return remap$(v, {
      datasetId: "dataset_id",
      pageSize: "page_size",
    });
  });

export function getDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequestToJSON(
  getDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest:
    GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest,
): string {
  return JSON.stringify(
    GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$outboundSchema
      .parse(
        getDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest,
      ),
  );
}
