list method

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

Get a list of push notifications configured for a task.

Request parameters:

parent - The parent task resource. Format: tasks/{task_id} Value must have pattern ^tasks/\[^/\]+$.

pageSize - For AIP-158 these fields are present. Usually not used/needed. The maximum number of configurations to return. If unspecified, all configs will be returned.

pageToken - A page token received from a previous ListTaskPushNotificationConfigRequest call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListTaskPushNotificationConfigRequest must match the call that provided the page token.

tenant - Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListTaskPushNotificationConfigResponse.

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<ListTaskPushNotificationConfigResponse> list(
  core.String parent, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? tenant,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'tenant': ?tenant == null ? null : [tenant],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v1/' + core.Uri.encodeFull('$parent') + '/pushNotificationConfigs';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListTaskPushNotificationConfigResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}