张世豪
13 小时以前 2eea735fd4ddf0ae047687780271ef3962d256cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package Mqttmessage.Entity;
 
 
import com.fasterxml.jackson.annotation.JsonProperty;
 
 
import java.util.Map;
 
/**
 * 设备响应消息实体类
 */
 
public class ResponseData {
 
    @JsonProperty("msg_id")
    private String msgId;
 
    private long timestamp;
 
    @JsonProperty("device_id")
    private String deviceId;
 
    @JsonProperty("original_msg_id")
    private String originalMsgId;
 
    private ResponseInfo response;
 
    // 构造函数
    public ResponseData() {
    }
 
    public ResponseData(String msgId, long timestamp, String deviceId, String originalMsgId, ResponseInfo response) {
        this.msgId = msgId;
        this.timestamp = timestamp;
        this.deviceId = deviceId;
        this.originalMsgId = originalMsgId;
        this.response = response;
    }
 
    public String getMsgId() {
        return msgId;
    }
 
    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }
 
    public long getTimestamp() {
        return timestamp;
    }
 
    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
 
    public String getDeviceId() {
        return deviceId;
    }
 
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }
 
    public String getOriginalMsgId() {
        return originalMsgId;
    }
 
    public void setOriginalMsgId(String originalMsgId) {
        this.originalMsgId = originalMsgId;
    }
 
    public ResponseInfo getResponse() {
        return response;
    }
 
    public void setResponse(ResponseInfo response) {
        this.response = response;
    }
 
    /**
     * 响应信息内部类
     */
 
    public static class ResponseInfo {
        private String status;
        private String command;
 
        @JsonProperty("error_code")
        private int errorCode;
 
        @JsonProperty("error_message")
        private String errorMessage;
 
        @JsonProperty("additional_info")
        private Map<String, Object> additionalInfo;
 
        public ResponseInfo() {
        }
 
        public ResponseInfo(String status, String command, int errorCode, String errorMessage,
                            Map<String, Object> additionalInfo) {
            this.status = status;
            this.command = command;
            this.errorCode = errorCode;
            this.errorMessage = errorMessage;
            this.additionalInfo = additionalInfo;
        }
 
        public String getStatus() {
            return status;
        }
 
        public void setStatus(String status) {
            this.status = status;
        }
 
        public String getCommand() {
            return command;
        }
 
        public void setCommand(String command) {
            this.command = command;
        }
 
        public int getErrorCode() {
            return errorCode;
        }
 
        public void setErrorCode(int errorCode) {
            this.errorCode = errorCode;
        }
 
        public String getErrorMessage() {
            return errorMessage;
        }
 
        public void setErrorMessage(String errorMessage) {
            this.errorMessage = errorMessage;
        }
 
        public Map<String, Object> getAdditionalInfo() {
            return additionalInfo;
        }
 
        public void setAdditionalInfo(Map<String, Object> additionalInfo) {
            this.additionalInfo = additionalInfo;
        }
    }
}