Class GroupFilter

java.lang.Object
org.miaixz.bus.gitlab.models.GroupFilter
All Implemented Interfaces:
Serializable

public class GroupFilter extends Object implements Serializable
This class is used to filter Groups when getting lists of groups.
See Also:
  • Constructor Details

    • GroupFilter

      public GroupFilter()
  • Method Details

    • withSkipGroups

      public GroupFilter withSkipGroups(List<Integer> 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
    • withAllAvailabley

      @Deprecated public GroupFilter withAllAvailabley(Boolean allAvailable)
      Deprecated.
      this method contains a typo, use withAllAvailable(Boolean) instead
    • withAllAvailable

      public GroupFilter withAllAvailable(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(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(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(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(String key, 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(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(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 GitLabApiForm getQueryParams()
      Get the query params specified by this filter.
      Returns:
      a GitLabApiForm instance holding the query parameters for this GroupFilter instance
    • toString

      public String toString()
      Overrides:
      toString in class Object