Package com.google.genkit.plugins.mcp
Class MCPResourceContent.ContentPart
java.lang.Object
com.google.genkit.plugins.mcp.MCPResourceContent.ContentPart
- Enclosing class:
MCPResourceContent
Represents a single part of resource content.
-
Constructor Summary
ConstructorsConstructorDescriptionContentPart(String text, String blob, String mimeType) Creates a new content part. -
Method Summary
-
Constructor Details
-
ContentPart
Creates a new content part.- Parameters:
text- the text content (or null for binary)blob- the base64-encoded binary content (or null for text)mimeType- the MIME type
-
-
Method Details
-
getText
Gets the text content.- Returns:
- the text, or null if binary
-
getBlob
Gets the base64-encoded binary content.- Returns:
- the blob, or null if text
-
getMimeType
Gets the MIME type.- Returns:
- the MIME type
-
isText
public boolean isText()Checks if this part is text.- Returns:
- true if text
-
isBinary
public boolean isBinary()Checks if this part is binary.- Returns:
- true if binary
-