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

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

export type PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest =
  {
    datasetId: string;
    importDatasetFromDatasetRequest: components.ImportDatasetFromDatasetRequest;
  };

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

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

export function postDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequestToJSON(
  postDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest:
    PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest,
): string {
  return JSON.stringify(
    PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest$outboundSchema
      .parse(
        postDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest,
      ),
  );
}
