Class CfnPromptVersion.MessageProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnPromptVersion.MessageProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnPromptVersion.MessageProperty>
- Enclosing interface:
CfnPromptVersion.MessageProperty
@Stability(Stable)
public static final class CfnPromptVersion.MessageProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnPromptVersion.MessageProperty>
A builder for
CfnPromptVersion.MessageProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnPromptVersion.MessageProperty.getContent()content(IResolvable content) Sets the value ofCfnPromptVersion.MessageProperty.getContent()Sets the value ofCfnPromptVersion.MessageProperty.getRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
content
Sets the value ofCfnPromptVersion.MessageProperty.getContent()- Parameters:
content- The message content. Note the following restrictions:. This parameter is required.- 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:
this
-
content
@Stability(Stable) public CfnPromptVersion.MessageProperty.Builder content(List<? extends Object> content) Sets the value ofCfnPromptVersion.MessageProperty.getContent()- Parameters:
content- The message content. Note the following restrictions:. This parameter is required.- 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:
this
-
role
Sets the value ofCfnPromptVersion.MessageProperty.getRole()- Parameters:
role- The role that the message plays in the message. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnPromptVersion.MessageProperty>- Returns:
- a new instance of
CfnPromptVersion.MessageProperty - Throws:
NullPointerException- if any required attribute was not provided
-