package com.tax.sign.model;


import org.apache.commons.lang.StringUtils;

/**
 * Created by 曹小红 on 2017-04-11.
 */
public class RestfulApi {

    private String accessKeyID;
    private String timeStamp;
    private String signatureNonce;
    private String version;
    private String data;
    private String signature;
    private String type;
    private String taxno;

    public String getAccessKeyID() {
        return accessKeyID;
    }

    public void setAccessKeyID(String accessKeyID) {
        this.accessKeyID = accessKeyID;
    }

    public String getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(String timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getSignatureNonce() {
        return signatureNonce;
    }

    public void setSignatureNonce(String signatureNonce) {
        this.signatureNonce = signatureNonce;
    }

    public String getVersion() {
        return version;
    }

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

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTaxno() {
        return taxno;
    }

    public void setTaxno(String taxno) {
        this.taxno = taxno;
    }

    public boolean isHaveNull() {
        if(StringUtils.isEmpty(getAccessKeyID())
                || StringUtils.isEmpty(getTimeStamp()) || StringUtils.isEmpty(getSignatureNonce())
                || StringUtils.isEmpty(getVersion()) || StringUtils.isEmpty(getSignature())) {
            return true;
        }
        return false;
    }

    public String getSignStr() {
            return "accessKeyID=" + getAccessKeyID() + "&signatureNonce=" + getSignatureNonce()
                    + "&timeStamp=" + getTimeStamp() + "&version=" + getVersion();
    }
}
