package ca.canadapost.core.data.model;

import com.google.firebase.messaging.Constants;
import kotlin.Metadata;
import kotlin.jvm.internal.k;
import kotlin.jvm.internal.t;

@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b6\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00012\u00020\u0002:\u0002\u0004\u0005B\u0007\b\u0004¢\u0006\u0002\u0010\u0003\u0082\u0001\u0002\u0006\u0007¨\u0006\b"}, d2 = {"Lca/canadapost/core/data/model/ResultWrapper;", "T", "", "()V", "Error", "Success", "Lca/canadapost/core/data/model/ResultWrapper$Error;", "Lca/canadapost/core/data/model/ResultWrapper$Success;", "core_data_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes.dex */
public abstract class ResultWrapper<T> {

    @Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0001\n\u0000\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u000f\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B-\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004\u0012\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\n¢\u0006\u0002\u0010\u000bJ\u000b\u0010\u0014\u001a\u0004\u0018\u00010\u0004HÆ\u0003J\u000b\u0010\u0015\u001a\u0004\u0018\u00010\u0006HÆ\u0003J\t\u0010\u0016\u001a\u00020\bHÆ\u0003J\u000b\u0010\u0017\u001a\u0004\u0018\u00010\nHÆ\u0003J7\u0010\u0018\u001a\u00020\u00002\n\b\u0002\u0010\u0003\u001a\u0004\u0018\u00010\u00042\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\nHÆ\u0001J\u0013\u0010\u0019\u001a\u00020\u001a2\b\u0010\u001b\u001a\u0004\u0018\u00010\nHÖ\u0003J\t\u0010\u001c\u001a\u00020\u001dHÖ\u0001J\t\u0010\u001e\u001a\u00020\u0006HÖ\u0001R\u0013\u0010\t\u001a\u0004\u0018\u00010\n¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0013\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0013¨\u0006\u001f"}, d2 = {"Lca/canadapost/core/data/model/ResultWrapper$Error;", "Lca/canadapost/core/data/model/ResultWrapper;", "", "exception", "", "message", "", Constants.IPC_BUNDLE_KEY_SEND_ERROR, "Lca/canadapost/core/data/model/RepositoryError;", "additionalInfo", "", "(Ljava/lang/Throwable;Ljava/lang/String;Lca/canadapost/core/data/model/RepositoryError;Ljava/lang/Object;)V", "getAdditionalInfo", "()Ljava/lang/Object;", "getError", "()Lca/canadapost/core/data/model/RepositoryError;", "getException", "()Ljava/lang/Throwable;", "getMessage", "()Ljava/lang/String;", "component1", "component2", "component3", "component4", "copy", "equals", "", "other", "hashCode", "", "toString", "core_data_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    /* loaded from: classes.dex */
    public static final /* data */ class Error extends ResultWrapper {
        private final Object additionalInfo;
        private final RepositoryError error;
        private final Throwable exception;
        private final String message;

        public /* synthetic */ Error(Throwable th2, String str, RepositoryError repositoryError, Object obj, int i10, k kVar) {
            this(th2, str, repositoryError, (i10 & 8) != 0 ? null : obj);
        }

        public static /* synthetic */ Error copy$default(Error error, Throwable th2, String str, RepositoryError repositoryError, Object obj, int i10, Object obj2) {
            if ((i10 & 1) != 0) {
                th2 = error.exception;
            }
            if ((i10 & 2) != 0) {
                str = error.message;
            }
            if ((i10 & 4) != 0) {
                repositoryError = error.error;
            }
            if ((i10 & 8) != 0) {
                obj = error.additionalInfo;
            }
            return error.copy(th2, str, repositoryError, obj);
        }

        /* renamed from: component1, reason: from getter */
        public final Throwable getException() {
            return this.exception;
        }

        /* renamed from: component2, reason: from getter */
        public final String getMessage() {
            return this.message;
        }

        /* renamed from: component3, reason: from getter */
        public final RepositoryError getError() {
            return this.error;
        }

        /* renamed from: component4, reason: from getter */
        public final Object getAdditionalInfo() {
            return this.additionalInfo;
        }

        public final Error copy(Throwable exception, String message, RepositoryError error, Object additionalInfo) {
            t.g(error, "error");
            return new Error(exception, message, error, additionalInfo);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Error)) {
                return false;
            }
            Error error = (Error) other;
            return t.b(this.exception, error.exception) && t.b(this.message, error.message) && this.error == error.error && t.b(this.additionalInfo, error.additionalInfo);
        }

        public final Object getAdditionalInfo() {
            return this.additionalInfo;
        }

        public final RepositoryError getError() {
            return this.error;
        }

        public final Throwable getException() {
            return this.exception;
        }

        public final String getMessage() {
            return this.message;
        }

        public int hashCode() {
            Throwable th2 = this.exception;
            int hashCode = (th2 == null ? 0 : th2.hashCode()) * 31;
            String str = this.message;
            int hashCode2 = (((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.error.hashCode()) * 31;
            Object obj = this.additionalInfo;
            return hashCode2 + (obj != null ? obj.hashCode() : 0);
        }

        public String toString() {
            return "Error(exception=" + this.exception + ", message=" + this.message + ", error=" + this.error + ", additionalInfo=" + this.additionalInfo + ")";
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public Error(Throwable th2, String str, RepositoryError error, Object obj) {
            super(null);
            t.g(error, "error");
            this.exception = th2;
            this.message = str;
            this.error = error;
            this.additionalInfo = obj;
        }
    }

    @Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u0000*\u0006\b\u0001\u0010\u0001 \u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00028\u0001¢\u0006\u0002\u0010\u0004J\u000e\u0010\b\u001a\u00028\u0001HÆ\u0003¢\u0006\u0002\u0010\u0006J\u001e\u0010\t\u001a\b\u0012\u0004\u0012\u00028\u00010\u00002\b\b\u0002\u0010\u0003\u001a\u00028\u0001HÆ\u0001¢\u0006\u0002\u0010\nJ\u0013\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u000eHÖ\u0003J\t\u0010\u000f\u001a\u00020\u0010HÖ\u0001J\t\u0010\u0011\u001a\u00020\u0012HÖ\u0001R\u0013\u0010\u0003\u001a\u00028\u0001¢\u0006\n\n\u0002\u0010\u0007\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0013"}, d2 = {"Lca/canadapost/core/data/model/ResultWrapper$Success;", "T", "Lca/canadapost/core/data/model/ResultWrapper;", Constants.ScionAnalytics.MessageType.DATA_MESSAGE, "(Ljava/lang/Object;)V", "getData", "()Ljava/lang/Object;", "Ljava/lang/Object;", "component1", "copy", "(Ljava/lang/Object;)Lca/canadapost/core/data/model/ResultWrapper$Success;", "equals", "", "other", "", "hashCode", "", "toString", "", "core_data_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    /* loaded from: classes.dex */
    public static final /* data */ class Success<T> extends ResultWrapper<T> {
        private final T data;

        public Success(T t10) {
            super(null);
            this.data = t10;
        }

        /* JADX WARN: Multi-variable type inference failed */
        public static /* synthetic */ Success copy$default(Success success, Object obj, int i10, Object obj2) {
            if ((i10 & 1) != 0) {
                obj = success.data;
            }
            return success.copy(obj);
        }

        public final T component1() {
            return this.data;
        }

        public final Success<T> copy(T data) {
            return new Success<>(data);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            return (other instanceof Success) && t.b(this.data, ((Success) other).data);
        }

        public final T getData() {
            return this.data;
        }

        public int hashCode() {
            T t10 = this.data;
            if (t10 == null) {
                return 0;
            }
            return t10.hashCode();
        }

        public String toString() {
            return "Success(data=" + this.data + ")";
        }
    }

    private ResultWrapper() {
    }

    public /* synthetic */ ResultWrapper(k kVar) {
        this();
    }
}
