Class BetaManagedAgentsSkillParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSkillParamsSkill to load in the session container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsSkillParams.VisitorAn interface that defines how to map each variant of BetaManagedAgentsSkillParams to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<BetaManagedAgentsAnthropicSkillParams>anthropic()An Anthropic-managed skill. final Optional<BetaManagedAgentsCustomSkillParams>custom()A user-created custom skill. final BooleanisAnthropic()final BooleanisCustom()final BetaManagedAgentsAnthropicSkillParamsasAnthropic()An Anthropic-managed skill. final BetaManagedAgentsCustomSkillParamsasCustom()A user-created custom skill. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaManagedAgentsSkillParams.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaManagedAgentsSkillParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSkillParamsofAnthropic(BetaManagedAgentsAnthropicSkillParams anthropic)An Anthropic-managed skill. final static BetaManagedAgentsSkillParamsofCustom(BetaManagedAgentsCustomSkillParams custom)A user-created custom skill. -
-
Method Detail
-
anthropic
final Optional<BetaManagedAgentsAnthropicSkillParams> anthropic()
An Anthropic-managed skill.
-
custom
final Optional<BetaManagedAgentsCustomSkillParams> custom()
A user-created custom skill.
-
isAnthropic
final Boolean isAnthropic()
-
asAnthropic
final BetaManagedAgentsAnthropicSkillParams asAnthropic()
An Anthropic-managed skill.
-
asCustom
final BetaManagedAgentsCustomSkillParams asCustom()
A user-created custom skill.
-
accept
final <T extends Any> T accept(BetaManagedAgentsSkillParams.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 = betaManagedAgentsSkillParams.accept(new BetaManagedAgentsSkillParams.Visitor<Optional<String>>() { @Override public Optional<String> visitAnthropic(BetaManagedAgentsAnthropicSkillParams anthropic) { return Optional.of(anthropic.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsSkillParams 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.
-
ofAnthropic
final static BetaManagedAgentsSkillParams ofAnthropic(BetaManagedAgentsAnthropicSkillParams anthropic)
An Anthropic-managed skill.
-
ofCustom
final static BetaManagedAgentsSkillParams ofCustom(BetaManagedAgentsCustomSkillParams custom)
A user-created custom skill.
-
-
-
-