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

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

export type PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest =
  {
    datasetId: string;
    importDatasetFromExplorerRequest:
      components.ImportDatasetFromExplorerRequest;
  };

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

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

export function postDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequestToJSON(
  postDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest:
    PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest,
): string {
  return JSON.stringify(
    PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest$outboundSchema
      .parse(
        postDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest,
      ),
  );
}
