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

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

export type PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest =
  {
    datasetId: string;
    importDatasetFromFileRequest: components.ImportDatasetFromFileRequest;
  };

/** @internal */
export type PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$Outbound =
  {
    dataset_id: string;
    ImportDatasetFromFileRequest:
      components.ImportDatasetFromFileRequest$Outbound;
  };

/** @internal */
export const PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$outboundSchema:
  z.ZodType<
    PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$Outbound,
    PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest
  > = z.object({
    datasetId: z.string(),
    importDatasetFromFileRequest:
      components.ImportDatasetFromFileRequest$outboundSchema,
  }).transform((v) => {
    return remap$(v, {
      datasetId: "dataset_id",
      importDatasetFromFileRequest: "ImportDatasetFromFileRequest",
    });
  });

export function postDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequestToJSON(
  postDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest:
    PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest,
): string {
  return JSON.stringify(
    PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$outboundSchema
      .parse(
        postDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest,
      ),
  );
}
