static QueryParams queryParams(String serviceName, @Nullable String namespaceId, @Nullable String groupName,
                                   @Nullable String clusterName, @Nullable Boolean healthyOnly,
                                   @Nullable String app, @Nullable String ip, @Nullable Integer port,
                                   @Nullable Integer weight) {
        final QueryParamsBuilder paramsBuilder = QueryParams.builder();
        paramsBuilder.add(SERVICE_NAME_PARAM, serviceName);
        if (namespaceId != null) {
            paramsBuilder.add(NAMESPACE_ID_PARAM, namespaceId);
        }
        if (groupName != null) {
            paramsBuilder.add(GROUP_NAME_PARAM, groupName);
        }
        if (clusterName != null) {
            paramsBuilder.add(CLUSTER_NAME_PARAM, clusterName);
        }
        if (healthyOnly != null) {
            paramsBuilder.add(HEALTHY_ONLY_PARAM, healthyOnly.toString());
        }
        if (app != null) {
            paramsBuilder.add(APP_PARAM, app);
        }
        if (ip != null) {
            paramsBuilder.add(IP_PARAM, ip);
        }
        if (port != null) {
            paramsBuilder.add(PORT_PARAM, port.toString());
        }
        if (weight != null) {
            paramsBuilder.add(WEIGHT_PARAM, weight.toString());
        }
        return paramsBuilder.build();
    }
Encodes common Nacos API parameters as {@code QueryParamsBuilder}.
nacos/src/main/java/com/linecorp/armeria/internal/nacos/NacosClientUtil.java