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

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

export type CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest =
  {
    datasetId: string;
    createDatasetRecordRequest: components.CreateDatasetRecordRequest;
  };

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

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

export function createDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequestToJSON(
  createDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest:
    CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest,
): string {
  return JSON.stringify(
    CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest$outboundSchema
      .parse(
        createDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest,
      ),
  );
}
