create method

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

Requests the creation of a new WebApp 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 a WebApp, in the format: projects/PROJECT_IDENTIFIER/webApps 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(
  WebApp 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') + '/webApps';

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