/** * * * <pre> * The token text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public com.google.cloud.language.v1.TextSpanOrBuilder getTextOrBuilder() { return getText(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (text_ != null) { output.writeMessage(1, getText()); } if (partOfSpeech_ != null) { output.writeMessage(2, getPartOfSpeech()); } if (dependencyEdge_ != null) { output.writeMessage(3, getDependencyEdge()); } if (!getLemmaBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, lemma_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (text_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getText()); } if (partOfSpeech_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPartOfSpeech()); } if (dependencyEdge_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDependencyEdge()); } if (!getLemmaBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, lemma_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasText()) { hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); } if (hasPartOfSpeech()) { hash = (37 * hash) + PART_OF_SPEECH_FIELD_NUMBER; hash = (53 * hash) + getPartOfSpeech().hashCode(); } if (hasDependencyEdge()) { hash = (37 * hash) + DEPENDENCY_EDGE_FIELD_NUMBER; hash = (53 * hash) + getDependencyEdge().hashCode(); } hash = (37 * hash) + LEMMA_FIELD_NUMBER; hash = (53 * hash) + getLemma().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.language.v1.Token)) { return super.equals(obj); } com.google.cloud.language.v1.Token other = (com.google.cloud.language.v1.Token) obj; boolean result = true; result = result && (hasText() == other.hasText()); if (hasText()) { result = result && getText().equals(other.getText()); } result = result && (hasPartOfSpeech() == other.hasPartOfSpeech()); if (hasPartOfSpeech()) { result = result && getPartOfSpeech().equals(other.getPartOfSpeech()); } result = result && (hasDependencyEdge() == other.hasDependencyEdge()); if (hasDependencyEdge()) { result = result && getDependencyEdge().equals(other.getDependencyEdge()); } result = result && getLemma().equals(other.getLemma()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.language.v1.Token other) { if (other == com.google.cloud.language.v1.Token.getDefaultInstance()) return this; if (other.hasText()) { mergeText(other.getText()); } if (other.hasPartOfSpeech()) { mergePartOfSpeech(other.getPartOfSpeech()); } if (other.hasDependencyEdge()) { mergeDependencyEdge(other.getDependencyEdge()); } if (!other.getLemma().isEmpty()) { lemma_ = other.lemma_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The token text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public com.google.cloud.language.v1.TextSpanOrBuilder getTextOrBuilder() { return getText(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (text_ != null) { output.writeMessage(1, getText()); } if (partOfSpeech_ != null) { output.writeMessage(2, getPartOfSpeech()); } if (dependencyEdge_ != null) { output.writeMessage(3, getDependencyEdge()); } if (!getLemmaBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, lemma_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (text_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getText()); } if (partOfSpeech_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPartOfSpeech()); } if (dependencyEdge_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDependencyEdge()); } if (!getLemmaBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, lemma_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasText()) { hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); } if (hasPartOfSpeech()) { hash = (37 * hash) + PART_OF_SPEECH_FIELD_NUMBER; hash = (53 * hash) + getPartOfSpeech().hashCode(); } if (hasDependencyEdge()) { hash = (37 * hash) + DEPENDENCY_EDGE_FIELD_NUMBER; hash = (53 * hash) + getDependencyEdge().hashCode(); } hash = (37 * hash) + LEMMA_FIELD_NUMBER; hash = (53 * hash) + getLemma().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.language.v1.Token)) { return super.equals(obj); } com.google.cloud.language.v1.Token other = (com.google.cloud.language.v1.Token) obj; boolean result = true; result = result && (hasText() == other.hasText()); if (hasText()) { result = result && getText().equals(other.getText()); } result = result && (hasPartOfSpeech() == other.hasPartOfSpeech()); if (hasPartOfSpeech()) { result = result && getPartOfSpeech().equals(other.getPartOfSpeech()); } result = result && (hasDependencyEdge() == other.hasDependencyEdge()); if (hasDependencyEdge()) { result = result && getDependencyEdge().equals(other.getDependencyEdge()); } result = result && getLemma().equals(other.getLemma()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.language.v1.Token other) { if (other == com.google.cloud.language.v1.Token.getDefaultInstance()) return this; if (other.hasText()) { mergeText(other.getText()); } if (other.hasPartOfSpeech()) { mergePartOfSpeech(other.getPartOfSpeech()); } if (other.hasDependencyEdge()) { mergeDependencyEdge(other.getDependencyEdge()); } if (!other.getLemma().isEmpty()) { lemma_ = other.lemma_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }