list method
Lists a label's permissions.
Request parameters:
parent - Required. The parent label resource name on which label
permissions are listed. Format: labels/{label}.
Value must have pattern ^labels/\[^/\]+$.
pageSize - Maximum number of permissions to return per page. Default:
50. Max: 200.
pageToken - The token of the page to return.
useAdminAccess - Set to true in order to use the user's admin
credentials. The server will verify the user is an admin for the label
before allowing access.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GoogleAppsDriveLabelsV2ListLabelPermissionsResponse.
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<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.bool? useAdminAccess,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'useAdminAccess': ?useAdminAccess == null ? null : ['${useAdminAccess}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/permissions';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleAppsDriveLabelsV2ListLabelPermissionsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}