getOperation method

  1. @override
Future<Operation<ProtoMessage, ProtoMessage>> getOperation(
  1. GetOperationRequest request
)
override

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

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

  if (_getOperation case final getOperation?) {
    return getOperation(request);
  }
  throw UnsupportedError('getOperation');
}