create method
- GoogleFirebaseAppdistroV1Group request,
- String parent, {
- String? groupId,
- String? $fields,
Create a group.
request
- The metadata request object.
Request parameters:
parent
- Required. The name of the project resource, which is the parent
of the group resource. Format: projects/{project_number}
Value must have pattern ^projects/\[^/\]+$
.
groupId
- Optional. The "alias" to use for the group, which will become
the final component of the group's resource name. This value must be
unique per project. The field is named groupId
to comply with AIP
guidance for user-specified IDs. This value should be 4-63 characters, and
valid characters are /a-z-/
. If not set, it will be generated based on
the display name.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleFirebaseAppdistroV1Group.
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<GoogleFirebaseAppdistroV1Group> create(
GoogleFirebaseAppdistroV1Group request,
core.String parent, {
core.String? groupId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (groupId != null) 'groupId': [groupId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/groups';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleFirebaseAppdistroV1Group.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}