Package org.gitlab4j.api.models
Class GroupFilter
- java.lang.Object
-
- org.gitlab4j.api.models.GroupFilter
-
- All Implemented Interfaces:
java.io.Serializable
public class GroupFilter extends java.lang.Object implements java.io.SerializableThis class is used to filter Groups when getting lists of groups.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GroupFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GitLabFormgetQueryParams()Get the query params specified by this filter.java.lang.StringtoString()GroupFilterwithAllAvailable(java.lang.Boolean allAvailable)Show all the groups you have access to (defaults to false for authenticated users, true for admin).GroupFilterwithCustomAttributeFilter(java.lang.String key, java.lang.String value)Results must have custom attribute (admins only).GroupFilterwithCustomAttributes(java.lang.Boolean withCustomAttributes)Include custom attributes in response (admins only).GroupFilterwithMinAccessLevel(AccessLevel accessLevel)Limit to groups where current user has at least this access level.GroupFilterwithOrderBy(Constants.GroupOrderBy orderBy)Return groups ordered by id, name, path, created_at, updated_at, or last_activity_at fields.GroupFilterwithOwned(java.lang.Boolean owned)Limit by groups explicitly owned by the current userGroupFilterwithSearch(java.lang.String search)Return list of groups matching the search criteria.GroupFilterwithSkipGroups(java.util.List<java.lang.Long> skipGroups)Do not include the provided groups IDs.GroupFilterwithSortOder(Constants.SortOrder sort)Return groups sorted in asc or desc order.GroupFilterwithStatistics(java.lang.Boolean statistics)Include group statistics (admins only).GroupFilterwithTopLevelOnly(java.lang.Boolean topLevelOnly)Limit by groups which are top level groups
-
-
-
Method Detail
-
withSkipGroups
public GroupFilter withSkipGroups(java.util.List<java.lang.Long> skipGroups)
Do not include the provided groups IDs.- Parameters:
skipGroups- List of group IDs to not include in the search- Returns:
- the reference to this GroupFilter instance
-
withAllAvailable
public GroupFilter withAllAvailable(java.lang.Boolean allAvailable)
Show all the groups you have access to (defaults to false for authenticated users, true for admin). Attributes owned and min_access_level have precedence- Parameters:
allAvailable- if true show all available groups- Returns:
- the reference to this GroupFilter instance
-
withSearch
public GroupFilter withSearch(java.lang.String search)
Return list of groups matching the search criteria.- Parameters:
search- the search criteria- Returns:
- the reference to this GroupFilter instance
-
withOrderBy
public GroupFilter withOrderBy(Constants.GroupOrderBy orderBy)
Return groups ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.- Parameters:
orderBy- specifies what field to order by- Returns:
- the reference to this GroupFilter instance
-
withSortOder
public GroupFilter withSortOder(Constants.SortOrder sort)
Return groups sorted in asc or desc order. Default is desc.- Parameters:
sort- sort direction, ASC or DESC- Returns:
- the reference to this GroupFilter instance
-
withStatistics
public GroupFilter withStatistics(java.lang.Boolean statistics)
Include group statistics (admins only).- Parameters:
statistics- if true, return statistics with the results- Returns:
- the reference to this GroupFilter instance
-
withCustomAttributes
public GroupFilter withCustomAttributes(java.lang.Boolean withCustomAttributes)
Include custom attributes in response (admins only).- Parameters:
withCustomAttributes- if true, include custom attributes in the response- Returns:
- the reference to this GroupFilter instance
-
withCustomAttributeFilter
public GroupFilter withCustomAttributeFilter(java.lang.String key, java.lang.String value)
Results must have custom attribute (admins only). Can be chained to combine multiple attribute checks.- Parameters:
key- the assets returned must have the specified custom attribute keyvalue- the assets returned must have the specified value for the custom attribute key- Returns:
- the reference to this GroupFilter instance
-
withOwned
public GroupFilter withOwned(java.lang.Boolean owned)
Limit by groups explicitly owned by the current user- Parameters:
owned- if true, limit to groups explicitly owned by the current user- Returns:
- the reference to this GroupFilter instance
-
withMinAccessLevel
public GroupFilter withMinAccessLevel(AccessLevel accessLevel)
Limit to groups where current user has at least this access level.- Parameters:
accessLevel- limit to groups where current user has at least this access level- Returns:
- the reference to this GroupFilter instance
-
withTopLevelOnly
public GroupFilter withTopLevelOnly(java.lang.Boolean topLevelOnly)
Limit by groups which are top level groups- Parameters:
topLevelOnly- if true, limit to groups which are top level groups- Returns:
- the reference to this GroupFilter instance
-
getQueryParams
public GitLabForm getQueryParams()
Get the query params specified by this filter.- Returns:
- a GitLabApiForm instance holding the query parameters for this GroupFilter instance
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-