From 78054521acbec3ab372266df7957391e91c7c8b5 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 28 Aug 2025 15:56:23 +0200 Subject: [PATCH 1/2] bump version --- config/version.txt | 2 +- .../java/co/elastic/clients/transport/VersionInfo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/version.txt b/config/version.txt index ee21f1efe..04ca07e27 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -8.19.3 +8.19.4 diff --git a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java index 2d786a833..4fa7c434c 100644 --- a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java +++ b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java @@ -21,5 +21,5 @@ // Package private class VersionInfo { - static final String VERSION = "8.19.3"; + static final String VERSION = "8.19.4"; } From e36fe3092fe9e0aca79d90f152ed60c9df897fb2 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 16 Sep 2025 15:22:23 +0200 Subject: [PATCH 2/2] [codegen] update to latest spec --- .../elasticsearch/doc-files/api-spec.html | 90 +-- .../ElasticsearchIndicesAsyncClient.java | 12 +- .../indices/ElasticsearchIndicesClient.java | 12 +- .../indices/RolloverRequest.java | 6 +- .../indices/SimulateIndexTemplateRequest.java | 61 ++- .../inference/TextEmbeddingRequest.java | 65 +++ .../snapshot/AzureRepository.java | 12 +- .../snapshot/AzureRepositorySettings.java | 214 ++++++-- .../snapshot/CleanupRepositoryRequest.java | 37 +- .../snapshot/CloneSnapshotRequest.java | 36 +- .../snapshot/CreateRepositoryRequest.java | 48 +- .../snapshot/CreateSnapshotRequest.java | 190 +++++-- .../snapshot/DeleteRepositoryRequest.java | 36 +- .../snapshot/DeleteSnapshotRequest.java | 22 +- .../ElasticsearchSnapshotAsyncClient.java | 102 +++- .../snapshot/ElasticsearchSnapshotClient.java | 102 +++- .../elasticsearch/snapshot/GcsRepository.java | 12 +- .../snapshot/GcsRepositorySettings.java | 142 +++-- .../snapshot/GetRepositoryRequest.java | 41 +- .../snapshot/GetSnapshotRequest.java | 191 ++++--- .../snapshot/GetSnapshotResponse.java | 149 +++-- .../snapshot/ReadOnlyUrlRepository.java | 12 +- .../ReadOnlyUrlRepositorySettings.java | 62 ++- .../snapshot/RepositorySettingsBase.java | 44 ++ .../RepositoryVerifyIntegrityRequest.java | 76 ++- .../snapshot/RestoreRequest.java | 231 +++++++- .../elasticsearch/snapshot/S3Repository.java | 33 +- .../snapshot/S3RepositorySettings.java | 518 ++++++++++++++++-- .../elasticsearch/snapshot/ShardsStats.java | 50 +- .../snapshot/ShardsStatsStage.java | 14 +- .../snapshot/SharedFileSystemRepository.java | 12 +- .../SharedFileSystemRepositorySettings.java | 52 +- .../elasticsearch/snapshot/SnapshotStats.java | 56 +- .../snapshot/SnapshotStatusRequest.java | 55 +- .../snapshot/SourceOnlyRepository.java | 12 +- .../SourceOnlyRepositorySettings.java | 46 ++ .../elasticsearch/snapshot/Status.java | 81 ++- .../snapshot/VerifyRepositoryRequest.java | 34 +- .../snapshot/VerifyRepositoryResponse.java | 20 +- .../CleanupRepositoryResults.java | 12 +- .../verify_repository/CompactNodeInfo.java | 12 +- 41 files changed, 2441 insertions(+), 571 deletions(-) diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index fab4fdb44..eec999a10 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -1751,7 +1751,7 @@ 'indices.shard_stores.ShardStoreWrapper': 'indices/shard_stores/types.ts#L58-L60', 'indices.shrink.Request': 'indices/shrink/IndicesShrinkRequest.ts#L27-L113', 'indices.shrink.Response': 'indices/shrink/IndicesShrinkResponse.ts#L22-L28', -'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L24-L67', +'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L25-L70', 'indices.simulate_index_template.Response': 'indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30', 'indices.simulate_template.Overlapping': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42', 'indices.simulate_template.Request': 'indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135', @@ -1987,7 +1987,7 @@ 'inference.sparse_embedding.Response': 'inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L24', 'inference.stream_completion.Request': 'inference/stream_completion/StreamInferenceRequest.ts#L25-L71', 'inference.stream_completion.Response': 'inference/stream_completion/StreamInferenceResponse.ts#L22-L24', -'inference.text_embedding.Request': 'inference/text_embedding/TextEmbeddingRequest.ts#L25-L63', +'inference.text_embedding.Request': 'inference/text_embedding/TextEmbeddingRequest.ts#L25-L76', 'inference.text_embedding.Response': 'inference/text_embedding/TextEmbeddingResponse.ts#L22-L24', 'inference.update.Request': 'inference/update/UpdateInferenceRequest.ts#L25-L61', 'inference.update.Response': 'inference/update/UpdateInferenceResponse.ts#L22-L24', @@ -2153,8 +2153,8 @@ 'ml._types.ClassificationInferenceOptions': 'ml/_types/inference.ts#L118-L133', 'ml._types.CommonTokenizationConfig': 'ml/_types/inference.ts#L160-L186', 'ml._types.ConditionOperator': 'ml/_types/Rule.ts#L74-L79', -'ml._types.DataCounts': 'ml/_types/Job.ts#L352-L372', -'ml._types.DataDescription': 'ml/_types/Job.ts#L374-L390', +'ml._types.DataCounts': 'ml/_types/Job.ts#L354-L374', +'ml._types.DataDescription': 'ml/_types/Job.ts#L376-L392', 'ml._types.Datafeed': 'ml/_types/Datafeed.ts#L37-L61', 'ml._types.DatafeedAuthorization': 'ml/_types/Authorization.ts#L31-L43', 'ml._types.DatafeedConfig': 'ml/_types/Datafeed.ts#L63-L120', @@ -2225,14 +2225,14 @@ 'ml._types.Influence': 'ml/_types/Anomaly.ts#L141-L144', 'ml._types.Influencer': 'ml/_types/Influencer.ts#L24-L76', 'ml._types.Job': 'ml/_types/Job.ts#L61-L180', -'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395', -'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L397-L401', -'ml._types.JobConfig': 'ml/_types/Job.ts#L182-L283', -'ml._types.JobForecastStatistics': 'ml/_types/Job.ts#L343-L350', +'ml._types.JobBlocked': 'ml/_types/Job.ts#L394-L397', +'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L399-L403', +'ml._types.JobConfig': 'ml/_types/Job.ts#L182-L285', +'ml._types.JobForecastStatistics': 'ml/_types/Job.ts#L345-L352', 'ml._types.JobState': 'ml/_types/Job.ts#L36-L52', 'ml._types.JobStatistics': 'ml/_types/Job.ts#L54-L59', -'ml._types.JobStats': 'ml/_types/Job.ts#L284-L330', -'ml._types.JobTimingStats': 'ml/_types/Job.ts#L332-L341', +'ml._types.JobStats': 'ml/_types/Job.ts#L286-L332', +'ml._types.JobTimingStats': 'ml/_types/Job.ts#L334-L343', 'ml._types.LearningToRankConfig': 'ml/_types/inference.ts#L87-L91', 'ml._types.MemoryStatus': 'ml/_types/Model.ts#L89-L93', 'ml._types.ModelPackageConfig': 'ml/_types/TrainedModel.ts#L257-L272', @@ -2956,52 +2956,52 @@ 'slm.start.Response': 'slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L24', 'slm.stop.Request': 'slm/stop/StopSnapshotLifecycleManagementRequest.ts#L23-L60', 'slm.stop.Response': 'slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L24', -'snapshot._types.AzureRepository': 'snapshot/_types/SnapshotRepository.ts#L40-L43', -'snapshot._types.AzureRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L77-L83', +'snapshot._types.AzureRepository': 'snapshot/_types/SnapshotRepository.ts#L40-L50', +'snapshot._types.AzureRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L145-L196', 'snapshot._types.FileCountSnapshotStats': 'snapshot/_types/FileCountSnapshotStats.ts#L22-L25', -'snapshot._types.GcsRepository': 'snapshot/_types/SnapshotRepository.ts#L45-L48', -'snapshot._types.GcsRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L85-L91', +'snapshot._types.GcsRepository': 'snapshot/_types/SnapshotRepository.ts#L52-L62', +'snapshot._types.GcsRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L198-L235', 'snapshot._types.IndexDetails': 'snapshot/_types/SnapshotIndexDetails.ts#L23-L28', 'snapshot._types.InfoFeatureState': 'snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25', -'snapshot._types.ReadOnlyUrlRepository': 'snapshot/_types/SnapshotRepository.ts#L60-L63', -'snapshot._types.ReadOnlyUrlRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L110-L115', +'snapshot._types.ReadOnlyUrlRepository': 'snapshot/_types/SnapshotRepository.ts#L92-L102', +'snapshot._types.ReadOnlyUrlRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L377-L412', 'snapshot._types.Repository': 'snapshot/_types/SnapshotRepository.ts#L24-L34', 'snapshot._types.RepositoryBase': 'snapshot/_types/SnapshotRepository.ts#L36-L38', -'snapshot._types.RepositorySettingsBase': 'snapshot/_types/SnapshotRepository.ts#L70-L75', -'snapshot._types.S3Repository': 'snapshot/_types/SnapshotRepository.ts#L50-L53', -'snapshot._types.S3RepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L93-L102', -'snapshot._types.ShardsStats': 'snapshot/_types/SnapshotShardsStats.ts#L22-L29', +'snapshot._types.RepositorySettingsBase': 'snapshot/_types/SnapshotRepository.ts#L116-L143', +'snapshot._types.S3Repository': 'snapshot/_types/SnapshotRepository.ts#L64-L78', +'snapshot._types.S3RepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L237-L346', +'snapshot._types.ShardsStats': 'snapshot/_types/SnapshotShardsStats.ts#L22-L47', 'snapshot._types.ShardsStatsStage': 'snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31', 'snapshot._types.ShardsStatsSummary': 'snapshot/_types/SnapshotShardsStatus.ts#L29-L35', 'snapshot._types.ShardsStatsSummaryItem': 'snapshot/_types/SnapshotShardsStatus.ts#L37-L40', -'snapshot._types.SharedFileSystemRepository': 'snapshot/_types/SnapshotRepository.ts#L55-L58', -'snapshot._types.SharedFileSystemRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L104-L108', +'snapshot._types.SharedFileSystemRepository': 'snapshot/_types/SnapshotRepository.ts#L80-L90', +'snapshot._types.SharedFileSystemRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L348-L375', 'snapshot._types.SnapshotIndexStats': 'snapshot/_types/SnapshotIndexStats.ts#L25-L29', 'snapshot._types.SnapshotInfo': 'snapshot/_types/SnapshotInfo.ts#L41-L71', 'snapshot._types.SnapshotShardFailure': 'snapshot/_types/SnapshotShardFailure.ts#L23-L30', 'snapshot._types.SnapshotShardsStatus': 'snapshot/_types/SnapshotShardsStatus.ts#L24-L27', 'snapshot._types.SnapshotSort': 'snapshot/_types/SnapshotInfo.ts#L73-L93', -'snapshot._types.SnapshotStats': 'snapshot/_types/SnapshotStats.ts#L23-L29', -'snapshot._types.SourceOnlyRepository': 'snapshot/_types/SnapshotRepository.ts#L65-L68', -'snapshot._types.SourceOnlyRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L117-L124', -'snapshot._types.Status': 'snapshot/_types/SnapshotStatus.ts#L26-L35', -'snapshot.cleanup_repository.CleanupRepositoryResults': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L34', -'snapshot.cleanup_repository.Request': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryRequest.ts#L24-L59', +'snapshot._types.SnapshotStats': 'snapshot/_types/SnapshotStats.ts#L23-L42', +'snapshot._types.SourceOnlyRepository': 'snapshot/_types/SnapshotRepository.ts#L104-L114', +'snapshot._types.SourceOnlyRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L414-L441', +'snapshot._types.Status': 'snapshot/_types/SnapshotStatus.ts#L26-L60', +'snapshot.cleanup_repository.CleanupRepositoryResults': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37', +'snapshot.cleanup_repository.Request': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryRequest.ts#L24-L63', 'snapshot.cleanup_repository.Response': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27', -'snapshot.clone.Request': 'snapshot/clone/SnapshotCloneRequest.ts#L24-L51', +'snapshot.clone.Request': 'snapshot/clone/SnapshotCloneRequest.ts#L24-L70', 'snapshot.clone.Response': 'snapshot/clone/SnapshotCloneResponse.ts#L22-L24', -'snapshot.create.Request': 'snapshot/create/SnapshotCreateRequest.ts#L24-L92', +'snapshot.create.Request': 'snapshot/create/SnapshotCreateRequest.ts#L24-L126', 'snapshot.create.Response': 'snapshot/create/SnapshotCreateResponse.ts#L22-L35', -'snapshot.create_repository.Request': 'snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L54', +'snapshot.create_repository.Request': 'snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L79', 'snapshot.create_repository.Response': 'snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L24', -'snapshot.delete.Request': 'snapshot/delete/SnapshotDeleteRequest.ts#L24-L52', +'snapshot.delete.Request': 'snapshot/delete/SnapshotDeleteRequest.ts#L24-L65', 'snapshot.delete.Response': 'snapshot/delete/SnapshotDeleteResponse.ts#L22-L24', -'snapshot.delete_repository.Request': 'snapshot/delete_repository/SnapshotDeleteRepositoryRequest.ts#L24-L49', +'snapshot.delete_repository.Request': 'snapshot/delete_repository/SnapshotDeleteRepositoryRequest.ts#L24-L64', 'snapshot.delete_repository.Response': 'snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L24', -'snapshot.get.Request': 'snapshot/get/SnapshotGetRequest.ts#L27-L136', -'snapshot.get.Response': 'snapshot/get/SnapshotGetResponse.ts#L25-L42', -'snapshot.get.SnapshotResponseItem': 'snapshot/get/SnapshotGetResponse.ts#L44-L48', -'snapshot.get_repository.Request': 'snapshot/get_repository/SnapshotGetRepositoryRequest.ts#L24-L51', +'snapshot.get.Request': 'snapshot/get/SnapshotGetRequest.ts#L27-L158', +'snapshot.get.Response': 'snapshot/get/SnapshotGetResponse.ts#L25-L47', +'snapshot.get.SnapshotResponseItem': 'snapshot/get/SnapshotGetResponse.ts#L49-L53', +'snapshot.get_repository.Request': 'snapshot/get_repository/SnapshotGetRepositoryRequest.ts#L24-L68', 'snapshot.get_repository.Response': 'snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L25', 'snapshot.repository_analyze.BlobDetails': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284', 'snapshot.repository_analyze.DetailsInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321', @@ -3012,16 +3012,16 @@ 'snapshot.repository_analyze.SnapshotNodeInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113', 'snapshot.repository_analyze.SummaryInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202', 'snapshot.repository_analyze.WriteSummaryInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191', -'snapshot.repository_verify_integrity.Request': 'snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityRequest.ts#L24-L79', +'snapshot.repository_verify_integrity.Request': 'snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityRequest.ts#L24-L126', 'snapshot.repository_verify_integrity.Response': 'snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L24', -'snapshot.restore.Request': 'snapshot/restore/SnapshotRestoreRequest.ts#L25-L78', +'snapshot.restore.Request': 'snapshot/restore/SnapshotRestoreRequest.ts#L25-L175', 'snapshot.restore.Response': 'snapshot/restore/SnapshotRestoreResponse.ts#L23-L28', 'snapshot.restore.SnapshotRestore': 'snapshot/restore/SnapshotRestoreResponse.ts#L30-L34', -'snapshot.status.Request': 'snapshot/status/SnapshotStatusRequest.ts#L24-L65', +'snapshot.status.Request': 'snapshot/status/SnapshotStatusRequest.ts#L24-L90', 'snapshot.status.Response': 'snapshot/status/SnapshotStatusResponse.ts#L22-L24', -'snapshot.verify_repository.CompactNodeInfo': 'snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L27-L29', -'snapshot.verify_repository.Request': 'snapshot/verify_repository/SnapshotVerifyRepositoryRequest.ts#L24-L49', -'snapshot.verify_repository.Response': 'snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25', +'snapshot.verify_repository.CompactNodeInfo': 'snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L33-L40', +'snapshot.verify_repository.Request': 'snapshot/verify_repository/SnapshotVerifyRepositoryRequest.ts#L24-L63', +'snapshot.verify_repository.Response': 'snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L31', 'sql.Column': 'sql/types.ts#L23-L26', 'sql.clear_cursor.Request': 'sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L42', 'sql.clear_cursor.Response': 'sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22', @@ -3328,10 +3328,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/079cda0a96e04fbd23690a8a0404993bec8806cf/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/48cc23c17fd7640e7ea911b1074d7ff5abeb1fbf/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index 44c79263e..4e0608127 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -3719,8 +3719,10 @@ public final CompletableFuture resolveIndex( // ----- Endpoint: indices.rollover /** - * Roll over to a new index. TIP: It is recommended to use the index lifecycle - * rollover action to automate rollovers. + * Roll over to a new index. TIP: We recommend using the index lifecycle + * rollover action to automate rollovers. However, Serverless does not support + * Index Lifecycle Management (ILM), so don't use this approach in the + * Serverless context. *

