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

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

export type PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest =
  {
    datasetId: string;
    importDatasetFromPlaygroundRequest:
      components.ImportDatasetFromPlaygroundRequest;
  };

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

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

export function postDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequestToJSON(
  postDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest:
    PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest,
): string {
  return JSON.stringify(
    PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest$outboundSchema
      .parse(
        postDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest,
      ),
  );
}
