/*
 * 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 { StreamConfig$inboundSchema, StreamConfig$outboundSchema, } from "./streamconfig.js";
/** @internal */
export const BasinConfig$inboundSchema = z.object({
    create_stream_on_append: z.boolean().optional(),
    create_stream_on_read: z.boolean().optional(),
    default_stream_config: z.nullable(StreamConfig$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "create_stream_on_append": "createStreamOnAppend",
        "create_stream_on_read": "createStreamOnRead",
        "default_stream_config": "defaultStreamConfig",
    });
});
/** @internal */
export const BasinConfig$outboundSchema = z.object({
    createStreamOnAppend: z.boolean().optional(),
    createStreamOnRead: z.boolean().optional(),
    defaultStreamConfig: z.nullable(StreamConfig$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 BasinConfig$;
(function (BasinConfig$) {
    /** @deprecated use `BasinConfig$inboundSchema` instead. */
    BasinConfig$.inboundSchema = BasinConfig$inboundSchema;
    /** @deprecated use `BasinConfig$outboundSchema` instead. */
    BasinConfig$.outboundSchema = BasinConfig$outboundSchema;
})(BasinConfig$ || (BasinConfig$ = {}));
export function basinConfigToJSON(basinConfig) {
    return JSON.stringify(BasinConfig$outboundSchema.parse(basinConfig));
}
export function basinConfigFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BasinConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BasinConfig' from JSON`);
}
//# sourceMappingURL=basinconfig.js.map