Class TextResourceContents
java.lang.Object
org.apache.juneau.bean.mcp.v20260728.TextResourceContents
- All Implemented Interfaces:
ResourceContents
@Marshalled(typeName="resourceText")
public class TextResourceContents
extends Object
implements ResourceContents
Text body for
resources/read results or embedded resource content.
Discriminator type value is resourceText to avoid colliding with TextContent's MCP
wire value text in the same JSON-RPC payload.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional MIME type.getText()UTF-8 text body.getUri()Resource URI.setMimeType(String value) Sets the MIME type.Sets the text body.Sets the resource URI.
-
Constructor Details
-
TextResourceContents
public TextResourceContents()
-
-
Method Details
-
getUri
Resource URI.- Returns:
- The URI, or
nullif not set.
-
setUri
Sets the resource URI.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getMimeType
Optional MIME type.- Returns:
- The MIME type, or
nullif not set.
-
setMimeType
Sets the MIME type.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getText
UTF-8 text body.- Returns:
- The text, or
nullif not set.
-
setText
Sets the text body.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-