Class BetaManagedAgentsMultiagentRosterEntryParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsMultiagentRosterEntryParamsAn entry in a multiagent roster: an agent ID string, a versioned agent reference, or
self.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsMultiagentRosterEntryParams.VisitorAn interface that defines how to map each variant of BetaManagedAgentsMultiagentRosterEntryParams to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>string()final Optional<BetaManagedAgentsAgentParams>agent()Specification for an Agent. final Optional<BetaManagedAgentsMultiagentSelfParams>self()Sentinel roster entry meaning "the agent that owns this configuration". final BooleanisString()final BooleanisAgent()final BooleanisSelf()final StringasString()final BetaManagedAgentsAgentParamsasAgent()Specification for an Agent. final BetaManagedAgentsMultiagentSelfParamsasSelf()Sentinel roster entry meaning "the agent that owns this configuration". final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaManagedAgentsMultiagentRosterEntryParams.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaManagedAgentsMultiagentRosterEntryParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsMultiagentRosterEntryParamsofString(String string)final static BetaManagedAgentsMultiagentRosterEntryParamsofAgent(BetaManagedAgentsAgentParams agent)Specification for an Agent. final static BetaManagedAgentsMultiagentRosterEntryParamsofSelf(BetaManagedAgentsMultiagentSelfParams self)Sentinel roster entry meaning "the agent that owns this configuration". -
-
Method Detail
-
agent
final Optional<BetaManagedAgentsAgentParams> agent()
Specification for an Agent. Provide a specific
versionor use the short-formagent="agent_id"for the most recent version
-
self
final Optional<BetaManagedAgentsMultiagentSelfParams> self()
Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.
-
asAgent
final BetaManagedAgentsAgentParams asAgent()
Specification for an Agent. Provide a specific
versionor use the short-formagent="agent_id"for the most recent version
-
asSelf
final BetaManagedAgentsMultiagentSelfParams asSelf()
Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.
-
accept
final <T extends Any> T accept(BetaManagedAgentsMultiagentRosterEntryParams.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 = betaManagedAgentsMultiagentRosterEntryParams.accept(new BetaManagedAgentsMultiagentRosterEntryParams.Visitor<Optional<String>>() { @Override public Optional<String> visitString(String string) { return Optional.of(string.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsMultiagentRosterEntryParams 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.
-
ofString
final static BetaManagedAgentsMultiagentRosterEntryParams ofString(String string)
-
ofAgent
final static BetaManagedAgentsMultiagentRosterEntryParams ofAgent(BetaManagedAgentsAgentParams agent)
Specification for an Agent. Provide a specific
versionor use the short-formagent="agent_id"for the most recent version
-
ofSelf
final static BetaManagedAgentsMultiagentRosterEntryParams ofSelf(BetaManagedAgentsMultiagentSelfParams self)
Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.
-
-
-
-