/** * * * <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.StatusOrBuilder getErrorOrBuilder() { return getError(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (error_ != null) { output.writeMessage(1, getError()); } for (int i = 0; i < results_.size(); i++) { output.writeMessage(2, results_.get(i)); } if (speechEventType_ != com.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType .SPEECH_EVENT_UNSPECIFIED.getNumber()) { output.writeEnum(4, speechEventType_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (error_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getError()); } for (int i = 0; i < results_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, results_.get(i)); } if (speechEventType_ != com.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType .SPEECH_EVENT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, speechEventType_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.speech.v1.StreamingRecognizeResponse)) { return super.equals(obj); } com.google.cloud.speech.v1.StreamingRecognizeResponse other = (com.google.cloud.speech.v1.StreamingRecognizeResponse) obj; boolean result = true; result = result && (hasError() == other.hasError()); if (hasError()) { result = result && getError().equals(other.getError()); } result = result && getResultsList().equals(other.getResultsList()); result = result && speechEventType_ == other.speechEventType_; result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasError()) { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); } if (getResultsCount() > 0) { hash = (37 * hash) + RESULTS_FIELD_NUMBER; hash = (53 * hash) + getResultsList().hashCode(); } hash = (37 * hash) + SPEECH_EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + speechEventType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
return this; if (other.hasError()) { mergeError(other.getError());
logger.debug( "Received error from StreamingRecognizeResponse: " + message.getError().getMessage()); requestManager.terminateCurrentSession(); return;