setTarget method

  1. @override
Future<Operation> setTarget(
  1. SetTargetForwardingRuleRequest request
)
override

Changes target URL for forwarding rule. The new target should be of the same type as the old target.

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> setTarget(SetTargetForwardingRuleRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setTarget case final setTarget?) {
    return setTarget(request);
  }
  throw UnsupportedError('setTarget');
}