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.data.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 TConstraintViolationSummary implements org.apache.thrift.TBase<TConstraintViolationSummary, TConstraintViolationSummary._Fields>, java.io.Serializable, Cloneable {
50 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TConstraintViolationSummary");
51
52 private static final org.apache.thrift.protocol.TField CONSTRAIN_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("constrainClass", org.apache.thrift.protocol.TType.STRING, (short)1);
53 private static final org.apache.thrift.protocol.TField VIOLATION_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("violationCode", org.apache.thrift.protocol.TType.I16, (short)2);
54 private static final org.apache.thrift.protocol.TField VIOLATION_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("violationDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
55 private static final org.apache.thrift.protocol.TField NUMBER_OF_VIOLATING_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfViolatingMutations", org.apache.thrift.protocol.TType.I64, (short)4);
56
57 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
58 static {
59 schemes.put(StandardScheme.class, new TConstraintViolationSummaryStandardSchemeFactory());
60 schemes.put(TupleScheme.class, new TConstraintViolationSummaryTupleSchemeFactory());
61 }
62
63 public String constrainClass;
64 public short violationCode;
65 public String violationDescription;
66 public long numberOfViolatingMutations;
67
68 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
69 @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
70 CONSTRAIN_CLASS((short)1, "constrainClass"),
71 VIOLATION_CODE((short)2, "violationCode"),
72 VIOLATION_DESCRIPTION((short)3, "violationDescription"),
73 NUMBER_OF_VIOLATING_MUTATIONS((short)4, "numberOfViolatingMutations");
74
75 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76
77 static {
78 for (_Fields field : EnumSet.allOf(_Fields.class)) {
79 byName.put(field.getFieldName(), field);
80 }
81 }
82
83 /**
84 * Find the _Fields constant that matches fieldId, or null if its not found.
85 */
86 public static _Fields findByThriftId(int fieldId) {
87 switch(fieldId) {
88 case 1:
89 return CONSTRAIN_CLASS;
90 case 2:
91 return VIOLATION_CODE;
92 case 3:
93 return VIOLATION_DESCRIPTION;
94 case 4:
95 return NUMBER_OF_VIOLATING_MUTATIONS;
96 default:
97 return null;
98 }
99 }
100
101 /**
102 * Find the _Fields constant that matches fieldId, throwing an exception
103 * if it is not found.
104 */
105 public static _Fields findByThriftIdOrThrow(int fieldId) {
106 _Fields fields = findByThriftId(fieldId);
107 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
108 return fields;
109 }
110
111 /**
112 * Find the _Fields constant that matches name, or null if its not found.
113 */
114 public static _Fields findByName(String name) {
115 return byName.get(name);
116 }
117
118 private final short _thriftId;
119 private final String _fieldName;
120
121 _Fields(short thriftId, String fieldName) {
122 _thriftId = thriftId;
123 _fieldName = fieldName;
124 }
125
126 public short getThriftFieldId() {
127 return _thriftId;
128 }
129
130 public String getFieldName() {
131 return _fieldName;
132 }
133 }
134
135
136 private static final int __VIOLATIONCODE_ISSET_ID = 0;
137 private static final int __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID = 1;
138 private byte __isset_bitfield = 0;
139 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
140 static {
141 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
142 tmpMap.put(_Fields.CONSTRAIN_CLASS, new org.apache.thrift.meta_data.FieldMetaData("constrainClass", org.apache.thrift.TFieldRequirementType.DEFAULT,
143 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
144 tmpMap.put(_Fields.VIOLATION_CODE, new org.apache.thrift.meta_data.FieldMetaData("violationCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
145 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
146 tmpMap.put(_Fields.VIOLATION_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("violationDescription", org.apache.thrift.TFieldRequirementType.DEFAULT,
147 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
148 tmpMap.put(_Fields.NUMBER_OF_VIOLATING_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("numberOfViolatingMutations", org.apache.thrift.TFieldRequirementType.DEFAULT,
149 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
150 metaDataMap = Collections.unmodifiableMap(tmpMap);
151 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TConstraintViolationSummary.class, metaDataMap);
152 }
153
154 public TConstraintViolationSummary() {
155 }
156
157 public TConstraintViolationSummary(
158 String constrainClass,
159 short violationCode,
160 String violationDescription,
161 long numberOfViolatingMutations)
162 {
163 this();
164 this.constrainClass = constrainClass;
165 this.violationCode = violationCode;
166 setViolationCodeIsSet(true);
167 this.violationDescription = violationDescription;
168 this.numberOfViolatingMutations = numberOfViolatingMutations;
169 setNumberOfViolatingMutationsIsSet(true);
170 }
171
172 /**
173 * Performs a deep copy on <i>other</i>.
174 */
175 public TConstraintViolationSummary(TConstraintViolationSummary other) {
176 __isset_bitfield = other.__isset_bitfield;
177 if (other.isSetConstrainClass()) {
178 this.constrainClass = other.constrainClass;
179 }
180 this.violationCode = other.violationCode;
181 if (other.isSetViolationDescription()) {
182 this.violationDescription = other.violationDescription;
183 }
184 this.numberOfViolatingMutations = other.numberOfViolatingMutations;
185 }
186
187 public TConstraintViolationSummary deepCopy() {
188 return new TConstraintViolationSummary(this);
189 }
190
191 @Override
192 public void clear() {
193 this.constrainClass = null;
194 setViolationCodeIsSet(false);
195 this.violationCode = 0;
196 this.violationDescription = null;
197 setNumberOfViolatingMutationsIsSet(false);
198 this.numberOfViolatingMutations = 0;
199 }
200
201 public String getConstrainClass() {
202 return this.constrainClass;
203 }
204
205 public TConstraintViolationSummary setConstrainClass(String constrainClass) {
206 this.constrainClass = constrainClass;
207 return this;
208 }
209
210 public void unsetConstrainClass() {
211 this.constrainClass = null;
212 }
213
214 /** Returns true if field constrainClass is set (has been assigned a value) and false otherwise */
215 public boolean isSetConstrainClass() {
216 return this.constrainClass != null;
217 }
218
219 public void setConstrainClassIsSet(boolean value) {
220 if (!value) {
221 this.constrainClass = null;
222 }
223 }
224
225 public short getViolationCode() {
226 return this.violationCode;
227 }
228
229 public TConstraintViolationSummary setViolationCode(short violationCode) {
230 this.violationCode = violationCode;
231 setViolationCodeIsSet(true);
232 return this;
233 }
234
235 public void unsetViolationCode() {
236 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
237 }
238
239 /** Returns true if field violationCode is set (has been assigned a value) and false otherwise */
240 public boolean isSetViolationCode() {
241 return EncodingUtils.testBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
242 }
243
244 public void setViolationCodeIsSet(boolean value) {
245 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID, value);
246 }
247
248 public String getViolationDescription() {
249 return this.violationDescription;
250 }
251
252 public TConstraintViolationSummary setViolationDescription(String violationDescription) {
253 this.violationDescription = violationDescription;
254 return this;
255 }
256
257 public void unsetViolationDescription() {
258 this.violationDescription = null;
259 }
260
261 /** Returns true if field violationDescription is set (has been assigned a value) and false otherwise */
262 public boolean isSetViolationDescription() {
263 return this.violationDescription != null;
264 }
265
266 public void setViolationDescriptionIsSet(boolean value) {
267 if (!value) {
268 this.violationDescription = null;
269 }
270 }
271
272 public long getNumberOfViolatingMutations() {
273 return this.numberOfViolatingMutations;
274 }
275
276 public TConstraintViolationSummary setNumberOfViolatingMutations(long numberOfViolatingMutations) {
277 this.numberOfViolatingMutations = numberOfViolatingMutations;
278 setNumberOfViolatingMutationsIsSet(true);
279 return this;
280 }
281
282 public void unsetNumberOfViolatingMutations() {
283 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
284 }
285
286 /** Returns true if field numberOfViolatingMutations is set (has been assigned a value) and false otherwise */
287 public boolean isSetNumberOfViolatingMutations() {
288 return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
289 }
290
291 public void setNumberOfViolatingMutationsIsSet(boolean value) {
292 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID, value);
293 }
294
295 public void setFieldValue(_Fields field, Object value) {
296 switch (field) {
297 case CONSTRAIN_CLASS:
298 if (value == null) {
299 unsetConstrainClass();
300 } else {
301 setConstrainClass((String)value);
302 }
303 break;
304
305 case VIOLATION_CODE:
306 if (value == null) {
307 unsetViolationCode();
308 } else {
309 setViolationCode((Short)value);
310 }
311 break;
312
313 case VIOLATION_DESCRIPTION:
314 if (value == null) {
315 unsetViolationDescription();
316 } else {
317 setViolationDescription((String)value);
318 }
319 break;
320
321 case NUMBER_OF_VIOLATING_MUTATIONS:
322 if (value == null) {
323 unsetNumberOfViolatingMutations();
324 } else {
325 setNumberOfViolatingMutations((Long)value);
326 }
327 break;
328
329 }
330 }
331
332 public Object getFieldValue(_Fields field) {
333 switch (field) {
334 case CONSTRAIN_CLASS:
335 return getConstrainClass();
336
337 case VIOLATION_CODE:
338 return Short.valueOf(getViolationCode());
339
340 case VIOLATION_DESCRIPTION:
341 return getViolationDescription();
342
343 case NUMBER_OF_VIOLATING_MUTATIONS:
344 return Long.valueOf(getNumberOfViolatingMutations());
345
346 }
347 throw new IllegalStateException();
348 }
349
350 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
351 public boolean isSet(_Fields field) {
352 if (field == null) {
353 throw new IllegalArgumentException();
354 }
355
356 switch (field) {
357 case CONSTRAIN_CLASS:
358 return isSetConstrainClass();
359 case VIOLATION_CODE:
360 return isSetViolationCode();
361 case VIOLATION_DESCRIPTION:
362 return isSetViolationDescription();
363 case NUMBER_OF_VIOLATING_MUTATIONS:
364 return isSetNumberOfViolatingMutations();
365 }
366 throw new IllegalStateException();
367 }
368
369 @Override
370 public boolean equals(Object that) {
371 if (that == null)
372 return false;
373 if (that instanceof TConstraintViolationSummary)
374 return this.equals((TConstraintViolationSummary)that);
375 return false;
376 }
377
378 public boolean equals(TConstraintViolationSummary that) {
379 if (that == null)
380 return false;
381
382 boolean this_present_constrainClass = true && this.isSetConstrainClass();
383 boolean that_present_constrainClass = true && that.isSetConstrainClass();
384 if (this_present_constrainClass || that_present_constrainClass) {
385 if (!(this_present_constrainClass && that_present_constrainClass))
386 return false;
387 if (!this.constrainClass.equals(that.constrainClass))
388 return false;
389 }
390
391 boolean this_present_violationCode = true;
392 boolean that_present_violationCode = true;
393 if (this_present_violationCode || that_present_violationCode) {
394 if (!(this_present_violationCode && that_present_violationCode))
395 return false;
396 if (this.violationCode != that.violationCode)
397 return false;
398 }
399
400 boolean this_present_violationDescription = true && this.isSetViolationDescription();
401 boolean that_present_violationDescription = true && that.isSetViolationDescription();
402 if (this_present_violationDescription || that_present_violationDescription) {
403 if (!(this_present_violationDescription && that_present_violationDescription))
404 return false;
405 if (!this.violationDescription.equals(that.violationDescription))
406 return false;
407 }
408
409 boolean this_present_numberOfViolatingMutations = true;
410 boolean that_present_numberOfViolatingMutations = true;
411 if (this_present_numberOfViolatingMutations || that_present_numberOfViolatingMutations) {
412 if (!(this_present_numberOfViolatingMutations && that_present_numberOfViolatingMutations))
413 return false;
414 if (this.numberOfViolatingMutations != that.numberOfViolatingMutations)
415 return false;
416 }
417
418 return true;
419 }
420
421 @Override
422 public int hashCode() {
423 return 0;
424 }
425
426 public int compareTo(TConstraintViolationSummary other) {
427 if (!getClass().equals(other.getClass())) {
428 return getClass().getName().compareTo(other.getClass().getName());
429 }
430
431 int lastComparison = 0;
432 TConstraintViolationSummary typedOther = (TConstraintViolationSummary)other;
433
434 lastComparison = Boolean.valueOf(isSetConstrainClass()).compareTo(typedOther.isSetConstrainClass());
435 if (lastComparison != 0) {
436 return lastComparison;
437 }
438 if (isSetConstrainClass()) {
439 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.constrainClass, typedOther.constrainClass);
440 if (lastComparison != 0) {
441 return lastComparison;
442 }
443 }
444 lastComparison = Boolean.valueOf(isSetViolationCode()).compareTo(typedOther.isSetViolationCode());
445 if (lastComparison != 0) {
446 return lastComparison;
447 }
448 if (isSetViolationCode()) {
449 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.violationCode, typedOther.violationCode);
450 if (lastComparison != 0) {
451 return lastComparison;
452 }
453 }
454 lastComparison = Boolean.valueOf(isSetViolationDescription()).compareTo(typedOther.isSetViolationDescription());
455 if (lastComparison != 0) {
456 return lastComparison;
457 }
458 if (isSetViolationDescription()) {
459 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.violationDescription, typedOther.violationDescription);
460 if (lastComparison != 0) {
461 return lastComparison;
462 }
463 }
464 lastComparison = Boolean.valueOf(isSetNumberOfViolatingMutations()).compareTo(typedOther.isSetNumberOfViolatingMutations());
465 if (lastComparison != 0) {
466 return lastComparison;
467 }
468 if (isSetNumberOfViolatingMutations()) {
469 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfViolatingMutations, typedOther.numberOfViolatingMutations);
470 if (lastComparison != 0) {
471 return lastComparison;
472 }
473 }
474 return 0;
475 }
476
477 public _Fields fieldForId(int fieldId) {
478 return _Fields.findByThriftId(fieldId);
479 }
480
481 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
482 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
483 }
484
485 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
486 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
487 }
488
489 @Override
490 public String toString() {
491 StringBuilder sb = new StringBuilder("TConstraintViolationSummary(");
492 boolean first = true;
493
494 sb.append("constrainClass:");
495 if (this.constrainClass == null) {
496 sb.append("null");
497 } else {
498 sb.append(this.constrainClass);
499 }
500 first = false;
501 if (!first) sb.append(", ");
502 sb.append("violationCode:");
503 sb.append(this.violationCode);
504 first = false;
505 if (!first) sb.append(", ");
506 sb.append("violationDescription:");
507 if (this.violationDescription == null) {
508 sb.append("null");
509 } else {
510 sb.append(this.violationDescription);
511 }
512 first = false;
513 if (!first) sb.append(", ");
514 sb.append("numberOfViolatingMutations:");
515 sb.append(this.numberOfViolatingMutations);
516 first = false;
517 sb.append(")");
518 return sb.toString();
519 }
520
521 public void validate() throws org.apache.thrift.TException {
522
523
524 }
525
526 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
527 try {
528 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
529 } catch (org.apache.thrift.TException te) {
530 throw new java.io.IOException(te);
531 }
532 }
533
534 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
535 try {
536
537 __isset_bitfield = 0;
538 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
539 } catch (org.apache.thrift.TException te) {
540 throw new java.io.IOException(te);
541 }
542 }
543
544 private static class TConstraintViolationSummaryStandardSchemeFactory implements SchemeFactory {
545 public TConstraintViolationSummaryStandardScheme getScheme() {
546 return new TConstraintViolationSummaryStandardScheme();
547 }
548 }
549
550 private static class TConstraintViolationSummaryStandardScheme extends StandardScheme<TConstraintViolationSummary> {
551
552 public void read(org.apache.thrift.protocol.TProtocol iprot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
553 org.apache.thrift.protocol.TField schemeField;
554 iprot.readStructBegin();
555 while (true)
556 {
557 schemeField = iprot.readFieldBegin();
558 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
559 break;
560 }
561 switch (schemeField.id) {
562 case 1:
563 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
564 struct.constrainClass = iprot.readString();
565 struct.setConstrainClassIsSet(true);
566 } else {
567 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
568 }
569 break;
570 case 2:
571 if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
572 struct.violationCode = iprot.readI16();
573 struct.setViolationCodeIsSet(true);
574 } else {
575 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
576 }
577 break;
578 case 3:
579 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
580 struct.violationDescription = iprot.readString();
581 struct.setViolationDescriptionIsSet(true);
582 } else {
583 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
584 }
585 break;
586 case 4:
587 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
588 struct.numberOfViolatingMutations = iprot.readI64();
589 struct.setNumberOfViolatingMutationsIsSet(true);
590 } else {
591 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
592 }
593 break;
594 default:
595 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
596 }
597 iprot.readFieldEnd();
598 }
599 iprot.readStructEnd();
600
601
602 struct.validate();
603 }
604
605 public void write(org.apache.thrift.protocol.TProtocol oprot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
606 struct.validate();
607
608 oprot.writeStructBegin(STRUCT_DESC);
609 if (struct.constrainClass != null) {
610 oprot.writeFieldBegin(CONSTRAIN_CLASS_FIELD_DESC);
611 oprot.writeString(struct.constrainClass);
612 oprot.writeFieldEnd();
613 }
614 oprot.writeFieldBegin(VIOLATION_CODE_FIELD_DESC);
615 oprot.writeI16(struct.violationCode);
616 oprot.writeFieldEnd();
617 if (struct.violationDescription != null) {
618 oprot.writeFieldBegin(VIOLATION_DESCRIPTION_FIELD_DESC);
619 oprot.writeString(struct.violationDescription);
620 oprot.writeFieldEnd();
621 }
622 oprot.writeFieldBegin(NUMBER_OF_VIOLATING_MUTATIONS_FIELD_DESC);
623 oprot.writeI64(struct.numberOfViolatingMutations);
624 oprot.writeFieldEnd();
625 oprot.writeFieldStop();
626 oprot.writeStructEnd();
627 }
628
629 }
630
631 private static class TConstraintViolationSummaryTupleSchemeFactory implements SchemeFactory {
632 public TConstraintViolationSummaryTupleScheme getScheme() {
633 return new TConstraintViolationSummaryTupleScheme();
634 }
635 }
636
637 private static class TConstraintViolationSummaryTupleScheme extends TupleScheme<TConstraintViolationSummary> {
638
639 @Override
640 public void write(org.apache.thrift.protocol.TProtocol prot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
641 TTupleProtocol oprot = (TTupleProtocol) prot;
642 BitSet optionals = new BitSet();
643 if (struct.isSetConstrainClass()) {
644 optionals.set(0);
645 }
646 if (struct.isSetViolationCode()) {
647 optionals.set(1);
648 }
649 if (struct.isSetViolationDescription()) {
650 optionals.set(2);
651 }
652 if (struct.isSetNumberOfViolatingMutations()) {
653 optionals.set(3);
654 }
655 oprot.writeBitSet(optionals, 4);
656 if (struct.isSetConstrainClass()) {
657 oprot.writeString(struct.constrainClass);
658 }
659 if (struct.isSetViolationCode()) {
660 oprot.writeI16(struct.violationCode);
661 }
662 if (struct.isSetViolationDescription()) {
663 oprot.writeString(struct.violationDescription);
664 }
665 if (struct.isSetNumberOfViolatingMutations()) {
666 oprot.writeI64(struct.numberOfViolatingMutations);
667 }
668 }
669
670 @Override
671 public void read(org.apache.thrift.protocol.TProtocol prot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
672 TTupleProtocol iprot = (TTupleProtocol) prot;
673 BitSet incoming = iprot.readBitSet(4);
674 if (incoming.get(0)) {
675 struct.constrainClass = iprot.readString();
676 struct.setConstrainClassIsSet(true);
677 }
678 if (incoming.get(1)) {
679 struct.violationCode = iprot.readI16();
680 struct.setViolationCodeIsSet(true);
681 }
682 if (incoming.get(2)) {
683 struct.violationDescription = iprot.readString();
684 struct.setViolationDescriptionIsSet(true);
685 }
686 if (incoming.get(3)) {
687 struct.numberOfViolatingMutations = iprot.readI64();
688 struct.setNumberOfViolatingMutationsIsSet(true);
689 }
690 }
691 }
692
693 }
694