using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
///
/// Represents a root URI and its metadata in the Model Context Protocol.
///
///
/// Root URIs serve as entry points for resource navigation, typically representing
/// top-level directories or container resources that can be accessed and traversed.
/// Roots provide a hierarchical structure for organizing and accessing resources within the protocol.
/// Each root has a URI that uniquely identifies it and optional metadata like a human-readable name.
///
public sealed class Root
{
///
/// Gets or sets the URI of the root.
///
[JsonPropertyName("uri")]
[StringSyntax(StringSyntaxAttribute.Uri)]
public required string Uri { get; set; }
///
/// Gets or sets a human-readable name for the root.
///
[JsonPropertyName("name")]
public string? Name { get; set; }
///
/// Gets or sets additional metadata for the root.
///
///
/// This is reserved by the protocol for future use.
///
[JsonPropertyName("_meta")]
public JsonElement? Meta { get; set; }
}