finalize method

  1. @Deprecated('Not supported. Member documentation may have more information.')
Future<Operation> finalize(
  1. FinalizeDefaultLocationRequest request,
  2. String parent, {
  3. String? $fields,
})

DEPRECATED. Instead, use the applicable resource-specific REST API to set the location for each resource used in your Project. Sets the default Google Cloud Platform (GCP) resource location for the specified FirebaseProject.

This method creates an App Engine application with a default Cloud Storage bucket, located in the specified [locationId](#body.request_body.FIELDS.location_id). This location must be one of the available GCP resource locations. After the default GCP resource location is finalized, or if it was already set, it cannot be changed. The default GCP resource location for the specified FirebaseProject might already be set because either the underlying GCP Project already has an App Engine application or FinalizeDefaultLocation was previously called with a specified locationId. Any new calls to FinalizeDefaultLocation with a different specified locationId will return a 409 error. The result of this call is an [Operation](../../v1beta1/operations), which can be used to track the provisioning process. The [response](../../v1beta1/operations#Operation.FIELDS.response) type of the Operation is google.protobuf.Empty. The Operation can be polled by its name using GetOperation until done is true. When done is true, the Operation has either succeeded or failed. If the Operation has succeeded, its [response](../../v1beta1/operations#Operation.FIELDS.response) will be set to a google.protobuf.Empty; if the Operation has failed, its error will be set to a google.rpc.Status. The Operation is automatically deleted after completion, so there is no need to call DeleteOperation. All fields listed in the [request body](#request-body) are required. To call FinalizeDefaultLocation, a member must be an Owner of the Project.

request - The metadata request object.

Request parameters:

parent - The resource name of the FirebaseProject for which the default GCP resource location will be set, 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 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

@core.Deprecated(
  'Not supported. Member documentation may have more information.',
)
async.Future<Operation> finalize(
  FinalizeDefaultLocationRequest request,
  core.String parent, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1beta1/' +
      core.Uri.encodeFull('$parent') +
      '/defaultLocation:finalize';

  final response_ = await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
  );
  return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}