org.apache.hadoop.hive.serde2.thrift.test.MegaStruct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hive-apache Show documentation
Show all versions of hive-apache Show documentation
Shaded version of Apache Hive for Presto
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.serde2.thrift.test;
import com.facebook.presto.hive.$internal.org.apache.commons.lang.builder.HashCodeBuilder;
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 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 com.facebook.presto.hive.$internal.org.slf4j.Logger;
import com.facebook.presto.hive.$internal.org.slf4j.LoggerFactory;
public class MegaStruct implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MegaStruct");
private static final org.apache.thrift.protocol.TField MY_BOOL_FIELD_DESC = new org.apache.thrift.protocol.TField("my_bool", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField MY_BYTE_FIELD_DESC = new org.apache.thrift.protocol.TField("my_byte", org.apache.thrift.protocol.TType.BYTE, (short)2);
private static final org.apache.thrift.protocol.TField MY_16BIT_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("my_16bit_int", org.apache.thrift.protocol.TType.I16, (short)3);
private static final org.apache.thrift.protocol.TField MY_32BIT_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("my_32bit_int", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField MY_64BIT_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("my_64bit_int", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField MY_DOUBLE_FIELD_DESC = new org.apache.thrift.protocol.TField("my_double", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("my_string", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField MY_BINARY_FIELD_DESC = new org.apache.thrift.protocol.TField("my_binary", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField MY_STRING_STRING_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_string_string_map", org.apache.thrift.protocol.TType.MAP, (short)9);
private static final org.apache.thrift.protocol.TField MY_STRING_ENUM_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_string_enum_map", org.apache.thrift.protocol.TType.MAP, (short)10);
private static final org.apache.thrift.protocol.TField MY_ENUM_STRING_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum_string_map", org.apache.thrift.protocol.TType.MAP, (short)11);
private static final org.apache.thrift.protocol.TField MY_ENUM_STRUCT_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum_struct_map", org.apache.thrift.protocol.TType.MAP, (short)12);
private static final org.apache.thrift.protocol.TField MY_ENUM_STRINGLIST_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum_stringlist_map", org.apache.thrift.protocol.TType.MAP, (short)13);
private static final org.apache.thrift.protocol.TField MY_ENUM_STRUCTLIST_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum_structlist_map", org.apache.thrift.protocol.TType.MAP, (short)14);
private static final org.apache.thrift.protocol.TField MY_STRINGLIST_FIELD_DESC = new org.apache.thrift.protocol.TField("my_stringlist", org.apache.thrift.protocol.TType.LIST, (short)15);
private static final org.apache.thrift.protocol.TField MY_STRUCTLIST_FIELD_DESC = new org.apache.thrift.protocol.TField("my_structlist", org.apache.thrift.protocol.TType.LIST, (short)16);
private static final org.apache.thrift.protocol.TField MY_ENUMLIST_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enumlist", org.apache.thrift.protocol.TType.LIST, (short)17);
private static final org.apache.thrift.protocol.TField MY_STRINGSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_stringset", org.apache.thrift.protocol.TType.SET, (short)18);
private static final org.apache.thrift.protocol.TField MY_ENUMSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enumset", org.apache.thrift.protocol.TType.SET, (short)19);
private static final org.apache.thrift.protocol.TField MY_STRUCTSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_structset", org.apache.thrift.protocol.TType.SET, (short)20);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new MegaStructStandardSchemeFactory());
schemes.put(TupleScheme.class, new MegaStructTupleSchemeFactory());
}
private boolean my_bool; // optional
private byte my_byte; // optional
private short my_16bit_int; // optional
private int my_32bit_int; // optional
private long my_64bit_int; // optional
private double my_double; // optional
private String my_string; // optional
private ByteBuffer my_binary; // optional
private Map my_string_string_map; // optional
private Map my_string_enum_map; // optional
private Map my_enum_string_map; // optional
private Map my_enum_struct_map; // optional
private Map> my_enum_stringlist_map; // optional
private Map> my_enum_structlist_map; // optional
private List my_stringlist; // optional
private List my_structlist; // optional
private List my_enumlist; // optional
private Set my_stringset; // optional
private Set my_enumset; // optional
private Set my_structset; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MY_BOOL((short)1, "my_bool"),
MY_BYTE((short)2, "my_byte"),
MY_16BIT_INT((short)3, "my_16bit_int"),
MY_32BIT_INT((short)4, "my_32bit_int"),
MY_64BIT_INT((short)5, "my_64bit_int"),
MY_DOUBLE((short)6, "my_double"),
MY_STRING((short)7, "my_string"),
MY_BINARY((short)8, "my_binary"),
MY_STRING_STRING_MAP((short)9, "my_string_string_map"),
MY_STRING_ENUM_MAP((short)10, "my_string_enum_map"),
MY_ENUM_STRING_MAP((short)11, "my_enum_string_map"),
MY_ENUM_STRUCT_MAP((short)12, "my_enum_struct_map"),
MY_ENUM_STRINGLIST_MAP((short)13, "my_enum_stringlist_map"),
MY_ENUM_STRUCTLIST_MAP((short)14, "my_enum_structlist_map"),
MY_STRINGLIST((short)15, "my_stringlist"),
MY_STRUCTLIST((short)16, "my_structlist"),
MY_ENUMLIST((short)17, "my_enumlist"),
MY_STRINGSET((short)18, "my_stringset"),
MY_ENUMSET((short)19, "my_enumset"),
MY_STRUCTSET((short)20, "my_structset");
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: // MY_BOOL
return MY_BOOL;
case 2: // MY_BYTE
return MY_BYTE;
case 3: // MY_16BIT_INT
return MY_16BIT_INT;
case 4: // MY_32BIT_INT
return MY_32BIT_INT;
case 5: // MY_64BIT_INT
return MY_64BIT_INT;
case 6: // MY_DOUBLE
return MY_DOUBLE;
case 7: // MY_STRING
return MY_STRING;
case 8: // MY_BINARY
return MY_BINARY;
case 9: // MY_STRING_STRING_MAP
return MY_STRING_STRING_MAP;
case 10: // MY_STRING_ENUM_MAP
return MY_STRING_ENUM_MAP;
case 11: // MY_ENUM_STRING_MAP
return MY_ENUM_STRING_MAP;
case 12: // MY_ENUM_STRUCT_MAP
return MY_ENUM_STRUCT_MAP;
case 13: // MY_ENUM_STRINGLIST_MAP
return MY_ENUM_STRINGLIST_MAP;
case 14: // MY_ENUM_STRUCTLIST_MAP
return MY_ENUM_STRUCTLIST_MAP;
case 15: // MY_STRINGLIST
return MY_STRINGLIST;
case 16: // MY_STRUCTLIST
return MY_STRUCTLIST;
case 17: // MY_ENUMLIST
return MY_ENUMLIST;
case 18: // MY_STRINGSET
return MY_STRINGSET;
case 19: // MY_ENUMSET
return MY_ENUMSET;
case 20: // MY_STRUCTSET
return MY_STRUCTSET;
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 __MY_BOOL_ISSET_ID = 0;
private static final int __MY_BYTE_ISSET_ID = 1;
private static final int __MY_16BIT_INT_ISSET_ID = 2;
private static final int __MY_32BIT_INT_ISSET_ID = 3;
private static final int __MY_64BIT_INT_ISSET_ID = 4;
private static final int __MY_DOUBLE_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.MY_BOOL,_Fields.MY_BYTE,_Fields.MY_16BIT_INT,_Fields.MY_32BIT_INT,_Fields.MY_64BIT_INT,_Fields.MY_DOUBLE,_Fields.MY_STRING,_Fields.MY_BINARY,_Fields.MY_STRING_STRING_MAP,_Fields.MY_STRING_ENUM_MAP,_Fields.MY_ENUM_STRING_MAP,_Fields.MY_ENUM_STRUCT_MAP,_Fields.MY_ENUM_STRINGLIST_MAP,_Fields.MY_ENUM_STRUCTLIST_MAP,_Fields.MY_STRINGLIST,_Fields.MY_STRUCTLIST,_Fields.MY_ENUMLIST,_Fields.MY_STRINGSET,_Fields.MY_ENUMSET,_Fields.MY_STRUCTSET};
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.MY_BOOL, new org.apache.thrift.meta_data.FieldMetaData("my_bool", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.MY_BYTE, new org.apache.thrift.meta_data.FieldMetaData("my_byte", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
tmpMap.put(_Fields.MY_16BIT_INT, new org.apache.thrift.meta_data.FieldMetaData("my_16bit_int", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.MY_32BIT_INT, new org.apache.thrift.meta_data.FieldMetaData("my_32bit_int", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.MY_64BIT_INT, new org.apache.thrift.meta_data.FieldMetaData("my_64bit_int", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MY_DOUBLE, new org.apache.thrift.meta_data.FieldMetaData("my_double", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.MY_STRING, new org.apache.thrift.meta_data.FieldMetaData("my_string", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MY_BINARY, new org.apache.thrift.meta_data.FieldMetaData("my_binary", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.MY_STRING_STRING_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_string_string_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.MY_STRING_ENUM_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_string_enum_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class))));
tmpMap.put(_Fields.MY_ENUM_STRING_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_enum_string_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.MY_ENUM_STRUCT_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_enum_struct_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MiniStruct.class))));
tmpMap.put(_Fields.MY_ENUM_STRINGLIST_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_enum_stringlist_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class),
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.STRING)))));
tmpMap.put(_Fields.MY_ENUM_STRUCTLIST_MAP, new org.apache.thrift.meta_data.FieldMetaData("my_enum_structlist_map", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class),
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MiniStruct.class)))));
tmpMap.put(_Fields.MY_STRINGLIST, new org.apache.thrift.meta_data.FieldMetaData("my_stringlist", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.STRING))));
tmpMap.put(_Fields.MY_STRUCTLIST, new org.apache.thrift.meta_data.FieldMetaData("my_structlist", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MiniStruct.class))));
tmpMap.put(_Fields.MY_ENUMLIST, new org.apache.thrift.meta_data.FieldMetaData("my_enumlist", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class))));
tmpMap.put(_Fields.MY_STRINGSET, new org.apache.thrift.meta_data.FieldMetaData("my_stringset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.MY_ENUMSET, new org.apache.thrift.meta_data.FieldMetaData("my_enumset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MyEnum.class))));
tmpMap.put(_Fields.MY_STRUCTSET, new org.apache.thrift.meta_data.FieldMetaData("my_structset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MiniStruct.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MegaStruct.class, metaDataMap);
}
public MegaStruct() {
}
/**
* Performs a deep copy on other.
*/
public MegaStruct(MegaStruct other) {
__isset_bitfield = other.__isset_bitfield;
this.my_bool = other.my_bool;
this.my_byte = other.my_byte;
this.my_16bit_int = other.my_16bit_int;
this.my_32bit_int = other.my_32bit_int;
this.my_64bit_int = other.my_64bit_int;
this.my_double = other.my_double;
if (other.isSetMy_string()) {
this.my_string = other.my_string;
}
if (other.isSetMy_binary()) {
this.my_binary = org.apache.thrift.TBaseHelper.copyBinary(other.my_binary);
;
}
if (other.isSetMy_string_string_map()) {
Map __this__my_string_string_map = new HashMap();
for (Map.Entry other_element : other.my_string_string_map.entrySet()) {
String other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
String __this__my_string_string_map_copy_key = other_element_key;
String __this__my_string_string_map_copy_value = other_element_value;
__this__my_string_string_map.put(__this__my_string_string_map_copy_key, __this__my_string_string_map_copy_value);
}
this.my_string_string_map = __this__my_string_string_map;
}
if (other.isSetMy_string_enum_map()) {
Map __this__my_string_enum_map = new HashMap();
for (Map.Entry other_element : other.my_string_enum_map.entrySet()) {
String other_element_key = other_element.getKey();
MyEnum other_element_value = other_element.getValue();
String __this__my_string_enum_map_copy_key = other_element_key;
MyEnum __this__my_string_enum_map_copy_value = other_element_value;
__this__my_string_enum_map.put(__this__my_string_enum_map_copy_key, __this__my_string_enum_map_copy_value);
}
this.my_string_enum_map = __this__my_string_enum_map;
}
if (other.isSetMy_enum_string_map()) {
Map __this__my_enum_string_map = new HashMap();
for (Map.Entry other_element : other.my_enum_string_map.entrySet()) {
MyEnum other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
MyEnum __this__my_enum_string_map_copy_key = other_element_key;
String __this__my_enum_string_map_copy_value = other_element_value;
__this__my_enum_string_map.put(__this__my_enum_string_map_copy_key, __this__my_enum_string_map_copy_value);
}
this.my_enum_string_map = __this__my_enum_string_map;
}
if (other.isSetMy_enum_struct_map()) {
Map __this__my_enum_struct_map = new HashMap();
for (Map.Entry other_element : other.my_enum_struct_map.entrySet()) {
MyEnum other_element_key = other_element.getKey();
MiniStruct other_element_value = other_element.getValue();
MyEnum __this__my_enum_struct_map_copy_key = other_element_key;
MiniStruct __this__my_enum_struct_map_copy_value = new MiniStruct(other_element_value);
__this__my_enum_struct_map.put(__this__my_enum_struct_map_copy_key, __this__my_enum_struct_map_copy_value);
}
this.my_enum_struct_map = __this__my_enum_struct_map;
}
if (other.isSetMy_enum_stringlist_map()) {
Map> __this__my_enum_stringlist_map = new HashMap>();
for (Map.Entry> other_element : other.my_enum_stringlist_map.entrySet()) {
MyEnum other_element_key = other_element.getKey();
List other_element_value = other_element.getValue();
MyEnum __this__my_enum_stringlist_map_copy_key = other_element_key;
List __this__my_enum_stringlist_map_copy_value = new ArrayList();
for (String other_element_value_element : other_element_value) {
__this__my_enum_stringlist_map_copy_value.add(other_element_value_element);
}
__this__my_enum_stringlist_map.put(__this__my_enum_stringlist_map_copy_key, __this__my_enum_stringlist_map_copy_value);
}
this.my_enum_stringlist_map = __this__my_enum_stringlist_map;
}
if (other.isSetMy_enum_structlist_map()) {
Map> __this__my_enum_structlist_map = new HashMap>();
for (Map.Entry> other_element : other.my_enum_structlist_map.entrySet()) {
MyEnum other_element_key = other_element.getKey();
List other_element_value = other_element.getValue();
MyEnum __this__my_enum_structlist_map_copy_key = other_element_key;
List __this__my_enum_structlist_map_copy_value = new ArrayList();
for (MiniStruct other_element_value_element : other_element_value) {
__this__my_enum_structlist_map_copy_value.add(new MiniStruct(other_element_value_element));
}
__this__my_enum_structlist_map.put(__this__my_enum_structlist_map_copy_key, __this__my_enum_structlist_map_copy_value);
}
this.my_enum_structlist_map = __this__my_enum_structlist_map;
}
if (other.isSetMy_stringlist()) {
List __this__my_stringlist = new ArrayList();
for (String other_element : other.my_stringlist) {
__this__my_stringlist.add(other_element);
}
this.my_stringlist = __this__my_stringlist;
}
if (other.isSetMy_structlist()) {
List __this__my_structlist = new ArrayList();
for (MiniStruct other_element : other.my_structlist) {
__this__my_structlist.add(new MiniStruct(other_element));
}
this.my_structlist = __this__my_structlist;
}
if (other.isSetMy_enumlist()) {
List __this__my_enumlist = new ArrayList();
for (MyEnum other_element : other.my_enumlist) {
__this__my_enumlist.add(other_element);
}
this.my_enumlist = __this__my_enumlist;
}
if (other.isSetMy_stringset()) {
Set __this__my_stringset = new HashSet();
for (String other_element : other.my_stringset) {
__this__my_stringset.add(other_element);
}
this.my_stringset = __this__my_stringset;
}
if (other.isSetMy_enumset()) {
Set __this__my_enumset = new HashSet();
for (MyEnum other_element : other.my_enumset) {
__this__my_enumset.add(other_element);
}
this.my_enumset = __this__my_enumset;
}
if (other.isSetMy_structset()) {
Set __this__my_structset = new HashSet();
for (MiniStruct other_element : other.my_structset) {
__this__my_structset.add(new MiniStruct(other_element));
}
this.my_structset = __this__my_structset;
}
}
public MegaStruct deepCopy() {
return new MegaStruct(this);
}
@Override
public void clear() {
setMy_boolIsSet(false);
this.my_bool = false;
setMy_byteIsSet(false);
this.my_byte = 0;
setMy_16bit_intIsSet(false);
this.my_16bit_int = 0;
setMy_32bit_intIsSet(false);
this.my_32bit_int = 0;
setMy_64bit_intIsSet(false);
this.my_64bit_int = 0;
setMy_doubleIsSet(false);
this.my_double = 0.0;
this.my_string = null;
this.my_binary = null;
this.my_string_string_map = null;
this.my_string_enum_map = null;
this.my_enum_string_map = null;
this.my_enum_struct_map = null;
this.my_enum_stringlist_map = null;
this.my_enum_structlist_map = null;
this.my_stringlist = null;
this.my_structlist = null;
this.my_enumlist = null;
this.my_stringset = null;
this.my_enumset = null;
this.my_structset = null;
}
public boolean isMy_bool() {
return this.my_bool;
}
public void setMy_bool(boolean my_bool) {
this.my_bool = my_bool;
setMy_boolIsSet(true);
}
public void unsetMy_bool() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BOOL_ISSET_ID);
}
/** Returns true if field my_bool is set (has been assigned a value) and false otherwise */
public boolean isSetMy_bool() {
return EncodingUtils.testBit(__isset_bitfield, __MY_BOOL_ISSET_ID);
}
public void setMy_boolIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BOOL_ISSET_ID, value);
}
public byte getMy_byte() {
return this.my_byte;
}
public void setMy_byte(byte my_byte) {
this.my_byte = my_byte;
setMy_byteIsSet(true);
}
public void unsetMy_byte() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BYTE_ISSET_ID);
}
/** Returns true if field my_byte is set (has been assigned a value) and false otherwise */
public boolean isSetMy_byte() {
return EncodingUtils.testBit(__isset_bitfield, __MY_BYTE_ISSET_ID);
}
public void setMy_byteIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BYTE_ISSET_ID, value);
}
public short getMy_16bit_int() {
return this.my_16bit_int;
}
public void setMy_16bit_int(short my_16bit_int) {
this.my_16bit_int = my_16bit_int;
setMy_16bit_intIsSet(true);
}
public void unsetMy_16bit_int() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID);
}
/** Returns true if field my_16bit_int is set (has been assigned a value) and false otherwise */
public boolean isSetMy_16bit_int() {
return EncodingUtils.testBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID);
}
public void setMy_16bit_intIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID, value);
}
public int getMy_32bit_int() {
return this.my_32bit_int;
}
public void setMy_32bit_int(int my_32bit_int) {
this.my_32bit_int = my_32bit_int;
setMy_32bit_intIsSet(true);
}
public void unsetMy_32bit_int() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID);
}
/** Returns true if field my_32bit_int is set (has been assigned a value) and false otherwise */
public boolean isSetMy_32bit_int() {
return EncodingUtils.testBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID);
}
public void setMy_32bit_intIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID, value);
}
public long getMy_64bit_int() {
return this.my_64bit_int;
}
public void setMy_64bit_int(long my_64bit_int) {
this.my_64bit_int = my_64bit_int;
setMy_64bit_intIsSet(true);
}
public void unsetMy_64bit_int() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID);
}
/** Returns true if field my_64bit_int is set (has been assigned a value) and false otherwise */
public boolean isSetMy_64bit_int() {
return EncodingUtils.testBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID);
}
public void setMy_64bit_intIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID, value);
}
public double getMy_double() {
return this.my_double;
}
public void setMy_double(double my_double) {
this.my_double = my_double;
setMy_doubleIsSet(true);
}
public void unsetMy_double() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID);
}
/** Returns true if field my_double is set (has been assigned a value) and false otherwise */
public boolean isSetMy_double() {
return EncodingUtils.testBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID);
}
public void setMy_doubleIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID, value);
}
public String getMy_string() {
return this.my_string;
}
public void setMy_string(String my_string) {
this.my_string = my_string;
}
public void unsetMy_string() {
this.my_string = null;
}
/** Returns true if field my_string is set (has been assigned a value) and false otherwise */
public boolean isSetMy_string() {
return this.my_string != null;
}
public void setMy_stringIsSet(boolean value) {
if (!value) {
this.my_string = null;
}
}
public byte[] getMy_binary() {
setMy_binary(org.apache.thrift.TBaseHelper.rightSize(my_binary));
return my_binary == null ? null : my_binary.array();
}
public ByteBuffer bufferForMy_binary() {
return my_binary;
}
public void setMy_binary(byte[] my_binary) {
setMy_binary(my_binary == null ? (ByteBuffer)null : ByteBuffer.wrap(my_binary));
}
public void setMy_binary(ByteBuffer my_binary) {
this.my_binary = my_binary;
}
public void unsetMy_binary() {
this.my_binary = null;
}
/** Returns true if field my_binary is set (has been assigned a value) and false otherwise */
public boolean isSetMy_binary() {
return this.my_binary != null;
}
public void setMy_binaryIsSet(boolean value) {
if (!value) {
this.my_binary = null;
}
}
public int getMy_string_string_mapSize() {
return (this.my_string_string_map == null) ? 0 : this.my_string_string_map.size();
}
public void putToMy_string_string_map(String key, String val) {
if (this.my_string_string_map == null) {
this.my_string_string_map = new HashMap();
}
this.my_string_string_map.put(key, val);
}
public Map getMy_string_string_map() {
return this.my_string_string_map;
}
public void setMy_string_string_map(Map my_string_string_map) {
this.my_string_string_map = my_string_string_map;
}
public void unsetMy_string_string_map() {
this.my_string_string_map = null;
}
/** Returns true if field my_string_string_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_string_string_map() {
return this.my_string_string_map != null;
}
public void setMy_string_string_mapIsSet(boolean value) {
if (!value) {
this.my_string_string_map = null;
}
}
public int getMy_string_enum_mapSize() {
return (this.my_string_enum_map == null) ? 0 : this.my_string_enum_map.size();
}
public void putToMy_string_enum_map(String key, MyEnum val) {
if (this.my_string_enum_map == null) {
this.my_string_enum_map = new HashMap();
}
this.my_string_enum_map.put(key, val);
}
public Map getMy_string_enum_map() {
return this.my_string_enum_map;
}
public void setMy_string_enum_map(Map my_string_enum_map) {
this.my_string_enum_map = my_string_enum_map;
}
public void unsetMy_string_enum_map() {
this.my_string_enum_map = null;
}
/** Returns true if field my_string_enum_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_string_enum_map() {
return this.my_string_enum_map != null;
}
public void setMy_string_enum_mapIsSet(boolean value) {
if (!value) {
this.my_string_enum_map = null;
}
}
public int getMy_enum_string_mapSize() {
return (this.my_enum_string_map == null) ? 0 : this.my_enum_string_map.size();
}
public void putToMy_enum_string_map(MyEnum key, String val) {
if (this.my_enum_string_map == null) {
this.my_enum_string_map = new HashMap();
}
this.my_enum_string_map.put(key, val);
}
public Map getMy_enum_string_map() {
return this.my_enum_string_map;
}
public void setMy_enum_string_map(Map my_enum_string_map) {
this.my_enum_string_map = my_enum_string_map;
}
public void unsetMy_enum_string_map() {
this.my_enum_string_map = null;
}
/** Returns true if field my_enum_string_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enum_string_map() {
return this.my_enum_string_map != null;
}
public void setMy_enum_string_mapIsSet(boolean value) {
if (!value) {
this.my_enum_string_map = null;
}
}
public int getMy_enum_struct_mapSize() {
return (this.my_enum_struct_map == null) ? 0 : this.my_enum_struct_map.size();
}
public void putToMy_enum_struct_map(MyEnum key, MiniStruct val) {
if (this.my_enum_struct_map == null) {
this.my_enum_struct_map = new HashMap();
}
this.my_enum_struct_map.put(key, val);
}
public Map getMy_enum_struct_map() {
return this.my_enum_struct_map;
}
public void setMy_enum_struct_map(Map my_enum_struct_map) {
this.my_enum_struct_map = my_enum_struct_map;
}
public void unsetMy_enum_struct_map() {
this.my_enum_struct_map = null;
}
/** Returns true if field my_enum_struct_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enum_struct_map() {
return this.my_enum_struct_map != null;
}
public void setMy_enum_struct_mapIsSet(boolean value) {
if (!value) {
this.my_enum_struct_map = null;
}
}
public int getMy_enum_stringlist_mapSize() {
return (this.my_enum_stringlist_map == null) ? 0 : this.my_enum_stringlist_map.size();
}
public void putToMy_enum_stringlist_map(MyEnum key, List val) {
if (this.my_enum_stringlist_map == null) {
this.my_enum_stringlist_map = new HashMap>();
}
this.my_enum_stringlist_map.put(key, val);
}
public Map> getMy_enum_stringlist_map() {
return this.my_enum_stringlist_map;
}
public void setMy_enum_stringlist_map(Map> my_enum_stringlist_map) {
this.my_enum_stringlist_map = my_enum_stringlist_map;
}
public void unsetMy_enum_stringlist_map() {
this.my_enum_stringlist_map = null;
}
/** Returns true if field my_enum_stringlist_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enum_stringlist_map() {
return this.my_enum_stringlist_map != null;
}
public void setMy_enum_stringlist_mapIsSet(boolean value) {
if (!value) {
this.my_enum_stringlist_map = null;
}
}
public int getMy_enum_structlist_mapSize() {
return (this.my_enum_structlist_map == null) ? 0 : this.my_enum_structlist_map.size();
}
public void putToMy_enum_structlist_map(MyEnum key, List val) {
if (this.my_enum_structlist_map == null) {
this.my_enum_structlist_map = new HashMap>();
}
this.my_enum_structlist_map.put(key, val);
}
public Map> getMy_enum_structlist_map() {
return this.my_enum_structlist_map;
}
public void setMy_enum_structlist_map(Map> my_enum_structlist_map) {
this.my_enum_structlist_map = my_enum_structlist_map;
}
public void unsetMy_enum_structlist_map() {
this.my_enum_structlist_map = null;
}
/** Returns true if field my_enum_structlist_map is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enum_structlist_map() {
return this.my_enum_structlist_map != null;
}
public void setMy_enum_structlist_mapIsSet(boolean value) {
if (!value) {
this.my_enum_structlist_map = null;
}
}
public int getMy_stringlistSize() {
return (this.my_stringlist == null) ? 0 : this.my_stringlist.size();
}
public java.util.Iterator getMy_stringlistIterator() {
return (this.my_stringlist == null) ? null : this.my_stringlist.iterator();
}
public void addToMy_stringlist(String elem) {
if (this.my_stringlist == null) {
this.my_stringlist = new ArrayList();
}
this.my_stringlist.add(elem);
}
public List getMy_stringlist() {
return this.my_stringlist;
}
public void setMy_stringlist(List my_stringlist) {
this.my_stringlist = my_stringlist;
}
public void unsetMy_stringlist() {
this.my_stringlist = null;
}
/** Returns true if field my_stringlist is set (has been assigned a value) and false otherwise */
public boolean isSetMy_stringlist() {
return this.my_stringlist != null;
}
public void setMy_stringlistIsSet(boolean value) {
if (!value) {
this.my_stringlist = null;
}
}
public int getMy_structlistSize() {
return (this.my_structlist == null) ? 0 : this.my_structlist.size();
}
public java.util.Iterator getMy_structlistIterator() {
return (this.my_structlist == null) ? null : this.my_structlist.iterator();
}
public void addToMy_structlist(MiniStruct elem) {
if (this.my_structlist == null) {
this.my_structlist = new ArrayList();
}
this.my_structlist.add(elem);
}
public List getMy_structlist() {
return this.my_structlist;
}
public void setMy_structlist(List my_structlist) {
this.my_structlist = my_structlist;
}
public void unsetMy_structlist() {
this.my_structlist = null;
}
/** Returns true if field my_structlist is set (has been assigned a value) and false otherwise */
public boolean isSetMy_structlist() {
return this.my_structlist != null;
}
public void setMy_structlistIsSet(boolean value) {
if (!value) {
this.my_structlist = null;
}
}
public int getMy_enumlistSize() {
return (this.my_enumlist == null) ? 0 : this.my_enumlist.size();
}
public java.util.Iterator getMy_enumlistIterator() {
return (this.my_enumlist == null) ? null : this.my_enumlist.iterator();
}
public void addToMy_enumlist(MyEnum elem) {
if (this.my_enumlist == null) {
this.my_enumlist = new ArrayList();
}
this.my_enumlist.add(elem);
}
public List getMy_enumlist() {
return this.my_enumlist;
}
public void setMy_enumlist(List my_enumlist) {
this.my_enumlist = my_enumlist;
}
public void unsetMy_enumlist() {
this.my_enumlist = null;
}
/** Returns true if field my_enumlist is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enumlist() {
return this.my_enumlist != null;
}
public void setMy_enumlistIsSet(boolean value) {
if (!value) {
this.my_enumlist = null;
}
}
public int getMy_stringsetSize() {
return (this.my_stringset == null) ? 0 : this.my_stringset.size();
}
public java.util.Iterator getMy_stringsetIterator() {
return (this.my_stringset == null) ? null : this.my_stringset.iterator();
}
public void addToMy_stringset(String elem) {
if (this.my_stringset == null) {
this.my_stringset = new HashSet();
}
this.my_stringset.add(elem);
}
public Set getMy_stringset() {
return this.my_stringset;
}
public void setMy_stringset(Set my_stringset) {
this.my_stringset = my_stringset;
}
public void unsetMy_stringset() {
this.my_stringset = null;
}
/** Returns true if field my_stringset is set (has been assigned a value) and false otherwise */
public boolean isSetMy_stringset() {
return this.my_stringset != null;
}
public void setMy_stringsetIsSet(boolean value) {
if (!value) {
this.my_stringset = null;
}
}
public int getMy_enumsetSize() {
return (this.my_enumset == null) ? 0 : this.my_enumset.size();
}
public java.util.Iterator getMy_enumsetIterator() {
return (this.my_enumset == null) ? null : this.my_enumset.iterator();
}
public void addToMy_enumset(MyEnum elem) {
if (this.my_enumset == null) {
this.my_enumset = new HashSet();
}
this.my_enumset.add(elem);
}
public Set getMy_enumset() {
return this.my_enumset;
}
public void setMy_enumset(Set my_enumset) {
this.my_enumset = my_enumset;
}
public void unsetMy_enumset() {
this.my_enumset = null;
}
/** Returns true if field my_enumset is set (has been assigned a value) and false otherwise */
public boolean isSetMy_enumset() {
return this.my_enumset != null;
}
public void setMy_enumsetIsSet(boolean value) {
if (!value) {
this.my_enumset = null;
}
}
public int getMy_structsetSize() {
return (this.my_structset == null) ? 0 : this.my_structset.size();
}
public java.util.Iterator getMy_structsetIterator() {
return (this.my_structset == null) ? null : this.my_structset.iterator();
}
public void addToMy_structset(MiniStruct elem) {
if (this.my_structset == null) {
this.my_structset = new HashSet();
}
this.my_structset.add(elem);
}
public Set getMy_structset() {
return this.my_structset;
}
public void setMy_structset(Set my_structset) {
this.my_structset = my_structset;
}
public void unsetMy_structset() {
this.my_structset = null;
}
/** Returns true if field my_structset is set (has been assigned a value) and false otherwise */
public boolean isSetMy_structset() {
return this.my_structset != null;
}
public void setMy_structsetIsSet(boolean value) {
if (!value) {
this.my_structset = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MY_BOOL:
if (value == null) {
unsetMy_bool();
} else {
setMy_bool((Boolean)value);
}
break;
case MY_BYTE:
if (value == null) {
unsetMy_byte();
} else {
setMy_byte((Byte)value);
}
break;
case MY_16BIT_INT:
if (value == null) {
unsetMy_16bit_int();
} else {
setMy_16bit_int((Short)value);
}
break;
case MY_32BIT_INT:
if (value == null) {
unsetMy_32bit_int();
} else {
setMy_32bit_int((Integer)value);
}
break;
case MY_64BIT_INT:
if (value == null) {
unsetMy_64bit_int();
} else {
setMy_64bit_int((Long)value);
}
break;
case MY_DOUBLE:
if (value == null) {
unsetMy_double();
} else {
setMy_double((Double)value);
}
break;
case MY_STRING:
if (value == null) {
unsetMy_string();
} else {
setMy_string((String)value);
}
break;
case MY_BINARY:
if (value == null) {
unsetMy_binary();
} else {
setMy_binary((ByteBuffer)value);
}
break;
case MY_STRING_STRING_MAP:
if (value == null) {
unsetMy_string_string_map();
} else {
setMy_string_string_map((Map)value);
}
break;
case MY_STRING_ENUM_MAP:
if (value == null) {
unsetMy_string_enum_map();
} else {
setMy_string_enum_map((Map)value);
}
break;
case MY_ENUM_STRING_MAP:
if (value == null) {
unsetMy_enum_string_map();
} else {
setMy_enum_string_map((Map)value);
}
break;
case MY_ENUM_STRUCT_MAP:
if (value == null) {
unsetMy_enum_struct_map();
} else {
setMy_enum_struct_map((Map)value);
}
break;
case MY_ENUM_STRINGLIST_MAP:
if (value == null) {
unsetMy_enum_stringlist_map();
} else {
setMy_enum_stringlist_map((Map>)value);
}
break;
case MY_ENUM_STRUCTLIST_MAP:
if (value == null) {
unsetMy_enum_structlist_map();
} else {
setMy_enum_structlist_map((Map>)value);
}
break;
case MY_STRINGLIST:
if (value == null) {
unsetMy_stringlist();
} else {
setMy_stringlist((List)value);
}
break;
case MY_STRUCTLIST:
if (value == null) {
unsetMy_structlist();
} else {
setMy_structlist((List)value);
}
break;
case MY_ENUMLIST:
if (value == null) {
unsetMy_enumlist();
} else {
setMy_enumlist((List)value);
}
break;
case MY_STRINGSET:
if (value == null) {
unsetMy_stringset();
} else {
setMy_stringset((Set)value);
}
break;
case MY_ENUMSET:
if (value == null) {
unsetMy_enumset();
} else {
setMy_enumset((Set)value);
}
break;
case MY_STRUCTSET:
if (value == null) {
unsetMy_structset();
} else {
setMy_structset((Set)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MY_BOOL:
return Boolean.valueOf(isMy_bool());
case MY_BYTE:
return Byte.valueOf(getMy_byte());
case MY_16BIT_INT:
return Short.valueOf(getMy_16bit_int());
case MY_32BIT_INT:
return Integer.valueOf(getMy_32bit_int());
case MY_64BIT_INT:
return Long.valueOf(getMy_64bit_int());
case MY_DOUBLE:
return Double.valueOf(getMy_double());
case MY_STRING:
return getMy_string();
case MY_BINARY:
return getMy_binary();
case MY_STRING_STRING_MAP:
return getMy_string_string_map();
case MY_STRING_ENUM_MAP:
return getMy_string_enum_map();
case MY_ENUM_STRING_MAP:
return getMy_enum_string_map();
case MY_ENUM_STRUCT_MAP:
return getMy_enum_struct_map();
case MY_ENUM_STRINGLIST_MAP:
return getMy_enum_stringlist_map();
case MY_ENUM_STRUCTLIST_MAP:
return getMy_enum_structlist_map();
case MY_STRINGLIST:
return getMy_stringlist();
case MY_STRUCTLIST:
return getMy_structlist();
case MY_ENUMLIST:
return getMy_enumlist();
case MY_STRINGSET:
return getMy_stringset();
case MY_ENUMSET:
return getMy_enumset();
case MY_STRUCTSET:
return getMy_structset();
}
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 MY_BOOL:
return isSetMy_bool();
case MY_BYTE:
return isSetMy_byte();
case MY_16BIT_INT:
return isSetMy_16bit_int();
case MY_32BIT_INT:
return isSetMy_32bit_int();
case MY_64BIT_INT:
return isSetMy_64bit_int();
case MY_DOUBLE:
return isSetMy_double();
case MY_STRING:
return isSetMy_string();
case MY_BINARY:
return isSetMy_binary();
case MY_STRING_STRING_MAP:
return isSetMy_string_string_map();
case MY_STRING_ENUM_MAP:
return isSetMy_string_enum_map();
case MY_ENUM_STRING_MAP:
return isSetMy_enum_string_map();
case MY_ENUM_STRUCT_MAP:
return isSetMy_enum_struct_map();
case MY_ENUM_STRINGLIST_MAP:
return isSetMy_enum_stringlist_map();
case MY_ENUM_STRUCTLIST_MAP:
return isSetMy_enum_structlist_map();
case MY_STRINGLIST:
return isSetMy_stringlist();
case MY_STRUCTLIST:
return isSetMy_structlist();
case MY_ENUMLIST:
return isSetMy_enumlist();
case MY_STRINGSET:
return isSetMy_stringset();
case MY_ENUMSET:
return isSetMy_enumset();
case MY_STRUCTSET:
return isSetMy_structset();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof MegaStruct)
return this.equals((MegaStruct)that);
return false;
}
public boolean equals(MegaStruct that) {
if (that == null)
return false;
boolean this_present_my_bool = true && this.isSetMy_bool();
boolean that_present_my_bool = true && that.isSetMy_bool();
if (this_present_my_bool || that_present_my_bool) {
if (!(this_present_my_bool && that_present_my_bool))
return false;
if (this.my_bool != that.my_bool)
return false;
}
boolean this_present_my_byte = true && this.isSetMy_byte();
boolean that_present_my_byte = true && that.isSetMy_byte();
if (this_present_my_byte || that_present_my_byte) {
if (!(this_present_my_byte && that_present_my_byte))
return false;
if (this.my_byte != that.my_byte)
return false;
}
boolean this_present_my_16bit_int = true && this.isSetMy_16bit_int();
boolean that_present_my_16bit_int = true && that.isSetMy_16bit_int();
if (this_present_my_16bit_int || that_present_my_16bit_int) {
if (!(this_present_my_16bit_int && that_present_my_16bit_int))
return false;
if (this.my_16bit_int != that.my_16bit_int)
return false;
}
boolean this_present_my_32bit_int = true && this.isSetMy_32bit_int();
boolean that_present_my_32bit_int = true && that.isSetMy_32bit_int();
if (this_present_my_32bit_int || that_present_my_32bit_int) {
if (!(this_present_my_32bit_int && that_present_my_32bit_int))
return false;
if (this.my_32bit_int != that.my_32bit_int)
return false;
}
boolean this_present_my_64bit_int = true && this.isSetMy_64bit_int();
boolean that_present_my_64bit_int = true && that.isSetMy_64bit_int();
if (this_present_my_64bit_int || that_present_my_64bit_int) {
if (!(this_present_my_64bit_int && that_present_my_64bit_int))
return false;
if (this.my_64bit_int != that.my_64bit_int)
return false;
}
boolean this_present_my_double = true && this.isSetMy_double();
boolean that_present_my_double = true && that.isSetMy_double();
if (this_present_my_double || that_present_my_double) {
if (!(this_present_my_double && that_present_my_double))
return false;
if (this.my_double != that.my_double)
return false;
}
boolean this_present_my_string = true && this.isSetMy_string();
boolean that_present_my_string = true && that.isSetMy_string();
if (this_present_my_string || that_present_my_string) {
if (!(this_present_my_string && that_present_my_string))
return false;
if (!this.my_string.equals(that.my_string))
return false;
}
boolean this_present_my_binary = true && this.isSetMy_binary();
boolean that_present_my_binary = true && that.isSetMy_binary();
if (this_present_my_binary || that_present_my_binary) {
if (!(this_present_my_binary && that_present_my_binary))
return false;
if (!this.my_binary.equals(that.my_binary))
return false;
}
boolean this_present_my_string_string_map = true && this.isSetMy_string_string_map();
boolean that_present_my_string_string_map = true && that.isSetMy_string_string_map();
if (this_present_my_string_string_map || that_present_my_string_string_map) {
if (!(this_present_my_string_string_map && that_present_my_string_string_map))
return false;
if (!this.my_string_string_map.equals(that.my_string_string_map))
return false;
}
boolean this_present_my_string_enum_map = true && this.isSetMy_string_enum_map();
boolean that_present_my_string_enum_map = true && that.isSetMy_string_enum_map();
if (this_present_my_string_enum_map || that_present_my_string_enum_map) {
if (!(this_present_my_string_enum_map && that_present_my_string_enum_map))
return false;
if (!this.my_string_enum_map.equals(that.my_string_enum_map))
return false;
}
boolean this_present_my_enum_string_map = true && this.isSetMy_enum_string_map();
boolean that_present_my_enum_string_map = true && that.isSetMy_enum_string_map();
if (this_present_my_enum_string_map || that_present_my_enum_string_map) {
if (!(this_present_my_enum_string_map && that_present_my_enum_string_map))
return false;
if (!this.my_enum_string_map.equals(that.my_enum_string_map))
return false;
}
boolean this_present_my_enum_struct_map = true && this.isSetMy_enum_struct_map();
boolean that_present_my_enum_struct_map = true && that.isSetMy_enum_struct_map();
if (this_present_my_enum_struct_map || that_present_my_enum_struct_map) {
if (!(this_present_my_enum_struct_map && that_present_my_enum_struct_map))
return false;
if (!this.my_enum_struct_map.equals(that.my_enum_struct_map))
return false;
}
boolean this_present_my_enum_stringlist_map = true && this.isSetMy_enum_stringlist_map();
boolean that_present_my_enum_stringlist_map = true && that.isSetMy_enum_stringlist_map();
if (this_present_my_enum_stringlist_map || that_present_my_enum_stringlist_map) {
if (!(this_present_my_enum_stringlist_map && that_present_my_enum_stringlist_map))
return false;
if (!this.my_enum_stringlist_map.equals(that.my_enum_stringlist_map))
return false;
}
boolean this_present_my_enum_structlist_map = true && this.isSetMy_enum_structlist_map();
boolean that_present_my_enum_structlist_map = true && that.isSetMy_enum_structlist_map();
if (this_present_my_enum_structlist_map || that_present_my_enum_structlist_map) {
if (!(this_present_my_enum_structlist_map && that_present_my_enum_structlist_map))
return false;
if (!this.my_enum_structlist_map.equals(that.my_enum_structlist_map))
return false;
}
boolean this_present_my_stringlist = true && this.isSetMy_stringlist();
boolean that_present_my_stringlist = true && that.isSetMy_stringlist();
if (this_present_my_stringlist || that_present_my_stringlist) {
if (!(this_present_my_stringlist && that_present_my_stringlist))
return false;
if (!this.my_stringlist.equals(that.my_stringlist))
return false;
}
boolean this_present_my_structlist = true && this.isSetMy_structlist();
boolean that_present_my_structlist = true && that.isSetMy_structlist();
if (this_present_my_structlist || that_present_my_structlist) {
if (!(this_present_my_structlist && that_present_my_structlist))
return false;
if (!this.my_structlist.equals(that.my_structlist))
return false;
}
boolean this_present_my_enumlist = true && this.isSetMy_enumlist();
boolean that_present_my_enumlist = true && that.isSetMy_enumlist();
if (this_present_my_enumlist || that_present_my_enumlist) {
if (!(this_present_my_enumlist && that_present_my_enumlist))
return false;
if (!this.my_enumlist.equals(that.my_enumlist))
return false;
}
boolean this_present_my_stringset = true && this.isSetMy_stringset();
boolean that_present_my_stringset = true && that.isSetMy_stringset();
if (this_present_my_stringset || that_present_my_stringset) {
if (!(this_present_my_stringset && that_present_my_stringset))
return false;
if (!this.my_stringset.equals(that.my_stringset))
return false;
}
boolean this_present_my_enumset = true && this.isSetMy_enumset();
boolean that_present_my_enumset = true && that.isSetMy_enumset();
if (this_present_my_enumset || that_present_my_enumset) {
if (!(this_present_my_enumset && that_present_my_enumset))
return false;
if (!this.my_enumset.equals(that.my_enumset))
return false;
}
boolean this_present_my_structset = true && this.isSetMy_structset();
boolean that_present_my_structset = true && that.isSetMy_structset();
if (this_present_my_structset || that_present_my_structset) {
if (!(this_present_my_structset && that_present_my_structset))
return false;
if (!this.my_structset.equals(that.my_structset))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_my_bool = true && (isSetMy_bool());
builder.append(present_my_bool);
if (present_my_bool)
builder.append(my_bool);
boolean present_my_byte = true && (isSetMy_byte());
builder.append(present_my_byte);
if (present_my_byte)
builder.append(my_byte);
boolean present_my_16bit_int = true && (isSetMy_16bit_int());
builder.append(present_my_16bit_int);
if (present_my_16bit_int)
builder.append(my_16bit_int);
boolean present_my_32bit_int = true && (isSetMy_32bit_int());
builder.append(present_my_32bit_int);
if (present_my_32bit_int)
builder.append(my_32bit_int);
boolean present_my_64bit_int = true && (isSetMy_64bit_int());
builder.append(present_my_64bit_int);
if (present_my_64bit_int)
builder.append(my_64bit_int);
boolean present_my_double = true && (isSetMy_double());
builder.append(present_my_double);
if (present_my_double)
builder.append(my_double);
boolean present_my_string = true && (isSetMy_string());
builder.append(present_my_string);
if (present_my_string)
builder.append(my_string);
boolean present_my_binary = true && (isSetMy_binary());
builder.append(present_my_binary);
if (present_my_binary)
builder.append(my_binary);
boolean present_my_string_string_map = true && (isSetMy_string_string_map());
builder.append(present_my_string_string_map);
if (present_my_string_string_map)
builder.append(my_string_string_map);
boolean present_my_string_enum_map = true && (isSetMy_string_enum_map());
builder.append(present_my_string_enum_map);
if (present_my_string_enum_map)
builder.append(my_string_enum_map);
boolean present_my_enum_string_map = true && (isSetMy_enum_string_map());
builder.append(present_my_enum_string_map);
if (present_my_enum_string_map)
builder.append(my_enum_string_map);
boolean present_my_enum_struct_map = true && (isSetMy_enum_struct_map());
builder.append(present_my_enum_struct_map);
if (present_my_enum_struct_map)
builder.append(my_enum_struct_map);
boolean present_my_enum_stringlist_map = true && (isSetMy_enum_stringlist_map());
builder.append(present_my_enum_stringlist_map);
if (present_my_enum_stringlist_map)
builder.append(my_enum_stringlist_map);
boolean present_my_enum_structlist_map = true && (isSetMy_enum_structlist_map());
builder.append(present_my_enum_structlist_map);
if (present_my_enum_structlist_map)
builder.append(my_enum_structlist_map);
boolean present_my_stringlist = true && (isSetMy_stringlist());
builder.append(present_my_stringlist);
if (present_my_stringlist)
builder.append(my_stringlist);
boolean present_my_structlist = true && (isSetMy_structlist());
builder.append(present_my_structlist);
if (present_my_structlist)
builder.append(my_structlist);
boolean present_my_enumlist = true && (isSetMy_enumlist());
builder.append(present_my_enumlist);
if (present_my_enumlist)
builder.append(my_enumlist);
boolean present_my_stringset = true && (isSetMy_stringset());
builder.append(present_my_stringset);
if (present_my_stringset)
builder.append(my_stringset);
boolean present_my_enumset = true && (isSetMy_enumset());
builder.append(present_my_enumset);
if (present_my_enumset)
builder.append(my_enumset);
boolean present_my_structset = true && (isSetMy_structset());
builder.append(present_my_structset);
if (present_my_structset)
builder.append(my_structset);
return builder.toHashCode();
}
public int compareTo(MegaStruct other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
MegaStruct typedOther = (MegaStruct)other;
lastComparison = Boolean.valueOf(isSetMy_bool()).compareTo(typedOther.isSetMy_bool());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_bool()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_bool, typedOther.my_bool);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_byte()).compareTo(typedOther.isSetMy_byte());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_byte()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_byte, typedOther.my_byte);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_16bit_int()).compareTo(typedOther.isSetMy_16bit_int());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_16bit_int()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_16bit_int, typedOther.my_16bit_int);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_32bit_int()).compareTo(typedOther.isSetMy_32bit_int());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_32bit_int()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_32bit_int, typedOther.my_32bit_int);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_64bit_int()).compareTo(typedOther.isSetMy_64bit_int());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_64bit_int()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_64bit_int, typedOther.my_64bit_int);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_double()).compareTo(typedOther.isSetMy_double());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_double()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_double, typedOther.my_double);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_string()).compareTo(typedOther.isSetMy_string());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_string()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_string, typedOther.my_string);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_binary()).compareTo(typedOther.isSetMy_binary());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_binary()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_binary, typedOther.my_binary);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_string_string_map()).compareTo(typedOther.isSetMy_string_string_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_string_string_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_string_string_map, typedOther.my_string_string_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_string_enum_map()).compareTo(typedOther.isSetMy_string_enum_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_string_enum_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_string_enum_map, typedOther.my_string_enum_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enum_string_map()).compareTo(typedOther.isSetMy_enum_string_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enum_string_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enum_string_map, typedOther.my_enum_string_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enum_struct_map()).compareTo(typedOther.isSetMy_enum_struct_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enum_struct_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enum_struct_map, typedOther.my_enum_struct_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enum_stringlist_map()).compareTo(typedOther.isSetMy_enum_stringlist_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enum_stringlist_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enum_stringlist_map, typedOther.my_enum_stringlist_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enum_structlist_map()).compareTo(typedOther.isSetMy_enum_structlist_map());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enum_structlist_map()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enum_structlist_map, typedOther.my_enum_structlist_map);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_stringlist()).compareTo(typedOther.isSetMy_stringlist());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_stringlist()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_stringlist, typedOther.my_stringlist);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_structlist()).compareTo(typedOther.isSetMy_structlist());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_structlist()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_structlist, typedOther.my_structlist);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enumlist()).compareTo(typedOther.isSetMy_enumlist());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enumlist()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enumlist, typedOther.my_enumlist);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_stringset()).compareTo(typedOther.isSetMy_stringset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_stringset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_stringset, typedOther.my_stringset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_enumset()).compareTo(typedOther.isSetMy_enumset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_enumset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enumset, typedOther.my_enumset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMy_structset()).compareTo(typedOther.isSetMy_structset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMy_structset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_structset, typedOther.my_structset);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("MegaStruct(");
boolean first = true;
if (isSetMy_bool()) {
sb.append("my_bool:");
sb.append(this.my_bool);
first = false;
}
if (isSetMy_byte()) {
if (!first) sb.append(", ");
sb.append("my_byte:");
sb.append(this.my_byte);
first = false;
}
if (isSetMy_16bit_int()) {
if (!first) sb.append(", ");
sb.append("my_16bit_int:");
sb.append(this.my_16bit_int);
first = false;
}
if (isSetMy_32bit_int()) {
if (!first) sb.append(", ");
sb.append("my_32bit_int:");
sb.append(this.my_32bit_int);
first = false;
}
if (isSetMy_64bit_int()) {
if (!first) sb.append(", ");
sb.append("my_64bit_int:");
sb.append(this.my_64bit_int);
first = false;
}
if (isSetMy_double()) {
if (!first) sb.append(", ");
sb.append("my_double:");
sb.append(this.my_double);
first = false;
}
if (isSetMy_string()) {
if (!first) sb.append(", ");
sb.append("my_string:");
if (this.my_string == null) {
sb.append("null");
} else {
sb.append(this.my_string);
}
first = false;
}
if (isSetMy_binary()) {
if (!first) sb.append(", ");
sb.append("my_binary:");
if (this.my_binary == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.my_binary, sb);
}
first = false;
}
if (isSetMy_string_string_map()) {
if (!first) sb.append(", ");
sb.append("my_string_string_map:");
if (this.my_string_string_map == null) {
sb.append("null");
} else {
sb.append(this.my_string_string_map);
}
first = false;
}
if (isSetMy_string_enum_map()) {
if (!first) sb.append(", ");
sb.append("my_string_enum_map:");
if (this.my_string_enum_map == null) {
sb.append("null");
} else {
sb.append(this.my_string_enum_map);
}
first = false;
}
if (isSetMy_enum_string_map()) {
if (!first) sb.append(", ");
sb.append("my_enum_string_map:");
if (this.my_enum_string_map == null) {
sb.append("null");
} else {
sb.append(this.my_enum_string_map);
}
first = false;
}
if (isSetMy_enum_struct_map()) {
if (!first) sb.append(", ");
sb.append("my_enum_struct_map:");
if (this.my_enum_struct_map == null) {
sb.append("null");
} else {
sb.append(this.my_enum_struct_map);
}
first = false;
}
if (isSetMy_enum_stringlist_map()) {
if (!first) sb.append(", ");
sb.append("my_enum_stringlist_map:");
if (this.my_enum_stringlist_map == null) {
sb.append("null");
} else {
sb.append(this.my_enum_stringlist_map);
}
first = false;
}
if (isSetMy_enum_structlist_map()) {
if (!first) sb.append(", ");
sb.append("my_enum_structlist_map:");
if (this.my_enum_structlist_map == null) {
sb.append("null");
} else {
sb.append(this.my_enum_structlist_map);
}
first = false;
}
if (isSetMy_stringlist()) {
if (!first) sb.append(", ");
sb.append("my_stringlist:");
if (this.my_stringlist == null) {
sb.append("null");
} else {
sb.append(this.my_stringlist);
}
first = false;
}
if (isSetMy_structlist()) {
if (!first) sb.append(", ");
sb.append("my_structlist:");
if (this.my_structlist == null) {
sb.append("null");
} else {
sb.append(this.my_structlist);
}
first = false;
}
if (isSetMy_enumlist()) {
if (!first) sb.append(", ");
sb.append("my_enumlist:");
if (this.my_enumlist == null) {
sb.append("null");
} else {
sb.append(this.my_enumlist);
}
first = false;
}
if (isSetMy_stringset()) {
if (!first) sb.append(", ");
sb.append("my_stringset:");
if (this.my_stringset == null) {
sb.append("null");
} else {
sb.append(this.my_stringset);
}
first = false;
}
if (isSetMy_enumset()) {
if (!first) sb.append(", ");
sb.append("my_enumset:");
if (this.my_enumset == null) {
sb.append("null");
} else {
sb.append(this.my_enumset);
}
first = false;
}
if (isSetMy_structset()) {
if (!first) sb.append(", ");
sb.append("my_structset:");
if (this.my_structset == null) {
sb.append("null");
} else {
sb.append(this.my_structset);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class MegaStructStandardSchemeFactory implements SchemeFactory {
public MegaStructStandardScheme getScheme() {
return new MegaStructStandardScheme();
}
}
private static class MegaStructStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, MegaStruct struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MY_BOOL
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.my_bool = iprot.readBool();
struct.setMy_boolIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MY_BYTE
if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
struct.my_byte = iprot.readByte();
struct.setMy_byteIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // MY_16BIT_INT
if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
struct.my_16bit_int = iprot.readI16();
struct.setMy_16bit_intIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MY_32BIT_INT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.my_32bit_int = iprot.readI32();
struct.setMy_32bit_intIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // MY_64BIT_INT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.my_64bit_int = iprot.readI64();
struct.setMy_64bit_intIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // MY_DOUBLE
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.my_double = iprot.readDouble();
struct.setMy_doubleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // MY_STRING
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.my_string = iprot.readString();
struct.setMy_stringIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // MY_BINARY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.my_binary = iprot.readBinary();
struct.setMy_binaryIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // MY_STRING_STRING_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
struct.my_string_string_map = new HashMap(2*_map0.size);
for (int _i1 = 0; _i1 < _map0.size; ++_i1)
{
String _key2; // required
String _val3; // required
_key2 = iprot.readString();
_val3 = iprot.readString();
struct.my_string_string_map.put(_key2, _val3);
}
iprot.readMapEnd();
}
struct.setMy_string_string_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // MY_STRING_ENUM_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
struct.my_string_enum_map = new HashMap(2*_map4.size);
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
{
String _key6; // required
MyEnum _val7; // required
_key6 = iprot.readString();
_val7 = MyEnum.findByValue(iprot.readI32());
struct.my_string_enum_map.put(_key6, _val7);
}
iprot.readMapEnd();
}
struct.setMy_string_enum_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // MY_ENUM_STRING_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
struct.my_enum_string_map = new HashMap(2*_map8.size);
for (int _i9 = 0; _i9 < _map8.size; ++_i9)
{
MyEnum _key10; // required
String _val11; // required
_key10 = MyEnum.findByValue(iprot.readI32());
_val11 = iprot.readString();
struct.my_enum_string_map.put(_key10, _val11);
}
iprot.readMapEnd();
}
struct.setMy_enum_string_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // MY_ENUM_STRUCT_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
struct.my_enum_struct_map = new HashMap(2*_map12.size);
for (int _i13 = 0; _i13 < _map12.size; ++_i13)
{
MyEnum _key14; // required
MiniStruct _val15; // required
_key14 = MyEnum.findByValue(iprot.readI32());
_val15 = new MiniStruct();
_val15.read(iprot);
struct.my_enum_struct_map.put(_key14, _val15);
}
iprot.readMapEnd();
}
struct.setMy_enum_struct_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // MY_ENUM_STRINGLIST_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
struct.my_enum_stringlist_map = new HashMap>(2*_map16.size);
for (int _i17 = 0; _i17 < _map16.size; ++_i17)
{
MyEnum _key18; // required
List _val19; // required
_key18 = MyEnum.findByValue(iprot.readI32());
{
org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
_val19 = new ArrayList(_list20.size);
for (int _i21 = 0; _i21 < _list20.size; ++_i21)
{
String _elem22; // optional
_elem22 = iprot.readString();
_val19.add(_elem22);
}
iprot.readListEnd();
}
struct.my_enum_stringlist_map.put(_key18, _val19);
}
iprot.readMapEnd();
}
struct.setMy_enum_stringlist_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // MY_ENUM_STRUCTLIST_MAP
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin();
struct.my_enum_structlist_map = new HashMap>(2*_map23.size);
for (int _i24 = 0; _i24 < _map23.size; ++_i24)
{
MyEnum _key25; // required
List _val26; // required
_key25 = MyEnum.findByValue(iprot.readI32());
{
org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
_val26 = new ArrayList(_list27.size);
for (int _i28 = 0; _i28 < _list27.size; ++_i28)
{
MiniStruct _elem29; // optional
_elem29 = new MiniStruct();
_elem29.read(iprot);
_val26.add(_elem29);
}
iprot.readListEnd();
}
struct.my_enum_structlist_map.put(_key25, _val26);
}
iprot.readMapEnd();
}
struct.setMy_enum_structlist_mapIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // MY_STRINGLIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
struct.my_stringlist = new ArrayList(_list30.size);
for (int _i31 = 0; _i31 < _list30.size; ++_i31)
{
String _elem32; // optional
_elem32 = iprot.readString();
struct.my_stringlist.add(_elem32);
}
iprot.readListEnd();
}
struct.setMy_stringlistIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // MY_STRUCTLIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
struct.my_structlist = new ArrayList(_list33.size);
for (int _i34 = 0; _i34 < _list33.size; ++_i34)
{
MiniStruct _elem35; // optional
_elem35 = new MiniStruct();
_elem35.read(iprot);
struct.my_structlist.add(_elem35);
}
iprot.readListEnd();
}
struct.setMy_structlistIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // MY_ENUMLIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
struct.my_enumlist = new ArrayList(_list36.size);
for (int _i37 = 0; _i37 < _list36.size; ++_i37)
{
MyEnum _elem38; // optional
_elem38 = MyEnum.findByValue(iprot.readI32());
struct.my_enumlist.add(_elem38);
}
iprot.readListEnd();
}
struct.setMy_enumlistIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 18: // MY_STRINGSET
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set39 = iprot.readSetBegin();
struct.my_stringset = new HashSet(2*_set39.size);
for (int _i40 = 0; _i40 < _set39.size; ++_i40)
{
String _elem41; // optional
_elem41 = iprot.readString();
struct.my_stringset.add(_elem41);
}
iprot.readSetEnd();
}
struct.setMy_stringsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // MY_ENUMSET
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin();
struct.my_enumset = new HashSet(2*_set42.size);
for (int _i43 = 0; _i43 < _set42.size; ++_i43)
{
MyEnum _elem44; // optional
_elem44 = MyEnum.findByValue(iprot.readI32());
struct.my_enumset.add(_elem44);
}
iprot.readSetEnd();
}
struct.setMy_enumsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 20: // MY_STRUCTSET
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set45 = iprot.readSetBegin();
struct.my_structset = new HashSet(2*_set45.size);
for (int _i46 = 0; _i46 < _set45.size; ++_i46)
{
MiniStruct _elem47; // optional
_elem47 = new MiniStruct();
_elem47.read(iprot);
struct.my_structset.add(_elem47);
}
iprot.readSetEnd();
}
struct.setMy_structsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, MegaStruct struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetMy_bool()) {
oprot.writeFieldBegin(MY_BOOL_FIELD_DESC);
oprot.writeBool(struct.my_bool);
oprot.writeFieldEnd();
}
if (struct.isSetMy_byte()) {
oprot.writeFieldBegin(MY_BYTE_FIELD_DESC);
oprot.writeByte(struct.my_byte);
oprot.writeFieldEnd();
}
if (struct.isSetMy_16bit_int()) {
oprot.writeFieldBegin(MY_16BIT_INT_FIELD_DESC);
oprot.writeI16(struct.my_16bit_int);
oprot.writeFieldEnd();
}
if (struct.isSetMy_32bit_int()) {
oprot.writeFieldBegin(MY_32BIT_INT_FIELD_DESC);
oprot.writeI32(struct.my_32bit_int);
oprot.writeFieldEnd();
}
if (struct.isSetMy_64bit_int()) {
oprot.writeFieldBegin(MY_64BIT_INT_FIELD_DESC);
oprot.writeI64(struct.my_64bit_int);
oprot.writeFieldEnd();
}
if (struct.isSetMy_double()) {
oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC);
oprot.writeDouble(struct.my_double);
oprot.writeFieldEnd();
}
if (struct.my_string != null) {
if (struct.isSetMy_string()) {
oprot.writeFieldBegin(MY_STRING_FIELD_DESC);
oprot.writeString(struct.my_string);
oprot.writeFieldEnd();
}
}
if (struct.my_binary != null) {
if (struct.isSetMy_binary()) {
oprot.writeFieldBegin(MY_BINARY_FIELD_DESC);
oprot.writeBinary(struct.my_binary);
oprot.writeFieldEnd();
}
}
if (struct.my_string_string_map != null) {
if (struct.isSetMy_string_string_map()) {
oprot.writeFieldBegin(MY_STRING_STRING_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.my_string_string_map.size()));
for (Map.Entry _iter48 : struct.my_string_string_map.entrySet())
{
oprot.writeString(_iter48.getKey());
oprot.writeString(_iter48.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_string_enum_map != null) {
if (struct.isSetMy_string_enum_map()) {
oprot.writeFieldBegin(MY_STRING_ENUM_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.my_string_enum_map.size()));
for (Map.Entry _iter49 : struct.my_string_enum_map.entrySet())
{
oprot.writeString(_iter49.getKey());
oprot.writeI32(_iter49.getValue().getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enum_string_map != null) {
if (struct.isSetMy_enum_string_map()) {
oprot.writeFieldBegin(MY_ENUM_STRING_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, struct.my_enum_string_map.size()));
for (Map.Entry _iter50 : struct.my_enum_string_map.entrySet())
{
oprot.writeI32(_iter50.getKey().getValue());
oprot.writeString(_iter50.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enum_struct_map != null) {
if (struct.isSetMy_enum_struct_map()) {
oprot.writeFieldBegin(MY_ENUM_STRUCT_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.my_enum_struct_map.size()));
for (Map.Entry _iter51 : struct.my_enum_struct_map.entrySet())
{
oprot.writeI32(_iter51.getKey().getValue());
_iter51.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enum_stringlist_map != null) {
if (struct.isSetMy_enum_stringlist_map()) {
oprot.writeFieldBegin(MY_ENUM_STRINGLIST_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_stringlist_map.size()));
for (Map.Entry> _iter52 : struct.my_enum_stringlist_map.entrySet())
{
oprot.writeI32(_iter52.getKey().getValue());
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter52.getValue().size()));
for (String _iter53 : _iter52.getValue())
{
oprot.writeString(_iter53);
}
oprot.writeListEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enum_structlist_map != null) {
if (struct.isSetMy_enum_structlist_map()) {
oprot.writeFieldBegin(MY_ENUM_STRUCTLIST_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_structlist_map.size()));
for (Map.Entry> _iter54 : struct.my_enum_structlist_map.entrySet())
{
oprot.writeI32(_iter54.getKey().getValue());
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter54.getValue().size()));
for (MiniStruct _iter55 : _iter54.getValue())
{
_iter55.write(oprot);
}
oprot.writeListEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_stringlist != null) {
if (struct.isSetMy_stringlist()) {
oprot.writeFieldBegin(MY_STRINGLIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.my_stringlist.size()));
for (String _iter56 : struct.my_stringlist)
{
oprot.writeString(_iter56);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_structlist != null) {
if (struct.isSetMy_structlist()) {
oprot.writeFieldBegin(MY_STRUCTLIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.my_structlist.size()));
for (MiniStruct _iter57 : struct.my_structlist)
{
_iter57.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enumlist != null) {
if (struct.isSetMy_enumlist()) {
oprot.writeFieldBegin(MY_ENUMLIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.my_enumlist.size()));
for (MyEnum _iter58 : struct.my_enumlist)
{
oprot.writeI32(_iter58.getValue());
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_stringset != null) {
if (struct.isSetMy_stringset()) {
oprot.writeFieldBegin(MY_STRINGSET_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.my_stringset.size()));
for (String _iter59 : struct.my_stringset)
{
oprot.writeString(_iter59);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_enumset != null) {
if (struct.isSetMy_enumset()) {
oprot.writeFieldBegin(MY_ENUMSET_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.my_enumset.size()));
for (MyEnum _iter60 : struct.my_enumset)
{
oprot.writeI32(_iter60.getValue());
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.my_structset != null) {
if (struct.isSetMy_structset()) {
oprot.writeFieldBegin(MY_STRUCTSET_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.my_structset.size()));
for (MiniStruct _iter61 : struct.my_structset)
{
_iter61.write(oprot);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class MegaStructTupleSchemeFactory implements SchemeFactory {
public MegaStructTupleScheme getScheme() {
return new MegaStructTupleScheme();
}
}
private static class MegaStructTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMy_bool()) {
optionals.set(0);
}
if (struct.isSetMy_byte()) {
optionals.set(1);
}
if (struct.isSetMy_16bit_int()) {
optionals.set(2);
}
if (struct.isSetMy_32bit_int()) {
optionals.set(3);
}
if (struct.isSetMy_64bit_int()) {
optionals.set(4);
}
if (struct.isSetMy_double()) {
optionals.set(5);
}
if (struct.isSetMy_string()) {
optionals.set(6);
}
if (struct.isSetMy_binary()) {
optionals.set(7);
}
if (struct.isSetMy_string_string_map()) {
optionals.set(8);
}
if (struct.isSetMy_string_enum_map()) {
optionals.set(9);
}
if (struct.isSetMy_enum_string_map()) {
optionals.set(10);
}
if (struct.isSetMy_enum_struct_map()) {
optionals.set(11);
}
if (struct.isSetMy_enum_stringlist_map()) {
optionals.set(12);
}
if (struct.isSetMy_enum_structlist_map()) {
optionals.set(13);
}
if (struct.isSetMy_stringlist()) {
optionals.set(14);
}
if (struct.isSetMy_structlist()) {
optionals.set(15);
}
if (struct.isSetMy_enumlist()) {
optionals.set(16);
}
if (struct.isSetMy_stringset()) {
optionals.set(17);
}
if (struct.isSetMy_enumset()) {
optionals.set(18);
}
if (struct.isSetMy_structset()) {
optionals.set(19);
}
oprot.writeBitSet(optionals, 20);
if (struct.isSetMy_bool()) {
oprot.writeBool(struct.my_bool);
}
if (struct.isSetMy_byte()) {
oprot.writeByte(struct.my_byte);
}
if (struct.isSetMy_16bit_int()) {
oprot.writeI16(struct.my_16bit_int);
}
if (struct.isSetMy_32bit_int()) {
oprot.writeI32(struct.my_32bit_int);
}
if (struct.isSetMy_64bit_int()) {
oprot.writeI64(struct.my_64bit_int);
}
if (struct.isSetMy_double()) {
oprot.writeDouble(struct.my_double);
}
if (struct.isSetMy_string()) {
oprot.writeString(struct.my_string);
}
if (struct.isSetMy_binary()) {
oprot.writeBinary(struct.my_binary);
}
if (struct.isSetMy_string_string_map()) {
{
oprot.writeI32(struct.my_string_string_map.size());
for (Map.Entry _iter62 : struct.my_string_string_map.entrySet())
{
oprot.writeString(_iter62.getKey());
oprot.writeString(_iter62.getValue());
}
}
}
if (struct.isSetMy_string_enum_map()) {
{
oprot.writeI32(struct.my_string_enum_map.size());
for (Map.Entry _iter63 : struct.my_string_enum_map.entrySet())
{
oprot.writeString(_iter63.getKey());
oprot.writeI32(_iter63.getValue().getValue());
}
}
}
if (struct.isSetMy_enum_string_map()) {
{
oprot.writeI32(struct.my_enum_string_map.size());
for (Map.Entry _iter64 : struct.my_enum_string_map.entrySet())
{
oprot.writeI32(_iter64.getKey().getValue());
oprot.writeString(_iter64.getValue());
}
}
}
if (struct.isSetMy_enum_struct_map()) {
{
oprot.writeI32(struct.my_enum_struct_map.size());
for (Map.Entry _iter65 : struct.my_enum_struct_map.entrySet())
{
oprot.writeI32(_iter65.getKey().getValue());
_iter65.getValue().write(oprot);
}
}
}
if (struct.isSetMy_enum_stringlist_map()) {
{
oprot.writeI32(struct.my_enum_stringlist_map.size());
for (Map.Entry> _iter66 : struct.my_enum_stringlist_map.entrySet())
{
oprot.writeI32(_iter66.getKey().getValue());
{
oprot.writeI32(_iter66.getValue().size());
for (String _iter67 : _iter66.getValue())
{
oprot.writeString(_iter67);
}
}
}
}
}
if (struct.isSetMy_enum_structlist_map()) {
{
oprot.writeI32(struct.my_enum_structlist_map.size());
for (Map.Entry> _iter68 : struct.my_enum_structlist_map.entrySet())
{
oprot.writeI32(_iter68.getKey().getValue());
{
oprot.writeI32(_iter68.getValue().size());
for (MiniStruct _iter69 : _iter68.getValue())
{
_iter69.write(oprot);
}
}
}
}
}
if (struct.isSetMy_stringlist()) {
{
oprot.writeI32(struct.my_stringlist.size());
for (String _iter70 : struct.my_stringlist)
{
oprot.writeString(_iter70);
}
}
}
if (struct.isSetMy_structlist()) {
{
oprot.writeI32(struct.my_structlist.size());
for (MiniStruct _iter71 : struct.my_structlist)
{
_iter71.write(oprot);
}
}
}
if (struct.isSetMy_enumlist()) {
{
oprot.writeI32(struct.my_enumlist.size());
for (MyEnum _iter72 : struct.my_enumlist)
{
oprot.writeI32(_iter72.getValue());
}
}
}
if (struct.isSetMy_stringset()) {
{
oprot.writeI32(struct.my_stringset.size());
for (String _iter73 : struct.my_stringset)
{
oprot.writeString(_iter73);
}
}
}
if (struct.isSetMy_enumset()) {
{
oprot.writeI32(struct.my_enumset.size());
for (MyEnum _iter74 : struct.my_enumset)
{
oprot.writeI32(_iter74.getValue());
}
}
}
if (struct.isSetMy_structset()) {
{
oprot.writeI32(struct.my_structset.size());
for (MiniStruct _iter75 : struct.my_structset)
{
_iter75.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(20);
if (incoming.get(0)) {
struct.my_bool = iprot.readBool();
struct.setMy_boolIsSet(true);
}
if (incoming.get(1)) {
struct.my_byte = iprot.readByte();
struct.setMy_byteIsSet(true);
}
if (incoming.get(2)) {
struct.my_16bit_int = iprot.readI16();
struct.setMy_16bit_intIsSet(true);
}
if (incoming.get(3)) {
struct.my_32bit_int = iprot.readI32();
struct.setMy_32bit_intIsSet(true);
}
if (incoming.get(4)) {
struct.my_64bit_int = iprot.readI64();
struct.setMy_64bit_intIsSet(true);
}
if (incoming.get(5)) {
struct.my_double = iprot.readDouble();
struct.setMy_doubleIsSet(true);
}
if (incoming.get(6)) {
struct.my_string = iprot.readString();
struct.setMy_stringIsSet(true);
}
if (incoming.get(7)) {
struct.my_binary = iprot.readBinary();
struct.setMy_binaryIsSet(true);
}
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TMap _map76 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.my_string_string_map = new HashMap(2*_map76.size);
for (int _i77 = 0; _i77 < _map76.size; ++_i77)
{
String _key78; // required
String _val79; // required
_key78 = iprot.readString();
_val79 = iprot.readString();
struct.my_string_string_map.put(_key78, _val79);
}
}
struct.setMy_string_string_mapIsSet(true);
}
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TMap _map80 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
struct.my_string_enum_map = new HashMap(2*_map80.size);
for (int _i81 = 0; _i81 < _map80.size; ++_i81)
{
String _key82; // required
MyEnum _val83; // required
_key82 = iprot.readString();
_val83 = MyEnum.findByValue(iprot.readI32());
struct.my_string_enum_map.put(_key82, _val83);
}
}
struct.setMy_string_enum_mapIsSet(true);
}
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.my_enum_string_map = new HashMap(2*_map84.size);
for (int _i85 = 0; _i85 < _map84.size; ++_i85)
{
MyEnum _key86; // required
String _val87; // required
_key86 = MyEnum.findByValue(iprot.readI32());
_val87 = iprot.readString();
struct.my_enum_string_map.put(_key86, _val87);
}
}
struct.setMy_enum_string_mapIsSet(true);
}
if (incoming.get(11)) {
{
org.apache.thrift.protocol.TMap _map88 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.my_enum_struct_map = new HashMap(2*_map88.size);
for (int _i89 = 0; _i89 < _map88.size; ++_i89)
{
MyEnum _key90; // required
MiniStruct _val91; // required
_key90 = MyEnum.findByValue(iprot.readI32());
_val91 = new MiniStruct();
_val91.read(iprot);
struct.my_enum_struct_map.put(_key90, _val91);
}
}
struct.setMy_enum_struct_mapIsSet(true);
}
if (incoming.get(12)) {
{
org.apache.thrift.protocol.TMap _map92 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
struct.my_enum_stringlist_map = new HashMap>(2*_map92.size);
for (int _i93 = 0; _i93 < _map92.size; ++_i93)
{
MyEnum _key94; // required
List _val95; // required
_key94 = MyEnum.findByValue(iprot.readI32());
{
org.apache.thrift.protocol.TList _list96 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
_val95 = new ArrayList(_list96.size);
for (int _i97 = 0; _i97 < _list96.size; ++_i97)
{
String _elem98; // optional
_elem98 = iprot.readString();
_val95.add(_elem98);
}
}
struct.my_enum_stringlist_map.put(_key94, _val95);
}
}
struct.setMy_enum_stringlist_mapIsSet(true);
}
if (incoming.get(13)) {
{
org.apache.thrift.protocol.TMap _map99 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
struct.my_enum_structlist_map = new HashMap>(2*_map99.size);
for (int _i100 = 0; _i100 < _map99.size; ++_i100)
{
MyEnum _key101; // required
List _val102; // required
_key101 = MyEnum.findByValue(iprot.readI32());
{
org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
_val102 = new ArrayList(_list103.size);
for (int _i104 = 0; _i104 < _list103.size; ++_i104)
{
MiniStruct _elem105; // optional
_elem105 = new MiniStruct();
_elem105.read(iprot);
_val102.add(_elem105);
}
}
struct.my_enum_structlist_map.put(_key101, _val102);
}
}
struct.setMy_enum_structlist_mapIsSet(true);
}
if (incoming.get(14)) {
{
org.apache.thrift.protocol.TList _list106 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.my_stringlist = new ArrayList(_list106.size);
for (int _i107 = 0; _i107 < _list106.size; ++_i107)
{
String _elem108; // optional
_elem108 = iprot.readString();
struct.my_stringlist.add(_elem108);
}
}
struct.setMy_stringlistIsSet(true);
}
if (incoming.get(15)) {
{
org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.my_structlist = new ArrayList(_list109.size);
for (int _i110 = 0; _i110 < _list109.size; ++_i110)
{
MiniStruct _elem111; // optional
_elem111 = new MiniStruct();
_elem111.read(iprot);
struct.my_structlist.add(_elem111);
}
}
struct.setMy_structlistIsSet(true);
}
if (incoming.get(16)) {
{
org.apache.thrift.protocol.TList _list112 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
struct.my_enumlist = new ArrayList(_list112.size);
for (int _i113 = 0; _i113 < _list112.size; ++_i113)
{
MyEnum _elem114; // optional
_elem114 = MyEnum.findByValue(iprot.readI32());
struct.my_enumlist.add(_elem114);
}
}
struct.setMy_enumlistIsSet(true);
}
if (incoming.get(17)) {
{
org.apache.thrift.protocol.TSet _set115 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.my_stringset = new HashSet(2*_set115.size);
for (int _i116 = 0; _i116 < _set115.size; ++_i116)
{
String _elem117; // optional
_elem117 = iprot.readString();
struct.my_stringset.add(_elem117);
}
}
struct.setMy_stringsetIsSet(true);
}
if (incoming.get(18)) {
{
org.apache.thrift.protocol.TSet _set118 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32());
struct.my_enumset = new HashSet(2*_set118.size);
for (int _i119 = 0; _i119 < _set118.size; ++_i119)
{
MyEnum _elem120; // optional
_elem120 = MyEnum.findByValue(iprot.readI32());
struct.my_enumset.add(_elem120);
}
}
struct.setMy_enumsetIsSet(true);
}
if (incoming.get(19)) {
{
org.apache.thrift.protocol.TSet _set121 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.my_structset = new HashSet(2*_set121.size);
for (int _i122 = 0; _i122 < _set121.size; ++_i122)
{
MiniStruct _elem123; // optional
_elem123 = new MiniStruct();
_elem123.read(iprot);
struct.my_structset.add(_elem123);
}
}
struct.setMy_structsetIsSet(true);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy