From 0a8d8cd2716fb1443c2c3ccaf1c8d7f938747f66 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:18:21 +1300 Subject: [PATCH] Re-generate client code using latest OpenSearch API specification (2024-12-30) (#1371) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../cluster/ClusterStatsResponse.java | 6 +- .../opensearch/cluster/reroute/Command.java | 111 +++++++++--------- java-codegen/opensearch-openapi.yaml | 30 ++--- 3 files changed, 75 insertions(+), 72 deletions(-) diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java index 11e321356..8a5b2f7e2 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/ClusterStatsResponse.java @@ -120,7 +120,7 @@ public final String clusterUuid() { } /** - * Contains statistics about indices with shards assigned to selected nodes. + * Contains statistics about indexes with shards assigned to selected nodes. *

* API name: {@code indices} *

@@ -274,7 +274,7 @@ public final Builder clusterUuid(String value) { } /** - * Contains statistics about indices with shards assigned to selected nodes. + * Contains statistics about indexes with shards assigned to selected nodes. *

* API name: {@code indices} *

@@ -286,7 +286,7 @@ public final Builder indices(@Nullable ClusterIndices value) { } /** - * Contains statistics about indices with shards assigned to selected nodes. + * Contains statistics about indexes with shards assigned to selected nodes. *

* API name: {@code indices} *

diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/reroute/Command.java b/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/reroute/Command.java index 181a07861..5406785ac 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/reroute/Command.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/cluster/reroute/Command.java @@ -89,10 +89,11 @@ public static Command of(Function> fn) { } /** - * Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the - * shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. If - * a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are - * well-understood, this command requires the flag accept_data_loss to be explicitly set to true. + * Allocate an empty primary shard to a node. Accepts index and shard for index name and shard number, and + * node to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this shard, + * if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To + * ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set + * to true. *

* API name: {@code allocate_empty_primary} *

@@ -103,8 +104,8 @@ public final CommandAllocatePrimaryAction allocateEmptyPrimary() { } /** - * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the - * shard to. Takes allocation deciders into account. + * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, + * and node to allocate the shard to. Takes allocation deciders into account. *

* API name: {@code allocate_replica} *

@@ -115,11 +116,11 @@ public final CommandAllocateReplicaAction allocateReplica() { } /** - * Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node to - * allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy of the - * data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was forcefully - * allocated with this command. To ensure that these implications are well-understood, this command requires the flag accept_data_loss - * to be explicitly set to true. + * Allocate a primary shard to a node that holds a stale copy. Accepts index and shard for index name and + * shard number, and node to allocate the shard to. Using this command may lead to data loss for the provided shard id. If + * a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of + * the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, this command + * requires the flag accept_data_loss to be explicitly set to true. *

* API name: {@code allocate_stale_primary} *

@@ -130,11 +131,11 @@ public final CommandAllocatePrimaryAction allocateStalePrimary() { } /** - * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to cancel - * the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by cancelling them - * and allowing them to be reinitialized through the standard recovery process. By default only replica shard allocations can be - * cancelled. If it is necessary to cancel the allocation of a primary shard then the allow_primary flag must also be included in the - * request. + * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and + * node for the node to cancel the shard allocation on. This can be used to force resynchronization of existing replicas + * from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. By default + * only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then the + * allow_primary flag must also be included in the request. *

* API name: {@code cancel} *

@@ -145,8 +146,8 @@ public final CommandCancelAction cancel() { } /** - * Move a started shard from one node to another node. Accepts index and shard for index name and shard number, from_node for the node - * to move the shard from, and to_node for the node to move the shard to. + * Move a started shard from one node to another node. Accepts index and shard for index name and shard + * number, from_node for the node to move the shard from, and to_node for the node to move the shard to. *

* API name: {@code move} *

@@ -246,10 +247,11 @@ public Builder copy() { } /** - * Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the - * shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. - * If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications - * are well-understood, this command requires the flag accept_data_loss to be explicitly set to true. + * Allocate an empty primary shard to a node. Accepts index and shard for index name and shard number, and + * node to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this + * shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be + * deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to + * be explicitly set to true. *

* API name: {@code allocate_empty_primary} *

@@ -261,10 +263,11 @@ public final Builder allocateEmptyPrimary(@Nullable CommandAllocatePrimaryAction } /** - * Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the - * shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. - * If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications - * are well-understood, this command requires the flag accept_data_loss to be explicitly set to true. + * Allocate an empty primary shard to a node. Accepts index and shard for index name and shard number, and + * node to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this + * shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be + * deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to + * be explicitly set to true. *

* API name: {@code allocate_empty_primary} *

@@ -277,8 +280,8 @@ public final Builder allocateEmptyPrimary( } /** - * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the - * shard to. Takes allocation deciders into account. + * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard + * number, and node to allocate the shard to. Takes allocation deciders into account. *

* API name: {@code allocate_replica} *

@@ -290,8 +293,8 @@ public final Builder allocateReplica(@Nullable CommandAllocateReplicaAction valu } /** - * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the - * shard to. Takes allocation deciders into account. + * Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard + * number, and node to allocate the shard to. Takes allocation deciders into account. *

* API name: {@code allocate_replica} *

@@ -304,11 +307,11 @@ public final Builder allocateReplica( } /** - * Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node - * to allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy - * of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was - * forcefully allocated with this command. To ensure that these implications are well-understood, this command requires the flag - * accept_data_loss to be explicitly set to true. + * Allocate a primary shard to a node that holds a stale copy. Accepts index and shard for index name and + * shard number, and node to allocate the shard to. Using this command may lead to data loss for the provided shard id. + * If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the + * data of the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, + * this command requires the flag accept_data_loss to be explicitly set to true. *

* API name: {@code allocate_stale_primary} *

@@ -320,11 +323,11 @@ public final Builder allocateStalePrimary(@Nullable CommandAllocatePrimaryAction } /** - * Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node - * to allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy - * of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was - * forcefully allocated with this command. To ensure that these implications are well-understood, this command requires the flag - * accept_data_loss to be explicitly set to true. + * Allocate a primary shard to a node that holds a stale copy. Accepts index and shard for index name and + * shard number, and node to allocate the shard to. Using this command may lead to data loss for the provided shard id. + * If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the + * data of the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, + * this command requires the flag accept_data_loss to be explicitly set to true. *

* API name: {@code allocate_stale_primary} *

@@ -337,11 +340,11 @@ public final Builder allocateStalePrimary( } /** - * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to - * cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by - * cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard - * allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then the allow_primary flag must - * also be included in the request. + * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, + * and node for the node to cancel the shard allocation on. This can be used to force resynchronization of existing + * replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. + * By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then + * the allow_primary flag must also be included in the request. *

* API name: {@code cancel} *

@@ -353,11 +356,11 @@ public final Builder cancel(@Nullable CommandCancelAction value) { } /** - * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to - * cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by - * cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard - * allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then the allow_primary flag must - * also be included in the request. + * Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, + * and node for the node to cancel the shard allocation on. This can be used to force resynchronization of existing + * replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. + * By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then + * the allow_primary flag must also be included in the request. *

* API name: {@code cancel} *

@@ -368,8 +371,8 @@ public final Builder cancel(Functionindex and shard for index name and shard + * number, from_node for the node to move the shard from, and to_node for the node to move the shard to. *

* API name: {@code move} *

@@ -381,8 +384,8 @@ public final Builder move(@Nullable CommandMoveAction value) { } /** - * Move a started shard from one node to another node. Accepts index and shard for index name and shard number, from_node for the - * node to move the shard from, and to_node for the node to move the shard to. + * Move a started shard from one node to another node. Accepts index and shard for index name and shard + * number, from_node for the node to move the shard from, and to_node for the node to move the shard to. *

* API name: {@code move} *

diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml index fcd0eb4bd..6b19234ad 100644 --- a/java-codegen/opensearch-openapi.yaml +++ b/java-codegen/opensearch-openapi.yaml @@ -28780,7 +28780,7 @@ components: description: Unique identifier for the cluster. $ref: '#/components/schemas/_common___Uuid' indices: - description: Contains statistics about indices with shards assigned to selected nodes. + description: Contains statistics about indexes with shards assigned to selected nodes. $ref: '#/components/schemas/cluster.stats___ClusterIndices' nodes: description: Contains statistics about nodes selected by the request's node filters. @@ -48289,47 +48289,47 @@ components: properties: cancel: description: |- - Cancel allocation of a shard (or recovery). Accepts index and shard for index - name and shard number, and node for the node to cancel the shard allocation + Cancel allocation of a shard (or recovery). Accepts `index` and `shard` for index + name and shard number, and `node` for the node to cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of - a primary shard then the allow_primary flag must also be included in the + a primary shard then the `allow_primary` flag must also be included in the request. $ref: '#/components/schemas/cluster.reroute___CommandCancelAction' move: description: |- - Move a started shard from one node to another node. Accepts index and shard - for index name and shard number, from_node for the node to move the shard - from, and to_node for the node to move the shard to. + Move a started shard from one node to another node. Accepts `index` and `shard` + for index name and shard number, `from_node` for the node to move the shard + from, and `to_node` for the node to move the shard to. $ref: '#/components/schemas/cluster.reroute___CommandMoveAction' allocate_replica: description: |- - Allocate an unassigned replica shard to a node. Accepts index and shard for - index name and shard number, and node to allocate the shard to. Takes + Allocate an unassigned replica shard to a node. Accepts `index` and `shard` for + index name and shard number, and `node` to allocate the shard to. Takes allocation deciders into account. $ref: '#/components/schemas/cluster.reroute___CommandAllocateReplicaAction' allocate_stale_primary: description: |- - Allocate a primary shard to a node that holds a stale copy. Accepts the index - and shard for index name and shard number, and node to allocate the shard to. + Allocate a primary shard to a node that holds a stale copy. Accepts `index` + and `shard` for index name and shard number, and `node` to allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was forcefully allocated with this command. To ensure that these implications are - well-understood, this command requires the flag accept_data_loss to be + well-understood, this command requires the flag `accept_data_loss` to be explicitly set to true. $ref: '#/components/schemas/cluster.reroute___CommandAllocatePrimaryAction' allocate_empty_primary: description: |- - Allocate an empty primary shard to a node. Accepts the index and shard for - index name and shard number, and node to allocate the shard to. Using this + Allocate an empty primary shard to a node. Accepts `index` and `shard` for + index name and shard number, and `node` to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag - accept_data_loss to be explicitly set to true. + `accept_data_loss` to be explicitly set to true. $ref: '#/components/schemas/cluster.reroute___CommandAllocatePrimaryAction' cluster.reroute___CommandAllocatePrimaryAction: type: object