Class BetaMemoryTool20250818Command
-
- All Implemented Interfaces:
public final class BetaMemoryTool20250818Command
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaMemoryTool20250818Command.VisitorAn interface that defines how to map each variant of BetaMemoryTool20250818Command to a value of type T.
-
Method Summary
-
-
Method Detail
-
view
final Optional<BetaMemoryTool20250818ViewCommand> view()
-
create
final Optional<BetaMemoryTool20250818CreateCommand> create()
-
strReplace
final Optional<BetaMemoryTool20250818StrReplaceCommand> strReplace()
-
insert
final Optional<BetaMemoryTool20250818InsertCommand> insert()
-
delete
final Optional<BetaMemoryTool20250818DeleteCommand> delete()
-
rename
final Optional<BetaMemoryTool20250818RenameCommand> rename()
-
isStrReplace
final Boolean isStrReplace()
-
asView
final BetaMemoryTool20250818ViewCommand asView()
-
asCreate
final BetaMemoryTool20250818CreateCommand asCreate()
-
asStrReplace
final BetaMemoryTool20250818StrReplaceCommand asStrReplace()
-
asInsert
final BetaMemoryTool20250818InsertCommand asInsert()
-
asDelete
final BetaMemoryTool20250818DeleteCommand asDelete()
-
asRename
final BetaMemoryTool20250818RenameCommand asRename()
-
accept
final <T extends Any> T accept(BetaMemoryTool20250818Command.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 = betaMemoryTool20250818Command.accept(new BetaMemoryTool20250818Command.Visitor<Optional<String>>() { @Override public Optional<String> visitView(BetaMemoryTool20250818ViewCommand view) { return Optional.of(view.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaMemoryTool20250818Command 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.
-
ofView
final static BetaMemoryTool20250818Command ofView(BetaMemoryTool20250818ViewCommand view)
-
ofCreate
final static BetaMemoryTool20250818Command ofCreate(BetaMemoryTool20250818CreateCommand create)
-
ofStrReplace
final static BetaMemoryTool20250818Command ofStrReplace(BetaMemoryTool20250818StrReplaceCommand strReplace)
-
ofInsert
final static BetaMemoryTool20250818Command ofInsert(BetaMemoryTool20250818InsertCommand insert)
-
ofDelete
final static BetaMemoryTool20250818Command ofDelete(BetaMemoryTool20250818DeleteCommand delete)
-
ofRename
final static BetaMemoryTool20250818Command ofRename(BetaMemoryTool20250818RenameCommand rename)
-
-
-
-