Class StreamAssistRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
com.google.cloud.discoveryengine.v1.StreamAssistRequest.Builder
- All Implemented Interfaces:
StreamAssistRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- StreamAssistRequest
public static final class StreamAssistRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
implements StreamAssistRequestOrBuilder
Request for the [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] method.Protobuf type
google.cloud.discoveryengine.v1.StreamAssistRequest-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Required.Optional.Optional.Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.getName()Required.com.google.protobuf.ByteStringRequired.getQuery()Optional.Optional.Optional.Optional.com.google.protobuf.ByteStringOptional.Optional.Optional.Optional.Optional.Optional.Optional.booleanOptional.booleanhasQuery()Optional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(StreamAssistRequest other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.mergeQuery(Query value) Optional.Optional.Optional.Optional.setGenerationSpec(StreamAssistRequest.GenerationSpec.Builder builderForValue) Optional.Required.setNameBytes(com.google.protobuf.ByteString value) Required.Optional.setQuery(Query.Builder builderForValue) Optional.setSession(String value) Optional.setSessionBytes(com.google.protobuf.ByteString value) Optional.Optional.setToolsSpec(StreamAssistRequest.ToolsSpec.Builder builderForValue) Optional.Optional.setUserMetadata(AssistUserMetadata.Builder builderForValue) Optional.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StreamAssistRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
-
mergeFrom
public StreamAssistRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StreamAssistRequest.Builder>- Throws:
IOException
-
getName
Required. The resource name of the [Assistant][google.cloud.discoveryengine.v1.Assistant]. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getNamein interfaceStreamAssistRequestOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Required. The resource name of the [Assistant][google.cloud.discoveryengine.v1.Assistant]. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getNameBytesin interfaceStreamAssistRequestOrBuilder- Returns:
- The bytes for name.
-
setName
Required. The resource name of the [Assistant][google.cloud.discoveryengine.v1.Assistant]. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Required. The resource name of the [Assistant][google.cloud.discoveryengine.v1.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:
- This builder for chaining.
-
setNameBytes
Required. The resource name of the [Assistant][google.cloud.discoveryengine.v1.Assistant]. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
hasQueryin interfaceStreamAssistRequestOrBuilder- Returns:
- Whether the query field is set.
-
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];- Specified by:
getQueryin interfaceStreamAssistRequestOrBuilder- Returns:
- The query.
-
setQuery
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]; -
setQuery
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]; -
mergeQuery
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]; -
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]; -
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]; -
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];- Specified by:
getQueryOrBuilderin interfaceStreamAssistRequestOrBuilder
-
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) = { ... }- Specified by:
getSessionin interfaceStreamAssistRequestOrBuilder- Returns:
- The session.
-
getSessionBytes
public com.google.protobuf.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) = { ... }- Specified by:
getSessionBytesin interfaceStreamAssistRequestOrBuilder- Returns:
- The bytes for session.
-
setSession
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) = { ... }- Parameters:
value- The session to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setSessionBytes
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) = { ... }- Parameters:
value- The bytes for session to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
hasUserMetadatain interfaceStreamAssistRequestOrBuilder- Returns:
- Whether the userMetadata field is set.
-
getUserMetadata
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getUserMetadatain interfaceStreamAssistRequestOrBuilder- Returns:
- The userMetadata.
-
setUserMetadata
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; -
setUserMetadata
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; -
mergeUserMetadata
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; -
clearUserMetadata
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getUserMetadataBuilder
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getUserMetadataOrBuilder
Optional. Information about the user initiating the query.
.google.cloud.discoveryengine.v1.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getUserMetadataOrBuilderin interfaceStreamAssistRequestOrBuilder
-
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];- Specified by:
hasToolsSpecin interfaceStreamAssistRequestOrBuilder- Returns:
- Whether the toolsSpec field is set.
-
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];- Specified by:
getToolsSpecin interfaceStreamAssistRequestOrBuilder- Returns:
- The toolsSpec.
-
setToolsSpec
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]; -
setToolsSpec
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]; -
mergeToolsSpec
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]; -
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]; -
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]; -
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];- Specified by:
getToolsSpecOrBuilderin interfaceStreamAssistRequestOrBuilder
-
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];- Specified by:
hasGenerationSpecin interfaceStreamAssistRequestOrBuilder- Returns:
- Whether the generationSpec field is set.
-
getGenerationSpec
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGenerationSpecin interfaceStreamAssistRequestOrBuilder- Returns:
- The generationSpec.
-
setGenerationSpec
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; -
setGenerationSpec
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]; -
mergeGenerationSpec
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; -
clearGenerationSpec
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; -
getGenerationSpecBuilder
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; -
getGenerationSpecOrBuilder
Optional. Specification of the generation configuration for the request.
.google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGenerationSpecOrBuilderin interfaceStreamAssistRequestOrBuilder
-