Class StreamAssistResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamAssistResponse.Builder>
com.google.cloud.discoveryengine.v1.StreamAssistResponse.Builder
All Implemented Interfaces:
StreamAssistResponseOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamAssistResponse

public static final class StreamAssistResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamAssistResponse.Builder> implements StreamAssistResponseOrBuilder
 Response for the
 [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist]
 method.
 
Protobuf type google.cloud.discoveryengine.v1.StreamAssistResponse
  • 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<StreamAssistResponse.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<StreamAssistResponse.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<StreamAssistResponse.Builder>
    • getDefaultInstanceForType

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

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

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

      public StreamAssistResponse.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<StreamAssistResponse.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<StreamAssistResponse.Builder>
    • mergeFrom

      public StreamAssistResponse.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<StreamAssistResponse.Builder>
      Throws:
      IOException
    • 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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
      Specified by:
      hasAnswer in interface StreamAssistResponseOrBuilder
      Returns:
      Whether the answer field is set.
    • 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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
      Specified by:
      getAnswer in interface StreamAssistResponseOrBuilder
      Returns:
      The answer.
    • setAnswer

      public StreamAssistResponse.Builder setAnswer(AssistAnswer value)
       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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
    • setAnswer

      public StreamAssistResponse.Builder setAnswer(AssistAnswer.Builder builderForValue)
       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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
    • mergeAnswer

      public StreamAssistResponse.Builder mergeAnswer(AssistAnswer value)
       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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
    • clearAnswer

      public StreamAssistResponse.Builder clearAnswer()
       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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
    • getAnswerBuilder

      public AssistAnswer.Builder getAnswerBuilder()
       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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
    • 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][google.cloud.discoveryengine.v1.AssistAnswer.replies].
      
       Observe
       [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] to
       see if more parts are to be expected. While the state is `IN_PROGRESS`, the
       [AssistAnswer.replies][google.cloud.discoveryengine.v1.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;
      Specified by:
      getAnswerOrBuilder in interface StreamAssistResponseOrBuilder
    • hasSessionInfo

      public boolean hasSessionInfo()
       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
      Specified by:
      hasSessionInfo in interface StreamAssistResponseOrBuilder
      Returns:
      Whether the sessionInfo field is set.
    • getSessionInfo

      public StreamAssistResponse.SessionInfo getSessionInfo()
       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
      Specified by:
      getSessionInfo in interface StreamAssistResponseOrBuilder
      Returns:
      The sessionInfo.
    • setSessionInfo

       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
    • setSessionInfo

       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
    • mergeSessionInfo

       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
    • clearSessionInfo

      public StreamAssistResponse.Builder clearSessionInfo()
       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
    • getSessionInfoBuilder

      public StreamAssistResponse.SessionInfo.Builder getSessionInfoBuilder()
       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
    • getSessionInfoOrBuilder

      public StreamAssistResponse.SessionInfoOrBuilder getSessionInfoOrBuilder()
       Session information.
       
      .google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo session_info = 2;
      Specified by:
      getSessionInfoOrBuilder in interface StreamAssistResponseOrBuilder
    • 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;
      Specified by:
      getAssistToken in interface StreamAssistResponseOrBuilder
      Returns:
      The assistToken.
    • getAssistTokenBytes

      public com.google.protobuf.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;
      Specified by:
      getAssistTokenBytes in interface StreamAssistResponseOrBuilder
      Returns:
      The bytes for assistToken.
    • setAssistToken

      public StreamAssistResponse.Builder setAssistToken(String value)
       A global unique ID that identifies the current pair of request and stream
       of responses. Used for feedback and support.
       
      string assist_token = 4;
      Parameters:
      value - The assistToken to set.
      Returns:
      This builder for chaining.
    • clearAssistToken

      public StreamAssistResponse.Builder clearAssistToken()
       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:
      This builder for chaining.
    • setAssistTokenBytes

      public StreamAssistResponse.Builder setAssistTokenBytes(com.google.protobuf.ByteString value)
       A global unique ID that identifies the current pair of request and stream
       of responses. Used for feedback and support.
       
      string assist_token = 4;
      Parameters:
      value - The bytes for assistToken to set.
      Returns:
      This builder for chaining.