/** * * * <pre> * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that * specifies the error for the operation. * </pre> * * <code>.google.rpc.Status error = 1;</code> */ public Builder setError(com.google.rpc.Status value) { if (errorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } error_ = value; onChanged(); } else { errorBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder clearResults() { if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { resultsBuilder_.clear(); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder addResults(com.google.cloud.speech.v1.StreamingRecognitionResult value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.add(value); onChanged(); } else { resultsBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder addResults( int index, com.google.cloud.speech.v1.StreamingRecognitionResult value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.add(index, value); onChanged(); } else { resultsBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder setResults( int index, com.google.cloud.speech.v1.StreamingRecognitionResult value) { if (resultsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResultsIsMutable(); results_.set(index, value); onChanged(); } else { resultsBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder addAllResults( java.lang.Iterable<? extends com.google.cloud.speech.v1.StreamingRecognitionResult> values) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); onChanged(); } else { resultsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder addResults( int index, com.google.cloud.speech.v1.StreamingRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder addResults( com.google.cloud.speech.v1.StreamingRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.add(builderForValue.build()); onChanged(); } else { resultsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder setResults( int index, com.google.cloud.speech.v1.StreamingRecognitionResult.Builder builderForValue) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.set(index, builderForValue.build()); onChanged(); } else { resultsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that * specifies the error for the operation. * </pre> * * <code>.google.rpc.Status error = 1;</code> */ public Builder mergeError(com.google.rpc.Status value) { if (errorBuilder_ == null) { if (error_ != null) { error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); } else { error_ = value; } onChanged(); } else { errorBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * Output only. This repeated list contains zero or more results that * correspond to consecutive portions of the audio currently being processed. * It contains zero or one `is_final=true` result (the newly settled portion), * followed by zero or more `is_final=false` results (the interim results). * </pre> * * <code>repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;</code> */ public Builder removeResults(int index) { if (resultsBuilder_ == null) { ensureResultsIsMutable(); results_.remove(index); onChanged(); } else { resultsBuilder_.remove(index); } return this; } /**
/** * * * <pre> * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that * specifies the error for the operation. * </pre> * * <code>.google.rpc.Status error = 1;</code> */ public Builder clearError() { if (errorBuilder_ == null) { error_ = null; onChanged(); } else { error_ = null; errorBuilder_ = null; } return this; } /**
/** * * * <pre> * Output only. Indicates the type of speech event. * </pre> * * <code> * .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4; * </code> */ public Builder setSpeechEventType( com.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType value) { if (value == null) { throw new NullPointerException(); } speechEventType_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that * specifies the error for the operation. * </pre> * * <code>.google.rpc.Status error = 1;</code> */ public Builder setError(com.google.rpc.Status.Builder builderForValue) { if (errorBuilder_ == null) { error_ = builderForValue.build(); onChanged(); } else { errorBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. Indicates the type of speech event. * </pre> * * <code> * .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4; * </code> */ public Builder setSpeechEventTypeValue(int value) { speechEventType_ = value; onChanged(); return this; } /**
/** * * * <pre> * Output only. Indicates the type of speech event. * </pre> * * <code> * .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4; * </code> */ public Builder clearSpeechEventType() { speechEventType_ = 0; onChanged(); return this; }
/** * * * <pre> * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that * specifies the error for the operation. * </pre> * * <code>.google.rpc.Status error = 1;</code> */ public com.google.rpc.Status.Builder getErrorBuilder() { onChanged(); return getErrorFieldBuilder().getBuilder(); } /**