capacity method

Advice on making real-time decisions (such as choosing zone or machine types) during deployment to maximize your chances of obtaining capacity.

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<CapacityAdviceResponse> capacity(
  CapacityAdviceRpcRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_capacity case final capacity?) {
    return capacity(request);
  }
  throw UnsupportedError('capacity');
}