public int getPort() {
      if (portsCase_ == 9) {
        return (java.lang.Integer) ports_;
      }
      return 0;
    }
<pre>
Optional. port will only be set for Primary/Reader or Discovery endpoint.
</pre>

<code>int32 port = 9 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The port.
java-valkey/proto-google-cloud-valkey-v1/src/main/java/com/google/cloud/memorystore/v1/PscConnection.java