ProtocolVersion enum
Enum of the known protocol versions.
Values
- v2024_11_05 → const ProtocolVersion
-
const ProtocolVersion('2024-11-05', supportsStreamableHttp: false, addedMethods: {CompleteRequest.methodName, InitializeRequest.methodName, SetLevelRequest.methodName, CancelledNotification.me… - v2025_03_26 → const ProtocolVersion
-
const ProtocolVersion('2025-03-26', supportsStreamableHttp: false) - v2025_06_18 → const ProtocolVersion
-
const ProtocolVersion('2025-06-18', supportsStreamableHttp: false, addedMethods: {ElicitRequest.methodName}) - v2025_11_25 → const ProtocolVersion
-
const ProtocolVersion('2025-11-25', supportsStreamableHttp: false, addedMethods: {ElicitationCompleteNotification.methodName, 'notifications/tasks/status', 'tasks/cance… - v2026_07_28 → const ProtocolVersion
-
const ProtocolVersion('2026-07-28', supportsStreamableHttp: true, addedMethods: {SubscriptionsAcknowledgedNotification.methodName, DiscoverRequest.methodName, SubscriptionsListenRequest.method…
Properties
-
addedMethods
→ Set<
String> -
The methods this revision introduced.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isLegacyVersion → bool
-
Whether this is a legacy, handshake-based version this API supports.
no setter
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter -
removedMethods
→ Set<
String> -
The methods this revision stopped accepting.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsStreamableHttp → bool
-
Whether this package's Streamable HTTP transport supports this revision.
final
- versionString → String
-
The version string used over the wire to identify this version.
final
Methods
-
methodIsValid(
String method) → bool -
Whether
methodis one this revision accepts. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator <(
ProtocolVersion other) → bool -
operator <=(
ProtocolVersion other) → bool -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
ProtocolVersion other) → bool -
operator >=(
ProtocolVersion other) → bool
Static Methods
-
tryParse(
String version) → ProtocolVersion? -
Returns the ProtocolVersion based on the
versionstring, ornullif it was not recognized.
Constants
- lastLegacyVersion → const ProtocolVersion
- The most recent legacy version supported by the current API.
- oldestSupported → const ProtocolVersion
- The oldest version supported by the current API.
-
values
→ const List<
ProtocolVersion> - A constant List of the values in this enum, in order of their declaration.