create method

Future<Operation> create(
  1. AndroidApp request,
  2. String parent, {
  3. String? $fields,
})

Requests the creation of a new AndroidApp in the specified FirebaseProject.

The result of this call is an Operation which can be used to track the provisioning process. The Operation is automatically deleted after completion, so there is no need to call DeleteOperation.

request - The metadata request object.

Request parameters:

parent - The resource name of the parent FirebaseProject in which to create an AndroidApp, in the format: projects/PROJECT_IDENTIFIER/androidApps 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

async.Future<Operation> create(
  AndroidApp 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') + '/androidApps';

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