package com.union.ai.api.dao.model;

import java.util.ArrayList;
import java.util.List;

public class ApiCondition {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected String index;

    protected int limitOffset = -1;

    protected int limitSize = 1;

    public ApiCondition() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setIndex(String index) {
        this.index=index;
    }

    public String getIndex() {
        return this.index;
    }

    public void setLimitOffset(int limitOffset) {
        this.limitOffset = limitOffset;
    }

    public void setLimitSize(int limitSize) {
        this.limitSize = limitSize;
    }

    public int getLimitOffset() {
        return limitOffset;
    }

    public int getLimitSize() {
        return limitSize;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andApiIdIsNull() {
            addCriterion("api_id is null");
            return (Criteria) this;
        }

        public Criteria andApiIdIsNotNull() {
            addCriterion("api_id is not null");
            return (Criteria) this;
        }

        public Criteria andApiIdEqualTo(Integer value) {
            addCriterion("api_id =", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdNotEqualTo(Integer value) {
            addCriterion("api_id <>", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdGreaterThan(Integer value) {
            addCriterion("api_id >", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("api_id >=", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdLessThan(Integer value) {
            addCriterion("api_id <", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdLessThanOrEqualTo(Integer value) {
            addCriterion("api_id <=", value, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdIn(List<Integer> values) {
            addCriterion("api_id in", values, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdNotIn(List<Integer> values) {
            addCriterion("api_id not in", values, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdBetween(Integer value1, Integer value2) {
            addCriterion("api_id between", value1, value2, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiIdNotBetween(Integer value1, Integer value2) {
            addCriterion("api_id not between", value1, value2, "apiId");
            return (Criteria) this;
        }

        public Criteria andApiNameIsNull() {
            addCriterion("api_name is null");
            return (Criteria) this;
        }

        public Criteria andApiNameIsNotNull() {
            addCriterion("api_name is not null");
            return (Criteria) this;
        }

        public Criteria andApiNameEqualTo(String value) {
            addCriterion("api_name =", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameNotEqualTo(String value) {
            addCriterion("api_name <>", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameGreaterThan(String value) {
            addCriterion("api_name >", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameGreaterThanOrEqualTo(String value) {
            addCriterion("api_name >=", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameLessThan(String value) {
            addCriterion("api_name <", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameLessThanOrEqualTo(String value) {
            addCriterion("api_name <=", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameLike(String value) {
            addCriterion("api_name like", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameNotLike(String value) {
            addCriterion("api_name not like", value, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameIn(List<String> values) {
            addCriterion("api_name in", values, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameNotIn(List<String> values) {
            addCriterion("api_name not in", values, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameBetween(String value1, String value2) {
            addCriterion("api_name between", value1, value2, "apiName");
            return (Criteria) this;
        }

        public Criteria andApiNameNotBetween(String value1, String value2) {
            addCriterion("api_name not between", value1, value2, "apiName");
            return (Criteria) this;
        }

        public Criteria andUrlIsNull() {
            addCriterion("url is null");
            return (Criteria) this;
        }

        public Criteria andUrlIsNotNull() {
            addCriterion("url is not null");
            return (Criteria) this;
        }

        public Criteria andUrlEqualTo(String value) {
            addCriterion("url =", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotEqualTo(String value) {
            addCriterion("url <>", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThan(String value) {
            addCriterion("url >", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThanOrEqualTo(String value) {
            addCriterion("url >=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThan(String value) {
            addCriterion("url <", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThanOrEqualTo(String value) {
            addCriterion("url <=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLike(String value) {
            addCriterion("url like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotLike(String value) {
            addCriterion("url not like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlIn(List<String> values) {
            addCriterion("url in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotIn(List<String> values) {
            addCriterion("url not in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlBetween(String value1, String value2) {
            addCriterion("url between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotBetween(String value1, String value2) {
            addCriterion("url not between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdIsNull() {
            addCriterion("api_type_id is null");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdIsNotNull() {
            addCriterion("api_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdEqualTo(Integer value) {
            addCriterion("api_type_id =", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdNotEqualTo(Integer value) {
            addCriterion("api_type_id <>", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdGreaterThan(Integer value) {
            addCriterion("api_type_id >", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("api_type_id >=", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdLessThan(Integer value) {
            addCriterion("api_type_id <", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("api_type_id <=", value, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdIn(List<Integer> values) {
            addCriterion("api_type_id in", values, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdNotIn(List<Integer> values) {
            addCriterion("api_type_id not in", values, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("api_type_id between", value1, value2, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andApiTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("api_type_id not between", value1, value2, "apiTypeId");
            return (Criteria) this;
        }

        public Criteria andCallLimitIsNull() {
            addCriterion("call_limit is null");
            return (Criteria) this;
        }

        public Criteria andCallLimitIsNotNull() {
            addCriterion("call_limit is not null");
            return (Criteria) this;
        }

        public Criteria andCallLimitEqualTo(String value) {
            addCriterion("call_limit =", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitNotEqualTo(String value) {
            addCriterion("call_limit <>", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitGreaterThan(String value) {
            addCriterion("call_limit >", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitGreaterThanOrEqualTo(String value) {
            addCriterion("call_limit >=", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitLessThan(String value) {
            addCriterion("call_limit <", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitLessThanOrEqualTo(String value) {
            addCriterion("call_limit <=", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitLike(String value) {
            addCriterion("call_limit like", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitNotLike(String value) {
            addCriterion("call_limit not like", value, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitIn(List<String> values) {
            addCriterion("call_limit in", values, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitNotIn(List<String> values) {
            addCriterion("call_limit not in", values, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitBetween(String value1, String value2) {
            addCriterion("call_limit between", value1, value2, "callLimit");
            return (Criteria) this;
        }

        public Criteria andCallLimitNotBetween(String value1, String value2) {
            addCriterion("call_limit not between", value1, value2, "callLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitIsNull() {
            addCriterion("qps_limit is null");
            return (Criteria) this;
        }

        public Criteria andQpsLimitIsNotNull() {
            addCriterion("qps_limit is not null");
            return (Criteria) this;
        }

        public Criteria andQpsLimitEqualTo(String value) {
            addCriterion("qps_limit =", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitNotEqualTo(String value) {
            addCriterion("qps_limit <>", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitGreaterThan(String value) {
            addCriterion("qps_limit >", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitGreaterThanOrEqualTo(String value) {
            addCriterion("qps_limit >=", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitLessThan(String value) {
            addCriterion("qps_limit <", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitLessThanOrEqualTo(String value) {
            addCriterion("qps_limit <=", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitLike(String value) {
            addCriterion("qps_limit like", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitNotLike(String value) {
            addCriterion("qps_limit not like", value, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitIn(List<String> values) {
            addCriterion("qps_limit in", values, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitNotIn(List<String> values) {
            addCriterion("qps_limit not in", values, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitBetween(String value1, String value2) {
            addCriterion("qps_limit between", value1, value2, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andQpsLimitNotBetween(String value1, String value2) {
            addCriterion("qps_limit not between", value1, value2, "qpsLimit");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNull() {
            addCriterion("description is null");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNotNull() {
            addCriterion("description is not null");
            return (Criteria) this;
        }

        public Criteria andDescriptionEqualTo(String value) {
            addCriterion("description =", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotEqualTo(String value) {
            addCriterion("description <>", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThan(String value) {
            addCriterion("description >", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion("description >=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThan(String value) {
            addCriterion("description <", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThanOrEqualTo(String value) {
            addCriterion("description <=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLike(String value) {
            addCriterion("description like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotLike(String value) {
            addCriterion("description not like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionIn(List<String> values) {
            addCriterion("description in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotIn(List<String> values) {
            addCriterion("description not in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionBetween(String value1, String value2) {
            addCriterion("description between", value1, value2, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotBetween(String value1, String value2) {
            addCriterion("description not between", value1, value2, "description");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}