/*
 * 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 { DeleteOnEmptyReconfiguration$inboundSchema, DeleteOnEmptyReconfiguration$outboundSchema, } from "./deleteonemptyreconfiguration.js";
import { RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, } from "./retentionpolicy.js";
import { StorageClass$inboundSchema, StorageClass$outboundSchema, } from "./storageclass.js";
import { TimestampingReconfiguration$inboundSchema, TimestampingReconfiguration$outboundSchema, } from "./timestampingreconfiguration.js";
/** @internal */
export const StreamReconfiguration$inboundSchema = z.object({
    delete_on_empty: z.nullable(DeleteOnEmptyReconfiguration$inboundSchema)
        .optional(),
    retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
    storage_class: z.nullable(StorageClass$inboundSchema).optional(),
    timestamping: z.nullable(TimestampingReconfiguration$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "delete_on_empty": "deleteOnEmpty",
        "retention_policy": "retentionPolicy",
        "storage_class": "storageClass",
    });
});
/** @internal */
export const StreamReconfiguration$outboundSchema = z.object({
    deleteOnEmpty: z.nullable(DeleteOnEmptyReconfiguration$outboundSchema)
        .optional(),
    retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
    storageClass: z.nullable(StorageClass$outboundSchema).optional(),
    timestamping: z.nullable(TimestampingReconfiguration$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 StreamReconfiguration$;
(function (StreamReconfiguration$) {
    /** @deprecated use `StreamReconfiguration$inboundSchema` instead. */
    StreamReconfiguration$.inboundSchema = StreamReconfiguration$inboundSchema;
    /** @deprecated use `StreamReconfiguration$outboundSchema` instead. */
    StreamReconfiguration$.outboundSchema = StreamReconfiguration$outboundSchema;
})(StreamReconfiguration$ || (StreamReconfiguration$ = {}));
export function streamReconfigurationToJSON(streamReconfiguration) {
    return JSON.stringify(StreamReconfiguration$outboundSchema.parse(streamReconfiguration));
}
export function streamReconfigurationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => StreamReconfiguration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamReconfiguration' from JSON`);
}
//# sourceMappingURL=streamreconfiguration.js.map