list method

Future<ListAlertFeedbackResponse> list(
  1. String alertId, {
  2. String? customerId,
  3. String? filter,
  4. String? $fields,
})

Lists all the feedback for an alert.

Attempting to list feedbacks for a non-existent alert returns NOT_FOUND error.

Request parameters:

alertId - Required. The alert identifier. The "-" wildcard could be used to represent all alerts.

customerId - Optional. The unique identifier of the Google Workspace organization account of the customer the alert feedback are associated with. Inferred from the caller identity if not provided.

filter - Optional. A query string for filtering alert feedback results. For more details, see Query filters and Supported query filter fields.

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

Completes with a ListAlertFeedbackResponse.

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<ListAlertFeedbackResponse> list(
  core.String alertId, {
  core.String? customerId,
  core.String? filter,
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if (customerId != null) 'customerId': [customerId],
    if (filter != null) 'filter': [filter],
    if ($fields != null) 'fields': [$fields],
  };

  final _url =
      'v1beta1/alerts/' + commons.escapeVariable('$alertId') + '/feedback';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return ListAlertFeedbackResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}