delete method

Future<Empty> delete(
  1. String alertId, {
  2. String? customerId,
  3. String? $fields,
})

Marks the specified alert for deletion.

An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a NOT_FOUND error.

Request parameters:

alertId - Required. The identifier of the alert to delete.

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

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

Completes with a Empty.

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

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

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