create method
- GoogleFirebaseInstallationsV1Installation request,
- String parent, {
- String? $fields,
Creates (and registers) a new Firebase Installation, incl.
its FID and associated keys/tokens for authentication: - For FIS_v1, this associates the client-side generated Verification Key with the Firebase Installation. - For FIS_v2, this creates the Refresh Token which is used to authenticate GenerateAuthToken requests. - This also creates the initial temporary FIS-Auth-Token. Refer to https://cloud.google.com/apis/design/standard_methods for method definition formats.
request
- The metadata request object.
Request parameters:
parent
- The parent resource name. Identifies the Cloud Project owning
this Installation. We accept both projectID and projectNumber.
Value must have pattern ^projects/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleFirebaseInstallationsV1Installation.
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<GoogleFirebaseInstallationsV1Installation> create(
GoogleFirebaseInstallationsV1Installation 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 = 'v1/' + core.Uri.encodeFull('$parent') + '/installations';
final _response = await _requester.request(
_url,
'POST',
body: _body,
queryParams: _queryParams,
);
return GoogleFirebaseInstallationsV1Installation.fromJson(
_response as core.Map<core.String, core.dynamic>);
}