register method

Register a PublisherProfile for a Project.

request - The metadata request object.

Request parameters:

parent - Required. The project for which we are registering a PublisherProfile. e.g. projects/23427309 or projects/project-id Value must have pattern ^projects/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleFirebaseExtensionsV1betaPublisherProfile.

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<GoogleFirebaseExtensionsV1betaPublisherProfile> register(
  GoogleFirebaseExtensionsV1betaPublisherProfile 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 = 'v1beta/' +
      core.Uri.encodeFull('$parent') +
      '/publisherProfile:register';

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