using System.Text.Json.Serialization; namespace ModelContextProtocol.Protocol; /// /// Represents a notification indicating that a request has been cancelled by the client, /// and that any associated processing should cease immediately. /// /// /// This class is typically used in conjunction with the /// method identifier. When a client sends this notification, the server should attempt to /// cancel any ongoing operations associated with the specified request ID. /// public sealed class CancelledNotificationParams : NotificationParams { /// /// Gets or sets the ID of the request to cancel. /// /// /// This value must match the ID of an in-flight request that the sender wishes to cancel. /// [JsonPropertyName("requestId")] public required RequestId RequestId { get; set; } /// /// Gets or sets an optional string describing the reason for the cancellation request. /// [JsonPropertyName("reason")] public string? Reason { get; set; } }