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 package org.waarp.thrift.r66;
27
28 import org.apache.thrift.EncodingUtils;
29 import org.apache.thrift.TBase;
30 import org.apache.thrift.TBaseHelper;
31 import org.apache.thrift.TException;
32 import org.apache.thrift.TFieldIdEnum;
33 import org.apache.thrift.TFieldRequirementType;
34 import org.apache.thrift.meta_data.EnumMetaData;
35 import org.apache.thrift.meta_data.FieldMetaData;
36 import org.apache.thrift.meta_data.FieldValueMetaData;
37 import org.apache.thrift.protocol.TCompactProtocol;
38 import org.apache.thrift.protocol.TField;
39 import org.apache.thrift.protocol.TProtocol;
40 import org.apache.thrift.protocol.TProtocolException;
41 import org.apache.thrift.protocol.TProtocolUtil;
42 import org.apache.thrift.protocol.TStruct;
43 import org.apache.thrift.protocol.TTupleProtocol;
44 import org.apache.thrift.protocol.TType;
45 import org.apache.thrift.scheme.IScheme;
46 import org.apache.thrift.scheme.SchemeFactory;
47 import org.apache.thrift.scheme.StandardScheme;
48 import org.apache.thrift.scheme.TupleScheme;
49 import org.apache.thrift.transport.TIOStreamTransport;
50
51 import java.io.IOException;
52 import java.io.ObjectInputStream;
53 import java.io.ObjectOutputStream;
54 import java.util.BitSet;
55 import java.util.Collections;
56 import java.util.EnumMap;
57 import java.util.EnumSet;
58 import java.util.HashMap;
59 import java.util.Map;
60
61 public class R66Request
62 implements TBase<R66Request, R66Request._Fields>, Cloneable {
63 private static final String ACTION2 = "action";
64
65 private static final String NOTRACE2 = "notrace";
66
67 private static final String DELAY2 = "delay";
68
69 private static final String START2 = "start";
70
71 private static final String BLOCKSIZE2 = "blocksize";
72
73 private static final String DESTUID2 = "destuid";
74
75 private static final String FROMUID2 = "fromuid";
76
77
78
79
80 private static final long serialVersionUID = 5084190194755640723L;
81
82 private static final TStruct STRUCT_DESC = new TStruct("R66Request");
83
84 private static final TField MODE_FIELD_DESC =
85 new TField("mode", TType.I32, (short) 1);
86 private static final TField FROMUID_FIELD_DESC =
87 new TField(FROMUID2, TType.STRING, (short) 2);
88 private static final TField DESTUID_FIELD_DESC =
89 new TField(DESTUID2, TType.STRING, (short) 3);
90 private static final TField FILE_FIELD_DESC =
91 new TField("file", TType.STRING, (short) 4);
92 private static final TField RULE_FIELD_DESC =
93 new TField("rule", TType.STRING, (short) 5);
94 private static final TField INFO_FIELD_DESC =
95 new TField("info", TType.STRING, (short) 10);
96 private static final TField MD5_FIELD_DESC =
97 new TField("md5", TType.BOOL, (short) 11);
98 private static final TField BLOCKSIZE_FIELD_DESC =
99 new TField(BLOCKSIZE2, TType.I32, (short) 12);
100 private static final TField START_FIELD_DESC =
101 new TField(START2, TType.STRING, (short) 13);
102 private static final TField DELAY_FIELD_DESC =
103 new TField(DELAY2, TType.STRING, (short) 14);
104 private static final TField NOTRACE_FIELD_DESC =
105 new TField(NOTRACE2, TType.BOOL, (short) 15);
106 private static final TField TID_FIELD_DESC =
107 new TField("tid", TType.I64, (short) 20);
108 private static final TField ACTION_FIELD_DESC =
109 new TField(ACTION2, TType.I32, (short) 21);
110
111 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
112 new HashMap<Class<? extends IScheme>, SchemeFactory>();
113
114 static {
115 schemes.put(StandardScheme.class, new R66RequestStandardSchemeFactory());
116 schemes.put(TupleScheme.class, new R66RequestTupleSchemeFactory());
117 }
118
119 private RequestMode mode;
120 private String fromuid;
121 private String destuid;
122 private String file;
123 private String rule;
124 private String info;
125 private boolean md5;
126 private int blocksize;
127 private String start;
128 private String delay;
129 private boolean notrace;
130 private long tid;
131 private Action action;
132
133 @Override
134 public final R66Request clone() throws CloneNotSupportedException {
135 return (R66Request) super.clone();
136 }
137
138
139
140
141
142
143 public enum _Fields implements TFieldIdEnum {
144
145
146
147 MODE((short) 1, "mode"), FROMUID((short) 2, FROMUID2),
148 DESTUID((short) 3, DESTUID2), FILE((short) 4, "file"),
149 RULE((short) 5, "rule"), INFO((short) 10, "info"), MD5((short) 11, "md5"),
150 BLOCKSIZE((short) 12, BLOCKSIZE2), START((short) 13, START2),
151 DELAY((short) 14, DELAY2), NOTRACE((short) 15, NOTRACE2),
152 TID((short) 20, "tid"),
153
154
155
156 ACTION((short) 21, ACTION2);
157
158 private static final Map<String, _Fields> byName =
159 new HashMap<String, _Fields>();
160
161 static {
162 for (final _Fields field : EnumSet.allOf(_Fields.class)) {
163 byName.put(field.getFieldName(), field);
164 }
165 }
166
167
168
169
170
171 public static _Fields findByThriftId(final int fieldId) {
172 switch (fieldId) {
173 case 1:
174 return MODE;
175 case 2:
176 return FROMUID;
177 case 3:
178 return DESTUID;
179 case 4:
180 return FILE;
181 case 5:
182 return RULE;
183 case 10:
184 return INFO;
185 case 11:
186 return MD5;
187 case 12:
188 return BLOCKSIZE;
189 case 13:
190 return START;
191 case 14:
192 return DELAY;
193 case 15:
194 return NOTRACE;
195 case 20:
196 return TID;
197 case 21:
198 return ACTION;
199 default:
200 return null;
201 }
202 }
203
204
205
206
207
208
209 public static _Fields findByThriftIdOrThrow(final int fieldId) {
210 final _Fields fields = findByThriftId(fieldId);
211 if (fields == null) {
212 throw new IllegalArgumentException(
213 "Field " + fieldId + " doesn't exist!");
214 }
215 return fields;
216 }
217
218
219
220
221
222 public static _Fields findByName(final String name) {
223 return byName.get(name);
224 }
225
226 private final short thriftId;
227 private final String fieldName;
228
229 _Fields(final short thriftId, final String fieldName) {
230 this.thriftId = thriftId;
231 this.fieldName = fieldName;
232 }
233
234 @Override
235 public final short getThriftFieldId() {
236 return thriftId;
237 }
238
239 @Override
240 public final String getFieldName() {
241 return fieldName;
242 }
243 }
244
245
246 private static final int MD_5_ISSET_ID = 0;
247 private static final int BLOCKSIZE_ISSET_ID = 1;
248 private static final int NOTRACE_ISSET_ID = 2;
249 private static final int TID_ISSET_ID = 3;
250 private byte issetBitfield;
251 public static final Map<_Fields, FieldMetaData> metaDataMap;
252
253 static {
254 final Map<_Fields, FieldMetaData> tmpMap =
255 new EnumMap<_Fields, FieldMetaData>(_Fields.class);
256 tmpMap.put(_Fields.MODE,
257 new FieldMetaData("mode", TFieldRequirementType.REQUIRED,
258 new EnumMetaData(TType.ENUM,
259 RequestMode.class)));
260 tmpMap.put(_Fields.FROMUID,
261 new FieldMetaData(FROMUID2, TFieldRequirementType.OPTIONAL,
262 new FieldValueMetaData(TType.STRING)));
263 tmpMap.put(_Fields.DESTUID,
264 new FieldMetaData(DESTUID2, TFieldRequirementType.OPTIONAL,
265 new FieldValueMetaData(TType.STRING)));
266 tmpMap.put(_Fields.FILE,
267 new FieldMetaData("file", TFieldRequirementType.OPTIONAL,
268 new FieldValueMetaData(TType.STRING)));
269 tmpMap.put(_Fields.RULE,
270 new FieldMetaData("rule", TFieldRequirementType.OPTIONAL,
271 new FieldValueMetaData(TType.STRING)));
272 tmpMap.put(_Fields.INFO,
273 new FieldMetaData("info", TFieldRequirementType.OPTIONAL,
274 new FieldValueMetaData(TType.STRING)));
275 tmpMap.put(_Fields.MD5,
276 new FieldMetaData("md5", TFieldRequirementType.OPTIONAL,
277 new FieldValueMetaData(TType.BOOL)));
278 tmpMap.put(_Fields.BLOCKSIZE,
279 new FieldMetaData(BLOCKSIZE2, TFieldRequirementType.OPTIONAL,
280 new FieldValueMetaData(TType.I32)));
281 tmpMap.put(_Fields.START,
282 new FieldMetaData(START2, TFieldRequirementType.OPTIONAL,
283 new FieldValueMetaData(TType.STRING)));
284 tmpMap.put(_Fields.DELAY,
285 new FieldMetaData(DELAY2, TFieldRequirementType.OPTIONAL,
286 new FieldValueMetaData(TType.STRING)));
287 tmpMap.put(_Fields.NOTRACE,
288 new FieldMetaData(NOTRACE2, TFieldRequirementType.OPTIONAL,
289 new FieldValueMetaData(TType.BOOL)));
290 tmpMap.put(_Fields.TID,
291 new FieldMetaData("tid", TFieldRequirementType.OPTIONAL,
292 new FieldValueMetaData(TType.I64)));
293 tmpMap.put(_Fields.ACTION,
294 new FieldMetaData(ACTION2, TFieldRequirementType.OPTIONAL,
295 new EnumMetaData(TType.ENUM, Action.class)));
296 metaDataMap = Collections.unmodifiableMap(tmpMap);
297 FieldMetaData.addStructMetaDataMap(R66Request.class, metaDataMap);
298 }
299
300 public R66Request() {
301 md5 = false;
302
303 notrace = false;
304
305 }
306
307 public R66Request(final RequestMode mode) {
308 this();
309 this.mode = mode;
310 }
311
312
313
314
315 public R66Request(final R66Request other) {
316 issetBitfield = other.issetBitfield;
317 if (other.isSetMode()) {
318 mode = other.mode;
319 }
320 if (other.isSetFromuid()) {
321 fromuid = other.fromuid;
322 }
323 if (other.isSetDestuid()) {
324 destuid = other.destuid;
325 }
326 if (other.isSetFile()) {
327 file = other.file;
328 }
329 if (other.isSetRule()) {
330 rule = other.rule;
331 }
332 if (other.isSetInfo()) {
333 info = other.info;
334 }
335 md5 = other.md5;
336 blocksize = other.blocksize;
337 if (other.isSetStart()) {
338 start = other.start;
339 }
340 if (other.isSetDelay()) {
341 delay = other.delay;
342 }
343 notrace = other.notrace;
344 tid = other.tid;
345 if (other.isSetAction()) {
346 action = other.action;
347 }
348 }
349
350 @Override
351 public final R66Request deepCopy() {
352 return new R66Request(this);
353 }
354
355 @Override
356 public final void clear() {
357 mode = null;
358 fromuid = null;
359 destuid = null;
360 file = null;
361 rule = null;
362 info = null;
363 md5 = false;
364
365 setBlocksizeIsSet(false);
366 blocksize = 0;
367 start = null;
368 delay = null;
369 notrace = false;
370
371 setTidIsSet(false);
372 tid = 0;
373 action = null;
374 }
375
376
377
378
379 public final RequestMode getMode() {
380 return mode;
381 }
382
383
384
385
386 public final R66Request setMode(final RequestMode mode) {
387 this.mode = mode;
388 return this;
389 }
390
391 public final void unsetMode() {
392 mode = null;
393 }
394
395
396
397
398
399 public final boolean isSetMode() {
400 return mode != null;
401 }
402
403 public final void setModeIsSet(final boolean value) {
404 if (!value) {
405 mode = null;
406 }
407 }
408
409 public final String getFromuid() {
410 return fromuid;
411 }
412
413 public final R66Request setFromuid(final String fromuid) {
414 this.fromuid = fromuid;
415 return this;
416 }
417
418 public final void unsetFromuid() {
419 fromuid = null;
420 }
421
422
423
424
425
426
427 public final boolean isSetFromuid() {
428 return fromuid != null;
429 }
430
431 public final void setFromuidIsSet(final boolean value) {
432 if (!value) {
433 fromuid = null;
434 }
435 }
436
437 public final String getDestuid() {
438 return destuid;
439 }
440
441 public final R66Request setDestuid(final String destuid) {
442 this.destuid = destuid;
443 return this;
444 }
445
446 public final void unsetDestuid() {
447 destuid = null;
448 }
449
450
451
452
453
454
455 public final boolean isSetDestuid() {
456 return destuid != null;
457 }
458
459 public final void setDestuidIsSet(final boolean value) {
460 if (!value) {
461 destuid = null;
462 }
463 }
464
465 public String getFile() {
466 return file;
467 }
468
469 public final R66Request setFile(final String file) {
470 this.file = file;
471 return this;
472 }
473
474 public final void unsetFile() {
475 file = null;
476 }
477
478
479
480
481
482 public final boolean isSetFile() {
483 return file != null;
484 }
485
486 public final void setFileIsSet(final boolean value) {
487 if (!value) {
488 file = null;
489 }
490 }
491
492 public final String getRule() {
493 return rule;
494 }
495
496 public final R66Request setRule(final String rule) {
497 this.rule = rule;
498 return this;
499 }
500
501 public final void unsetRule() {
502 rule = null;
503 }
504
505
506
507
508
509 public final boolean isSetRule() {
510 return rule != null;
511 }
512
513 public final void setRuleIsSet(final boolean value) {
514 if (!value) {
515 rule = null;
516 }
517 }
518
519 public final String getInfo() {
520 return info;
521 }
522
523 public final R66Request setInfo(final String info) {
524 this.info = info;
525 return this;
526 }
527
528 public void unsetInfo() {
529 info = null;
530 }
531
532
533
534
535
536 public final boolean isSetInfo() {
537 return info != null;
538 }
539
540 public final void setInfoIsSet(final boolean value) {
541 if (!value) {
542 info = null;
543 }
544 }
545
546 public final boolean isMd5() {
547 return md5;
548 }
549
550 public final R66Request setMd5(final boolean md5) {
551 this.md5 = md5;
552 setMd5IsSet(true);
553 return this;
554 }
555
556 public final void unsetMd5() {
557 issetBitfield = EncodingUtils.clearBit(issetBitfield, MD_5_ISSET_ID);
558 }
559
560
561
562
563
564 public final boolean isSetMd5() {
565 return EncodingUtils.testBit(issetBitfield, MD_5_ISSET_ID);
566 }
567
568 public final void setMd5IsSet(final boolean value) {
569 issetBitfield = EncodingUtils.setBit(issetBitfield, MD_5_ISSET_ID, value);
570 }
571
572 public final int getBlocksize() {
573 return blocksize;
574 }
575
576 public final R66Request setBlocksize(final int blocksize) {
577 this.blocksize = blocksize;
578 setBlocksizeIsSet(true);
579 return this;
580 }
581
582 public final void unsetBlocksize() {
583 issetBitfield = EncodingUtils.clearBit(issetBitfield, BLOCKSIZE_ISSET_ID);
584 }
585
586
587
588
589
590 public final boolean isSetBlocksize() {
591 return EncodingUtils.testBit(issetBitfield, BLOCKSIZE_ISSET_ID);
592 }
593
594 public final void setBlocksizeIsSet(final boolean value) {
595 issetBitfield =
596 EncodingUtils.setBit(issetBitfield, BLOCKSIZE_ISSET_ID, value);
597 }
598
599 public final String getStart() {
600 return start;
601 }
602
603 public final R66Request setStart(final String start) {
604 this.start = start;
605 return this;
606 }
607
608 public final void unsetStart() {
609 start = null;
610 }
611
612
613
614
615
616 public final boolean isSetStart() {
617 return start != null;
618 }
619
620 public final void setStartIsSet(final boolean value) {
621 if (!value) {
622 start = null;
623 }
624 }
625
626 public final String getDelay() {
627 return delay;
628 }
629
630 public final R66Request setDelay(final String delay) {
631 this.delay = delay;
632 return this;
633 }
634
635 public final void unsetDelay() {
636 delay = null;
637 }
638
639
640
641
642
643 public final boolean isSetDelay() {
644 return delay != null;
645 }
646
647 public final void setDelayIsSet(final boolean value) {
648 if (!value) {
649 delay = null;
650 }
651 }
652
653 public final boolean isNotrace() {
654 return notrace;
655 }
656
657 public final R66Request setNotrace(final boolean notrace) {
658 this.notrace = notrace;
659 setNotraceIsSet(true);
660 return this;
661 }
662
663 public final void unsetNotrace() {
664 issetBitfield = EncodingUtils.clearBit(issetBitfield, NOTRACE_ISSET_ID);
665 }
666
667
668
669
670
671
672 public final boolean isSetNotrace() {
673 return EncodingUtils.testBit(issetBitfield, NOTRACE_ISSET_ID);
674 }
675
676 public final void setNotraceIsSet(final boolean value) {
677 issetBitfield =
678 EncodingUtils.setBit(issetBitfield, NOTRACE_ISSET_ID, value);
679 }
680
681 public final long getTid() {
682 return tid;
683 }
684
685 public final R66Request setTid(final long tid) {
686 this.tid = tid;
687 setTidIsSet(true);
688 return this;
689 }
690
691 public final void unsetTid() {
692 issetBitfield = EncodingUtils.clearBit(issetBitfield, TID_ISSET_ID);
693 }
694
695
696
697
698
699 public final boolean isSetTid() {
700 return EncodingUtils.testBit(issetBitfield, TID_ISSET_ID);
701 }
702
703 public final void setTidIsSet(final boolean value) {
704 issetBitfield = EncodingUtils.setBit(issetBitfield, TID_ISSET_ID, value);
705 }
706
707
708
709
710 public final Action getAction() {
711 return action;
712 }
713
714
715
716
717 public final R66Request setAction(final Action action) {
718 this.action = action;
719 return this;
720 }
721
722 public final void unsetAction() {
723 action = null;
724 }
725
726
727
728
729
730 public final boolean isSetAction() {
731 return action != null;
732 }
733
734 public final void setActionIsSet(final boolean value) {
735 if (!value) {
736 action = null;
737 }
738 }
739
740 @Override
741 public final void setFieldValue(final _Fields field, final Object value) {
742 switch (field) {
743 case MODE:
744 if (value == null) {
745 unsetMode();
746 } else {
747 setMode((RequestMode) value);
748 }
749 break;
750
751 case FROMUID:
752 if (value == null) {
753 unsetFromuid();
754 } else {
755 setFromuid((String) value);
756 }
757 break;
758
759 case DESTUID:
760 if (value == null) {
761 unsetDestuid();
762 } else {
763 setDestuid((String) value);
764 }
765 break;
766
767 case FILE:
768 if (value == null) {
769 unsetFile();
770 } else {
771 setFile((String) value);
772 }
773 break;
774
775 case RULE:
776 if (value == null) {
777 unsetRule();
778 } else {
779 setRule((String) value);
780 }
781 break;
782
783 case INFO:
784 if (value == null) {
785 unsetInfo();
786 } else {
787 setInfo((String) value);
788 }
789 break;
790
791 case MD5:
792 if (value == null) {
793 unsetMd5();
794 } else {
795 setMd5((Boolean) value);
796 }
797 break;
798
799 case BLOCKSIZE:
800 if (value == null) {
801 unsetBlocksize();
802 } else {
803 setBlocksize((Integer) value);
804 }
805 break;
806
807 case START:
808 if (value == null) {
809 unsetStart();
810 } else {
811 setStart((String) value);
812 }
813 break;
814
815 case DELAY:
816 if (value == null) {
817 unsetDelay();
818 } else {
819 setDelay((String) value);
820 }
821 break;
822
823 case NOTRACE:
824 if (value == null) {
825 unsetNotrace();
826 } else {
827 setNotrace((Boolean) value);
828 }
829 break;
830
831 case TID:
832 if (value == null) {
833 unsetTid();
834 } else {
835 setTid((Long) value);
836 }
837 break;
838
839 case ACTION:
840 if (value == null) {
841 unsetAction();
842 } else {
843 setAction((Action) value);
844 }
845 break;
846
847 }
848 }
849
850 @Override
851 public final Object getFieldValue(final _Fields field) {
852 switch (field) {
853 case MODE:
854 return getMode();
855
856 case FROMUID:
857 return getFromuid();
858
859 case DESTUID:
860 return getDestuid();
861
862 case FILE:
863 return getFile();
864
865 case RULE:
866 return getRule();
867
868 case INFO:
869 return getInfo();
870
871 case MD5:
872 return Boolean.valueOf(isMd5());
873
874 case BLOCKSIZE:
875 return Integer.valueOf(getBlocksize());
876
877 case START:
878 return getStart();
879
880 case DELAY:
881 return getDelay();
882
883 case NOTRACE:
884 return Boolean.valueOf(isNotrace());
885
886 case TID:
887 return Long.valueOf(getTid());
888
889 case ACTION:
890 return getAction();
891
892 }
893 throw new IllegalStateException();
894 }
895
896
897
898
899
900
901 @Override
902 public final boolean isSet(final _Fields field) {
903 if (field == null) {
904 throw new IllegalArgumentException();
905 }
906
907 switch (field) {
908 case MODE:
909 return isSetMode();
910 case FROMUID:
911 return isSetFromuid();
912 case DESTUID:
913 return isSetDestuid();
914 case FILE:
915 return isSetFile();
916 case RULE:
917 return isSetRule();
918 case INFO:
919 return isSetInfo();
920 case MD5:
921 return isSetMd5();
922 case BLOCKSIZE:
923 return isSetBlocksize();
924 case START:
925 return isSetStart();
926 case DELAY:
927 return isSetDelay();
928 case NOTRACE:
929 return isSetNotrace();
930 case TID:
931 return isSetTid();
932 case ACTION:
933 return isSetAction();
934 }
935 throw new IllegalStateException();
936 }
937
938 @Override
939 public final boolean equals(final Object that) {
940 if (that == null) {
941 return false;
942 }
943 if (that instanceof R66Request) {
944 return equals((R66Request) that);
945 }
946 return false;
947 }
948
949 public final boolean equals(final R66Request that) {
950 if (that == null) {
951 return false;
952 }
953
954 final boolean this_present_mode = isSetMode();
955 final boolean that_present_mode = that.isSetMode();
956 if (this_present_mode || that_present_mode) {
957 if (!(this_present_mode && that_present_mode)) {
958 return false;
959 }
960 if (mode != that.mode) {
961 return false;
962 }
963 }
964
965 final boolean this_present_fromuid = isSetFromuid();
966 final boolean that_present_fromuid = that.isSetFromuid();
967 if (this_present_fromuid || that_present_fromuid) {
968 if (!(this_present_fromuid && that_present_fromuid)) {
969 return false;
970 }
971 if (!fromuid.equals(that.fromuid)) {
972 return false;
973 }
974 }
975
976 final boolean this_present_destuid = isSetDestuid();
977 final boolean that_present_destuid = that.isSetDestuid();
978 if (this_present_destuid || that_present_destuid) {
979 if (!(this_present_destuid && that_present_destuid)) {
980 return false;
981 }
982 if (!destuid.equals(that.destuid)) {
983 return false;
984 }
985 }
986
987 final boolean this_present_file = isSetFile();
988 final boolean that_present_file = that.isSetFile();
989 if (this_present_file || that_present_file) {
990 if (!(this_present_file && that_present_file)) {
991 return false;
992 }
993 if (!file.equals(that.file)) {
994 return false;
995 }
996 }
997
998 final boolean this_present_rule = isSetRule();
999 final boolean that_present_rule = that.isSetRule();
1000 if (this_present_rule || that_present_rule) {
1001 if (!(this_present_rule && that_present_rule)) {
1002 return false;
1003 }
1004 if (!rule.equals(that.rule)) {
1005 return false;
1006 }
1007 }
1008
1009 final boolean this_present_info = isSetInfo();
1010 final boolean that_present_info = that.isSetInfo();
1011 if (this_present_info || that_present_info) {
1012 if (!(this_present_info && that_present_info)) {
1013 return false;
1014 }
1015 if (!info.equals(that.info)) {
1016 return false;
1017 }
1018 }
1019
1020 final boolean this_present_md5 = isSetMd5();
1021 final boolean that_present_md5 = that.isSetMd5();
1022 if (this_present_md5 || that_present_md5) {
1023 if (!(this_present_md5 && that_present_md5)) {
1024 return false;
1025 }
1026 if (md5 != that.md5) {
1027 return false;
1028 }
1029 }
1030
1031 final boolean this_present_blocksize = isSetBlocksize();
1032 final boolean that_present_blocksize = that.isSetBlocksize();
1033 if (this_present_blocksize || that_present_blocksize) {
1034 if (!(this_present_blocksize && that_present_blocksize)) {
1035 return false;
1036 }
1037 if (blocksize != that.blocksize) {
1038 return false;
1039 }
1040 }
1041
1042 final boolean this_present_start = isSetStart();
1043 final boolean that_present_start = that.isSetStart();
1044 if (this_present_start || that_present_start) {
1045 if (!(this_present_start && that_present_start)) {
1046 return false;
1047 }
1048 if (!start.equals(that.start)) {
1049 return false;
1050 }
1051 }
1052
1053 final boolean this_present_delay = isSetDelay();
1054 final boolean that_present_delay = that.isSetDelay();
1055 if (this_present_delay || that_present_delay) {
1056 if (!(this_present_delay && that_present_delay)) {
1057 return false;
1058 }
1059 if (!delay.equals(that.delay)) {
1060 return false;
1061 }
1062 }
1063
1064 final boolean this_present_notrace = isSetNotrace();
1065 final boolean that_present_notrace = that.isSetNotrace();
1066 if (this_present_notrace || that_present_notrace) {
1067 if (!(this_present_notrace && that_present_notrace)) {
1068 return false;
1069 }
1070 if (notrace != that.notrace) {
1071 return false;
1072 }
1073 }
1074
1075 final boolean this_present_tid = isSetTid();
1076 final boolean that_present_tid = that.isSetTid();
1077 if (this_present_tid || that_present_tid) {
1078 if (!(this_present_tid && that_present_tid)) {
1079 return false;
1080 }
1081 if (tid != that.tid) {
1082 return false;
1083 }
1084 }
1085
1086 final boolean this_present_action = isSetAction();
1087 final boolean that_present_action = that.isSetAction();
1088 if (this_present_action || that_present_action) {
1089 if (!(this_present_action && that_present_action)) {
1090 return false;
1091 }
1092 return action == that.action;
1093 }
1094
1095 return true;
1096 }
1097
1098 @Override
1099 public final int hashCode() {
1100 return 0;
1101 }
1102
1103 @Override
1104 public final int compareTo(final R66Request other) {
1105 if (!getClass().equals(other.getClass())) {
1106 return getClass().getName().compareTo(other.getClass().getName());
1107 }
1108
1109 int lastComparison;
1110
1111 lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode());
1112 if (lastComparison != 0) {
1113 return lastComparison;
1114 }
1115 if (isSetMode()) {
1116 lastComparison = TBaseHelper.compareTo(mode, other.mode);
1117 if (lastComparison != 0) {
1118 return lastComparison;
1119 }
1120 }
1121 lastComparison =
1122 Boolean.valueOf(isSetFromuid()).compareTo(other.isSetFromuid());
1123 if (lastComparison != 0) {
1124 return lastComparison;
1125 }
1126 if (isSetFromuid()) {
1127 lastComparison = TBaseHelper.compareTo(fromuid, other.fromuid);
1128 if (lastComparison != 0) {
1129 return lastComparison;
1130 }
1131 }
1132 lastComparison =
1133 Boolean.valueOf(isSetDestuid()).compareTo(other.isSetDestuid());
1134 if (lastComparison != 0) {
1135 return lastComparison;
1136 }
1137 if (isSetDestuid()) {
1138 lastComparison = TBaseHelper.compareTo(destuid, other.destuid);
1139 if (lastComparison != 0) {
1140 return lastComparison;
1141 }
1142 }
1143 lastComparison = Boolean.valueOf(isSetFile()).compareTo(other.isSetFile());
1144 if (lastComparison != 0) {
1145 return lastComparison;
1146 }
1147 if (isSetFile()) {
1148 lastComparison = TBaseHelper.compareTo(file, other.file);
1149 if (lastComparison != 0) {
1150 return lastComparison;
1151 }
1152 }
1153 lastComparison = Boolean.valueOf(isSetRule()).compareTo(other.isSetRule());
1154 if (lastComparison != 0) {
1155 return lastComparison;
1156 }
1157 if (isSetRule()) {
1158 lastComparison = TBaseHelper.compareTo(rule, other.rule);
1159 if (lastComparison != 0) {
1160 return lastComparison;
1161 }
1162 }
1163 lastComparison = Boolean.valueOf(isSetInfo()).compareTo(other.isSetInfo());
1164 if (lastComparison != 0) {
1165 return lastComparison;
1166 }
1167 if (isSetInfo()) {
1168 lastComparison = TBaseHelper.compareTo(info, other.info);
1169 if (lastComparison != 0) {
1170 return lastComparison;
1171 }
1172 }
1173 lastComparison = Boolean.valueOf(isSetMd5()).compareTo(other.isSetMd5());
1174 if (lastComparison != 0) {
1175 return lastComparison;
1176 }
1177 if (isSetMd5()) {
1178 lastComparison = TBaseHelper.compareTo(md5, other.md5);
1179 if (lastComparison != 0) {
1180 return lastComparison;
1181 }
1182 }
1183 lastComparison =
1184 Boolean.valueOf(isSetBlocksize()).compareTo(other.isSetBlocksize());
1185 if (lastComparison != 0) {
1186 return lastComparison;
1187 }
1188 if (isSetBlocksize()) {
1189 lastComparison = TBaseHelper.compareTo(blocksize, other.blocksize);
1190 if (lastComparison != 0) {
1191 return lastComparison;
1192 }
1193 }
1194 lastComparison =
1195 Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
1196 if (lastComparison != 0) {
1197 return lastComparison;
1198 }
1199 if (isSetStart()) {
1200 lastComparison = TBaseHelper.compareTo(start, other.start);
1201 if (lastComparison != 0) {
1202 return lastComparison;
1203 }
1204 }
1205 lastComparison =
1206 Boolean.valueOf(isSetDelay()).compareTo(other.isSetDelay());
1207 if (lastComparison != 0) {
1208 return lastComparison;
1209 }
1210 if (isSetDelay()) {
1211 lastComparison = TBaseHelper.compareTo(delay, other.delay);
1212 if (lastComparison != 0) {
1213 return lastComparison;
1214 }
1215 }
1216 lastComparison =
1217 Boolean.valueOf(isSetNotrace()).compareTo(other.isSetNotrace());
1218 if (lastComparison != 0) {
1219 return lastComparison;
1220 }
1221 if (isSetNotrace()) {
1222 lastComparison = TBaseHelper.compareTo(notrace, other.notrace);
1223 if (lastComparison != 0) {
1224 return lastComparison;
1225 }
1226 }
1227 lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid());
1228 if (lastComparison != 0) {
1229 return lastComparison;
1230 }
1231 if (isSetTid()) {
1232 lastComparison = TBaseHelper.compareTo(tid, other.tid);
1233 if (lastComparison != 0) {
1234 return lastComparison;
1235 }
1236 }
1237 lastComparison =
1238 Boolean.valueOf(isSetAction()).compareTo(other.isSetAction());
1239 if (lastComparison != 0) {
1240 return lastComparison;
1241 }
1242 if (isSetAction()) {
1243 lastComparison = TBaseHelper.compareTo(action, other.action);
1244 return lastComparison;
1245 }
1246 return 0;
1247 }
1248
1249 @Override
1250 public final _Fields fieldForId(final int fieldId) {
1251 return _Fields.findByThriftId(fieldId);
1252 }
1253
1254 @Override
1255 public final void read(final TProtocol iprot) throws TException {
1256 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1257 }
1258
1259 @Override
1260 public final void write(final TProtocol oprot) throws TException {
1261 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1262 }
1263
1264 @Override
1265 public final String toString() {
1266 final StringBuilder sb = new StringBuilder("R66Request(");
1267
1268 sb.append("mode:");
1269 if (mode == null) {
1270 sb.append("null");
1271 } else {
1272 sb.append(mode);
1273 }
1274 if (isSetFromuid()) {
1275 sb.append(", ");
1276 sb.append("fromuid:");
1277 if (fromuid == null) {
1278 sb.append("null");
1279 } else {
1280 sb.append(fromuid);
1281 }
1282 }
1283 if (isSetDestuid()) {
1284 sb.append(", ");
1285 sb.append("destuid:");
1286 if (destuid == null) {
1287 sb.append("null");
1288 } else {
1289 sb.append(destuid);
1290 }
1291 }
1292 if (isSetFile()) {
1293 sb.append(", ");
1294 sb.append("file:");
1295 if (file == null) {
1296 sb.append("null");
1297 } else {
1298 sb.append(file);
1299 }
1300 }
1301 if (isSetRule()) {
1302 sb.append(", ");
1303 sb.append("rule:");
1304 if (rule == null) {
1305 sb.append("null");
1306 } else {
1307 sb.append(rule);
1308 }
1309 }
1310 if (isSetInfo()) {
1311 sb.append(", ");
1312 sb.append("info:");
1313 if (info == null) {
1314 sb.append("null");
1315 } else {
1316 sb.append(info);
1317 }
1318 }
1319 if (isSetMd5()) {
1320 sb.append(", ");
1321 sb.append("md5:").append(md5);
1322 }
1323 if (isSetBlocksize()) {
1324 sb.append(", ");
1325 sb.append("blocksize:").append(blocksize);
1326 }
1327 if (isSetStart()) {
1328 sb.append(", ");
1329 sb.append("start:");
1330 if (start == null) {
1331 sb.append("null");
1332 } else {
1333 sb.append(start);
1334 }
1335 }
1336 if (isSetDelay()) {
1337 sb.append(", ");
1338 sb.append("delay:");
1339 if (delay == null) {
1340 sb.append("null");
1341 } else {
1342 sb.append(delay);
1343 }
1344 }
1345 if (isSetNotrace()) {
1346 sb.append(", ");
1347 sb.append("notrace:").append(notrace);
1348 }
1349 if (isSetTid()) {
1350 sb.append(", ");
1351 sb.append("tid:").append(tid);
1352 }
1353 if (isSetAction()) {
1354 sb.append(", ");
1355 sb.append("action:");
1356 if (action == null) {
1357 sb.append("null");
1358 } else {
1359 sb.append(action);
1360 }
1361 }
1362 sb.append(')');
1363 return sb.toString();
1364 }
1365
1366 public final void validate() throws TException {
1367
1368 if (mode == null) {
1369 throw new TProtocolException(
1370 "Required field 'mode' was not present! Struct: " + this);
1371 }
1372
1373 }
1374
1375 private void writeObject(final ObjectOutputStream out) throws IOException {
1376 try {
1377 write(new TCompactProtocol(new TIOStreamTransport(out)));
1378 } catch (final TException te) {
1379 throw new IOException(te);
1380 }
1381 }
1382
1383 private void readObject(final ObjectInputStream in)
1384 throws IOException, ClassNotFoundException {
1385 try {
1386
1387
1388 issetBitfield = 0;
1389 read(new TCompactProtocol(new TIOStreamTransport(in)));
1390 } catch (final TException te) {
1391 throw new IOException(te);
1392 }
1393 }
1394
1395 private static class R66RequestStandardSchemeFactory
1396 implements SchemeFactory {
1397 @Override
1398 public R66RequestStandardScheme getScheme() {
1399 return new R66RequestStandardScheme();
1400 }
1401 }
1402
1403 private static class R66RequestStandardScheme
1404 extends StandardScheme<R66Request> {
1405
1406 @Override
1407 public final void read(final TProtocol iprot, final R66Request struct)
1408 throws TException {
1409 TField schemeField;
1410 iprot.readStructBegin();
1411 while (true) {
1412 schemeField = iprot.readFieldBegin();
1413 if (schemeField.type == TType.STOP) {
1414 break;
1415 }
1416 switch (schemeField.id) {
1417 case 1:
1418 if (schemeField.type == TType.I32) {
1419 struct.mode = RequestMode.findByValue(iprot.readI32());
1420 struct.setModeIsSet(true);
1421 } else {
1422 TProtocolUtil.skip(iprot, schemeField.type);
1423 }
1424 break;
1425 case 2:
1426 if (schemeField.type == TType.STRING) {
1427 struct.fromuid = iprot.readString();
1428 struct.setFromuidIsSet(true);
1429 } else {
1430 TProtocolUtil.skip(iprot, schemeField.type);
1431 }
1432 break;
1433 case 3:
1434 if (schemeField.type == TType.STRING) {
1435 struct.destuid = iprot.readString();
1436 struct.setDestuidIsSet(true);
1437 } else {
1438 TProtocolUtil.skip(iprot, schemeField.type);
1439 }
1440 break;
1441 case 4:
1442 if (schemeField.type == TType.STRING) {
1443 struct.file = iprot.readString();
1444 struct.setFileIsSet(true);
1445 } else {
1446 TProtocolUtil.skip(iprot, schemeField.type);
1447 }
1448 break;
1449 case 5:
1450 if (schemeField.type == TType.STRING) {
1451 struct.rule = iprot.readString();
1452 struct.setRuleIsSet(true);
1453 } else {
1454 TProtocolUtil.skip(iprot, schemeField.type);
1455 }
1456 break;
1457 case 10:
1458 if (schemeField.type == TType.STRING) {
1459 struct.info = iprot.readString();
1460 struct.setInfoIsSet(true);
1461 } else {
1462 TProtocolUtil.skip(iprot, schemeField.type);
1463 }
1464 break;
1465 case 11:
1466 if (schemeField.type == TType.BOOL) {
1467 struct.md5 = iprot.readBool();
1468 struct.setMd5IsSet(true);
1469 } else {
1470 TProtocolUtil.skip(iprot, schemeField.type);
1471 }
1472 break;
1473 case 12:
1474 if (schemeField.type == TType.I32) {
1475 struct.blocksize = iprot.readI32();
1476 struct.setBlocksizeIsSet(true);
1477 } else {
1478 TProtocolUtil.skip(iprot, schemeField.type);
1479 }
1480 break;
1481 case 13:
1482 if (schemeField.type == TType.STRING) {
1483 struct.start = iprot.readString();
1484 struct.setStartIsSet(true);
1485 } else {
1486 TProtocolUtil.skip(iprot, schemeField.type);
1487 }
1488 break;
1489 case 14:
1490 if (schemeField.type == TType.STRING) {
1491 struct.delay = iprot.readString();
1492 struct.setDelayIsSet(true);
1493 } else {
1494 TProtocolUtil.skip(iprot, schemeField.type);
1495 }
1496 break;
1497 case 15:
1498 if (schemeField.type == TType.BOOL) {
1499 struct.notrace = iprot.readBool();
1500 struct.setNotraceIsSet(true);
1501 } else {
1502 TProtocolUtil.skip(iprot, schemeField.type);
1503 }
1504 break;
1505 case 20:
1506 if (schemeField.type == TType.I64) {
1507 struct.tid = iprot.readI64();
1508 struct.setTidIsSet(true);
1509 } else {
1510 TProtocolUtil.skip(iprot, schemeField.type);
1511 }
1512 break;
1513 case 21:
1514 if (schemeField.type == TType.I32) {
1515 struct.action = Action.findByValue(iprot.readI32());
1516 struct.setActionIsSet(true);
1517 } else {
1518 TProtocolUtil.skip(iprot, schemeField.type);
1519 }
1520 break;
1521 default:
1522 TProtocolUtil.skip(iprot, schemeField.type);
1523 }
1524 iprot.readFieldEnd();
1525 }
1526 iprot.readStructEnd();
1527
1528
1529
1530 struct.validate();
1531 }
1532
1533 @Override
1534 public final void write(final TProtocol oprot, final R66Request struct)
1535 throws TException {
1536 struct.validate();
1537
1538 oprot.writeStructBegin(STRUCT_DESC);
1539 if (struct.mode != null) {
1540 oprot.writeFieldBegin(MODE_FIELD_DESC);
1541 oprot.writeI32(struct.mode.getValue());
1542 oprot.writeFieldEnd();
1543 }
1544 if (struct.fromuid != null && struct.isSetFromuid()) {
1545 oprot.writeFieldBegin(FROMUID_FIELD_DESC);
1546 oprot.writeString(struct.fromuid);
1547 oprot.writeFieldEnd();
1548 }
1549 if (struct.destuid != null && struct.isSetDestuid()) {
1550 oprot.writeFieldBegin(DESTUID_FIELD_DESC);
1551 oprot.writeString(struct.destuid);
1552 oprot.writeFieldEnd();
1553 }
1554 if (struct.file != null && struct.isSetFile()) {
1555 oprot.writeFieldBegin(FILE_FIELD_DESC);
1556 oprot.writeString(struct.file);
1557 oprot.writeFieldEnd();
1558 }
1559 if (struct.rule != null && struct.isSetRule()) {
1560 oprot.writeFieldBegin(RULE_FIELD_DESC);
1561 oprot.writeString(struct.rule);
1562 oprot.writeFieldEnd();
1563 }
1564 if (struct.info != null && struct.isSetInfo()) {
1565 oprot.writeFieldBegin(INFO_FIELD_DESC);
1566 oprot.writeString(struct.info);
1567 oprot.writeFieldEnd();
1568 }
1569 if (struct.isSetMd5()) {
1570 oprot.writeFieldBegin(MD5_FIELD_DESC);
1571 oprot.writeBool(struct.md5);
1572 oprot.writeFieldEnd();
1573 }
1574 if (struct.isSetBlocksize()) {
1575 oprot.writeFieldBegin(BLOCKSIZE_FIELD_DESC);
1576 oprot.writeI32(struct.blocksize);
1577 oprot.writeFieldEnd();
1578 }
1579 if (struct.start != null && struct.isSetStart()) {
1580 oprot.writeFieldBegin(START_FIELD_DESC);
1581 oprot.writeString(struct.start);
1582 oprot.writeFieldEnd();
1583 }
1584 if (struct.delay != null && struct.isSetDelay()) {
1585 oprot.writeFieldBegin(DELAY_FIELD_DESC);
1586 oprot.writeString(struct.delay);
1587 oprot.writeFieldEnd();
1588 }
1589 if (struct.isSetNotrace()) {
1590 oprot.writeFieldBegin(NOTRACE_FIELD_DESC);
1591 oprot.writeBool(struct.notrace);
1592 oprot.writeFieldEnd();
1593 }
1594 if (struct.isSetTid()) {
1595 oprot.writeFieldBegin(TID_FIELD_DESC);
1596 oprot.writeI64(struct.tid);
1597 oprot.writeFieldEnd();
1598 }
1599 if (struct.action != null && struct.isSetAction()) {
1600 oprot.writeFieldBegin(ACTION_FIELD_DESC);
1601 oprot.writeI32(struct.action.getValue());
1602 oprot.writeFieldEnd();
1603 }
1604 oprot.writeFieldStop();
1605 oprot.writeStructEnd();
1606 }
1607
1608 }
1609
1610 private static class R66RequestTupleSchemeFactory implements SchemeFactory {
1611 @Override
1612 public final R66RequestTupleScheme getScheme() {
1613 return new R66RequestTupleScheme();
1614 }
1615 }
1616
1617 private static class R66RequestTupleScheme extends TupleScheme<R66Request> {
1618
1619 @Override
1620 public final void write(final TProtocol prot, final R66Request struct)
1621 throws TException {
1622 final TTupleProtocol oprot = (TTupleProtocol) prot;
1623 oprot.writeI32(struct.mode.getValue());
1624 final BitSet optionals = new BitSet();
1625 if (struct.isSetFromuid()) {
1626 optionals.set(0);
1627 }
1628 if (struct.isSetDestuid()) {
1629 optionals.set(1);
1630 }
1631 if (struct.isSetFile()) {
1632 optionals.set(2);
1633 }
1634 if (struct.isSetRule()) {
1635 optionals.set(3);
1636 }
1637 if (struct.isSetInfo()) {
1638 optionals.set(4);
1639 }
1640 if (struct.isSetMd5()) {
1641 optionals.set(5);
1642 }
1643 if (struct.isSetBlocksize()) {
1644 optionals.set(6);
1645 }
1646 if (struct.isSetStart()) {
1647 optionals.set(7);
1648 }
1649 if (struct.isSetDelay()) {
1650 optionals.set(8);
1651 }
1652 if (struct.isSetNotrace()) {
1653 optionals.set(9);
1654 }
1655 if (struct.isSetTid()) {
1656 optionals.set(10);
1657 }
1658 if (struct.isSetAction()) {
1659 optionals.set(11);
1660 }
1661 oprot.writeBitSet(optionals, 12);
1662 if (struct.isSetFromuid()) {
1663 oprot.writeString(struct.fromuid);
1664 }
1665 if (struct.isSetDestuid()) {
1666 oprot.writeString(struct.destuid);
1667 }
1668 if (struct.isSetFile()) {
1669 oprot.writeString(struct.file);
1670 }
1671 if (struct.isSetRule()) {
1672 oprot.writeString(struct.rule);
1673 }
1674 if (struct.isSetInfo()) {
1675 oprot.writeString(struct.info);
1676 }
1677 if (struct.isSetMd5()) {
1678 oprot.writeBool(struct.md5);
1679 }
1680 if (struct.isSetBlocksize()) {
1681 oprot.writeI32(struct.blocksize);
1682 }
1683 if (struct.isSetStart()) {
1684 oprot.writeString(struct.start);
1685 }
1686 if (struct.isSetDelay()) {
1687 oprot.writeString(struct.delay);
1688 }
1689 if (struct.isSetNotrace()) {
1690 oprot.writeBool(struct.notrace);
1691 }
1692 if (struct.isSetTid()) {
1693 oprot.writeI64(struct.tid);
1694 }
1695 if (struct.isSetAction()) {
1696 oprot.writeI32(struct.action.getValue());
1697 }
1698 }
1699
1700 @Override
1701 public final void read(final TProtocol prot, final R66Request struct)
1702 throws TException {
1703 final TTupleProtocol iprot = (TTupleProtocol) prot;
1704 struct.mode = RequestMode.findByValue(iprot.readI32());
1705 struct.setModeIsSet(true);
1706 final BitSet incoming = iprot.readBitSet(12);
1707 if (incoming.get(0)) {
1708 struct.fromuid = iprot.readString();
1709 struct.setFromuidIsSet(true);
1710 }
1711 if (incoming.get(1)) {
1712 struct.destuid = iprot.readString();
1713 struct.setDestuidIsSet(true);
1714 }
1715 if (incoming.get(2)) {
1716 struct.file = iprot.readString();
1717 struct.setFileIsSet(true);
1718 }
1719 if (incoming.get(3)) {
1720 struct.rule = iprot.readString();
1721 struct.setRuleIsSet(true);
1722 }
1723 if (incoming.get(4)) {
1724 struct.info = iprot.readString();
1725 struct.setInfoIsSet(true);
1726 }
1727 if (incoming.get(5)) {
1728 struct.md5 = iprot.readBool();
1729 struct.setMd5IsSet(true);
1730 }
1731 if (incoming.get(6)) {
1732 struct.blocksize = iprot.readI32();
1733 struct.setBlocksizeIsSet(true);
1734 }
1735 if (incoming.get(7)) {
1736 struct.start = iprot.readString();
1737 struct.setStartIsSet(true);
1738 }
1739 if (incoming.get(8)) {
1740 struct.delay = iprot.readString();
1741 struct.setDelayIsSet(true);
1742 }
1743 if (incoming.get(9)) {
1744 struct.notrace = iprot.readBool();
1745 struct.setNotraceIsSet(true);
1746 }
1747 if (incoming.get(10)) {
1748 struct.tid = iprot.readI64();
1749 struct.setTidIsSet(true);
1750 }
1751 if (incoming.get(11)) {
1752 struct.action = Action.findByValue(iprot.readI32());
1753 struct.setActionIsSet(true);
1754 }
1755 }
1756 }
1757
1758 }