/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import * as components from "../components/index.js";
/** @internal */
export const BasinMetricsRequest$inboundSchema = z.object({
    set: components.BasinMetricSet$inboundSchema,
    start: z.number().int().optional(),
    end: z.number().int().optional(),
    interval: components.TimeseriesInterval$inboundSchema.optional(),
    basin: z.string(),
});
/** @internal */
export const BasinMetricsRequest$outboundSchema = z.object({
    set: components.BasinMetricSet$outboundSchema,
    start: z.number().int().optional(),
    end: z.number().int().optional(),
    interval: components.TimeseriesInterval$outboundSchema.optional(),
    basin: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BasinMetricsRequest$;
(function (BasinMetricsRequest$) {
    /** @deprecated use `BasinMetricsRequest$inboundSchema` instead. */
    BasinMetricsRequest$.inboundSchema = BasinMetricsRequest$inboundSchema;
    /** @deprecated use `BasinMetricsRequest$outboundSchema` instead. */
    BasinMetricsRequest$.outboundSchema = BasinMetricsRequest$outboundSchema;
})(BasinMetricsRequest$ || (BasinMetricsRequest$ = {}));
export function basinMetricsRequestToJSON(basinMetricsRequest) {
    return JSON.stringify(BasinMetricsRequest$outboundSchema.parse(basinMetricsRequest));
}
export function basinMetricsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BasinMetricsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BasinMetricsRequest' from JSON`);
}
//# sourceMappingURL=basinmetrics.js.map