/** * * * <pre> * The product to create. * </pre> * * <code>.google.cloud.vision.v1.Product product = 2;</code> */ public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { return getProduct(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (product_ != null) { output.writeMessage(2, getProduct()); } if (!getProductIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); } unknownFields.writeTo(output); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1.CreateProductRequest)) { return super.equals(obj); } com.google.cloud.vision.v1.CreateProductRequest other = (com.google.cloud.vision.v1.CreateProductRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && (hasProduct() == other.hasProduct()); if (hasProduct()) { result = result && getProduct().equals(other.getProduct()); } result = result && getProductId().equals(other.getProductId()); 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); if (hasProduct()) { hash = (37 * hash) + PRODUCT_FIELD_NUMBER; hash = (53 * hash) + getProduct().hashCode(); } hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; hash = (53 * hash) + getProductId().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 (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (product_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProduct()); } if (!getProductIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * The product to create. * </pre> * * <code>.google.cloud.vision.v1.Product product = 2;</code> */ public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { return getProduct(); }
public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductRequest other) { if (other == com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (other.hasProduct()) { mergeProduct(other.getProduct()); } if (!other.getProductId().isEmpty()) { productId_ = other.productId_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (product_ != null) { output.writeMessage(2, getProduct()); } if (!getProductIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); } unknownFields.writeTo(output); }
Assert.assertEquals(product, actualRequest.getProduct()); Assert.assertEquals(productId, actualRequest.getProductId()); Assert.assertTrue(
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (product_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProduct()); } if (!getProductIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); } 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.CreateProductRequest)) { return super.equals(obj); } com.google.cloud.vision.v1.CreateProductRequest other = (com.google.cloud.vision.v1.CreateProductRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && (hasProduct() == other.hasProduct()); if (hasProduct()) { result = result && getProduct().equals(other.getProduct()); } result = result && getProductId().equals(other.getProductId()); 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); if (hasProduct()) { hash = (37 * hash) + PRODUCT_FIELD_NUMBER; hash = (53 * hash) + getProduct().hashCode(); } hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; hash = (53 * hash) + getProductId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductRequest other) { if (other == com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (other.hasProduct()) { mergeProduct(other.getProduct()); } if (!other.getProductId().isEmpty()) { productId_ = other.productId_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }