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