AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.controlplane.proto.SessionReportOrBuilder
源码Source io/agentscope/controlplane/proto/SessionReport.java:257–678

构建器,用于构建并配置目标实例。位于 io.agentscope.controlplane.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.controlplane.proto.SessionReportOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。


Session state report (periodic batch, e.g. every 10s)

Protobuf type agentscope.protocol.v1.SessionReport

方法摘要Method Summary

方法Method说明Description
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal
获取描述符。
Returns the descriptor.
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 `internalGetFieldAccessorTable` 结果。
Returns the internal get field accessor table.
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 `getDescriptorForType`。
Returns the descriptor for type.
public io.agentscope.controlplane.proto.SessionReport getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
public io.agentscope.controlplane.proto.SessionReport build()
构建并返回最终实例。
Creates and returns an instance.
public io.agentscope.controlplane.proto.SessionReport buildPartial()
构建 `buildPartial`。
Builds the partial.
public Builder mergeFrom(com.google.protobuf.Message other)
设置该配置项。
Performs the merge from operation.
public Builder mergeFrom(io.agentscope.controlplane.proto.SessionReport other)
设置该配置项。
Performs the merge from operation.
public final boolean isInitialized()
final
判断是否已初始化。
Returns whether the initialized.
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
设置该配置项。
Performs the merge from operation.
public java.util.List<io.agentscope.controlplane.proto.SessionSnapshot> getSessionsList()
获取会话列表。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public int getSessionsCount()
获取会话数量。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public io.agentscope.controlplane.proto.SessionSnapshot getSessions(int index)
获取会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder setSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot value)
设置设置会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder setSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)
设置设置会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder addSessions(io.agentscope.controlplane.proto.SessionSnapshot value)
添加会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder addSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot value)
添加会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder addSessions(io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)
添加会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder addSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)
添加会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder addAllSessions(java.lang.Iterable<? extends io.agentscope.controlplane.proto.SessionSnapshot> values)
添加所有会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder clearSessions()
清空会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public Builder removeSessions(int index)
移除会话。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public io.agentscope.controlplane.proto.SessionSnapshot.Builder getSessionsBuilder(int index)
获取会话构建器。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public io.agentscope.controlplane.proto.SessionSnapshotOrBuilder getSessionsOrBuilder(int index)
获取会话或构建器。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public java.util.List<? extends io.agentscope.controlplane.proto.SessionSnapshotOrBuilder> getSessionsOrBuilderList()
获取会话或构建器列表。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public io.agentscope.controlplane.proto.SessionSnapshot.Builder addSessionsBuilder()
添加会话构建器。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public io.agentscope.controlplane.proto.SessionSnapshot.Builder addSessionsBuilder(int index)
添加会话构建器。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`
public java.util.List<io.agentscope.controlplane.proto.SessionSnapshot.Builder> getSessionsBuilderList()
获取会话构建器列表。
`repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;`

方法详情Method Detail

getDescriptor

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
staticfinal

获取描述符。

Returns the descriptor.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/SessionReport.java:261–264

internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

返回 internalGetFieldAccessorTable 结果。

Returns the internal get field accessor table.

返回Returns com.google.protobuf.GeneratedMessage.FieldAccessorTable
返回com.google.protobuf.GeneratedMessage.FieldAccessorTable。Returns com google protobuf generated message field accessor table.
源码Source io/agentscope/controlplane/proto/SessionReport.java:266–272

clear

public Builder clear()

清空或重置内部状态。

Clears or resets internal state.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:284–296

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

获取 getDescriptorForType。

Returns the descriptor for type.

返回Returns com.google.protobuf.Descriptors.Descriptor
返回com.google.protobuf.Descriptors.Descriptor。Returns com google protobuf descriptors descriptor.
源码Source io/agentscope/controlplane/proto/SessionReport.java:298–302

getDefaultInstanceForType

public io.agentscope.controlplane.proto.SessionReport getDefaultInstanceForType()

获取默认实例用于类型。

Returns the default instance for type.

返回Returns io.agentscope.controlplane.proto.SessionReport
返回io.agentscope.controlplane.协议.SessionReport。Returns io agentscope controlplane proto session report.
源码Source io/agentscope/controlplane/proto/SessionReport.java:304–307

build

public io.agentscope.controlplane.proto.SessionReport build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns io.agentscope.controlplane.proto.SessionReport
返回io.agentscope.controlplane.协议.SessionReport。Returns io agentscope controlplane proto session report.
源码Source io/agentscope/controlplane/proto/SessionReport.java:309–316

buildPartial

public io.agentscope.controlplane.proto.SessionReport buildPartial()

构建 buildPartial。

Builds the partial.

返回Returns io.agentscope.controlplane.proto.SessionReport
返回io.agentscope.controlplane.协议.SessionReport。Returns io agentscope controlplane proto session report.
源码Source io/agentscope/controlplane/proto/SessionReport.java:318–325

mergeFrom

public Builder mergeFrom(com.google.protobuf.Message other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
othercom.google.protobuf.Messageother(类型 `com.google.protobuf.Message`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:343–351

mergeFrom

public Builder mergeFrom(io.agentscope.controlplane.proto.SessionReport other)

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
otherio.agentscope.controlplane.proto.SessionReportother(类型 `io.agentscope.controlplane.proto.SessionReport`)。The other.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:353–384

isInitialized

public final boolean isInitialized()
final

判断是否已初始化。

Returns whether the initialized.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/controlplane/proto/SessionReport.java:386–389

mergeFrom

public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException

设置该配置项。

Performs the merge from operation.

参数Parameters
名称Name类型Type说明Description
inputcom.google.protobuf.CodedInputStream输入消息(类型 `com.google.protobuf.CodedInputStream`)。The input.
extensionRegistrycom.google.protobuf.ExtensionRegistryLite扩展注册表(类型 `com.google.protobuf.ExtensionRegistryLite`)。The extension registry.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
抛出Throws
  • java.io.IOException 可能抛出 `java.io.IOException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/controlplane/proto/SessionReport.java:391–434

