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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<StreamAssistRequest.Builder>
    • getDefaultInstanceForType

      public StreamAssistRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public StreamAssistRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public StreamAssistRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public StreamAssistRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamAssistRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamAssistRequest.Builder>
      Throws:
      IOException
    • getName

      public String 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:
      getName in interface StreamAssistRequestOrBuilder
      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:
      getNameBytes in interface StreamAssistRequestOrBuilder
      Returns:
      The bytes for name.
    • setName

      public StreamAssistRequest.Builder setName(String value)
       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

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

      public StreamAssistRequest.Builder setNameBytes(com.google.protobuf.ByteString value)
       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:
      hasQuery in interface StreamAssistRequestOrBuilder
      Returns:
      Whether the query field is set.
    • 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];
      Specified by:
      getQuery in interface StreamAssistRequestOrBuilder
      Returns:
      The query.
    • setQuery

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

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

      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];
    • 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];
    • 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];
    • 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];
      Specified by:
      getQueryOrBuilder in interface StreamAssistRequestOrBuilder
    • 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) = { ... }
      Specified by:
      getSession in interface StreamAssistRequestOrBuilder
      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:
      getSessionBytes in interface StreamAssistRequestOrBuilder
      Returns:
      The bytes for session.
    • setSession

      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) = { ... }
      Parameters:
      value - The session to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setSessionBytes

      public StreamAssistRequest.Builder setSessionBytes(com.google.protobuf.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) = { ... }
      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:
      hasUserMetadata in interface StreamAssistRequestOrBuilder
      Returns:
      Whether the userMetadata field is set.
    • 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];
      Specified by:
      getUserMetadata in interface StreamAssistRequestOrBuilder
      Returns:
      The userMetadata.
    • setUserMetadata

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

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

      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];
    • 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];
    • 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];
    • 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];
      Specified by:
      getUserMetadataOrBuilder in interface StreamAssistRequestOrBuilder
    • 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:
      hasToolsSpec in interface StreamAssistRequestOrBuilder
      Returns:
      Whether the toolsSpec field is set.
    • 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];
      Specified by:
      getToolsSpec in interface StreamAssistRequestOrBuilder
      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

       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

      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];
    • 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];
    • 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];
      Specified by:
      getToolsSpecOrBuilder in interface StreamAssistRequestOrBuilder
    • 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:
      hasGenerationSpec in interface StreamAssistRequestOrBuilder
      Returns:
      Whether the generationSpec field is set.
    • 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];
      Specified by:
      getGenerationSpec in interface StreamAssistRequestOrBuilder
      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

      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];
    • 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];
    • 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];
      Specified by:
      getGenerationSpecOrBuilder in interface StreamAssistRequestOrBuilder