Class RecognizeResponse.Builder

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

public static final class RecognizeResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder> implements RecognizeResponseOrBuilder
 The only message returned to the client by the `Recognize` method. It
 contains the result as zero or more sequential `SpeechRecognitionResult`
 messages.
 
Protobuf type google.cloud.speech.v1.RecognizeResponse
  • 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<RecognizeResponse.Builder>
    • clear

      public RecognizeResponse.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<RecognizeResponse.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<RecognizeResponse.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public RecognizeResponse.Builder mergeFrom(RecognizeResponse other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
    • mergeFrom

      public RecognizeResponse.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<RecognizeResponse.Builder>
      Throws:
      IOException
    • getResultsList

      public List<SpeechRecognitionResult> getResultsList()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
      Specified by:
      getResultsList in interface RecognizeResponseOrBuilder
    • getResultsCount

      public int getResultsCount()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
      Specified by:
      getResultsCount in interface RecognizeResponseOrBuilder
    • getResults

      public SpeechRecognitionResult getResults(int index)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
      Specified by:
      getResults in interface RecognizeResponseOrBuilder
    • setResults

      public RecognizeResponse.Builder setResults(int index, SpeechRecognitionResult value)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • setResults

      public RecognizeResponse.Builder setResults(int index, SpeechRecognitionResult.Builder builderForValue)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addResults

       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addResults

      public RecognizeResponse.Builder addResults(int index, SpeechRecognitionResult value)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addResults

      public RecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addResults

      public RecognizeResponse.Builder addResults(int index, SpeechRecognitionResult.Builder builderForValue)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addAllResults

      public RecognizeResponse.Builder addAllResults(Iterable<? extends SpeechRecognitionResult> values)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • clearResults

      public RecognizeResponse.Builder clearResults()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • removeResults

      public RecognizeResponse.Builder removeResults(int index)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • getResultsBuilder

      public SpeechRecognitionResult.Builder getResultsBuilder(int index)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • getResultsOrBuilder

      public SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
      Specified by:
      getResultsOrBuilder in interface RecognizeResponseOrBuilder
    • getResultsOrBuilderList

      public List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
      Specified by:
      getResultsOrBuilderList in interface RecognizeResponseOrBuilder
    • addResultsBuilder

      public SpeechRecognitionResult.Builder addResultsBuilder()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • addResultsBuilder

      public SpeechRecognitionResult.Builder addResultsBuilder(int index)
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • getResultsBuilderList

      public List<SpeechRecognitionResult.Builder> getResultsBuilderList()
       Sequential list of transcription results corresponding to
       sequential portions of audio.
       
      repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
    • hasTotalBilledTime

      public boolean hasTotalBilledTime()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
      Specified by:
      hasTotalBilledTime in interface RecognizeResponseOrBuilder
      Returns:
      Whether the totalBilledTime field is set.
    • getTotalBilledTime

      public com.google.protobuf.Duration getTotalBilledTime()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
      Specified by:
      getTotalBilledTime in interface RecognizeResponseOrBuilder
      Returns:
      The totalBilledTime.
    • setTotalBilledTime

      public RecognizeResponse.Builder setTotalBilledTime(com.google.protobuf.Duration value)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
    • setTotalBilledTime

      public RecognizeResponse.Builder setTotalBilledTime(com.google.protobuf.Duration.Builder builderForValue)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
    • mergeTotalBilledTime

      public RecognizeResponse.Builder mergeTotalBilledTime(com.google.protobuf.Duration value)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
    • clearTotalBilledTime

      public RecognizeResponse.Builder clearTotalBilledTime()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
    • getTotalBilledTimeBuilder

      public com.google.protobuf.Duration.Builder getTotalBilledTimeBuilder()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
    • getTotalBilledTimeOrBuilder

      public com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_time = 3;
      Specified by:
      getTotalBilledTimeOrBuilder in interface RecognizeResponseOrBuilder
    • hasSpeechAdaptationInfo

      public boolean hasSpeechAdaptationInfo()
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
      Specified by:
      hasSpeechAdaptationInfo in interface RecognizeResponseOrBuilder
      Returns:
      Whether the speechAdaptationInfo field is set.
    • getSpeechAdaptationInfo

      public SpeechAdaptationInfo getSpeechAdaptationInfo()
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
      Specified by:
      getSpeechAdaptationInfo in interface RecognizeResponseOrBuilder
      Returns:
      The speechAdaptationInfo.
    • setSpeechAdaptationInfo

      public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
    • setSpeechAdaptationInfo

      public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
    • mergeSpeechAdaptationInfo

      public RecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
    • clearSpeechAdaptationInfo

      public RecognizeResponse.Builder clearSpeechAdaptationInfo()
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
    • getSpeechAdaptationInfoBuilder

      public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
    • getSpeechAdaptationInfoOrBuilder

      public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()
       Provides information on adaptation behavior in response
       
      .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
      Specified by:
      getSpeechAdaptationInfoOrBuilder in interface RecognizeResponseOrBuilder
    • getRequestId

      public long getRequestId()
       The ID associated with the request. This is a unique ID specific only to
       the given request.
       
      int64 request_id = 8;
      Specified by:
      getRequestId in interface RecognizeResponseOrBuilder
      Returns:
      The requestId.
    • setRequestId

      public RecognizeResponse.Builder setRequestId(long value)
       The ID associated with the request. This is a unique ID specific only to
       the given request.
       
      int64 request_id = 8;
      Parameters:
      value - The requestId to set.
      Returns:
      This builder for chaining.
    • clearRequestId

      public RecognizeResponse.Builder clearRequestId()
       The ID associated with the request. This is a unique ID specific only to
       the given request.
       
      int64 request_id = 8;
      Returns:
      This builder for chaining.