Remove toXContent from autoscaling request classess (#54643)
These methods are not needed, we were only following a pattern in the rest of the codebase, but it's legacy from the HLRC sharing request/response objects with the server.
This commit is contained in:
parent
4882bb5cd8
commit
7467cc04ec
|
@ -12,8 +12,6 @@ import org.elasticsearch.action.support.master.AcknowledgedRequest;
|
|||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
@ -27,7 +25,7 @@ public class DeleteAutoscalingPolicyAction extends ActionType<AcknowledgedRespon
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static class Request extends AcknowledgedRequest<DeleteAutoscalingPolicyAction.Request> implements ToXContentObject {
|
||||
public static class Request extends AcknowledgedRequest<DeleteAutoscalingPolicyAction.Request> {
|
||||
|
||||
private final String name;
|
||||
|
||||
|
@ -55,16 +53,6 @@ public class DeleteAutoscalingPolicyAction extends ActionType<AcknowledgedRespon
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(final XContentBuilder builder, final Params params) throws IOException {
|
||||
builder.startObject();
|
||||
{
|
||||
|
||||
}
|
||||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class GetAutoscalingDecisionAction extends ActionType<GetAutoscalingDecis
|
|||
super(NAME, Response::new);
|
||||
}
|
||||
|
||||
public static class Request extends AcknowledgedRequest<GetAutoscalingDecisionAction.Request> implements ToXContentObject {
|
||||
public static class Request extends AcknowledgedRequest<GetAutoscalingDecisionAction.Request> {
|
||||
|
||||
public Request() {
|
||||
|
||||
|
@ -51,16 +51,6 @@ public class GetAutoscalingDecisionAction extends ActionType<GetAutoscalingDecis
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(final XContentBuilder builder, final Params params) throws IOException {
|
||||
builder.startObject();
|
||||
{
|
||||
|
||||
}
|
||||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Response extends ActionResponse implements ToXContentObject {
|
||||
|
|
|
@ -14,8 +14,6 @@ import org.elasticsearch.common.ParseField;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.xpack.autoscaling.policy.AutoscalingPolicy;
|
||||
|
||||
|
@ -30,7 +28,7 @@ public class PutAutoscalingPolicyAction extends ActionType<AcknowledgedResponse>
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static class Request extends AcknowledgedRequest<Request> implements ToXContentObject {
|
||||
public static class Request extends AcknowledgedRequest<Request> {
|
||||
|
||||
static final ParseField POLICY_FIELD = new ParseField("policy");
|
||||
|
||||
|
@ -75,16 +73,6 @@ public class PutAutoscalingPolicyAction extends ActionType<AcknowledgedResponse>
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(final XContentBuilder builder, final Params params) throws IOException {
|
||||
builder.startObject();
|
||||
{
|
||||
builder.field(POLICY_FIELD.getPreferredName(), policy);
|
||||
}
|
||||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue