# Elasticsearch 8 new Java client - How to convert UpdateResponse to POJO

**URL:** <https://discuss.elastic.co/t/elasticsearch-8-new-java-client-how-to-convert-updateresponse-to-pojo/310810>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [July 28, 2022, 2:47am UTC](https://discuss.elastic.co/t/elasticsearch-8-new-java-client-how-to-convert-updateresponse-to-pojo/310810 "2022-07-28T02:47:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxuz111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zxuz111/32/100222_2.png) [@zxuz111](https://discuss.elastic.co/u/zxuz111)\
**Post date:** [July 28, 2022, 2:47am UTC](https://discuss.elastic.co/t/elasticsearch-8-new-java-client-how-to-convert-updateresponse-to-pojo/310810/1 "2022-07-28T02:47:58Z")

</div>

I am using the new Java client (v8.3.1) for Elasticsearch 8, and I could not find a way to convert the update response (UpdataResponse) to a POJO. The example code is as following:

```auto
UpdateResponse response = esClient.update(u -> u
                    .index("product")
                    .id(id)
                    .doc(etlJobControl),
                Product.class);

```

It would be greatly appreciated if anyone could help me with this.  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 25, 2022, 2:48am UTC](https://discuss.elastic.co/t/elasticsearch-8-new-java-client-how-to-convert-updateresponse-to-pojo/310810/2 "2022-08-25T02:48:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
