View Javadoc
1   /*
2    * Copyright 2026 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.bremersee.keycloak.api;
18  
19  import org.immutables.value.Value;
20  import org.jspecify.annotations.NonNull;
21  import org.jspecify.annotations.Nullable;
22  
23  /**
24   * The get user parameters.
25   *
26   * @author Christian Bremer
27   */
28  @Value.Style(
29      visibility = Value.Style.ImplementationVisibility.PACKAGE,
30      overshadowImplementation = true,
31      depluralize = true,
32      jdk9Collections = true,
33      get = {"get*", "is*"},
34      withUnaryOperator = "with*")
35  @Value.Immutable
36  public interface GetGroupsParameters {
37  
38    /**
39     * Boolean which defines whether brief representations are returned (default: false).
40     *
41     * @return the brief representation
42     */
43    @Nullable Boolean getBriefRepresentation();
44  
45    /**
46     * Boolean which defines whether the params "last", "firstName", "email" and "username" must match
47     * exactly.
48     *
49     * @return the exact
50     */
51    @Nullable Boolean getExact();
52  
53    /**
54     * Gets pagination offset.
55     *
56     * @return the first
57     */
58    @Nullable Integer getFirst();
59  
60    /**
61     * Maximum results size (defaults to 100).
62     *
63     * @return the max
64     */
65    @Nullable Integer getMax();
66  
67    /**
68     * Gets populate hierarchy.
69     *
70     * @return the populate hierarchy
71     */
72    @Nullable Boolean getPopulateHierarchy();
73  
74    /**
75     * A query to search for custom attributes, in the format 'key1:value2 key2:value2'.
76     *
77     * @return the query
78     */
79    @Nullable String getQuery();
80  
81    /**
82     * A String contained in username, first or last name, or email. Default search behavior is
83     * prefix-based (e.g., foo or foo*). Use *foo* for infix search and "foo" for exact search.
84     *
85     * @return the search
86     */
87    @Nullable String getSearch();
88  
89    /**
90     * Gets subgroups count.
91     *
92     * @return the subgroups count
93     */
94    @Nullable Boolean getSubGroupsCount();
95  
96    /**
97     * Default get user parameters.
98     *
99     * @return the get user parameters
100    */
101   @NonNull
102   static GetGroupsParameters defaults() {
103     return GetGroupsParameters.builder().build();
104   }
105 
106   /**
107    * Creates new builder.
108    *
109    * @return the builder
110    */
111   static Builder builder() {
112     return new Builder();
113   }
114 
115   /**
116    * The builder.
117    */
118   class Builder extends ImmutableGetGroupsParameters.Builder {
119 
120   }
121 }