getSessionsList

public java.util.List<io.agentscope.controlplane.proto.SessionSnapshot> getSessionsList()

获取会话列表。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns java.util.List<io.agentscope.controlplane.proto.SessionSnapshot>
返回java.util.列出。Returns java util list.
源码Source io/agentscope/controlplane/proto/SessionReport.java:452–458

getSessionsCount

public int getSessionsCount()

获取会话数量。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/controlplane/proto/SessionReport.java:462–468

getSessions

public io.agentscope.controlplane.proto.SessionSnapshot getSessions(int index)

获取会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
返回Returns io.agentscope.controlplane.proto.SessionSnapshot
返回io.agentscope.controlplane.协议.SessionSnapshot。Returns io agentscope controlplane proto session snapshot.
源码Source io/agentscope/controlplane/proto/SessionReport.java:472–478

setSessions

public Builder setSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot value)

设置设置会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
valueio.agentscope.controlplane.proto.SessionSnapshot值(类型 `io.agentscope.controlplane.proto.SessionSnapshot`)。The value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:482–495

setSessions

public Builder setSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)

设置设置会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
builderForValueio.agentscope.controlplane.proto.SessionSnapshot.Builder构建器用于值(类型 `io.agentscope.controlplane.proto.SessionSnapshot.Builder`)。The builder for value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:499–509

addSessions

public Builder addSessions(io.agentscope.controlplane.proto.SessionSnapshot value)

添加会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
valueio.agentscope.controlplane.proto.SessionSnapshot值(类型 `io.agentscope.controlplane.proto.SessionSnapshot`)。The value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:513–525

addSessions

public Builder addSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot value)

添加会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
valueio.agentscope.controlplane.proto.SessionSnapshot值(类型 `io.agentscope.controlplane.proto.SessionSnapshot`)。The value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:529–542

addSessions

public Builder addSessions(io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)

添加会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
builderForValueio.agentscope.controlplane.proto.SessionSnapshot.Builder构建器用于值(类型 `io.agentscope.controlplane.proto.SessionSnapshot.Builder`)。The builder for value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:546–556

addSessions

public Builder addSessions(int index, io.agentscope.controlplane.proto.SessionSnapshot.Builder builderForValue)

添加会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
builderForValueio.agentscope.controlplane.proto.SessionSnapshot.Builder构建器用于值(类型 `io.agentscope.controlplane.proto.SessionSnapshot.Builder`)。The builder for value.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:560–570

addAllSessions

public Builder addAllSessions(java.lang.Iterable<? extends io.agentscope.controlplane.proto.SessionSnapshot> values)

添加所有会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
valuesjava.lang.Iterable<? extends io.agentscope.controlplane.proto.SessionSnapshot>值(类型 `java.lang.Iterable`)。The values.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:574–585

clearSessions

public Builder clearSessions()

清空会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:589–598

removeSessions

public Builder removeSessions(int index)

移除会话。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/controlplane/proto/SessionReport.java:602–611

getSessionsBuilder

public io.agentscope.controlplane.proto.SessionSnapshot.Builder getSessionsBuilder(int index)

获取会话构建器。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
返回Returns io.agentscope.controlplane.proto.SessionSnapshot.Builder
返回io.agentscope.controlplane.协议.SessionSnapshot.构建器。Returns io agentscope controlplane proto session snapshot builder.
源码Source io/agentscope/controlplane/proto/SessionReport.java:615–618

getSessionsOrBuilder

public io.agentscope.controlplane.proto.SessionSnapshotOrBuilder getSessionsOrBuilder(int index)

获取会话或构建器。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
返回Returns io.agentscope.controlplane.proto.SessionSnapshotOrBuilder
返回io.agentscope.controlplane.协议.SessionSnapshotOrBuilder。Returns io agentscope controlplane proto session snapshot or builder.
源码Source io/agentscope/controlplane/proto/SessionReport.java:622–628

getSessionsOrBuilderList

public java.util.List<? extends io.agentscope.controlplane.proto.SessionSnapshotOrBuilder> getSessionsOrBuilderList()

获取会话或构建器列表。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns java.util.List<? extends io.agentscope.controlplane.proto.SessionSnapshotOrBuilder>
返回java.util.列出。Returns java util list.
源码Source io/agentscope/controlplane/proto/SessionReport.java:632–639

addSessionsBuilder

public io.agentscope.controlplane.proto.SessionSnapshot.Builder addSessionsBuilder()

添加会话构建器。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns io.agentscope.controlplane.proto.SessionSnapshot.Builder
返回io.agentscope.controlplane.协议.SessionSnapshot.构建器。Returns io agentscope controlplane proto session snapshot builder.
源码Source io/agentscope/controlplane/proto/SessionReport.java:643–646

addSessionsBuilder

public io.agentscope.controlplane.proto.SessionSnapshot.Builder addSessionsBuilder(int index)

添加会话构建器。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

参数Parameters
名称Name类型Type说明Description
indexint索引(类型 `int`)。The index.
返回Returns io.agentscope.controlplane.proto.SessionSnapshot.Builder
返回io.agentscope.controlplane.协议.SessionSnapshot.构建器。Returns io agentscope controlplane proto session snapshot builder.
源码Source io/agentscope/controlplane/proto/SessionReport.java:650–654

getSessionsBuilderList

public java.util.List<io.agentscope.controlplane.proto.SessionSnapshot.Builder> getSessionsBuilderList()

获取会话构建器列表。

repeated .agentscope.protocol.v1.SessionSnapshot sessions = 1;

返回Returns java.util.List<io.agentscope.controlplane.proto.SessionSnapshot.Builder>
返回java.util.列出。Returns java util list.
源码Source io/agentscope/controlplane/proto/SessionReport.java:658–661
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.