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.
public final classBetaManagedAgentsSkillParams.Type
-
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 Optional<JsonValue>_json()final BetaManagedAgentsSkillParams.Typetype()final StringskillId()final Optional<String>version()final BooleanisAnthropic()final BooleanisCustom()final BetaManagedAgentsAnthropicSkillParamsasAnthropic()An Anthropic-managed skill. final BetaManagedAgentsCustomSkillParamsasCustom()A user-created custom skill. 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 BetaManagedAgentsSkillParamsofAnthropic(String skillId)Returns an immutable instance of BetaManagedAgentsSkillParams whose ofAnthropic variant is built from the given required skillId. final static BetaManagedAgentsSkillParamsofCustom(BetaManagedAgentsCustomSkillParams custom)A user-created custom skill. final static BetaManagedAgentsSkillParamsofCustom(String skillId)Returns an immutable instance of BetaManagedAgentsSkillParams whose ofCustom variant is built from the given required skillId. -
-
Method Detail
-
anthropic
final Optional<BetaManagedAgentsAnthropicSkillParams> anthropic()
An Anthropic-managed skill.
-
custom
final Optional<BetaManagedAgentsCustomSkillParams> custom()
A user-created custom skill.
-
type
final BetaManagedAgentsSkillParams.Type type()
-
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.
-
ofAnthropic
final static BetaManagedAgentsSkillParams ofAnthropic(String skillId)
Returns an immutable instance of BetaManagedAgentsSkillParams whose ofAnthropic variant is built from the given required skillId.
-
ofCustom
final static BetaManagedAgentsSkillParams ofCustom(BetaManagedAgentsCustomSkillParams custom)
A user-created custom skill.
-
ofCustom
final static BetaManagedAgentsSkillParams ofCustom(String skillId)
Returns an immutable instance of BetaManagedAgentsSkillParams whose ofCustom variant is built from the given required skillId.
-
-
-
-