Class SamplingMessage
java.lang.Object
org.apache.juneau.bean.mcp.v20260728.SamplingMessage
One message in
CreateMessageRequest.getMessages() (MCP sampling).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe message content — a single block (text/image/audio/resource), not a list, matching the real sampling schema.getRole()The message role.setContent(Content value) Sets the message content.Sets the message role.
-
Constructor Details
-
SamplingMessage
public SamplingMessage()
-
-
Method Details
-
getRole
The message role. The real schema restricts sampling roles touser/assistant, a subset this reusedRoleenum already covers.- Returns:
- The role, or
nullif not set.
-
setRole
Sets the message role.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getContent
The message content — a single block (text/image/audio/resource), not a list, matching the real sampling schema.- Returns:
- The content, or
nullif not set.
-
setContent
Sets the message content.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-