/** * * * <pre> * Textual description, e.g. `Fixed-gear bicycle`. * </pre> * * <code>string description = 1;</code> */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); } if (!getLanguageCodeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); } for (int i = 0; i < locations_.size(); i++) { output.writeMessage(3, locations_.get(i)); } unknownFields.writeTo(output); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); if (getLocationsCount() > 0) { hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getLocationsList().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.videointelligence.v1beta1.LabelAnnotation)) { return super.equals(obj); } com.google.cloud.videointelligence.v1beta1.LabelAnnotation other = (com.google.cloud.videointelligence.v1beta1.LabelAnnotation) obj; boolean result = true; result = result && getDescription().equals(other.getDescription()); result = result && getLanguageCode().equals(other.getLanguageCode()); result = result && getLocationsList().equals(other.getLocationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.videointelligence.v1beta1.LabelAnnotation other) { if (other == com.google.cloud.videointelligence.v1beta1.LabelAnnotation.getDefaultInstance()) return this; if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; onChanged();
/** * * * <pre> * Language code for `description` in BCP-47 format. * </pre> * * <code>string language_code = 2;</code> */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); onChanged(); return this; } /**
@java.lang.Override public com.google.cloud.videointelligence.v1beta1.LabelAnnotation getDefaultInstanceForType() { return com.google.cloud.videointelligence.v1beta1.LabelAnnotation.getDefaultInstance(); }
@java.lang.Override public com.google.cloud.videointelligence.v1beta1.LabelAnnotation buildPartial() { com.google.cloud.videointelligence.v1beta1.LabelAnnotation result = new com.google.cloud.videointelligence.v1beta1.LabelAnnotation(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.description_ = description_; result.languageCode_ = languageCode_; if (locationsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000004); } result.locations_ = locations_; } else { result.locations_ = locationsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public com.google.cloud.videointelligence.v1beta1.LabelAnnotation build() { com.google.cloud.videointelligence.v1beta1.LabelAnnotation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * * * <pre> * Label annotations. There is exactly one element for each unique label. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelAnnotation label_annotations = 2; * </code> */ public com.google.cloud.videointelligence.v1beta1.LabelAnnotation.Builder addLabelAnnotationsBuilder() { return getLabelAnnotationsFieldBuilder() .addBuilder( com.google.cloud.videointelligence.v1beta1.LabelAnnotation.getDefaultInstance()); } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); } if (!getLanguageCodeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); } for (int i = 0; i < locations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, locations_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * Label annotations. There is exactly one element for each unique label. * </pre> * * <code>repeated .google.cloud.videointelligence.v1beta1.LabelAnnotation label_annotations = 2; * </code> */ public com.google.cloud.videointelligence.v1beta1.LabelAnnotation.Builder addLabelAnnotationsBuilder(int index) { return getLabelAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.videointelligence.v1beta1.LabelAnnotation.getDefaultInstance()); } /**