@@ -834,7 +834,9 @@ default Mono<Boolean> deleteIndex(DeleteIndexRequest deleteIndexRequest) {
834
834
* eg. the index already exist.
835
835
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html"> Indices
836
836
* Create API on elastic.co</a>
837
+ * @deprecated since 4.2
837
838
*/
839
+ @ Deprecated
838
840
default Mono <Boolean > createIndex (Consumer <CreateIndexRequest > consumer ) {
839
841
840
842
CreateIndexRequest request = new CreateIndexRequest ();
@@ -850,7 +852,9 @@ default Mono<Boolean> createIndex(Consumer<CreateIndexRequest> consumer) {
850
852
* eg. the index already exist.
851
853
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html"> Indices
852
854
* Create API on elastic.co</a>
855
+ * @deprecated since 4.2, use {@link #createIndex(org.elasticsearch.client.indices.CreateIndexRequest)}
853
856
*/
857
+ @ Deprecated
854
858
default Mono <Boolean > createIndex (CreateIndexRequest createIndexRequest ) {
855
859
return createIndex (HttpHeaders .EMPTY , createIndexRequest );
856
860
}
@@ -864,9 +868,69 @@ default Mono<Boolean> createIndex(CreateIndexRequest createIndexRequest) {
864
868
* eg. the index already exist.
865
869
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html"> Indices
866
870
* Create API on elastic.co</a>
871
+ * @deprecated since 4.2, use {@link #createIndex(HttpHeaders, org.elasticsearch.client.indices.CreateIndexRequest)}
867
872
*/
873
+ @ Deprecated
868
874
Mono <Boolean > createIndex (HttpHeaders headers , CreateIndexRequest createIndexRequest );
869
875
876
+ /**
877
+ * Execute the given {@link org.elasticsearch.client.indices.CreateIndexRequest} against the {@literal indices} API.
878
+ *
879
+ * @param createIndexRequest must not be {@literal null}.
880
+ * @return a {@link Mono} signalling successful operation completion or an {@link Mono#error(Throwable) error} if
881
+ * eg. the index already exist.
882
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html"> Indices
883
+ * Create API on elastic.co</a>
884
+ * @since 4.2
885
+ */
886
+ default Mono <Boolean > createIndex (org .elasticsearch .client .indices .CreateIndexRequest createIndexRequest ) {
887
+ return createIndex (HttpHeaders .EMPTY , createIndexRequest );
888
+ }
889
+
890
+ /**
891
+ * Execute the given {@link org.elasticsearch.client.indices.CreateIndexRequest} against the {@literal indices} API.
892
+ *
893
+ * @param headers Use {@link HttpHeaders} to provide eg. authentication data. Must not be {@literal null}.
894
+ * @param createIndexRequest must not be {@literal null}.
895
+ * @return a {@link Mono} signalling successful operation completion or an {@link Mono#error(Throwable) error} if
896
+ * eg. the index already exist.
897
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html"> Indices
898
+ * Create API on elastic.co</a>
899
+ * @since 4.2
900
+ */
901
+ Mono <Boolean > createIndex (HttpHeaders headers , org .elasticsearch .client .indices .CreateIndexRequest createIndexRequest );
902
+
903
+ /**
904
+ * Execute the given {@link org.elasticsearch.client.indices.GetIndexRequest} against the {@literal indices} API.
905
+ *
906
+ * @param consumer never {@literal null}.
907
+ * @return a {@link Mono} signalling operation completion or an {@link Mono#error(Throwable) error} if eg. the index
908
+ * does not exist.
909
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html"> Indices
910
+ * Get API on elastic.co</a>
911
+ * @since 4.2
912
+ */
913
+ default Mono <GetIndexResponse > getIndex (Consumer <org .elasticsearch .client .indices .GetIndexRequest > consumer ) {
914
+
915
+ org .elasticsearch .client .indices .GetIndexRequest request = new org .elasticsearch .client .indices .GetIndexRequest ();
916
+ consumer .accept (request );
917
+ return getIndex (request );
918
+ }
919
+
920
+ /**
921
+ * Execute the given {@link org.elasticsearch.client.indices.GetIndexRequest} against the {@literal indices} API.
922
+ *
923
+ * @param getIndexRequest must not be {@literal null}.
924
+ * @return a {@link Mono} signalling successful operation completion or an {@link Mono#error(Throwable) error} if
925
+ * eg. the index already exist.
926
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html"> Indices
927
+ * Get API on elastic.co</a>
928
+ * @since 4.2
929
+ */
930
+ default Mono <GetIndexResponse > getIndex (org .elasticsearch .client .indices .GetIndexRequest getIndexRequest ) {
931
+ return getIndex (HttpHeaders .EMPTY , getIndexRequest );
932
+ }
933
+
870
934
/**
871
935
* Execute the given {@link OpenIndexRequest} against the {@literal indices} API.
872
936
*
@@ -1029,7 +1093,7 @@ default Mono<Boolean> updateMapping(PutMappingRequest putMappingRequest) {
1029
1093
* does not exist.
1030
1094
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1031
1095
* Put Mapping API on elastic.co</a>
1032
- * @deprecated since 4.1, use {@link #putMapping(HttpHeaders, PutMappingRequest)}
1096
+ * @deprecated since 4.1, use {@link #putMapping(HttpHeaders, org.elasticsearch.client.indices. PutMappingRequest)}
1033
1097
*/
1034
1098
@ Deprecated
1035
1099
default Mono <Boolean > updateMapping (HttpHeaders headers , PutMappingRequest putMappingRequest ) {
@@ -1044,7 +1108,9 @@ default Mono<Boolean> updateMapping(HttpHeaders headers, PutMappingRequest putMa
1044
1108
* does not exist.
1045
1109
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1046
1110
* Put Mapping API on elastic.co</a>
1111
+ * @deprecated since 4.2
1047
1112
*/
1113
+ @ Deprecated
1048
1114
default Mono <Boolean > putMapping (Consumer <PutMappingRequest > consumer ) {
1049
1115
1050
1116
PutMappingRequest request = new PutMappingRequest ();
@@ -1060,7 +1126,9 @@ default Mono<Boolean> putMapping(Consumer<PutMappingRequest> consumer) {
1060
1126
* does not exist.
1061
1127
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1062
1128
* Put Mapping API on elastic.co</a>
1129
+ * @deprecated since 4.2, use {@link #putMapping(org.elasticsearch.client.indices.PutMappingRequest)}
1063
1130
*/
1131
+ @ Deprecated
1064
1132
default Mono <Boolean > putMapping (PutMappingRequest putMappingRequest ) {
1065
1133
return putMapping (HttpHeaders .EMPTY , putMappingRequest );
1066
1134
}
@@ -1074,9 +1142,38 @@ default Mono<Boolean> putMapping(PutMappingRequest putMappingRequest) {
1074
1142
* does not exist.
1075
1143
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1076
1144
* Put Mapping API on elastic.co</a>
1145
+ * @deprecated since 4.2, use {@link #putMapping(HttpHeaders, org.elasticsearch.client.indices.PutMappingRequest)}
1077
1146
*/
1147
+ @ Deprecated
1078
1148
Mono <Boolean > putMapping (HttpHeaders headers , PutMappingRequest putMappingRequest );
1079
1149
1150
+ /**
1151
+ * Execute the given {@link org.elasticsearch.client.indices.PutMappingRequest} against the {@literal indices} API.
1152
+ *
1153
+ * @param putMappingRequest must not be {@literal null}.
1154
+ * @return a {@link Mono} signalling operation completion or an {@link Mono#error(Throwable) error} if eg. the index
1155
+ * does not exist.
1156
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1157
+ * Put Mapping API on elastic.co</a>
1158
+ * @since 4.2
1159
+ */
1160
+ default Mono <Boolean > putMapping (org .elasticsearch .client .indices .PutMappingRequest putMappingRequest ) {
1161
+ return putMapping (HttpHeaders .EMPTY , putMappingRequest );
1162
+ }
1163
+
1164
+ /**
1165
+ * Execute the given {@link org.elasticsearch.client.indices.PutMappingRequest} against the {@literal indices} API.
1166
+ *
1167
+ * @param headers Use {@link HttpHeaders} to provide eg. authentication data. Must not be {@literal null}.
1168
+ * @param putMappingRequest must not be {@literal null}.
1169
+ * @return a {@link Mono} signalling operation completion or an {@link Mono#error(Throwable) error} if eg. the index
1170
+ * does not exist.
1171
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html"> Indices
1172
+ * Put Mapping API on elastic.co</a>
1173
+ * @since 4.2
1174
+ */
1175
+ Mono <Boolean > putMapping (HttpHeaders headers , org .elasticsearch .client .indices .PutMappingRequest putMappingRequest );
1176
+
1080
1177
/**
1081
1178
* Execute the given {@link FlushRequest} against the {@literal indices} API.
1082
1179
*
@@ -1171,7 +1268,9 @@ default Mono<GetSettingsResponse> getSettings(GetSettingsRequest getSettingsRequ
1171
1268
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html"> Indices
1172
1269
* Flush API on elastic.co</a>
1173
1270
* @since 4.1
1271
+ * @deprecated since 4.2
1174
1272
*/
1273
+ @ Deprecated
1175
1274
default Mono <GetMappingsResponse > getMapping (Consumer <GetMappingsRequest > consumer ) {
1176
1275
1177
1276
GetMappingsRequest request = new GetMappingsRequest ();
@@ -1188,7 +1287,9 @@ default Mono<GetMappingsResponse> getMapping(Consumer<GetMappingsRequest> consum
1188
1287
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html"> Indices
1189
1288
* Flush API on elastic.co</a>
1190
1289
* @since 4.1
1290
+ * @deprecated since 4.2, use {@link #getMapping(org.elasticsearch.client.indices.GetMappingsRequest)}
1191
1291
*/
1292
+ @ Deprecated
1192
1293
default Mono <GetMappingsResponse > getMapping (GetMappingsRequest getMappingsRequest ) {
1193
1294
return getMapping (HttpHeaders .EMPTY , getMappingsRequest );
1194
1295
}
@@ -1203,9 +1304,38 @@ default Mono<GetMappingsResponse> getMapping(GetMappingsRequest getMappingsReque
1203
1304
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html"> Indices
1204
1305
* Flush API on elastic.co</a>
1205
1306
* @since 4.1
1307
+ * @deprecated since 4.2, use {@link #getMapping(HttpHeaders, org.elasticsearch.client.indices.GetMappingsRequest)}
1206
1308
*/
1309
+ @ Deprecated
1207
1310
Mono <GetMappingsResponse > getMapping (HttpHeaders headers , GetMappingsRequest getMappingsRequest );
1208
1311
1312
+ /**
1313
+ * Execute the given {@link org.elasticsearch.client.indices.GetMappingsRequest} against the {@literal indices} API.
1314
+ *
1315
+ * @param getMappingsRequest must not be {@literal null}.
1316
+ * @return a {@link Mono} signalling operation completion or an {@link Mono#error(Throwable) error} if eg. the index
1317
+ * does not exist.
1318
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html"> Indices
1319
+ * Get mapping API on elastic.co</a>
1320
+ * @since 4.2
1321
+ */
1322
+ default Mono <org .elasticsearch .client .indices .GetMappingsResponse > getMapping (org .elasticsearch .client .indices .GetMappingsRequest getMappingsRequest ) {
1323
+ return getMapping (HttpHeaders .EMPTY , getMappingsRequest );
1324
+ }
1325
+
1326
+ /**
1327
+ * Execute the given {@link org.elasticsearch.client.indices.GetMappingsRequest} against the {@literal indices} API.
1328
+ *
1329
+ * @param headers Use {@link HttpHeaders} to provide eg. authentication data. Must not be {@literal null}.
1330
+ * @param getMappingsRequest must not be {@literal null}.
1331
+ * @return a {@link Mono} signalling operation completion or an {@link Mono#error(Throwable) error} if eg. the index
1332
+ * does not exist.
1333
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html"> Indices
1334
+ * Get mapping API on elastic.co</a>
1335
+ * @since 4.2
1336
+ */
1337
+ Mono <org .elasticsearch .client .indices .GetMappingsResponse > getMapping (HttpHeaders headers , org .elasticsearch .client .indices .GetMappingsRequest getMappingsRequest );
1338
+
1209
1339
/**
1210
1340
* Execute the given {@link GetFieldMappingsRequest} against the {@literal indices} API.
1211
1341
*
@@ -1458,6 +1588,17 @@ default Mono<Boolean> deleteTemplate(DeleteIndexTemplateRequest deleteIndexTempl
1458
1588
*/
1459
1589
Mono <Boolean > deleteTemplate (HttpHeaders headers , DeleteIndexTemplateRequest deleteIndexTemplateRequest );
1460
1590
1591
+ /**
1592
+ * Execute the given {@link org.elasticsearch.client.indices.GetIndexRequest} against the {@literal indices} API.
1593
+ *
1594
+ * @param headers Use {@link HttpHeaders} to provide eg. authentication data. Must not be {@literal null}.
1595
+ * @param getIndexRequest must not be {@literal null}.
1596
+ * @return a {@link Mono} signalling successful operation completion or an {@link Mono#error(Throwable) error} if
1597
+ * eg. the index already exist.
1598
+ * @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html"> Indices
1599
+ * Get API on elastic.co</a>
1600
+ * @since 4.2
1601
+ */
1461
1602
Mono <GetIndexResponse > getIndex (HttpHeaders headers , org .elasticsearch .client .indices .GetIndexRequest getIndexRequest );
1462
1603
}
1463
1604
}
0 commit comments