class DaprClientHttp extends AbstractDaprClient {

  @Override
  public <T> Mono<Response<List<State<T>>>> getStates(GetStatesRequest request, TypeRef<T> type) {
    try {
      final String stateStoreName = request.getStateStoreName();
      final List<String> keys = request.getKeys();
      final int parallelism = request.getParallelism();
      final Context context = request.getContext();
      if ((stateStoreName == null) || (stateStoreName.trim().isEmpty())) {
        throw new IllegalArgumentException("State store name cannot be null or empty.");
      }
      if (keys == null || keys.isEmpty()) {
        throw new IllegalArgumentException("Key cannot be null or empty.");
      }

      if (parallelism < 0) {
        throw new IllegalArgumentException("Parallelism cannot be negative.");
      }

      String url = String.format(STATE_BULK_PATH_FORMAT, stateStoreName);
      Map<String, Object> jsonMap = new HashMap<>();
      jsonMap.put("keys", keys);
      jsonMap.put("parallelism", parallelism);

      byte[] requestBody = INTERNAL_SERIALIZER.serialize(jsonMap);
      return this.client
          .invokeApi(DaprHttp.HttpMethods.POST.name(), url, null, requestBody, null, context)
          .flatMap(s -> {
            try {
              return Mono.just(buildStates(s, type));
            } catch (Exception ex) {
              return Mono.error(ex);
            }
          })
          .map(r -> new Response<>(context, r));

    } catch (Exception ex) {
      return Mono.error(ex);
    }
  }

    DaprClientHttp(DaprHttp client, DaprObjectSerializer objectSerializer, DaprObjectSerializer stateSerializer);
    DaprClientHttp(DaprHttp client);

}