5050import org .elasticsearch .action .admin .indices .shrink .ResizeRequest ;
5151import org .elasticsearch .action .admin .indices .shrink .ResizeResponse ;
5252import org .elasticsearch .action .admin .indices .template .delete .DeleteIndexTemplateRequest ;
53+ import org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse ;
54+ import org .elasticsearch .action .admin .indices .template .put .PutIndexTemplateRequest ;
5355import org .elasticsearch .action .admin .indices .validate .query .ValidateQueryRequest ;
5456import org .elasticsearch .action .admin .indices .validate .query .ValidateQueryResponse ;
5557import org .elasticsearch .action .support .master .AcknowledgedResponse ;
6062import org .elasticsearch .client .indices .GetIndexTemplatesRequest ;
6163import org .elasticsearch .client .indices .GetMappingsRequest ;
6264import org .elasticsearch .client .indices .GetMappingsResponse ;
63- import org .elasticsearch .client .indices .GetIndexTemplatesResponse ;
6465import org .elasticsearch .client .indices .IndexTemplatesExistRequest ;
65- import org .elasticsearch .client .indices .PutIndexTemplateRequest ;
6666import org .elasticsearch .client .indices .PutMappingRequest ;
6767import org .elasticsearch .client .indices .UnfreezeIndexRequest ;
6868import org .elasticsearch .rest .RestStatus ;
@@ -1341,7 +1341,6 @@ public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, Reques
13411341 AcknowledgedResponse ::fromXContent , listener , emptySet ());
13421342 }
13431343
1344-
13451344 /**
13461345 * Asynchronously updates specific index level settings using the Update Indices Settings API.
13471346 * <p>
@@ -1364,48 +1363,9 @@ public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, Action
13641363 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
13651364 * @return the response
13661365 * @throws IOException in case there is a problem sending the request or parsing back the response
1367- * @deprecated This old form of request allows types in mappings. Use {@link #putTemplate(PutIndexTemplateRequest, RequestOptions)}
1368- * instead which introduces a new request object without types.
13691366 */
1370- @ Deprecated
1371- public AcknowledgedResponse putTemplate (
1372- org .elasticsearch .action .admin .indices .template .put .PutIndexTemplateRequest putIndexTemplateRequest ,
1373- RequestOptions options ) throws IOException {
1374- return restHighLevelClient .performRequestAndParseEntity (putIndexTemplateRequest , IndicesRequestConverters ::putTemplate , options ,
1375- AcknowledgedResponse ::fromXContent , emptySet ());
1376- }
1377-
1378- /**
1379- * Asynchronously puts an index template using the Index Templates API.
1380- * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
1381- * on elastic.co</a>
1382- * @param putIndexTemplateRequest the request
1383- * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1384- * @param listener the listener to be notified upon request completion
1385- * @deprecated This old form of request allows types in mappings.
1386- * Use {@link #putTemplateAsync(PutIndexTemplateRequest, RequestOptions, ActionListener)}
1387- * instead which introduces a new request object without types.
1388- */
1389- @ Deprecated
1390- public void putTemplateAsync (org .elasticsearch .action .admin .indices .template .put .PutIndexTemplateRequest putIndexTemplateRequest ,
1391- RequestOptions options , ActionListener <AcknowledgedResponse > listener ) {
1392- restHighLevelClient .performRequestAsyncAndParseEntity (putIndexTemplateRequest , IndicesRequestConverters ::putTemplate , options ,
1393- AcknowledgedResponse ::fromXContent , listener , emptySet ());
1394- }
1395-
1396-
1397- /**
1398- * Puts an index template using the Index Templates API.
1399- * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
1400- * on elastic.co</a>
1401- * @param putIndexTemplateRequest the request
1402- * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1403- * @return the response
1404- * @throws IOException in case there is a problem sending the request or parsing back the response
1405- */
1406- public AcknowledgedResponse putTemplate (
1407- PutIndexTemplateRequest putIndexTemplateRequest ,
1408- RequestOptions options ) throws IOException {
1367+ public AcknowledgedResponse putTemplate (PutIndexTemplateRequest putIndexTemplateRequest ,
1368+ RequestOptions options ) throws IOException {
14091369 return restHighLevelClient .performRequestAndParseEntity (putIndexTemplateRequest , IndicesRequestConverters ::putTemplate , options ,
14101370 AcknowledgedResponse ::fromXContent , emptySet ());
14111371 }
@@ -1418,8 +1378,8 @@ public AcknowledgedResponse putTemplate(
14181378 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
14191379 * @param listener the listener to be notified upon request completion
14201380 */
1421- public void putTemplateAsync (PutIndexTemplateRequest putIndexTemplateRequest ,
1422- RequestOptions options , ActionListener <AcknowledgedResponse > listener ) {
1381+ public void putTemplateAsync (PutIndexTemplateRequest putIndexTemplateRequest , RequestOptions options ,
1382+ ActionListener <AcknowledgedResponse > listener ) {
14231383 restHighLevelClient .performRequestAsyncAndParseEntity (putIndexTemplateRequest , IndicesRequestConverters ::putTemplate , options ,
14241384 AcknowledgedResponse ::fromXContent , listener , emptySet ());
14251385 }
@@ -1454,61 +1414,21 @@ public void validateQueryAsync(ValidateQueryRequest validateQueryRequest, Reques
14541414 ValidateQueryResponse ::fromXContent , listener , emptySet ());
14551415 }
14561416
1457- /**
1458- * Gets index templates using the Index Templates API. The mappings will be returned in a legacy deprecated format, where the
1459- * mapping definition is nested under the type name.
1460- * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
1461- * on elastic.co</a>
1462- * @param getIndexTemplatesRequest the request
1463- * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1464- * @return the response
1465- * @throws IOException in case there is a problem sending the request or parsing back the response
1466- * @deprecated This method uses an old response object which still refers to types, a deprecated feature. Use
1467- * {@link #getIndexTemplate(GetIndexTemplatesRequest, RequestOptions)} instead which returns a new response object
1468- */
1469- @ Deprecated
1470- public org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse getTemplate (
1471- GetIndexTemplatesRequest getIndexTemplatesRequest , RequestOptions options ) throws IOException {
1472- return restHighLevelClient .performRequestAndParseEntity (getIndexTemplatesRequest ,
1473- IndicesRequestConverters ::getTemplatesWithDocumentTypes ,
1474- options , org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse ::fromXContent , emptySet ());
1475- }
1476-
14771417 /**
14781418 * Gets index templates using the Index Templates API
14791419 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
14801420 * on elastic.co</a>
1481- * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
14821421 * @param getIndexTemplatesRequest the request
1422+ * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
14831423 * @return the response
14841424 * @throws IOException in case there is a problem sending the request or parsing back the response
14851425 */
1486- public GetIndexTemplatesResponse getIndexTemplate (GetIndexTemplatesRequest getIndexTemplatesRequest , RequestOptions options )
1487- throws IOException {
1488- return restHighLevelClient .performRequestAndParseEntity (getIndexTemplatesRequest ,
1489- IndicesRequestConverters ::getTemplates ,
1426+ public GetIndexTemplatesResponse getTemplate (GetIndexTemplatesRequest getIndexTemplatesRequest ,
1427+ RequestOptions options ) throws IOException {
1428+ return restHighLevelClient .performRequestAndParseEntity (getIndexTemplatesRequest , IndicesRequestConverters ::getTemplates ,
14901429 options , GetIndexTemplatesResponse ::fromXContent , emptySet ());
1491- }
1492-
1493- /**
1494- * Asynchronously gets index templates using the Index Templates API. The mappings will be returned in a legacy deprecated format,
1495- * where the mapping definition is nested under the type name.
1496- * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
1497- * on elastic.co</a>
1498- * @param getIndexTemplatesRequest the request
1499- * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
1500- * @param listener the listener to be notified upon request completion
1501- * @deprecated This method uses an old response object which still refers to types, a deprecated feature. Use
1502- * {@link #getIndexTemplateAsync(GetIndexTemplatesRequest, RequestOptions, ActionListener)} instead which returns a new response object
1503- */
1504- @ Deprecated
1505- public void getTemplateAsync (GetIndexTemplatesRequest getIndexTemplatesRequest , RequestOptions options ,
1506- ActionListener <org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse > listener ) {
1507- restHighLevelClient .performRequestAsyncAndParseEntity (getIndexTemplatesRequest ,
1508- IndicesRequestConverters ::getTemplatesWithDocumentTypes ,
1509- options , org .elasticsearch .action .admin .indices .template .get .GetIndexTemplatesResponse ::fromXContent , listener , emptySet ());
15101430 }
1511-
1431+
15121432 /**
15131433 * Asynchronously gets index templates using the Index Templates API
15141434 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html"> Index Templates API
@@ -1517,12 +1437,11 @@ public void getTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest,
15171437 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
15181438 * @param listener the listener to be notified upon request completion
15191439 */
1520- public void getIndexTemplateAsync (GetIndexTemplatesRequest getIndexTemplatesRequest , RequestOptions options ,
1440+ public void getTemplateAsync (GetIndexTemplatesRequest getIndexTemplatesRequest , RequestOptions options ,
15211441 ActionListener <GetIndexTemplatesResponse > listener ) {
1522- restHighLevelClient .performRequestAsyncAndParseEntity (getIndexTemplatesRequest ,
1523- IndicesRequestConverters ::getTemplates ,
1442+ restHighLevelClient .performRequestAsyncAndParseEntity (getIndexTemplatesRequest , IndicesRequestConverters ::getTemplates ,
15241443 options , GetIndexTemplatesResponse ::fromXContent , listener , emptySet ());
1525- }
1444+ }
15261445
15271446 /**
15281447 * Uses the Index Templates API to determine if index templates exist
0 commit comments