"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.ResourceSet$ = exports.ResourceSet$outboundSchema = exports.ResourceSet$inboundSchema = exports.Exact$ = exports.Exact$outboundSchema = exports.Exact$inboundSchema = exports.Prefix$ = exports.Prefix$outboundSchema = exports.Prefix$inboundSchema = void 0;
exports.prefixToJSON = prefixToJSON;
exports.prefixFromJSON = prefixFromJSON;
exports.exactToJSON = exactToJSON;
exports.exactFromJSON = exactFromJSON;
exports.resourceSetToJSON = resourceSetToJSON;
exports.resourceSetFromJSON = resourceSetFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Prefix$inboundSchema = z
    .object({
    prefix: z.string(),
});
/** @internal */
exports.Prefix$outboundSchema = z.object({
    prefix: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Prefix$;
(function (Prefix$) {
    /** @deprecated use `Prefix$inboundSchema` instead. */
    Prefix$.inboundSchema = exports.Prefix$inboundSchema;
    /** @deprecated use `Prefix$outboundSchema` instead. */
    Prefix$.outboundSchema = exports.Prefix$outboundSchema;
})(Prefix$ || (exports.Prefix$ = Prefix$ = {}));
function prefixToJSON(prefix) {
    return JSON.stringify(exports.Prefix$outboundSchema.parse(prefix));
}
function prefixFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Prefix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Prefix' from JSON`);
}
/** @internal */
exports.Exact$inboundSchema = z
    .object({
    exact: z.string(),
});
/** @internal */
exports.Exact$outboundSchema = z.object({
    exact: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Exact$;
(function (Exact$) {
    /** @deprecated use `Exact$inboundSchema` instead. */
    Exact$.inboundSchema = exports.Exact$inboundSchema;
    /** @deprecated use `Exact$outboundSchema` instead. */
    Exact$.outboundSchema = exports.Exact$outboundSchema;
})(Exact$ || (exports.Exact$ = Exact$ = {}));
function exactToJSON(exact) {
    return JSON.stringify(exports.Exact$outboundSchema.parse(exact));
}
function exactFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Exact$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Exact' from JSON`);
}
/** @internal */
exports.ResourceSet$inboundSchema = z.union([
    z.lazy(() => exports.Exact$inboundSchema),
    z.lazy(() => exports.Prefix$inboundSchema),
]);
/** @internal */
exports.ResourceSet$outboundSchema = z.union([
    z.lazy(() => exports.Exact$outboundSchema),
    z.lazy(() => exports.Prefix$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResourceSet$;
(function (ResourceSet$) {
    /** @deprecated use `ResourceSet$inboundSchema` instead. */
    ResourceSet$.inboundSchema = exports.ResourceSet$inboundSchema;
    /** @deprecated use `ResourceSet$outboundSchema` instead. */
    ResourceSet$.outboundSchema = exports.ResourceSet$outboundSchema;
})(ResourceSet$ || (exports.ResourceSet$ = ResourceSet$ = {}));
function resourceSetToJSON(resourceSet) {
    return JSON.stringify(exports.ResourceSet$outboundSchema.parse(resourceSet));
}
function resourceSetFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResourceSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResourceSet' from JSON`);
}
//# sourceMappingURL=resourceset.js.map