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

package com.dropbox.djinni.test;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

public final class RecordWithDurationAndDerivings implements Comparable<RecordWithDurationAndDerivings> {


    /*package*/ final java.time.Duration mDt;

    public RecordWithDurationAndDerivings(
            @Nonnull java.time.Duration dt) {
        this.mDt = dt;
    }

    @Nonnull
    public java.time.Duration getDt() {
        return mDt;
    }

    @Override
    public boolean equals(@CheckForNull Object obj) {
        if (!(obj instanceof RecordWithDurationAndDerivings)) {
            return false;
        }
        RecordWithDurationAndDerivings other = (RecordWithDurationAndDerivings) obj;
        return this.mDt.equals(other.mDt);
    }

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

    @Override
    public String toString() {
        return "RecordWithDurationAndDerivings{" +
                "mDt=" + mDt +
        "}";
    }


    @Override
    public int compareTo(@Nonnull RecordWithDurationAndDerivings other)  {
        int tempResult;
        tempResult = this.mDt.compareTo(other.mDt);
        if (tempResult != 0) {
            return tempResult;
        }
        return 0;
    }
}
