removeAnalytics method

Future<Empty> removeAnalytics(
  1. RemoveAnalyticsRequest request,
  2. String parent, {
  3. String? $fields,
})

Unlinks the specified FirebaseProject from its Google Analytics account.

This call removes the association of the specified FirebaseProject with its current Google Analytics property. However, this call does not delete the Google Analytics resources, such as the Google Analytics property or any data streams. These resources may be re-associated later to the FirebaseProject by calling [AddGoogleAnalytics](../../v1beta1/projects/addGoogleAnalytics) and specifying the same analyticsPropertyId. For Android Apps and iOS Apps, this call re-links data streams with their corresponding apps. However, for Web Apps, this call provisions a new data stream for each Web App. To call RemoveAnalytics, a project member must be an Owner for the FirebaseProject.

request - The metadata request object.

Request parameters:

parent - The resource name of the FirebaseProject to unlink from its Google Analytics account, in the format: projects/PROJECT_IDENTIFIER Refer to the FirebaseProject [name](../projects#FirebaseProject.FIELDS.name) field for details about PROJECT_IDENTIFIER values. Value must have pattern ^projects/\[^/\]+$.

$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> removeAnalytics(
  RemoveAnalyticsRequest 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') + ':removeAnalytics';

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