package org.hisp.dhis.android.core.common;

import com.google.auto.value.AutoValue;

import java.util.Set;

@AutoValue
public abstract class UidsQuery extends BaseQuery {
    public abstract Set<String> uids();

    abstract Integer limit();

    @Override
    boolean isValid() {
        return limit() == null || uids().size() <= limit();
    }

    public static UidsQuery create(Set<String> uids, Integer limit) {
        return new AutoValue_UidsQuery(1, BaseQuery.DEFAULT_PAGE_SIZE, false, uids, limit);
    }
}

@@ -101,16 +101,51 @@
 l.Set;%0A%0A
+import javax.annotation.Nullable;%0A%0A
 @AutoVal
@@ -198,16 +198,31 @@
 eQuery %7B
+%0A%0A    @Nullable
 %0A    pub
@@ -251,24 +251,38 @@
 g%3E uids();%0A%0A
+    @Nullable%0A
     abstract

set uids and limit as Nullable fields