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