|
6 | 6 | package org.elasticsearch.xpack.core.dataframe.action;
|
7 | 7 |
|
8 | 8 | import org.elasticsearch.action.Action;
|
9 |
| -import org.elasticsearch.action.ActionRequestBuilder; |
10 | 9 | import org.elasticsearch.action.ActionRequestValidationException;
|
11 | 10 | import org.elasticsearch.action.support.tasks.BaseTasksRequest;
|
12 | 11 | import org.elasticsearch.action.support.tasks.BaseTasksResponse;
|
13 |
| -import org.elasticsearch.client.ElasticsearchClient; |
14 | 12 | import org.elasticsearch.common.Nullable;
|
15 | 13 | import org.elasticsearch.common.io.stream.StreamInput;
|
16 | 14 | import org.elasticsearch.common.io.stream.StreamOutput;
|
17 | 15 | import org.elasticsearch.common.io.stream.Writeable;
|
18 | 16 | import org.elasticsearch.common.unit.TimeValue;
|
19 |
| -import org.elasticsearch.common.xcontent.ToXContent; |
20 | 17 | import org.elasticsearch.common.xcontent.ToXContentObject;
|
21 | 18 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
22 | 19 | import org.elasticsearch.tasks.Task;
|
@@ -44,7 +41,7 @@ public Response newResponse() {
|
44 | 41 | return new Response();
|
45 | 42 | }
|
46 | 43 |
|
47 |
| - public static class Request extends BaseTasksRequest<Request> implements ToXContent { |
| 44 | + public static class Request extends BaseTasksRequest<Request> { |
48 | 45 | private String id;
|
49 | 46 | private final boolean waitForCompletion;
|
50 | 47 | private final boolean force;
|
@@ -98,17 +95,6 @@ public ActionRequestValidationException validate() {
|
98 | 95 | return null;
|
99 | 96 | }
|
100 | 97 |
|
101 |
| - @Override |
102 |
| - public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { |
103 |
| - builder.field(DataFrameField.ID.getPreferredName(), id); |
104 |
| - builder.field(DataFrameField.WAIT_FOR_COMPLETION.getPreferredName(), waitForCompletion); |
105 |
| - builder.field(DataFrameField.FORCE.getPreferredName(), force); |
106 |
| - if (this.getTimeout() != null) { |
107 |
| - builder.field(DataFrameField.TIMEOUT.getPreferredName(), this.getTimeout()); |
108 |
| - } |
109 |
| - return builder; |
110 |
| - } |
111 |
| - |
112 | 98 | @Override
|
113 | 99 | public int hashCode() {
|
114 | 100 | // the base class does not implement hashCode, therefore we need to hash timeout ourselves
|
@@ -144,13 +130,6 @@ public boolean match(Task task) {
|
144 | 130 | }
|
145 | 131 | }
|
146 | 132 |
|
147 |
| - public static class RequestBuilder extends ActionRequestBuilder<Request, Response> { |
148 |
| - |
149 |
| - protected RequestBuilder(ElasticsearchClient client, StopDataFrameTransformAction action) { |
150 |
| - super(client, action, new Request()); |
151 |
| - } |
152 |
| - } |
153 |
| - |
154 | 133 | public static class Response extends BaseTasksResponse implements Writeable, ToXContentObject {
|
155 | 134 |
|
156 | 135 | private boolean stopped;
|
|
0 commit comments