lookup method

Future<LookupGroupNameResponse> lookup({
  1. String? groupKey_id,
  2. String? groupKey_namespace,
  3. String? $fields,
})

Looks up the resource name of a Group by its EntityKey.

Request parameters:

groupKey_id - The ID of the entity. For Google-managed entities, the id should be the email address of an existing group or user. Email addresses need to adhere to name guidelines for users and groups. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

groupKey_namespace - The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source}.

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

Completes with a LookupGroupNameResponse.

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<LookupGroupNameResponse> lookup({
  core.String? groupKey_id,
  core.String? groupKey_namespace,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (groupKey_id != null) 'groupKey.id': [groupKey_id],
    if (groupKey_namespace != null)
      'groupKey.namespace': [groupKey_namespace],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/groups:lookup';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return LookupGroupNameResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}