public Builder addEndpoints(
        int index, com.google.cloud.memorystore.v1beta.Instance.InstanceEndpoint value) {
      if (endpointsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEndpointsIsMutable();
        endpoints_.add(index, value);
        onChanged();
      } else {
        endpointsBuilder_.addMessage(index, value);
      }
      return this;
    }
<pre>
Optional. Endpoints for the instance.
</pre>

<code>
repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL];
</code>
java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java