get method

Future<CseIdentity> get(
  1. String userId,
  2. String cseEmailAddress, {
  3. String? $fields,
})

Retrieves a client-side encryption identity configuration.

Request parameters:

userId - The requester's primary email address. To indicate the authenticated user, you can use the special value me.

cseEmailAddress - The primary email address associated with the client-side encryption identity configuration that's retrieved.

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

Completes with a CseIdentity.

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<CseIdentity> get(
  core.String userId,
  core.String cseEmailAddress, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'gmail/v1/users/' +
      commons.escapeVariable('$userId') +
      '/settings/cse/identities/' +
      commons.escapeVariable('$cseEmailAddress');

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