Class StreamAssistResponse (0.66.0)

public final class StreamAssistResponse extends GeneratedMessageV3 implements StreamAssistResponseOrBuilder

Response for the AssistantService.StreamAssist method.

Protobuf type google.cloud.discoveryengine.v1.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

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.v1.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.v1.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

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.

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

Returns
Type Description
StreamAssistResponse.SessionInfo

The sessionInfo.

getSessionInfoOrBuilder()

public StreamAssistResponse.SessionInfoOrBuilder getSessionInfoOrBuilder()

Session information.

.google.cloud.discoveryengine.v1.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.v1.AssistAnswer answer = 1;

Returns
Type Description
boolean

Whether the answer field is set.

hasSessionInfo()

public boolean hasSessionInfo()

Session information.

.google.cloud.discoveryengine.v1.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 GeneratedMessageV3.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(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
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