Class StreamAssistRequest.Builder (0.66.0)

public static final class StreamAssistRequest.Builder extends GeneratedMessageV3.Builder<StreamAssistRequest.Builder> implements StreamAssistRequestOrBuilder

Request for the AssistantService.StreamAssist method.

Protobuf type google.cloud.discoveryengine.v1.StreamAssistRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StreamAssistRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StreamAssistRequest.Builder
Overrides

build()

public StreamAssistRequest build()
Returns
Type Description
StreamAssistRequest

buildPartial()

public StreamAssistRequest buildPartial()
Returns
Type Description
StreamAssistRequest

clear()

public StreamAssistRequest.Builder clear()
Returns
Type Description
StreamAssistRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public StreamAssistRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
StreamAssistRequest.Builder
Overrides

clearGenerationSpec()

public StreamAssistRequest.Builder clearGenerationSpec()

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

clearName()

public StreamAssistRequest.Builder clearName()

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
StreamAssistRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public StreamAssistRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
StreamAssistRequest.Builder
Overrides

clearQuery()

public StreamAssistRequest.Builder clearQuery()

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
StreamAssistRequest.Builder

clearSession()

public StreamAssistRequest.Builder clearSession()

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
StreamAssistRequest.Builder

This builder for chaining.

clearToolsSpec()

public StreamAssistRequest.Builder clearToolsSpec()

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

clearUserMetadata()

public StreamAssistRequest.Builder clearUserMetadata()

Optional. Information about the user initiating the query.

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

Returns
Type Description
StreamAssistRequest.Builder

clone()

public StreamAssistRequest.Builder clone()
Returns
Type Description
StreamAssistRequest.Builder
Overrides

getDefaultInstanceForType()

public StreamAssistRequest getDefaultInstanceForType()
Returns
Type Description
StreamAssistRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getGenerationSpecBuilder()

public StreamAssistRequest.GenerationSpec.Builder getGenerationSpecBuilder()

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

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.

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.

getQueryBuilder()

public Query.Builder getQueryBuilder()

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

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

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.

getToolsSpecBuilder()

public StreamAssistRequest.ToolsSpec.Builder getToolsSpecBuilder()

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

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.

getUserMetadataBuilder()

public AssistUserMetadata.Builder getUserMetadataBuilder()

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

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamAssistRequest other)

public StreamAssistRequest.Builder mergeFrom(StreamAssistRequest other)
Parameter
Name Description
other StreamAssistRequest
Returns
Type Description
StreamAssistRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StreamAssistRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamAssistRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public StreamAssistRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
StreamAssistRequest.Builder
Overrides

mergeGenerationSpec(StreamAssistRequest.GenerationSpec value)

public StreamAssistRequest.Builder mergeGenerationSpec(StreamAssistRequest.GenerationSpec value)

Optional. Specification of the generation configuration for the request.

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

Parameter
Name Description
value StreamAssistRequest.GenerationSpec
Returns
Type Description
StreamAssistRequest.Builder

mergeQuery(Query value)

public StreamAssistRequest.Builder mergeQuery(Query value)

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];

Parameter
Name Description
value Query
Returns
Type Description
StreamAssistRequest.Builder

mergeToolsSpec(StreamAssistRequest.ToolsSpec value)

public StreamAssistRequest.Builder mergeToolsSpec(StreamAssistRequest.ToolsSpec value)

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];

Parameter
Name Description
value StreamAssistRequest.ToolsSpec
Returns
Type Description
StreamAssistRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamAssistRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StreamAssistRequest.Builder
Overrides

mergeUserMetadata(AssistUserMetadata value)

public StreamAssistRequest.Builder mergeUserMetadata(AssistUserMetadata value)

Optional. Information about the user initiating the query.

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

Parameter
Name Description
value AssistUserMetadata
Returns
Type Description
StreamAssistRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public StreamAssistRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StreamAssistRequest.Builder
Overrides

setGenerationSpec(StreamAssistRequest.GenerationSpec value)

public StreamAssistRequest.Builder setGenerationSpec(StreamAssistRequest.GenerationSpec value)

Optional. Specification of the generation configuration for the request.

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

Parameter
Name Description
value StreamAssistRequest.GenerationSpec
Returns
Type Description
StreamAssistRequest.Builder

setGenerationSpec(StreamAssistRequest.GenerationSpec.Builder builderForValue)

public StreamAssistRequest.Builder setGenerationSpec(StreamAssistRequest.GenerationSpec.Builder builderForValue)

Optional. Specification of the generation configuration for the request.

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

Parameter
Name Description
builderForValue StreamAssistRequest.GenerationSpec.Builder
Returns
Type Description
StreamAssistRequest.Builder

setName(String value)

public StreamAssistRequest.Builder setName(String value)

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) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
StreamAssistRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public StreamAssistRequest.Builder setNameBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
StreamAssistRequest.Builder

This builder for chaining.

setQuery(Query value)

public StreamAssistRequest.Builder setQuery(Query value)

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];

Parameter
Name Description
value Query
Returns
Type Description
StreamAssistRequest.Builder

setQuery(Query.Builder builderForValue)

public StreamAssistRequest.Builder setQuery(Query.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Query.Builder
Returns
Type Description
StreamAssistRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public StreamAssistRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
StreamAssistRequest.Builder
Overrides

setSession(String value)

public StreamAssistRequest.Builder setSession(String value)

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) = { ... }

Parameter
Name Description
value String

The session to set.

Returns
Type Description
StreamAssistRequest.Builder

This builder for chaining.

setSessionBytes(ByteString value)

public StreamAssistRequest.Builder setSessionBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for session to set.

Returns
Type Description
StreamAssistRequest.Builder

This builder for chaining.

setToolsSpec(StreamAssistRequest.ToolsSpec value)

public StreamAssistRequest.Builder setToolsSpec(StreamAssistRequest.ToolsSpec value)

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];

Parameter
Name Description
value StreamAssistRequest.ToolsSpec
Returns
Type Description
StreamAssistRequest.Builder

setToolsSpec(StreamAssistRequest.ToolsSpec.Builder builderForValue)

public StreamAssistRequest.Builder setToolsSpec(StreamAssistRequest.ToolsSpec.Builder builderForValue)

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];

Parameter
Name Description
builderForValue StreamAssistRequest.ToolsSpec.Builder
Returns
Type Description
StreamAssistRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final StreamAssistRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StreamAssistRequest.Builder
Overrides

setUserMetadata(AssistUserMetadata value)

public StreamAssistRequest.Builder setUserMetadata(AssistUserMetadata value)

Optional. Information about the user initiating the query.

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

Parameter
Name Description
value AssistUserMetadata
Returns
Type Description
StreamAssistRequest.Builder

setUserMetadata(AssistUserMetadata.Builder builderForValue)

public StreamAssistRequest.Builder setUserMetadata(AssistUserMetadata.Builder builderForValue)

Optional. Information about the user initiating the query.

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

Parameter
Name Description
builderForValue AssistUserMetadata.Builder
Returns
Type Description
StreamAssistRequest.Builder