Record Class Inventory
java.lang.Object
java.lang.Record
io.agentscope.extensions.aistio.model.Inventory
public record Inventory(List<Inventory.SubagentInfo> subagents, List<Inventory.WorkspaceInfo> workspaces, Inventory.InstanceHealth health)
extends Record
Instance-level runtime inventory: subagents, workspaces and health, reported right after connect
and then at the Level-1 cadence.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordLiveness of this data plane instance.static final recordA subagent reachable from this instance.static final recordA workspace mounted by this instance. -
Constructor Summary
ConstructorsConstructorDescriptionInventory(List<Inventory.SubagentInfo> subagents, List<Inventory.WorkspaceInfo> workspaces, Inventory.InstanceHealth health) Creates an instance of aInventoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.health()Returns the value of thehealthrecord component.static InventoryhealthOnly(int activeSessions) Returns the value of thesubagentsrecord component.toProto()final StringtoString()Returns a string representation of this record class.Returns the value of theworkspacesrecord component.
-
Constructor Details
-
Inventory
public Inventory(List<Inventory.SubagentInfo> subagents, List<Inventory.WorkspaceInfo> workspaces, Inventory.InstanceHealth health) Creates an instance of aInventoryrecord class.- Parameters:
subagents- the value for thesubagentsrecord componentworkspaces- the value for theworkspacesrecord componenthealth- the value for thehealthrecord component
-
-
Method Details
-
healthOnly
-
toProto
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
subagents
Returns the value of thesubagentsrecord component.- Returns:
- the value of the
subagentsrecord component
-
workspaces
Returns the value of theworkspacesrecord component.- Returns:
- the value of the
workspacesrecord component
-
health
Returns the value of thehealthrecord component.- Returns:
- the value of the
healthrecord component
-