setDeletionProtection method

  1. @override
Future<Operation> setDeletionProtection(
  1. SetDeletionProtectionInstanceRequest request
)
override

Sets deletion protection on the instance.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Operation> setDeletionProtection(
  SetDeletionProtectionInstanceRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setDeletionProtection case final setDeletionProtection?) {
    return setDeletionProtection(request);
  }
  throw UnsupportedError('setDeletionProtection');
}