/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { Bucket, Bucket$Outbound, Bucket$outboundSchema } from "./bucket.js"; import { CommitmentType, CommitmentType$outboundSchema, } from "./commitment-type.js"; import { CreatePriceRequest, CreatePriceRequest$Outbound, CreatePriceRequest$outboundSchema, } from "./create-price-request.js"; export type CommitmentBucketRequest = { commitmentType?: CommitmentType | undefined; commitmentValue?: string | undefined; end?: Bucket | undefined; id?: string | undefined; overageFactor?: string | undefined; price?: CreatePriceRequest | undefined; start?: Bucket | undefined; trueUpEnabled?: boolean | undefined; }; /** @internal */ export type CommitmentBucketRequest$Outbound = { commitment_type?: string | undefined; commitment_value?: string | undefined; end?: Bucket$Outbound | undefined; id?: string | undefined; overage_factor?: string | undefined; price?: CreatePriceRequest$Outbound | undefined; start?: Bucket$Outbound | undefined; true_up_enabled?: boolean | undefined; }; /** @internal */ export const CommitmentBucketRequest$outboundSchema: z.ZodMiniType< CommitmentBucketRequest$Outbound, CommitmentBucketRequest > = z.pipe( z.object({ commitmentType: z.optional(CommitmentType$outboundSchema), commitmentValue: z.optional(z.string()), end: z.optional(Bucket$outboundSchema), id: z.optional(z.string()), overageFactor: z.optional(z.string()), price: z.optional(CreatePriceRequest$outboundSchema), start: z.optional(Bucket$outboundSchema), trueUpEnabled: z.optional(z.boolean()), }), z.transform((v) => { return remap$(v, { commitmentType: "commitment_type", commitmentValue: "commitment_value", overageFactor: "overage_factor", trueUpEnabled: "true_up_enabled", }); }), ); export function commitmentBucketRequestToJSON( commitmentBucketRequest: CommitmentBucketRequest, ): string { return JSON.stringify( CommitmentBucketRequest$outboundSchema.parse(commitmentBucketRequest), ); }