@@ -20,6 +20,7 @@ public class GroupFilter {
2020 private Boolean withCustomAttributes ;
2121 private Boolean owned ;
2222 private AccessLevel accessLevel ;
23+ private Boolean topLevelOnly ;
2324
2425 /**
2526 * Do not include the provided groups IDs.
@@ -29,7 +30,7 @@ public class GroupFilter {
2930 */
3031 public GroupFilter withSkipGroups (List <Integer > skipGroups ) {
3132 this .skipGroups = skipGroups ;
32- return (this );
33+ return (this );
3334 }
3435
3536 /**
@@ -41,7 +42,7 @@ public GroupFilter withSkipGroups(List<Integer> skipGroups) {
4142 */
4243 public GroupFilter withAllAvailabley (Boolean allAvailable ) {
4344 this .allAvailable = allAvailable ;
44- return (this );
45+ return (this );
4546 }
4647
4748 /**
@@ -90,7 +91,7 @@ public GroupFilter withStatistics(Boolean statistics) {
9091
9192 /**
9293 * Include custom attributes in response (admins only).
93- *
94+ *
9495 * @param withCustomAttributes if true, include custom attributes in the response
9596 * @return the reference to this GroupFilter instance
9697 */
@@ -121,6 +122,17 @@ public GroupFilter withMinAccessLevel(AccessLevel accessLevel) {
121122 return (this );
122123 }
123124
125+ /**
126+ * Limit by groups which are top level groups
127+ *
128+ * @param topLevelOnly if true, limit to groups which are top level groups
129+ * @return the reference to this GroupFilter instance
130+ */
131+ public GroupFilter withTopLevelOnly (Boolean topLevelOnly ) {
132+ this .topLevelOnly = topLevelOnly ;
133+ return (this );
134+ }
135+
124136 /**
125137 * Get the query params specified by this filter.
126138 *
@@ -135,8 +147,9 @@ public GitLabApiForm getQueryParams() {
135147 .withParam ("sort" , sort )
136148 .withParam ("statistics" , statistics )
137149 .withParam ("with_custom_attributes" , withCustomAttributes )
138- .withParam ("owned" , owned )
150+ .withParam ("owned" , owned )
139151 .withParam ("min_access_level" , accessLevel )
152+ .withParam ("top_level_only" , topLevelOnly )
140153 );
141154 }
142155}
0 commit comments