list method

Future<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse> list(
  1. String parent, {
  2. int? pageSize,
  3. String? pageToken,
  4. bool? useAdminAccess,
  5. String? $fields,
})

Lists a Label's permissions.

Request parameters:

parent - Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label} Value must have pattern ^labels/\[^/\]+/revisions/\[^/\]+$.

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>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (useAdminAccess != null) 'useAdminAccess': ['${useAdminAccess}'],
    if ($fields != null) 'fields': [$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>);
}