list method
Lists the Membership
s within a Group
.
Request parameters:
parent
- Required. The parent Group
resource under which to lookup the
Membership
name. Must be of the form groups/{group}
.
Value must have pattern ^groups/\[^/\]+$
.
pageSize
- The maximum number of results to return. Note that the number
of results returned may be less than this value even if there are more
available results. To fetch all results, clients must continue calling
this method repeatedly until the response no longer contains a
next_page_token
. If unspecified, defaults to 200 for GroupView.BASIC
and to 50 for GroupView.FULL
. Must not be greater than 1000 for
GroupView.BASIC
or 500 for GroupView.FULL
.
pageToken
- The next_page_token
value returned from a previous search
request, if any.
view
- The level of detail to be returned. If unspecified, defaults to
View.BASIC
.
Possible string values are:
- "VIEW_UNSPECIFIED" : Default. Should not be used.
- "BASIC" : Only basic resource information is returned.
- "FULL" : All resource information is returned.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListMembershipsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ListMembershipsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/memberships';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListMembershipsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}