"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Gauge$ = exports.Gauge$outboundSchema = exports.Gauge$inboundSchema = exports.GaugeValues$ = exports.GaugeValues$outboundSchema = exports.GaugeValues$inboundSchema = void 0;
exports.gaugeValuesToJSON = gaugeValuesToJSON;
exports.gaugeValuesFromJSON = gaugeValuesFromJSON;
exports.gaugeToJSON = gaugeToJSON;
exports.gaugeFromJSON = gaugeFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const metricunit_js_1 = require("./metricunit.js");
/** @internal */
exports.GaugeValues$inboundSchema = z.union([z.number().int(), z.number()]);
/** @internal */
exports.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.
 */
var GaugeValues$;
(function (GaugeValues$) {
    /** @deprecated use `GaugeValues$inboundSchema` instead. */
    GaugeValues$.inboundSchema = exports.GaugeValues$inboundSchema;
    /** @deprecated use `GaugeValues$outboundSchema` instead. */
    GaugeValues$.outboundSchema = exports.GaugeValues$outboundSchema;
})(GaugeValues$ || (exports.GaugeValues$ = GaugeValues$ = {}));
function gaugeValuesToJSON(gaugeValues) {
    return JSON.stringify(exports.GaugeValues$outboundSchema.parse(gaugeValues));
}
function gaugeValuesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GaugeValues$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GaugeValues' from JSON`);
}
/** @internal */
exports.Gauge$inboundSchema = z
    .object({
    name: z.string(),
    unit: metricunit_js_1.MetricUnit$inboundSchema,
    values: z.array(z.array(z.union([z.number().int(), z.number()]))),
});
/** @internal */
exports.Gauge$outboundSchema = z.object({
    name: z.string(),
    unit: metricunit_js_1.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.
 */
var Gauge$;
(function (Gauge$) {
    /** @deprecated use `Gauge$inboundSchema` instead. */
    Gauge$.inboundSchema = exports.Gauge$inboundSchema;
    /** @deprecated use `Gauge$outboundSchema` instead. */
    Gauge$.outboundSchema = exports.Gauge$outboundSchema;
})(Gauge$ || (exports.Gauge$ = Gauge$ = {}));
function gaugeToJSON(gauge) {
    return JSON.stringify(exports.Gauge$outboundSchema.parse(gauge));
}
function gaugeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Gauge$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Gauge' from JSON`);
}
//# sourceMappingURL=gauge.js.map