@java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(neighborId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, neighborId_);
    }
    if (java.lang.Double.doubleToRawLongBits(neighborDistance_) != 0) {
      size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, neighborDistance_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<pre>
Output only. The neighbor distance.
</pre>

<code>double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>

@return The neighborDistance.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java