@@ -74,6 +74,11 @@ public class DeviceCommand implements HiveEntity, HazelcastEntity, Portable {
74
74
POST_COMMAND_TO_DEVICE , COMMAND_LISTED })
75
75
private String deviceId ;
76
76
77
+ @ SerializedName ("networkId" )
78
+ @ JsonPolicyDef ({COMMAND_FROM_CLIENT , COMMAND_TO_DEVICE , COMMAND_UPDATE_TO_CLIENT , COMMAND_UPDATE_FROM_DEVICE ,
79
+ POST_COMMAND_TO_DEVICE , COMMAND_LISTED })
80
+ private Long networkId ;
81
+
77
82
@ SerializedName ("parameters" )
78
83
@ JsonPolicyDef ({COMMAND_FROM_CLIENT , COMMAND_TO_DEVICE , COMMAND_UPDATE_TO_CLIENT , COMMAND_UPDATE_FROM_DEVICE ,
79
84
POST_COMMAND_TO_DEVICE , COMMAND_LISTED })
@@ -150,6 +155,14 @@ public void setDeviceId(String deviceId) {
150
155
this .deviceId = deviceId ;
151
156
}
152
157
158
+ public Long getNetworkId () {
159
+ return networkId ;
160
+ }
161
+
162
+ public void setNetworkId (Long networkId ) {
163
+ this .networkId = networkId ;
164
+ }
165
+
153
166
public JsonStringWrapper getParameters () {
154
167
return parameters ;
155
168
}
@@ -199,6 +212,7 @@ public boolean equals(Object o) {
199
212
200
213
if (command != null ? !command .equals (message .command ) : message .command != null ) return false ;
201
214
if (deviceId != null ? !deviceId .equals (message .deviceId ) : message .deviceId != null ) return false ;
215
+ if (networkId != null ? !networkId .equals (message .networkId ) : message .networkId != null ) return false ;
202
216
if (id != null ? !id .equals (message .id ) : message .id != null ) return false ;
203
217
if (isUpdated != null ? !isUpdated .equals (message .isUpdated ) : message .isUpdated != null ) return false ;
204
218
if (lifetime != null ? !lifetime .equals (message .lifetime ) : message .lifetime != null ) return false ;
@@ -218,6 +232,7 @@ public int hashCode() {
218
232
result1 = 31 * result1 + (timestamp != null ? timestamp .hashCode () : 0 );
219
233
result1 = 31 * result1 + (userId != null ? userId .hashCode () : 0 );
220
234
result1 = 31 * result1 + (deviceId != null ? deviceId .hashCode () : 0 );
235
+ result1 = 31 * result1 + (networkId != null ? networkId .hashCode () : 0 );
221
236
result1 = 31 * result1 + (parameters != null ? parameters .hashCode () : 0 );
222
237
result1 = 31 * result1 + (lifetime != null ? lifetime .hashCode () : 0 );
223
238
result1 = 31 * result1 + (status != null ? status .hashCode () : 0 );
@@ -235,6 +250,7 @@ public String toString() {
235
250
", lastUpdated=" + lastUpdated +
236
251
", userId=" + userId +
237
252
", deviceId='" + deviceId + '\'' +
253
+ ", networkId='" + networkId + '\'' +
238
254
", parameters=" + parameters +
239
255
", lifetime=" + lifetime +
240
256
", status='" + status + '\'' +
@@ -269,6 +285,7 @@ public void writePortable(PortableWriter portableWriter) throws IOException {
269
285
portableWriter .writeLong ("lastUpdated" , Objects .nonNull (lastUpdated ) ? lastUpdated .getTime () :0 );
270
286
portableWriter .writeLong ("userId" , Objects .nonNull (userId ) ? userId : 0 );
271
287
portableWriter .writeUTF ("deviceId" , deviceId );
288
+ portableWriter .writeLong ("networkId" , Objects .nonNull (networkId ) ? networkId : 0 );
272
289
boolean parametersIsNotNull = Objects .nonNull (parameters ) && Objects .nonNull (parameters .getJsonString ());
273
290
portableWriter .writeUTF ("parameters" , parametersIsNotNull ? parameters .getJsonString () : null );
274
291
portableWriter .writeInt ("lifetime" , Objects .nonNull (lifetime ) ? lifetime : 0 );
@@ -286,6 +303,7 @@ public void readPortable(PortableReader portableReader) throws IOException {
286
303
lastUpdated = new Date (portableReader .readLong ("lastUpdated" ));
287
304
userId = portableReader .readLong ("userId" );
288
305
deviceId = portableReader .readUTF ("deviceId" );
306
+ networkId = portableReader .readLong ("networkId" );
289
307
String parametersString = portableReader .readUTF ("parameters" );
290
308
if (Objects .nonNull (parametersString )) {
291
309
parameters = new JsonStringWrapper (parametersString );
0 commit comments