Class TracePart
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.TracePart
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ResponseStream
,ToCopyableBuilder<TracePart.Builder,TracePart>
- Direct Known Subclasses:
DefaultTrace
@Generated("software.amazon.awssdk:codegen") public class TracePart extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TracePart.Builder,TracePart>, ResponseStream
Contains information about the agent and session, alongside the agent's reasoning process and results from calling API actions and querying knowledge bases and metadata about the trace. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TracePart.Builder
protected static class
TracePart.BuilderImpl
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.ResponseStream
ResponseStream.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.ResponseStream
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TracePart(TracePart.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(InvokeAgentResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofTracePart
.String
agentAliasId()
The unique identifier of the alias of the agent.String
agentId()
The unique identifier of the agent.String
agentVersion()
The version of the agent.static TracePart.Builder
builder()
TracePart
copy(Consumer<? super TracePart.Builder> modifier)
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
List<SdkField<?>>
sdkFields()
static Class<? extends TracePart.Builder>
serializableBuilderClass()
String
sessionId()
The unique identifier of the session with the agent.TracePart.Builder
toBuilder()
String
toString()
Returns a string representation of this object.Trace
trace()
Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.ResponseStream
sdkEventType
-
-
-
-
Constructor Detail
-
TracePart
protected TracePart(TracePart.BuilderImpl builder)
-
-
Method Detail
-
agentAliasId
public final String agentAliasId()
The unique identifier of the alias of the agent.
- Returns:
- The unique identifier of the alias of the agent.
-
agentId
public final String agentId()
The unique identifier of the agent.
- Returns:
- The unique identifier of the agent.
-
agentVersion
public final String agentVersion()
The version of the agent.
- Returns:
- The version of the agent.
-
sessionId
public final String sessionId()
The unique identifier of the session with the agent.
- Returns:
- The unique identifier of the session with the agent.
-
trace
public final Trace trace()
Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.
- Returns:
- Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.
-
toBuilder
public TracePart.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<TracePart.Builder,TracePart>
-
builder
public static TracePart.Builder builder()
-
serializableBuilderClass
public static Class<? extends TracePart.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
copy
public final TracePart copy(Consumer<? super TracePart.Builder> modifier)
- Specified by:
copy
in interfaceToCopyableBuilder<TracePart.Builder,TracePart>
-
accept
public void accept(InvokeAgentResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofTracePart
.- Specified by:
accept
in interfaceResponseStream
- Parameters:
visitor
- Visitor to invoke.
-
-