Class BetaManagedAgentsAgentToolConfig
-
- All Implemented Interfaces:
public final class BetaManagedAgentsAgentToolConfigConfiguration for a specific agent tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsAgentToolConfig.VisitorAn interface that defines how to map each variant of BetaManagedAgentsAgentToolConfig to a value of type T.
public final classBetaManagedAgentsAgentToolConfig.Type
-
Method Summary
-
-
Method Detail
-
bash
final Optional<BetaManagedAgentsBashToolConfig> bash()
Configuration for the bash tool.
-
edit
final Optional<BetaManagedAgentsEditToolConfig> edit()
Configuration for the edit tool.
-
read
final Optional<BetaManagedAgentsReadToolConfig> read()
Configuration for the read tool.
-
write
final Optional<BetaManagedAgentsWriteToolConfig> write()
Configuration for the write tool.
-
glob
final Optional<BetaManagedAgentsGlobToolConfig> glob()
Configuration for the glob tool.
-
grep
final Optional<BetaManagedAgentsGrepToolConfig> grep()
Configuration for the grep tool.
-
webFetch
final Optional<BetaManagedAgentsWebFetchToolConfig> webFetch()
Configuration for the web_fetch tool.
-
webSearch
final Optional<BetaManagedAgentsWebSearchToolConfig> webSearch()
Configuration for the web_search tool.
-
type
final BetaManagedAgentsAgentToolConfig.Type type()
-
allowedDomains
final Optional<List<String>> allowedDomains()
-
blockedDomains
final Optional<List<String>> blockedDomains()
-
isWebFetch
final Boolean isWebFetch()
-
isWebSearch
final Boolean isWebSearch()
-
asBash
final BetaManagedAgentsBashToolConfig asBash()
Configuration for the bash tool.
-
asEdit
final BetaManagedAgentsEditToolConfig asEdit()
Configuration for the edit tool.
-
asRead
final BetaManagedAgentsReadToolConfig asRead()
Configuration for the read tool.
-
asWrite
final BetaManagedAgentsWriteToolConfig asWrite()
Configuration for the write tool.
-
asGlob
final BetaManagedAgentsGlobToolConfig asGlob()
Configuration for the glob tool.
-
asGrep
final BetaManagedAgentsGrepToolConfig asGrep()
Configuration for the grep tool.
-
asWebFetch
final BetaManagedAgentsWebFetchToolConfig asWebFetch()
Configuration for the web_fetch tool.
-
asWebSearch
final BetaManagedAgentsWebSearchToolConfig asWebSearch()
Configuration for the web_search tool.
-
accept
final <T extends Any> T accept(BetaManagedAgentsAgentToolConfig.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = betaManagedAgentsAgentToolConfig.accept(new BetaManagedAgentsAgentToolConfig.Visitor<Optional<String>>() { @Override public Optional<String> visitBash(BetaManagedAgentsBashToolConfig bash) { return Optional.of(bash.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsAgentToolConfig validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofBash
final static BetaManagedAgentsAgentToolConfig ofBash(BetaManagedAgentsBashToolConfig bash)
Configuration for the bash tool.
-
ofEdit
final static BetaManagedAgentsAgentToolConfig ofEdit(BetaManagedAgentsEditToolConfig edit)
Configuration for the edit tool.
-
ofRead
final static BetaManagedAgentsAgentToolConfig ofRead(BetaManagedAgentsReadToolConfig read)
Configuration for the read tool.
-
ofWrite
final static BetaManagedAgentsAgentToolConfig ofWrite(BetaManagedAgentsWriteToolConfig write)
Configuration for the write tool.
-
ofGlob
final static BetaManagedAgentsAgentToolConfig ofGlob(BetaManagedAgentsGlobToolConfig glob)
Configuration for the glob tool.
-
ofGrep
final static BetaManagedAgentsAgentToolConfig ofGrep(BetaManagedAgentsGrepToolConfig grep)
Configuration for the grep tool.
-
ofWebFetch
final static BetaManagedAgentsAgentToolConfig ofWebFetch(BetaManagedAgentsWebFetchToolConfig webFetch)
Configuration for the web_fetch tool.
-
ofWebSearch
final static BetaManagedAgentsAgentToolConfig ofWebSearch(BetaManagedAgentsWebSearchToolConfig webSearch)
Configuration for the web_search tool.
-
-
-
-