"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.Metric$ = exports.Metric$outboundSchema = exports.Metric$inboundSchema = exports.Metric1$ = exports.Metric1$outboundSchema = exports.Metric1$inboundSchema = exports.Two$ = exports.Two$outboundSchema = exports.Two$inboundSchema = exports.Three$ = exports.Three$outboundSchema = exports.Three$inboundSchema = exports.Four$ = exports.Four$outboundSchema = exports.Four$inboundSchema = void 0;
exports.fourToJSON = fourToJSON;
exports.fourFromJSON = fourFromJSON;
exports.threeToJSON = threeToJSON;
exports.threeFromJSON = threeFromJSON;
exports.twoToJSON = twoToJSON;
exports.twoFromJSON = twoFromJSON;
exports.metric1ToJSON = metric1ToJSON;
exports.metric1FromJSON = metric1FromJSON;
exports.metricToJSON = metricToJSON;
exports.metricFromJSON = metricFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const accumulation_js_1 = require("./accumulation.js");
const gauge_js_1 = require("./gauge.js");
const label_js_1 = require("./label.js");
const scalar_js_1 = require("./scalar.js");
/** @internal */
exports.Four$inboundSchema = z
    .object({
    label: label_js_1.Label$inboundSchema,
});
/** @internal */
exports.Four$outboundSchema = z.object({
    label: label_js_1.Label$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Four$;
(function (Four$) {
    /** @deprecated use `Four$inboundSchema` instead. */
    Four$.inboundSchema = exports.Four$inboundSchema;
    /** @deprecated use `Four$outboundSchema` instead. */
    Four$.outboundSchema = exports.Four$outboundSchema;
})(Four$ || (exports.Four$ = Four$ = {}));
function fourToJSON(four) {
    return JSON.stringify(exports.Four$outboundSchema.parse(four));
}
function fourFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Four$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Four' from JSON`);
}
/** @internal */
exports.Three$inboundSchema = z
    .object({
    gauge: gauge_js_1.Gauge$inboundSchema,
});
/** @internal */
exports.Three$outboundSchema = z.object({
    gauge: gauge_js_1.Gauge$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Three$;
(function (Three$) {
    /** @deprecated use `Three$inboundSchema` instead. */
    Three$.inboundSchema = exports.Three$inboundSchema;
    /** @deprecated use `Three$outboundSchema` instead. */
    Three$.outboundSchema = exports.Three$outboundSchema;
})(Three$ || (exports.Three$ = Three$ = {}));
function threeToJSON(three) {
    return JSON.stringify(exports.Three$outboundSchema.parse(three));
}
function threeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Three$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Three' from JSON`);
}
/** @internal */
exports.Two$inboundSchema = z
    .object({
    accumulation: accumulation_js_1.Accumulation$inboundSchema,
});
/** @internal */
exports.Two$outboundSchema = z
    .object({
    accumulation: accumulation_js_1.Accumulation$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Two$;
(function (Two$) {
    /** @deprecated use `Two$inboundSchema` instead. */
    Two$.inboundSchema = exports.Two$inboundSchema;
    /** @deprecated use `Two$outboundSchema` instead. */
    Two$.outboundSchema = exports.Two$outboundSchema;
})(Two$ || (exports.Two$ = Two$ = {}));
function twoToJSON(two) {
    return JSON.stringify(exports.Two$outboundSchema.parse(two));
}
function twoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Two$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Two' from JSON`);
}
/** @internal */
exports.Metric1$inboundSchema = z.object({
    scalar: scalar_js_1.Scalar$inboundSchema,
});
/** @internal */
exports.Metric1$outboundSchema = z.object({
    scalar: scalar_js_1.Scalar$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Metric1$;
(function (Metric1$) {
    /** @deprecated use `Metric1$inboundSchema` instead. */
    Metric1$.inboundSchema = exports.Metric1$inboundSchema;
    /** @deprecated use `Metric1$outboundSchema` instead. */
    Metric1$.outboundSchema = exports.Metric1$outboundSchema;
})(Metric1$ || (exports.Metric1$ = Metric1$ = {}));
function metric1ToJSON(metric1) {
    return JSON.stringify(exports.Metric1$outboundSchema.parse(metric1));
}
function metric1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Metric1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Metric1' from JSON`);
}
/** @internal */
exports.Metric$inboundSchema = z
    .union([
    z.lazy(() => exports.Metric1$inboundSchema),
    z.lazy(() => exports.Two$inboundSchema),
    z.lazy(() => exports.Three$inboundSchema),
    z.lazy(() => exports.Four$inboundSchema),
]);
/** @internal */
exports.Metric$outboundSchema = z.union([
    z.lazy(() => exports.Metric1$outboundSchema),
    z.lazy(() => exports.Two$outboundSchema),
    z.lazy(() => exports.Three$outboundSchema),
    z.lazy(() => exports.Four$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Metric$;
(function (Metric$) {
    /** @deprecated use `Metric$inboundSchema` instead. */
    Metric$.inboundSchema = exports.Metric$inboundSchema;
    /** @deprecated use `Metric$outboundSchema` instead. */
    Metric$.outboundSchema = exports.Metric$outboundSchema;
})(Metric$ || (exports.Metric$ = Metric$ = {}));
function metricToJSON(metric) {
    return JSON.stringify(exports.Metric$outboundSchema.parse(metric));
}
function metricFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Metric$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Metric' from JSON`);
}
//# sourceMappingURL=metric.js.map