/*
 * 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 StreamMetricsRequest$inboundSchema = z.object({
    set: components.StreamMetricSet$inboundSchema,
    start: z.number().int().optional(),
    end: z.number().int().optional(),
    interval: components.TimeseriesInterval$inboundSchema.optional(),
    basin: z.string(),
    stream: z.string(),
});
/** @internal */
export const StreamMetricsRequest$outboundSchema = z.object({
    set: components.StreamMetricSet$outboundSchema,
    start: z.number().int().optional(),
    end: z.number().int().optional(),
    interval: components.TimeseriesInterval$outboundSchema.optional(),
    basin: z.string(),
    stream: 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 StreamMetricsRequest$;
(function (StreamMetricsRequest$) {
    /** @deprecated use `StreamMetricsRequest$inboundSchema` instead. */
    StreamMetricsRequest$.inboundSchema = StreamMetricsRequest$inboundSchema;
    /** @deprecated use `StreamMetricsRequest$outboundSchema` instead. */
    StreamMetricsRequest$.outboundSchema = StreamMetricsRequest$outboundSchema;
})(StreamMetricsRequest$ || (StreamMetricsRequest$ = {}));
export function streamMetricsRequestToJSON(streamMetricsRequest) {
    return JSON.stringify(StreamMetricsRequest$outboundSchema.parse(streamMetricsRequest));
}
export function streamMetricsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => StreamMetricsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamMetricsRequest' from JSON`);
}
//# sourceMappingURL=streammetrics.js.map