/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

package test.fixtures.complex_struct;

import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.codec.ThriftField.Recursiveness;
import com.google.common.collect.*;
import java.util.*;
import javax.annotation.Nullable;
import org.apache.thrift.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.MoreObjects.ToStringHelper;

@SwiftGenerated
@com.facebook.swift.codec.ThriftStruct(value="defaultStruct", builder=DefaultStruct.Builder.class)
public final class DefaultStruct implements com.facebook.thrift.payload.ThriftSerializable {
    @ThriftConstructor
    public DefaultStruct(
        @com.facebook.swift.codec.ThriftField(value=1, name="myLongDFset", requiredness=Requiredness.NONE) final long myLongDFset,
        @com.facebook.swift.codec.ThriftField(value=2, name="myLongDF", requiredness=Requiredness.NONE) final long myLongDF,
        @com.facebook.swift.codec.ThriftField(value=3, name="portDFset", requiredness=Requiredness.NONE) final int portDFset,
        @com.facebook.swift.codec.ThriftField(value=4, name="portNum", requiredness=Requiredness.NONE) final int portNum,
        @com.facebook.swift.codec.ThriftField(value=5, name="myBinaryDFset", requiredness=Requiredness.NONE) final byte[] myBinaryDFset,
        @com.facebook.swift.codec.ThriftField(value=6, name="myBinary", requiredness=Requiredness.NONE) final byte[] myBinary,
        @com.facebook.swift.codec.ThriftField(value=7, name="myByteDFSet", requiredness=Requiredness.NONE) final byte myByteDFSet,
        @com.facebook.swift.codec.ThriftField(value=8, name="myByte", requiredness=Requiredness.NONE) final byte myByte,
        @com.facebook.swift.codec.ThriftField(value=9, name="myDoubleDFset", requiredness=Requiredness.NONE) final double myDoubleDFset,
        @com.facebook.swift.codec.ThriftField(value=10, name="myDoubleDFZero", requiredness=Requiredness.NONE) final double myDoubleDFZero,
        @com.facebook.swift.codec.ThriftField(value=12, name="myDouble", requiredness=Requiredness.NONE) final double myDouble,
        @com.facebook.swift.codec.ThriftField(value=13, name="field3", requiredness=Requiredness.NONE) final Map<Integer, String> field3,
        @com.facebook.swift.codec.ThriftField(value=14, name="myList", requiredness=Requiredness.NONE) final List<test.fixtures.complex_struct.MyEnum> myList,
        @com.facebook.swift.codec.ThriftField(value=15, name="mySet", requiredness=Requiredness.NONE) final Set<String> mySet,
        @com.facebook.swift.codec.ThriftField(value=16, name="simpleStruct", requiredness=Requiredness.NONE) final test.fixtures.complex_struct.SimpleStruct simpleStruct,
        @com.facebook.swift.codec.ThriftField(value=17, name="listStructDFset", requiredness=Requiredness.NONE) final List<test.fixtures.complex_struct.SimpleStruct> listStructDFset,
        @com.facebook.swift.codec.ThriftField(value=18, name="myUnion", requiredness=Requiredness.NONE) final test.fixtures.complex_struct.MyUnion myUnion,
        @com.facebook.swift.codec.ThriftField(value=19, name="listUnionDFset", requiredness=Requiredness.NONE) final List<test.fixtures.complex_struct.MyUnion> listUnionDFset,
        @com.facebook.swift.codec.ThriftField(value=20, name="mapNestlistStructDfSet", requiredness=Requiredness.NONE) final Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> mapNestlistStructDfSet,
        @com.facebook.swift.codec.ThriftField(value=21, name="mapJavaTypeDFset", requiredness=Requiredness.NONE) final it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> mapJavaTypeDFset,
        @com.facebook.swift.codec.ThriftField(value=22, name="emptyMap", requiredness=Requiredness.NONE) final Map<Long, Integer> emptyMap,
        @com.facebook.swift.codec.ThriftField(value=23, name="enumMapDFset", requiredness=Requiredness.NONE) final Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> enumMapDFset
    ) {
        this.myLongDFset = myLongDFset;
        this.myLongDF = myLongDF;
        this.portDFset = portDFset;
        this.portNum = portNum;
        this.myBinaryDFset = myBinaryDFset;
        this.myBinary = myBinary;
        this.myByteDFSet = myByteDFSet;
        this.myByte = myByte;
        this.myDoubleDFset = myDoubleDFset;
        this.myDoubleDFZero = myDoubleDFZero;
        this.myDouble = myDouble;
        this.field3 = field3;
        this.myList = myList;
        this.mySet = mySet;
        this.simpleStruct = simpleStruct;
        this.listStructDFset = listStructDFset;
        this.myUnion = myUnion;
        this.listUnionDFset = listUnionDFset;
        this.mapNestlistStructDfSet = mapNestlistStructDfSet;
        this.mapJavaTypeDFset = mapJavaTypeDFset;
        this.emptyMap = emptyMap;
        this.enumMapDFset = enumMapDFset;
    }
    
