'new Elastic search client code for filter aggregation followed by nested aggregation and term aggregation

Please help me to get new ElasticsearchClient equivalent code for below search criteria.

Need new java ElasticsearchClient code for filters followed by nested query and term query.

{
  "aggs_all_filters": {
    "filters": {
      "filters": [
        {
          "bool": {
            "adjust_pure_negative": true,
            "boost": 1.0
          }
        }
      ],
      "other_bucket": false,
      "other_bucket_key": "_other_"
    },
    "aggregations": {
      "facetsData": {
        "nested": {
          "path": "data.attributes.facetEnable.searchable"
        }       
      }
    }
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source