Class BetaContextManagementResponse.AppliedEdit
-
- All Implemented Interfaces:
public final class BetaContextManagementResponse.AppliedEdit
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaContextManagementResponse.AppliedEdit.VisitorAn interface that defines how to map each variant of AppliedEdit to a value of type T.
-
Method Summary
-
-
Method Detail
-
clearToolUses20250919
final Optional<BetaClearToolUses20250919EditResponse> clearToolUses20250919()
-
clearThinking20251015
final Optional<BetaClearThinking20251015EditResponse> clearThinking20251015()
-
isClearToolUses20250919
final Boolean isClearToolUses20250919()
-
isClearThinking20251015
final Boolean isClearThinking20251015()
-
asClearToolUses20250919
final BetaClearToolUses20250919EditResponse asClearToolUses20250919()
-
asClearThinking20251015
final BetaClearThinking20251015EditResponse asClearThinking20251015()
-
accept
final <T extends Any> T accept(BetaContextManagementResponse.AppliedEdit.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 = appliedEdit.accept(new AppliedEdit.Visitor<Optional<String>>() { @Override public Optional<String> visitClearToolUses20250919(BetaClearToolUses20250919EditResponse clearToolUses20250919) { return Optional.of(clearToolUses20250919.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaContextManagementResponse.AppliedEdit 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.
-
ofClearToolUses20250919
final static BetaContextManagementResponse.AppliedEdit ofClearToolUses20250919(BetaClearToolUses20250919EditResponse clearToolUses20250919)
-
ofClearThinking20251015
final static BetaContextManagementResponse.AppliedEdit ofClearThinking20251015(BetaClearThinking20251015EditResponse clearThinking20251015)
-
-
-
-