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

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

export type PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest =
  {
    datasetId: string;
    importDatasetFromCampaignRequest:
      components.ImportDatasetFromCampaignRequest;
  };

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

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

export function postDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequestToJSON(
  postDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest:
    PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest,
): string {
  return JSON.stringify(
    PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest$outboundSchema
      .parse(
        postDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest,
      ),
  );
}
