@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ContentBlock extends Object implements Serializable, Cloneable, StructuredPojo
A block of content for a message.
Constructor and Description |
---|
ContentBlock() |
Modifier and Type | Method and Description |
---|---|
ContentBlock |
clone() |
boolean |
equals(Object obj) |
ImageBlock |
getImage()
Image to include in the message.
|
String |
getText()
Text to include in the message.
|
ToolResultBlock |
getToolResult()
The result for a tool request that a model makes.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setImage(ImageBlock image)
Image to include in the message.
|
void |
setText(String text)
Text to include in the message.
|
void |
setToolResult(ToolResultBlock toolResult)
The result for a tool request that a model makes.
|
String |
toString()
Returns a string representation of this object.
|
ContentBlock |
withImage(ImageBlock image)
Image to include in the message.
|
ContentBlock |
withText(String text)
Text to include in the message.
|
ContentBlock |
withToolResult(ToolResultBlock toolResult)
The result for a tool request that a model makes.
|
public void setText(String text)
Text to include in the message.
text
- Text to include in the message.public String getText()
Text to include in the message.
public ContentBlock withText(String text)
Text to include in the message.
text
- Text to include in the message.public void setImage(ImageBlock image)
Image to include in the message.
This field is only supported by Anthropic Claude 3 models.
image
- Image to include in the message. This field is only supported by Anthropic Claude 3 models.
public ImageBlock getImage()
Image to include in the message.
This field is only supported by Anthropic Claude 3 models.
This field is only supported by Anthropic Claude 3 models.
public ContentBlock withImage(ImageBlock image)
Image to include in the message.
This field is only supported by Anthropic Claude 3 models.
image
- Image to include in the message. This field is only supported by Anthropic Claude 3 models.
public void setToolResult(ToolResultBlock toolResult)
The result for a tool request that a model makes.
toolResult
- The result for a tool request that a model makes.public ToolResultBlock getToolResult()
The result for a tool request that a model makes.
public ContentBlock withToolResult(ToolResultBlock toolResult)
The result for a tool request that a model makes.
toolResult
- The result for a tool request that a model makes.public String toString()
toString
in class Object
Object.toString()
public ContentBlock clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.