create method
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>);
}