Class Tool
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockruntime.model.Tool
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Tool.Builder,Tool>
@Generated("software.amazon.awssdk:codegen") public final class Tool extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Tool.Builder,Tool>
Information about a tool that you can use with the Converse API. For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTool.Builderstatic classTool.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Tool.Builderbuilder()CachePointBlockcachePoint()CachePoint to include in the tool configuration.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static ToolfromCachePoint(Consumer<CachePointBlock.Builder> cachePoint)Create an instance of this class withcachePoint()initialized to the given value.static ToolfromCachePoint(CachePointBlock cachePoint)Create an instance of this class withcachePoint()initialized to the given value.static ToolfromToolSpec(Consumer<ToolSpecification.Builder> toolSpec)Create an instance of this class withtoolSpec()initialized to the given value.static ToolfromToolSpec(ToolSpecification toolSpec)Create an instance of this class withtoolSpec()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Tool.Builder>serializableBuilderClass()Tool.BuildertoBuilder()ToolSpecificationtoolSpec()The specfication for the tool.StringtoString()Returns a string representation of this object.Tool.Typetype()Retrieve an enum value representing which member of this object is populated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
toolSpec
public final ToolSpecification toolSpec()
The specfication for the tool.
- Returns:
- The specfication for the tool.
-
cachePoint
public final CachePointBlock cachePoint()
CachePoint to include in the tool configuration.
- Returns:
- CachePoint to include in the tool configuration.
-
toBuilder
public Tool.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Tool.Builder,Tool>
-
builder
public static Tool.Builder builder()
-
serializableBuilderClass
public static Class<? extends Tool.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin 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.
-
fromToolSpec
public static Tool fromToolSpec(ToolSpecification toolSpec)
Create an instance of this class withtoolSpec()initialized to the given value.The specfication for the tool.
- Parameters:
toolSpec- The specfication for the tool.
-
fromToolSpec
public static Tool fromToolSpec(Consumer<ToolSpecification.Builder> toolSpec)
Create an instance of this class withtoolSpec()initialized to the given value.The specfication for the tool.
- Parameters:
toolSpec- The specfication for the tool.
-
fromCachePoint
public static Tool fromCachePoint(CachePointBlock cachePoint)
Create an instance of this class withcachePoint()initialized to the given value.CachePoint to include in the tool configuration.
- Parameters:
cachePoint- CachePoint to include in the tool configuration.
-
fromCachePoint
public static Tool fromCachePoint(Consumer<CachePointBlock.Builder> cachePoint)
Create an instance of this class withcachePoint()initialized to the given value.CachePoint to include in the tool configuration.
- Parameters:
cachePoint- CachePoint to include in the tool configuration.
-
type
public Tool.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beTool.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beTool.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-