Record Class ClientCapabilitiesSerializable
java.lang.Object
java.lang.Record
com.mulesoft.connectors.mcp.internal.server.connection.ClientCapabilitiesSerializable
- All Implemented Interfaces:
Serializable
public record ClientCapabilitiesSerializable(Map<String,Object> experimental, ClientCapabilitiesSerializable.RootCapabilities roots, ClientCapabilitiesSerializable.Sampling sampling)
extends Record
implements Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionClientCapabilitiesSerializable(Map<String, Object> experimental, ClientCapabilitiesSerializable.RootCapabilities roots, ClientCapabilitiesSerializable.Sampling sampling) Creates an instance of aClientCapabilitiesSerializablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexperimentalrecord component.fromOriginal(io.modelcontextprotocol.spec.McpSchema.ClientCapabilities original) Creates a new ClientCapabilitiesSerializable object from an original ClientCapabilities object.final inthashCode()Returns a hash code value for this object.roots()Returns the value of therootsrecord component.sampling()Returns the value of thesamplingrecord component.io.modelcontextprotocol.spec.McpSchema.ClientCapabilitiesConverts this ClientCapabilitiesV2 object back to an original ClientCapabilities object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClientCapabilitiesSerializable
public ClientCapabilitiesSerializable(Map<String, Object> experimental, ClientCapabilitiesSerializable.RootCapabilities roots, ClientCapabilitiesSerializable.Sampling sampling) Creates an instance of aClientCapabilitiesSerializablerecord class.- Parameters:
experimental- the value for theexperimentalrecord componentroots- the value for therootsrecord componentsampling- the value for thesamplingrecord component
-
-
Method Details
-
experimental
Returns the value of theexperimentalrecord component.- Returns:
- the value of the
experimentalrecord component
-
roots
Returns the value of therootsrecord component.- Returns:
- the value of the
rootsrecord component
-
sampling
Returns the value of thesamplingrecord component.- Returns:
- the value of the
samplingrecord component
-
fromOriginal
public static ClientCapabilitiesSerializable fromOriginal(io.modelcontextprotocol.spec.McpSchema.ClientCapabilities original) Creates a new ClientCapabilitiesSerializable object from an original ClientCapabilities object. This method performs a deep copy of the data.- Parameters:
original- The original ClientCapabilities object.- Returns:
- A new ClientCapabilitiesSerializable object.
-
toOriginal
public io.modelcontextprotocol.spec.McpSchema.ClientCapabilities toOriginal()Converts this ClientCapabilitiesV2 object back to an original ClientCapabilities object.- Returns:
- A new ClientCapabilities object with the same data.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
-