| 5535 |
amar.kumar |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.alert;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class AlertMapper implements org.apache.thrift.TBase<AlertMapper, AlertMapper._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlertMapper");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField ENTITY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("entityType", org.apache.thrift.protocol.TType.I32, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField EVENTDESCIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("eventdesciption", org.apache.thrift.protocol.TType.STRING, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField ALERT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("alertType", org.apache.thrift.protocol.TType.I32, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField USER_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("userIds", org.apache.thrift.protocol.TType.STRING, (short)5);
|
|
|
31 |
|
|
|
32 |
private EntityType entityType; // required
|
|
|
33 |
private int eventType; // required
|
|
|
34 |
private String eventdesciption; // required
|
|
|
35 |
private AlertType alertType; // required
|
|
|
36 |
private String userIds; // required
|
|
|
37 |
|
|
|
38 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
39 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
40 |
/**
|
|
|
41 |
*
|
|
|
42 |
* @see EntityType
|
|
|
43 |
*/
|
|
|
44 |
ENTITY_TYPE((short)1, "entityType"),
|
|
|
45 |
EVENT_TYPE((short)2, "eventType"),
|
|
|
46 |
EVENTDESCIPTION((short)3, "eventdesciption"),
|
|
|
47 |
/**
|
|
|
48 |
*
|
|
|
49 |
* @see AlertType
|
|
|
50 |
*/
|
|
|
51 |
ALERT_TYPE((short)4, "alertType"),
|
|
|
52 |
USER_IDS((short)5, "userIds");
|
|
|
53 |
|
|
|
54 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
55 |
|
|
|
56 |
static {
|
|
|
57 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
58 |
byName.put(field.getFieldName(), field);
|
|
|
59 |
}
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
/**
|
|
|
63 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
64 |
*/
|
|
|
65 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
66 |
switch(fieldId) {
|
|
|
67 |
case 1: // ENTITY_TYPE
|
|
|
68 |
return ENTITY_TYPE;
|
|
|
69 |
case 2: // EVENT_TYPE
|
|
|
70 |
return EVENT_TYPE;
|
|
|
71 |
case 3: // EVENTDESCIPTION
|
|
|
72 |
return EVENTDESCIPTION;
|
|
|
73 |
case 4: // ALERT_TYPE
|
|
|
74 |
return ALERT_TYPE;
|
|
|
75 |
case 5: // USER_IDS
|
|
|
76 |
return USER_IDS;
|
|
|
77 |
default:
|
|
|
78 |
return null;
|
|
|
79 |
}
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
/**
|
|
|
83 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
84 |
* if it is not found.
|
|
|
85 |
*/
|
|
|
86 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
87 |
_Fields fields = findByThriftId(fieldId);
|
|
|
88 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
89 |
return fields;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
/**
|
|
|
93 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
94 |
*/
|
|
|
95 |
public static _Fields findByName(String name) {
|
|
|
96 |
return byName.get(name);
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
private final short _thriftId;
|
|
|
100 |
private final String _fieldName;
|
|
|
101 |
|
|
|
102 |
_Fields(short thriftId, String fieldName) {
|
|
|
103 |
_thriftId = thriftId;
|
|
|
104 |
_fieldName = fieldName;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public short getThriftFieldId() {
|
|
|
108 |
return _thriftId;
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
public String getFieldName() {
|
|
|
112 |
return _fieldName;
|
|
|
113 |
}
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
// isset id assignments
|
|
|
117 |
private static final int __EVENTTYPE_ISSET_ID = 0;
|
|
|
118 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
119 |
|
|
|
120 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
121 |
static {
|
|
|
122 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
123 |
tmpMap.put(_Fields.ENTITY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("entityType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
124 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EntityType.class)));
|
|
|
125 |
tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
126 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
|
|
127 |
tmpMap.put(_Fields.EVENTDESCIPTION, new org.apache.thrift.meta_data.FieldMetaData("eventdesciption", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
128 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
129 |
tmpMap.put(_Fields.ALERT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("alertType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
130 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AlertType.class)));
|
|
|
131 |
tmpMap.put(_Fields.USER_IDS, new org.apache.thrift.meta_data.FieldMetaData("userIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
132 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
133 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
134 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlertMapper.class, metaDataMap);
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
public AlertMapper() {
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
public AlertMapper(
|
|
|
141 |
EntityType entityType,
|
|
|
142 |
int eventType,
|
|
|
143 |
String eventdesciption,
|
|
|
144 |
AlertType alertType,
|
|
|
145 |
String userIds)
|
|
|
146 |
{
|
|
|
147 |
this();
|
|
|
148 |
this.entityType = entityType;
|
|
|
149 |
this.eventType = eventType;
|
|
|
150 |
setEventTypeIsSet(true);
|
|
|
151 |
this.eventdesciption = eventdesciption;
|
|
|
152 |
this.alertType = alertType;
|
|
|
153 |
this.userIds = userIds;
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
/**
|
|
|
157 |
* Performs a deep copy on <i>other</i>.
|
|
|
158 |
*/
|
|
|
159 |
public AlertMapper(AlertMapper other) {
|
|
|
160 |
__isset_bit_vector.clear();
|
|
|
161 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
162 |
if (other.isSetEntityType()) {
|
|
|
163 |
this.entityType = other.entityType;
|
|
|
164 |
}
|
|
|
165 |
this.eventType = other.eventType;
|
|
|
166 |
if (other.isSetEventdesciption()) {
|
|
|
167 |
this.eventdesciption = other.eventdesciption;
|
|
|
168 |
}
|
|
|
169 |
if (other.isSetAlertType()) {
|
|
|
170 |
this.alertType = other.alertType;
|
|
|
171 |
}
|
|
|
172 |
if (other.isSetUserIds()) {
|
|
|
173 |
this.userIds = other.userIds;
|
|
|
174 |
}
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
public AlertMapper deepCopy() {
|
|
|
178 |
return new AlertMapper(this);
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
@Override
|
|
|
182 |
public void clear() {
|
|
|
183 |
this.entityType = null;
|
|
|
184 |
setEventTypeIsSet(false);
|
|
|
185 |
this.eventType = 0;
|
|
|
186 |
this.eventdesciption = null;
|
|
|
187 |
this.alertType = null;
|
|
|
188 |
this.userIds = null;
|
|
|
189 |
}
|
|
|
190 |
|
|
|
191 |
/**
|
|
|
192 |
*
|
|
|
193 |
* @see EntityType
|
|
|
194 |
*/
|
|
|
195 |
public EntityType getEntityType() {
|
|
|
196 |
return this.entityType;
|
|
|
197 |
}
|
|
|
198 |
|
|
|
199 |
/**
|
|
|
200 |
*
|
|
|
201 |
* @see EntityType
|
|
|
202 |
*/
|
|
|
203 |
public void setEntityType(EntityType entityType) {
|
|
|
204 |
this.entityType = entityType;
|
|
|
205 |
}
|
|
|
206 |
|
|
|
207 |
public void unsetEntityType() {
|
|
|
208 |
this.entityType = null;
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
/** Returns true if field entityType is set (has been assigned a value) and false otherwise */
|
|
|
212 |
public boolean isSetEntityType() {
|
|
|
213 |
return this.entityType != null;
|
|
|
214 |
}
|
|
|
215 |
|
|
|
216 |
public void setEntityTypeIsSet(boolean value) {
|
|
|
217 |
if (!value) {
|
|
|
218 |
this.entityType = null;
|
|
|
219 |
}
|
|
|
220 |
}
|
|
|
221 |
|
|
|
222 |
public int getEventType() {
|
|
|
223 |
return this.eventType;
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
public void setEventType(int eventType) {
|
|
|
227 |
this.eventType = eventType;
|
|
|
228 |
setEventTypeIsSet(true);
|
|
|
229 |
}
|
|
|
230 |
|
|
|
231 |
public void unsetEventType() {
|
|
|
232 |
__isset_bit_vector.clear(__EVENTTYPE_ISSET_ID);
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
/** Returns true if field eventType is set (has been assigned a value) and false otherwise */
|
|
|
236 |
public boolean isSetEventType() {
|
|
|
237 |
return __isset_bit_vector.get(__EVENTTYPE_ISSET_ID);
|
|
|
238 |
}
|
|
|
239 |
|
|
|
240 |
public void setEventTypeIsSet(boolean value) {
|
|
|
241 |
__isset_bit_vector.set(__EVENTTYPE_ISSET_ID, value);
|
|
|
242 |
}
|
|
|
243 |
|
|
|
244 |
public String getEventdesciption() {
|
|
|
245 |
return this.eventdesciption;
|
|
|
246 |
}
|
|
|
247 |
|
|
|
248 |
public void setEventdesciption(String eventdesciption) {
|
|
|
249 |
this.eventdesciption = eventdesciption;
|
|
|
250 |
}
|
|
|
251 |
|
|
|
252 |
public void unsetEventdesciption() {
|
|
|
253 |
this.eventdesciption = null;
|
|
|
254 |
}
|
|
|
255 |
|
|
|
256 |
/** Returns true if field eventdesciption is set (has been assigned a value) and false otherwise */
|
|
|
257 |
public boolean isSetEventdesciption() {
|
|
|
258 |
return this.eventdesciption != null;
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
public void setEventdesciptionIsSet(boolean value) {
|
|
|
262 |
if (!value) {
|
|
|
263 |
this.eventdesciption = null;
|
|
|
264 |
}
|
|
|
265 |
}
|
|
|
266 |
|
|
|
267 |
/**
|
|
|
268 |
*
|
|
|
269 |
* @see AlertType
|
|
|
270 |
*/
|
|
|
271 |
public AlertType getAlertType() {
|
|
|
272 |
return this.alertType;
|
|
|
273 |
}
|
|
|
274 |
|
|
|
275 |
/**
|
|
|
276 |
*
|
|
|
277 |
* @see AlertType
|
|
|
278 |
*/
|
|
|
279 |
public void setAlertType(AlertType alertType) {
|
|
|
280 |
this.alertType = alertType;
|
|
|
281 |
}
|
|
|
282 |
|
|
|
283 |
public void unsetAlertType() {
|
|
|
284 |
this.alertType = null;
|
|
|
285 |
}
|
|
|
286 |
|
|
|
287 |
/** Returns true if field alertType is set (has been assigned a value) and false otherwise */
|
|
|
288 |
public boolean isSetAlertType() {
|
|
|
289 |
return this.alertType != null;
|
|
|
290 |
}
|
|
|
291 |
|
|
|
292 |
public void setAlertTypeIsSet(boolean value) {
|
|
|
293 |
if (!value) {
|
|
|
294 |
this.alertType = null;
|
|
|
295 |
}
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
public String getUserIds() {
|
|
|
299 |
return this.userIds;
|
|
|
300 |
}
|
|
|
301 |
|
|
|
302 |
public void setUserIds(String userIds) {
|
|
|
303 |
this.userIds = userIds;
|
|
|
304 |
}
|
|
|
305 |
|
|
|
306 |
public void unsetUserIds() {
|
|
|
307 |
this.userIds = null;
|
|
|
308 |
}
|
|
|
309 |
|
|
|
310 |
/** Returns true if field userIds is set (has been assigned a value) and false otherwise */
|
|
|
311 |
public boolean isSetUserIds() {
|
|
|
312 |
return this.userIds != null;
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
public void setUserIdsIsSet(boolean value) {
|
|
|
316 |
if (!value) {
|
|
|
317 |
this.userIds = null;
|
|
|
318 |
}
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
322 |
switch (field) {
|
|
|
323 |
case ENTITY_TYPE:
|
|
|
324 |
if (value == null) {
|
|
|
325 |
unsetEntityType();
|
|
|
326 |
} else {
|
|
|
327 |
setEntityType((EntityType)value);
|
|
|
328 |
}
|
|
|
329 |
break;
|
|
|
330 |
|
|
|
331 |
case EVENT_TYPE:
|
|
|
332 |
if (value == null) {
|
|
|
333 |
unsetEventType();
|
|
|
334 |
} else {
|
|
|
335 |
setEventType((Integer)value);
|
|
|
336 |
}
|
|
|
337 |
break;
|
|
|
338 |
|
|
|
339 |
case EVENTDESCIPTION:
|
|
|
340 |
if (value == null) {
|
|
|
341 |
unsetEventdesciption();
|
|
|
342 |
} else {
|
|
|
343 |
setEventdesciption((String)value);
|
|
|
344 |
}
|
|
|
345 |
break;
|
|
|
346 |
|
|
|
347 |
case ALERT_TYPE:
|
|
|
348 |
if (value == null) {
|
|
|
349 |
unsetAlertType();
|
|
|
350 |
} else {
|
|
|
351 |
setAlertType((AlertType)value);
|
|
|
352 |
}
|
|
|
353 |
break;
|
|
|
354 |
|
|
|
355 |
case USER_IDS:
|
|
|
356 |
if (value == null) {
|
|
|
357 |
unsetUserIds();
|
|
|
358 |
} else {
|
|
|
359 |
setUserIds((String)value);
|
|
|
360 |
}
|
|
|
361 |
break;
|
|
|
362 |
|
|
|
363 |
}
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
public Object getFieldValue(_Fields field) {
|
|
|
367 |
switch (field) {
|
|
|
368 |
case ENTITY_TYPE:
|
|
|
369 |
return getEntityType();
|
|
|
370 |
|
|
|
371 |
case EVENT_TYPE:
|
|
|
372 |
return Integer.valueOf(getEventType());
|
|
|
373 |
|
|
|
374 |
case EVENTDESCIPTION:
|
|
|
375 |
return getEventdesciption();
|
|
|
376 |
|
|
|
377 |
case ALERT_TYPE:
|
|
|
378 |
return getAlertType();
|
|
|
379 |
|
|
|
380 |
case USER_IDS:
|
|
|
381 |
return getUserIds();
|
|
|
382 |
|
|
|
383 |
}
|
|
|
384 |
throw new IllegalStateException();
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
388 |
public boolean isSet(_Fields field) {
|
|
|
389 |
if (field == null) {
|
|
|
390 |
throw new IllegalArgumentException();
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
switch (field) {
|
|
|
394 |
case ENTITY_TYPE:
|
|
|
395 |
return isSetEntityType();
|
|
|
396 |
case EVENT_TYPE:
|
|
|
397 |
return isSetEventType();
|
|
|
398 |
case EVENTDESCIPTION:
|
|
|
399 |
return isSetEventdesciption();
|
|
|
400 |
case ALERT_TYPE:
|
|
|
401 |
return isSetAlertType();
|
|
|
402 |
case USER_IDS:
|
|
|
403 |
return isSetUserIds();
|
|
|
404 |
}
|
|
|
405 |
throw new IllegalStateException();
|
|
|
406 |
}
|
|
|
407 |
|
|
|
408 |
@Override
|
|
|
409 |
public boolean equals(Object that) {
|
|
|
410 |
if (that == null)
|
|
|
411 |
return false;
|
|
|
412 |
if (that instanceof AlertMapper)
|
|
|
413 |
return this.equals((AlertMapper)that);
|
|
|
414 |
return false;
|
|
|
415 |
}
|
|
|
416 |
|
|
|
417 |
public boolean equals(AlertMapper that) {
|
|
|
418 |
if (that == null)
|
|
|
419 |
return false;
|
|
|
420 |
|
|
|
421 |
boolean this_present_entityType = true && this.isSetEntityType();
|
|
|
422 |
boolean that_present_entityType = true && that.isSetEntityType();
|
|
|
423 |
if (this_present_entityType || that_present_entityType) {
|
|
|
424 |
if (!(this_present_entityType && that_present_entityType))
|
|
|
425 |
return false;
|
|
|
426 |
if (!this.entityType.equals(that.entityType))
|
|
|
427 |
return false;
|
|
|
428 |
}
|
|
|
429 |
|
|
|
430 |
boolean this_present_eventType = true;
|
|
|
431 |
boolean that_present_eventType = true;
|
|
|
432 |
if (this_present_eventType || that_present_eventType) {
|
|
|
433 |
if (!(this_present_eventType && that_present_eventType))
|
|
|
434 |
return false;
|
|
|
435 |
if (this.eventType != that.eventType)
|
|
|
436 |
return false;
|
|
|
437 |
}
|
|
|
438 |
|
|
|
439 |
boolean this_present_eventdesciption = true && this.isSetEventdesciption();
|
|
|
440 |
boolean that_present_eventdesciption = true && that.isSetEventdesciption();
|
|
|
441 |
if (this_present_eventdesciption || that_present_eventdesciption) {
|
|
|
442 |
if (!(this_present_eventdesciption && that_present_eventdesciption))
|
|
|
443 |
return false;
|
|
|
444 |
if (!this.eventdesciption.equals(that.eventdesciption))
|
|
|
445 |
return false;
|
|
|
446 |
}
|
|
|
447 |
|
|
|
448 |
boolean this_present_alertType = true && this.isSetAlertType();
|
|
|
449 |
boolean that_present_alertType = true && that.isSetAlertType();
|
|
|
450 |
if (this_present_alertType || that_present_alertType) {
|
|
|
451 |
if (!(this_present_alertType && that_present_alertType))
|
|
|
452 |
return false;
|
|
|
453 |
if (!this.alertType.equals(that.alertType))
|
|
|
454 |
return false;
|
|
|
455 |
}
|
|
|
456 |
|
|
|
457 |
boolean this_present_userIds = true && this.isSetUserIds();
|
|
|
458 |
boolean that_present_userIds = true && that.isSetUserIds();
|
|
|
459 |
if (this_present_userIds || that_present_userIds) {
|
|
|
460 |
if (!(this_present_userIds && that_present_userIds))
|
|
|
461 |
return false;
|
|
|
462 |
if (!this.userIds.equals(that.userIds))
|
|
|
463 |
return false;
|
|
|
464 |
}
|
|
|
465 |
|
|
|
466 |
return true;
|
|
|
467 |
}
|
|
|
468 |
|
|
|
469 |
@Override
|
|
|
470 |
public int hashCode() {
|
|
|
471 |
return 0;
|
|
|
472 |
}
|
|
|
473 |
|
|
|
474 |
public int compareTo(AlertMapper other) {
|
|
|
475 |
if (!getClass().equals(other.getClass())) {
|
|
|
476 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
477 |
}
|
|
|
478 |
|
|
|
479 |
int lastComparison = 0;
|
|
|
480 |
AlertMapper typedOther = (AlertMapper)other;
|
|
|
481 |
|
|
|
482 |
lastComparison = Boolean.valueOf(isSetEntityType()).compareTo(typedOther.isSetEntityType());
|
|
|
483 |
if (lastComparison != 0) {
|
|
|
484 |
return lastComparison;
|
|
|
485 |
}
|
|
|
486 |
if (isSetEntityType()) {
|
|
|
487 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityType, typedOther.entityType);
|
|
|
488 |
if (lastComparison != 0) {
|
|
|
489 |
return lastComparison;
|
|
|
490 |
}
|
|
|
491 |
}
|
|
|
492 |
lastComparison = Boolean.valueOf(isSetEventType()).compareTo(typedOther.isSetEventType());
|
|
|
493 |
if (lastComparison != 0) {
|
|
|
494 |
return lastComparison;
|
|
|
495 |
}
|
|
|
496 |
if (isSetEventType()) {
|
|
|
497 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, typedOther.eventType);
|
|
|
498 |
if (lastComparison != 0) {
|
|
|
499 |
return lastComparison;
|
|
|
500 |
}
|
|
|
501 |
}
|
|
|
502 |
lastComparison = Boolean.valueOf(isSetEventdesciption()).compareTo(typedOther.isSetEventdesciption());
|
|
|
503 |
if (lastComparison != 0) {
|
|
|
504 |
return lastComparison;
|
|
|
505 |
}
|
|
|
506 |
if (isSetEventdesciption()) {
|
|
|
507 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventdesciption, typedOther.eventdesciption);
|
|
|
508 |
if (lastComparison != 0) {
|
|
|
509 |
return lastComparison;
|
|
|
510 |
}
|
|
|
511 |
}
|
|
|
512 |
lastComparison = Boolean.valueOf(isSetAlertType()).compareTo(typedOther.isSetAlertType());
|
|
|
513 |
if (lastComparison != 0) {
|
|
|
514 |
return lastComparison;
|
|
|
515 |
}
|
|
|
516 |
if (isSetAlertType()) {
|
|
|
517 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alertType, typedOther.alertType);
|
|
|
518 |
if (lastComparison != 0) {
|
|
|
519 |
return lastComparison;
|
|
|
520 |
}
|
|
|
521 |
}
|
|
|
522 |
lastComparison = Boolean.valueOf(isSetUserIds()).compareTo(typedOther.isSetUserIds());
|
|
|
523 |
if (lastComparison != 0) {
|
|
|
524 |
return lastComparison;
|
|
|
525 |
}
|
|
|
526 |
if (isSetUserIds()) {
|
|
|
527 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userIds, typedOther.userIds);
|
|
|
528 |
if (lastComparison != 0) {
|
|
|
529 |
return lastComparison;
|
|
|
530 |
}
|
|
|
531 |
}
|
|
|
532 |
return 0;
|
|
|
533 |
}
|
|
|
534 |
|
|
|
535 |
public _Fields fieldForId(int fieldId) {
|
|
|
536 |
return _Fields.findByThriftId(fieldId);
|
|
|
537 |
}
|
|
|
538 |
|
|
|
539 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
540 |
org.apache.thrift.protocol.TField field;
|
|
|
541 |
iprot.readStructBegin();
|
|
|
542 |
while (true)
|
|
|
543 |
{
|
|
|
544 |
field = iprot.readFieldBegin();
|
|
|
545 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
546 |
break;
|
|
|
547 |
}
|
|
|
548 |
switch (field.id) {
|
|
|
549 |
case 1: // ENTITY_TYPE
|
|
|
550 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
551 |
this.entityType = EntityType.findByValue(iprot.readI32());
|
|
|
552 |
} else {
|
|
|
553 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
554 |
}
|
|
|
555 |
break;
|
|
|
556 |
case 2: // EVENT_TYPE
|
|
|
557 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
558 |
this.eventType = iprot.readI32();
|
|
|
559 |
setEventTypeIsSet(true);
|
|
|
560 |
} else {
|
|
|
561 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
562 |
}
|
|
|
563 |
break;
|
|
|
564 |
case 3: // EVENTDESCIPTION
|
|
|
565 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
566 |
this.eventdesciption = iprot.readString();
|
|
|
567 |
} else {
|
|
|
568 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
569 |
}
|
|
|
570 |
break;
|
|
|
571 |
case 4: // ALERT_TYPE
|
|
|
572 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
573 |
this.alertType = AlertType.findByValue(iprot.readI32());
|
|
|
574 |
} else {
|
|
|
575 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
576 |
}
|
|
|
577 |
break;
|
|
|
578 |
case 5: // USER_IDS
|
|
|
579 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
580 |
this.userIds = iprot.readString();
|
|
|
581 |
} else {
|
|
|
582 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
583 |
}
|
|
|
584 |
break;
|
|
|
585 |
default:
|
|
|
586 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
587 |
}
|
|
|
588 |
iprot.readFieldEnd();
|
|
|
589 |
}
|
|
|
590 |
iprot.readStructEnd();
|
|
|
591 |
validate();
|
|
|
592 |
}
|
|
|
593 |
|
|
|
594 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
595 |
validate();
|
|
|
596 |
|
|
|
597 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
598 |
if (this.entityType != null) {
|
|
|
599 |
oprot.writeFieldBegin(ENTITY_TYPE_FIELD_DESC);
|
|
|
600 |
oprot.writeI32(this.entityType.getValue());
|
|
|
601 |
oprot.writeFieldEnd();
|
|
|
602 |
}
|
|
|
603 |
oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC);
|
|
|
604 |
oprot.writeI32(this.eventType);
|
|
|
605 |
oprot.writeFieldEnd();
|
|
|
606 |
if (this.eventdesciption != null) {
|
|
|
607 |
oprot.writeFieldBegin(EVENTDESCIPTION_FIELD_DESC);
|
|
|
608 |
oprot.writeString(this.eventdesciption);
|
|
|
609 |
oprot.writeFieldEnd();
|
|
|
610 |
}
|
|
|
611 |
if (this.alertType != null) {
|
|
|
612 |
oprot.writeFieldBegin(ALERT_TYPE_FIELD_DESC);
|
|
|
613 |
oprot.writeI32(this.alertType.getValue());
|
|
|
614 |
oprot.writeFieldEnd();
|
|
|
615 |
}
|
|
|
616 |
if (this.userIds != null) {
|
|
|
617 |
oprot.writeFieldBegin(USER_IDS_FIELD_DESC);
|
|
|
618 |
oprot.writeString(this.userIds);
|
|
|
619 |
oprot.writeFieldEnd();
|
|
|
620 |
}
|
|
|
621 |
oprot.writeFieldStop();
|
|
|
622 |
oprot.writeStructEnd();
|
|
|
623 |
}
|
|
|
624 |
|
|
|
625 |
@Override
|
|
|
626 |
public String toString() {
|
|
|
627 |
StringBuilder sb = new StringBuilder("AlertMapper(");
|
|
|
628 |
boolean first = true;
|
|
|
629 |
|
|
|
630 |
sb.append("entityType:");
|
|
|
631 |
if (this.entityType == null) {
|
|
|
632 |
sb.append("null");
|
|
|
633 |
} else {
|
|
|
634 |
sb.append(this.entityType);
|
|
|
635 |
}
|
|
|
636 |
first = false;
|
|
|
637 |
if (!first) sb.append(", ");
|
|
|
638 |
sb.append("eventType:");
|
|
|
639 |
sb.append(this.eventType);
|
|
|
640 |
first = false;
|
|
|
641 |
if (!first) sb.append(", ");
|
|
|
642 |
sb.append("eventdesciption:");
|
|
|
643 |
if (this.eventdesciption == null) {
|
|
|
644 |
sb.append("null");
|
|
|
645 |
} else {
|
|
|
646 |
sb.append(this.eventdesciption);
|
|
|
647 |
}
|
|
|
648 |
first = false;
|
|
|
649 |
if (!first) sb.append(", ");
|
|
|
650 |
sb.append("alertType:");
|
|
|
651 |
if (this.alertType == null) {
|
|
|
652 |
sb.append("null");
|
|
|
653 |
} else {
|
|
|
654 |
sb.append(this.alertType);
|
|
|
655 |
}
|
|
|
656 |
first = false;
|
|
|
657 |
if (!first) sb.append(", ");
|
|
|
658 |
sb.append("userIds:");
|
|
|
659 |
if (this.userIds == null) {
|
|
|
660 |
sb.append("null");
|
|
|
661 |
} else {
|
|
|
662 |
sb.append(this.userIds);
|
|
|
663 |
}
|
|
|
664 |
first = false;
|
|
|
665 |
sb.append(")");
|
|
|
666 |
return sb.toString();
|
|
|
667 |
}
|
|
|
668 |
|
|
|
669 |
public void validate() throws org.apache.thrift.TException {
|
|
|
670 |
// check for required fields
|
|
|
671 |
}
|
|
|
672 |
|
|
|
673 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
674 |
try {
|
|
|
675 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
676 |
} catch (org.apache.thrift.TException te) {
|
|
|
677 |
throw new java.io.IOException(te);
|
|
|
678 |
}
|
|
|
679 |
}
|
|
|
680 |
|
|
|
681 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
682 |
try {
|
|
|
683 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
684 |
__isset_bit_vector = new BitSet(1);
|
|
|
685 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
686 |
} catch (org.apache.thrift.TException te) {
|
|
|
687 |
throw new java.io.IOException(te);
|
|
|
688 |
}
|
|
|
689 |
}
|
|
|
690 |
|
|
|
691 |
}
|
|
|
692 |
|