Interface Message.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Message.Builder,Message>,SdkBuilder<Message.Builder,Message>,SdkPojo
- Enclosing class:
- Message
public static interface Message.Builder extends SdkPojo, CopyableBuilder<Message.Builder,Message>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Message.Buildercontent(Collection<ContentBlock> content)The message content.Message.Buildercontent(Consumer<ContentBlock.Builder>... content)The message content.Message.Buildercontent(ContentBlock... content)The message content.Message.Builderrole(String role)The role that the message plays in the message.Message.Builderrole(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, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
role
Message.Builder role(String 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:
ConversationRole,ConversationRole
-
role
Message.Builder role(ConversationRole 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:
ConversationRole,ConversationRole
-
content
Message.Builder content(Collection<ContentBlock> content)
The message content. Note the following restrictions:
-
You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
-
You can include up to five documents. Each document's size must be no more than 4.5 MB.
-
If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. -
You can only include images and documents if the
roleisuser.
- Parameters:
content- The message content. Note the following restrictions:-
You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
-
You can include up to five documents. Each document's size must be no more than 4.5 MB.
-
If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. -
You can only include images and documents if the
roleisuser.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
content
Message.Builder content(ContentBlock... content)
The message content. Note the following restrictions:
-
You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
-
You can include up to five documents. Each document's size must be no more than 4.5 MB.
-
If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. -
You can only include images and documents if the
roleisuser.
- Parameters:
content- The message content. Note the following restrictions:-
You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
-
You can include up to five documents. Each document's size must be no more than 4.5 MB.
-
If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. -
You can only include images and documents if the
roleisuser.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
content
Message.Builder content(Consumer<ContentBlock.Builder>... content)
The message content. Note the following restrictions:
-
You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
-
You can include up to five documents. Each document's size must be no more than 4.5 MB.
-
If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. -
You can only include images and documents if the
roleisuser.
ContentBlock.Builderavoiding the need to create one manually viaContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#content(List.) - 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:
#content(java.util.Collection)
-
-
-