Interface Metadata.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Metadata.Builder,Metadata>,SdkBuilder<Metadata.Builder,Metadata>,SdkPojo
- Enclosing class:
- Metadata
@Mutable @NotThreadSafe public static interface Metadata.Builder extends SdkPojo, CopyableBuilder<Metadata.Builder,Metadata>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Metadata.BuilderclientRequestId(String clientRequestId)A unique identifier associated with the downstream invocation.Metadata.BuilderendTime(Instant endTime)In the final response,endTimeis the end time of the agent invocation operation.Metadata.BuilderoperationTotalTimeMs(Long operationTotalTimeMs)The total time it took for the agent to complete execution.Metadata.BuilderstartTime(Instant startTime)In the final response,startTimeis the start time of the agent invocation operation.Metadata.BuildertotalTimeMs(Long totalTimeMs)The total execution time for the specific invocation being processed (model, knowledge base, guardrail, agent collaborator, or code interpreter).default Metadata.Builderusage(Consumer<Usage.Builder> usage)Specific to model invocation and contains details about the usage of a foundation model.Metadata.Builderusage(Usage usage)Specific to model invocation and contains details about the usage of a foundation model.-
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
-
clientRequestId
Metadata.Builder clientRequestId(String clientRequestId)
A unique identifier associated with the downstream invocation. This ID can be used for tracing, debugging, and identifying specific invocations in customer logs or systems.
- Parameters:
clientRequestId- A unique identifier associated with the downstream invocation. This ID can be used for tracing, debugging, and identifying specific invocations in customer logs or systems.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endTime
Metadata.Builder endTime(Instant endTime)
In the final response,
endTimeis the end time of the agent invocation operation.- Parameters:
endTime- In the final response,endTimeis the end time of the agent invocation operation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
operationTotalTimeMs
Metadata.Builder operationTotalTimeMs(Long operationTotalTimeMs)
The total time it took for the agent to complete execution. This field is only set for the final response.
- Parameters:
operationTotalTimeMs- The total time it took for the agent to complete execution. This field is only set for the final response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
startTime
Metadata.Builder startTime(Instant startTime)
In the final response,
startTimeis the start time of the agent invocation operation.- Parameters:
startTime- In the final response,startTimeis the start time of the agent invocation operation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
totalTimeMs
Metadata.Builder totalTimeMs(Long totalTimeMs)
The total execution time for the specific invocation being processed (model, knowledge base, guardrail, agent collaborator, or code interpreter). It represents how long the individual invocation took.
- Parameters:
totalTimeMs- The total execution time for the specific invocation being processed (model, knowledge base, guardrail, agent collaborator, or code interpreter). It represents how long the individual invocation took.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usage
Metadata.Builder usage(Usage usage)
Specific to model invocation and contains details about the usage of a foundation model.
- Parameters:
usage- Specific to model invocation and contains details about the usage of a foundation model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usage
default Metadata.Builder usage(Consumer<Usage.Builder> usage)
Specific to model invocation and contains details about the usage of a foundation model.
This is a convenience method that creates an instance of theUsage.Builderavoiding the need to create one manually viaUsage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tousage(Usage).- Parameters:
usage- a consumer that will call methods onUsage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
usage(Usage)
-
-