updateIapSettings method

Future<IapSettings> updateIapSettings(
  1. IapSettings request,
  2. String name, {
  3. String? updateMask,
  4. String? $fields,
})

Updates the IAP settings on a particular IAP protected resource.

It replaces all fields unless the update_mask is set.

request - The metadata request object.

Request parameters:

name - Required. The resource name of the IAP protected resource. Value must have pattern ^.*$.

updateMask - The field mask specifying which IAP settings should be updated. If omitted, then all of the settings are updated. See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Note: All IAP reauth settings must always be set together, using the field mask: iapSettings.accessSettings.reauthSettings.

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

Completes with a IapSettings.

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

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

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