package util.sqlparse.visitor.es.api;

import com.chenyang.druid.sql.dialect.es.ast.EsParserContextBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Request {
   private Map<String, String> headers = new HashMap();
   private Map<String, String> query = new HashMap();
   private String host;
   private String path;
   private String method;
   private Set<String> indices;
   private String mapping;
   public List<EsParserContextBase> indexRefs = new ArrayList();
   public List<EsParserContextBase> mappingRefs = new ArrayList();
   public List<EsParserContextBase> fieldRefs = new ArrayList();
   private String body;

   public Map<String, String> getHeaders() {
      return this.headers;
   }

   public void setHeaders(Map<String, String> headers) {
      this.headers = headers;
   }

   public String getHost() {
      return this.host;
   }

   public void setHost(String host) {
      this.host = host;
   }

   public String getPath() {
      return this.path;
   }

   public void setPath(String path) {
      this.path = path;
   }

   public String getMethod() {
      return this.method;
   }

   public void setMethod(String method) {
      this.method = method;
   }

   public Map<String, String> getQuery() {
      return this.query;
   }

   public void setQuery(Map<String, String> query) {
      this.query = query;
   }

   public String getBody() {
      return this.body;
   }

   public void setBody(String body) {
      this.body = body;
   }

   public Set<String> getIndices() {
      return this.indices;
   }

   public void setIndex(String index) {
      if (index != null && index.length() != 0) {
         if (this.indices == null) {
            this.indices = new HashSet();
         }

         this.indices.add(index);
      }
   }

   public String getMapping() {
      return this.mapping;
   }

   public void setMapping(String mapping) {
      this.mapping = mapping;
   }
}
