waitOperation method

Future<Operation<ProtoMessage, ProtoMessage>> waitOperation(
  1. WaitOperationRequest request
)

Provides the Operations service functionality in this service.

Throws a http.ClientException if there were problems communicating with the API service. Throws a StatusException if the API failed with a Status message. Throws a ServiceException for any other failure.

Implementation

Future<Operation> waitOperation(WaitOperationRequest request) async {
  final url = Uri.https(_host, '/ui/${request.name}:wait', {
    if (request.timeout case final $1?) 'timeout': $1.toJson(),
  });
  final response = await _client.post(url);
  return Operation.fromJson(response);
}