@InterfaceAudience.Private
  public static SetQuotaRequest buildSetQuotaRequestProto(final QuotaSettings settings) {
    SetQuotaRequest.Builder builder = SetQuotaRequest.newBuilder();
    if (settings.getUserName() != null) {
      builder.setUserName(settings.getUserName());
    }
    if (settings.getTableName() != null) {
      builder.setTableName(ProtobufUtil.toProtoTableName(settings.getTableName()));
    }
    if (settings.getNamespace() != null) {
      builder.setNamespace(settings.getNamespace());
    }
    if (settings.getRegionServer() != null) {
      builder.setRegionServer(settings.getRegionServer());
    }
    settings.setupSetQuotaRequest(builder);
    return builder.build();
  }
Convert a QuotaSettings to a protocol buffer SetQuotaRequest. This is used internally by the
Admin client to serialize the quota settings and send them to the master.
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettings.java