diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndexLifecycleClient.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndexLifecycleClient.java index 67c0b43b91e..2e57d93cd10 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/IndexLifecycleClient.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/IndexLifecycleClient.java @@ -25,12 +25,12 @@ import org.elasticsearch.client.indexlifecycle.DeleteLifecyclePolicyRequest; import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusRequest; import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusResponse; import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleResponse; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse; -import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyResponse; +import org.elasticsearch.client.indexlifecycle.StartILMRequest; +import org.elasticsearch.client.indexlifecycle.StopILMRequest; import java.io.IOException; diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java index c117c8a03f1..dfb3be22c3f 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java @@ -112,10 +112,10 @@ import org.elasticsearch.index.reindex.ReindexRequest; import org.elasticsearch.index.reindex.UpdateByQueryRequest; import org.elasticsearch.protocol.xpack.XPackInfoRequest; import org.elasticsearch.protocol.xpack.XPackUsageRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest; +import org.elasticsearch.client.indexlifecycle.StartILMRequest; +import org.elasticsearch.client.indexlifecycle.StopILMRequest; import org.elasticsearch.protocol.xpack.migration.IndexUpgradeInfoRequest; import org.elasticsearch.protocol.xpack.watcher.DeleteWatchRequest; import org.elasticsearch.protocol.xpack.watcher.PutWatchRequest; diff --git a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequest.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequest.java similarity index 97% rename from x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequest.java rename to client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequest.java index adb22d02728..a23250e0bcc 100644 --- a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequest.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.info.ClusterInfoRequest; @@ -29,7 +29,7 @@ import java.util.Objects; /** * The request object used by the Explain Lifecycle API. - * + * * Multiple indices may be queried in the same request using the * {@link #indices(String...)} method */ @@ -71,4 +71,4 @@ public class ExplainLifecycleRequest extends ClusterInfoRequest PARSER = new ConstructingObjectParser<>( "index_lifecycle_explain_response", a -> new IndexLifecycleExplainResponse( - (String) a[0], - (boolean) a[1], - (String) a[2], - (boolean) (a[3] == null ? false: a[3]), - (long) (a[4] == null ? -1L: a[4]), + (String) a[0], + (boolean) a[1], + (String) a[2], + (boolean) (a[3] == null ? false: a[3]), + (long) (a[4] == null ? -1L: a[4]), (String) a[5], - (String) a[6], - (String) a[7], - (String) a[8], - (long) (a[9] == null ? -1L: a[9]), - (long) (a[10] == null ? -1L: a[10]), - (long) (a[11] == null ? -1L: a[11]), + (String) a[6], + (String) a[7], + (String) a[8], + (long) (a[9] == null ? -1L: a[9]), + (long) (a[10] == null ? -1L: a[10]), + (long) (a[11] == null ? -1L: a[11]), (BytesReference) a[12])); static { PARSER.declareString(ConstructingObjectParser.constructorArg(), INDEX_FIELD); @@ -158,7 +158,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl actionTime = in.readZLong(); stepTime = in.readZLong(); stepInfo = in.readOptionalBytesReference(); - + } else { policyName = null; skip = false; @@ -196,7 +196,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl public String getIndex() { return index; } - + public boolean managedByILM() { return managedByILM; } @@ -204,7 +204,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl public String getPolicyName() { return policyName; } - + public boolean skip() { return skip; } @@ -240,7 +240,7 @@ public class IndexLifecycleExplainResponse implements ToXContentObject, Writeabl public String getFailedStep() { return failedStep; } - + public BytesReference getStepInfo() { return stepInfo; } diff --git a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequest.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequest.java similarity index 98% rename from x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequest.java rename to client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequest.java index af19d51fd80..b4afe31a00f 100644 --- a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequest.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; diff --git a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponse.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponse.java similarity index 98% rename from x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponse.java rename to client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponse.java index c1c2b5c7da7..708dc3aba62 100644 --- a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponse.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponse.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.ParseField; diff --git a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequest.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StartILMRequest.java similarity index 96% rename from x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequest.java rename to client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StartILMRequest.java index 2e58a0b5581..f6064c44901 100644 --- a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequest.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StartILMRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.AcknowledgedRequest; @@ -47,4 +47,4 @@ public class StartILMRequest extends AcknowledgedRequest { } return true; } -} \ No newline at end of file +} diff --git a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequest.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StopILMRequest.java similarity index 96% rename from x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequest.java rename to client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StopILMRequest.java index 0054ae05de4..4f561109318 100644 --- a/x-pack/protocol/src/main/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequest.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/StopILMRequest.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.AcknowledgedRequest; @@ -47,4 +47,4 @@ public class StopILMRequest extends AcknowledgedRequest { } return true; } -} \ No newline at end of file +} diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java index fd21e6df3c1..b8975e66696 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndexLifecycleIT.java @@ -37,13 +37,13 @@ import org.elasticsearch.client.indexlifecycle.RolloverAction; import org.elasticsearch.client.indexlifecycle.ShrinkAction; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleResponse; -import org.elasticsearch.protocol.xpack.indexlifecycle.IndexLifecycleExplainResponse; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyResponse; -import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse; +import org.elasticsearch.client.indexlifecycle.IndexLifecycleExplainResponse; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyResponse; +import org.elasticsearch.client.indexlifecycle.StartILMRequest; +import org.elasticsearch.client.indexlifecycle.StopILMRequest; import org.hamcrest.Matchers; import java.io.IOException; diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java index cfbe729f25c..4a839b2f7b2 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java @@ -128,10 +128,10 @@ import org.elasticsearch.index.reindex.ReindexRequest; import org.elasticsearch.index.reindex.RemoteInfo; import org.elasticsearch.index.reindex.UpdateByQueryRequest; import org.elasticsearch.protocol.xpack.XPackInfoRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.ExplainLifecycleRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.SetIndexLifecyclePolicyRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StartILMRequest; -import org.elasticsearch.protocol.xpack.indexlifecycle.StopILMRequest; +import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest; +import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest; +import org.elasticsearch.client.indexlifecycle.StartILMRequest; +import org.elasticsearch.client.indexlifecycle.StopILMRequest; import org.elasticsearch.protocol.xpack.migration.IndexUpgradeInfoRequest; import org.elasticsearch.protocol.xpack.watcher.DeleteWatchRequest; import org.elasticsearch.protocol.xpack.watcher.PutWatchRequest; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequestTests.java similarity index 98% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequestTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequestTests.java index f0b3b39b46b..c9a4acb4890 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleRequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleRequestTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.common.io.stream.Writeable.Reader; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleResponseTests.java similarity index 97% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleResponseTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleResponseTests.java index 7d610ebf48a..348332f2f06 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/ExplainLifecycleResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/ExplainLifecycleResponseTests.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/IndexExplainResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/IndexExplainResponseTests.java similarity index 99% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/IndexExplainResponseTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/IndexExplainResponseTests.java index 6e1f3305932..681f58cffe8 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/IndexExplainResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/IndexExplainResponseTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesArray; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java similarity index 98% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java index fd1b7068a06..d925bcd8e95 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyRequestTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.test.AbstractStreamableTestCase; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java similarity index 98% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java index 9216d50b1ae..ffc2d83d747 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/SetIndexLifecyclePolicyResponseTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractStreamableXContentTestCase; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StartILMRequestTests.java similarity index 95% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequestTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StartILMRequestTests.java index 5c754ca8a48..f9da5d49e06 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StartILMRequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StartILMRequestTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.test.AbstractStreamableTestCase; diff --git a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequestTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StopILMRequestTests.java similarity index 95% rename from x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequestTests.java rename to client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StopILMRequestTests.java index 9e5640bbd15..8f1a3756c8a 100644 --- a/x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/indexlifecycle/StopILMRequestTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/StopILMRequestTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.protocol.xpack.indexlifecycle; +package org.elasticsearch.client.indexlifecycle; import org.elasticsearch.test.AbstractStreamableTestCase;