@Override @SuppressWarnings("unchecked") public <T> CompletableFuture<T> submit(Query<T> query) { return protocol.submit(ResourceQuery.builder().withResource(resource).withQuery(query).build()); }
@Override public CompletableFuture<Void> delete() { return protocol .submit(DeleteResource.builder().withResource(resource).build()) .thenApply(deleted -> null); }
@Override @SuppressWarnings("unchecked") public <T> CompletableFuture<T> submit(Command<T> command) { return protocol.submit( ResourceCommand.builder().withResource(resource).withCommand(command).build()); }