
com.bendb.thrifty.test.gen.LargeDeltas Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.bendb.thrifty.test.gen;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04")
public class LargeDeltas implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LargeDeltas");
private static final org.apache.thrift.protocol.TField B1_FIELD_DESC = new org.apache.thrift.protocol.TField("b1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField B10_FIELD_DESC = new org.apache.thrift.protocol.TField("b10", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField B100_FIELD_DESC = new org.apache.thrift.protocol.TField("b100", org.apache.thrift.protocol.TType.STRUCT, (short)100);
private static final org.apache.thrift.protocol.TField CHECK_TRUE_FIELD_DESC = new org.apache.thrift.protocol.TField("check_true", org.apache.thrift.protocol.TType.BOOL, (short)500);
private static final org.apache.thrift.protocol.TField B1000_FIELD_DESC = new org.apache.thrift.protocol.TField("b1000", org.apache.thrift.protocol.TType.STRUCT, (short)1000);
private static final org.apache.thrift.protocol.TField CHECK_FALSE_FIELD_DESC = new org.apache.thrift.protocol.TField("check_false", org.apache.thrift.protocol.TType.BOOL, (short)1500);
private static final org.apache.thrift.protocol.TField VERTWO2000_FIELD_DESC = new org.apache.thrift.protocol.TField("vertwo2000", org.apache.thrift.protocol.TType.STRUCT, (short)2000);
private static final org.apache.thrift.protocol.TField A_SET2500_FIELD_DESC = new org.apache.thrift.protocol.TField("a_set2500", org.apache.thrift.protocol.TType.SET, (short)2500);
private static final org.apache.thrift.protocol.TField VERTWO3000_FIELD_DESC = new org.apache.thrift.protocol.TField("vertwo3000", org.apache.thrift.protocol.TType.STRUCT, (short)3000);
private static final org.apache.thrift.protocol.TField BIG_NUMBERS_FIELD_DESC = new org.apache.thrift.protocol.TField("big_numbers", org.apache.thrift.protocol.TType.LIST, (short)4000);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new LargeDeltasStandardSchemeFactory());
schemes.put(TupleScheme.class, new LargeDeltasTupleSchemeFactory());
}
public Bools b1; // required
public Bools b10; // required
public Bools b100; // required
public boolean check_true; // required
public Bools b1000; // required
public boolean check_false; // required
public VersioningTestV2 vertwo2000; // required
public Set a_set2500; // required
public VersioningTestV2 vertwo3000; // required
public List big_numbers; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
B1((short)1, "b1"),
B10((short)10, "b10"),
B100((short)100, "b100"),
CHECK_TRUE((short)500, "check_true"),
B1000((short)1000, "b1000"),
CHECK_FALSE((short)1500, "check_false"),
VERTWO2000((short)2000, "vertwo2000"),
A_SET2500((short)2500, "a_set2500"),
VERTWO3000((short)3000, "vertwo3000"),
BIG_NUMBERS((short)4000, "big_numbers");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // B1
return B1;
case 10: // B10
return B10;
case 100: // B100
return B100;
case 500: // CHECK_TRUE
return CHECK_TRUE;
case 1000: // B1000
return B1000;
case 1500: // CHECK_FALSE
return CHECK_FALSE;
case 2000: // VERTWO2000
return VERTWO2000;
case 2500: // A_SET2500
return A_SET2500;
case 3000: // VERTWO3000
return VERTWO3000;
case 4000: // BIG_NUMBERS
return BIG_NUMBERS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __CHECK_TRUE_ISSET_ID = 0;
private static final int __CHECK_FALSE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.B1, new org.apache.thrift.meta_data.FieldMetaData("b1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Bools.class)));
tmpMap.put(_Fields.B10, new org.apache.thrift.meta_data.FieldMetaData("b10", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Bools.class)));
tmpMap.put(_Fields.B100, new org.apache.thrift.meta_data.FieldMetaData("b100", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Bools.class)));
tmpMap.put(_Fields.CHECK_TRUE, new org.apache.thrift.meta_data.FieldMetaData("check_true", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.B1000, new org.apache.thrift.meta_data.FieldMetaData("b1000", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Bools.class)));
tmpMap.put(_Fields.CHECK_FALSE, new org.apache.thrift.meta_data.FieldMetaData("check_false", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.VERTWO2000, new org.apache.thrift.meta_data.FieldMetaData("vertwo2000", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VersioningTestV2.class)));
tmpMap.put(_Fields.A_SET2500, new org.apache.thrift.meta_data.FieldMetaData("a_set2500", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.VERTWO3000, new org.apache.thrift.meta_data.FieldMetaData("vertwo3000", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VersioningTestV2.class)));
tmpMap.put(_Fields.BIG_NUMBERS, new org.apache.thrift.meta_data.FieldMetaData("big_numbers", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LargeDeltas.class, metaDataMap);
}
public LargeDeltas() {
}
public LargeDeltas(
Bools b1,
Bools b10,
Bools b100,
boolean check_true,
Bools b1000,
boolean check_false,
VersioningTestV2 vertwo2000,
Set a_set2500,
VersioningTestV2 vertwo3000,
List big_numbers)
{
this();
this.b1 = b1;
this.b10 = b10;
this.b100 = b100;
this.check_true = check_true;
setCheck_trueIsSet(true);
this.b1000 = b1000;
this.check_false = check_false;
setCheck_falseIsSet(true);
this.vertwo2000 = vertwo2000;
this.a_set2500 = a_set2500;
this.vertwo3000 = vertwo3000;
this.big_numbers = big_numbers;
}
/**
* Performs a deep copy on other.
*/
public LargeDeltas(LargeDeltas other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetB1()) {
this.b1 = new Bools(other.b1);
}
if (other.isSetB10()) {
this.b10 = new Bools(other.b10);
}
if (other.isSetB100()) {
this.b100 = new Bools(other.b100);
}
this.check_true = other.check_true;
if (other.isSetB1000()) {
this.b1000 = new Bools(other.b1000);
}
this.check_false = other.check_false;
if (other.isSetVertwo2000()) {
this.vertwo2000 = new VersioningTestV2(other.vertwo2000);
}
if (other.isSetA_set2500()) {
Set __this__a_set2500 = new HashSet(other.a_set2500);
this.a_set2500 = __this__a_set2500;
}
if (other.isSetVertwo3000()) {
this.vertwo3000 = new VersioningTestV2(other.vertwo3000);
}
if (other.isSetBig_numbers()) {
List __this__big_numbers = new ArrayList(other.big_numbers);
this.big_numbers = __this__big_numbers;
}
}
public LargeDeltas deepCopy() {
return new LargeDeltas(this);
}
@Override
public void clear() {
this.b1 = null;
this.b10 = null;
this.b100 = null;
setCheck_trueIsSet(false);
this.check_true = false;
this.b1000 = null;
setCheck_falseIsSet(false);
this.check_false = false;
this.vertwo2000 = null;
this.a_set2500 = null;
this.vertwo3000 = null;
this.big_numbers = null;
}
public Bools getB1() {
return this.b1;
}
public LargeDeltas setB1(Bools b1) {
this.b1 = b1;
return this;
}
public void unsetB1() {
this.b1 = null;
}
/** Returns true if field b1 is set (has been assigned a value) and false otherwise */
public boolean isSetB1() {
return this.b1 != null;
}
public void setB1IsSet(boolean value) {
if (!value) {
this.b1 = null;
}
}
public Bools getB10() {
return this.b10;
}
public LargeDeltas setB10(Bools b10) {
this.b10 = b10;
return this;
}
public void unsetB10() {
this.b10 = null;
}
/** Returns true if field b10 is set (has been assigned a value) and false otherwise */
public boolean isSetB10() {
return this.b10 != null;
}
public void setB10IsSet(boolean value) {
if (!value) {
this.b10 = null;
}
}
public Bools getB100() {
return this.b100;
}
public LargeDeltas setB100(Bools b100) {
this.b100 = b100;
return this;
}
public void unsetB100() {
this.b100 = null;
}
/** Returns true if field b100 is set (has been assigned a value) and false otherwise */
public boolean isSetB100() {
return this.b100 != null;
}
public void setB100IsSet(boolean value) {
if (!value) {
this.b100 = null;
}
}
public boolean isCheck_true() {
return this.check_true;
}
public LargeDeltas setCheck_true(boolean check_true) {
this.check_true = check_true;
setCheck_trueIsSet(true);
return this;
}
public void unsetCheck_true() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHECK_TRUE_ISSET_ID);
}
/** Returns true if field check_true is set (has been assigned a value) and false otherwise */
public boolean isSetCheck_true() {
return EncodingUtils.testBit(__isset_bitfield, __CHECK_TRUE_ISSET_ID);
}
public void setCheck_trueIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHECK_TRUE_ISSET_ID, value);
}
public Bools getB1000() {
return this.b1000;
}
public LargeDeltas setB1000(Bools b1000) {
this.b1000 = b1000;
return this;
}
public void unsetB1000() {
this.b1000 = null;
}
/** Returns true if field b1000 is set (has been assigned a value) and false otherwise */
public boolean isSetB1000() {
return this.b1000 != null;
}
public void setB1000IsSet(boolean value) {
if (!value) {
this.b1000 = null;
}
}
public boolean isCheck_false() {
return this.check_false;
}
public LargeDeltas setCheck_false(boolean check_false) {
this.check_false = check_false;
setCheck_falseIsSet(true);
return this;
}
public void unsetCheck_false() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHECK_FALSE_ISSET_ID);
}
/** Returns true if field check_false is set (has been assigned a value) and false otherwise */
public boolean isSetCheck_false() {
return EncodingUtils.testBit(__isset_bitfield, __CHECK_FALSE_ISSET_ID);
}
public void setCheck_falseIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHECK_FALSE_ISSET_ID, value);
}
public VersioningTestV2 getVertwo2000() {
return this.vertwo2000;
}
public LargeDeltas setVertwo2000(VersioningTestV2 vertwo2000) {
this.vertwo2000 = vertwo2000;
return this;
}
public void unsetVertwo2000() {
this.vertwo2000 = null;
}
/** Returns true if field vertwo2000 is set (has been assigned a value) and false otherwise */
public boolean isSetVertwo2000() {
return this.vertwo2000 != null;
}
public void setVertwo2000IsSet(boolean value) {
if (!value) {
this.vertwo2000 = null;
}
}
public int getA_set2500Size() {
return (this.a_set2500 == null) ? 0 : this.a_set2500.size();
}
public java.util.Iterator getA_set2500Iterator() {
return (this.a_set2500 == null) ? null : this.a_set2500.iterator();
}
public void addToA_set2500(String elem) {
if (this.a_set2500 == null) {
this.a_set2500 = new HashSet();
}
this.a_set2500.add(elem);
}
public Set getA_set2500() {
return this.a_set2500;
}
public LargeDeltas setA_set2500(Set a_set2500) {
this.a_set2500 = a_set2500;
return this;
}
public void unsetA_set2500() {
this.a_set2500 = null;
}
/** Returns true if field a_set2500 is set (has been assigned a value) and false otherwise */
public boolean isSetA_set2500() {
return this.a_set2500 != null;
}
public void setA_set2500IsSet(boolean value) {
if (!value) {
this.a_set2500 = null;
}
}
public VersioningTestV2 getVertwo3000() {
return this.vertwo3000;
}
public LargeDeltas setVertwo3000(VersioningTestV2 vertwo3000) {
this.vertwo3000 = vertwo3000;
return this;
}
public void unsetVertwo3000() {
this.vertwo3000 = null;
}
/** Returns true if field vertwo3000 is set (has been assigned a value) and false otherwise */
public boolean isSetVertwo3000() {
return this.vertwo3000 != null;
}
public void setVertwo3000IsSet(boolean value) {
if (!value) {
this.vertwo3000 = null;
}
}
public int getBig_numbersSize() {
return (this.big_numbers == null) ? 0 : this.big_numbers.size();
}
public java.util.Iterator getBig_numbersIterator() {
return (this.big_numbers == null) ? null : this.big_numbers.iterator();
}
public void addToBig_numbers(int elem) {
if (this.big_numbers == null) {
this.big_numbers = new ArrayList();
}
this.big_numbers.add(elem);
}
public List getBig_numbers() {
return this.big_numbers;
}
public LargeDeltas setBig_numbers(List big_numbers) {
this.big_numbers = big_numbers;
return this;
}
public void unsetBig_numbers() {
this.big_numbers = null;
}
/** Returns true if field big_numbers is set (has been assigned a value) and false otherwise */
public boolean isSetBig_numbers() {
return this.big_numbers != null;
}
public void setBig_numbersIsSet(boolean value) {
if (!value) {
this.big_numbers = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case B1:
if (value == null) {
unsetB1();
} else {
setB1((Bools)value);
}
break;
case B10:
if (value == null) {
unsetB10();
} else {
setB10((Bools)value);
}
break;
case B100:
if (value == null) {
unsetB100();
} else {
setB100((Bools)value);
}
break;
case CHECK_TRUE:
if (value == null) {
unsetCheck_true();
} else {
setCheck_true((Boolean)value);
}
break;
case B1000:
if (value == null) {
unsetB1000();
} else {
setB1000((Bools)value);
}
break;
case CHECK_FALSE:
if (value == null) {
unsetCheck_false();
} else {
setCheck_false((Boolean)value);
}
break;
case VERTWO2000:
if (value == null) {
unsetVertwo2000();
} else {
setVertwo2000((VersioningTestV2)value);
}
break;
case A_SET2500:
if (value == null) {
unsetA_set2500();
} else {
setA_set2500((Set)value);
}
break;
case VERTWO3000:
if (value == null) {
unsetVertwo3000();
} else {
setVertwo3000((VersioningTestV2)value);
}
break;
case BIG_NUMBERS:
if (value == null) {
unsetBig_numbers();
} else {
setBig_numbers((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case B1:
return getB1();
case B10:
return getB10();
case B100:
return getB100();
case CHECK_TRUE:
return isCheck_true();
case B1000:
return getB1000();
case CHECK_FALSE:
return isCheck_false();
case VERTWO2000:
return getVertwo2000();
case A_SET2500:
return getA_set2500();
case VERTWO3000:
return getVertwo3000();
case BIG_NUMBERS:
return getBig_numbers();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case B1:
return isSetB1();
case B10:
return isSetB10();
case B100:
return isSetB100();
case CHECK_TRUE:
return isSetCheck_true();
case B1000:
return isSetB1000();
case CHECK_FALSE:
return isSetCheck_false();
case VERTWO2000:
return isSetVertwo2000();
case A_SET2500:
return isSetA_set2500();
case VERTWO3000:
return isSetVertwo3000();
case BIG_NUMBERS:
return isSetBig_numbers();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof LargeDeltas)
return this.equals((LargeDeltas)that);
return false;
}
public boolean equals(LargeDeltas that) {
if (that == null)
return false;
boolean this_present_b1 = true && this.isSetB1();
boolean that_present_b1 = true && that.isSetB1();
if (this_present_b1 || that_present_b1) {
if (!(this_present_b1 && that_present_b1))
return false;
if (!this.b1.equals(that.b1))
return false;
}
boolean this_present_b10 = true && this.isSetB10();
boolean that_present_b10 = true && that.isSetB10();
if (this_present_b10 || that_present_b10) {
if (!(this_present_b10 && that_present_b10))
return false;
if (!this.b10.equals(that.b10))
return false;
}
boolean this_present_b100 = true && this.isSetB100();
boolean that_present_b100 = true && that.isSetB100();
if (this_present_b100 || that_present_b100) {
if (!(this_present_b100 && that_present_b100))
return false;
if (!this.b100.equals(that.b100))
return false;
}
boolean this_present_check_true = true;
boolean that_present_check_true = true;
if (this_present_check_true || that_present_check_true) {
if (!(this_present_check_true && that_present_check_true))
return false;
if (this.check_true != that.check_true)
return false;
}
boolean this_present_b1000 = true && this.isSetB1000();
boolean that_present_b1000 = true && that.isSetB1000();
if (this_present_b1000 || that_present_b1000) {
if (!(this_present_b1000 && that_present_b1000))
return false;
if (!this.b1000.equals(that.b1000))
return false;
}
boolean this_present_check_false = true;
boolean that_present_check_false = true;
if (this_present_check_false || that_present_check_false) {
if (!(this_present_check_false && that_present_check_false))
return false;
if (this.check_false != that.check_false)
return false;
}
boolean this_present_vertwo2000 = true && this.isSetVertwo2000();
boolean that_present_vertwo2000 = true && that.isSetVertwo2000();
if (this_present_vertwo2000 || that_present_vertwo2000) {
if (!(this_present_vertwo2000 && that_present_vertwo2000))
return false;
if (!this.vertwo2000.equals(that.vertwo2000))
return false;
}
boolean this_present_a_set2500 = true && this.isSetA_set2500();
boolean that_present_a_set2500 = true && that.isSetA_set2500();
if (this_present_a_set2500 || that_present_a_set2500) {
if (!(this_present_a_set2500 && that_present_a_set2500))
return false;
if (!this.a_set2500.equals(that.a_set2500))
return false;
}
boolean this_present_vertwo3000 = true && this.isSetVertwo3000();
boolean that_present_vertwo3000 = true && that.isSetVertwo3000();
if (this_present_vertwo3000 || that_present_vertwo3000) {
if (!(this_present_vertwo3000 && that_present_vertwo3000))
return false;
if (!this.vertwo3000.equals(that.vertwo3000))
return false;
}
boolean this_present_big_numbers = true && this.isSetBig_numbers();
boolean that_present_big_numbers = true && that.isSetBig_numbers();
if (this_present_big_numbers || that_present_big_numbers) {
if (!(this_present_big_numbers && that_present_big_numbers))
return false;
if (!this.big_numbers.equals(that.big_numbers))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy