/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: d915fc1978d1
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { Annotations$inboundSchema } from "./annotations.js";
import { MCPServerIcon$inboundSchema } from "./mcpservericon.js";
/** @internal */
export const ResourceLink$inboundSchema = z
    .object({
    name: z.string(),
    title: z.nullable(z.string()).optional(),
    uri: z.string(),
    description: z.nullable(z.string()).optional(),
    mimeType: z.nullable(z.string()).optional(),
    size: z.nullable(z.int()).optional(),
    icons: z.nullable(z.array(MCPServerIcon$inboundSchema)).optional(),
    annotations: z.nullable(Annotations$inboundSchema).optional(),
    _meta: z.nullable(z.record(z.string(), z.any())).optional(),
    type: z.literal("resource_link"),
}).catchall(z.any()).transform((v) => {
    return remap$(v, {
        "_meta": "meta",
    });
});
export function resourceLinkFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResourceLink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResourceLink' from JSON`);
}
//# sourceMappingURL=resourcelink.js.map