merlimat commented on a change in pull request #10818:
URL: https://github.com/apache/pulsar/pull/10818#discussion_r645993011



##########
File path: 
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/TenantInfo.java
##########
@@ -19,13 +19,20 @@
 package org.apache.pulsar.common.policies.data;
 
 import java.util.Set;
+import org.apache.pulsar.client.admin.utils.ReflectionUtils;
 
 public interface TenantInfo {
     Set<String> getAdminRoles();
 
-    void setAdminRoles(Set<String> adminRoles);
-
     Set<String> getAllowedClusters();
 
-    void setAllowedClusters(Set<String> allowedClusters);
+    interface Builder {
+        Builder adminRoles(Set<String> adminRoles);
+        Builder allowedClusters(Set<String> allowedClusters);
+        TenantInfo build();
+    }
+
+    static Builder builder() {
+        return 
ReflectionUtils.newBuilder("org.apache.pulsar.common.policies.data.TenantInfoImpl");

Review comment:
       The reason for it is the presence of Swagger annotations which cannot be 
put as dependency of the `pulsar-client-admin-api` module.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to