Class CodeInterpreterResult.BuilderImpl
- All Implemented Interfaces:
SdkPojo,CodeInterpreterResult.Builder,Buildable,CopyableBuilder<CodeInterpreterResult.Builder,,CodeInterpreterResult> SdkBuilder<CodeInterpreterResult.Builder,CodeInterpreterResult>
- Enclosing class:
- CodeInterpreterResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()content(Collection<ContentBlock> content) The textual content of the execution result.content(Consumer<ContentBlock.Builder>... content) The textual content of the execution result.content(ContentBlock... content) The textual content of the execution result.final List<ContentBlock.Builder>final BooleanIndicates whether the result represents an error.final voidsetContent(Collection<software.amazon.awssdk.services.bedrockagentcore.model.ContentBlock.BuilderImpl> content) final voidsetIsError(Boolean isError) final voidsetStructuredContent(software.amazon.awssdk.services.bedrockagentcore.model.ToolResultStructuredContent.BuilderImpl structuredContent) structuredContent(ToolResultStructuredContent structuredContent) The structured content of the execution result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.services.bedrockagentcore.model.CodeInterpreterResult.Builder
structuredContentMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutationMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields
-
Constructor Details
-
BuilderImpl
protected BuilderImpl() -
BuilderImpl
-
-
Method Details
-
getContent
-
setContent
public final void setContent(Collection<software.amazon.awssdk.services.bedrockagentcore.model.ContentBlock.BuilderImpl> content) -
content
Description copied from interface:CodeInterpreterResult.BuilderThe textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
- Specified by:
contentin interfaceCodeInterpreterResult.Builder- Parameters:
content- The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
Description copied from interface:CodeInterpreterResult.BuilderThe textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
- Specified by:
contentin interfaceCodeInterpreterResult.Builder- Parameters:
content- The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
@SafeVarargs public final CodeInterpreterResult.Builder content(Consumer<ContentBlock.Builder>... content) Description copied from interface:CodeInterpreterResult.BuilderThe textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
This is a convenience method that creates an instance of theContentBlock.Builderavoiding the need to create one manually viaContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toCodeInterpreterResult.Builder.content(List<ContentBlock>).- Specified by:
contentin interfaceCodeInterpreterResult.Builder- 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:
-
getStructuredContent
-
setStructuredContent
public final void setStructuredContent(software.amazon.awssdk.services.bedrockagentcore.model.ToolResultStructuredContent.BuilderImpl structuredContent) -
structuredContent
public final CodeInterpreterResult.Builder structuredContent(ToolResultStructuredContent structuredContent) Description copied from interface:CodeInterpreterResult.BuilderThe structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.
- Specified by:
structuredContentin interfaceCodeInterpreterResult.Builder- Parameters:
structuredContent- The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getIsError
-
setIsError
-
isError
Description copied from interface:CodeInterpreterResult.BuilderIndicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.
- Specified by:
isErrorin interfaceCodeInterpreterResult.Builder- Parameters:
isError- Indicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
build
- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<CodeInterpreterResult.Builder,CodeInterpreterResult>
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-