Class BetaManagedAgentsMultiagent
-
- All Implemented Interfaces:
public final class BetaManagedAgentsMultiagentResolved multiagent orchestration configuration as returned in API responses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsMultiagent.VisitorAn interface that defines how to map each variant of BetaManagedAgentsMultiagent to a value of type T.
public final classBetaManagedAgentsMultiagent.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaManagedAgentsMultiagentCoordinator>coordinator()Resolved coordinator topology with a concrete agent roster. final Optional<BetaManagedAgentsMultiagent20261001>multiagent20261001()Resolved multiagent configuration with three members, each enabled or disabled on its own. final Optional<JsonValue>_json()final BetaManagedAgentsMultiagent.Typetype()final BooleanisCoordinator()final BooleanisMultiagent20261001()final BetaManagedAgentsMultiagentCoordinatorasCoordinator()Resolved coordinator topology with a concrete agent roster. final BetaManagedAgentsMultiagent20261001asMultiagent20261001()Resolved multiagent configuration with three members, each enabled or disabled on its own. final <T extends Any> Taccept(BetaManagedAgentsMultiagent.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaManagedAgentsMultiagentvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsMultiagentofCoordinator(BetaManagedAgentsMultiagentCoordinator coordinator)Resolved coordinator topology with a concrete agent roster. final static BetaManagedAgentsMultiagentofCoordinator(List<BetaManagedAgentsMultiagentCoordinator.Agent> agents)Returns an immutable instance of BetaManagedAgentsMultiagent whose ofCoordinator variant is built from the given required agents. final static BetaManagedAgentsMultiagentofMultiagent20261001(BetaManagedAgentsMultiagent20261001 multiagent20261001)Resolved multiagent configuration with three members, each enabled or disabled on its own. -
-
Method Detail
-
coordinator
final Optional<BetaManagedAgentsMultiagentCoordinator> coordinator()
Resolved coordinator topology with a concrete agent roster.
-
multiagent20261001
final Optional<BetaManagedAgentsMultiagent20261001> multiagent20261001()
Resolved multiagent configuration with three members, each enabled or disabled on its own.
-
type
final BetaManagedAgentsMultiagent.Type type()
-
isCoordinator
final Boolean isCoordinator()
-
isMultiagent20261001
final Boolean isMultiagent20261001()
-
asCoordinator
final BetaManagedAgentsMultiagentCoordinator asCoordinator()
Resolved coordinator topology with a concrete agent roster.
-
asMultiagent20261001
final BetaManagedAgentsMultiagent20261001 asMultiagent20261001()
Resolved multiagent configuration with three members, each enabled or disabled on its own.
-
accept
final <T extends Any> T accept(BetaManagedAgentsMultiagent.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 = betaManagedAgentsMultiagent.accept(new BetaManagedAgentsMultiagent.Visitor<Optional<String>>() { @Override public Optional<String> visitCoordinator(BetaManagedAgentsMultiagentCoordinator coordinator) { return Optional.of(coordinator.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsMultiagent 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.
-
ofCoordinator
final static BetaManagedAgentsMultiagent ofCoordinator(BetaManagedAgentsMultiagentCoordinator coordinator)
Resolved coordinator topology with a concrete agent roster.
-
ofCoordinator
final static BetaManagedAgentsMultiagent ofCoordinator(List<BetaManagedAgentsMultiagentCoordinator.Agent> agents)
Returns an immutable instance of BetaManagedAgentsMultiagent whose ofCoordinator variant is built from the given required agents.
-
ofMultiagent20261001
final static BetaManagedAgentsMultiagent ofMultiagent20261001(BetaManagedAgentsMultiagent20261001 multiagent20261001)
Resolved multiagent configuration with three members, each enabled or disabled on its own.
-
-
-
-