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

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

export type CreateIngestionPipelineConfigurationRequest = {
  name: string;
  pipelineComposition?: { [k: string]: string } | null | undefined;
};

/** @internal */
export type CreateIngestionPipelineConfigurationRequest$Outbound = {
  name: string;
  pipeline_composition?: { [k: string]: string } | null | undefined;
};

/** @internal */
export const CreateIngestionPipelineConfigurationRequest$outboundSchema:
  z.ZodType<
    CreateIngestionPipelineConfigurationRequest$Outbound,
    CreateIngestionPipelineConfigurationRequest
  > = z.object({
    name: z.string(),
    pipelineComposition: z.nullable(z.record(z.string(), z.string()))
      .optional(),
  }).transform((v) => {
    return remap$(v, {
      pipelineComposition: "pipeline_composition",
    });
  });

export function createIngestionPipelineConfigurationRequestToJSON(
  createIngestionPipelineConfigurationRequest:
    CreateIngestionPipelineConfigurationRequest,
): string {
  return JSON.stringify(
    CreateIngestionPipelineConfigurationRequest$outboundSchema.parse(
      createIngestionPipelineConfigurationRequest,
    ),
  );
}