* The rollover API creates a new index for a data stream or index alias. The * API behavior depends on the rollover target. @@ -3784,8 +3786,10 @@ public CompletableFuture rollover(RolloverRequest request) { } /** - * Roll over to a new index. TIP: It is recommended to use the index lifecycle - * rollover action to automate rollovers. + * Roll over to a new index. TIP: We recommend using the index lifecycle + * rollover action to automate rollovers. However, Serverless does not support + * Index Lifecycle Management (ILM), so don't use this approach in the + * Serverless context. *

* The rollover API creates a new index for a data stream or index alias. The * API behavior depends on the rollover target. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index 9fa976afe..89adc2ad9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -3771,8 +3771,10 @@ public final ResolveIndexResponse resolveIndex( // ----- Endpoint: indices.rollover /** - * Roll over to a new index. TIP: It is recommended to use the index lifecycle - * rollover action to automate rollovers. + * Roll over to a new index. TIP: We recommend using the index lifecycle + * rollover action to automate rollovers. However, Serverless does not support + * Index Lifecycle Management (ILM), so don't use this approach in the + * Serverless context. *

* The rollover API creates a new index for a data stream or index alias. The * API behavior depends on the rollover target. @@ -3836,8 +3838,10 @@ public RolloverResponse rollover(RolloverRequest request) throws IOException, El } /** - * Roll over to a new index. TIP: It is recommended to use the index lifecycle - * rollover action to automate rollovers. + * Roll over to a new index. TIP: We recommend using the index lifecycle + * rollover action to automate rollovers. However, Serverless does not support + * Index Lifecycle Management (ILM), so don't use this approach in the + * Serverless context. *

* The rollover API creates a new index for a data stream or index alias. The * API behavior depends on the rollover target. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java index 9b41ee5b3..ffb954174 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java @@ -63,8 +63,10 @@ // typedef: indices.rollover.Request /** - * Roll over to a new index. TIP: It is recommended to use the index lifecycle - * rollover action to automate rollovers. + * Roll over to a new index. TIP: We recommend using the index lifecycle + * rollover action to automate rollovers. However, Serverless does not support + * Index Lifecycle Management (ILM), so don't use this approach in the + * Serverless context. *

* The rollover API creates a new index for a data stream or index alias. The * API behavior depends on the rollover target. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java index c9f0ba011..06b5461c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java @@ -24,6 +24,8 @@ import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; @@ -31,6 +33,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.Boolean; import java.lang.String; import java.util.HashMap; @@ -64,8 +67,8 @@ * "../doc-files/api-spec.html#indices.simulate_index_template.Request">API * specification */ - -public class SimulateIndexTemplateRequest extends RequestBase { +@JsonpDeserializable +public class SimulateIndexTemplateRequest extends RequestBase implements JsonpSerializable { @Nullable private final String cause; @@ -80,6 +83,8 @@ public class SimulateIndexTemplateRequest extends RequestBase { private final String name; + private final IndexTemplate indexTemplate; + // --------------------------------------------------------------------------------------------- private SimulateIndexTemplateRequest(Builder builder) { @@ -89,6 +94,7 @@ private SimulateIndexTemplateRequest(Builder builder) { this.includeDefaults = builder.includeDefaults; this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.indexTemplate = ApiTypeHelper.requireNonNull(builder.indexTemplate, this, "indexTemplate"); } @@ -148,6 +154,21 @@ public final String name() { return this.name; } + /** + * Required - Request body. + */ + public final IndexTemplate indexTemplate() { + return this.indexTemplate; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + this.indexTemplate.serialize(generator, mapper); + + } + // --------------------------------------------------------------------------------------------- /** @@ -171,6 +192,8 @@ public static class Builder extends RequestBase.AbstractBuilder private String name; + private IndexTemplate indexTemplate; + /** * User defined reason for dry-run creating the new template for simulation * purposes @@ -234,6 +257,29 @@ public final Builder name(String value) { return this; } + /** + * Required - Request body. + */ + public final Builder indexTemplate(IndexTemplate value) { + this.indexTemplate = value; + return this; + } + + /** + * Required - Request body. + */ + public final Builder indexTemplate(Function> fn) { + return this.indexTemplate(fn.apply(new IndexTemplate.Builder()).build()); + } + + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + IndexTemplate value = (IndexTemplate) IndexTemplate._DESERIALIZER.deserialize(parser, mapper); + return this.indexTemplate(value); + } + @Override protected Builder self() { return this; @@ -252,6 +298,15 @@ public SimulateIndexTemplateRequest build() { } } + public static final JsonpDeserializer _DESERIALIZER = createSimulateIndexTemplateRequestDeserializer(); + protected static JsonpDeserializer createSimulateIndexTemplateRequestDeserializer() { + + JsonpDeserializer valueDeserializer = IndexTemplate._DESERIALIZER; + + return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() + .indexTemplate(valueDeserializer.deserialize(parser, mapper, event)).build()); + } + // --------------------------------------------------------------------------------------------- /** @@ -318,5 +373,5 @@ public SimulateIndexTemplateRequest build() { } return params; - }, SimpleEndpoint.emptyMap(), false, SimulateIndexTemplateResponse._DESERIALIZER); + }, SimpleEndpoint.emptyMap(), true, SimulateIndexTemplateResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java index 042082f7f..36e7b4e75 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java @@ -72,6 +72,9 @@ public class TextEmbeddingRequest extends RequestBase implements JsonpSerializab private final List input; + @Nullable + private final String inputType; + @Nullable private final JsonData taskSettings; @@ -84,6 +87,7 @@ private TextEmbeddingRequest(Builder builder) { this.inferenceId = ApiTypeHelper.requireNonNull(builder.inferenceId, this, "inferenceId"); this.input = ApiTypeHelper.unmodifiableRequired(builder.input, this, "input"); + this.inputType = builder.inputType; this.taskSettings = builder.taskSettings; this.timeout = builder.timeout; @@ -111,6 +115,32 @@ public final List input() { return this.input; } + /** + * The input data type for the text embedding model. Possible values include: + *

    + *
  • SEARCH
  • + *
  • INGEST
  • + *
  • CLASSIFICATION
  • + *
  • CLUSTERING Not all services support all values. Unsupported + * values will trigger a validation exception. Accepted values depend on the + * configured inference service, refer to the relevant service-specific + * documentation for more info.
  • + *
+ *
+ *

+ * info The input_type parameter specified on the root level of the + * request body will take precedence over the input_type parameter + * specified in task_settings. + *

+ *
+ *

+ * API name: {@code input_type} + */ + @Nullable + public final String inputType() { + return this.inputType; + } + /** * Optional task settings *

@@ -151,6 +181,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (this.inputType != null) { + generator.writeKey("input_type"); + generator.write(this.inputType); + } if (this.taskSettings != null) { generator.writeKey("task_settings"); @@ -173,6 +208,9 @@ public static class Builder extends RequestBase.AbstractBuilder private List input; + @Nullable + private String inputType; + @Nullable private JsonData taskSettings; @@ -213,6 +251,32 @@ public final Builder input(String value, String... values) { return this; } + /** + * The input data type for the text embedding model. Possible values include: + *

    + *
  • SEARCH
  • + *
  • INGEST
  • + *
  • CLASSIFICATION
  • + *
  • CLUSTERING Not all services support all values. Unsupported + * values will trigger a validation exception. Accepted values depend on the + * configured inference service, refer to the relevant service-specific + * documentation for more info.
  • + *
+ *
+ *

+ * info The input_type parameter specified on the root level of the + * request body will take precedence over the input_type parameter + * specified in task_settings. + *

+ *
+ *

+ * API name: {@code input_type} + */ + public final Builder inputType(@Nullable String value) { + this.inputType = value; + return this; + } + /** * Optional task settings *

@@ -271,6 +335,7 @@ public TextEmbeddingRequest build() { protected static void setupTextEmbeddingRequestDeserializer(ObjectDeserializer op) { op.add(Builder::input, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "input"); + op.add(Builder::inputType, JsonpDeserializer.stringDeserializer(), "input_type"); op.add(Builder::taskSettings, JsonData._DESERIALIZER, "task_settings"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepository.java index 68943221d..7461c3bc4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepository.java @@ -79,7 +79,9 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final AzureRepositorySettings settings() { return this.settings; @@ -106,7 +108,9 @@ public static class Builder extends RepositoryBase.AbstractBuilder private AzureRepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings(AzureRepositorySettings value) { this.settings = value; @@ -114,7 +118,9 @@ public final Builder settings(AzureRepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings( Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepositorySettings.java index 81d342bd2..13affce01 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/AzureRepositorySettings.java @@ -27,6 +27,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -57,6 +58,9 @@ */ @JsonpDeserializable public class AzureRepositorySettings extends RepositorySettingsBase { + @Nullable + private final String basePath; + @Nullable private final String client; @@ -64,24 +68,29 @@ public class AzureRepositorySettings extends RepositorySettingsBase { private final String container; @Nullable - private final String basePath; + private final Integer deleteObjectsMaxSize; @Nullable - private final Boolean readonly; + private final String locationMode; @Nullable - private final String locationMode; + private final Integer maxConcurrentBatchDeletes; + + @Nullable + private final Boolean readonly; // --------------------------------------------------------------------------------------------- private AzureRepositorySettings(Builder builder) { super(builder); + this.basePath = builder.basePath; this.client = builder.client; this.container = builder.container; - this.basePath = builder.basePath; - this.readonly = builder.readonly; + this.deleteObjectsMaxSize = builder.deleteObjectsMaxSize; this.locationMode = builder.locationMode; + this.maxConcurrentBatchDeletes = builder.maxConcurrentBatchDeletes; + this.readonly = builder.readonly; } @@ -90,6 +99,24 @@ public static AzureRepositorySettings of(Function + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

+ * API name: {@code base_path} + */ + @Nullable + public final String basePath() { + return this.basePath; + } + + /** + * The name of the Azure repository client to use. + *

* API name: {@code client} */ @Nullable @@ -98,6 +125,8 @@ public final String client() { } /** + * The Azure container. + *

* API name: {@code container} */ @Nullable @@ -106,32 +135,74 @@ public final String container() { } /** - * API name: {@code base_path} + * The maxmimum batch size, between 1 and 256, used for BlobBatch + * requests. Defaults to 256 which is the maximum number supported by the Azure + * blob batch API. + *

+ * API name: {@code delete_objects_max_size} */ @Nullable - public final String basePath() { - return this.basePath; + public final Integer deleteObjectsMaxSize() { + return this.deleteObjectsMaxSize; } /** - * API name: {@code readonly} + * Either primary_only or secondary_only. Note that if + * you set it to secondary_only, it will force + * readonly to true. + *

+ * API name: {@code location_mode} */ @Nullable - public final Boolean readonly() { - return this.readonly; + public final String locationMode() { + return this.locationMode; } /** - * API name: {@code location_mode} + * The maximum number of concurrent batch delete requests that will be submitted + * for any individual bulk delete with BlobBatch. Note that the + * effective number of concurrent deletes is further limited by the Azure client + * connection and event loop thread limits. Defaults to 10, minimum is 1, + * maximum is 100. + *

+ * API name: {@code max_concurrent_batch_deletes} */ @Nullable - public final String locationMode() { - return this.locationMode; + public final Integer maxConcurrentBatchDeletes() { + return this.maxConcurrentBatchDeletes; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. If + * false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

+ * API name: {@code readonly} + */ + @Nullable + public final Boolean readonly() { + return this.readonly; } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); + if (this.basePath != null) { + generator.writeKey("base_path"); + generator.write(this.basePath); + + } if (this.client != null) { generator.writeKey("client"); generator.write(this.client); @@ -142,14 +213,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.container); } - if (this.basePath != null) { - generator.writeKey("base_path"); - generator.write(this.basePath); - - } - if (this.readonly != null) { - generator.writeKey("readonly"); - generator.write(this.readonly); + if (this.deleteObjectsMaxSize != null) { + generator.writeKey("delete_objects_max_size"); + generator.write(this.deleteObjectsMaxSize); } if (this.locationMode != null) { @@ -157,6 +223,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.locationMode); } + if (this.maxConcurrentBatchDeletes != null) { + generator.writeKey("max_concurrent_batch_deletes"); + generator.write(this.maxConcurrentBatchDeletes); + + } + if (this.readonly != null) { + generator.writeKey("readonly"); + generator.write(this.readonly); + + } } @@ -169,6 +245,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RepositorySettingsBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String basePath; + @Nullable private String client; @@ -176,15 +255,36 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilder + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

+ * API name: {@code base_path} + */ + public final Builder basePath(@Nullable String value) { + this.basePath = value; + return this; + } /** + * The name of the Azure repository client to use. + *

* API name: {@code client} */ public final Builder client(@Nullable String value) { @@ -193,6 +293,8 @@ public final Builder client(@Nullable String value) { } /** + * The Azure container. + *

* API name: {@code container} */ public final Builder container(@Nullable String value) { @@ -201,26 +303,63 @@ public final Builder container(@Nullable String value) { } /** - * API name: {@code base_path} + * The maxmimum batch size, between 1 and 256, used for BlobBatch + * requests. Defaults to 256 which is the maximum number supported by the Azure + * blob batch API. + *

+ * API name: {@code delete_objects_max_size} */ - public final Builder basePath(@Nullable String value) { - this.basePath = value; + public final Builder deleteObjectsMaxSize(@Nullable Integer value) { + this.deleteObjectsMaxSize = value; return this; } /** - * API name: {@code readonly} + * Either primary_only or secondary_only. Note that if + * you set it to secondary_only, it will force + * readonly to true. + *

+ * API name: {@code location_mode} */ - public final Builder readonly(@Nullable Boolean value) { - this.readonly = value; + public final Builder locationMode(@Nullable String value) { + this.locationMode = value; return this; } /** - * API name: {@code location_mode} + * The maximum number of concurrent batch delete requests that will be submitted + * for any individual bulk delete with BlobBatch. Note that the + * effective number of concurrent deletes is further limited by the Azure client + * connection and event loop thread limits. Defaults to 10, minimum is 1, + * maximum is 100. + *

+ * API name: {@code max_concurrent_batch_deletes} */ - public final Builder locationMode(@Nullable String value) { - this.locationMode = value; + public final Builder maxConcurrentBatchDeletes(@Nullable Integer value) { + this.maxConcurrentBatchDeletes = value; + return this; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. If + * false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

+ * API name: {@code readonly} + */ + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; return this; } @@ -253,11 +392,14 @@ public AzureRepositorySettings build() { protected static void setupAzureRepositorySettingsDeserializer( ObjectDeserializer op) { RepositorySettingsBase.setupRepositorySettingsBaseDeserializer(op); + op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); op.add(Builder::container, JsonpDeserializer.stringDeserializer(), "container"); - op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); - op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + op.add(Builder::deleteObjectsMaxSize, JsonpDeserializer.integerDeserializer(), "delete_objects_max_size"); op.add(Builder::locationMode, JsonpDeserializer.stringDeserializer(), "location_mode"); + op.add(Builder::maxConcurrentBatchDeletes, JsonpDeserializer.integerDeserializer(), + "max_concurrent_batch_deletes"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java index 759d3157a..86e9b60c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java @@ -89,7 +89,10 @@ public static CleanupRepositoryRequest of(Function-1 *

* API name: {@code master_timeout} */ @@ -99,7 +102,7 @@ public final Time masterTimeout() { } /** - * Required - Snapshot repository to clean up. + * Required - The name of the snapshot repository to clean up. *

* API name: {@code repository} */ @@ -108,7 +111,11 @@ public final String name() { } /** - * Period to wait for a response. + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -135,7 +142,10 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. If the master node is + * not available before the timeout expires, the request fails and returns an + * error. To indicate that the request should never timeout, set it to + * -1 *

* API name: {@code master_timeout} */ @@ -145,7 +155,10 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. If the master node is + * not available before the timeout expires, the request fails and returns an + * error. To indicate that the request should never timeout, set it to + * -1 *

* API name: {@code master_timeout} */ @@ -154,7 +167,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - Snapshot repository to clean up. + * Required - The name of the snapshot repository to clean up. *

* API name: {@code repository} */ @@ -164,7 +177,11 @@ public final Builder name(String value) { } /** - * Period to wait for a response. + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -174,7 +191,11 @@ public final Builder timeout(@Nullable Time value) { } /** - * Period to wait for a response. + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java index c75df3772..fee43426a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java @@ -94,14 +94,19 @@ public static CloneSnapshotRequest of(Function + * API name: {@code indices} */ public final String indices() { return this.indices; } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -111,7 +116,8 @@ public final Time masterTimeout() { } /** - * Required - A repository name + * Required - The name of the snapshot repository that both source and target + * snapshot belong to. *

* API name: {@code repository} */ @@ -120,7 +126,7 @@ public final String repository() { } /** - * Required - The name of the snapshot to clone from + * Required - The source snapshot name. *

* API name: {@code snapshot} */ @@ -129,7 +135,7 @@ public final String snapshot() { } /** - * Required - The name of the cloned snapshot to create + * Required - The target snapshot name. *

* API name: {@code target_snapshot} */ @@ -174,7 +180,10 @@ public static class Builder extends RequestBase.AbstractBuilder private String targetSnapshot; /** - * Required - API name: {@code indices} + * Required - A comma-separated list of indices to include in the snapshot. + * Multi-target syntax is supported. + *

+ * API name: {@code indices} */ public final Builder indices(String value) { this.indices = value; @@ -182,7 +191,9 @@ public final Builder indices(String value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -192,7 +203,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -201,7 +214,8 @@ public final Builder masterTimeout(Function> f } /** - * Required - A repository name + * Required - The name of the snapshot repository that both source and target + * snapshot belong to. *

* API name: {@code repository} */ @@ -211,7 +225,7 @@ public final Builder repository(String value) { } /** - * Required - The name of the snapshot to clone from + * Required - The source snapshot name. *

* API name: {@code snapshot} */ @@ -221,7 +235,7 @@ public final Builder snapshot(String value) { } /** - * Required - The name of the cloned snapshot to create + * Required - The target snapshot name. *

* API name: {@code target_snapshot} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java index 86eeca000..7f2a3b541 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java @@ -67,6 +67,10 @@ * cluster.blocks.read_only and * clsuter.blocks.read_only_allow_delete settings) that prevent * write access. + *

+ * Several options for this API can be specified using a query parameter or a + * request body parameter. If both parameters are specified, only the query + * parameter is used. * * @see API @@ -104,7 +108,9 @@ public static CreateRepositoryRequest of(Function-1. *

* API name: {@code master_timeout} */ @@ -114,7 +120,7 @@ public final Time masterTimeout() { } /** - * Required - A repository name + * Required - The name of the snapshot repository to register or update. *

* API name: {@code repository} */ @@ -123,7 +129,11 @@ public final String name() { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -133,7 +143,10 @@ public final Time timeout() { } /** - * Whether to verify the repository after creation + * If true, the request verifies the repository is functional on + * all master and data nodes in the cluster. If false, this + * verification is skipped. You can also perform this verification with the + * verify snapshot repository API. *

* API name: {@code verify} */ @@ -180,7 +193,9 @@ public static class Builder extends RequestBase.AbstractBuilder private Repository repository; /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -190,7 +205,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -199,7 +216,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - A repository name + * Required - The name of the snapshot repository to register or update. *

* API name: {@code repository} */ @@ -209,7 +226,11 @@ public final Builder name(String value) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -219,7 +240,11 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -228,7 +253,10 @@ public final Builder timeout(Function> fn) { } /** - * Whether to verify the repository after creation + * If true, the request verifies the repository is functional on + * all master and data nodes in the cluster. If false, this + * verification is skipped. You can also perform this verification with the + * verify snapshot repository API. *

* API name: {@code verify} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java index fc6be7a48..a06531c46 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java @@ -20,6 +20,7 @@ package co.elastic.clients.elasticsearch.snapshot; import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonData; @@ -69,6 +70,8 @@ */ @JsonpDeserializable public class CreateSnapshotRequest extends RequestBase implements JsonpSerializable { + private final List expandWildcards; + private final List featureStates; @Nullable @@ -98,6 +101,7 @@ public class CreateSnapshotRequest extends RequestBase implements JsonpSerializa private CreateSnapshotRequest(Builder builder) { + this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.featureStates = ApiTypeHelper.unmodifiable(builder.featureStates); this.ignoreUnavailable = builder.ignoreUnavailable; this.includeGlobalState = builder.includeGlobalState; @@ -116,12 +120,29 @@ public static CreateSnapshotRequest of(Functioninclude_global_state is - * true, all current feature states are included by default. If - * include_global_state is false, no feature states - * are included by default. + * Determines how wildcard patterns in the indices parameter match + * data streams and indices. It supports comma-separated values such as + * open,hidden. + *

+ * API name: {@code expand_wildcards} + */ + public final List expandWildcards() { + return this.expandWildcards; + } + + /** + * The feature states to include in the snapshot. Each feature state includes + * one or more system indices containing related data. You can view a list of + * eligible features using the get features API. + *

+ * If include_global_state is true, all current + * feature states are included by default. If include_global_state + * is false, no feature states are included by default. + *

+ * Note that specifying an empty array will result in the default behavior. To + * exclude all feature states, regardless of the + * include_global_state value, specify an array with only the value + * none (["none"]). *

* API name: {@code feature_states} */ @@ -157,8 +178,13 @@ public final Boolean includeGlobalState() { } /** - * Data streams and indices to include in the snapshot. Supports multi-target - * syntax. Includes all data streams and indices by default. + * A comma-separated list of data streams and indices to include in the + * snapshot. It supports a multi-target syntax. The default is an empty array + * ([]), which includes all regular data streams and regular + * indices. To exclude all data streams and indices, use -*. + *

+ * You can't use this parameter to include or exclude system indices or system + * data streams from a snapshot. Use feature_states instead. *

* API name: {@code indices} */ @@ -167,7 +193,7 @@ public final List indices() { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -178,8 +204,10 @@ public final Time masterTimeout() { } /** - * Optional metadata for the snapshot. May have any contents. Must be less than - * 1024 bytes. This map is not automatically generated by Elasticsearch. + * Arbitrary metadata to the snapshot, such as a record of who took the + * snapshot, why it was taken, or any other useful data. It can have any + * contents but it must be less than 1024 bytes. This information is not + * automatically generated by Elasticsearch. *

* API name: {@code metadata} */ @@ -188,10 +216,11 @@ public final Map metadata() { } /** - * If true, allows restoring a partial snapshot of indices with - * unavailable shards. Only shards that were successfully included in the - * snapshot will be restored. All missing shards will be recreated as empty. If - * false, the entire restore operation will fail if one or more + * If true, it enables you to restore a partial snapshot of indices + * with unavailable shards. Only shards that were successfully included in the + * snapshot will be restored. All missing shards will be recreated as empty. + *

+ * If false, the entire restore operation will fail if one or more * indices included in the snapshot do not have all primary shards available. *

* API name: {@code partial} @@ -202,7 +231,7 @@ public final Boolean partial() { } /** - * Required - Repository for the snapshot. + * Required - The name of the repository for the snapshot. *

* API name: {@code repository} */ @@ -211,7 +240,8 @@ public final String repository() { } /** - * Required - Name of the snapshot. Must be unique in the repository. + * Required - The name of the snapshot. It supportes date math. It must be + * unique in the repository. *

* API name: {@code snapshot} */ @@ -242,6 +272,15 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (ApiTypeHelper.isDefined(this.expandWildcards)) { + generator.writeKey("expand_wildcards"); + generator.writeStartArray(); + for (ExpandWildcard item0 : this.expandWildcards) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } if (ApiTypeHelper.isDefined(this.featureStates)) { generator.writeKey("feature_states"); generator.writeStartArray(); @@ -300,6 +339,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private List expandWildcards; + @Nullable private List featureStates; @@ -329,12 +371,46 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Feature states to include in the snapshot. Each feature state includes one or - * more system indices containing related data. You can view a list of eligible - * features using the get features API. If include_global_state is - * true, all current feature states are included by default. If - * include_global_state is false, no feature states - * are included by default. + * Determines how wildcard patterns in the indices parameter match + * data streams and indices. It supports comma-separated values such as + * open,hidden. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds all elements of list to expandWildcards. + */ + public final Builder expandWildcards(List list) { + this.expandWildcards = _listAddAll(this.expandWildcards, list); + return this; + } + + /** + * Determines how wildcard patterns in the indices parameter match + * data streams and indices. It supports comma-separated values such as + * open,hidden. + *

+ * API name: {@code expand_wildcards} + *

+ * Adds one or more values to expandWildcards. + */ + public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) { + this.expandWildcards = _listAdd(this.expandWildcards, value, values); + return this; + } + + /** + * The feature states to include in the snapshot. Each feature state includes + * one or more system indices containing related data. You can view a list of + * eligible features using the get features API. + *

+ * If include_global_state is true, all current + * feature states are included by default. If include_global_state + * is false, no feature states are included by default. + *

+ * Note that specifying an empty array will result in the default behavior. To + * exclude all feature states, regardless of the + * include_global_state value, specify an array with only the value + * none (["none"]). *

* API name: {@code feature_states} *

@@ -346,12 +422,18 @@ public final Builder featureStates(List list) { } /** - * Feature states to include in the snapshot. Each feature state includes one or - * more system indices containing related data. You can view a list of eligible - * features using the get features API. If include_global_state is - * true, all current feature states are included by default. If - * include_global_state is false, no feature states - * are included by default. + * The feature states to include in the snapshot. Each feature state includes + * one or more system indices containing related data. You can view a list of + * eligible features using the get features API. + *

+ * If include_global_state is true, all current + * feature states are included by default. If include_global_state + * is false, no feature states are included by default. + *

+ * Note that specifying an empty array will result in the default behavior. To + * exclude all feature states, regardless of the + * include_global_state value, specify an array with only the value + * none (["none"]). *

* API name: {@code feature_states} *

@@ -390,8 +472,13 @@ public final Builder includeGlobalState(@Nullable Boolean value) { } /** - * Data streams and indices to include in the snapshot. Supports multi-target - * syntax. Includes all data streams and indices by default. + * A comma-separated list of data streams and indices to include in the + * snapshot. It supports a multi-target syntax. The default is an empty array + * ([]), which includes all regular data streams and regular + * indices. To exclude all data streams and indices, use -*. + *

+ * You can't use this parameter to include or exclude system indices or system + * data streams from a snapshot. Use feature_states instead. *

* API name: {@code indices} *

@@ -403,8 +490,13 @@ public final Builder indices(List list) { } /** - * Data streams and indices to include in the snapshot. Supports multi-target - * syntax. Includes all data streams and indices by default. + * A comma-separated list of data streams and indices to include in the + * snapshot. It supports a multi-target syntax. The default is an empty array + * ([]), which includes all regular data streams and regular + * indices. To exclude all data streams and indices, use -*. + *

+ * You can't use this parameter to include or exclude system indices or system + * data streams from a snapshot. Use feature_states instead. *

* API name: {@code indices} *

@@ -416,7 +508,7 @@ public final Builder indices(String value, String... values) { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -427,7 +519,7 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -437,8 +529,10 @@ public final Builder masterTimeout(Function> f } /** - * Optional metadata for the snapshot. May have any contents. Must be less than - * 1024 bytes. This map is not automatically generated by Elasticsearch. + * Arbitrary metadata to the snapshot, such as a record of who took the + * snapshot, why it was taken, or any other useful data. It can have any + * contents but it must be less than 1024 bytes. This information is not + * automatically generated by Elasticsearch. *

* API name: {@code metadata} *

@@ -450,8 +544,10 @@ public final Builder metadata(Map map) { } /** - * Optional metadata for the snapshot. May have any contents. Must be less than - * 1024 bytes. This map is not automatically generated by Elasticsearch. + * Arbitrary metadata to the snapshot, such as a record of who took the + * snapshot, why it was taken, or any other useful data. It can have any + * contents but it must be less than 1024 bytes. This information is not + * automatically generated by Elasticsearch. *

* API name: {@code metadata} *

@@ -463,10 +559,11 @@ public final Builder metadata(String key, JsonData value) { } /** - * If true, allows restoring a partial snapshot of indices with - * unavailable shards. Only shards that were successfully included in the - * snapshot will be restored. All missing shards will be recreated as empty. If - * false, the entire restore operation will fail if one or more + * If true, it enables you to restore a partial snapshot of indices + * with unavailable shards. Only shards that were successfully included in the + * snapshot will be restored. All missing shards will be recreated as empty. + *

+ * If false, the entire restore operation will fail if one or more * indices included in the snapshot do not have all primary shards available. *

* API name: {@code partial} @@ -477,7 +574,7 @@ public final Builder partial(@Nullable Boolean value) { } /** - * Required - Repository for the snapshot. + * Required - The name of the repository for the snapshot. *

* API name: {@code repository} */ @@ -487,7 +584,8 @@ public final Builder repository(String value) { } /** - * Required - Name of the snapshot. Must be unique in the repository. + * Required - The name of the snapshot. It supportes date math. It must be + * unique in the repository. *

* API name: {@code snapshot} */ @@ -536,6 +634,8 @@ public CreateSnapshotRequest build() { protected static void setupCreateSnapshotRequestDeserializer(ObjectDeserializer op) { + op.add(Builder::expandWildcards, JsonpDeserializer.arrayDeserializer(ExpandWildcard._DESERIALIZER), + "expand_wildcards"); op.add(Builder::featureStates, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "feature_states"); op.add(Builder::ignoreUnavailable, JsonpDeserializer.booleanDeserializer(), "ignore_unavailable"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java index 7521c6549..fa69f36b8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java @@ -92,7 +92,9 @@ public static DeleteRepositoryRequest of(Function-1. *

* API name: {@code master_timeout} */ @@ -102,7 +104,7 @@ public final Time masterTimeout() { } /** - * Required - Name of the snapshot repository to unregister. Wildcard + * Required - The ame of the snapshot repositories to unregister. Wildcard * (*) patterns are supported. *

* API name: {@code repository} @@ -112,7 +114,11 @@ public final List name() { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -139,7 +145,9 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -149,7 +157,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -158,7 +168,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - Name of the snapshot repository to unregister. Wildcard + * Required - The ame of the snapshot repositories to unregister. Wildcard * (*) patterns are supported. *

* API name: {@code repository} @@ -171,7 +181,7 @@ public final Builder name(List list) { } /** - * Required - Name of the snapshot repository to unregister. Wildcard + * Required - The ame of the snapshot repositories to unregister. Wildcard * (*) patterns are supported. *

* API name: {@code repository} @@ -184,7 +194,11 @@ public final Builder name(String value, String... values) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -194,7 +208,11 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java index be5894e8e..36cd69e98 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java @@ -90,7 +90,9 @@ public static DeleteSnapshotRequest of(Function-1. *

* API name: {@code master_timeout} */ @@ -100,7 +102,7 @@ public final Time masterTimeout() { } /** - * Required - A repository name + * Required - The name of the repository to delete a snapshot from. *

* API name: {@code repository} */ @@ -109,7 +111,8 @@ public final String repository() { } /** - * Required - A comma-separated list of snapshot names + * Required - A comma-separated list of snapshot names to delete. It also + * accepts wildcards (*). *

* API name: {@code snapshot} */ @@ -149,7 +152,9 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean waitForCompletion; /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -159,7 +164,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -168,7 +175,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - A repository name + * Required - The name of the repository to delete a snapshot from. *

* API name: {@code repository} */ @@ -178,7 +185,8 @@ public final Builder repository(String value) { } /** - * Required - A comma-separated list of snapshot names + * Required - A comma-separated list of snapshot names to delete. It also + * accepts wildcards (*). *

* API name: {@code snapshot} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotAsyncClient.java index 21c781700..49f9f808d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotAsyncClient.java @@ -184,9 +184,13 @@ public final CompletableFuture create( * cluster.blocks.read_only and * clsuter.blocks.read_only_allow_delete settings) that prevent * write access. + *

+ * Several options for this API can be specified using a query parameter or a + * request body parameter. If both parameters are specified, only the query + * parameter is used. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html">Documentation * on elastic.co */ @@ -205,12 +209,16 @@ public CompletableFuture createRepository(CreateReposi * cluster.blocks.read_only and * clsuter.blocks.read_only_allow_delete settings) that prevent * write access. + *

+ * Several options for this API can be specified using a query parameter or a + * request body parameter. If both parameters are specified, only the query + * parameter is used. * * @param fn * a function that initializes a builder to create the * {@link CreateRepositoryRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html">Documentation * on elastic.co */ @@ -295,6 +303,13 @@ public final CompletableFuture deleteRepository( /** * Get snapshot information. + *

+ * NOTE: The after parameter and next field enable you + * to iterate through snapshots with some consistency guarantees regarding + * concurrent creation or deletion of snapshots. It is guaranteed that any + * snapshot that exists at the beginning of the iteration and is not + * concurrently deleted will be seen during the iteration. Snapshots + * concurrently created may be seen during an iteration. * * @see Documentation @@ -310,6 +325,13 @@ public CompletableFuture get(GetSnapshotRequest request) { /** * Get snapshot information. + *

+ * NOTE: The after parameter and next field enable you + * to iterate through snapshots with some consistency guarantees regarding + * concurrent creation or deletion of snapshots. It is guaranteed that any + * snapshot that exists at the beginning of the iteration and is not + * concurrently deleted will be seen during the iteration. Snapshots + * concurrently created may be seen during an iteration. * * @param fn * a function that initializes a builder to create the @@ -768,6 +790,20 @@ public final CompletableFuture repositoryAnalyze( * the request parameters and the response format to vary in future versions. *

* NOTE: This API may not work correctly in a mixed-version cluster. + *

+ * The default values for the parameters of this API are designed to limit the + * impact of the integrity verification on other activities in your cluster. For + * instance, by default it will only use at most half of the + * snapshot_meta threads to verify the integrity of each snapshot, + * allowing other snapshot operations to use the other half of this thread pool. + * If you modify these parameters to speed up the verification process, you risk + * disrupting other snapshot-related operations in your cluster. For large + * repositories, consider setting up a separate single-node Elasticsearch + * cluster just for running the integrity verification API. + *

+ * The response exposes implementation details of the analysis which may change + * from version to version. The response body format is therefore not considered + * stable and may be different in newer versions. * * @see Documentation @@ -833,6 +869,20 @@ public CompletableFuture repositoryVerifyInte * the request parameters and the response format to vary in future versions. *

* NOTE: This API may not work correctly in a mixed-version cluster. + *

+ * The default values for the parameters of this API are designed to limit the + * impact of the integrity verification on other activities in your cluster. For + * instance, by default it will only use at most half of the + * snapshot_meta threads to verify the integrity of each snapshot, + * allowing other snapshot operations to use the other half of this thread pool. + * If you modify these parameters to speed up the verification process, you risk + * disrupting other snapshot-related operations in your cluster. For large + * repositories, consider setting up a separate single-node Elasticsearch + * cluster just for running the integrity verification API. + *

+ * The response exposes implementation details of the analysis which may change + * from version to version. The response body format is therefore not considered + * stable and may be different in newer versions. * * @param fn * a function that initializes a builder to create the @@ -934,10 +984,18 @@ public final CompletableFuture restore( /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from @@ -963,10 +1021,18 @@ public CompletableFuture status(SnapshotStatusRequest re /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from @@ -993,10 +1059,18 @@ public final CompletableFuture status( /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java index 0aa54f973..ddf60a8c8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java @@ -186,9 +186,13 @@ public final CreateSnapshotResponse create( * cluster.blocks.read_only and * clsuter.blocks.read_only_allow_delete settings) that prevent * write access. + *

+ * Several options for this API can be specified using a query parameter or a + * request body parameter. If both parameters are specified, only the query + * parameter is used. * * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html">Documentation * on elastic.co */ @@ -208,12 +212,16 @@ public CreateRepositoryResponse createRepository(CreateRepositoryRequest request * cluster.blocks.read_only and * clsuter.blocks.read_only_allow_delete settings) that prevent * write access. + *

+ * Several options for this API can be specified using a query parameter or a + * request body parameter. If both parameters are specified, only the query + * parameter is used. * * @param fn * a function that initializes a builder to create the * {@link CreateRepositoryRequest} * @see Documentation + * "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html">Documentation * on elastic.co */ @@ -302,6 +310,13 @@ public final DeleteRepositoryResponse deleteRepository( /** * Get snapshot information. + *

+ * NOTE: The after parameter and next field enable you + * to iterate through snapshots with some consistency guarantees regarding + * concurrent creation or deletion of snapshots. It is guaranteed that any + * snapshot that exists at the beginning of the iteration and is not + * concurrently deleted will be seen during the iteration. Snapshots + * concurrently created may be seen during an iteration. * * @see Documentation @@ -317,6 +332,13 @@ public GetSnapshotResponse get(GetSnapshotRequest request) throws IOException, E /** * Get snapshot information. + *

+ * NOTE: The after parameter and next field enable you + * to iterate through snapshots with some consistency guarantees regarding + * concurrent creation or deletion of snapshots. It is guaranteed that any + * snapshot that exists at the beginning of the iteration and is not + * concurrently deleted will be seen during the iteration. Snapshots + * concurrently created may be seen during an iteration. * * @param fn * a function that initializes a builder to create the @@ -779,6 +801,20 @@ public final RepositoryAnalyzeResponse repositoryAnalyze( * the request parameters and the response format to vary in future versions. *

* NOTE: This API may not work correctly in a mixed-version cluster. + *

+ * The default values for the parameters of this API are designed to limit the + * impact of the integrity verification on other activities in your cluster. For + * instance, by default it will only use at most half of the + * snapshot_meta threads to verify the integrity of each snapshot, + * allowing other snapshot operations to use the other half of this thread pool. + * If you modify these parameters to speed up the verification process, you risk + * disrupting other snapshot-related operations in your cluster. For large + * repositories, consider setting up a separate single-node Elasticsearch + * cluster just for running the integrity verification API. + *

+ * The response exposes implementation details of the analysis which may change + * from version to version. The response body format is therefore not considered + * stable and may be different in newer versions. * * @see Documentation @@ -844,6 +880,20 @@ public RepositoryVerifyIntegrityResponse repositoryVerifyIntegrity(RepositoryVer * the request parameters and the response format to vary in future versions. *

* NOTE: This API may not work correctly in a mixed-version cluster. + *

+ * The default values for the parameters of this API are designed to limit the + * impact of the integrity verification on other activities in your cluster. For + * instance, by default it will only use at most half of the + * snapshot_meta threads to verify the integrity of each snapshot, + * allowing other snapshot operations to use the other half of this thread pool. + * If you modify these parameters to speed up the verification process, you risk + * disrupting other snapshot-related operations in your cluster. For large + * repositories, consider setting up a separate single-node Elasticsearch + * cluster just for running the integrity verification API. + *

+ * The response exposes implementation details of the analysis which may change + * from version to version. The response body format is therefore not considered + * stable and may be different in newer versions. * * @param fn * a function that initializes a builder to create the @@ -946,10 +996,18 @@ public final RestoreResponse restore(Function + * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from @@ -975,10 +1033,18 @@ public SnapshotStatusResponse status(SnapshotStatusRequest request) throws IOExc /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from @@ -1006,10 +1072,18 @@ public final SnapshotStatusResponse status( /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepository.java index 786d6a220..b408446e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepository.java @@ -79,7 +79,9 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final GcsRepositorySettings settings() { return this.settings; @@ -106,7 +108,9 @@ public static class Builder extends RepositoryBase.AbstractBuilder private GcsRepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings(GcsRepositorySettings value) { this.settings = value; @@ -114,7 +118,9 @@ public final Builder settings(GcsRepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings( Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepositorySettings.java index 3bf19af9d..5c74760c9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GcsRepositorySettings.java @@ -61,16 +61,16 @@ public class GcsRepositorySettings extends RepositorySettingsBase { private final String bucket; @Nullable - private final String client; + private final String applicationName; @Nullable private final String basePath; @Nullable - private final Boolean readonly; + private final String client; @Nullable - private final String applicationName; + private final Boolean readonly; // --------------------------------------------------------------------------------------------- @@ -78,10 +78,10 @@ private GcsRepositorySettings(Builder builder) { super(builder); this.bucket = ApiTypeHelper.requireNonNull(builder.bucket, this, "bucket"); - this.client = builder.client; + this.applicationName = builder.applicationName; this.basePath = builder.basePath; + this.client = builder.client; this.readonly = builder.readonly; - this.applicationName = builder.applicationName; } @@ -90,21 +90,36 @@ public static GcsRepositorySettings of(Function + * API name: {@code bucket} */ public final String bucket() { return this.bucket; } /** - * API name: {@code client} + * The name used by the client when it uses the Google Cloud Storage service. + *

+ * API name: {@code application_name} + * + * @deprecated 6.3.0 */ + @Deprecated @Nullable - public final String client() { - return this.client; + public final String applicationName() { + return this.applicationName; } /** + * The path to the repository data within the bucket. It defaults to the root of + * the bucket. + *

+ * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

* API name: {@code base_path} */ @Nullable @@ -113,19 +128,37 @@ public final String basePath() { } /** - * API name: {@code readonly} + * The name of the client to use to connect to Google Cloud Storage. + *

+ * API name: {@code client} */ @Nullable - public final Boolean readonly() { - return this.readonly; + public final String client() { + return this.client; } /** - * API name: {@code application_name} + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

+ * API name: {@code readonly} */ @Nullable - public final String applicationName() { - return this.applicationName; + public final Boolean readonly() { + return this.readonly; } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { @@ -134,26 +167,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("bucket"); generator.write(this.bucket); - if (this.client != null) { - generator.writeKey("client"); - generator.write(this.client); + if (this.applicationName != null) { + generator.writeKey("application_name"); + generator.write(this.applicationName); } if (this.basePath != null) { generator.writeKey("base_path"); generator.write(this.basePath); + } + if (this.client != null) { + generator.writeKey("client"); + generator.write(this.client); + } if (this.readonly != null) { generator.writeKey("readonly"); generator.write(this.readonly); } - if (this.applicationName != null) { - generator.writeKey("application_name"); - generator.write(this.applicationName); - - } } @@ -169,19 +202,21 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilder + * API name: {@code bucket} */ public final Builder bucket(String value) { this.bucket = value; @@ -189,14 +224,27 @@ public final Builder bucket(String value) { } /** - * API name: {@code client} + * The name used by the client when it uses the Google Cloud Storage service. + *

+ * API name: {@code application_name} + * + * @deprecated 6.3.0 */ - public final Builder client(@Nullable String value) { - this.client = value; + @Deprecated + public final Builder applicationName(@Nullable String value) { + this.applicationName = value; return this; } /** + * The path to the repository data within the bucket. It defaults to the root of + * the bucket. + *

+ * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

* API name: {@code base_path} */ public final Builder basePath(@Nullable String value) { @@ -205,18 +253,36 @@ public final Builder basePath(@Nullable String value) { } /** - * API name: {@code readonly} + * The name of the client to use to connect to Google Cloud Storage. + *

+ * API name: {@code client} */ - public final Builder readonly(@Nullable Boolean value) { - this.readonly = value; + public final Builder client(@Nullable String value) { + this.client = value; return this; } /** - * API name: {@code application_name} + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

+ * API name: {@code readonly} */ - public final Builder applicationName(@Nullable String value) { - this.applicationName = value; + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; return this; } @@ -249,10 +315,10 @@ public GcsRepositorySettings build() { protected static void setupGcsRepositorySettingsDeserializer(ObjectDeserializer op) { RepositorySettingsBase.setupRepositorySettingsBaseDeserializer(op); op.add(Builder::bucket, JsonpDeserializer.stringDeserializer(), "bucket"); - op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); + op.add(Builder::applicationName, JsonpDeserializer.stringDeserializer(), "application_name"); op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); + op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); - op.add(Builder::applicationName, JsonpDeserializer.stringDeserializer(), "application_name"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java index 305661c71..de169e909 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java @@ -89,8 +89,8 @@ public static GetRepositoryRequest of(Functiontrue, the request gets information from the local node only. + * If false, the request gets information from the master node. *

* API name: {@code local} */ @@ -100,7 +100,9 @@ public final Boolean local() { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -110,7 +112,12 @@ public final Time masterTimeout() { } /** - * A comma-separated list of repository names + * A comma-separated list of snapshot repository names used to limit the + * request. Wildcard (*) expressions are supported including + * combining wildcards with exclude patterns starting with -. + *

+ * To get information about all snapshot repositories registered in the cluster, + * omit this parameter or use * or _all. *

* API name: {@code repository} */ @@ -137,8 +144,8 @@ public static class Builder extends RequestBase.AbstractBuilder private List name; /** - * Return local information, do not retrieve the state from master node - * (default: false) + * If true, the request gets information from the local node only. + * If false, the request gets information from the master node. *

* API name: {@code local} */ @@ -148,7 +155,9 @@ public final Builder local(@Nullable Boolean value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -158,7 +167,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -167,7 +178,12 @@ public final Builder masterTimeout(Function> f } /** - * A comma-separated list of repository names + * A comma-separated list of snapshot repository names used to limit the + * request. Wildcard (*) expressions are supported including + * combining wildcards with exclude patterns starting with -. + *

+ * To get information about all snapshot repositories registered in the cluster, + * omit this parameter or use * or _all. *

* API name: {@code repository} *

@@ -179,7 +195,12 @@ public final Builder name(List list) { } /** - * A comma-separated list of repository names + * A comma-separated list of snapshot repository names used to limit the + * request. Wildcard (*) expressions are supported including + * combining wildcards with exclude patterns starting with -. + *

+ * To get information about all snapshot repositories registered in the cluster, + * omit this parameter or use * or _all. *

* API name: {@code repository} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java index b62955a32..40aadc7c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java @@ -62,6 +62,13 @@ /** * Get snapshot information. + *

+ * NOTE: The after parameter and next field enable you + * to iterate through snapshots with some consistency guarantees regarding + * concurrent creation or deletion of snapshots. It is guaranteed that any + * snapshot that exists at the beginning of the iteration and is not + * concurrently deleted will be seen during the iteration. Snapshots + * concurrently created may be seen during an iteration. * * @see API * specification @@ -138,8 +145,8 @@ public static GetSnapshotRequest of(Function * API name: {@code after} */ @@ -149,10 +156,10 @@ public final String after() { } /** - * Value of the current sort column at which to start retrieval. Can either be a - * string snapshot- or repository name when sorting by snapshot or repository - * name, a millisecond time value or a number when sorting by index- or shard - * count. + * The value of the current sort column at which to start retrieval. It can be a + * string snapshot- or a repository name when sorting by snapshot + * or repository name. It can be a millisecond time value or a number when + * sorting by index- or shard count. *

* API name: {@code from_sort_value} */ @@ -162,8 +169,8 @@ public final String fromSortValue() { } /** - * If false, the request returns an error for any snapshots that are - * unavailable. + * If false, the request returns an error for any snapshots that + * are unavailable. *

* API name: {@code ignore_unavailable} */ @@ -173,7 +180,8 @@ public final Boolean ignoreUnavailable() { } /** - * If true, returns the repository name in each snapshot. + * If true, the response includes the repository name in each + * snapshot. *

* API name: {@code include_repository} */ @@ -183,10 +191,11 @@ public final Boolean includeRepository() { } /** - * If true, returns additional information about each index in the snapshot - * comprising the number of shards in the index, the total size of the index in - * bytes, and the maximum number of segments per shard in the index. Defaults to - * false, meaning that this information is omitted. + * If true, the response includes additional information about each + * index in the snapshot comprising the number of shards in the index, the total + * size of the index in bytes, and the maximum number of segments per shard in + * the index. The default is false, meaning that this information + * is omitted. *

* API name: {@code index_details} */ @@ -196,7 +205,8 @@ public final Boolean indexDetails() { } /** - * If true, returns the name of each index in each snapshot. + * If true, the response includes the name of each index in each + * snapshot. *

* API name: {@code index_names} */ @@ -206,7 +216,7 @@ public final Boolean indexNames() { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -229,8 +239,9 @@ public final Integer offset() { } /** - * Sort order. Valid values are asc for ascending and desc for descending order. - * Defaults to asc, meaning ascending order. + * The sort order. Valid values are asc for ascending and + * desc for descending order. The default behavior is ascending + * order. *

* API name: {@code order} */ @@ -240,8 +251,8 @@ public final SortOrder order() { } /** - * Required - Comma-separated list of snapshot repository names used to limit - * the request. Wildcard (*) expressions are supported. + * Required - A comma-separated list of snapshot repository names used to limit + * the request. Wildcard (*) expressions are supported. *

* API name: {@code repository} */ @@ -250,8 +261,8 @@ public final String repository() { } /** - * Maximum number of snapshots to return. Defaults to 0 which means return all - * that match the request without limit. + * The maximum number of snapshots to return. The default is 0, which means to + * return all that match the request without limit. *

* API name: {@code size} */ @@ -261,11 +272,18 @@ public final Integer size() { } /** - * Filter snapshots by a comma-separated list of SLM policy names that snapshots - * belong to. Also accepts wildcards (*) and combinations of wildcards followed - * by exclude patterns starting with -. To include snapshots not created by an - * SLM policy you can use the special pattern _none that will match all - * snapshots without an SLM policy. + * Filter snapshots by a comma-separated list of snapshot lifecycle management + * (SLM) policy names that snapshots belong to. + *

+ * You can use wildcards (*) and combinations of wildcards followed + * by exclude patterns starting with -. For example, the pattern + * *,-policy-a-\* will return all snapshots except for those that + * were created by an SLM policy with a name starting with + * policy-a-. Note that the wildcard pattern * matches + * all snapshots created by an SLM policy but not those snapshots that were not + * created by an SLM policy. To include snapshots that were not created by an + * SLM policy, you can use the special pattern _none that will + * match all snapshots without an SLM policy. *

* API name: {@code slm_policy_filter} */ @@ -275,13 +293,13 @@ public final String slmPolicyFilter() { } /** - * Required - Comma-separated list of snapshot names to retrieve. Also accepts - * wildcards (*). + * Required - A comma-separated list of snapshot names to retrieve Wildcards + * (*) are supported. *

    *
  • To get information about all snapshots in a registered repository, use a - * wildcard (*) or _all.
  • + * wildcard (*) or _all. *
  • To get information about any snapshots that are currently running, use - * _current.
  • + * _current. *
*

* API name: {@code snapshot} @@ -291,8 +309,8 @@ public final List snapshot() { } /** - * Allows setting a sort order for the result. Defaults to start_time, i.e. - * sorting by snapshot start time stamp. + * The sort order for the result. The default behavior is sorting by snapshot + * start time stamp. *

* API name: {@code sort} */ @@ -302,9 +320,15 @@ public final SnapshotSort sort() { } /** - * If true, returns additional information about each snapshot such as the - * version of Elasticsearch which took the snapshot, the start and end times of - * the snapshot, and the number of shards snapshotted. + * If true, returns additional information about each snapshot such + * as the version of Elasticsearch which took the snapshot, the start and end + * times of the snapshot, and the number of shards snapshotted. + *

+ * NOTE: The parameters size, order, + * after, from_sort_value, offset, + * slm_policy_filter, and sort are not supported when + * you set verbose=false and the sort order for requests with + * verbose=false is undefined. *

* API name: {@code verbose} */ @@ -366,8 +390,8 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean verbose; /** - * Offset identifier to start pagination from as returned by the next field in - * the response body. + * An offset identifier to start pagination from as returned by the next field + * in the response body. *

* API name: {@code after} */ @@ -377,10 +401,10 @@ public final Builder after(@Nullable String value) { } /** - * Value of the current sort column at which to start retrieval. Can either be a - * string snapshot- or repository name when sorting by snapshot or repository - * name, a millisecond time value or a number when sorting by index- or shard - * count. + * The value of the current sort column at which to start retrieval. It can be a + * string snapshot- or a repository name when sorting by snapshot + * or repository name. It can be a millisecond time value or a number when + * sorting by index- or shard count. *

* API name: {@code from_sort_value} */ @@ -390,8 +414,8 @@ public final Builder fromSortValue(@Nullable String value) { } /** - * If false, the request returns an error for any snapshots that are - * unavailable. + * If false, the request returns an error for any snapshots that + * are unavailable. *

* API name: {@code ignore_unavailable} */ @@ -401,7 +425,8 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * If true, returns the repository name in each snapshot. + * If true, the response includes the repository name in each + * snapshot. *

* API name: {@code include_repository} */ @@ -411,10 +436,11 @@ public final Builder includeRepository(@Nullable Boolean value) { } /** - * If true, returns additional information about each index in the snapshot - * comprising the number of shards in the index, the total size of the index in - * bytes, and the maximum number of segments per shard in the index. Defaults to - * false, meaning that this information is omitted. + * If true, the response includes additional information about each + * index in the snapshot comprising the number of shards in the index, the total + * size of the index in bytes, and the maximum number of segments per shard in + * the index. The default is false, meaning that this information + * is omitted. *

* API name: {@code index_details} */ @@ -424,7 +450,8 @@ public final Builder indexDetails(@Nullable Boolean value) { } /** - * If true, returns the name of each index in each snapshot. + * If true, the response includes the name of each index in each + * snapshot. *

* API name: {@code index_names} */ @@ -434,7 +461,7 @@ public final Builder indexNames(@Nullable Boolean value) { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -445,7 +472,7 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Period to wait for a connection to the master node. If no response is + * The period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. *

* API name: {@code master_timeout} @@ -467,8 +494,9 @@ public final Builder offset(@Nullable Integer value) { } /** - * Sort order. Valid values are asc for ascending and desc for descending order. - * Defaults to asc, meaning ascending order. + * The sort order. Valid values are asc for ascending and + * desc for descending order. The default behavior is ascending + * order. *

* API name: {@code order} */ @@ -478,8 +506,8 @@ public final Builder order(@Nullable SortOrder value) { } /** - * Required - Comma-separated list of snapshot repository names used to limit - * the request. Wildcard (*) expressions are supported. + * Required - A comma-separated list of snapshot repository names used to limit + * the request. Wildcard (*) expressions are supported. *

* API name: {@code repository} */ @@ -489,8 +517,8 @@ public final Builder repository(String value) { } /** - * Maximum number of snapshots to return. Defaults to 0 which means return all - * that match the request without limit. + * The maximum number of snapshots to return. The default is 0, which means to + * return all that match the request without limit. *

* API name: {@code size} */ @@ -500,11 +528,18 @@ public final Builder size(@Nullable Integer value) { } /** - * Filter snapshots by a comma-separated list of SLM policy names that snapshots - * belong to. Also accepts wildcards (*) and combinations of wildcards followed - * by exclude patterns starting with -. To include snapshots not created by an - * SLM policy you can use the special pattern _none that will match all - * snapshots without an SLM policy. + * Filter snapshots by a comma-separated list of snapshot lifecycle management + * (SLM) policy names that snapshots belong to. + *

+ * You can use wildcards (*) and combinations of wildcards followed + * by exclude patterns starting with -. For example, the pattern + * *,-policy-a-\* will return all snapshots except for those that + * were created by an SLM policy with a name starting with + * policy-a-. Note that the wildcard pattern * matches + * all snapshots created by an SLM policy but not those snapshots that were not + * created by an SLM policy. To include snapshots that were not created by an + * SLM policy, you can use the special pattern _none that will + * match all snapshots without an SLM policy. *

* API name: {@code slm_policy_filter} */ @@ -514,13 +549,13 @@ public final Builder slmPolicyFilter(@Nullable String value) { } /** - * Required - Comma-separated list of snapshot names to retrieve. Also accepts - * wildcards (*). + * Required - A comma-separated list of snapshot names to retrieve Wildcards + * (*) are supported. *

    *
  • To get information about all snapshots in a registered repository, use a - * wildcard (*) or _all.
  • + * wildcard (*) or _all. *
  • To get information about any snapshots that are currently running, use - * _current.
  • + * _current. *
*

* API name: {@code snapshot} @@ -533,13 +568,13 @@ public final Builder snapshot(List list) { } /** - * Required - Comma-separated list of snapshot names to retrieve. Also accepts - * wildcards (*). + * Required - A comma-separated list of snapshot names to retrieve Wildcards + * (*) are supported. *

    *
  • To get information about all snapshots in a registered repository, use a - * wildcard (*) or _all.
  • + * wildcard (*) or _all. *
  • To get information about any snapshots that are currently running, use - * _current.
  • + * _current. *
*

* API name: {@code snapshot} @@ -552,8 +587,8 @@ public final Builder snapshot(String value, String... values) { } /** - * Allows setting a sort order for the result. Defaults to start_time, i.e. - * sorting by snapshot start time stamp. + * The sort order for the result. The default behavior is sorting by snapshot + * start time stamp. *

* API name: {@code sort} */ @@ -563,9 +598,15 @@ public final Builder sort(@Nullable SnapshotSort value) { } /** - * If true, returns additional information about each snapshot such as the - * version of Elasticsearch which took the snapshot, the start and end times of - * the snapshot, and the number of shards snapshotted. + * If true, returns additional information about each snapshot such + * as the version of Elasticsearch which took the snapshot, the start and end + * times of the snapshot, and the number of shards snapshotted. + *

+ * NOTE: The parameters size, order, + * after, from_sort_value, offset, + * slm_policy_filter, and sort are not supported when + * you set verbose=false and the sort order for requests with + * verbose=false is undefined. *

* API name: {@code verbose} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotResponse.java index 032f3a908..61dc99338 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotResponse.java @@ -32,6 +32,7 @@ import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.String; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -61,22 +62,26 @@ */ @JsonpDeserializable public class GetSnapshotResponse implements JsonpSerializable { - private final List responses; - - private final List snapshots; + private final int remaining; private final int total; - private final int remaining; + @Nullable + private final String next; + + private final List responses; + + private final List snapshots; // --------------------------------------------------------------------------------------------- private GetSnapshotResponse(Builder builder) { + this.remaining = ApiTypeHelper.requireNonNull(builder.remaining, this, "remaining", 0); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0); + this.next = builder.next; this.responses = ApiTypeHelper.unmodifiable(builder.responses); this.snapshots = ApiTypeHelper.unmodifiable(builder.snapshots); - this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0); - this.remaining = ApiTypeHelper.requireNonNull(builder.remaining, this, "remaining", 0); } @@ -85,22 +90,19 @@ public static GetSnapshotResponse of(Function responses() { - return this.responses; - } - - /** - * API name: {@code snapshots} + * Required - The number of remaining snapshots that were not returned due to + * size limits and that can be fetched by additional requests using the + * next field value. + *

+ * API name: {@code remaining} */ - public final List snapshots() { - return this.snapshots; + public final int remaining() { + return this.remaining; } /** * Required - The total number of snapshots that match the request when ignoring - * size limit or after query parameter. + * the size limit or after query parameter. *

* API name: {@code total} */ @@ -109,14 +111,29 @@ public final int total() { } /** - * Required - The number of remaining snapshots that were not returned due to - * size limits and that can be fetched by additional requests using the next - * field value. + * If the request contained a size limit and there might be more results, a + * next field will be added to the response. It can be used as the + * after query parameter to fetch additional results. *

- * API name: {@code remaining} + * API name: {@code next} */ - public final int remaining() { - return this.remaining; + @Nullable + public final String next() { + return this.next; + } + + /** + * API name: {@code responses} + */ + public final List responses() { + return this.responses; + } + + /** + * API name: {@code snapshots} + */ + public final List snapshots() { + return this.snapshots; } /** @@ -130,6 +147,17 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeKey("remaining"); + generator.write(this.remaining); + + generator.writeKey("total"); + generator.write(this.total); + + if (this.next != null) { + generator.writeKey("next"); + generator.write(this.next); + + } if (ApiTypeHelper.isDefined(this.responses)) { generator.writeKey("responses"); generator.writeStartArray(); @@ -150,11 +178,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - generator.writeKey("total"); - generator.write(this.total); - - generator.writeKey("remaining"); - generator.write(this.remaining); } @@ -172,15 +195,53 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Integer remaining; + + private Integer total; + + @Nullable + private String next; + @Nullable private List responses; @Nullable private List snapshots; - private Integer total; + /** + * Required - The number of remaining snapshots that were not returned due to + * size limits and that can be fetched by additional requests using the + * next field value. + *

+ * API name: {@code remaining} + */ + public final Builder remaining(int value) { + this.remaining = value; + return this; + } - private Integer remaining; + /** + * Required - The total number of snapshots that match the request when ignoring + * the size limit or after query parameter. + *

+ * API name: {@code total} + */ + public final Builder total(int value) { + this.total = value; + return this; + } + + /** + * If the request contained a size limit and there might be more results, a + * next field will be added to the response. It can be used as the + * after query parameter to fetch additional results. + *

+ * API name: {@code next} + */ + public final Builder next(@Nullable String value) { + this.next = value; + return this; + } /** * API name: {@code responses} @@ -240,29 +301,6 @@ public final Builder snapshots(Function - * API name: {@code total} - */ - public final Builder total(int value) { - this.total = value; - return this; - } - - /** - * Required - The number of remaining snapshots that were not returned due to - * size limits and that can be fetched by additional requests using the next - * field value. - *

- * API name: {@code remaining} - */ - public final Builder remaining(int value) { - this.remaining = value; - return this; - } - @Override protected Builder self() { return this; @@ -291,11 +329,12 @@ public GetSnapshotResponse build() { protected static void setupGetSnapshotResponseDeserializer(ObjectDeserializer op) { + op.add(Builder::remaining, JsonpDeserializer.integerDeserializer(), "remaining"); + op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); + op.add(Builder::next, JsonpDeserializer.stringDeserializer(), "next"); op.add(Builder::responses, JsonpDeserializer.arrayDeserializer(SnapshotResponseItem._DESERIALIZER), "responses"); op.add(Builder::snapshots, JsonpDeserializer.arrayDeserializer(SnapshotInfo._DESERIALIZER), "snapshots"); - op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total"); - op.add(Builder::remaining, JsonpDeserializer.integerDeserializer(), "remaining"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepository.java index 000230998..7a45f4faa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepository.java @@ -80,7 +80,9 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final ReadOnlyUrlRepositorySettings settings() { return this.settings; @@ -107,7 +109,9 @@ public static class Builder extends RepositoryBase.AbstractBuilder private ReadOnlyUrlRepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings(ReadOnlyUrlRepositorySettings value) { this.settings = value; @@ -115,7 +119,9 @@ public final Builder settings(ReadOnlyUrlRepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings( Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepositorySettings.java index 1383a93af..ff2e01c03 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ReadOnlyUrlRepositorySettings.java @@ -87,6 +87,8 @@ public static ReadOnlyUrlRepositorySettings of(Function * API name: {@code http_max_retries} */ @Nullable @@ -95,6 +97,8 @@ public final Integer httpMaxRetries() { } /** + * The maximum wait time for data transfers over a connection. + *

* API name: {@code http_socket_timeout} */ @Nullable @@ -103,6 +107,9 @@ public final Time httpSocketTimeout() { } /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ @Nullable @@ -111,7 +118,28 @@ public final Integer maxNumberOfSnapshots() { } /** - * Required - API name: {@code url} + * Required - The URL location of the root of the shared filesystem repository. + * The following protocols are supported: + *

    + *
  • file
  • + *
  • ftp
  • + *
  • http
  • + *
  • https
  • + *
  • jar
  • + *
+ *

+ * URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with + * the repositories.url.allowed_urls cluster setting. This setting + * supports wildcards in the place of a host, path, query, or fragment in the + * URL. + *

+ * URLs using the file protocol must point to the location of a shared + * filesystem accessible to all master and data nodes in the cluster. This + * location must be registered in the path.repo setting. You don't + * need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the + * path.repo setting. + *

+ * API name: {@code url} */ public final String url() { return this.url; @@ -161,6 +189,8 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilder * API name: {@code http_max_retries} */ public final Builder httpMaxRetries(@Nullable Integer value) { @@ -169,6 +199,8 @@ public final Builder httpMaxRetries(@Nullable Integer value) { } /** + * The maximum wait time for data transfers over a connection. + *

* API name: {@code http_socket_timeout} */ public final Builder httpSocketTimeout(@Nullable Time value) { @@ -177,6 +209,8 @@ public final Builder httpSocketTimeout(@Nullable Time value) { } /** + * The maximum wait time for data transfers over a connection. + *

* API name: {@code http_socket_timeout} */ public final Builder httpSocketTimeout(Function> fn) { @@ -184,6 +218,9 @@ public final Builder httpSocketTimeout(FunctionInteger.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { @@ -192,7 +229,28 @@ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { } /** - * Required - API name: {@code url} + * Required - The URL location of the root of the shared filesystem repository. + * The following protocols are supported: + *

    + *
  • file
  • + *
  • ftp
  • + *
  • http
  • + *
  • https
  • + *
  • jar
  • + *
+ *

+ * URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with + * the repositories.url.allowed_urls cluster setting. This setting + * supports wildcards in the place of a host, path, query, or fragment in the + * URL. + *

+ * URLs using the file protocol must point to the location of a shared + * filesystem accessible to all master and data nodes in the cluster. This + * location must be registered in the path.repo setting. You don't + * need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the + * path.repo setting. + *

+ * API name: {@code url} */ public final Builder url(String value) { this.url = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositorySettingsBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositorySettingsBase.java index 772913e94..2c7a05eb6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositorySettingsBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositorySettingsBase.java @@ -83,6 +83,16 @@ protected RepositorySettingsBase(AbstractBuilder builder) { } /** + * Big files can be broken down into multiple smaller blobs in the blob store + * during snapshotting. It is not recommended to change this value from its + * default unless there is an explicit reason for limiting the size of blobs in + * the repository. Setting a value lower than the default can result in an + * increased number of API calls to the blob store during snapshot create and + * restore operations compared to using the default value and thus make both + * operations slower and more costly. Specify the chunk size as a byte unit, for + * example: 10MB, 5KB, 500B. The default varies by + * repository type. + *

* API name: {@code chunk_size} */ @Nullable @@ -91,6 +101,10 @@ public final String chunkSize() { } /** + * When set to true, metadata files are stored in compressed + * format. This setting doesn't affect index files that are already compressed + * by default. + *

* API name: {@code compress} */ @Nullable @@ -99,6 +113,9 @@ public final Boolean compress() { } /** + * The maximum snapshot restore rate per node. It defaults to unlimited. Note + * that restores are also throttled through recovery settings. + *

* API name: {@code max_restore_bytes_per_sec} */ @Nullable @@ -107,6 +124,11 @@ public final String maxRestoreBytesPerSec() { } /** + * The maximum snapshot creation rate per node. It defaults to 40mb per second. + * Note that if the recovery settings for managed services are set, then it + * defaults to unlimited, and the rate is additionally throttled through + * recovery settings. + *

* API name: {@code max_snapshot_bytes_per_sec} */ @Nullable @@ -169,6 +191,16 @@ public abstract static class AbstractBuilder10MB, 5KB, 500B. The default varies by + * repository type. + *

* API name: {@code chunk_size} */ public final BuilderT chunkSize(@Nullable String value) { @@ -177,6 +209,10 @@ public final BuilderT chunkSize(@Nullable String value) { } /** + * When set to true, metadata files are stored in compressed + * format. This setting doesn't affect index files that are already compressed + * by default. + *

* API name: {@code compress} */ public final BuilderT compress(@Nullable Boolean value) { @@ -185,6 +221,9 @@ public final BuilderT compress(@Nullable Boolean value) { } /** + * The maximum snapshot restore rate per node. It defaults to unlimited. Note + * that restores are also throttled through recovery settings. + *

* API name: {@code max_restore_bytes_per_sec} */ public final BuilderT maxRestoreBytesPerSec(@Nullable String value) { @@ -193,6 +232,11 @@ public final BuilderT maxRestoreBytesPerSec(@Nullable String value) { } /** + * The maximum snapshot creation rate per node. It defaults to 40mb per second. + * Note that if the recovery settings for managed services are set, then it + * defaults to unlimited, and the rate is additionally throttled through + * recovery settings. + *

* API name: {@code max_snapshot_bytes_per_sec} */ public final BuilderT maxSnapshotBytesPerSec(@Nullable String value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryVerifyIntegrityRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryVerifyIntegrityRequest.java index 632463a4e..854abf37d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryVerifyIntegrityRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryVerifyIntegrityRequest.java @@ -109,6 +109,20 @@ * the request parameters and the response format to vary in future versions. *

* NOTE: This API may not work correctly in a mixed-version cluster. + *

+ * The default values for the parameters of this API are designed to limit the + * impact of the integrity verification on other activities in your cluster. For + * instance, by default it will only use at most half of the + * snapshot_meta threads to verify the integrity of each snapshot, + * allowing other snapshot operations to use the other half of this thread pool. + * If you modify these parameters to speed up the verification process, you risk + * disrupting other snapshot-related operations in your cluster. For large + * repositories, consider setting up a separate single-node Elasticsearch + * cluster just for running the integrity verification API. + *

+ * The response exposes implementation details of the analysis which may change + * from version to version. The response body format is therefore not considered + * stable and may be different in newer versions. * * @see API @@ -164,7 +178,8 @@ public static RepositoryVerifyIntegrityRequest of( } /** - * Number of threads to use for reading blob contents + * If verify_blob_contents is true, this parameter + * specifies how many blobs to verify at once. *

* API name: {@code blob_thread_pool_concurrency} */ @@ -174,7 +189,8 @@ public final Integer blobThreadPoolConcurrency() { } /** - * Number of snapshots to verify concurrently within each index + * The maximum number of index snapshots to verify concurrently within each + * index verification. *

* API name: {@code index_snapshot_verification_concurrency} */ @@ -184,7 +200,8 @@ public final Integer indexSnapshotVerificationConcurrency() { } /** - * Number of indices to verify concurrently + * The number of indices to verify concurrently. The default behavior is to use + * the entire snapshot_meta thread pool. *

* API name: {@code index_verification_concurrency} */ @@ -194,7 +211,9 @@ public final Integer indexVerificationConcurrency() { } /** - * Rate limit for individual blob verification + * If verify_blob_contents is true, this parameter + * specifies the maximum amount of data that Elasticsearch will read from the + * repository every second. *

* API name: {@code max_bytes_per_sec} */ @@ -204,7 +223,9 @@ public final String maxBytesPerSec() { } /** - * Maximum permitted number of failed shard snapshots + * The number of shard snapshot failures to track during integrity verification, + * in order to avoid excessive resource usage. If your repository contains more + * than this number of shard snapshot failures, the verification will fail. *

* API name: {@code max_failed_shard_snapshots} */ @@ -214,7 +235,9 @@ public final Integer maxFailedShardSnapshots() { } /** - * Number of threads to use for reading metadata + * The maximum number of snapshot metadata operations to run concurrently. The + * default behavior is to use at most half of the snapshot_meta + * thread pool at once. *

* API name: {@code meta_thread_pool_concurrency} */ @@ -224,7 +247,7 @@ public final Integer metaThreadPoolConcurrency() { } /** - * Required - A repository name + * Required - The name of the snapshot repository. *

* API name: {@code repository} */ @@ -233,7 +256,8 @@ public final List name() { } /** - * Number of snapshots to verify concurrently + * The number of snapshots to verify concurrently. The default behavior is to + * use at most half of the snapshot_meta thread pool at once. *

* API name: {@code snapshot_verification_concurrency} */ @@ -243,7 +267,9 @@ public final Integer snapshotVerificationConcurrency() { } /** - * Whether to verify the contents of individual blobs + * Indicates whether to verify the checksum of every data blob in the + * repository. If this feature is enabled, Elasticsearch will read the entire + * repository contents, which may be extremely slow and expensive. *

* API name: {@code verify_blob_contents} */ @@ -288,7 +314,8 @@ public static class Builder extends RequestBase.AbstractBuilder private Boolean verifyBlobContents; /** - * Number of threads to use for reading blob contents + * If verify_blob_contents is true, this parameter + * specifies how many blobs to verify at once. *

* API name: {@code blob_thread_pool_concurrency} */ @@ -298,7 +325,8 @@ public final Builder blobThreadPoolConcurrency(@Nullable Integer value) { } /** - * Number of snapshots to verify concurrently within each index + * The maximum number of index snapshots to verify concurrently within each + * index verification. *

* API name: {@code index_snapshot_verification_concurrency} */ @@ -308,7 +336,8 @@ public final Builder indexSnapshotVerificationConcurrency(@Nullable Integer valu } /** - * Number of indices to verify concurrently + * The number of indices to verify concurrently. The default behavior is to use + * the entire snapshot_meta thread pool. *

* API name: {@code index_verification_concurrency} */ @@ -318,7 +347,9 @@ public final Builder indexVerificationConcurrency(@Nullable Integer value) { } /** - * Rate limit for individual blob verification + * If verify_blob_contents is true, this parameter + * specifies the maximum amount of data that Elasticsearch will read from the + * repository every second. *

* API name: {@code max_bytes_per_sec} */ @@ -328,7 +359,9 @@ public final Builder maxBytesPerSec(@Nullable String value) { } /** - * Maximum permitted number of failed shard snapshots + * The number of shard snapshot failures to track during integrity verification, + * in order to avoid excessive resource usage. If your repository contains more + * than this number of shard snapshot failures, the verification will fail. *

* API name: {@code max_failed_shard_snapshots} */ @@ -338,7 +371,9 @@ public final Builder maxFailedShardSnapshots(@Nullable Integer value) { } /** - * Number of threads to use for reading metadata + * The maximum number of snapshot metadata operations to run concurrently. The + * default behavior is to use at most half of the snapshot_meta + * thread pool at once. *

* API name: {@code meta_thread_pool_concurrency} */ @@ -348,7 +383,7 @@ public final Builder metaThreadPoolConcurrency(@Nullable Integer value) { } /** - * Required - A repository name + * Required - The name of the snapshot repository. *

* API name: {@code repository} *

@@ -360,7 +395,7 @@ public final Builder name(List list) { } /** - * Required - A repository name + * Required - The name of the snapshot repository. *

* API name: {@code repository} *

@@ -372,7 +407,8 @@ public final Builder name(String value, String... values) { } /** - * Number of snapshots to verify concurrently + * The number of snapshots to verify concurrently. The default behavior is to + * use at most half of the snapshot_meta thread pool at once. *

* API name: {@code snapshot_verification_concurrency} */ @@ -382,7 +418,9 @@ public final Builder snapshotVerificationConcurrency(@Nullable Integer value) { } /** - * Whether to verify the contents of individual blobs + * Indicates whether to verify the checksum of every data blob in the + * repository. If this feature is enabled, Elasticsearch will read the entire + * repository contents, which may be extremely slow and expensive. *

* API name: {@code verify_blob_contents} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java index 509e7f8a9..877c5d012 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java @@ -156,6 +156,15 @@ public static RestoreRequest of(Function> } /** + * The feature states to restore. If include_global_state is + * true, the request restores all feature states in the snapshot by + * default. If include_global_state is false, the + * request restores no feature states by default. Note that specifying an empty + * array will result in the default behavior. To restore no feature states, + * regardless of the include_global_state value, specify an array + * containing only the value none + * (["none"]). + *

* API name: {@code feature_states} */ public final List featureStates() { @@ -163,6 +172,13 @@ public final List featureStates() { } /** + * The index settings to not restore from the snapshot. You can't use this + * option to ignore index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code ignore_index_settings} */ public final List ignoreIndexSettings() { @@ -170,6 +186,10 @@ public final List ignoreIndexSettings() { } /** + * If true, the request ignores any index or data stream in indices + * that's missing from the snapshot. If false, the request returns + * an error for any missing index or data stream. + *

* API name: {@code ignore_unavailable} */ @Nullable @@ -178,6 +198,10 @@ public final Boolean ignoreUnavailable() { } /** + * If true, the request restores aliases for any restored data + * streams and indices. If false, the request doesn’t restore + * aliases. + *

* API name: {@code include_aliases} */ @Nullable @@ -186,6 +210,31 @@ public final Boolean includeAliases() { } /** + * If true, restore the cluster state. The cluster state includes: + *

+ *

+ * If include_global_state is true, the restore + * operation merges the legacy index templates in your cluster with the + * templates contained in the snapshot, replacing any existing ones whose name + * matches one in the snapshot. It completely removes all persistent settings, + * non-legacy index templates, ingest pipelines, and ILM lifecycle policies that + * exist in your cluster and replaces them with the corresponding items from the + * snapshot. + *

+ * Use the feature_states parameter to configure how feature states + * are restored. + *

+ * If include_global_state is true and a snapshot was + * created without a global state then the restore request will fail. + *

* API name: {@code include_global_state} */ @Nullable @@ -194,6 +243,14 @@ public final Boolean includeGlobalState() { } /** + * Index settings to add or change in restored indices, including backing + * indices. You can't use this option to change + * index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code index_settings} */ @Nullable @@ -202,6 +259,13 @@ public final IndexSettings indexSettings() { } /** + * A comma-separated list of indices and data streams to restore. It supports a + * multi-target syntax. The default behavior is all regular indices and regular + * data streams in the snapshot. + *

+ * You can't use this parameter to restore system indices or system data + * streams. Use feature_states instead. + *

* API name: {@code indices} */ public final List indices() { @@ -209,7 +273,9 @@ public final List indices() { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -219,6 +285,13 @@ public final Time masterTimeout() { } /** + * If false, the entire restore operation will fail if one or more + * indices included in the snapshot do not have all primary shards available. + *

+ * If true, it allows restoring a partial snapshot of indices with unavailable + * shards. Only shards that were successfully included in the snapshot will be + * restored. All missing shards will be recreated as empty. + *

* API name: {@code partial} */ @Nullable @@ -227,6 +300,14 @@ public final Boolean partial() { } /** + * A rename pattern to apply to restored data streams and indices. Data streams + * and indices matching the rename pattern will be renamed according to + * rename_replacement. + *

+ * The rename pattern is applied as defined by the regular expression that + * supports referencing the original text, according to the + * appendReplacement logic. + *

* API name: {@code rename_pattern} */ @Nullable @@ -235,6 +316,9 @@ public final String renamePattern() { } /** + * The rename replacement string that is used with the + * rename_pattern. + *

* API name: {@code rename_replacement} */ @Nullable @@ -243,7 +327,7 @@ public final String renameReplacement() { } /** - * Required - A repository name + * Required - The name of the repository to restore a snapshot from. *

* API name: {@code repository} */ @@ -252,7 +336,7 @@ public final String repository() { } /** - * Required - A snapshot name + * Required - The name of the snapshot to restore. *

* API name: {@code snapshot} */ @@ -261,7 +345,13 @@ public final String snapshot() { } /** - * Should this request wait until the operation has completed before returning + * If true, the request returns a response when the restore + * operation completes. The operation is complete when it finishes all attempts + * to recover primary shards for restored indices. This applies even if one or + * more of the recovery attempts fail. + *

+ * If false, the request returns a response when the restore + * operation initializes. *

* API name: {@code wait_for_completion} */ @@ -397,6 +487,15 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Boolean waitForCompletion; /** + * The feature states to restore. If include_global_state is + * true, the request restores all feature states in the snapshot by + * default. If include_global_state is false, the + * request restores no feature states by default. Note that specifying an empty + * array will result in the default behavior. To restore no feature states, + * regardless of the include_global_state value, specify an array + * containing only the value none + * (["none"]). + *

* API name: {@code feature_states} *

* Adds all elements of list to featureStates. @@ -407,6 +506,15 @@ public final Builder featureStates(List list) { } /** + * The feature states to restore. If include_global_state is + * true, the request restores all feature states in the snapshot by + * default. If include_global_state is false, the + * request restores no feature states by default. Note that specifying an empty + * array will result in the default behavior. To restore no feature states, + * regardless of the include_global_state value, specify an array + * containing only the value none + * (["none"]). + *

* API name: {@code feature_states} *

* Adds one or more values to featureStates. @@ -417,6 +525,13 @@ public final Builder featureStates(String value, String... values) { } /** + * The index settings to not restore from the snapshot. You can't use this + * option to ignore index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code ignore_index_settings} *

* Adds all elements of list to ignoreIndexSettings. @@ -427,6 +542,13 @@ public final Builder ignoreIndexSettings(List list) { } /** + * The index settings to not restore from the snapshot. You can't use this + * option to ignore index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code ignore_index_settings} *

* Adds one or more values to ignoreIndexSettings. @@ -437,6 +559,10 @@ public final Builder ignoreIndexSettings(String value, String... values) { } /** + * If true, the request ignores any index or data stream in indices + * that's missing from the snapshot. If false, the request returns + * an error for any missing index or data stream. + *

* API name: {@code ignore_unavailable} */ public final Builder ignoreUnavailable(@Nullable Boolean value) { @@ -445,6 +571,10 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** + * If true, the request restores aliases for any restored data + * streams and indices. If false, the request doesn’t restore + * aliases. + *

* API name: {@code include_aliases} */ public final Builder includeAliases(@Nullable Boolean value) { @@ -453,6 +583,31 @@ public final Builder includeAliases(@Nullable Boolean value) { } /** + * If true, restore the cluster state. The cluster state includes: + *

    + *
  • Persistent cluster settings
  • + *
  • Index templates
  • + *
  • Legacy index templates
  • + *
  • Ingest pipelines
  • + *
  • Index lifecycle management (ILM) policies
  • + *
  • Stored scripts
  • + *
  • For snapshots taken after 7.12.0, feature states
  • + *
+ *

+ * If include_global_state is true, the restore + * operation merges the legacy index templates in your cluster with the + * templates contained in the snapshot, replacing any existing ones whose name + * matches one in the snapshot. It completely removes all persistent settings, + * non-legacy index templates, ingest pipelines, and ILM lifecycle policies that + * exist in your cluster and replaces them with the corresponding items from the + * snapshot. + *

+ * Use the feature_states parameter to configure how feature states + * are restored. + *

+ * If include_global_state is true and a snapshot was + * created without a global state then the restore request will fail. + *

* API name: {@code include_global_state} */ public final Builder includeGlobalState(@Nullable Boolean value) { @@ -461,6 +616,14 @@ public final Builder includeGlobalState(@Nullable Boolean value) { } /** + * Index settings to add or change in restored indices, including backing + * indices. You can't use this option to change + * index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code index_settings} */ public final Builder indexSettings(@Nullable IndexSettings value) { @@ -469,6 +632,14 @@ public final Builder indexSettings(@Nullable IndexSettings value) { } /** + * Index settings to add or change in restored indices, including backing + * indices. You can't use this option to change + * index.number_of_shards. + *

+ * For data streams, this option applies only to restored backing indices. New + * backing indices are configured using the data stream's matching index + * template. + *

* API name: {@code index_settings} */ public final Builder indexSettings(Function> fn) { @@ -476,6 +647,13 @@ public final Builder indexSettings(Function + * You can't use this parameter to restore system indices or system data + * streams. Use feature_states instead. + *

* API name: {@code indices} *

* Adds all elements of list to indices. @@ -486,6 +664,13 @@ public final Builder indices(List list) { } /** + * A comma-separated list of indices and data streams to restore. It supports a + * multi-target syntax. The default behavior is all regular indices and regular + * data streams in the snapshot. + *

+ * You can't use this parameter to restore system indices or system data + * streams. Use feature_states instead. + *

* API name: {@code indices} *

* Adds one or more values to indices. @@ -496,7 +681,9 @@ public final Builder indices(String value, String... values) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -506,7 +693,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -515,6 +704,13 @@ public final Builder masterTimeout(Function> f } /** + * If false, the entire restore operation will fail if one or more + * indices included in the snapshot do not have all primary shards available. + *

+ * If true, it allows restoring a partial snapshot of indices with unavailable + * shards. Only shards that were successfully included in the snapshot will be + * restored. All missing shards will be recreated as empty. + *

* API name: {@code partial} */ public final Builder partial(@Nullable Boolean value) { @@ -523,6 +719,14 @@ public final Builder partial(@Nullable Boolean value) { } /** + * A rename pattern to apply to restored data streams and indices. Data streams + * and indices matching the rename pattern will be renamed according to + * rename_replacement. + *

+ * The rename pattern is applied as defined by the regular expression that + * supports referencing the original text, according to the + * appendReplacement logic. + *

* API name: {@code rename_pattern} */ public final Builder renamePattern(@Nullable String value) { @@ -531,6 +735,9 @@ public final Builder renamePattern(@Nullable String value) { } /** + * The rename replacement string that is used with the + * rename_pattern. + *

* API name: {@code rename_replacement} */ public final Builder renameReplacement(@Nullable String value) { @@ -539,7 +746,7 @@ public final Builder renameReplacement(@Nullable String value) { } /** - * Required - A repository name + * Required - The name of the repository to restore a snapshot from. *

* API name: {@code repository} */ @@ -549,7 +756,7 @@ public final Builder repository(String value) { } /** - * Required - A snapshot name + * Required - The name of the snapshot to restore. *

* API name: {@code snapshot} */ @@ -559,7 +766,13 @@ public final Builder snapshot(String value) { } /** - * Should this request wait until the operation has completed before returning + * If true, the request returns a response when the restore + * operation completes. The operation is complete when it finishes all attempts + * to recover primary shards for restored indices. This applies even if one or + * more of the recovery attempts fail. + *

+ * If false, the request returns a response when the restore + * operation initializes. *

* API name: {@code wait_for_completion} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3Repository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3Repository.java index 8e8e359a3..c0bd5c700 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3Repository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3Repository.java @@ -79,7 +79,16 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * NOTE: In addition to the specified settings, you can also use all non-secure + * client settings in the repository settings. In this case, the client settings + * found in the repository settings will be merged with those of the named + * client used by the repository. Conflicts between client and repository + * settings are resolved by the repository settings taking precedence over + * client settings. + *

+ * API name: {@code settings} */ public final S3RepositorySettings settings() { return this.settings; @@ -104,7 +113,16 @@ public static class Builder extends RepositoryBase.AbstractBuilder impl private S3RepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * NOTE: In addition to the specified settings, you can also use all non-secure + * client settings in the repository settings. In this case, the client settings + * found in the repository settings will be merged with those of the named + * client used by the repository. Conflicts between client and repository + * settings are resolved by the repository settings taking precedence over + * client settings. + *

+ * API name: {@code settings} */ public final Builder settings(S3RepositorySettings value) { this.settings = value; @@ -112,7 +130,16 @@ public final Builder settings(S3RepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * NOTE: In addition to the specified settings, you can also use all non-secure + * client settings in the repository settings. In this case, the client settings + * found in the repository settings will be merged with those of the named + * client used by the repository. Conflicts between client and repository + * settings are resolved by the repository settings taking precedence over + * client settings. + *

+ * API name: {@code settings} */ public final Builder settings(Function> fn) { return this.settings(fn.apply(new S3RepositorySettings.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3RepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3RepositorySettings.java index 3b1b6928c..f688f56b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3RepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/S3RepositorySettings.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.snapshot; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -28,6 +29,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -60,11 +62,29 @@ public class S3RepositorySettings extends RepositorySettingsBase { private final String bucket; + @Nullable + private final String basePath; + + @Nullable + private final String bufferSize; + + @Nullable + private final String cannedAcl; + @Nullable private final String client; @Nullable - private final String basePath; + private final Integer deleteObjectsMaxSize; + + @Nullable + private final Time getRegisterRetryDelay; + + @Nullable + private final Integer maxMultipartParts; + + @Nullable + private final Integer maxMultipartUploadCleanupSize; @Nullable private final Boolean readonly; @@ -73,13 +93,16 @@ public class S3RepositorySettings extends RepositorySettingsBase { private final Boolean serverSideEncryption; @Nullable - private final String bufferSize; + private final String storageClass; @Nullable - private final String cannedAcl; + private final Time throttledDeleteRetryDelayIncrement; @Nullable - private final String storageClass; + private final Time throttledDeleteRetryMaximumDelay; + + @Nullable + private final Integer throttledDeleteRetryMaximumNumberOfRetries; // --------------------------------------------------------------------------------------------- @@ -87,13 +110,20 @@ private S3RepositorySettings(Builder builder) { super(builder); this.bucket = ApiTypeHelper.requireNonNull(builder.bucket, this, "bucket"); - this.client = builder.client; this.basePath = builder.basePath; - this.readonly = builder.readonly; - this.serverSideEncryption = builder.serverSideEncryption; this.bufferSize = builder.bufferSize; this.cannedAcl = builder.cannedAcl; + this.client = builder.client; + this.deleteObjectsMaxSize = builder.deleteObjectsMaxSize; + this.getRegisterRetryDelay = builder.getRegisterRetryDelay; + this.maxMultipartParts = builder.maxMultipartParts; + this.maxMultipartUploadCleanupSize = builder.maxMultipartUploadCleanupSize; + this.readonly = builder.readonly; + this.serverSideEncryption = builder.serverSideEncryption; this.storageClass = builder.storageClass; + this.throttledDeleteRetryDelayIncrement = builder.throttledDeleteRetryDelayIncrement; + this.throttledDeleteRetryMaximumDelay = builder.throttledDeleteRetryMaximumDelay; + this.throttledDeleteRetryMaximumNumberOfRetries = builder.throttledDeleteRetryMaximumNumberOfRetries; } @@ -102,13 +132,70 @@ public static S3RepositorySettings of(Function + * API name: {@code bucket} */ public final String bucket() { return this.bucket; } /** + * The path to the repository data within its bucket. It defaults to an empty + * string, meaning that the repository is at the root of the bucket. The value + * of this setting should not start or end with a forward slash + * (/). + *

+ * NOTE: Don't set base_path when configuring a snapshot repository for Elastic + * Cloud Enterprise. Elastic Cloud Enterprise automatically generates the + * base_path for each deployment so that multiple deployments may + * share the same bucket. + *

+ * API name: {@code base_path} + */ + @Nullable + public final String basePath() { + return this.basePath; + } + + /** + * The minimum threshold below which the chunk is uploaded using a single + * request. Beyond this threshold, the S3 repository will use the AWS Multipart + * Upload API to split the chunk into several parts, each of + * buffer_size length, and to upload each part in its own request. + * Note that setting a buffer size lower than 5mb is not allowed since it will + * prevent the use of the Multipart API and may result in upload errors. It is + * also not possible to set a buffer size greater than 5gb as it is the maximum + * upload size allowed by S3. Defaults to 100mb or 5% of JVM heap, + * whichever is smaller. + *

+ * API name: {@code buffer_size} + */ + @Nullable + public final String bufferSize() { + return this.bufferSize; + } + + /** + * The S3 repository supports all S3 canned ACLs: private, + * public-read, public-read-write, + * authenticated-read, log-delivery-write, + * bucket-owner-read, bucket-owner-full-control. You + * could specify a canned ACL using the canned_acl setting. When + * the S3 repository creates buckets and objects, it adds the canned ACL into + * the buckets and objects. + *

+ * API name: {@code canned_acl} + */ + @Nullable + public final String cannedAcl() { + return this.cannedAcl; + } + + /** + * The name of the S3 client to use to connect to S3. + *

* API name: {@code client} */ @Nullable @@ -117,14 +204,74 @@ public final String client() { } /** - * API name: {@code base_path} + * The maxmimum batch size, between 1 and 1000, used for + * DeleteObjects requests. Defaults to 1000 which is the maximum + * number supported by the AWS DeleteObjects API. + *

+ * API name: {@code delete_objects_max_size} */ @Nullable - public final String basePath() { - return this.basePath; + public final Integer deleteObjectsMaxSize() { + return this.deleteObjectsMaxSize; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

+ * API name: {@code get_register_retry_delay} + */ + @Nullable + public final Time getRegisterRetryDelay() { + return this.getRegisterRetryDelay; + } + + /** + * The maximum number of parts that Elasticsearch will write during a multipart + * upload of a single object. Files which are larger than + * buffer_size × max_multipart_parts will be chunked into several + * smaller objects. Elasticsearch may also split a file across multiple objects + * to satisfy other constraints such as the chunk_size limit. + * Defaults to 10000 which is the maximum number of parts in a + * multipart upload in AWS S3. + *

+ * API name: {@code max_multipart_parts} + */ + @Nullable + public final Integer maxMultipartParts() { + return this.maxMultipartParts; + } + + /** + * The maximum number of possibly-dangling multipart uploads to clean up in each + * batch of snapshot deletions. Defaults to 1000 which is the maximum number + * supported by the AWS ListMultipartUploads API. If set to 0, + * Elasticsearch will not attempt to clean up dangling multipart uploads. + *

+ * API name: {@code max_multipart_upload_cleanup_size} + */ + @Nullable + public final Integer maxMultipartUploadCleanupSize() { + return this.maxMultipartUploadCleanupSize; } /** + * If true, the repository is read-only. The cluster can retrieve and restore + * snapshots from the repository but not write to the repository or create + * snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code readonly} */ @Nullable @@ -133,6 +280,9 @@ public final Boolean readonly() { } /** + * When set to true, files are encrypted on server side using an + * AES256 algorithm. + *

* API name: {@code server_side_encryption} */ @Nullable @@ -141,27 +291,51 @@ public final Boolean serverSideEncryption() { } /** - * API name: {@code buffer_size} + * The S3 storage class for objects written to the repository. Values may be + * standard, reduced_redundancy, + * standard_ia, onezone_ia, and + * intelligent_tiering. + *

+ * API name: {@code storage_class} */ @Nullable - public final String bufferSize() { - return this.bufferSize; + public final String storageClass() { + return this.storageClass; } /** - * API name: {@code canned_acl} + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.delay_increment} */ @Nullable - public final String cannedAcl() { - return this.cannedAcl; + public final Time throttledDeleteRetryDelayIncrement() { + return this.throttledDeleteRetryDelayIncrement; } /** - * API name: {@code storage_class} + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.maximum_delay} */ @Nullable - public final String storageClass() { - return this.storageClass; + public final Time throttledDeleteRetryMaximumDelay() { + return this.throttledDeleteRetryMaximumDelay; + } + + /** + * The number times to retry a throttled snapshot deletion. The default is 10 + * and the minimum value is 0 which will disable retries altogether. Note that + * if retries are enabled in the Azure client, each of these retries comprises + * that many client-level retries. + *

+ * API name: {@code throttled_delete_retry.maximum_number_of_retries} + */ + @Nullable + public final Integer throttledDeleteRetryMaximumNumberOfRetries() { + return this.throttledDeleteRetryMaximumNumberOfRetries; } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { @@ -170,14 +344,44 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("bucket"); generator.write(this.bucket); + if (this.basePath != null) { + generator.writeKey("base_path"); + generator.write(this.basePath); + + } + if (this.bufferSize != null) { + generator.writeKey("buffer_size"); + generator.write(this.bufferSize); + + } + if (this.cannedAcl != null) { + generator.writeKey("canned_acl"); + generator.write(this.cannedAcl); + + } if (this.client != null) { generator.writeKey("client"); generator.write(this.client); } - if (this.basePath != null) { - generator.writeKey("base_path"); - generator.write(this.basePath); + if (this.deleteObjectsMaxSize != null) { + generator.writeKey("delete_objects_max_size"); + generator.write(this.deleteObjectsMaxSize); + + } + if (this.getRegisterRetryDelay != null) { + generator.writeKey("get_register_retry_delay"); + this.getRegisterRetryDelay.serialize(generator, mapper); + + } + if (this.maxMultipartParts != null) { + generator.writeKey("max_multipart_parts"); + generator.write(this.maxMultipartParts); + + } + if (this.maxMultipartUploadCleanupSize != null) { + generator.writeKey("max_multipart_upload_cleanup_size"); + generator.write(this.maxMultipartUploadCleanupSize); } if (this.readonly != null) { @@ -190,19 +394,24 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.serverSideEncryption); } - if (this.bufferSize != null) { - generator.writeKey("buffer_size"); - generator.write(this.bufferSize); + if (this.storageClass != null) { + generator.writeKey("storage_class"); + generator.write(this.storageClass); } - if (this.cannedAcl != null) { - generator.writeKey("canned_acl"); - generator.write(this.cannedAcl); + if (this.throttledDeleteRetryDelayIncrement != null) { + generator.writeKey("throttled_delete_retry.delay_increment"); + this.throttledDeleteRetryDelayIncrement.serialize(generator, mapper); } - if (this.storageClass != null) { - generator.writeKey("storage_class"); - generator.write(this.storageClass); + if (this.throttledDeleteRetryMaximumDelay != null) { + generator.writeKey("throttled_delete_retry.maximum_delay"); + this.throttledDeleteRetryMaximumDelay.serialize(generator, mapper); + + } + if (this.throttledDeleteRetryMaximumNumberOfRetries != null) { + generator.writeKey("throttled_delete_retry.maximum_number_of_retries"); + generator.write(this.throttledDeleteRetryMaximumNumberOfRetries); } @@ -219,11 +428,29 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilder { private String bucket; + @Nullable + private String basePath; + + @Nullable + private String bufferSize; + + @Nullable + private String cannedAcl; + @Nullable private String client; @Nullable - private String basePath; + private Integer deleteObjectsMaxSize; + + @Nullable + private Time getRegisterRetryDelay; + + @Nullable + private Integer maxMultipartParts; + + @Nullable + private Integer maxMultipartUploadCleanupSize; @Nullable private Boolean readonly; @@ -232,16 +459,22 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilder + * API name: {@code bucket} */ public final Builder bucket(String value) { this.bucket = value; @@ -249,6 +482,60 @@ public final Builder bucket(String value) { } /** + * The path to the repository data within its bucket. It defaults to an empty + * string, meaning that the repository is at the root of the bucket. The value + * of this setting should not start or end with a forward slash + * (/). + *

+ * NOTE: Don't set base_path when configuring a snapshot repository for Elastic + * Cloud Enterprise. Elastic Cloud Enterprise automatically generates the + * base_path for each deployment so that multiple deployments may + * share the same bucket. + *

+ * API name: {@code base_path} + */ + public final Builder basePath(@Nullable String value) { + this.basePath = value; + return this; + } + + /** + * The minimum threshold below which the chunk is uploaded using a single + * request. Beyond this threshold, the S3 repository will use the AWS Multipart + * Upload API to split the chunk into several parts, each of + * buffer_size length, and to upload each part in its own request. + * Note that setting a buffer size lower than 5mb is not allowed since it will + * prevent the use of the Multipart API and may result in upload errors. It is + * also not possible to set a buffer size greater than 5gb as it is the maximum + * upload size allowed by S3. Defaults to 100mb or 5% of JVM heap, + * whichever is smaller. + *

+ * API name: {@code buffer_size} + */ + public final Builder bufferSize(@Nullable String value) { + this.bufferSize = value; + return this; + } + + /** + * The S3 repository supports all S3 canned ACLs: private, + * public-read, public-read-write, + * authenticated-read, log-delivery-write, + * bucket-owner-read, bucket-owner-full-control. You + * could specify a canned ACL using the canned_acl setting. When + * the S3 repository creates buckets and objects, it adds the canned ACL into + * the buckets and objects. + *

+ * API name: {@code canned_acl} + */ + public final Builder cannedAcl(@Nullable String value) { + this.cannedAcl = value; + return this; + } + + /** + * The name of the S3 client to use to connect to S3. + *

* API name: {@code client} */ public final Builder client(@Nullable String value) { @@ -257,14 +544,84 @@ public final Builder client(@Nullable String value) { } /** - * API name: {@code base_path} + * The maxmimum batch size, between 1 and 1000, used for + * DeleteObjects requests. Defaults to 1000 which is the maximum + * number supported by the AWS DeleteObjects API. + *

+ * API name: {@code delete_objects_max_size} */ - public final Builder basePath(@Nullable String value) { - this.basePath = value; + public final Builder deleteObjectsMaxSize(@Nullable Integer value) { + this.deleteObjectsMaxSize = value; + return this; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

+ * API name: {@code get_register_retry_delay} + */ + public final Builder getRegisterRetryDelay(@Nullable Time value) { + this.getRegisterRetryDelay = value; + return this; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

+ * API name: {@code get_register_retry_delay} + */ + public final Builder getRegisterRetryDelay(Function> fn) { + return this.getRegisterRetryDelay(fn.apply(new Time.Builder()).build()); + } + + /** + * The maximum number of parts that Elasticsearch will write during a multipart + * upload of a single object. Files which are larger than + * buffer_size × max_multipart_parts will be chunked into several + * smaller objects. Elasticsearch may also split a file across multiple objects + * to satisfy other constraints such as the chunk_size limit. + * Defaults to 10000 which is the maximum number of parts in a + * multipart upload in AWS S3. + *

+ * API name: {@code max_multipart_parts} + */ + public final Builder maxMultipartParts(@Nullable Integer value) { + this.maxMultipartParts = value; + return this; + } + + /** + * The maximum number of possibly-dangling multipart uploads to clean up in each + * batch of snapshot deletions. Defaults to 1000 which is the maximum number + * supported by the AWS ListMultipartUploads API. If set to 0, + * Elasticsearch will not attempt to clean up dangling multipart uploads. + *

+ * API name: {@code max_multipart_upload_cleanup_size} + */ + public final Builder maxMultipartUploadCleanupSize(@Nullable Integer value) { + this.maxMultipartUploadCleanupSize = value; return this; } /** + * If true, the repository is read-only. The cluster can retrieve and restore + * snapshots from the repository but not write to the repository or create + * snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code readonly} */ public final Builder readonly(@Nullable Boolean value) { @@ -273,6 +630,9 @@ public final Builder readonly(@Nullable Boolean value) { } /** + * When set to true, files are encrypted on server side using an + * AES256 algorithm. + *

* API name: {@code server_side_encryption} */ public final Builder serverSideEncryption(@Nullable Boolean value) { @@ -281,26 +641,70 @@ public final Builder serverSideEncryption(@Nullable Boolean value) { } /** - * API name: {@code buffer_size} + * The S3 storage class for objects written to the repository. Values may be + * standard, reduced_redundancy, + * standard_ia, onezone_ia, and + * intelligent_tiering. + *

+ * API name: {@code storage_class} */ - public final Builder bufferSize(@Nullable String value) { - this.bufferSize = value; + public final Builder storageClass(@Nullable String value) { + this.storageClass = value; return this; } /** - * API name: {@code canned_acl} + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.delay_increment} */ - public final Builder cannedAcl(@Nullable String value) { - this.cannedAcl = value; + public final Builder throttledDeleteRetryDelayIncrement(@Nullable Time value) { + this.throttledDeleteRetryDelayIncrement = value; return this; } /** - * API name: {@code storage_class} + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.delay_increment} */ - public final Builder storageClass(@Nullable String value) { - this.storageClass = value; + public final Builder throttledDeleteRetryDelayIncrement(Function> fn) { + return this.throttledDeleteRetryDelayIncrement(fn.apply(new Time.Builder()).build()); + } + + /** + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.maximum_delay} + */ + public final Builder throttledDeleteRetryMaximumDelay(@Nullable Time value) { + this.throttledDeleteRetryMaximumDelay = value; + return this; + } + + /** + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

+ * API name: {@code throttled_delete_retry.maximum_delay} + */ + public final Builder throttledDeleteRetryMaximumDelay(Function> fn) { + return this.throttledDeleteRetryMaximumDelay(fn.apply(new Time.Builder()).build()); + } + + /** + * The number times to retry a throttled snapshot deletion. The default is 10 + * and the minimum value is 0 which will disable retries altogether. Note that + * if retries are enabled in the Azure client, each of these retries comprises + * that many client-level retries. + *

+ * API name: {@code throttled_delete_retry.maximum_number_of_retries} + */ + public final Builder throttledDeleteRetryMaximumNumberOfRetries(@Nullable Integer value) { + this.throttledDeleteRetryMaximumNumberOfRetries = value; return this; } @@ -333,13 +737,23 @@ public S3RepositorySettings build() { protected static void setupS3RepositorySettingsDeserializer(ObjectDeserializer op) { RepositorySettingsBase.setupRepositorySettingsBaseDeserializer(op); op.add(Builder::bucket, JsonpDeserializer.stringDeserializer(), "bucket"); - op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); - op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); - op.add(Builder::serverSideEncryption, JsonpDeserializer.booleanDeserializer(), "server_side_encryption"); op.add(Builder::bufferSize, JsonpDeserializer.stringDeserializer(), "buffer_size"); op.add(Builder::cannedAcl, JsonpDeserializer.stringDeserializer(), "canned_acl"); + op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); + op.add(Builder::deleteObjectsMaxSize, JsonpDeserializer.integerDeserializer(), "delete_objects_max_size"); + op.add(Builder::getRegisterRetryDelay, Time._DESERIALIZER, "get_register_retry_delay"); + op.add(Builder::maxMultipartParts, JsonpDeserializer.integerDeserializer(), "max_multipart_parts"); + op.add(Builder::maxMultipartUploadCleanupSize, JsonpDeserializer.integerDeserializer(), + "max_multipart_upload_cleanup_size"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + op.add(Builder::serverSideEncryption, JsonpDeserializer.booleanDeserializer(), "server_side_encryption"); op.add(Builder::storageClass, JsonpDeserializer.stringDeserializer(), "storage_class"); + op.add(Builder::throttledDeleteRetryDelayIncrement, Time._DESERIALIZER, + "throttled_delete_retry.delay_increment"); + op.add(Builder::throttledDeleteRetryMaximumDelay, Time._DESERIALIZER, "throttled_delete_retry.maximum_delay"); + op.add(Builder::throttledDeleteRetryMaximumNumberOfRetries, JsonpDeserializer.integerDeserializer(), + "throttled_delete_retry.maximum_number_of_retries"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStats.java index df24494fc..9945a12dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStats.java @@ -88,42 +88,55 @@ public static ShardsStats of(Function> fn) { } /** - * Required - API name: {@code done} + * Required - The number of shards that initialized, started, and finalized + * successfully. + *

+ * API name: {@code done} */ public final long done() { return this.done; } /** - * Required - API name: {@code failed} + * Required - The number of shards that failed to be included in the snapshot. + *

+ * API name: {@code failed} */ public final long failed() { return this.failed; } /** - * Required - API name: {@code finalizing} + * Required - The number of shards that are finalizing but are not done. + *

+ * API name: {@code finalizing} */ public final long finalizing() { return this.finalizing; } /** - * Required - API name: {@code initializing} + * Required - The number of shards that are still initializing. + *

+ * API name: {@code initializing} */ public final long initializing() { return this.initializing; } /** - * Required - API name: {@code started} + * Required - The number of shards that have started but are not finalized. + *

+ * API name: {@code started} */ public final long started() { return this.started; } /** - * Required - API name: {@code total} + * Required - The total number of shards included in the snapshot. + *

+ * API name: {@code total} */ public final long total() { return this.total; @@ -185,7 +198,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Long total; /** - * Required - API name: {@code done} + * Required - The number of shards that initialized, started, and finalized + * successfully. + *

+ * API name: {@code done} */ public final Builder done(long value) { this.done = value; @@ -193,7 +209,9 @@ public final Builder done(long value) { } /** - * Required - API name: {@code failed} + * Required - The number of shards that failed to be included in the snapshot. + *

+ * API name: {@code failed} */ public final Builder failed(long value) { this.failed = value; @@ -201,7 +219,9 @@ public final Builder failed(long value) { } /** - * Required - API name: {@code finalizing} + * Required - The number of shards that are finalizing but are not done. + *

+ * API name: {@code finalizing} */ public final Builder finalizing(long value) { this.finalizing = value; @@ -209,7 +229,9 @@ public final Builder finalizing(long value) { } /** - * Required - API name: {@code initializing} + * Required - The number of shards that are still initializing. + *

+ * API name: {@code initializing} */ public final Builder initializing(long value) { this.initializing = value; @@ -217,7 +239,9 @@ public final Builder initializing(long value) { } /** - * Required - API name: {@code started} + * Required - The number of shards that have started but are not finalized. + *

+ * API name: {@code started} */ public final Builder started(long value) { this.started = value; @@ -225,7 +249,9 @@ public final Builder started(long value) { } /** - * Required - API name: {@code total} + * Required - The total number of shards included in the snapshot. + *

+ * API name: {@code total} */ public final Builder total(long value) { this.total = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStatsStage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStatsStage.java index fe18f0481..cd1a9cec5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStatsStage.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ShardsStatsStage.java @@ -47,31 +47,31 @@ @JsonpDeserializable public enum ShardsStatsStage implements JsonEnum { /** - * Number of shards in the snapshot that were successfully stored in the + * The number of shards in the snapshot that were successfully stored in the * repository. */ Done("DONE"), /** - * Number of shards in the snapshot that were not successfully stored in the + * The number of shards in the snapshot that were not successfully stored in the * repository. */ Failure("FAILURE"), /** - * Number of shards in the snapshot that are in the finalizing stage of being - * stored in the repository. + * The number of shards in the snapshot that are in the finalizing stage of + * being stored in the repository. */ Finalize("FINALIZE"), /** - * Number of shards in the snapshot that are in the initializing stage of being - * stored in the repository. + * The number of shards in the snapshot that are in the initializing stage of + * being stored in the repository. */ Init("INIT"), /** - * Number of shards in the snapshot that are in the started stage of being + * The number of shards in the snapshot that are in the started stage of being * stored in the repository. */ Started("STARTED"), diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepository.java index 03ba8f085..b0d25c455 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepository.java @@ -80,7 +80,9 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final SharedFileSystemRepositorySettings settings() { return this.settings; @@ -107,7 +109,9 @@ public static class Builder extends RepositoryBase.AbstractBuilder private SharedFileSystemRepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings(SharedFileSystemRepositorySettings value) { this.settings = value; @@ -115,7 +119,9 @@ public final Builder settings(SharedFileSystemRepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings( Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepositorySettings.java index dfe78cebc..9a32c8988 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SharedFileSystemRepositorySettings.java @@ -84,13 +84,21 @@ public static SharedFileSystemRepositorySettings of( } /** - * Required - API name: {@code location} + * Required - The location of the shared filesystem used to store and retrieve + * snapshots. This location must be registered in the path.repo + * setting on all master and data nodes in the cluster. Unlike + * path.repo, this setting supports only a single file path. + *

+ * API name: {@code location} */ public final String location() { return this.location; } /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ @Nullable @@ -99,6 +107,22 @@ public final Integer maxNumberOfSnapshots() { } /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code readonly} */ @Nullable @@ -143,7 +167,12 @@ public static class Builder extends RepositorySettingsBase.AbstractBuilderpath.repo + * setting on all master and data nodes in the cluster. Unlike + * path.repo, this setting supports only a single file path. + *

+ * API name: {@code location} */ public final Builder location(String value) { this.location = value; @@ -151,6 +180,9 @@ public final Builder location(String value) { } /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { @@ -159,6 +191,22 @@ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { } /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code readonly} */ public final Builder readonly(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStats.java index 0967a11e3..211629a55 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStats.java @@ -88,14 +88,22 @@ public static SnapshotStats of(Function> f } /** - * Required - API name: {@code incremental} + * Required - The number and size of files that still need to be copied as part + * of the incremental snapshot. For completed snapshots, this property indicates + * the number and size of files that were not already in the repository and were + * copied as part of the incremental snapshot. + *

+ * API name: {@code incremental} */ public final FileCountSnapshotStats incremental() { return this.incremental; } /** - * Required - API name: {@code start_time_in_millis} + * Required - The time, in milliseconds, when the snapshot creation process + * started. + *

+ * API name: {@code start_time_in_millis} */ public final long startTimeInMillis() { return this.startTimeInMillis; @@ -110,14 +118,20 @@ public final Time time() { } /** - * Required - API name: {@code time_in_millis} + * Required - The total time, in milliseconds, that it took for the snapshot + * process to complete. + *

+ * API name: {@code time_in_millis} */ public final long timeInMillis() { return this.timeInMillis; } /** - * Required - API name: {@code total} + * Required - The total number and size of files that are referenced by the + * snapshot. + *

+ * API name: {@code total} */ public final FileCountSnapshotStats total() { return this.total; @@ -177,7 +191,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement private FileCountSnapshotStats total; /** - * Required - API name: {@code incremental} + * Required - The number and size of files that still need to be copied as part + * of the incremental snapshot. For completed snapshots, this property indicates + * the number and size of files that were not already in the repository and were + * copied as part of the incremental snapshot. + *

+ * API name: {@code incremental} */ public final Builder incremental(FileCountSnapshotStats value) { this.incremental = value; @@ -185,7 +204,12 @@ public final Builder incremental(FileCountSnapshotStats value) { } /** - * Required - API name: {@code incremental} + * Required - The number and size of files that still need to be copied as part + * of the incremental snapshot. For completed snapshots, this property indicates + * the number and size of files that were not already in the repository and were + * copied as part of the incremental snapshot. + *

+ * API name: {@code incremental} */ public final Builder incremental( Function> fn) { @@ -193,7 +217,10 @@ public final Builder incremental( } /** - * Required - API name: {@code start_time_in_millis} + * Required - The time, in milliseconds, when the snapshot creation process + * started. + *

+ * API name: {@code start_time_in_millis} */ public final Builder startTimeInMillis(long value) { this.startTimeInMillis = value; @@ -216,7 +243,10 @@ public final Builder time(Function> fn) { } /** - * Required - API name: {@code time_in_millis} + * Required - The total time, in milliseconds, that it took for the snapshot + * process to complete. + *

+ * API name: {@code time_in_millis} */ public final Builder timeInMillis(long value) { this.timeInMillis = value; @@ -224,7 +254,10 @@ public final Builder timeInMillis(long value) { } /** - * Required - API name: {@code total} + * Required - The total number and size of files that are referenced by the + * snapshot. + *

+ * API name: {@code total} */ public final Builder total(FileCountSnapshotStats value) { this.total = value; @@ -232,7 +265,10 @@ public final Builder total(FileCountSnapshotStats value) { } /** - * Required - API name: {@code total} + * Required - The total number and size of files that are referenced by the + * snapshot. + *

+ * API name: {@code total} */ public final Builder total(Function> fn) { return this.total(fn.apply(new FileCountSnapshotStats.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java index 45641441c..e5d294907 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java @@ -60,10 +60,18 @@ /** * Get the snapshot status. Get a detailed description of the current state for - * each shard participating in the snapshot. Note that this API should be used - * only to obtain detailed shard-level information for ongoing snapshots. If - * this detail is not needed or you want to obtain information about one or more - * existing snapshots, use the get snapshot API. + * each shard participating in the snapshot. + *

+ * Note that this API should be used only to obtain detailed shard-level + * information for ongoing snapshots. If this detail is not needed or you want + * to obtain information about one or more existing snapshots, use the get + * snapshot API. + *

+ * If you omit the <snapshot> request path parameter, the + * request retrieves information only for currently running snapshots. This + * usage is preferred. If needed, you can specify + * <repository> and <snapshot> to retrieve + * information for specific snapshots, even if they're not currently running. *

* WARNING: Using the API to return the status of any snapshots other than * currently running snapshots can be expensive. The API requires a read from @@ -107,8 +115,10 @@ public static SnapshotStatusRequest of(Functionfalse, the request returns an error for any snapshots that + * are unavailable. If true, the request ignores snapshots that are + * unavailable, such as those that are corrupted or temporarily cannot be + * returned. *

* API name: {@code ignore_unavailable} */ @@ -118,7 +128,9 @@ public final Boolean ignoreUnavailable() { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -128,7 +140,8 @@ public final Time masterTimeout() { } /** - * A repository name + * The snapshot repository name used to limit the request. It supports wildcards + * (*) if <snapshot> isn't specified. *

* API name: {@code repository} */ @@ -138,7 +151,8 @@ public final String repository() { } /** - * A comma-separated list of snapshot names + * A comma-separated list of snapshots to retrieve status for. The default is + * currently running snapshots. Wildcards (*) are not supported. *

* API name: {@code snapshot} */ @@ -168,8 +182,10 @@ public static class Builder extends RequestBase.AbstractBuilder private List snapshot; /** - * Whether to ignore unavailable snapshots, defaults to false which means a - * SnapshotMissingException is thrown + * If false, the request returns an error for any snapshots that + * are unavailable. If true, the request ignores snapshots that are + * unavailable, such as those that are corrupted or temporarily cannot be + * returned. *

* API name: {@code ignore_unavailable} */ @@ -179,7 +195,9 @@ public final Builder ignoreUnavailable(@Nullable Boolean value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -189,7 +207,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -198,7 +218,8 @@ public final Builder masterTimeout(Function> f } /** - * A repository name + * The snapshot repository name used to limit the request. It supports wildcards + * (*) if <snapshot> isn't specified. *

* API name: {@code repository} */ @@ -208,7 +229,8 @@ public final Builder repository(@Nullable String value) { } /** - * A comma-separated list of snapshot names + * A comma-separated list of snapshots to retrieve status for. The default is + * currently running snapshots. Wildcards (*) are not supported. *

* API name: {@code snapshot} *

@@ -220,7 +242,8 @@ public final Builder snapshot(List list) { } /** - * A comma-separated list of snapshot names + * A comma-separated list of snapshots to retrieve status for. The default is + * currently running snapshots. Wildcards (*) are not supported. *

* API name: {@code snapshot} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepository.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepository.java index 97a29ae24..952dc99c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepository.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepository.java @@ -80,7 +80,9 @@ public Repository.Kind _repositoryKind() { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final SourceOnlyRepositorySettings settings() { return this.settings; @@ -107,7 +109,9 @@ public static class Builder extends RepositoryBase.AbstractBuilder private SourceOnlyRepositorySettings settings; /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings(SourceOnlyRepositorySettings value) { this.settings = value; @@ -115,7 +119,9 @@ public final Builder settings(SourceOnlyRepositorySettings value) { } /** - * Required - API name: {@code settings} + * Required - The repository settings. + *

+ * API name: {@code settings} */ public final Builder settings( Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java index 9230140c0..e4b3bc399 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java @@ -83,6 +83,10 @@ public static SourceOnlyRepositorySettings of(Functiontype parameter. Source repositories can use + * settings properties for its delegated repository type. + *

* API name: {@code delegate_type} */ @Nullable @@ -91,6 +95,9 @@ public final String delegateType() { } /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ @Nullable @@ -99,6 +106,22 @@ public final Integer maxNumberOfSnapshots() { } /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code read_only} */ @Nullable @@ -146,6 +169,10 @@ public static class Builder extends RepositorySettingsBase.AbstractBuildertype parameter. Source repositories can use + * settings properties for its delegated repository type. + *

* API name: {@code delegate_type} */ public final Builder delegateType(@Nullable String value) { @@ -154,6 +181,9 @@ public final Builder delegateType(@Nullable String value) { } /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

* API name: {@code max_number_of_snapshots} */ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { @@ -162,6 +192,22 @@ public final Builder maxNumberOfSnapshots(@Nullable Integer value) { } /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

+ * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

+ * If false, the cluster can write to the repository and create + * snapshots in it. + *

+ * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

* API name: {@code read_only} */ public final Builder readOnly(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/Status.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/Status.java index 8754b1ff3..f4e42766d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/Status.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/Status.java @@ -98,7 +98,10 @@ public static Status of(Function> fn) { } /** - * Required - API name: {@code include_global_state} + * Required - Indicates whether the current cluster state is included in the + * snapshot. + *

+ * API name: {@code include_global_state} */ public final boolean includeGlobalState() { return this.includeGlobalState; @@ -112,42 +115,61 @@ public final Map indices() { } /** - * Required - API name: {@code repository} + * Required - The name of the repository that includes the snapshot. + *

+ * API name: {@code repository} */ public final String repository() { return this.repository; } /** - * Required - API name: {@code shards_stats} + * Required - Statistics for the shards in the snapshot. + *

+ * API name: {@code shards_stats} */ public final ShardsStats shardsStats() { return this.shardsStats; } /** - * Required - API name: {@code snapshot} + * Required - The name of the snapshot. + *

+ * API name: {@code snapshot} */ public final String snapshot() { return this.snapshot; } /** - * Required - API name: {@code state} + * Required - The current snapshot state: + *

    + *
  • FAILED: The snapshot finished with an error and failed to + * store any data.
  • + *
  • STARTED: The snapshot is currently running.
  • + *
  • SUCCESS: The snapshot completed.
  • + *
+ *

+ * API name: {@code state} */ public final String state() { return this.state; } /** - * Required - API name: {@code stats} + * Required - Details about the number (file_count) and size + * (size_in_bytes) of files included in the snapshot. + *

+ * API name: {@code stats} */ public final SnapshotStats stats() { return this.stats; } /** - * Required - API name: {@code uuid} + * Required - The universally unique identifier (UUID) for the snapshot. + *

+ * API name: {@code uuid} */ public final String uuid() { return this.uuid; @@ -227,7 +249,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String uuid; /** - * Required - API name: {@code include_global_state} + * Required - Indicates whether the current cluster state is included in the + * snapshot. + *

+ * API name: {@code include_global_state} */ public final Builder includeGlobalState(boolean value) { this.includeGlobalState = value; @@ -265,7 +290,9 @@ public final Builder indices(String key, } /** - * Required - API name: {@code repository} + * Required - The name of the repository that includes the snapshot. + *

+ * API name: {@code repository} */ public final Builder repository(String value) { this.repository = value; @@ -273,7 +300,9 @@ public final Builder repository(String value) { } /** - * Required - API name: {@code shards_stats} + * Required - Statistics for the shards in the snapshot. + *

+ * API name: {@code shards_stats} */ public final Builder shardsStats(ShardsStats value) { this.shardsStats = value; @@ -281,14 +310,18 @@ public final Builder shardsStats(ShardsStats value) { } /** - * Required - API name: {@code shards_stats} + * Required - Statistics for the shards in the snapshot. + *

+ * API name: {@code shards_stats} */ public final Builder shardsStats(Function> fn) { return this.shardsStats(fn.apply(new ShardsStats.Builder()).build()); } /** - * Required - API name: {@code snapshot} + * Required - The name of the snapshot. + *

+ * API name: {@code snapshot} */ public final Builder snapshot(String value) { this.snapshot = value; @@ -296,7 +329,15 @@ public final Builder snapshot(String value) { } /** - * Required - API name: {@code state} + * Required - The current snapshot state: + *

    + *
  • FAILED: The snapshot finished with an error and failed to + * store any data.
  • + *
  • STARTED: The snapshot is currently running.
  • + *
  • SUCCESS: The snapshot completed.
  • + *
+ *

+ * API name: {@code state} */ public final Builder state(String value) { this.state = value; @@ -304,7 +345,10 @@ public final Builder state(String value) { } /** - * Required - API name: {@code stats} + * Required - Details about the number (file_count) and size + * (size_in_bytes) of files included in the snapshot. + *

+ * API name: {@code stats} */ public final Builder stats(SnapshotStats value) { this.stats = value; @@ -312,14 +356,19 @@ public final Builder stats(SnapshotStats value) { } /** - * Required - API name: {@code stats} + * Required - Details about the number (file_count) and size + * (size_in_bytes) of files included in the snapshot. + *

+ * API name: {@code stats} */ public final Builder stats(Function> fn) { return this.stats(fn.apply(new SnapshotStats.Builder()).build()); } /** - * Required - API name: {@code uuid} + * Required - The universally unique identifier (UUID) for the snapshot. + *

+ * API name: {@code uuid} */ public final Builder uuid(String value) { this.uuid = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java index 2371c4f0f..d439ed089 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java @@ -88,7 +88,9 @@ public static VerifyRepositoryRequest of(Function-1. *

* API name: {@code master_timeout} */ @@ -98,7 +100,7 @@ public final Time masterTimeout() { } /** - * Required - A repository name + * Required - The name of the snapshot repository to verify. *

* API name: {@code repository} */ @@ -107,7 +109,11 @@ public final String name() { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -134,7 +140,9 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -144,7 +152,9 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Explicit operation timeout for connection to master node + * The period to wait for the master node. If the master node is not available + * before the timeout expires, the request fails and returns an error. To + * indicate that the request should never timeout, set it to -1. *

* API name: {@code master_timeout} */ @@ -153,7 +163,7 @@ public final Builder masterTimeout(Function> f } /** - * Required - A repository name + * Required - The name of the snapshot repository to verify. *

* API name: {@code repository} */ @@ -163,7 +173,11 @@ public final Builder name(String value) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ @@ -173,7 +187,11 @@ public final Builder timeout(@Nullable Time value) { } /** - * Explicit operation timeout + * The period to wait for a response from all relevant nodes in the cluster + * after updating the cluster metadata. If no response is received before the + * timeout expires, the cluster metadata update still applies but the response + * will indicate that it was not completely acknowledged. To indicate that the + * request should never timeout, set it to -1. *

* API name: {@code timeout} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryResponse.java index 04334c04b..fa59376c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryResponse.java @@ -77,7 +77,10 @@ public static VerifyRepositoryResponse of(Function + * API name: {@code nodes} */ public final Map nodes() { return this.nodes; @@ -125,7 +128,10 @@ public static class Builder extends WithJsonObjectBuilderBase private Map nodes; /** - * Required - API name: {@code nodes} + * Required - Information about the nodes connected to the snapshot repository. + * The key is the ID of the node. + *

+ * API name: {@code nodes} *

* Adds all entries of map to nodes. */ @@ -135,7 +141,10 @@ public final Builder nodes(Map map) { } /** - * Required - API name: {@code nodes} + * Required - Information about the nodes connected to the snapshot repository. + * The key is the ID of the node. + *

+ * API name: {@code nodes} *

* Adds an entry to nodes. */ @@ -145,7 +154,10 @@ public final Builder nodes(String key, CompactNodeInfo value) { } /** - * Required - API name: {@code nodes} + * Required - Information about the nodes connected to the snapshot repository. + * The key is the ID of the node. + *

+ * API name: {@code nodes} *

* Adds an entry to nodes using a builder lambda. */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/cleanup_repository/CleanupRepositoryResults.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/cleanup_repository/CleanupRepositoryResults.java index 852a49d10..f80bd9f05 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/cleanup_repository/CleanupRepositoryResults.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/cleanup_repository/CleanupRepositoryResults.java @@ -77,7 +77,9 @@ public static CleanupRepositoryResults of(Function * API name: {@code deleted_blobs} */ @@ -86,7 +88,7 @@ public final long deletedBlobs() { } /** - * Required - Number of bytes freed by cleanup operations. + * Required - The number of bytes freed by cleanup operations. *

* API name: {@code deleted_bytes} */ @@ -132,7 +134,9 @@ public static class Builder extends WithJsonObjectBuilderBase private Long deletedBytes; /** - * Required - Number of binary large objects (blobs) removed during cleanup. + * Required - The number of binary large objects (blobs) removed from the + * snapshot repository during cleanup operations. A non-zero value indicates + * that unreferenced blobs were found and subsequently cleaned up. *

* API name: {@code deleted_blobs} */ @@ -142,7 +146,7 @@ public final Builder deletedBlobs(long value) { } /** - * Required - Number of bytes freed by cleanup operations. + * Required - The number of bytes freed by cleanup operations. *

* API name: {@code deleted_bytes} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/verify_repository/CompactNodeInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/verify_repository/CompactNodeInfo.java index d4b4f4902..1e39b358e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/verify_repository/CompactNodeInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/verify_repository/CompactNodeInfo.java @@ -75,7 +75,11 @@ public static CompactNodeInfo of(Functionnode.name property in elasticsearch.yml. The + * default value is the machine's hostname. + *

+ * API name: {@code name} */ public final String name() { return this.name; @@ -112,7 +116,11 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String name; /** - * Required - API name: {@code name} + * Required - A human-readable name for the node. You can set this name using + * the node.name property in elasticsearch.yml. The + * default value is the machine's hostname. + *

+ * API name: {@code name} */ public final Builder name(String value) { this.name = value;