updateDebugmask method

Future<GoogleCloudApigeeV1DebugMask> updateDebugmask(
  1. GoogleCloudApigeeV1DebugMask request,
  2. String name, {
  3. bool? replaceRepeatedFields,
  4. String? updateMask,
  5. String? $fields,
})

Updates the debug mask singleton resource for an environment.

request - The metadata request object.

Request parameters:

name - Name of the debug mask. Value must have pattern ^organizations/\[^/\]+/environments/\[^/\]+/debugmask$.

replaceRepeatedFields - Boolean flag that specifies whether to replace existing values in the debug mask when doing an update. Set to true to replace existing values. The default behavior is to append the values (false).

updateMask - Field debug mask to support partial updates.

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

Completes with a GoogleCloudApigeeV1DebugMask.

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

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

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