/** * * * <pre> * Key-value pairs that can be attached to a product. At query time, * constraints can be specified based on the product_labels. * Note that integer values can be provided as strings, e.g. "1199". Only * strings with integer values can match a range-based restriction which is * to be supported soon. * Multiple values can be assigned to the same key. One product may have up to * 100 product_labels. * </pre> * * <code>repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;</code> */ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder() { return getProductLabelsFieldBuilder() .addBuilder(com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!getValueBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * * * <pre> * Key-value pairs that can be attached to a product. At query time, * constraints can be specified based on the product_labels. * Note that integer values can be provided as strings, e.g. "1199". Only * strings with integer values can match a range-based restriction which is * to be supported soon. * Multiple values can be assigned to the same key. One product may have up to * 100 product_labels. * </pre> * * <code>repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;</code> */ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder() { return getProductLabelsFieldBuilder() .addBuilder(com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); } /**
/** * * * <pre> * Key-value pairs that can be attached to a product. At query time, * constraints can be specified based on the product_labels. * Note that integer values can be provided as strings, e.g. "1199". Only * strings with integer values can match a range-based restriction which is * to be supported soon. * Multiple values can be assigned to the same key. One product may have up to * 100 product_labels. * </pre> * * <code>repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;</code> */ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder(int index) { return getProductLabelsFieldBuilder() .addBuilder(index, com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); } /**
/** * * * <pre> * The value of the label attached to the product. Cannot be empty and * cannot exceed 128 bytes. * </pre> * * <code>string value = 2;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /**
/** * * * <pre> * The key of the label attached to the product. Cannot be empty and cannot * exceed 128 bytes. * </pre> * * <code>string key = 1;</code> */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (!getValueBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } 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.vision.v1.Product.KeyValue)) { return super.equals(obj); } com.google.cloud.vision.v1.Product.KeyValue other = (com.google.cloud.vision.v1.Product.KeyValue) obj; boolean result = true; result = result && getKey().equals(other.getKey()); result = result && getValue().equals(other.getValue()); 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(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.cloud.vision.v1.Product.KeyValue other) { if (other == com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; onChanged(); } if (!other.getValue().isEmpty()) { value_ = other.value_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public com.google.cloud.vision.v1.Product.KeyValue getDefaultInstanceForType() { return com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance(); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.cloud.vision.v1.Product.KeyValue buildPartial() { com.google.cloud.vision.v1.Product.KeyValue result = new com.google.cloud.vision.v1.Product.KeyValue(this); result.key_ = key_; result.value_ = value_; onBuilt(); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (!getValueBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.cloud.vision.v1.Product.KeyValue build() { com.google.cloud.vision.v1.Product.KeyValue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * * * <pre> * Key-value pairs that can be attached to a product. At query time, * constraints can be specified based on the product_labels. * Note that integer values can be provided as strings, e.g. "1199". Only * strings with integer values can match a range-based restriction which is * to be supported soon. * Multiple values can be assigned to the same key. One product may have up to * 100 product_labels. * </pre> * * <code>repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;</code> */ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder(int index) { return getProductLabelsFieldBuilder() .addBuilder(index, com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); } /**
/** * * * <pre> * The value of the label attached to the product. Cannot be empty and * cannot exceed 128 bytes. * </pre> * * <code>string value = 2;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /**