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

package test.fixtures.basic_swift_bean;

import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.codec.ThriftField.Recursiveness;
import java.util.*;

import static com.google.common.base.MoreObjects.toStringHelper;

@SwiftGenerated
@ThriftStruct("LegacyStruct")
public final class LegacyStruct {
    @ThriftConstructor
    public LegacyStruct(
        @ThriftField(value=1, name="normal", requiredness=Requiredness.NONE) final int normal,
        @ThriftField(value=-1, name="bad", isLegacyId=true, requiredness=Requiredness.NONE) final int bad
    ) {
        this.normal = normal;
        this.bad = bad;
    }
    
    protected LegacyStruct() {
      this.normal = 0;
      this.bad = 0;
    }
    
    public static class Builder {
        private int normal;
    
        public Builder setNormal(int normal) {
            this.normal = normal;
            return this;
        }
        private int bad;
    
        public Builder setBad(int bad) {
            this.bad = bad;
            return this;
        }
    
        public Builder() { }
        public Builder(LegacyStruct other) {
            this.normal = other.normal;
            this.bad = other.bad;
        }
    
        public LegacyStruct build() {
            return new LegacyStruct (
                this.normal,
                this.bad
            );
        }
    }
    
    private final int normal;
    private final int bad;

    
    @ThriftField(value=1, name="normal", requiredness=Requiredness.NONE)
    public int getNormal() { return normal; }
        
    @ThriftField(value=-1, name="bad", isLegacyId=true, requiredness=Requiredness.NONE)
    public int getBad() { return bad; }
    
    @Override
    public String toString() {
        return toStringHelper(this)
            .add("normal", normal)
            .add("bad", bad)
            .toString();
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
    
        LegacyStruct other = (LegacyStruct)o;
    
        return
            Objects.equals(normal, other.normal) &&
            Objects.equals(bad, other.bad) &&
            true;
    }
    
    @Override
    public int hashCode() {
        return Arrays.deepHashCode(new Object[] {
            normal,
            bad
        });
    }
    
}

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

package test.fixtures.basic_swift_bean;

import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.codec.ThriftField.Recursiveness;
import java.util.*;

import static com.google.common.base.MoreObjects.toStringHelper;

@SwiftGenerated
@ThriftStruct("LegacyStruct")
public final class LegacyStruct {
    @ThriftConstructor
    public LegacyStruct() {}

    private int normal;
    private int bad;

    
    @ThriftField(value=1, name="normal", requiredness=Requiredness.NONE)
    public int getNormal() { return normal; }
    
    @ThriftField
    public LegacyStruct setNormal(int normal) {
        this.normal = normal;
        return this;
    }
        
    @ThriftField(value=-1, name="bad", isLegacyId=true, requiredness=Requiredness.NONE)
    public int getBad() { return bad; }
    
    @ThriftField
    public LegacyStruct setBad(int bad) {
        this.bad = bad;
        return this;
    }
    
    @Override
    public String toString() {
        return toStringHelper(this)
            .add("normal", normal)
            .add("bad", bad)
            .toString();
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
    
        LegacyStruct other = (LegacyStruct)o;
    
        return
            Objects.equals(normal, other.normal) &&
            Objects.equals(bad, other.bad) &&
            true;
    }
    
    @Override
    public int hashCode() {
        return Arrays.deepHashCode(new Object[] {
            normal,
            bad
        });
    }
    
}

fix thrift compiler test issue