update method

Future<TeamDrive> update(
  1. TeamDrive request,
  2. String teamDriveId, {
  3. bool? useDomainAdminAccess,
  4. String? $fields,
})

Deprecated: Use drives.update instead.

request - The metadata request object.

Request parameters:

teamDriveId - The ID of the Team Drive

useDomainAdminAccess - Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.

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

Completes with a TeamDrive.

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<TeamDrive> update(
  TeamDrive request,
  core.String teamDriveId, {
  core.bool? useDomainAdminAccess,
  core.String? $fields,
}) async {
  final body_ = convert_1.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (useDomainAdminAccess != null)
      'useDomainAdminAccess': ['${useDomainAdminAccess}'],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'teamdrives/' + commons.escapeVariable('$teamDriveId');

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