Class StreamAssistRequest (0.66.0)

public final class StreamAssistRequest extends GeneratedMessageV3 implements StreamAssistRequestOrBuilder

Request for the AssistantService.StreamAssist method.

Protobuf type google.cloud.discoveryengine.v1.StreamAssistRequest

Static Fields

GENERATION_SPEC_FIELD_NUMBER

public static final int GENERATION_SPEC_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

SESSION_FIELD_NUMBER

public static final int SESSION_FIELD_NUMBER
Field Value
Type Description
int

TOOLS_SPEC_FIELD_NUMBER

public static final int TOOLS_SPEC_FIELD_NUMBER
Field Value
Type Description
int

USER_METADATA_FIELD_NUMBER

public static final int USER_METADATA_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StreamAssistRequest getDefaultInstance()
Returns
Type Description
StreamAssistRequest

getDescriptor()

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

newBuilder()

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

newBuilder(StreamAssistRequest prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public StreamAssistRequest getDefaultInstanceForType()
Returns
Type Description
StreamAssistRequest

getGenerationSpec()

public StreamAssistRequest.GenerationSpec getGenerationSpec()

Optional. Specification of the generation configuration for the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StreamAssistRequest.GenerationSpec

The generationSpec.

getGenerationSpecOrBuilder()

public StreamAssistRequest.GenerationSpecOrBuilder getGenerationSpecOrBuilder()

Optional. Specification of the generation configuration for the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StreamAssistRequest.GenerationSpecOrBuilder

getName()

public String getName()

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getQuery()

public Query getQuery()

Optional. Current user query.

Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

.google.cloud.discoveryengine.v1.Query query = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Query

The query.

getQueryOrBuilder()

public QueryOrBuilder getQueryOrBuilder()

Optional. Current user query.

Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

.google.cloud.discoveryengine.v1.Query query = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
QueryOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSession()

public String getSession()

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.

If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The session.

getSessionBytes()

public ByteString getSessionBytes()

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.

If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for session.

getToolsSpec()

public StreamAssistRequest.ToolsSpec getToolsSpec()

Optional. Specification of tools that are used to serve the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StreamAssistRequest.ToolsSpec

The toolsSpec.

getToolsSpecOrBuilder()

public StreamAssistRequest.ToolsSpecOrBuilder getToolsSpecOrBuilder()

Optional. Specification of tools that are used to serve the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StreamAssistRequest.ToolsSpecOrBuilder

getUserMetadata()

public AssistUserMetadata getUserMetadata()

Optional. Information about the user initiating the query.

.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AssistUserMetadata

The userMetadata.

getUserMetadataOrBuilder()

public AssistUserMetadataOrBuilder getUserMetadataOrBuilder()

Optional. Information about the user initiating the query.

.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AssistUserMetadataOrBuilder

hasGenerationSpec()

public boolean hasGenerationSpec()

Optional. Specification of the generation configuration for the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the generationSpec field is set.

hasQuery()

public boolean hasQuery()

Optional. Current user query.

Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

.google.cloud.discoveryengine.v1.Query query = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the query field is set.

hasToolsSpec()

public boolean hasToolsSpec()

Optional. Specification of tools that are used to serve the request.

.google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the toolsSpec field is set.

hasUserMetadata()

public boolean hasUserMetadata()

Optional. Information about the user initiating the query.

.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the userMetadata 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 StreamAssistRequest.Builder newBuilderForType()
Returns
Type Description
StreamAssistRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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