delete method
Deletes a subscriber registration.
This will stop all notifications to the subscriber's endpoint.
Request parameters:
name - Required. The name of the subscriber to delete. Format:
projects/{project}/subscribers/{subscriber} Example:
projects/my-project/subscribers/my-subscriber-123 The {subscriber} ID is
user-settable (4-36 characters, matching
/[a-z]([a-z0-9-]{2,34}[a-z0-9])/) or system-generated if not
provided during creation.
Value must have pattern ^projects/\[^/\]+/subscribers/\[^/\]+$.
force - Optional. If set to true, any child resources (e.g.,
subscriptions) will also be deleted. If false (default) and child
resources exist, the request will fail.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a Operation.
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<Operation> delete(
core.String name, {
core.bool? force,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'force': ?force == null ? null : ['${force}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v4/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}