diff --git a/src/main/java/org/gitlab4j/api/models/GroupFilter.java b/src/main/java/org/gitlab4j/api/models/GroupFilter.java index 0b9b27499fc66f2963bc6a9aaec49a76dc2f3352..d8f3047cfc760be6a285a9f8b9c6c8a9250ab53a 100644 --- a/src/main/java/org/gitlab4j/api/models/GroupFilter.java +++ b/src/main/java/org/gitlab4j/api/models/GroupFilter.java @@ -20,6 +20,7 @@ public class GroupFilter { private Boolean withCustomAttributes; private Boolean owned; private AccessLevel accessLevel; + private Boolean topLevelOnly; /** * Do not include the provided groups IDs. @@ -29,7 +30,7 @@ public class GroupFilter { */ public GroupFilter withSkipGroups(List skipGroups) { this.skipGroups = skipGroups; - return (this); + return (this); } /** @@ -41,7 +42,7 @@ public class GroupFilter { */ public GroupFilter withAllAvailabley(Boolean allAvailable) { this.allAvailable = allAvailable; - return (this); + return (this); } /** @@ -90,7 +91,7 @@ public class GroupFilter { /** * Include custom attributes in response (admins only). - * + * * @param withCustomAttributes if true, include custom attributes in the response * @return the reference to this GroupFilter instance */ @@ -121,6 +122,17 @@ public class GroupFilter { return (this); } + /** + * Limit by groups which are top level groups + * + * @param topLevelOnly if true, limit to groups which are top level groups + * @return the reference to this GroupFilter instance + */ + public GroupFilter withTopLevelOnly(Boolean topLevelOnly) { + this.topLevelOnly = topLevelOnly; + return (this); + } + /** * Get the query params specified by this filter. * @@ -135,8 +147,9 @@ public class GroupFilter { .withParam("sort", sort) .withParam("statistics", statistics) .withParam("with_custom_attributes", withCustomAttributes) - .withParam("owned", owned) + .withParam("owned", owned) .withParam("min_access_level", accessLevel) + .withParam("top_level_only", topLevelOnly) ); } }