package com.revenuecat.purchases.google.history;

import com.revenuecat.purchases.google.ErrorsKt;
import java.util.List;
import kotlin.jvm.internal.o;
import q.AbstractC2761L;

/* JADX INFO: loaded from: classes3.dex */
public final class PurchaseHistoryResult {
    private final String continuationToken;
    private final List<PurchaseHistoryRecord> records;
    private final int responseCode;

    public PurchaseHistoryResult(int i6, List<PurchaseHistoryRecord> records, String str) {
        o.h(records, "records");
        this.responseCode = i6;
        this.records = records;
        this.continuationToken = str;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ PurchaseHistoryResult copy$default(PurchaseHistoryResult purchaseHistoryResult, int i6, List list, String str, int i7, Object obj) {
        if ((i7 & 1) != 0) {
            i6 = purchaseHistoryResult.responseCode;
        }
        if ((i7 & 2) != 0) {
            list = purchaseHistoryResult.records;
        }
        if ((i7 & 4) != 0) {
            str = purchaseHistoryResult.continuationToken;
        }
        return purchaseHistoryResult.copy(i6, list, str);
    }

    public final int component1() {
        return this.responseCode;
    }

    public final List<PurchaseHistoryRecord> component2() {
        return this.records;
    }

    public final String component3() {
        return this.continuationToken;
    }

    public final PurchaseHistoryResult copy(int i6, List<PurchaseHistoryRecord> records, String str) {
        o.h(records, "records");
        return new PurchaseHistoryResult(i6, records, str);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof PurchaseHistoryResult)) {
            return false;
        }
        PurchaseHistoryResult purchaseHistoryResult = (PurchaseHistoryResult) obj;
        return this.responseCode == purchaseHistoryResult.responseCode && o.c(this.records, purchaseHistoryResult.records) && o.c(this.continuationToken, purchaseHistoryResult.continuationToken);
    }

    public final String getContinuationToken() {
        return this.continuationToken;
    }

    public final List<PurchaseHistoryRecord> getRecords() {
        return this.records;
    }

    public final int getResponseCode() {
        return this.responseCode;
    }

    public final String getResponseCodeString() {
        return ErrorsKt.getBillingResponseCodeName(this.responseCode);
    }

    public int hashCode() {
        int iC = AbstractC2761L.c(this.records, Integer.hashCode(this.responseCode) * 31, 31);
        String str = this.continuationToken;
        return iC + (str == null ? 0 : str.hashCode());
    }

    public final boolean isSuccess() {
        return this.responseCode == 0;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("PurchaseHistoryResult(responseCode=");
        sb.append(this.responseCode);
        sb.append(", records=");
        sb.append(this.records);
        sb.append(", continuationToken=");
        return Z0.o.r(sb, this.continuationToken, ')');
    }
}
