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

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

public class AppApiCondition {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected String index;

    protected int limitOffset = -1;

    protected int limitSize = 1;

    public AppApiCondition() {
        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 andAppapiIdIsNull() {
            addCriterion("appapi_id is null");
            return (Criteria) this;
        }

        public Criteria andAppapiIdIsNotNull() {
            addCriterion("appapi_id is not null");
            return (Criteria) this;
        }

        public Criteria andAppapiIdEqualTo(Integer value) {
            addCriterion("appapi_id =", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdNotEqualTo(Integer value) {
            addCriterion("appapi_id <>", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdGreaterThan(Integer value) {
            addCriterion("appapi_id >", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("appapi_id >=", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdLessThan(Integer value) {
            addCriterion("appapi_id <", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdLessThanOrEqualTo(Integer value) {
            addCriterion("appapi_id <=", value, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdIn(List<Integer> values) {
            addCriterion("appapi_id in", values, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdNotIn(List<Integer> values) {
            addCriterion("appapi_id not in", values, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdBetween(Integer value1, Integer value2) {
            addCriterion("appapi_id between", value1, value2, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppapiIdNotBetween(Integer value1, Integer value2) {
            addCriterion("appapi_id not between", value1, value2, "appapiId");
            return (Criteria) this;
        }

        public Criteria andAppIdIsNull() {
            addCriterion("app_id is null");
            return (Criteria) this;
        }

        public Criteria andAppIdIsNotNull() {
            addCriterion("app_id is not null");
            return (Criteria) this;
        }

        public Criteria andAppIdEqualTo(Integer value) {
            addCriterion("app_id =", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdNotEqualTo(Integer value) {
            addCriterion("app_id <>", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdGreaterThan(Integer value) {
            addCriterion("app_id >", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("app_id >=", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdLessThan(Integer value) {
            addCriterion("app_id <", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdLessThanOrEqualTo(Integer value) {
            addCriterion("app_id <=", value, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdIn(List<Integer> values) {
            addCriterion("app_id in", values, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdNotIn(List<Integer> values) {
            addCriterion("app_id not in", values, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdBetween(Integer value1, Integer value2) {
            addCriterion("app_id between", value1, value2, "appId");
            return (Criteria) this;
        }

        public Criteria andAppIdNotBetween(Integer value1, Integer value2) {
            addCriterion("app_id not between", value1, value2, "appId");
            return (Criteria) this;
        }

        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 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 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 andQpsApplyIdIsNull() {
            addCriterion("qps_apply_id is null");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdIsNotNull() {
            addCriterion("qps_apply_id is not null");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdEqualTo(String value) {
            addCriterion("qps_apply_id =", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdNotEqualTo(String value) {
            addCriterion("qps_apply_id <>", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdGreaterThan(String value) {
            addCriterion("qps_apply_id >", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdGreaterThanOrEqualTo(String value) {
            addCriterion("qps_apply_id >=", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdLessThan(String value) {
            addCriterion("qps_apply_id <", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdLessThanOrEqualTo(String value) {
            addCriterion("qps_apply_id <=", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdLike(String value) {
            addCriterion("qps_apply_id like", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdNotLike(String value) {
            addCriterion("qps_apply_id not like", value, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdIn(List<String> values) {
            addCriterion("qps_apply_id in", values, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdNotIn(List<String> values) {
            addCriterion("qps_apply_id not in", values, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdBetween(String value1, String value2) {
            addCriterion("qps_apply_id between", value1, value2, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andQpsApplyIdNotBetween(String value1, String value2) {
            addCriterion("qps_apply_id not between", value1, value2, "qpsApplyId");
            return (Criteria) this;
        }

        public Criteria andUsedIsNull() {
            addCriterion("used is null");
            return (Criteria) this;
        }

        public Criteria andUsedIsNotNull() {
            addCriterion("used is not null");
            return (Criteria) this;
        }

        public Criteria andUsedEqualTo(String value) {
            addCriterion("used =", value, "used");
            return (Criteria) this;
        }

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

        public Criteria andUsedGreaterThan(String value) {
            addCriterion("used >", value, "used");
            return (Criteria) this;
        }

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

        public Criteria andUsedLessThan(String value) {
            addCriterion("used <", value, "used");
            return (Criteria) this;
        }

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

        public Criteria andUsedLike(String value) {
            addCriterion("used like", value, "used");
            return (Criteria) this;
        }

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

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

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

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

        public Criteria andUsedNotBetween(String value1, String value2) {
            addCriterion("used not between", value1, value2, "used");
            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);
        }
    }
}