    @ThriftConstructor
    protected DefaultStruct() {
      this.myLongDFset = 10L;
      this.myLongDF = 0L;
      this.portDFset = 3456;
      this.portNum = 0;
      this.myBinaryDFset = "abc".getBytes();
      this.myBinary = null;
      this.myByteDFSet = (byte)17;
      this.myByte = 0;
      this.myDoubleDFset = (double)99.7678;
      this.myDoubleDFZero = (double)0;
      this.myDouble = 0.;
      this.field3 = ImmutableMap.<Integer, String>builder()
        .put(15, "a_value")
        .put(2, "b_value")
        .build();
      this.myList = ImmutableList.<test.fixtures.complex_struct.MyEnum>builder()
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .build();
      this.mySet = ImmutableSet.<String>builder()
        .add("house")
        .add("car")
        .add("dog")
        .build();
      this.simpleStruct = new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("John").build();
      this.listStructDFset = ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("IronMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(999L).setName("Thanos").build())
        .build();
      this.myUnion = test.fixtures.complex_struct.Constants.CONST_ENUM_UNION;
      this.listUnionDFset = ImmutableList.<test.fixtures.complex_struct.MyUnion>builder()
        .add(test.fixtures.complex_struct.MyUnion.fromMyEnum(test.fixtures.complex_struct.MyEnum.MY_VALUE2))
        .add(test.fixtures.complex_struct.MyUnion.fromIntValue(123))
        .build();
      this.mapNestlistStructDfSet = ImmutableMap.<Integer, List<test.fixtures.complex_struct.SimpleStruct>>builder()
        .put(1, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("IronMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(999L).setName("Thanos").build())
        .build())
        .put(2, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(28L).setName("BatMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(12L).setName("Robin").build())
        .build())
        .put(5, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(12L).setName("RatMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(6L).setName("Catman").build())
        .build())
        .build();
      this.mapJavaTypeDFset = ImmutableMap.<Long, String>builder()
        .put(15L, "a_value")
        .put(2L, "b_value")
        .build();
      this.emptyMap = ImmutableMap.<Long, Integer>builder()
        .build();
      this.enumMapDFset = ImmutableMap.<String, Map<Integer, test.fixtures.complex_struct.MyEnum>>builder()
        .put("SANDY BRIDGE", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(16, test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .put(144, test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .build())
        .put("IVY BRIDGE", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(32, test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .put(144, test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .build())
        .put("HASWELL", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(32, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .put(128, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .put(256, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .build())
        .build();
    }
    
    public static class Builder {
        private long myLongDFset = 10L;
        private long myLongDF = 0L;
        private int portDFset = 3456;
        private int portNum = 0;
        private byte[] myBinaryDFset = "abc".getBytes();
        private byte[] myBinary = null;
        private byte myByteDFSet = (byte)17;
        private byte myByte = 0;
        private double myDoubleDFset = (double)99.7678;
        private double myDoubleDFZero = (double)0;
        private double myDouble = 0.;
        private Map<Integer, String> field3 = ImmutableMap.<Integer, String>builder()
        .put(15, "a_value")
        .put(2, "b_value")
        .build();
        private List<test.fixtures.complex_struct.MyEnum> myList = ImmutableList.<test.fixtures.complex_struct.MyEnum>builder()
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .add(test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .build();
        private Set<String> mySet = ImmutableSet.<String>builder()
        .add("house")
        .add("car")
        .add("dog")
        .build();
        private test.fixtures.complex_struct.SimpleStruct simpleStruct = new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("John").build();
        private List<test.fixtures.complex_struct.SimpleStruct> listStructDFset = ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("IronMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(999L).setName("Thanos").build())
        .build();
        private test.fixtures.complex_struct.MyUnion myUnion = test.fixtures.complex_struct.Constants.CONST_ENUM_UNION;
        private List<test.fixtures.complex_struct.MyUnion> listUnionDFset = ImmutableList.<test.fixtures.complex_struct.MyUnion>builder()
        .add(test.fixtures.complex_struct.MyUnion.fromMyEnum(test.fixtures.complex_struct.MyEnum.MY_VALUE2))
        .add(test.fixtures.complex_struct.MyUnion.fromIntValue(123))
        .build();
        private Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> mapNestlistStructDfSet = ImmutableMap.<Integer, List<test.fixtures.complex_struct.SimpleStruct>>builder()
        .put(1, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(40L).setName("IronMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(999L).setName("Thanos").build())
        .build())
        .put(2, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(28L).setName("BatMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(12L).setName("Robin").build())
        .build())
        .put(5, ImmutableList.<test.fixtures.complex_struct.SimpleStruct>builder()
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(12L).setName("RatMan").build())
        .add(new test.fixtures.complex_struct.SimpleStruct.Builder().setAge(6L).setName("Catman").build())
        .build())
        .build();
        private it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> mapJavaTypeDFset = ImmutableMap.<Long, String>builder()
        .put(15L, "a_value")
        .put(2L, "b_value")
        .build();
        private Map<Long, Integer> emptyMap = ImmutableMap.<Long, Integer>builder()
        .build();
        private Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> enumMapDFset = ImmutableMap.<String, Map<Integer, test.fixtures.complex_struct.MyEnum>>builder()
        .put("SANDY BRIDGE", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(16, test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .put(144, test.fixtures.complex_struct.MyEnum.MY_VALUE1)
        .build())
        .put("IVY BRIDGE", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(32, test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .put(144, test.fixtures.complex_struct.MyEnum.MY_VALUE2)
        .build())
        .put("HASWELL", ImmutableMap.<Integer, test.fixtures.complex_struct.MyEnum>builder()
        .put(32, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .put(128, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .put(256, test.fixtures.complex_struct.MyEnum.MY_VALUE3)
        .build())
        .build();
    
        @com.facebook.swift.codec.ThriftField(value=1, name="myLongDFset", requiredness=Requiredness.NONE)
        public Builder setMyLongDFset(long myLongDFset) {
            this.myLongDFset = myLongDFset;
            return this;
        }
    
        public long getMyLongDFset() { return myLongDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=2, name="myLongDF", requiredness=Requiredness.NONE)
        public Builder setMyLongDF(long myLongDF) {
            this.myLongDF = myLongDF;
            return this;
        }
    
        public long getMyLongDF() { return myLongDF; }
    
            @com.facebook.swift.codec.ThriftField(value=3, name="portDFset", requiredness=Requiredness.NONE)
        public Builder setPortDFset(int portDFset) {
            this.portDFset = portDFset;
            return this;
        }
    
        public int getPortDFset() { return portDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=4, name="portNum", requiredness=Requiredness.NONE)
        public Builder setPortNum(int portNum) {
            this.portNum = portNum;
            return this;
        }
    
        public int getPortNum() { return portNum; }
    
            @com.facebook.swift.codec.ThriftField(value=5, name="myBinaryDFset", requiredness=Requiredness.NONE)
        public Builder setMyBinaryDFset(byte[] myBinaryDFset) {
            this.myBinaryDFset = myBinaryDFset;
            return this;
        }
    
        public byte[] getMyBinaryDFset() { return myBinaryDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=6, name="myBinary", requiredness=Requiredness.NONE)
        public Builder setMyBinary(byte[] myBinary) {
            this.myBinary = myBinary;
            return this;
        }
    
        public byte[] getMyBinary() { return myBinary; }
    
            @com.facebook.swift.codec.ThriftField(value=7, name="myByteDFSet", requiredness=Requiredness.NONE)
        public Builder setMyByteDFSet(byte myByteDFSet) {
            this.myByteDFSet = myByteDFSet;
            return this;
        }
    
        public byte getMyByteDFSet() { return myByteDFSet; }
    
            @com.facebook.swift.codec.ThriftField(value=8, name="myByte", requiredness=Requiredness.NONE)
        public Builder setMyByte(byte myByte) {
            this.myByte = myByte;
            return this;
        }
    
        public byte getMyByte() { return myByte; }
    
            @com.facebook.swift.codec.ThriftField(value=9, name="myDoubleDFset", requiredness=Requiredness.NONE)
        public Builder setMyDoubleDFset(double myDoubleDFset) {
            this.myDoubleDFset = myDoubleDFset;
            return this;
        }
    
        public double getMyDoubleDFset() { return myDoubleDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=10, name="myDoubleDFZero", requiredness=Requiredness.NONE)
        public Builder setMyDoubleDFZero(double myDoubleDFZero) {
            this.myDoubleDFZero = myDoubleDFZero;
            return this;
        }
    
        public double getMyDoubleDFZero() { return myDoubleDFZero; }
    
            @com.facebook.swift.codec.ThriftField(value=12, name="myDouble", requiredness=Requiredness.NONE)
        public Builder setMyDouble(double myDouble) {
            this.myDouble = myDouble;
            return this;
        }
    
        public double getMyDouble() { return myDouble; }
    
            @com.facebook.swift.codec.ThriftField(value=13, name="field3", requiredness=Requiredness.NONE)
        public Builder setField3(Map<Integer, String> field3) {
            this.field3 = field3;
            return this;
        }
    
        public Map<Integer, String> getField3() { return field3; }
    
            @com.facebook.swift.codec.ThriftField(value=14, name="myList", requiredness=Requiredness.NONE)
        public Builder setMyList(List<test.fixtures.complex_struct.MyEnum> myList) {
            this.myList = myList;
            return this;
        }
    
        public List<test.fixtures.complex_struct.MyEnum> getMyList() { return myList; }
    
            @com.facebook.swift.codec.ThriftField(value=15, name="mySet", requiredness=Requiredness.NONE)
        public Builder setMySet(Set<String> mySet) {
            this.mySet = mySet;
            return this;
        }
    
        public Set<String> getMySet() { return mySet; }
    
            @com.facebook.swift.codec.ThriftField(value=16, name="simpleStruct", requiredness=Requiredness.NONE)
        public Builder setSimpleStruct(test.fixtures.complex_struct.SimpleStruct simpleStruct) {
            this.simpleStruct = simpleStruct;
            return this;
        }
    
        public test.fixtures.complex_struct.SimpleStruct getSimpleStruct() { return simpleStruct; }
    
            @com.facebook.swift.codec.ThriftField(value=17, name="listStructDFset", requiredness=Requiredness.NONE)
        public Builder setListStructDFset(List<test.fixtures.complex_struct.SimpleStruct> listStructDFset) {
            this.listStructDFset = listStructDFset;
            return this;
        }
    
        public List<test.fixtures.complex_struct.SimpleStruct> getListStructDFset() { return listStructDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=18, name="myUnion", requiredness=Requiredness.NONE)
        public Builder setMyUnion(test.fixtures.complex_struct.MyUnion myUnion) {
            this.myUnion = myUnion;
            return this;
        }
    
        public test.fixtures.complex_struct.MyUnion getMyUnion() { return myUnion; }
    
            @com.facebook.swift.codec.ThriftField(value=19, name="listUnionDFset", requiredness=Requiredness.NONE)
        public Builder setListUnionDFset(List<test.fixtures.complex_struct.MyUnion> listUnionDFset) {
            this.listUnionDFset = listUnionDFset;
            return this;
        }
    
        public List<test.fixtures.complex_struct.MyUnion> getListUnionDFset() { return listUnionDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=20, name="mapNestlistStructDfSet", requiredness=Requiredness.NONE)
        public Builder setMapNestlistStructDfSet(Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> mapNestlistStructDfSet) {
            this.mapNestlistStructDfSet = mapNestlistStructDfSet;
            return this;
        }
    
        public Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> getMapNestlistStructDfSet() { return mapNestlistStructDfSet; }
    
            @com.facebook.swift.codec.ThriftField(value=21, name="mapJavaTypeDFset", requiredness=Requiredness.NONE)
        public Builder setMapJavaTypeDFset(it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> mapJavaTypeDFset) {
            this.mapJavaTypeDFset = mapJavaTypeDFset;
            return this;
        }
    
        public it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> getMapJavaTypeDFset() { return mapJavaTypeDFset; }
    
            @com.facebook.swift.codec.ThriftField(value=22, name="emptyMap", requiredness=Requiredness.NONE)
        public Builder setEmptyMap(Map<Long, Integer> emptyMap) {
            this.emptyMap = emptyMap;
            return this;
        }
    
        public Map<Long, Integer> getEmptyMap() { return emptyMap; }
    
            @com.facebook.swift.codec.ThriftField(value=23, name="enumMapDFset", requiredness=Requiredness.NONE)
        public Builder setEnumMapDFset(Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> enumMapDFset) {
            this.enumMapDFset = enumMapDFset;
            return this;
        }
    
        public Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> getEnumMapDFset() { return enumMapDFset; }
    
        public Builder() { }
        public Builder(DefaultStruct other) {
            this.myLongDFset = other.myLongDFset;
            this.myLongDF = other.myLongDF;
            this.portDFset = other.portDFset;
            this.portNum = other.portNum;
            this.myBinaryDFset = other.myBinaryDFset;
            this.myBinary = other.myBinary;
            this.myByteDFSet = other.myByteDFSet;
            this.myByte = other.myByte;
            this.myDoubleDFset = other.myDoubleDFset;
            this.myDoubleDFZero = other.myDoubleDFZero;
            this.myDouble = other.myDouble;
            this.field3 = other.field3;
            this.myList = other.myList;
            this.mySet = other.mySet;
            this.simpleStruct = other.simpleStruct;
            this.listStructDFset = other.listStructDFset;
            this.myUnion = other.myUnion;
            this.listUnionDFset = other.listUnionDFset;
            this.mapNestlistStructDfSet = other.mapNestlistStructDfSet;
            this.mapJavaTypeDFset = other.mapJavaTypeDFset;
            this.emptyMap = other.emptyMap;
            this.enumMapDFset = other.enumMapDFset;
        }
    
        @ThriftConstructor
        public DefaultStruct build() {
            DefaultStruct result = new DefaultStruct (
                this.myLongDFset,
                this.myLongDF,
                this.portDFset,
                this.portNum,
                this.myBinaryDFset,
                this.myBinary,
                this.myByteDFSet,
                this.myByte,
                this.myDoubleDFset,
                this.myDoubleDFZero,
                this.myDouble,
                this.field3,
                this.myList,
                this.mySet,
                this.simpleStruct,
                this.listStructDFset,
                this.myUnion,
                this.listUnionDFset,
                this.mapNestlistStructDfSet,
                this.mapJavaTypeDFset,
                this.emptyMap,
                this.enumMapDFset
            );
            return result;
        }
    }
        
    public static final Map<String, Integer> NAMES_TO_IDS = new HashMap();
    public static final Map<String, Integer> THRIFT_NAMES_TO_IDS = new HashMap();
    public static final Map<Integer, TField> FIELD_METADATA = new HashMap<>();
    private static final TStruct STRUCT_DESC = new TStruct("defaultStruct");
    private final long myLongDFset;
    public static final int _MYLONGDFSET = 1;
    private static final TField MY_LONG_DFSET_FIELD_DESC = new TField("myLongDFset", TType.I64, (short)1);
        private final long myLongDF;
    public static final int _MYLONGDF = 2;
    private static final TField MY_LONG_DF_FIELD_DESC = new TField("myLongDF", TType.I64, (short)2);
        private final int portDFset;
    public static final int _PORTDFSET = 3;
    private static final TField PORT_DFSET_FIELD_DESC = new TField("portDFset", TType.I32, (short)3);
        private final int portNum;
    public static final int _PORTNUM = 4;
    private static final TField PORT_NUM_FIELD_DESC = new TField("portNum", TType.I32, (short)4);
        private final byte[] myBinaryDFset;
    public static final int _MYBINARYDFSET = 5;
    private static final TField MY_BINARY_DFSET_FIELD_DESC = new TField("myBinaryDFset", TType.STRING, (short)5);
        private final byte[] myBinary;
    public static final int _MYBINARY = 6;
    private static final TField MY_BINARY_FIELD_DESC = new TField("myBinary", TType.STRING, (short)6);
        private final byte myByteDFSet;
    public static final int _MYBYTEDFSET = 7;
    private static final TField MY_BYTE_DFSET_FIELD_DESC = new TField("myByteDFSet", TType.BYTE, (short)7);
        private final byte myByte;
    public static final int _MYBYTE = 8;
    private static final TField MY_BYTE_FIELD_DESC = new TField("myByte", TType.BYTE, (short)8);
        private final double myDoubleDFset;
    public static final int _MYDOUBLEDFSET = 9;
    private static final TField MY_DOUBLE_DFSET_FIELD_DESC = new TField("myDoubleDFset", TType.DOUBLE, (short)9);
        private final double myDoubleDFZero;
    public static final int _MYDOUBLEDFZERO = 10;
    private static final TField MY_DOUBLE_DFZERO_FIELD_DESC = new TField("myDoubleDFZero", TType.DOUBLE, (short)10);
        private final double myDouble;
    public static final int _MYDOUBLE = 12;
    private static final TField MY_DOUBLE_FIELD_DESC = new TField("myDouble", TType.DOUBLE, (short)12);
        private final Map<Integer, String> field3;
    public static final int _FIELD3 = 13;
    private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.MAP, (short)13);
        private final List<test.fixtures.complex_struct.MyEnum> myList;
    public static final int _MYLIST = 14;
    private static final TField MY_LIST_FIELD_DESC = new TField("myList", TType.LIST, (short)14);
        private final Set<String> mySet;
    public static final int _MYSET = 15;
    private static final TField MY_SET_FIELD_DESC = new TField("mySet", TType.SET, (short)15);
        private final test.fixtures.complex_struct.SimpleStruct simpleStruct;
    public static final int _SIMPLESTRUCT = 16;
    private static final TField SIMPLE_STRUCT_FIELD_DESC = new TField("simpleStruct", TType.STRUCT, (short)16);
        private final List<test.fixtures.complex_struct.SimpleStruct> listStructDFset;
    public static final int _LISTSTRUCTDFSET = 17;
    private static final TField LIST_STRUCT_DFSET_FIELD_DESC = new TField("listStructDFset", TType.LIST, (short)17);
        private final test.fixtures.complex_struct.MyUnion myUnion;
    public static final int _MYUNION = 18;
    private static final TField MY_UNION_FIELD_DESC = new TField("myUnion", TType.STRUCT, (short)18);
        private final List<test.fixtures.complex_struct.MyUnion> listUnionDFset;
    public static final int _LISTUNIONDFSET = 19;
    private static final TField LIST_UNION_DFSET_FIELD_DESC = new TField("listUnionDFset", TType.LIST, (short)19);
        private final Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> mapNestlistStructDfSet;
    public static final int _MAPNESTLISTSTRUCTDFSET = 20;
    private static final TField MAP_NESTLIST_STRUCT_DF_SET_FIELD_DESC = new TField("mapNestlistStructDfSet", TType.MAP, (short)20);
        private final it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> mapJavaTypeDFset;
    public static final int _MAPJAVATYPEDFSET = 21;
    private static final TField MAP_JAVA_TYPE_DFSET_FIELD_DESC = new TField("mapJavaTypeDFset", TType.MAP, (short)21);
        private final Map<Long, Integer> emptyMap;
    public static final int _EMPTYMAP = 22;
    private static final TField EMPTY_MAP_FIELD_DESC = new TField("emptyMap", TType.MAP, (short)22);
        private final Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> enumMapDFset;
    public static final int _ENUMMAPDFSET = 23;
    private static final TField ENUM_MAP_DFSET_FIELD_DESC = new TField("enumMapDFset", TType.MAP, (short)23);
    static {
      NAMES_TO_IDS.put("myLongDFset", 1);
      THRIFT_NAMES_TO_IDS.put("myLongDFset", 1);
      FIELD_METADATA.put(1, MY_LONG_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("myLongDF", 2);
      THRIFT_NAMES_TO_IDS.put("myLongDF", 2);
      FIELD_METADATA.put(2, MY_LONG_DF_FIELD_DESC);
      NAMES_TO_IDS.put("portDFset", 3);
      THRIFT_NAMES_TO_IDS.put("portDFset", 3);
      FIELD_METADATA.put(3, PORT_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("portNum", 4);
      THRIFT_NAMES_TO_IDS.put("portNum", 4);
      FIELD_METADATA.put(4, PORT_NUM_FIELD_DESC);
      NAMES_TO_IDS.put("myBinaryDFset", 5);
      THRIFT_NAMES_TO_IDS.put("myBinaryDFset", 5);
      FIELD_METADATA.put(5, MY_BINARY_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("myBinary", 6);
      THRIFT_NAMES_TO_IDS.put("myBinary", 6);
      FIELD_METADATA.put(6, MY_BINARY_FIELD_DESC);
      NAMES_TO_IDS.put("myByteDFSet", 7);
      THRIFT_NAMES_TO_IDS.put("myByteDFSet", 7);
      FIELD_METADATA.put(7, MY_BYTE_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("myByte", 8);
      THRIFT_NAMES_TO_IDS.put("myByte", 8);
      FIELD_METADATA.put(8, MY_BYTE_FIELD_DESC);
      NAMES_TO_IDS.put("myDoubleDFset", 9);
      THRIFT_NAMES_TO_IDS.put("myDoubleDFset", 9);
      FIELD_METADATA.put(9, MY_DOUBLE_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("myDoubleDFZero", 10);
      THRIFT_NAMES_TO_IDS.put("myDoubleDFZero", 10);
      FIELD_METADATA.put(10, MY_DOUBLE_DFZERO_FIELD_DESC);
      NAMES_TO_IDS.put("myDouble", 12);
      THRIFT_NAMES_TO_IDS.put("myDouble", 12);
      FIELD_METADATA.put(12, MY_DOUBLE_FIELD_DESC);
      NAMES_TO_IDS.put("field3", 13);
      THRIFT_NAMES_TO_IDS.put("field3", 13);
      FIELD_METADATA.put(13, FIELD3_FIELD_DESC);
      NAMES_TO_IDS.put("myList", 14);
      THRIFT_NAMES_TO_IDS.put("myList", 14);
      FIELD_METADATA.put(14, MY_LIST_FIELD_DESC);
      NAMES_TO_IDS.put("mySet", 15);
      THRIFT_NAMES_TO_IDS.put("mySet", 15);
      FIELD_METADATA.put(15, MY_SET_FIELD_DESC);
      NAMES_TO_IDS.put("simpleStruct", 16);
      THRIFT_NAMES_TO_IDS.put("simpleStruct", 16);
      FIELD_METADATA.put(16, SIMPLE_STRUCT_FIELD_DESC);
      NAMES_TO_IDS.put("listStructDFset", 17);
      THRIFT_NAMES_TO_IDS.put("listStructDFset", 17);
      FIELD_METADATA.put(17, LIST_STRUCT_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("myUnion", 18);
      THRIFT_NAMES_TO_IDS.put("myUnion", 18);
      FIELD_METADATA.put(18, MY_UNION_FIELD_DESC);
      NAMES_TO_IDS.put("listUnionDFset", 19);
      THRIFT_NAMES_TO_IDS.put("listUnionDFset", 19);
      FIELD_METADATA.put(19, LIST_UNION_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("mapNestlistStructDfSet", 20);
      THRIFT_NAMES_TO_IDS.put("mapNestlistStructDfSet", 20);
      FIELD_METADATA.put(20, MAP_NESTLIST_STRUCT_DF_SET_FIELD_DESC);
      NAMES_TO_IDS.put("mapJavaTypeDFset", 21);
      THRIFT_NAMES_TO_IDS.put("mapJavaTypeDFset", 21);
      FIELD_METADATA.put(21, MAP_JAVA_TYPE_DFSET_FIELD_DESC);
      NAMES_TO_IDS.put("emptyMap", 22);
      THRIFT_NAMES_TO_IDS.put("emptyMap", 22);
      FIELD_METADATA.put(22, EMPTY_MAP_FIELD_DESC);
      NAMES_TO_IDS.put("enumMapDFset", 23);
      THRIFT_NAMES_TO_IDS.put("enumMapDFset", 23);
      FIELD_METADATA.put(23, ENUM_MAP_DFSET_FIELD_DESC);
    }
    
    
    @com.facebook.swift.codec.ThriftField(value=1, name="myLongDFset", requiredness=Requiredness.NONE)
    public long getMyLongDFset() { return myLongDFset; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=2, name="myLongDF", requiredness=Requiredness.NONE)
    public long getMyLongDF() { return myLongDF; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=3, name="portDFset", requiredness=Requiredness.NONE)
    public int getPortDFset() { return portDFset; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=4, name="portNum", requiredness=Requiredness.NONE)
    public int getPortNum() { return portNum; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=5, name="myBinaryDFset", requiredness=Requiredness.NONE)
    public byte[] getMyBinaryDFset() { return myBinaryDFset; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=6, name="myBinary", requiredness=Requiredness.NONE)
    public byte[] getMyBinary() { return myBinary; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=7, name="myByteDFSet", requiredness=Requiredness.NONE)
    public byte getMyByteDFSet() { return myByteDFSet; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=8, name="myByte", requiredness=Requiredness.NONE)
    public byte getMyByte() { return myByte; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=9, name="myDoubleDFset", requiredness=Requiredness.NONE)
    public double getMyDoubleDFset() { return myDoubleDFset; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=10, name="myDoubleDFZero", requiredness=Requiredness.NONE)
    public double getMyDoubleDFZero() { return myDoubleDFZero; }
    
    
    
    @com.facebook.swift.codec.ThriftField(value=12, name="myDouble", requiredness=Requiredness.NONE)
    public double getMyDouble() { return myDouble; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=13, name="field3", requiredness=Requiredness.NONE)
    public Map<Integer, String> getField3() { return field3; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=14, name="myList", requiredness=Requiredness.NONE)
    public List<test.fixtures.complex_struct.MyEnum> getMyList() { return myList; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=15, name="mySet", requiredness=Requiredness.NONE)
    public Set<String> getMySet() { return mySet; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=16, name="simpleStruct", requiredness=Requiredness.NONE)
    public test.fixtures.complex_struct.SimpleStruct getSimpleStruct() { return simpleStruct; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=17, name="listStructDFset", requiredness=Requiredness.NONE)
    public List<test.fixtures.complex_struct.SimpleStruct> getListStructDFset() { return listStructDFset; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=18, name="myUnion", requiredness=Requiredness.NONE)
    public test.fixtures.complex_struct.MyUnion getMyUnion() { return myUnion; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=19, name="listUnionDFset", requiredness=Requiredness.NONE)
    public List<test.fixtures.complex_struct.MyUnion> getListUnionDFset() { return listUnionDFset; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=20, name="mapNestlistStructDfSet", requiredness=Requiredness.NONE)
    public Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> getMapNestlistStructDfSet() { return mapNestlistStructDfSet; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=21, name="mapJavaTypeDFset", requiredness=Requiredness.NONE)
    public it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> getMapJavaTypeDFset() { return mapJavaTypeDFset; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=22, name="emptyMap", requiredness=Requiredness.NONE)
    public Map<Long, Integer> getEmptyMap() { return emptyMap; }
    
    
    @Nullable
    @com.facebook.swift.codec.ThriftField(value=23, name="enumMapDFset", requiredness=Requiredness.NONE)
    public Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> getEnumMapDFset() { return enumMapDFset; }
    
    @java.lang.Override
    public String toString() {
        ToStringHelper helper = toStringHelper(this);
        helper.add("myLongDFset", myLongDFset);
        helper.add("myLongDF", myLongDF);
        helper.add("portDFset", portDFset);
        helper.add("portNum", portNum);
        helper.add("myBinaryDFset", myBinaryDFset);
        helper.add("myBinary", myBinary);
        helper.add("myByteDFSet", myByteDFSet);
        helper.add("myByte", myByte);
        helper.add("myDoubleDFset", myDoubleDFset);
        helper.add("myDoubleDFZero", myDoubleDFZero);
        helper.add("myDouble", myDouble);
        helper.add("field3", field3);
        helper.add("myList", myList);
        helper.add("mySet", mySet);
        helper.add("simpleStruct", simpleStruct);
        helper.add("listStructDFset", listStructDFset);
        helper.add("myUnion", myUnion);
        helper.add("listUnionDFset", listUnionDFset);
        helper.add("mapNestlistStructDfSet", mapNestlistStructDfSet);
        helper.add("mapJavaTypeDFset", mapJavaTypeDFset);
        helper.add("emptyMap", emptyMap);
        helper.add("enumMapDFset", enumMapDFset);
        return helper.toString();
    }
    
    @java.lang.Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
    
        DefaultStruct other = (DefaultStruct)o;
    
        return
            Objects.equals(myLongDFset, other.myLongDFset) &&
            Objects.equals(myLongDF, other.myLongDF) &&
            Objects.equals(portDFset, other.portDFset) &&
            Objects.equals(portNum, other.portNum) &&
            Arrays.equals(myBinaryDFset, other.myBinaryDFset) &&
            Arrays.equals(myBinary, other.myBinary) &&
            Objects.equals(myByteDFSet, other.myByteDFSet) &&
            Objects.equals(myByte, other.myByte) &&
            Objects.equals(myDoubleDFset, other.myDoubleDFset) &&
            Objects.equals(myDoubleDFZero, other.myDoubleDFZero) &&
            Objects.equals(myDouble, other.myDouble) &&
            Objects.equals(field3, other.field3) &&
            Objects.equals(myList, other.myList) &&
            Objects.equals(mySet, other.mySet) &&
            Objects.equals(simpleStruct, other.simpleStruct) &&
            Objects.equals(listStructDFset, other.listStructDFset) &&
            Objects.equals(myUnion, other.myUnion) &&
            Objects.equals(listUnionDFset, other.listUnionDFset) &&
            Objects.equals(mapNestlistStructDfSet, other.mapNestlistStructDfSet) &&
            Objects.equals(mapJavaTypeDFset, other.mapJavaTypeDFset) &&
            Objects.equals(emptyMap, other.emptyMap) &&
            Objects.equals(enumMapDFset, other.enumMapDFset) &&
            true;
    }
    
    @java.lang.Override
    public int hashCode() {
        return Arrays.deepHashCode(new java.lang.Object[] {
            myLongDFset,
            myLongDF,
            portDFset,
            portNum,
            myBinaryDFset,
            myBinary,
            myByteDFSet,
            myByte,
            myDoubleDFset,
            myDoubleDFZero,
            myDouble,
            field3,
            myList,
            mySet,
            simpleStruct,
            listStructDFset,
            myUnion,
            listUnionDFset,
            mapNestlistStructDfSet,
            mapJavaTypeDFset,
            emptyMap,
            enumMapDFset
        });
    }
    
    
    public static com.facebook.thrift.payload.Reader<DefaultStruct> asReader() {
      return DefaultStruct::read0;
    }
    
    public static DefaultStruct read0(TProtocol oprot) throws TException {
      TField __field;
      oprot.readStructBegin(DefaultStruct.NAMES_TO_IDS, DefaultStruct.THRIFT_NAMES_TO_IDS, DefaultStruct.FIELD_METADATA);
      DefaultStruct.Builder builder = new DefaultStruct.Builder();
      while (true) {
        __field = oprot.readFieldBegin();
        if (__field.type == TType.STOP) { break; }
        switch (__field.id) {
        case _MYLONGDFSET:
          if (__field.type == TType.I64) {
            long myLongDFset = oprot.readI64();
            builder.setMyLongDFset(myLongDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYLONGDF:
          if (__field.type == TType.I64) {
            long myLongDF = oprot.readI64();
            builder.setMyLongDF(myLongDF);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _PORTDFSET:
          if (__field.type == TType.I32) {
            int portDFset = oprot.readI32();
            builder.setPortDFset(portDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _PORTNUM:
          if (__field.type == TType.I32) {
            int portNum = oprot.readI32();
            builder.setPortNum(portNum);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYBINARYDFSET:
          if (__field.type == TType.STRING) {
            byte[] myBinaryDFset = oprot.readBinary().array();
            builder.setMyBinaryDFset(myBinaryDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYBINARY:
          if (__field.type == TType.STRING) {
            byte[] myBinary = oprot.readBinary().array();
            builder.setMyBinary(myBinary);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYBYTEDFSET:
          if (__field.type == TType.BYTE) {
            byte myByteDFSet = oprot.readByte();
            builder.setMyByteDFSet(myByteDFSet);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYBYTE:
          if (__field.type == TType.BYTE) {
            byte myByte = oprot.readByte();
            builder.setMyByte(myByte);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYDOUBLEDFSET:
          if (__field.type == TType.DOUBLE) {
            double myDoubleDFset = oprot.readDouble();
            builder.setMyDoubleDFset(myDoubleDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYDOUBLEDFZERO:
          if (__field.type == TType.DOUBLE) {
            double myDoubleDFZero = oprot.readDouble();
            builder.setMyDoubleDFZero(myDoubleDFZero);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYDOUBLE:
          if (__field.type == TType.DOUBLE) {
            double myDouble = oprot.readDouble();
            builder.setMyDouble(myDouble);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _FIELD3:
          if (__field.type == TType.MAP) {
            Map<Integer, String> field3;
            {
            TMap _map = oprot.readMapBegin();
            field3 = new HashMap<Integer, String>(Math.max(0, _map.size));
            for (int _i = 0; (_map.size < 0) ? oprot.peekMap() : (_i < _map.size); _i++) {
                
                int _key1 = oprot.readI32();
                String _value1 = oprot.readString();
                field3.put(_key1, _value1);
            }
            }
            oprot.readMapEnd();
            builder.setField3(field3);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYLIST:
          if (__field.type == TType.LIST) {
            List<test.fixtures.complex_struct.MyEnum> myList;
            {
            TList _list = oprot.readListBegin();
            myList = new ArrayList<test.fixtures.complex_struct.MyEnum>(Math.max(0, _list.size));
            for (int _i = 0; (_list.size < 0) ? oprot.peekList() : (_i < _list.size); _i++) {
                
                test.fixtures.complex_struct.MyEnum _value1 = test.fixtures.complex_struct.MyEnum.fromInteger(oprot.readI32());
                myList.add(_value1);
            }
            oprot.readListEnd();
            }
            builder.setMyList(myList);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYSET:
          if (__field.type == TType.SET) {
            Set<String> mySet;
            {
            TSet _set = oprot.readSetBegin();
            mySet = new HashSet<String>(Math.max(0, _set.size));
            for (int _i = 0; (_set.size < 0) ? oprot.peekSet() : (_i < _set.size); _i++) {
                
                String _value1 = oprot.readString();
                mySet.add(_value1);
            }
            oprot.readSetEnd();
            }
            builder.setMySet(mySet);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _SIMPLESTRUCT:
          if (__field.type == TType.STRUCT) {
            test.fixtures.complex_struct.SimpleStruct simpleStruct = test.fixtures.complex_struct.SimpleStruct.read0(oprot);
            builder.setSimpleStruct(simpleStruct);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _LISTSTRUCTDFSET:
          if (__field.type == TType.LIST) {
            List<test.fixtures.complex_struct.SimpleStruct> listStructDFset;
            {
            TList _list = oprot.readListBegin();
            listStructDFset = new ArrayList<test.fixtures.complex_struct.SimpleStruct>(Math.max(0, _list.size));
            for (int _i = 0; (_list.size < 0) ? oprot.peekList() : (_i < _list.size); _i++) {
                
                test.fixtures.complex_struct.SimpleStruct _value1 = test.fixtures.complex_struct.SimpleStruct.read0(oprot);
                listStructDFset.add(_value1);
            }
            oprot.readListEnd();
            }
            builder.setListStructDFset(listStructDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MYUNION:
          if (__field.type == TType.STRUCT) {
            test.fixtures.complex_struct.MyUnion myUnion = test.fixtures.complex_struct.MyUnion.read0(oprot);
            builder.setMyUnion(myUnion);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _LISTUNIONDFSET:
          if (__field.type == TType.LIST) {
            List<test.fixtures.complex_struct.MyUnion> listUnionDFset;
            {
            TList _list = oprot.readListBegin();
            listUnionDFset = new ArrayList<test.fixtures.complex_struct.MyUnion>(Math.max(0, _list.size));
            for (int _i = 0; (_list.size < 0) ? oprot.peekList() : (_i < _list.size); _i++) {
                
                test.fixtures.complex_struct.MyUnion _value1 = test.fixtures.complex_struct.MyUnion.read0(oprot);
                listUnionDFset.add(_value1);
            }
            oprot.readListEnd();
            }
            builder.setListUnionDFset(listUnionDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MAPNESTLISTSTRUCTDFSET:
          if (__field.type == TType.MAP) {
            Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> mapNestlistStructDfSet;
            {
            TMap _map = oprot.readMapBegin();
            mapNestlistStructDfSet = new HashMap<Integer, List<test.fixtures.complex_struct.SimpleStruct>>(Math.max(0, _map.size));
            for (int _i = 0; (_map.size < 0) ? oprot.peekMap() : (_i < _map.size); _i++) {
                
                int _key1 = oprot.readI32();
                List<test.fixtures.complex_struct.SimpleStruct> _value1;
                            {
                            TList _list1 = oprot.readListBegin();
                            _value1 = new ArrayList<test.fixtures.complex_struct.SimpleStruct>(Math.max(0, _list1.size));
                            for (int _i1 = 0; (_list1.size < 0) ? oprot.peekList() : (_i1 < _list1.size); _i1++) {
                                
                                
                                test.fixtures.complex_struct.SimpleStruct _value2 = test.fixtures.complex_struct.SimpleStruct.read0(oprot);
                                
                                
                                _value1.add(_value2);
                                
                            }
                            oprot.readListEnd();
                            }
                                mapNestlistStructDfSet.put(_key1, _value1);
            }
            }
            oprot.readMapEnd();
            builder.setMapNestlistStructDfSet(mapNestlistStructDfSet);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _MAPJAVATYPEDFSET:
          if (__field.type == TType.MAP) {
            it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> mapJavaTypeDFset;
            {
            TMap _map = oprot.readMapBegin();
            mapJavaTypeDFset = new it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String>();
            for (int _i = 0; (_map.size < 0) ? oprot.peekMap() : (_i < _map.size); _i++) {
                
                long _key1 = oprot.readI64();
                String _value1 = oprot.readString();
                mapJavaTypeDFset.put(_key1, _value1);
            }
            }
            oprot.readMapEnd();
            builder.setMapJavaTypeDFset(mapJavaTypeDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _EMPTYMAP:
          if (__field.type == TType.MAP) {
            Map<Long, Integer> emptyMap;
            {
            TMap _map = oprot.readMapBegin();
            emptyMap = new HashMap<Long, Integer>(Math.max(0, _map.size));
            for (int _i = 0; (_map.size < 0) ? oprot.peekMap() : (_i < _map.size); _i++) {
                
                long _key1 = oprot.readI64();
                int _value1 = oprot.readI32();
                emptyMap.put(_key1, _value1);
            }
            }
            oprot.readMapEnd();
            builder.setEmptyMap(emptyMap);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        case _ENUMMAPDFSET:
          if (__field.type == TType.MAP) {
            Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> enumMapDFset;
            {
            TMap _map = oprot.readMapBegin();
            enumMapDFset = new HashMap<String, Map<Integer, test.fixtures.complex_struct.MyEnum>>(Math.max(0, _map.size));
            for (int _i = 0; (_map.size < 0) ? oprot.peekMap() : (_i < _map.size); _i++) {
                
                String _key1 = oprot.readString();
                Map<Integer, test.fixtures.complex_struct.MyEnum> _value1;
                            {
                            TMap _map1 = oprot.readMapBegin();
                            _value1 = new HashMap<Integer, test.fixtures.complex_struct.MyEnum>(Math.max(0, _map1.size));
                            for (int _i1 = 0; (_map1.size < 0) ? oprot.peekMap() : (_i1 < _map1.size); _i1++) {
                                
                                
                                int _key2 = oprot.readI32();
                                
                
                                
                                test.fixtures.complex_struct.MyEnum _value2 = test.fixtures.complex_struct.MyEnum.fromInteger(oprot.readI32());
                                
                                
                                _value1.put(_key2, _value2);
                                
                            }
                            }
                            oprot.readMapEnd();
                                enumMapDFset.put(_key1, _value1);
            }
            }
            oprot.readMapEnd();
            builder.setEnumMapDFset(enumMapDFset);
          } else {
            TProtocolUtil.skip(oprot, __field.type);
          }
          break;
        default:
          TProtocolUtil.skip(oprot, __field.type);
          break;
        }
        oprot.readFieldEnd();
      }
      oprot.readStructEnd();
      return builder.build();
    }
    
    public void write0(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(MY_LONG_DFSET_FIELD_DESC);
      oprot.writeI64(this.myLongDFset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MY_LONG_DF_FIELD_DESC);
      oprot.writeI64(this.myLongDF);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PORT_DFSET_FIELD_DESC);
      oprot.writeI32(this.portDFset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PORT_NUM_FIELD_DESC);
      oprot.writeI32(this.portNum);
      oprot.writeFieldEnd();
      if (myBinaryDFset != null) {
        oprot.writeFieldBegin(MY_BINARY_DFSET_FIELD_DESC);
        oprot.writeBinary(java.nio.ByteBuffer.wrap(this.myBinaryDFset));
        oprot.writeFieldEnd();
      }
      if (myBinary != null) {
        oprot.writeFieldBegin(MY_BINARY_FIELD_DESC);
        oprot.writeBinary(java.nio.ByteBuffer.wrap(this.myBinary));
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MY_BYTE_DFSET_FIELD_DESC);
      oprot.writeByte(this.myByteDFSet);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MY_BYTE_FIELD_DESC);
      oprot.writeByte(this.myByte);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MY_DOUBLE_DFSET_FIELD_DESC);
      oprot.writeDouble(this.myDoubleDFset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MY_DOUBLE_DFZERO_FIELD_DESC);
      oprot.writeDouble(this.myDoubleDFZero);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC);
      oprot.writeDouble(this.myDouble);
      oprot.writeFieldEnd();
      if (field3 != null) {
        oprot.writeFieldBegin(FIELD3_FIELD_DESC);
        Map<Integer, String> _iter0 = field3;
        oprot.writeMapBegin(new TMap(TType.I32, TType.STRING, _iter0.size()));
        for (Map.Entry<Integer, String> _iter1 : _iter0.entrySet()) {
          oprot.writeI32(_iter1.getKey());
          oprot.writeString(_iter1.getValue());
        }
        oprot.writeMapEnd();
        oprot.writeFieldEnd();
      }
      if (myList != null) {
        oprot.writeFieldBegin(MY_LIST_FIELD_DESC);
        List<test.fixtures.complex_struct.MyEnum> _iter0 = myList;
        oprot.writeListBegin(new TList(TType.I32, _iter0.size()));
        for (test.fixtures.complex_struct.MyEnum _iter1 : _iter0) {
          oprot.writeI32(_iter1 == null ? 0 : com.facebook.thrift.util.EnumUtil.getValue(_iter1));
        }
        oprot.writeListEnd();
        oprot.writeFieldEnd();
      }
      if (mySet != null) {
        oprot.writeFieldBegin(MY_SET_FIELD_DESC);
        Set<String> _iter0 = mySet;
        oprot.writeSetBegin(new TSet(TType.STRING, _iter0.size()));
        for (String _iter1 : _iter0) {
          oprot.writeString(_iter1);
        }
        oprot.writeSetEnd();
        oprot.writeFieldEnd();
      }
      if (simpleStruct != null) {
        oprot.writeFieldBegin(SIMPLE_STRUCT_FIELD_DESC);
        this.simpleStruct.write0(oprot);
        oprot.writeFieldEnd();
      }
      if (listStructDFset != null) {
        oprot.writeFieldBegin(LIST_STRUCT_DFSET_FIELD_DESC);
        List<test.fixtures.complex_struct.SimpleStruct> _iter0 = listStructDFset;
        oprot.writeListBegin(new TList(TType.STRUCT, _iter0.size()));
        for (test.fixtures.complex_struct.SimpleStruct _iter1 : _iter0) {
          _iter1.write0(oprot);
        }
        oprot.writeListEnd();
        oprot.writeFieldEnd();
      }
      if (myUnion != null) {
        oprot.writeFieldBegin(MY_UNION_FIELD_DESC);
        this.myUnion.write0(oprot);
        oprot.writeFieldEnd();
      }
      if (listUnionDFset != null) {
        oprot.writeFieldBegin(LIST_UNION_DFSET_FIELD_DESC);
        List<test.fixtures.complex_struct.MyUnion> _iter0 = listUnionDFset;
        oprot.writeListBegin(new TList(TType.STRUCT, _iter0.size()));
        for (test.fixtures.complex_struct.MyUnion _iter1 : _iter0) {
          _iter1.write0(oprot);
        }
        oprot.writeListEnd();
        oprot.writeFieldEnd();
      }
      if (mapNestlistStructDfSet != null) {
        oprot.writeFieldBegin(MAP_NESTLIST_STRUCT_DF_SET_FIELD_DESC);
        Map<Integer, List<test.fixtures.complex_struct.SimpleStruct>> _iter0 = mapNestlistStructDfSet;
        oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, _iter0.size()));
        for (Map.Entry<Integer, List<test.fixtures.complex_struct.SimpleStruct>> _iter1 : _iter0.entrySet()) {
          oprot.writeI32(_iter1.getKey());
          oprot.writeListBegin(new TList(TType.STRUCT, _iter1.getValue().size()));
        for (test.fixtures.complex_struct.SimpleStruct _iter2 : _iter1.getValue()) {
          _iter2.write0(oprot);
        }
        oprot.writeListEnd();
        }
        oprot.writeMapEnd();
        oprot.writeFieldEnd();
      }
      if (mapJavaTypeDFset != null) {
        oprot.writeFieldBegin(MAP_JAVA_TYPE_DFSET_FIELD_DESC);
        it.unimi.dsi.fastutil.longs.Long2ObjectArrayMap<String> _iter0 = mapJavaTypeDFset;
        oprot.writeMapBegin(new TMap(TType.I64, TType.STRING, _iter0.size()));
        for (Map.Entry<Long, String> _iter1 : _iter0.entrySet()) {
          oprot.writeI64(_iter1.getKey());
          oprot.writeString(_iter1.getValue());
        }
        oprot.writeMapEnd();
        oprot.writeFieldEnd();
      }
      if (emptyMap != null) {
        oprot.writeFieldBegin(EMPTY_MAP_FIELD_DESC);
        Map<Long, Integer> _iter0 = emptyMap;
        oprot.writeMapBegin(new TMap(TType.I64, TType.I32, _iter0.size()));
        for (Map.Entry<Long, Integer> _iter1 : _iter0.entrySet()) {
          oprot.writeI64(_iter1.getKey());
          oprot.writeI32(_iter1.getValue());
        }
        oprot.writeMapEnd();
        oprot.writeFieldEnd();
      }
      if (enumMapDFset != null) {
        oprot.writeFieldBegin(ENUM_MAP_DFSET_FIELD_DESC);
        Map<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> _iter0 = enumMapDFset;
        oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, _iter0.size()));
        for (Map.Entry<String, Map<Integer, test.fixtures.complex_struct.MyEnum>> _iter1 : _iter0.entrySet()) {
          oprot.writeString(_iter1.getKey());
          oprot.writeMapBegin(new TMap(TType.I32, TType.I32, _iter1.getValue().size()));
        for (Map.Entry<Integer, test.fixtures.complex_struct.MyEnum> _iter2 : _iter1.getValue().entrySet()) {
          oprot.writeI32(_iter2.getKey());
          oprot.writeI32(_iter2 == null ? 0 : com.facebook.thrift.util.EnumUtil.getValue(_iter2.getValue()));
        }
        oprot.writeMapEnd();
        }
        oprot.writeMapEnd();
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
    
    private static class _DefaultStructLazy {
        private static final DefaultStruct _DEFAULT = new DefaultStruct.Builder().build();
    }
    
    public static DefaultStruct defaultInstance() {
        return  _DefaultStructLazy._DEFAULT;
    }
}
