Interface Message.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Message.Builder,
,Message> SdkBuilder<Message.Builder,
,Message> SdkPojo
- Enclosing class:
Message
-
Method Summary
Modifier and TypeMethodDescriptioncontent
(Collection<ContentBlock> content) The message content.content
(Consumer<ContentBlock.Builder>... content) The message content.content
(ContentBlock... content) The message content.The role that the message plays in the message.role
(ConversationRole role) The role that the message plays in the message.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
role
The role that the message plays in the message.
- Parameters:
role
- The role that the message plays in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
role
The role that the message plays in the message.
- Parameters:
role
- The role that the message plays in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
content
The message content.
- Parameters:
content
- The message content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The message content.
- Parameters:
content
- The message content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The message content.
This is a convenience method that creates an instance of theContentBlock.Builder
avoiding the need to create one manually viaContentBlock.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocontent(List<ContentBlock>)
.- Parameters:
content
- a consumer that will call methods onContentBlock.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-