Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/main/java/org/gitlab4j/api/models/GroupFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -29,7 +30,7 @@ public class GroupFilter {
*/
public GroupFilter withSkipGroups(List<Integer> skipGroups) {
this.skipGroups = skipGroups;
return (this);
return (this);
}

/**
Expand All @@ -41,7 +42,7 @@ public GroupFilter withSkipGroups(List<Integer> skipGroups) {
*/
public GroupFilter withAllAvailabley(Boolean allAvailable) {
this.allAvailable = allAvailable;
return (this);
return (this);
}

/**
Expand Down Expand Up @@ -90,7 +91,7 @@ public GroupFilter withStatistics(Boolean statistics) {

/**
* Include custom attributes in response (admins only).
*
*
* @param withCustomAttributes if true, include custom attributes in the response
* @return the reference to this GroupFilter instance
*/
Expand Down Expand Up @@ -121,6 +122,17 @@ public GroupFilter withMinAccessLevel(AccessLevel accessLevel) {
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.
*
Expand All @@ -135,8 +147,9 @@ public GitLabApiForm getQueryParams() {
.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)
);
}
}