1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
use super::*;
impl<'a, TS: KeycloakTokenSupplier> KeycloakRealmAdmin<'a, TS> {
// <h4>Groups</h4>
/// Get group hierarchy. Only `name` and `id` are returned. `subGroups` are only returned when using the `search` or `q` parameter. If none of these parameters is provided, the top-level groups are returned without `subGroups` being filled.
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `brief_representation`
/// - `exact`
/// - `first`
/// - `max`
/// - `populate_hierarchy`
/// - `q`
/// - `search`
/// - `sub_groups_count`: Boolean which defines whether to return the count of subgroups for each group (default: true
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroups>
pub fn groups_get(&'a self) -> RealmGroupsGet<'a, TS> {
RealmGroupsGet { realm_admin: self }
}
/// create or add a top level realm groupSet or create child.
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `body`
///
/// Returns response for future processing.
///
/// Resource: `Groups`
///
/// `POST /admin/realms/{realm}/groups`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_post_adminrealmsrealmgroups>
pub fn groups_post(
&'a self,
body: GroupRepresentation,
) -> impl Future<Output = Result<DefaultResponse, KeycloakError>> + use<'a, TS> {
self.admin.realm_groups_post(self.realm, body)
}
/// Returns the groups counts.
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `search`
/// - `top`
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups/count`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroupscount>
pub fn groups_count_get(&'a self) -> RealmGroupsCountGet<'a, TS> {
RealmGroupsCountGet { realm_admin: self }
}
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups/{group_id}`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroupsgroup_id>
///
/// REST method: `GET /admin/realms/{realm}/groups/{group-id}`
pub fn groups_with_group_id_get(
&'a self,
group_id: &'a str,
) -> impl Future<Output = Result<GroupRepresentation, KeycloakError>> + use<'a, TS> {
self.admin
.realm_groups_with_group_id_get(self.realm, group_id)
}
/// Update group, ignores subgroups.
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
/// - `body`
///
/// Returns response for future processing.
///
/// Resource: `Groups`
///
/// `PUT /admin/realms/{realm}/groups/{group_id}`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_put_adminrealmsrealmgroupsgroup_id>
///
/// REST method: `PUT /admin/realms/{realm}/groups/{group-id}`
pub fn groups_with_group_id_put(
&'a self,
group_id: &'a str,
body: GroupRepresentation,
) -> impl Future<Output = Result<DefaultResponse, KeycloakError>> + use<'a, TS> {
self.admin
.realm_groups_with_group_id_put(self.realm, group_id, body)
}
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
///
/// Returns response for future processing.
///
/// Resource: `Groups`
///
/// `DELETE /admin/realms/{realm}/groups/{group_id}`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_delete_adminrealmsrealmgroupsgroup_id>
///
/// REST method: `DELETE /admin/realms/{realm}/groups/{group-id}`
pub fn groups_with_group_id_delete(
&'a self,
group_id: &'a str,
) -> impl Future<Output = Result<DefaultResponse, KeycloakError>> + use<'a, TS> {
self.admin
.realm_groups_with_group_id_delete(self.realm, group_id)
}
/// Return a paginated list of subgroups that have a parent group corresponding to the group on the URL
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
/// - `brief_representation`: Boolean which defines whether brief groups representations are returned or not (default: false)
/// - `exact`: Boolean which defines whether the params "search" must match exactly or not
/// - `first`: The position of the first result to be returned (pagination offset).
/// - `max`: The maximum number of results that are to be returned. Defaults to 10
/// - `search`: A String representing either an exact group name or a partial name, defaults to prefix search.
/// - `sub_groups_count`: Boolean which defines whether to return the count of subgroups for each subgroup of this group (default: true)
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups/{group_id}/children`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroupsgroup_idchildren>
///
/// REST method: `GET /admin/realms/{realm}/groups/{group-id}/children`
pub fn groups_with_group_id_children_get(
&'a self,
group_id: &'a str,
) -> RealmGroupsWithGroupIdChildrenGet<'a, TS> {
RealmGroupsWithGroupIdChildrenGet {
realm_admin: self,
group_id,
}
}
/// Set or create child.
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
/// - `body`
///
/// Returns response for future processing.
///
/// Resource: `Groups`
///
/// `POST /admin/realms/{realm}/groups/{group_id}/children`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_post_adminrealmsrealmgroupsgroup_idchildren>
///
/// REST method: `POST /admin/realms/{realm}/groups/{group-id}/children`
pub fn groups_with_group_id_children_post(
&'a self,
group_id: &'a str,
body: GroupRepresentation,
) -> impl Future<Output = Result<DefaultResponse, KeycloakError>> + use<'a, TS> {
self.admin
.realm_groups_with_group_id_children_post(self.realm, group_id, body)
}
/// Return object stating whether client Authorization permissions have been initialized or not and a reference
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups/{group_id}/management/permissions`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroupsgroup_idmanagementpermissions>
///
/// REST method: `GET /admin/realms/{realm}/groups/{group-id}/management/permissions`
pub fn groups_with_group_id_management_permissions_get(
&'a self,
group_id: &'a str,
) -> impl Future<Output = Result<ManagementPermissionReference, KeycloakError>> + use<'a, TS>
{
self.admin
.realm_groups_with_group_id_management_permissions_get(self.realm, group_id)
}
/// Return object stating whether client Authorization permissions have been initialized or not and a reference
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
/// - `body`
///
/// Resource: `Groups`
///
/// `PUT /admin/realms/{realm}/groups/{group_id}/management/permissions`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_put_adminrealmsrealmgroupsgroup_idmanagementpermissions>
///
/// REST method: `PUT /admin/realms/{realm}/groups/{group-id}/management/permissions`
pub fn groups_with_group_id_management_permissions_put(
&'a self,
group_id: &'a str,
body: ManagementPermissionReference,
) -> impl Future<Output = Result<ManagementPermissionReference, KeycloakError>> + use<'a, TS>
{
self.admin
.realm_groups_with_group_id_management_permissions_put(self.realm, group_id, body)
}
/// Get users Returns a stream of users, filtered according to query parameters
///
/// Parameters:
///
/// - `realm`: realm name (not id!)
/// - `group_id`
/// - `brief_representation`: Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.)
/// - `first`: Pagination offset
/// - `max`: Maximum results size (defaults to 100)
///
/// Resource: `Groups`
///
/// `GET /admin/realms/{realm}/groups/{group_id}/members`
///
/// Documentation: <https://www.keycloak.org/docs-api/26.6.0/rest-api/index.html#_get_adminrealmsrealmgroupsgroup_idmembers>
///
/// REST method: `GET /admin/realms/{realm}/groups/{group-id}/members`
pub fn groups_with_group_id_members_get(
&'a self,
group_id: &'a str,
) -> RealmGroupsWithGroupIdMembersGet<'a, TS> {
RealmGroupsWithGroupIdMembersGet {
realm_admin: self,
group_id,
}
}
}
// <h4>Groups</h4>
pub struct RealmGroupsGet<'a, TS: KeycloakTokenSupplier> {
/// Realm admin client
pub realm_admin: &'a KeycloakRealmAdmin<'a, TS>,
}
#[derive(Default)]
pub struct RealmGroupsGetArgs {
pub brief_representation: Option<bool>,
pub exact: Option<bool>,
pub first: Option<i32>,
pub max: Option<i32>,
pub populate_hierarchy: Option<bool>,
pub q: Option<String>,
pub search: Option<String>,
/// Boolean which defines whether to return the count of subgroups for each group (default: true
pub sub_groups_count: Option<bool>,
}
impl<'a, TS: KeycloakTokenSupplier + Send + Sync> KeycloakRealmAdminMethod
for RealmGroupsGet<'a, TS>
{
type Output = TypeVec<GroupRepresentation>;
type Args = RealmGroupsGetArgs;
fn opts(
self,
Self::Args {
brief_representation,
exact,
first,
max,
populate_hierarchy,
q,
search,
sub_groups_count,
}: Self::Args,
) -> impl Future<Output = Result<Self::Output, KeycloakError>> + use<'a, TS> {
self.realm_admin.admin.realm_groups_get(
self.realm_admin.realm,
brief_representation,
exact,
first,
max,
populate_hierarchy,
q,
search,
sub_groups_count,
)
}
}
impl<'a, TS> IntoFuture for RealmGroupsGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
type Output = Result<TypeVec<GroupRepresentation>, KeycloakError>;
type IntoFuture = Pin<Box<dyn 'a + Future<Output = Self::Output> + Send>>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.opts(Default::default()))
}
}
pub struct RealmGroupsCountGet<'a, TS: KeycloakTokenSupplier> {
/// Realm admin client
pub realm_admin: &'a KeycloakRealmAdmin<'a, TS>,
}
#[derive(Default)]
pub struct RealmGroupsCountGetArgs {
pub search: Option<String>,
pub top: Option<bool>,
}
impl<'a, TS: KeycloakTokenSupplier + Send + Sync> KeycloakRealmAdminMethod
for RealmGroupsCountGet<'a, TS>
{
type Output = TypeMap<String, i64>;
type Args = RealmGroupsCountGetArgs;
fn opts(
self,
Self::Args { search, top }: Self::Args,
) -> impl Future<Output = Result<Self::Output, KeycloakError>> + use<'a, TS> {
self.realm_admin
.admin
.realm_groups_count_get(self.realm_admin.realm, search, top)
}
}
impl<'a, TS> IntoFuture for RealmGroupsCountGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
type Output = Result<TypeMap<String, i64>, KeycloakError>;
type IntoFuture = Pin<Box<dyn 'a + Future<Output = Self::Output> + Send>>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.opts(Default::default()))
}
}
pub struct RealmGroupsWithGroupIdChildrenGet<'a, TS: KeycloakTokenSupplier> {
/// Realm admin client
pub realm_admin: &'a KeycloakRealmAdmin<'a, TS>,
pub group_id: &'a str,
}
#[derive(Default)]
pub struct RealmGroupsWithGroupIdChildrenGetArgs {
/// Boolean which defines whether brief groups representations are returned or not (default: false)
pub brief_representation: Option<bool>,
/// Boolean which defines whether the params "search" must match exactly or not
pub exact: Option<bool>,
/// The position of the first result to be returned (pagination offset).
pub first: Option<i32>,
/// The maximum number of results that are to be returned. Defaults to 10
pub max: Option<i32>,
/// A String representing either an exact group name or a partial name, defaults to prefix search.
pub search: Option<String>,
/// Boolean which defines whether to return the count of subgroups for each subgroup of this group (default: true)
pub sub_groups_count: Option<bool>,
}
impl<'a, TS: KeycloakTokenSupplier + Send + Sync> KeycloakRealmAdminMethod
for RealmGroupsWithGroupIdChildrenGet<'a, TS>
{
type Output = TypeVec<GroupRepresentation>;
type Args = RealmGroupsWithGroupIdChildrenGetArgs;
fn opts(
self,
Self::Args {
brief_representation,
exact,
first,
max,
search,
sub_groups_count,
}: Self::Args,
) -> impl Future<Output = Result<Self::Output, KeycloakError>> + use<'a, TS> {
self.realm_admin
.admin
.realm_groups_with_group_id_children_get(
self.realm_admin.realm,
self.group_id,
brief_representation,
exact,
first,
max,
search,
sub_groups_count,
)
}
}
impl<'a, TS> IntoFuture for RealmGroupsWithGroupIdChildrenGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
type Output = Result<TypeVec<GroupRepresentation>, KeycloakError>;
type IntoFuture = Pin<Box<dyn 'a + Future<Output = Self::Output> + Send>>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.opts(Default::default()))
}
}
pub struct RealmGroupsWithGroupIdMembersGet<'a, TS: KeycloakTokenSupplier> {
/// Realm admin client
pub realm_admin: &'a KeycloakRealmAdmin<'a, TS>,
pub group_id: &'a str,
}
#[derive(Default)]
pub struct RealmGroupsWithGroupIdMembersGetArgs {
/// Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.)
pub brief_representation: Option<bool>,
/// Pagination offset
pub first: Option<i32>,
/// Maximum results size (defaults to 100)
pub max: Option<i32>,
}
impl<'a, TS: KeycloakTokenSupplier + Send + Sync> KeycloakRealmAdminMethod
for RealmGroupsWithGroupIdMembersGet<'a, TS>
{
type Output = TypeVec<UserRepresentation>;
type Args = RealmGroupsWithGroupIdMembersGetArgs;
fn opts(
self,
Self::Args {
brief_representation,
first,
max,
}: Self::Args,
) -> impl Future<Output = Result<Self::Output, KeycloakError>> + use<'a, TS> {
self.realm_admin
.admin
.realm_groups_with_group_id_members_get(
self.realm_admin.realm,
self.group_id,
brief_representation,
first,
max,
)
}
}
impl<'a, TS> IntoFuture for RealmGroupsWithGroupIdMembersGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
type Output = Result<TypeVec<UserRepresentation>, KeycloakError>;
type IntoFuture = Pin<Box<dyn 'a + Future<Output = Self::Output> + Send>>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.opts(Default::default()))
}
}
#[cfg(feature = "builder")]
mod builder {
use crate::builder::Builder;
use super::*;
// <h4>Groups</h4>
impl<'a, TS> RealmGroupsGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
pub fn brief_representation(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().brief_representation(value)
}
pub fn exact(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().exact(value)
}
pub fn first(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().first(value)
}
pub fn max(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().max(value)
}
pub fn populate_hierarchy(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().populate_hierarchy(value)
}
pub fn q(self, value: impl Into<Option<String>>) -> Builder<'a, Self> {
self.builder().q(value)
}
pub fn search(self, value: impl Into<Option<String>>) -> Builder<'a, Self> {
self.builder().search(value)
}
/// Boolean which defines whether to return the count of subgroups for each group (default: true
pub fn sub_groups_count(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().sub_groups_count(value)
}
}
impl<TS> Builder<'_, RealmGroupsGet<'_, TS>>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
pub fn brief_representation(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.brief_representation = value.into();
self
}
pub fn exact(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.exact = value.into();
self
}
pub fn first(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.first = value.into();
self
}
pub fn max(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.max = value.into();
self
}
pub fn populate_hierarchy(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.populate_hierarchy = value.into();
self
}
pub fn q(mut self, value: impl Into<Option<String>>) -> Self {
self.args.q = value.into();
self
}
pub fn search(mut self, value: impl Into<Option<String>>) -> Self {
self.args.search = value.into();
self
}
/// Boolean which defines whether to return the count of subgroups for each group (default: true
pub fn sub_groups_count(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.sub_groups_count = value.into();
self
}
}
impl<'a, TS> RealmGroupsCountGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
pub fn search(self, value: impl Into<Option<String>>) -> Builder<'a, Self> {
self.builder().search(value)
}
pub fn top(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().top(value)
}
}
impl<TS> Builder<'_, RealmGroupsCountGet<'_, TS>>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
pub fn search(mut self, value: impl Into<Option<String>>) -> Self {
self.args.search = value.into();
self
}
pub fn top(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.top = value.into();
self
}
}
impl<'a, TS> RealmGroupsWithGroupIdChildrenGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
/// Boolean which defines whether brief groups representations are returned or not (default: false)
pub fn brief_representation(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().brief_representation(value)
}
/// Boolean which defines whether the params "search" must match exactly or not
pub fn exact(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().exact(value)
}
/// The position of the first result to be returned (pagination offset).
pub fn first(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().first(value)
}
/// The maximum number of results that are to be returned. Defaults to 10
pub fn max(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().max(value)
}
/// A String representing either an exact group name or a partial name, defaults to prefix search.
pub fn search(self, value: impl Into<Option<String>>) -> Builder<'a, Self> {
self.builder().search(value)
}
/// Boolean which defines whether to return the count of subgroups for each subgroup of this group (default: true)
pub fn sub_groups_count(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().sub_groups_count(value)
}
}
impl<TS> Builder<'_, RealmGroupsWithGroupIdChildrenGet<'_, TS>>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
/// Boolean which defines whether brief groups representations are returned or not (default: false)
pub fn brief_representation(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.brief_representation = value.into();
self
}
/// Boolean which defines whether the params "search" must match exactly or not
pub fn exact(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.exact = value.into();
self
}
/// The position of the first result to be returned (pagination offset).
pub fn first(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.first = value.into();
self
}
/// The maximum number of results that are to be returned. Defaults to 10
pub fn max(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.max = value.into();
self
}
/// A String representing either an exact group name or a partial name, defaults to prefix search.
pub fn search(mut self, value: impl Into<Option<String>>) -> Self {
self.args.search = value.into();
self
}
/// Boolean which defines whether to return the count of subgroups for each subgroup of this group (default: true)
pub fn sub_groups_count(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.sub_groups_count = value.into();
self
}
}
impl<'a, TS> RealmGroupsWithGroupIdMembersGet<'a, TS>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
/// Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.)
pub fn brief_representation(self, value: impl Into<Option<bool>>) -> Builder<'a, Self> {
self.builder().brief_representation(value)
}
/// Pagination offset
pub fn first(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().first(value)
}
/// Maximum results size (defaults to 100)
pub fn max(self, value: impl Into<Option<i32>>) -> Builder<'a, Self> {
self.builder().max(value)
}
}
impl<TS> Builder<'_, RealmGroupsWithGroupIdMembersGet<'_, TS>>
where
TS: KeycloakTokenSupplier + Send + Sync,
{
/// Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.)
pub fn brief_representation(mut self, value: impl Into<Option<bool>>) -> Self {
self.args.brief_representation = value.into();
self
}
/// Pagination offset
pub fn first(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.first = value.into();
self
}
/// Maximum results size (defaults to 100)
pub fn max(mut self, value: impl Into<Option<i32>>) -> Self {
self.args.max = value.into();
self
}
}
}