purge method

Deletes permanently all user events specified by the filter provided.

Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

request - The metadata request object.

Request parameters:

parent - Required. The resource name of the event_store under which the events are created. The format is projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/catalogs/\[^/\]+/eventStores/\[^/\]+$.

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

Completes with a GoogleLongrunningOperation.

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<GoogleLongrunningOperation> purge(
  GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest request,
  core.String parent, {
  core.String? $fields,
}) async {
  final _body = convert.json.encode(request.toJson());
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url =
      'v1beta1/' + core.Uri.encodeFull('$parent') + '/userEvents:purge';

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