// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from yaml-test.djinni

package com.dropbox.djinni.test;

/** This file tests YAML dumped by Djinni can be parsed back in */
public final class ExternRecordWithDerivings implements Comparable<ExternRecordWithDerivings> {


    /*package*/ final com.dropbox.djinni.test.RecordWithDerivings mMember;

    /*package*/ final com.dropbox.djinni.test.Color mE;

    public ExternRecordWithDerivings(
            com.dropbox.djinni.test.RecordWithDerivings member,
            com.dropbox.djinni.test.Color e) {
        this.mMember = member;
        this.mE = e;
    }

    public com.dropbox.djinni.test.RecordWithDerivings getMember() {
        return mMember;
    }

    public com.dropbox.djinni.test.Color getE() {
        return mE;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof ExternRecordWithDerivings)) {
            return false;
        }
        ExternRecordWithDerivings other = (ExternRecordWithDerivings) obj;
        return this.mMember.equals(other.mMember) &&
                this.mE == other.mE;
    }

    @Override
    public int hashCode() {
        // Pick an arbitrary non-zero starting value
        int hashCode = 17;
        hashCode = hashCode * 31 + (mMember.hashCode());
        hashCode = hashCode * 31 + mE.hashCode();
        return hashCode;
    }

    @Override
    public String toString() {
        return "ExternRecordWithDerivings{" +
                "mMember=" + mMember +
                "," + "mE=" + mE +
        "}";
    }


    @Override
    public int compareTo(ExternRecordWithDerivings other)  {
        int tempResult;
        tempResult = this.mMember.compareTo(other.mMember);
        if (tempResult != 0) {
            return tempResult;
        }
        tempResult = this.mE.compareTo(other.mE);if (tempResult != 0) {
            return tempResult;
        }
        return 0;
    }
}
