/*
 * 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 { StreamReconfiguration$inboundSchema, StreamReconfiguration$outboundSchema, } from "./streamreconfiguration.js";
/** @internal */
export const BasinReconfiguration$inboundSchema = z.object({
    create_stream_on_append: z.nullable(z.boolean()).optional(),
    create_stream_on_read: z.nullable(z.boolean()).optional(),
    default_stream_config: z.nullable(StreamReconfiguration$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "create_stream_on_append": "createStreamOnAppend",
        "create_stream_on_read": "createStreamOnRead",
        "default_stream_config": "defaultStreamConfig",
    });
});
/** @internal */
export const BasinReconfiguration$outboundSchema = z.object({
    createStreamOnAppend: z.nullable(z.boolean()).optional(),
    createStreamOnRead: z.nullable(z.boolean()).optional(),
    defaultStreamConfig: z.nullable(StreamReconfiguration$outboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        createStreamOnAppend: "create_stream_on_append",
        createStreamOnRead: "create_stream_on_read",
        defaultStreamConfig: "default_stream_config",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BasinReconfiguration$;
(function (BasinReconfiguration$) {
    /** @deprecated use `BasinReconfiguration$inboundSchema` instead. */
    BasinReconfiguration$.inboundSchema = BasinReconfiguration$inboundSchema;
    /** @deprecated use `BasinReconfiguration$outboundSchema` instead. */
    BasinReconfiguration$.outboundSchema = BasinReconfiguration$outboundSchema;
})(BasinReconfiguration$ || (BasinReconfiguration$ = {}));
export function basinReconfigurationToJSON(basinReconfiguration) {
    return JSON.stringify(BasinReconfiguration$outboundSchema.parse(basinReconfiguration));
}
export function basinReconfigurationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BasinReconfiguration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BasinReconfiguration' from JSON`);
}
//# sourceMappingURL=basinreconfiguration.js.map