/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { MetricUnit$inboundSchema, MetricUnit$outboundSchema, } from "./metricunit.js";
/** @internal */
export const GaugeValues$inboundSchema = z.union([z.number().int(), z.number()]);
/** @internal */
export const GaugeValues$outboundSchema = z.union([z.number().int(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GaugeValues$;
(function (GaugeValues$) {
    /** @deprecated use `GaugeValues$inboundSchema` instead. */
    GaugeValues$.inboundSchema = GaugeValues$inboundSchema;
    /** @deprecated use `GaugeValues$outboundSchema` instead. */
    GaugeValues$.outboundSchema = GaugeValues$outboundSchema;
})(GaugeValues$ || (GaugeValues$ = {}));
export function gaugeValuesToJSON(gaugeValues) {
    return JSON.stringify(GaugeValues$outboundSchema.parse(gaugeValues));
}
export function gaugeValuesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GaugeValues$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GaugeValues' from JSON`);
}
/** @internal */
export const Gauge$inboundSchema = z
    .object({
    name: z.string(),
    unit: MetricUnit$inboundSchema,
    values: z.array(z.array(z.union([z.number().int(), z.number()]))),
});
/** @internal */
export const Gauge$outboundSchema = z.object({
    name: z.string(),
    unit: MetricUnit$outboundSchema,
    values: z.array(z.array(z.union([z.number().int(), z.number()]))),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Gauge$;
(function (Gauge$) {
    /** @deprecated use `Gauge$inboundSchema` instead. */
    Gauge$.inboundSchema = Gauge$inboundSchema;
    /** @deprecated use `Gauge$outboundSchema` instead. */
    Gauge$.outboundSchema = Gauge$outboundSchema;
})(Gauge$ || (Gauge$ = {}));
export function gaugeToJSON(gauge) {
    return JSON.stringify(Gauge$outboundSchema.parse(gauge));
}
export function gaugeFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Gauge$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Gauge' from JSON`);
}
//# sourceMappingURL=gauge.js.map