@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(neighborId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, neighborId_);
    }
    if (java.lang.Double.doubleToRawLongBits(neighborDistance_) != 0) {
      output.writeDouble(2, neighborDistance_);
    }
    getUnknownFields().writeTo(output);
  }
<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