SENTRY-2192: supress date value in @Generated annotation generated by thrift.(Kalyan...
[sentry.git] / sentry-hdfs / sentry-hdfs-common / src / gen / thrift / gen-javabean / org / apache / sentry / hdfs / service / thrift / TPathsUpdate.java
1 /**
2 * Autogenerated by Thrift Compiler (0.9.3)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7 package org.apache.sentry.hdfs.service.thrift;
8
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
12
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import org.apache.thrift.async.AsyncMethodCallback;
19 import org.apache.thrift.server.AbstractNonblockingServer.*;
20 import java.util.List;
21 import java.util.ArrayList;
22 import java.util.Map;
23 import java.util.HashMap;
24 import java.util.EnumMap;
25 import java.util.Set;
26 import java.util.HashSet;
27 import java.util.EnumSet;
28 import java.util.Collections;
29 import java.util.BitSet;
30 import java.nio.ByteBuffer;
31 import java.util.Arrays;
32 import javax.annotation.Generated;
33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory;
35
36 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
37 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
38 public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPathsUpdate._Fields>, java.io.Serializable, Cloneable, Comparable<TPathsUpdate> {
39 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPathsUpdate");
40
41 private static final org.apache.thrift.protocol.TField HAS_FULL_IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("hasFullImage", org.apache.thrift.protocol.TType.BOOL, (short)1);
42 private static final org.apache.thrift.protocol.TField PATHS_DUMP_FIELD_DESC = new org.apache.thrift.protocol.TField("pathsDump", org.apache.thrift.protocol.TType.STRUCT, (short)2);
43 private static final org.apache.thrift.protocol.TField SEQ_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seqNum", org.apache.thrift.protocol.TType.I64, (short)3);
44 private static final org.apache.thrift.protocol.TField PATH_CHANGES_FIELD_DESC = new org.apache.thrift.protocol.TField("pathChanges", org.apache.thrift.protocol.TType.LIST, (short)4);
45 private static final org.apache.thrift.protocol.TField IMG_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("imgNum", org.apache.thrift.protocol.TType.I64, (short)5);
46
47 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
48 static {
49 schemes.put(StandardScheme.class, new TPathsUpdateStandardSchemeFactory());
50 schemes.put(TupleScheme.class, new TPathsUpdateTupleSchemeFactory());
51 }
52
53 private boolean hasFullImage; // required
54 private TPathsDump pathsDump; // optional
55 private long seqNum; // required
56 private List<TPathChanges> pathChanges; // required
57 private long imgNum; // optional
58
59 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
60 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
61 HAS_FULL_IMAGE((short)1, "hasFullImage"),
62 PATHS_DUMP((short)2, "pathsDump"),
63 SEQ_NUM((short)3, "seqNum"),
64 PATH_CHANGES((short)4, "pathChanges"),
65 IMG_NUM((short)5, "imgNum");
66
67 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
69 static {
70 for (_Fields field : EnumSet.allOf(_Fields.class)) {
71 byName.put(field.getFieldName(), field);
72 }
73 }
74
75 /**
76 * Find the _Fields constant that matches fieldId, or null if its not found.
77 */
78 public static _Fields findByThriftId(int fieldId) {
79 switch(fieldId) {
80 case 1: // HAS_FULL_IMAGE
81 return HAS_FULL_IMAGE;
82 case 2: // PATHS_DUMP
83 return PATHS_DUMP;
84 case 3: // SEQ_NUM
85 return SEQ_NUM;
86 case 4: // PATH_CHANGES
87 return PATH_CHANGES;
88 case 5: // IMG_NUM
89 return IMG_NUM;
90 default:
91 return null;
92 }
93 }
94
95 /**
96 * Find the _Fields constant that matches fieldId, throwing an exception
97 * if it is not found.
98 */
99 public static _Fields findByThriftIdOrThrow(int fieldId) {
100 _Fields fields = findByThriftId(fieldId);
101 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
102 return fields;
103 }
104
105 /**
106 * Find the _Fields constant that matches name, or null if its not found.
107 */
108 public static _Fields findByName(String name) {
109 return byName.get(name);
110 }
111
112 private final short _thriftId;
113 private final String _fieldName;
114
115 _Fields(short thriftId, String fieldName) {
116 _thriftId = thriftId;
117 _fieldName = fieldName;
118 }
119
120 public short getThriftFieldId() {
121 return _thriftId;
122 }
123
124 public String getFieldName() {
125 return _fieldName;
126 }
127 }
128
129 // isset id assignments
130 private static final int __HASFULLIMAGE_ISSET_ID = 0;
131 private static final int __SEQNUM_ISSET_ID = 1;
132 private static final int __IMGNUM_ISSET_ID = 2;
133 private byte __isset_bitfield = 0;
134 private static final _Fields optionals[] = {_Fields.PATHS_DUMP,_Fields.IMG_NUM};
135 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
136 static {
137 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
138 tmpMap.put(_Fields.HAS_FULL_IMAGE, new org.apache.thrift.meta_data.FieldMetaData("hasFullImage", org.apache.thrift.TFieldRequirementType.REQUIRED,
139 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
140 tmpMap.put(_Fields.PATHS_DUMP, new org.apache.thrift.meta_data.FieldMetaData("pathsDump", org.apache.thrift.TFieldRequirementType.OPTIONAL,
141 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPathsDump.class)));
142 tmpMap.put(_Fields.SEQ_NUM, new org.apache.thrift.meta_data.FieldMetaData("seqNum", org.apache.thrift.TFieldRequirementType.REQUIRED,
143 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
144 tmpMap.put(_Fields.PATH_CHANGES, new org.apache.thrift.meta_data.FieldMetaData("pathChanges", org.apache.thrift.TFieldRequirementType.REQUIRED,
145 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
146 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPathChanges.class))));
147 tmpMap.put(_Fields.IMG_NUM, new org.apache.thrift.meta_data.FieldMetaData("imgNum", org.apache.thrift.TFieldRequirementType.OPTIONAL,
148 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
149 metaDataMap = Collections.unmodifiableMap(tmpMap);
150 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPathsUpdate.class, metaDataMap);
151 }
152
153 public TPathsUpdate() {
154 this.imgNum = -1L;
155
156 }
157
158 public TPathsUpdate(
159 boolean hasFullImage,
160 long seqNum,
161 List<TPathChanges> pathChanges)
162 {
163 this();
164 this.hasFullImage = hasFullImage;
165 setHasFullImageIsSet(true);
166 this.seqNum = seqNum;
167 setSeqNumIsSet(true);
168 this.pathChanges = pathChanges;
169 }
170
171 /**
172 * Performs a deep copy on <i>other</i>.
173 */
174 public TPathsUpdate(TPathsUpdate other) {
175 __isset_bitfield = other.__isset_bitfield;
176 this.hasFullImage = other.hasFullImage;
177 if (other.isSetPathsDump()) {
178 this.pathsDump = new TPathsDump(other.pathsDump);
179 }
180 this.seqNum = other.seqNum;
181 if (other.isSetPathChanges()) {
182 List<TPathChanges> __this__pathChanges = new ArrayList<TPathChanges>(other.pathChanges.size());
183 for (TPathChanges other_element : other.pathChanges) {
184 __this__pathChanges.add(new TPathChanges(other_element));
185 }
186 this.pathChanges = __this__pathChanges;
187 }
188 this.imgNum = other.imgNum;
189 }
190
191 public TPathsUpdate deepCopy() {
192 return new TPathsUpdate(this);
193 }
194
195 @Override
196 public void clear() {
197 setHasFullImageIsSet(false);
198 this.hasFullImage = false;
199 this.pathsDump = null;
200 setSeqNumIsSet(false);
201 this.seqNum = 0;
202 this.pathChanges = null;
203 this.imgNum = -1L;
204
205 }
206
207 public boolean isHasFullImage() {
208 return this.hasFullImage;
209 }
210
211 public void setHasFullImage(boolean hasFullImage) {
212 this.hasFullImage = hasFullImage;
213 setHasFullImageIsSet(true);
214 }
215
216 public void unsetHasFullImage() {
217 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASFULLIMAGE_ISSET_ID);
218 }
219
220 /** Returns true if field hasFullImage is set (has been assigned a value) and false otherwise */
221 public boolean isSetHasFullImage() {
222 return EncodingUtils.testBit(__isset_bitfield, __HASFULLIMAGE_ISSET_ID);
223 }
224
225 public void setHasFullImageIsSet(boolean value) {
226 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASFULLIMAGE_ISSET_ID, value);
227 }
228
229 public TPathsDump getPathsDump() {
230 return this.pathsDump;
231 }
232
233 public void setPathsDump(TPathsDump pathsDump) {
234 this.pathsDump = pathsDump;
235 }
236
237 public void unsetPathsDump() {
238 this.pathsDump = null;
239 }
240
241 /** Returns true if field pathsDump is set (has been assigned a value) and false otherwise */
242 public boolean isSetPathsDump() {
243 return this.pathsDump != null;
244 }
245
246 public void setPathsDumpIsSet(boolean value) {
247 if (!value) {
248 this.pathsDump = null;
249 }
250 }
251
252 public long getSeqNum() {
253 return this.seqNum;
254 }
255
256 public void setSeqNum(long seqNum) {
257 this.seqNum = seqNum;
258 setSeqNumIsSet(true);
259 }
260
261 public void unsetSeqNum() {
262 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEQNUM_ISSET_ID);
263 }
264
265 /** Returns true if field seqNum is set (has been assigned a value) and false otherwise */
266 public boolean isSetSeqNum() {
267 return EncodingUtils.testBit(__isset_bitfield, __SEQNUM_ISSET_ID);
268 }
269
270 public void setSeqNumIsSet(boolean value) {
271 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEQNUM_ISSET_ID, value);
272 }
273
274 public int getPathChangesSize() {
275 return (this.pathChanges == null) ? 0 : this.pathChanges.size();
276 }
277
278 public java.util.Iterator<TPathChanges> getPathChangesIterator() {
279 return (this.pathChanges == null) ? null : this.pathChanges.iterator();
280 }
281
282 public void addToPathChanges(TPathChanges elem) {
283 if (this.pathChanges == null) {
284 this.pathChanges = new ArrayList<TPathChanges>();
285 }
286 this.pathChanges.add(elem);
287 }
288
289 public List<TPathChanges> getPathChanges() {
290 return this.pathChanges;
291 }
292
293 public void setPathChanges(List<TPathChanges> pathChanges) {
294 this.pathChanges = pathChanges;
295 }
296
297 public void unsetPathChanges() {
298 this.pathChanges = null;
299 }
300
301 /** Returns true if field pathChanges is set (has been assigned a value) and false otherwise */
302 public boolean isSetPathChanges() {
303 return this.pathChanges != null;
304 }
305
306 public void setPathChangesIsSet(boolean value) {
307 if (!value) {
308 this.pathChanges = null;
309 }
310 }
311
312 public long getImgNum() {
313 return this.imgNum;
314 }
315
316 public void setImgNum(long imgNum) {
317 this.imgNum = imgNum;
318 setImgNumIsSet(true);
319 }
320
321 public void unsetImgNum() {
322 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMGNUM_ISSET_ID);
323 }
324
325 /** Returns true if field imgNum is set (has been assigned a value) and false otherwise */
326 public boolean isSetImgNum() {
327 return EncodingUtils.testBit(__isset_bitfield, __IMGNUM_ISSET_ID);
328 }
329
330 public void setImgNumIsSet(boolean value) {
331 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMGNUM_ISSET_ID, value);
332 }
333
334 public void setFieldValue(_Fields field, Object value) {
335 switch (field) {
336 case HAS_FULL_IMAGE:
337 if (value == null) {
338 unsetHasFullImage();
339 } else {
340 setHasFullImage((Boolean)value);
341 }
342 break;
343
344 case PATHS_DUMP:
345 if (value == null) {
346 unsetPathsDump();
347 } else {
348 setPathsDump((TPathsDump)value);
349 }
350 break;
351
352 case SEQ_NUM:
353 if (value == null) {
354 unsetSeqNum();
355 } else {
356 setSeqNum((Long)value);
357 }
358 break;
359
360 case PATH_CHANGES:
361 if (value == null) {
362 unsetPathChanges();
363 } else {
364 setPathChanges((List<TPathChanges>)value);
365 }
366 break;
367
368 case IMG_NUM:
369 if (value == null) {
370 unsetImgNum();
371 } else {
372 setImgNum((Long)value);
373 }
374 break;
375
376 }
377 }
378
379 public Object getFieldValue(_Fields field) {
380 switch (field) {
381 case HAS_FULL_IMAGE:
382 return isHasFullImage();
383
384 case PATHS_DUMP:
385 return getPathsDump();
386
387 case SEQ_NUM:
388 return getSeqNum();
389
390 case PATH_CHANGES:
391 return getPathChanges();
392
393 case IMG_NUM:
394 return getImgNum();
395
396 }
397 throw new IllegalStateException();
398 }
399
400 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
401 public boolean isSet(_Fields field) {
402 if (field == null) {
403 throw new IllegalArgumentException();
404 }
405
406 switch (field) {
407 case HAS_FULL_IMAGE:
408 return isSetHasFullImage();
409 case PATHS_DUMP:
410 return isSetPathsDump();
411 case SEQ_NUM:
412 return isSetSeqNum();
413 case PATH_CHANGES:
414 return isSetPathChanges();
415 case IMG_NUM:
416 return isSetImgNum();
417 }
418 throw new IllegalStateException();
419 }
420
421 @Override
422 public boolean equals(Object that) {
423 if (that == null)
424 return false;
425 if (that instanceof TPathsUpdate)
426 return this.equals((TPathsUpdate)that);
427 return false;
428 }
429
430 public boolean equals(TPathsUpdate that) {
431 if (that == null)
432 return false;
433
434 boolean this_present_hasFullImage = true;
435 boolean that_present_hasFullImage = true;
436 if (this_present_hasFullImage || that_present_hasFullImage) {
437 if (!(this_present_hasFullImage && that_present_hasFullImage))
438 return false;
439 if (this.hasFullImage != that.hasFullImage)
440 return false;
441 }
442
443 boolean this_present_pathsDump = true && this.isSetPathsDump();
444 boolean that_present_pathsDump = true && that.isSetPathsDump();
445 if (this_present_pathsDump || that_present_pathsDump) {
446 if (!(this_present_pathsDump && that_present_pathsDump))
447 return false;
448 if (!this.pathsDump.equals(that.pathsDump))
449 return false;
450 }
451
452 boolean this_present_seqNum = true;
453 boolean that_present_seqNum = true;
454 if (this_present_seqNum || that_present_seqNum) {
455 if (!(this_present_seqNum && that_present_seqNum))
456 return false;
457 if (this.seqNum != that.seqNum)
458 return false;
459 }
460
461 boolean this_present_pathChanges = true && this.isSetPathChanges();
462 boolean that_present_pathChanges = true && that.isSetPathChanges();
463 if (this_present_pathChanges || that_present_pathChanges) {
464 if (!(this_present_pathChanges && that_present_pathChanges))
465 return false;
466 if (!this.pathChanges.equals(that.pathChanges))
467 return false;
468 }
469
470 boolean this_present_imgNum = true && this.isSetImgNum();
471 boolean that_present_imgNum = true && that.isSetImgNum();
472 if (this_present_imgNum || that_present_imgNum) {
473 if (!(this_present_imgNum && that_present_imgNum))
474 return false;
475 if (this.imgNum != that.imgNum)
476 return false;
477 }
478
479 return true;
480 }
481
482 @Override
483 public int hashCode() {
484 List<Object> list = new ArrayList<Object>();
485
486 boolean present_hasFullImage = true;
487 list.add(present_hasFullImage);
488 if (present_hasFullImage)
489 list.add(hasFullImage);
490
491 boolean present_pathsDump = true && (isSetPathsDump());
492 list.add(present_pathsDump);
493 if (present_pathsDump)
494 list.add(pathsDump);
495
496 boolean present_seqNum = true;
497 list.add(present_seqNum);
498 if (present_seqNum)
499 list.add(seqNum);
500
501 boolean present_pathChanges = true && (isSetPathChanges());
502 list.add(present_pathChanges);
503 if (present_pathChanges)
504 list.add(pathChanges);
505
506 boolean present_imgNum = true && (isSetImgNum());
507 list.add(present_imgNum);
508 if (present_imgNum)
509 list.add(imgNum);
510
511 return list.hashCode();
512 }
513
514 @Override
515 public int compareTo(TPathsUpdate other) {
516 if (!getClass().equals(other.getClass())) {
517 return getClass().getName().compareTo(other.getClass().getName());
518 }
519
520 int lastComparison = 0;
521
522 lastComparison = Boolean.valueOf(isSetHasFullImage()).compareTo(other.isSetHasFullImage());
523 if (lastComparison != 0) {
524 return lastComparison;
525 }
526 if (isSetHasFullImage()) {
527 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasFullImage, other.hasFullImage);
528 if (lastComparison != 0) {
529 return lastComparison;
530 }
531 }
532 lastComparison = Boolean.valueOf(isSetPathsDump()).compareTo(other.isSetPathsDump());
533 if (lastComparison != 0) {
534 return lastComparison;
535 }
536 if (isSetPathsDump()) {
537 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathsDump, other.pathsDump);
538 if (lastComparison != 0) {
539 return lastComparison;
540 }
541 }
542 lastComparison = Boolean.valueOf(isSetSeqNum()).compareTo(other.isSetSeqNum());
543 if (lastComparison != 0) {
544 return lastComparison;
545 }
546 if (isSetSeqNum()) {
547 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seqNum, other.seqNum);
548 if (lastComparison != 0) {
549 return lastComparison;
550 }
551 }
552 lastComparison = Boolean.valueOf(isSetPathChanges()).compareTo(other.isSetPathChanges());
553 if (lastComparison != 0) {
554 return lastComparison;
555 }
556 if (isSetPathChanges()) {
557 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathChanges, other.pathChanges);
558 if (lastComparison != 0) {
559 return lastComparison;
560 }
561 }
562 lastComparison = Boolean.valueOf(isSetImgNum()).compareTo(other.isSetImgNum());
563 if (lastComparison != 0) {
564 return lastComparison;
565 }
566 if (isSetImgNum()) {
567 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imgNum, other.imgNum);
568 if (lastComparison != 0) {
569 return lastComparison;
570 }
571 }
572 return 0;
573 }
574
575 public _Fields fieldForId(int fieldId) {
576 return _Fields.findByThriftId(fieldId);
577 }
578
579 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
580 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
581 }
582
583 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
584 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
585 }
586
587 @Override
588 public String toString() {
589 StringBuilder sb = new StringBuilder("TPathsUpdate(");
590 boolean first = true;
591
592 sb.append("hasFullImage:");
593 sb.append(this.hasFullImage);
594 first = false;
595 if (isSetPathsDump()) {
596 if (!first) sb.append(", ");
597 sb.append("pathsDump:");
598 if (this.pathsDump == null) {
599 sb.append("null");
600 } else {
601 sb.append(this.pathsDump);
602 }
603 first = false;
604 }
605 if (!first) sb.append(", ");
606 sb.append("seqNum:");
607 sb.append(this.seqNum);
608 first = false;
609 if (!first) sb.append(", ");
610 sb.append("pathChanges:");
611 if (this.pathChanges == null) {
612 sb.append("null");
613 } else {
614 sb.append(this.pathChanges);
615 }
616 first = false;
617 if (isSetImgNum()) {
618 if (!first) sb.append(", ");
619 sb.append("imgNum:");
620 sb.append(this.imgNum);
621 first = false;
622 }
623 sb.append(")");
624 return sb.toString();
625 }
626
627 public void validate() throws org.apache.thrift.TException {
628 // check for required fields
629 if (!isSetHasFullImage()) {
630 throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasFullImage' is unset! Struct:" + toString());
631 }
632
633 if (!isSetSeqNum()) {
634 throw new org.apache.thrift.protocol.TProtocolException("Required field 'seqNum' is unset! Struct:" + toString());
635 }
636
637 if (!isSetPathChanges()) {
638 throw new org.apache.thrift.protocol.TProtocolException("Required field 'pathChanges' is unset! Struct:" + toString());
639 }
640
641 // check for sub-struct validity
642 if (pathsDump != null) {
643 pathsDump.validate();
644 }
645 }
646
647 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
648 try {
649 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
650 } catch (org.apache.thrift.TException te) {
651 throw new java.io.IOException(te);
652 }
653 }
654
655 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
656 try {
657 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
658 __isset_bitfield = 0;
659 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
660 } catch (org.apache.thrift.TException te) {
661 throw new java.io.IOException(te);
662 }
663 }
664
665 private static class TPathsUpdateStandardSchemeFactory implements SchemeFactory {
666 public TPathsUpdateStandardScheme getScheme() {
667 return new TPathsUpdateStandardScheme();
668 }
669 }
670
671 private static class TPathsUpdateStandardScheme extends StandardScheme<TPathsUpdate> {
672
673 public void read(org.apache.thrift.protocol.TProtocol iprot, TPathsUpdate struct) throws org.apache.thrift.TException {
674 org.apache.thrift.protocol.TField schemeField;
675 iprot.readStructBegin();
676 while (true)
677 {
678 schemeField = iprot.readFieldBegin();
679 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
680 break;
681 }
682 switch (schemeField.id) {
683 case 1: // HAS_FULL_IMAGE
684 if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
685 struct.hasFullImage = iprot.readBool();
686 struct.setHasFullImageIsSet(true);
687 } else {
688 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
689 }
690 break;
691 case 2: // PATHS_DUMP
692 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
693 struct.pathsDump = new TPathsDump();
694 struct.pathsDump.read(iprot);
695 struct.setPathsDumpIsSet(true);
696 } else {
697 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
698 }
699 break;
700 case 3: // SEQ_NUM
701 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
702 struct.seqNum = iprot.readI64();
703 struct.setSeqNumIsSet(true);
704 } else {
705 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
706 }
707 break;
708 case 4: // PATH_CHANGES
709 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
710 {
711 org.apache.thrift.protocol.TList _list66 = iprot.readListBegin();
712 struct.pathChanges = new ArrayList<TPathChanges>(_list66.size);
713 TPathChanges _elem67;
714 for (int _i68 = 0; _i68 < _list66.size; ++_i68)
715 {
716 _elem67 = new TPathChanges();
717 _elem67.read(iprot);
718 struct.pathChanges.add(_elem67);
719 }
720 iprot.readListEnd();
721 }
722 struct.setPathChangesIsSet(true);
723 } else {
724 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
725 }
726 break;
727 case 5: // IMG_NUM
728 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
729 struct.imgNum = iprot.readI64();
730 struct.setImgNumIsSet(true);
731 } else {
732 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
733 }
734 break;
735 default:
736 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
737 }
738 iprot.readFieldEnd();
739 }
740 iprot.readStructEnd();
741 struct.validate();
742 }
743
744 public void write(org.apache.thrift.protocol.TProtocol oprot, TPathsUpdate struct) throws org.apache.thrift.TException {
745 struct.validate();
746
747 oprot.writeStructBegin(STRUCT_DESC);
748 oprot.writeFieldBegin(HAS_FULL_IMAGE_FIELD_DESC);
749 oprot.writeBool(struct.hasFullImage);
750 oprot.writeFieldEnd();
751 if (struct.pathsDump != null) {
752 if (struct.isSetPathsDump()) {
753 oprot.writeFieldBegin(PATHS_DUMP_FIELD_DESC);
754 struct.pathsDump.write(oprot);
755 oprot.writeFieldEnd();
756 }
757 }
758 oprot.writeFieldBegin(SEQ_NUM_FIELD_DESC);
759 oprot.writeI64(struct.seqNum);
760 oprot.writeFieldEnd();
761 if (struct.pathChanges != null) {
762 oprot.writeFieldBegin(PATH_CHANGES_FIELD_DESC);
763 {
764 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.pathChanges.size()));
765 for (TPathChanges _iter69 : struct.pathChanges)
766 {
767 _iter69.write(oprot);
768 }
769 oprot.writeListEnd();
770 }
771 oprot.writeFieldEnd();
772 }
773 if (struct.isSetImgNum()) {
774 oprot.writeFieldBegin(IMG_NUM_FIELD_DESC);
775 oprot.writeI64(struct.imgNum);
776 oprot.writeFieldEnd();
777 }
778 oprot.writeFieldStop();
779 oprot.writeStructEnd();
780 }
781
782 }
783
784 private static class TPathsUpdateTupleSchemeFactory implements SchemeFactory {
785 public TPathsUpdateTupleScheme getScheme() {
786 return new TPathsUpdateTupleScheme();
787 }
788 }
789
790 private static class TPathsUpdateTupleScheme extends TupleScheme<TPathsUpdate> {
791
792 @Override
793 public void write(org.apache.thrift.protocol.TProtocol prot, TPathsUpdate struct) throws org.apache.thrift.TException {
794 TTupleProtocol oprot = (TTupleProtocol) prot;
795 oprot.writeBool(struct.hasFullImage);
796 oprot.writeI64(struct.seqNum);
797 {
798 oprot.writeI32(struct.pathChanges.size());
799 for (TPathChanges _iter70 : struct.pathChanges)
800 {
801 _iter70.write(oprot);
802 }
803 }
804 BitSet optionals = new BitSet();
805 if (struct.isSetPathsDump()) {
806 optionals.set(0);
807 }
808 if (struct.isSetImgNum()) {
809 optionals.set(1);
810 }
811 oprot.writeBitSet(optionals, 2);
812 if (struct.isSetPathsDump()) {
813 struct.pathsDump.write(oprot);
814 }
815 if (struct.isSetImgNum()) {
816 oprot.writeI64(struct.imgNum);
817 }
818 }
819
820 @Override
821 public void read(org.apache.thrift.protocol.TProtocol prot, TPathsUpdate struct) throws org.apache.thrift.TException {
822 TTupleProtocol iprot = (TTupleProtocol) prot;
823 struct.hasFullImage = iprot.readBool();
824 struct.setHasFullImageIsSet(true);
825 struct.seqNum = iprot.readI64();
826 struct.setSeqNumIsSet(true);
827 {
828 org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
829 struct.pathChanges = new ArrayList<TPathChanges>(_list71.size);
830 TPathChanges _elem72;
831 for (int _i73 = 0; _i73 < _list71.size; ++_i73)
832 {
833 _elem72 = new TPathChanges();
834 _elem72.read(iprot);
835 struct.pathChanges.add(_elem72);
836 }
837 }
838 struct.setPathChangesIsSet(true);
839 BitSet incoming = iprot.readBitSet(2);
840 if (incoming.get(0)) {
841 struct.pathsDump = new TPathsDump();
842 struct.pathsDump.read(iprot);
843 struct.setPathsDumpIsSet(true);
844 }
845 if (incoming.get(1)) {
846 struct.imgNum = iprot.readI64();
847 struct.setImgNumIsSet(true);
848 }
849 }
850 }
851
852 }
853