/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { DeleteOnEmptyConfig$inboundSchema, DeleteOnEmptyConfig$outboundSchema, } from "./deleteonemptyconfig.js";
import { RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, } from "./retentionpolicy.js";
import { StorageClass$inboundSchema, StorageClass$outboundSchema, } from "./storageclass.js";
import { TimestampingConfig$inboundSchema, TimestampingConfig$outboundSchema, } from "./timestampingconfig.js";
/** @internal */
export const StreamConfig$inboundSchema = z.object({
    delete_on_empty: z.nullable(DeleteOnEmptyConfig$inboundSchema).optional(),
    retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
    storage_class: z.nullable(StorageClass$inboundSchema).optional(),
    timestamping: z.nullable(TimestampingConfig$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "delete_on_empty": "deleteOnEmpty",
        "retention_policy": "retentionPolicy",
        "storage_class": "storageClass",
    });
});
/** @internal */
export const StreamConfig$outboundSchema = z.object({
    deleteOnEmpty: z.nullable(DeleteOnEmptyConfig$outboundSchema).optional(),
    retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
    storageClass: z.nullable(StorageClass$outboundSchema).optional(),
    timestamping: z.nullable(TimestampingConfig$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        deleteOnEmpty: "delete_on_empty",
        retentionPolicy: "retention_policy",
        storageClass: "storage_class",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var StreamConfig$;
(function (StreamConfig$) {
    /** @deprecated use `StreamConfig$inboundSchema` instead. */
    StreamConfig$.inboundSchema = StreamConfig$inboundSchema;
    /** @deprecated use `StreamConfig$outboundSchema` instead. */
    StreamConfig$.outboundSchema = StreamConfig$outboundSchema;
})(StreamConfig$ || (StreamConfig$ = {}));
export function streamConfigToJSON(streamConfig) {
    return JSON.stringify(StreamConfig$outboundSchema.parse(streamConfig));
}
export function streamConfigFromJSON(jsonString) {
    return safeParse(jsonString, (x) => StreamConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamConfig' from JSON`);
}
//# sourceMappingURL=streamconfig.js.map