batchGet method
Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.
Request parameters:
groupFields
- Optional. A field mask to restrict which fields on the
group are returned. Defaults to metadata
, groupType
, memberCount
,
and name
if not set or set to empty. Valid fields are: * clientData *
groupType * memberCount * metadata * name
maxMembers
- Optional. Specifies the maximum number of members to return
for each group. Defaults to 0 if not set, which will return zero members.
resourceNames
- Required. The resource names of the contact groups to
get. There is a maximum of 200 resource names.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BatchGetContactGroupsResponse.
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<BatchGetContactGroupsResponse> batchGet({
core.String? groupFields,
core.int? maxMembers,
core.List<core.String>? resourceNames,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (groupFields != null) 'groupFields': [groupFields],
if (maxMembers != null) 'maxMembers': ['${maxMembers}'],
if (resourceNames != null) 'resourceNames': resourceNames,
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/contactGroups:batchGet';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BatchGetContactGroupsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}