// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckAction.java
// public class ConsistencyCheckAction extends ClusterAction<ConsistencyCheckRequest, ConsistencyCheckResponse, ConsistencyCheckRequestBuilder> {
// 
//     public static final ConsistencyCheckAction INSTANCE = new ConsistencyCheckAction();
//     public static final String NAME = "cluster/state/consistencycheck";
// 
//     private ConsistencyCheckAction() {
//         super(NAME);
//     }
// 
//     @Override
//     public ConsistencyCheckResponse newResponse() {
//         return new ConsistencyCheckResponse();
//     }
// 
//     @Override
//     public ConsistencyCheckRequestBuilder newRequestBuilder(ClusterAdminClient client) {
//         return new ConsistencyCheckRequestBuilder(client);
//     }
// }
// 
// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckRequest.java
// public class ConsistencyCheckRequest extends MasterNodeOperationRequest<ConsistencyCheckRequest> {
// 
//     public ConsistencyCheckRequest() {
//     }
// 
//     @Override
//     public ActionRequestValidationException validate() {
//         return null;
//     }
// 
//     @Override
//     public void readFrom(StreamInput in) throws IOException {
//         super.readFrom(in);
//     }
// 
//     @Override
//     public void writeTo(StreamOutput out) throws IOException {
//         super.writeTo(out);
//     }
// }
// 
// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckResponse.java
// public class ConsistencyCheckResponse extends ActionResponse {
// 
//     private ClusterName clusterName;
// 
//     private ClusterState clusterState;
// 
//     private List<File> files;
// 
//     public ConsistencyCheckResponse() {
//     }
// 
//     ConsistencyCheckResponse(ClusterName clusterName, ClusterState clusterState, List<File> files) {
//         this.clusterName = clusterName;
//         this.clusterState = clusterState;
//         this.files = files;
//     }
// 
//     public ClusterState getState() {
//         return this.clusterState;
//     }
// 
//     public ClusterName getClusterName() {
//         return this.clusterName;
//     }
// 
//     public List<File> getFiles() {
//         return this.files;
//     }
// 
//     @Override
//     public void readFrom(StreamInput in) throws IOException {
//         super.readFrom(in);
//         clusterName = ClusterName.readClusterName(in);
//         clusterState = ClusterState.Builder.readFrom(in, null);
//         int n = in.read();
//         files = new ArrayList();
//         for (int i = 0; i < n; i++) {
//             files.set(i, new File(in.readString()));
//         }
//     }
// 
//     @Override
//     public void writeTo(StreamOutput out) throws IOException {
//         super.writeTo(out);
//         clusterName.writeTo(out);
//         ClusterState.Builder.writeTo(clusterState, out);
//         out.write(files.size());
//         for (File file : files) {
//             out.writeString(file.getAbsolutePath());
//         }
//     }
// }


import org.elasticsearch.client.Client;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.joda.time.Instant;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.SizeUnit;
import org.elasticsearch.common.unit.SizeValue;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.rest.*;
import org.elasticsearch.rest.action.support.RestResponseListener;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckAction;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckRequest;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckResponse;
import java.io.File;
import static org.elasticsearch.rest.RestRequest.Method.GET;
import static org.elasticsearch.rest.RestStatus.OK;

package org.xbib.elasticsearch.rest.action.skywalker;




/**
 * REST consistency check action
 */
public class RestConsistencyCheckAction extends BaseRestHandler {

    @Inject
    public RestConsistencyCheckAction(Settings settings, Client client, RestController controller) {
        super(settings, client);
        controller.registerHandler(GET, "/_skywalker/consistencycheck", this);
    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckAction.java
// public class ConsistencyCheckAction extends ClusterAction<ConsistencyCheckRequest, ConsistencyCheckResponse, ConsistencyCheckRequestBuilder> {
// 
//     public static final ConsistencyCheckAction INSTANCE = new ConsistencyCheckAction();
//     public static final String NAME = "cluster/state/consistencycheck";
// 
//     private ConsistencyCheckAction() {
//         super(NAME);
//     }
// 
//     @Override
//     public ConsistencyCheckResponse newResponse() {
//         return new ConsistencyCheckResponse();
//     }
// 
//     @Override
//     public ConsistencyCheckRequestBuilder newRequestBuilder(ClusterAdminClient client) {
//         return new ConsistencyCheckRequestBuilder(client);
//     }
// }
// 
// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckRequest.java
// public class ConsistencyCheckRequest extends MasterNodeOperationRequest<ConsistencyCheckRequest> {
// 
//     public ConsistencyCheckRequest() {
//     }
// 
//     @Override
//     public ActionRequestValidationException validate() {
//         return null;
//     }
// 
//     @Override
//     public void readFrom(StreamInput in) throws IOException {
//         super.readFrom(in);
//     }
// 
//     @Override
//     public void writeTo(StreamOutput out) throws IOException {
//         super.writeTo(out);
//     }
// }
// 
// Path: src/main/java/org/xbib/elasticsearch/action/admin/cluster/state/ConsistencyCheckResponse.java
// public class ConsistencyCheckResponse extends ActionResponse {
// 
//     private ClusterName clusterName;
// 
//     private ClusterState clusterState;
// 
//     private List<File> files;
// 
//     public ConsistencyCheckResponse() {
//     }
// 
//     ConsistencyCheckResponse(ClusterName clusterName, ClusterState clusterState, List<File> files) {
//         this.clusterName = clusterName;
//         this.clusterState = clusterState;
//         this.files = files;
//     }
// 
//     public ClusterState getState() {
//         return this.clusterState;
//     }
// 
//     public ClusterName getClusterName() {
//         return this.clusterName;
//     }
// 
//     public List<File> getFiles() {
//         return this.files;
//     }
// 
//     @Override
//     public void readFrom(StreamInput in) throws IOException {
//         super.readFrom(in);
//         clusterName = ClusterName.readClusterName(in);
//         clusterState = ClusterState.Builder.readFrom(in, null);
//         int n = in.read();
//         files = new ArrayList();
//         for (int i = 0; i < n; i++) {
//             files.set(i, new File(in.readString()));
//         }
//     }
// 
//     @Override
//     public void writeTo(StreamOutput out) throws IOException {
//         super.writeTo(out);
//         clusterName.writeTo(out);
//         ClusterState.Builder.writeTo(clusterState, out);
//         out.write(files.size());
//         for (File file : files) {
//             out.writeString(file.getAbsolutePath());
//         }
//     }
// }


// Path: src/main/java/org/xbib/elasticsearch/rest/action/skywalker/RestConsistencyCheckAction.java
import org.elasticsearch.client.Client;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.joda.time.Instant;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.SizeUnit;
import org.elasticsearch.common.unit.SizeValue;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.rest.*;
import org.elasticsearch.rest.action.support.RestResponseListener;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckAction;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckRequest;
import org.xbib.elasticsearch.action.admin.cluster.state.ConsistencyCheckResponse;
import java.io.File;
import static org.elasticsearch.rest.RestRequest.Method.GET;
import static org.elasticsearch.rest.RestStatus.OK;


package org.xbib.elasticsearch.rest.action.skywalker;




/**
 * REST consistency check action
 */
public class RestConsistencyCheckAction extends BaseRestHandler {

    @Inject
    public RestConsistencyCheckAction(Settings settings, Client client, RestController controller) {
        super(settings, client);
        controller.registerHandler(GET, "/_skywalker/consistencycheck", this);
    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
        ConsistencyCheckRequest r = new ConsistencyCheckRequest();