Class StreamAssistResponse (0.90.0)

public final class StreamAssistResponse extends GeneratedMessage implements StreamAssistResponseOrBuilder

Response for the AssistantService.StreamAssist method.

Protobuf type google.cloud.discoveryengine.v1beta.StreamAssistResponse

Static Fields

ANSWER_FIELD_NUMBER

public static final int ANSWER_FIELD_NUMBER
Field Value
Type Description
int

ASSIST_TOKEN_FIELD_NUMBER

public static final int ASSIST_TOKEN_FIELD_NUMBER
Field Value
Type Description
int

INVOCATION_TOOLS_FIELD_NUMBER

public static final int INVOCATION_TOOLS_FIELD_NUMBER
Field Value
Type Description
int

INVOKED_SKILLS_FIELD_NUMBER

public static final int INVOKED_SKILLS_FIELD_NUMBER
Field Value
Type Description
int

SESSION_INFO_FIELD_NUMBER

public static final int SESSION_INFO_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StreamAssistResponse getDefaultInstance()
Returns
Type Description
StreamAssistResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static StreamAssistResponse.Builder newBuilder()
Returns
Type Description
StreamAssistResponse.Builder

newBuilder(StreamAssistResponse prototype)

public static StreamAssistResponse.Builder newBuilder(StreamAssistResponse prototype)
Parameter
Name Description
prototype StreamAssistResponse
Returns
Type Description
StreamAssistResponse.Builder

parseDelimitedFrom(InputStream input)

public static StreamAssistResponse parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StreamAssistResponse parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamAssistResponse parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamAssistResponse parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StreamAssistResponse parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StreamAssistResponse parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamAssistResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistResponse
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StreamAssistResponse> parser()
Returns
Type Description
Parser<StreamAssistResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAnswer()

public AssistAnswer getAnswer()

Assist answer resource object containing parts of the assistant's final answer for the user's query.

Not present if the current response doesn't add anything to previously sent AssistAnswer.replies.

Observe AssistAnswer.state to see if more parts are to be expected. While the state is IN_PROGRESS, the AssistAnswer.replies field in each response will contain replies (reply fragments) to be appended to the ones received in previous responses. AssistAnswer.name won't be filled.

If the state is SUCCEEDED, FAILED or SKIPPED, the response is the last response and AssistAnswer.name will have a value.

.google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1;

Returns
Type Description
AssistAnswer

The answer.

getAnswerOrBuilder()

public AssistAnswerOrBuilder getAnswerOrBuilder()

Assist answer resource object containing parts of the assistant's final answer for the user's query.

Not present if the current response doesn't add anything to previously sent AssistAnswer.replies.

Observe AssistAnswer.state to see if more parts are to be expected. While the state is IN_PROGRESS, the AssistAnswer.replies field in each response will contain replies (reply fragments) to be appended to the ones received in previous responses. AssistAnswer.name won't be filled.

If the state is SUCCEEDED, FAILED or SKIPPED, the response is the last response and AssistAnswer.name will have a value.

.google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1;

Returns
Type Description
AssistAnswerOrBuilder

getAssistToken()

public String getAssistToken()

A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support.

string assist_token = 4;

Returns
Type Description
String

The assistToken.

getAssistTokenBytes()

public ByteString getAssistTokenBytes()

A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support.

string assist_token = 4;

Returns
Type Description
ByteString

The bytes for assistToken.

getDefaultInstanceForType()

public StreamAssistResponse getDefaultInstanceForType()
Returns
Type Description
StreamAssistResponse

getInvocationTools(int index)

public String getInvocationTools(int index)

The tool names of the tools that were invoked.

repeated string invocation_tools = 8;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The invocationTools at the given index.

getInvocationToolsBytes(int index)

public ByteString getInvocationToolsBytes(int index)

The tool names of the tools that were invoked.

repeated string invocation_tools = 8;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the invocationTools at the given index.

getInvocationToolsCount()

public int getInvocationToolsCount()

The tool names of the tools that were invoked.

repeated string invocation_tools = 8;

Returns
Type Description
int

The count of invocationTools.

getInvocationToolsList()

public ProtocolStringList getInvocationToolsList()

The tool names of the tools that were invoked.

repeated string invocation_tools = 8;

Returns
Type Description
ProtocolStringList

A list containing the invocationTools.

getInvokedSkills(int index)

public StreamAssistResponse.InvokedSkill getInvokedSkills(int index)

The skills executed during the turn.

repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10;

Parameter
Name Description
index int
Returns
Type Description
StreamAssistResponse.InvokedSkill

getInvokedSkillsCount()

public int getInvokedSkillsCount()

The skills executed during the turn.

repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10;

Returns
Type Description
int

getInvokedSkillsList()

public List<StreamAssistResponse.InvokedSkill> getInvokedSkillsList()

The skills executed during the turn.

repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10;

Returns
Type Description
List<InvokedSkill>

getInvokedSkillsOrBuilder(int index)

public StreamAssistResponse.InvokedSkillOrBuilder getInvokedSkillsOrBuilder(int index)

The skills executed during the turn.

repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10;

Parameter
Name Description
index int
Returns
Type Description
StreamAssistResponse.InvokedSkillOrBuilder

getInvokedSkillsOrBuilderList()

public List<? extends StreamAssistResponse.InvokedSkillOrBuilder> getInvokedSkillsOrBuilderList()

The skills executed during the turn.

repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder>

getParserForType()

public Parser<StreamAssistResponse> getParserForType()
Returns
Type Description
Parser<StreamAssistResponse>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSessionInfo()

public StreamAssistResponse.SessionInfo getSessionInfo()

Session information. Only included in the final StreamAssistResponse of the response stream.

.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2;

Returns
Type Description
StreamAssistResponse.SessionInfo

The sessionInfo.

getSessionInfoOrBuilder()

public StreamAssistResponse.SessionInfoOrBuilder getSessionInfoOrBuilder()

Session information. Only included in the final StreamAssistResponse of the response stream.

.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2;

Returns
Type Description
StreamAssistResponse.SessionInfoOrBuilder

hasAnswer()

public boolean hasAnswer()

Assist answer resource object containing parts of the assistant's final answer for the user's query.

Not present if the current response doesn't add anything to previously sent AssistAnswer.replies.

Observe AssistAnswer.state to see if more parts are to be expected. While the state is IN_PROGRESS, the AssistAnswer.replies field in each response will contain replies (reply fragments) to be appended to the ones received in previous responses. AssistAnswer.name won't be filled.

If the state is SUCCEEDED, FAILED or SKIPPED, the response is the last response and AssistAnswer.name will have a value.

.google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1;

Returns
Type Description
boolean

Whether the answer field is set.

hasSessionInfo()

public boolean hasSessionInfo()

Session information. Only included in the final StreamAssistResponse of the response stream.

.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2;

Returns
Type Description
boolean

Whether the sessionInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public StreamAssistResponse.Builder newBuilderForType()
Returns
Type Description
StreamAssistResponse.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected StreamAssistResponse.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
StreamAssistResponse.Builder
Overrides

toBuilder()

public StreamAssistResponse.Builder toBuilder()
Returns
Type Description
StreamAssistResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException