Class GroupFilter

  • All Implemented Interfaces:
    java.io.Serializable

    public class GroupFilter
    extends java.lang.Object
    implements java.io.Serializable
    This class is used to filter Groups when getting lists of groups.
    See Also:
    Serialized Form
    • Constructor Detail

      • GroupFilter

        public GroupFilter()
    • 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 key
        value - 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:
        toString in class java.lang.Object