updateSettings method

Future<Settings> updateSettings(
  1. Settings request, {
  2. String? customerId,
  3. String? $fields,
})

Updates the customer-level settings.

request - The metadata request object.

Request parameters:

customerId - Optional. The unique identifier of the Google Workspace account of the customer the alert settings are associated with. The customer_id must have the initial "C" stripped (for example, 046psxkn). Inferred from the caller identity if not provided. Find your customer ID.

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

Completes with a Settings.

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<Settings> updateSettings(
  Settings request, {
  core.String? customerId,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (customerId != null) 'customerId': [customerId],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1beta1/settings';

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