diff --git a/openmetadata-clients/openmetadata-java-client/pom.xml b/openmetadata-clients/openmetadata-java-client/pom.xml index e755f90dd0d..9df8c81441c 100644 --- a/openmetadata-clients/openmetadata-java-client/pom.xml +++ b/openmetadata-clients/openmetadata-java-client/pom.xml @@ -15,8 +15,11 @@ ${java.version} ${java.version} 2.7.0 - - 9.7.0 + 12.1 + 0.2.1 + 8.3.1 + 2.1.10 + 1.3.5 @@ -24,47 +27,17 @@ openmetadata-spec ${project.version} - - io.swagger - swagger-codegen-maven-plugin - 3.0.0-rc1 - - - org.slf4j - slf4j-ext - - - - - org.slf4j - slf4j-ext - 2.0.6 - - - com.github.joschi.jackson - jackson-datatype-threetenbp - - 2.6.4 - - - org.apache.oltu.oauth2 - org.apache.oltu.oauth2.client - 1.0.2 - - - com.fasterxml.jackson.dataformat - jackson-dataformat-cbor - - - - + + io.github.openfeign + feign-core + ${feign-version} + io.github.openfeign feign-jackson ${feign-version} - io.github.openfeign feign-slf4j @@ -72,15 +45,36 @@ io.github.openfeign - feign-core + feign-okhttp ${feign-version} - io.github.openfeign.form feign-form 3.8.0 + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + io.swagger.parser.v3 + swagger-parser + ${swagger-parser-version} + + + com.github.scribejava + scribejava-apis + ${scribejava-apis-version} + com.google.auth google-auth-library-oauth2-http @@ -91,15 +85,14 @@ msal4j 1.13.3 - - io.github.openfeign - feign-okhttp - 12.1 - org.projectlombok lombok + + org.elasticsearch.client + elasticsearch-rest-high-level-client + junit @@ -107,14 +100,7 @@ 4.13.2 - - - org.json - json - 20220924 - - - + org.mozilla rhino @@ -229,16 +215,9 @@ - io.swagger.codegen.v3 - swagger-codegen-maven-plugin - 3.0.16 - - - com.github.jknack - handlebars - 4.3.1 - - + org.openapitools + openapi-generator-maven-plugin + 6.0.0 @@ -246,22 +225,33 @@ ${project.basedir}/../../openmetadata-service/target/classes/assets/swagger.yaml - java + java feign - true - true org.openmetadata.client.api org.openmetadata.client.model - - true - src/main/java/ - - ${project.build.directory}/generated-sources/swagger + + ${project.build.directory}/generated-sources/swagger + + maven-assembly-plugin + + + package + + single + + + + + + jar-with-dependencies + + + diff --git a/openmetadata-clients/openmetadata-java-client/src/main/java/org/openmetadata/client/api/ElasticSearchApi.java b/openmetadata-clients/openmetadata-java-client/src/main/java/org/openmetadata/client/api/ElasticSearchApi.java new file mode 100644 index 00000000000..49cb5835aca --- /dev/null +++ b/openmetadata-clients/openmetadata-java-client/src/main/java/org/openmetadata/client/api/ElasticSearchApi.java @@ -0,0 +1,546 @@ +package org.openmetadata.client.api; + +import feign.Headers; +import feign.Param; +import feign.QueryMap; +import feign.RequestLine; +import feign.Response; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openmetadata.client.ApiClient; +import org.openmetadata.client.EncodingUtils; + +public interface ElasticSearchApi extends ApiClient.Api { + + /** + * Get Aggregated Fields Get Aggregated Fields from Entities. + * + * @param index (optional, default to table_search_index) + * @param field Field in an entity. (optional) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param deleted (optional, default to false) + * @return Suggest + */ + @RequestLine("GET /v1/search/aggregate?index={index}&field={field}&size={size}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getAggregateFields( + @Param("index") String index, + @Param("field") String field, + @Param("size") Integer size, + @Param("deleted") String deleted); + + /** + * Get Aggregated Fields Similar to getAggregateFields but it also returns the http response headers . + * Get Aggregated Fields from Entities. + * + * @param index (optional, default to table_search_index) + * @param field Field in an entity. (optional) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param deleted (optional, default to false) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /v1/search/aggregate?index={index}&field={field}&size={size}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getAggregateFieldsWithHttpInfo( + @Param("index") String index, + @Param("field") String field, + @Param("size") Integer size, + @Param("deleted") String deleted); + + /** + * Get Aggregated Fields Get Aggregated Fields from Entities. Note, this is equivalent to the other + * getAggregateFields method, but with the query parameters collected into a single Map parameter. This is + * convenient for services with optional query parameters, especially when used with the {@link + * GetAggregateFieldsQueryParams} class that allows for building up this map in a fluent style. + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

+ * + * @return Suggest + */ + @RequestLine("GET /v1/search/aggregate?index={index}&field={field}&size={size}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getAggregateFields(@QueryMap(encoded = true) Map queryParams); + + /** + * Get Aggregated Fields Get Aggregated Fields from Entities. Note, this is equivalent to the other + * getAggregateFields that receives the query parameters as a map, but this one also exposes the Http response + * headers + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

    + *
  • index - (optional, default to table_search_index) + *
  • field - Field in an entity. (optional) + *
  • size - Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + *
  • deleted - (optional, default to false) + *
+ * + * @return Suggest + */ + @RequestLine("GET /v1/search/aggregate?index={index}&field={field}&size={size}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getAggregateFieldsWithHttpInfo(@QueryMap(encoded = true) Map queryParams); + + /** + * A convenience class for generating query parameters for the getAggregateFields method in a fluent + * style. + */ + class GetAggregateFieldsQueryParams extends HashMap { + public GetAggregateFieldsQueryParams index(final String value) { + put("index", EncodingUtils.encode(value)); + return this; + } + + public GetAggregateFieldsQueryParams field(final String value) { + put("field", EncodingUtils.encode(value)); + return this; + } + + public GetAggregateFieldsQueryParams size(final Integer value) { + put("size", EncodingUtils.encode(value)); + return this; + } + + public GetAggregateFieldsQueryParams deleted(final String value) { + put("deleted", EncodingUtils.encode(value)); + return this; + } + } + + /** + * Suggest Entities Get suggested entities used for auto-completion. + * + * @param q Suggest API can be used to auto-fill the entities name while use is typing search text
+ * 1. To get suggest results pass q=us or q=user etc..
+ * 2. Do not add any wild-cards such as * like in search api
+ * 3. suggest api is a prefix suggestion
+ * (required) + * @param index (optional, default to table_search_index) + * @param field Field in object containing valid suggestions. Defaults to `suggest`. All indices has a `suggest` + * field, only some indices have other `suggest_*` fields. (optional, default to suggest) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param fetchSource Get document body for each hit (optional, default to true) + * @param includeSourceFields Get only selected fields of the document body for each hit. Empty value will return all + * fields (optional) + * @param deleted (optional, default to false) + * @return Suggest + */ + @RequestLine( + "GET /v1/search/suggest?q={q}&index={index}&field={field}&size={size}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getSuggestedEntities( + @Param("q") String q, + @Param("index") String index, + @Param("field") String field, + @Param("size") Integer size, + @Param("fetchSource") Boolean fetchSource, + @Param("includeSourceFields") List includeSourceFields, + @Param("deleted") String deleted); + + /** + * Suggest Entities Similar to getSuggestedEntities but it also returns the http response headers . Get + * suggested entities used for auto-completion. + * + * @param q Suggest API can be used to auto-fill the entities name while use is typing search text
+ * 1. To get suggest results pass q=us or q=user etc..
+ * 2. Do not add any wild-cards such as * like in search api
+ * 3. suggest api is a prefix suggestion
+ * (required) + * @param index (optional, default to table_search_index) + * @param field Field in object containing valid suggestions. Defaults to `suggest`. All indices has a `suggest` + * field, only some indices have other `suggest_*` fields. (optional, default to suggest) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param fetchSource Get document body for each hit (optional, default to true) + * @param includeSourceFields Get only selected fields of the document body for each hit. Empty value will return all + * fields (optional) + * @param deleted (optional, default to false) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine( + "GET /v1/search/suggest?q={q}&index={index}&field={field}&size={size}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getSuggestedEntitiesWithHttpInfo( + @Param("q") String q, + @Param("index") String index, + @Param("field") String field, + @Param("size") Integer size, + @Param("fetchSource") Boolean fetchSource, + @Param("includeSourceFields") List includeSourceFields, + @Param("deleted") String deleted); + + /** + * Suggest Entities Get suggested entities used for auto-completion. Note, this is equivalent to the other + * getSuggestedEntities method, but with the query parameters collected into a single Map parameter. This is + * convenient for services with optional query parameters, especially when used with the {@link + * GetSuggestedEntitiesQueryParams} class that allows for building up this map in a fluent style. + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

    + *
  • q - Suggest API can be used to auto-fill the entities name while use is typing search text
    + * 1. To get suggest results pass q=us or q=user etc..
    + * 2. Do not add any wild-cards such as * like in search api
    + * 3. suggest api is a prefix suggestion
    + * (required) + *
  • index - (optional, default to table_search_index) + *
  • field - Field in object containing valid suggestions. Defaults to `suggest`. All indices has a `suggest` + * field, only some indices have other `suggest_*` fields. (optional, default to suggest) + *
  • size - Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + *
  • fetchSource - Get document body for each hit (optional, default to true) + *
  • includeSourceFields - Get only selected fields of the document body for each hit. Empty value will return + * all fields (optional) + *
  • deleted - (optional, default to false) + *
+ * + * @return Suggest + */ + @RequestLine( + "GET /v1/search/suggest?q={q}&index={index}&field={field}&size={size}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getSuggestedEntities(@QueryMap(encoded = true) Map queryParams); + + /** + * Suggest Entities Get suggested entities used for auto-completion. Note, this is equivalent to the other + * getSuggestedEntities that receives the query parameters as a map, but this one also exposes the Http + * response headers + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

    + *
  • q - Suggest API can be used to auto-fill the entities name while use is typing search text
    + * 1. To get suggest results pass q=us or q=user etc..
    + * 2. Do not add any wild-cards such as * like in search api
    + * 3. suggest api is a prefix suggestion
    + * (required) + *
  • index - (optional, default to table_search_index) + *
  • field - Field in object containing valid suggestions. Defaults to `suggest`. All indices has a `suggest` + * field, only some indices have other `suggest_*` fields. (optional, default to suggest) + *
  • size - Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + *
  • fetchSource - Get document body for each hit (optional, default to true) + *
  • includeSourceFields - Get only selected fields of the document body for each hit. Empty value will return + * all fields (optional) + *
  • deleted - (optional, default to false) + *
+ * + * @return Suggest + */ + @RequestLine( + "GET /v1/search/suggest?q={q}&index={index}&field={field}&size={size}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}&deleted={deleted}") + @Headers({ + "Accept: application/json", + }) + Response getSuggestedEntitiesWithHttpInfo(@QueryMap(encoded = true) Map queryParams); + + /** + * A convenience class for generating query parameters for the getSuggestedEntities method in a fluent + * style. + */ + class GetSuggestedEntitiesQueryParams extends HashMap { + public GetSuggestedEntitiesQueryParams q(final String value) { + put("q", EncodingUtils.encode(value)); + return this; + } + + public GetSuggestedEntitiesQueryParams index(final String value) { + put("index", EncodingUtils.encode(value)); + return this; + } + + public GetSuggestedEntitiesQueryParams field(final String value) { + put("field", EncodingUtils.encode(value)); + return this; + } + + public GetSuggestedEntitiesQueryParams size(final Integer value) { + put("size", EncodingUtils.encode(value)); + return this; + } + + public GetSuggestedEntitiesQueryParams fetchSource(final Boolean value) { + put("fetch_source", EncodingUtils.encode(value)); + return this; + } + + public GetSuggestedEntitiesQueryParams includeSourceFields(final List value) { + put("include_source_fields", EncodingUtils.encodeCollection(value, "multi")); + return this; + } + + public GetSuggestedEntitiesQueryParams deleted(final String value) { + put("deleted", EncodingUtils.encode(value)); + return this; + } + } + + /** + * Search entities Search entities using query test. Use query params `from` and `size` for pagination. Use + * `sort_field` to sort the results in `sort_order`. + * + * @param q Search Query Text, Pass *text* for substring match; Pass without wildcards for exact match.
+ * 1. For listing all tables or topics pass q=*
+ * 2. For search tables or topics pass q=*search_term*
+ * 3. For searching field names such as search by column_name pass q=column_names:address
+ * 4. For searching by tag names pass q=tags:user.email
+ * 5. When user selects a filter pass q=query_text AND tags:user.email AND platform:MYSQL
+ * 6. Search with multiple values of same filter q=tags:user.email AND tags:user.address
+ * logic operators such as AND and OR must be in uppercase (required) + * @param index ElasticSearch Index name, defaults to table_search_index (optional, default to table_search_index) + * @param deleted Filter documents by deleted param. By default deleted is false (optional, default to false) + * @param from From field to paginate the results, defaults to 0 (optional, default to 0) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param sortField Sort the search results by field, available fields to sort weekly_stats , daily_stats, + * monthly_stats, last_updated_timestamp (optional, default to _score) + * @param sortOrder Sort order asc for ascending or desc for descending, defaults to desc (optional, default to desc) + * @param trackTotalHits Track Total Hits (optional, default to false) + * @param queryFilter Elasticsearch query that will be combined with the query_string query generator from the `query` + * argument (optional) + * @param postFilter Elasticsearch query that will be used as a post_filter (optional) + * @param fetchSource Get document body for each hit (optional, default to true) + * @param includeSourceFields Get only selected fields of the document body for each hit. Empty value will return all + * fields (optional) + * @return SearchResponse + */ + @RequestLine( + "GET /v1/search/query?q={q}&index={index}&deleted={deleted}&from={from}&size={size}&sort_field={sortField}&sort_order={sortOrder}&track_total_hits={trackTotalHits}&query_filter={queryFilter}&post_filter={postFilter}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}") + @Headers({ + "Accept: application/json", + }) + Response searchEntitiesWithQuery( + @Param("q") String q, + @Param("index") String index, + @Param("deleted") Boolean deleted, + @Param("from") Integer from, + @Param("size") Integer size, + @Param("sortField") String sortField, + @Param("sortOrder") String sortOrder, + @Param("trackTotalHits") Boolean trackTotalHits, + @Param("queryFilter") String queryFilter, + @Param("postFilter") String postFilter, + @Param("fetchSource") Boolean fetchSource, + @Param("includeSourceFields") List includeSourceFields); + + /** + * Search entities Similar to searchEntitiesWithQuery but it also returns the http response headers . + * Search entities using query test. Use query params `from` and `size` for pagination. Use `sort_field` to sort the + * results in `sort_order`. + * + * @param q Search Query Text, Pass *text* for substring match; Pass without wildcards for exact match.
+ * 1. For listing all tables or topics pass q=*
+ * 2. For search tables or topics pass q=*search_term*
+ * 3. For searching field names such as search by column_name pass q=column_names:address
+ * 4. For searching by tag names pass q=tags:user.email
+ * 5. When user selects a filter pass q=query_text AND tags:user.email AND platform:MYSQL
+ * 6. Search with multiple values of same filter q=tags:user.email AND tags:user.address
+ * logic operators such as AND and OR must be in uppercase (required) + * @param index ElasticSearch Index name, defaults to table_search_index (optional, default to table_search_index) + * @param deleted Filter documents by deleted param. By default deleted is false (optional, default to false) + * @param from From field to paginate the results, defaults to 0 (optional, default to 0) + * @param size Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + * @param sortField Sort the search results by field, available fields to sort weekly_stats , daily_stats, + * monthly_stats, last_updated_timestamp (optional, default to _score) + * @param sortOrder Sort order asc for ascending or desc for descending, defaults to desc (optional, default to desc) + * @param trackTotalHits Track Total Hits (optional, default to false) + * @param queryFilter Elasticsearch query that will be combined with the query_string query generator from the `query` + * argument (optional) + * @param postFilter Elasticsearch query that will be used as a post_filter (optional) + * @param fetchSource Get document body for each hit (optional, default to true) + * @param includeSourceFields Get only selected fields of the document body for each hit. Empty value will return all + * fields (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine( + "GET /v1/search/query?q={q}&index={index}&deleted={deleted}&from={from}&size={size}&sort_field={sortField}&sort_order={sortOrder}&track_total_hits={trackTotalHits}&query_filter={queryFilter}&post_filter={postFilter}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}") + @Headers({ + "Accept: application/json", + }) + Response searchEntitiesWithQueryWithHttpInfo( + @Param("q") String q, + @Param("index") String index, + @Param("deleted") Boolean deleted, + @Param("from") Integer from, + @Param("size") Integer size, + @Param("sortField") String sortField, + @Param("sortOrder") String sortOrder, + @Param("trackTotalHits") Boolean trackTotalHits, + @Param("queryFilter") String queryFilter, + @Param("postFilter") String postFilter, + @Param("fetchSource") Boolean fetchSource, + @Param("includeSourceFields") List includeSourceFields); + + /** + * Search entities Search entities using query test. Use query params `from` and `size` for pagination. Use + * `sort_field` to sort the results in `sort_order`. Note, this is equivalent to the other + * searchEntitiesWithQuery method, but with the query parameters collected into a single Map parameter. This is + * convenient for services with optional query parameters, especially when used with the {@link + * SearchEntitiesWithQueryQueryParams} class that allows for building up this map in a fluent style. + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

    + *
  • q - Search Query Text, Pass *text* for substring match; Pass without wildcards for exact match.
    + * 1. For listing all tables or topics pass q=*
    + * 2. For search tables or topics pass q=*search_term*
    + * 3. For searching field names such as search by column_name pass q=column_names:address
    + * 4. For searching by tag names pass q=tags:user.email
    + * 5. When user selects a filter pass q=query_text AND tags:user.email AND platform:MYSQL
    + * 6. Search with multiple values of same filter q=tags:user.email AND tags:user.address
    + * logic operators such as AND and OR must be in uppercase (required) + *
  • index - ElasticSearch Index name, defaults to table_search_index (optional, default to + * table_search_index) + *
  • deleted - Filter documents by deleted param. By default deleted is false (optional, default to false) + *
  • from - From field to paginate the results, defaults to 0 (optional, default to 0) + *
  • size - Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + *
  • sortField - Sort the search results by field, available fields to sort weekly_stats , daily_stats, + * monthly_stats, last_updated_timestamp (optional, default to _score) + *
  • sortOrder - Sort order asc for ascending or desc for descending, defaults to desc (optional, default to + * desc) + *
  • trackTotalHits - Track Total Hits (optional, default to false) + *
  • queryFilter - Elasticsearch query that will be combined with the query_string query generator from the + * `query` argument (optional) + *
  • postFilter - Elasticsearch query that will be used as a post_filter (optional) + *
  • fetchSource - Get document body for each hit (optional, default to true) + *
  • includeSourceFields - Get only selected fields of the document body for each hit. Empty value will return + * all fields (optional) + *
+ * + * @return SearchResponse + */ + @RequestLine( + "GET /v1/search/query?q={q}&index={index}&deleted={deleted}&from={from}&size={size}&sort_field={sortField}&sort_order={sortOrder}&track_total_hits={trackTotalHits}&query_filter={queryFilter}&post_filter={postFilter}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}") + @Headers({ + "Accept: application/json", + }) + Response searchEntitiesWithQuery(@QueryMap(encoded = true) Map queryParams); + + /** + * Search entities Search entities using query test. Use query params `from` and `size` for pagination. Use + * `sort_field` to sort the results in `sort_order`. Note, this is equivalent to the other + * searchEntitiesWithQuery that receives the query parameters as a map, but this one also exposes the Http + * response headers + * + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map: + *

    + *
  • q - Search Query Text, Pass *text* for substring match; Pass without wildcards for exact match.
    + * 1. For listing all tables or topics pass q=*
    + * 2. For search tables or topics pass q=*search_term*
    + * 3. For searching field names such as search by column_name pass q=column_names:address
    + * 4. For searching by tag names pass q=tags:user.email
    + * 5. When user selects a filter pass q=query_text AND tags:user.email AND platform:MYSQL
    + * 6. Search with multiple values of same filter q=tags:user.email AND tags:user.address
    + * logic operators such as AND and OR must be in uppercase (required) + *
  • index - ElasticSearch Index name, defaults to table_search_index (optional, default to + * table_search_index) + *
  • deleted - Filter documents by deleted param. By default deleted is false (optional, default to false) + *
  • from - From field to paginate the results, defaults to 0 (optional, default to 0) + *
  • size - Size field to limit the no.of results returned, defaults to 10 (optional, default to 10) + *
  • sortField - Sort the search results by field, available fields to sort weekly_stats , daily_stats, + * monthly_stats, last_updated_timestamp (optional, default to _score) + *
  • sortOrder - Sort order asc for ascending or desc for descending, defaults to desc (optional, default to + * desc) + *
  • trackTotalHits - Track Total Hits (optional, default to false) + *
  • queryFilter - Elasticsearch query that will be combined with the query_string query generator from the + * `query` argument (optional) + *
  • postFilter - Elasticsearch query that will be used as a post_filter (optional) + *
  • fetchSource - Get document body for each hit (optional, default to true) + *
  • includeSourceFields - Get only selected fields of the document body for each hit. Empty value will return + * all fields (optional) + *
+ * + * @return SearchResponse + */ + @RequestLine( + "GET /v1/search/query?q={q}&index={index}&deleted={deleted}&from={from}&size={size}&sort_field={sortField}&sort_order={sortOrder}&track_total_hits={trackTotalHits}&query_filter={queryFilter}&post_filter={postFilter}&fetch_source={fetchSource}&include_source_fields={includeSourceFields}") + @Headers({ + "Accept: application/json", + }) + Response searchEntitiesWithQueryWithHttpInfo(@QueryMap(encoded = true) Map queryParams); + + /** + * A convenience class for generating query parameters for the searchEntitiesWithQuery method in a fluent + * style. + */ + class SearchEntitiesWithQueryQueryParams extends HashMap { + public SearchEntitiesWithQueryQueryParams q(final String value) { + put("q", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams index(final String value) { + put("index", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams deleted(final Boolean value) { + put("deleted", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams from(final Integer value) { + put("from", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams size(final Integer value) { + put("size", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams sortField(final String value) { + put("sort_field", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams sortOrder(final String value) { + put("sort_order", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams trackTotalHits(final Boolean value) { + put("track_total_hits", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams queryFilter(final String value) { + put("query_filter", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams postFilter(final String value) { + put("post_filter", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams fetchSource(final Boolean value) { + put("fetch_source", EncodingUtils.encode(value)); + return this; + } + + public SearchEntitiesWithQueryQueryParams includeSourceFields(final List value) { + put("include_source_fields", EncodingUtils.encodeCollection(value, "multi")); + return this; + } + } +}