package com.police.policedatasystem.http.requestparams;

import java.io.Serializable;
import java.util.List;

public class RequestParams implements Serializable {
    private String messageId;//自定义唯一值，建议 UUID.randomUUID().toString()
    private String version;//服务总线版本号,目前填写 1.0 即可
    private Parameter parameter;//结构体中参数释义如下

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Parameter getParameter() {
        return parameter;
    }

    public void setParameter(Parameter parameter) {
        this.parameter = parameter;
    }

    public static class Page {
        public int pageSize = 1;
        public int pageNo = 1;
    }

    public static class Parameter implements Serializable {
        private Condition condition;//（条件）结构体释义如下
        private String dataObjId; //应用商店注册对应的资源 id
        private String fields;//后台约定字段，可咨询后台开发人员
        private String networkCode;//网络类型，应用商店注册对应的网络类型
        private String orderBy;//排序字段,可空
        private Page page;//页码信息，非空
        private String regionalismCode; //区域代码 应用商店注册 app 对应的区域代码

        public Condition getCondition() {
            return condition;
        }

        public void setCondition(Condition condition) {
            this.condition = condition;
        }

        public String getDataObjId() {
            return dataObjId;
        }

        public void setDataObjId(String dataObjId) {
            this.dataObjId = dataObjId;
        }

        public String getFields() {
            return fields;
        }

        public void setFields(String fields) {
            this.fields = fields;
        }

        public String getNetworkCode() {
            return networkCode;
        }

        public void setNetworkCode(String networkCode) {
            this.networkCode = networkCode;
        }

        public String getOrderBy() {
            return orderBy;
        }

        public void setOrderBy(String orderBy) {
            this.orderBy = orderBy;
        }

        public Page getPage() {
            return page;
        }

        public void setPage(Page page) {
            this.page = page;
        }

        public String getRegionalismCode() {
            return regionalismCode;
        }

        public void setRegionalismCode(String regionalismCode) {
            this.regionalismCode = regionalismCode;
        }
    }

    public static class Condition implements Serializable {
        private String logicalOperate = "and";//操作符，传值 and
        private List<KeyValues> keyValueList;//集合，里面装的键值对，字段解释如下

        public String getLogicalOperate() {
            return logicalOperate;
        }

        public void setLogicalOperate(String logicalOperate) {
            this.logicalOperate = logicalOperate;
        }

        public List<KeyValues> getKeyValueList() {
            return keyValueList;
        }

        public void setKeyValueList(List<KeyValues> keyValueList) {
            this.keyValueList = keyValueList;
        }
    }

    public static class KeyValues implements Serializable {
        private String key;//跟后台约定，你想放在服务总线接口里面入参的 key
        private String value;//自己后台接口需要的入参实际值,可放自己接口需要的 json 值
        private String relationOperator = "=";//关系符 传=

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public String getRelationOperator() {
            return relationOperator;
        }

        public void setRelationOperator(String relationOperator) {
            this.relationOperator = relationOperator;
        }
    }
}
