package com.strmr.ps.data.remote.model.torbox;

import androidx.media3.container.NalUnitUtil;
import com.google.gson.annotations.SerializedName;
import com.strmr.ps.data.repository.ScreenConfigRepository;
import defpackage.cr4;
import defpackage.fi7;
import defpackage.kp6;
import defpackage.pq6;
import defpackage.vw2;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0015\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0086\b\u0018\u00002\u00020\u0001B=\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\b\u001a\u0004\u0018\u00010\t¢\u0006\u0004\b\n\u0010\u000bJ\u0006\u0010\u0015\u001a\u00020\tJ\t\u0010\u0016\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0003HÆ\u0003J\u000b\u0010\u0019\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u000b\u0010\u001a\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0010\u0010\u001b\u001a\u0004\u0018\u00010\tHÆ\u0003¢\u0006\u0002\u0010\u0013JP\u0010\u001c\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00032\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\tHÆ\u0001¢\u0006\u0002\u0010\u001dJ\u0013\u0010\u001e\u001a\u00020\u001f2\b\u0010 \u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010!\u001a\u00020\tHÖ\u0001J\t\u0010\"\u001a\u00020\u0003HÖ\u0001R\u0016\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0016\u0010\u0004\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\rR\u0016\u0010\u0005\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\rR\u0018\u0010\u0006\u001a\u0004\u0018\u00010\u00038\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\rR\u0018\u0010\u0007\u001a\u0004\u0018\u00010\u00038\u0006X\u0087\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\rR\u001a\u0010\b\u001a\u0004\u0018\u00010\t8\u0006X\u0087\u0004¢\u0006\n\n\u0002\u0010\u0014\u001a\u0004\b\u0012\u0010\u0013¨\u0006#"}, d2 = {"Lcom/strmr/ps/data/remote/model/torbox/TorBoxDeviceCodeData;", "", "deviceCode", "", "userCode", "verificationUrl", "friendlyVerificationUrl", "expiresAt", "interval", "", "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V", "getDeviceCode", "()Ljava/lang/String;", "getUserCode", "getVerificationUrl", "getFriendlyVerificationUrl", "getExpiresAt", "getInterval", "()Ljava/lang/Integer;", "Ljava/lang/Integer;", "getExpiresInSeconds", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lcom/strmr/ps/data/remote/model/torbox/TorBoxDeviceCodeData;", "equals", "", "other", "hashCode", "toString", "app_sideloadRelease"}, k = 1, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public final /* data */ class TorBoxDeviceCodeData {

    @SerializedName("device_code")
    @kp6
    private final String deviceCode;

    @SerializedName("expires_at")
    @pq6
    private final String expiresAt;

    @SerializedName("friendly_verification_url")
    @pq6
    private final String friendlyVerificationUrl;

    @SerializedName("interval")
    @pq6
    private final Integer interval;

    @SerializedName("code")
    @kp6
    private final String userCode;

    @SerializedName("verification_url")
    @kp6
    private final String verificationUrl;

    public TorBoxDeviceCodeData(@kp6 String str, @kp6 String str2, @kp6 String str3, @pq6 String str4, @pq6 String str5, @pq6 Integer num) {
        cr4.g(str, "deviceCode");
        cr4.g(str2, "userCode");
        cr4.g(str3, "verificationUrl");
        this.deviceCode = str;
        this.userCode = str2;
        this.verificationUrl = str3;
        this.friendlyVerificationUrl = str4;
        this.expiresAt = str5;
        this.interval = num;
    }

    public static /* synthetic */ TorBoxDeviceCodeData copy$default(TorBoxDeviceCodeData torBoxDeviceCodeData, String str, String str2, String str3, String str4, String str5, Integer num, int i, Object obj) {
        if ((i & 1) != 0) {
            str = torBoxDeviceCodeData.deviceCode;
        }
        if ((i & 2) != 0) {
            str2 = torBoxDeviceCodeData.userCode;
        }
        if ((i & 4) != 0) {
            str3 = torBoxDeviceCodeData.verificationUrl;
        }
        if ((i & 8) != 0) {
            str4 = torBoxDeviceCodeData.friendlyVerificationUrl;
        }
        if ((i & 16) != 0) {
            str5 = torBoxDeviceCodeData.expiresAt;
        }
        if ((i & 32) != 0) {
            num = torBoxDeviceCodeData.interval;
        }
        String str6 = str5;
        Integer num2 = num;
        return torBoxDeviceCodeData.copy(str, str2, str3, str4, str6, num2);
    }

    @kp6
    /* JADX INFO: renamed from: component1, reason: from getter */
    public final String getDeviceCode() {
        return this.deviceCode;
    }

    @kp6
    /* JADX INFO: renamed from: component2, reason: from getter */
    public final String getUserCode() {
        return this.userCode;
    }

    @kp6
    /* JADX INFO: renamed from: component3, reason: from getter */
    public final String getVerificationUrl() {
        return this.verificationUrl;
    }

    @pq6
    /* JADX INFO: renamed from: component4, reason: from getter */
    public final String getFriendlyVerificationUrl() {
        return this.friendlyVerificationUrl;
    }

    @pq6
    /* JADX INFO: renamed from: component5, reason: from getter */
    public final String getExpiresAt() {
        return this.expiresAt;
    }

    @pq6
    /* JADX INFO: renamed from: component6, reason: from getter */
    public final Integer getInterval() {
        return this.interval;
    }

    @kp6
    public final TorBoxDeviceCodeData copy(@kp6 String deviceCode, @kp6 String userCode, @kp6 String verificationUrl, @pq6 String friendlyVerificationUrl, @pq6 String expiresAt, @pq6 Integer interval) {
        cr4.g(deviceCode, "deviceCode");
        cr4.g(userCode, "userCode");
        cr4.g(verificationUrl, "verificationUrl");
        return new TorBoxDeviceCodeData(deviceCode, userCode, verificationUrl, friendlyVerificationUrl, expiresAt, interval);
    }

    public boolean equals(@pq6 Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof TorBoxDeviceCodeData)) {
            return false;
        }
        TorBoxDeviceCodeData torBoxDeviceCodeData = (TorBoxDeviceCodeData) other;
        return cr4.b(this.deviceCode, torBoxDeviceCodeData.deviceCode) && cr4.b(this.userCode, torBoxDeviceCodeData.userCode) && cr4.b(this.verificationUrl, torBoxDeviceCodeData.verificationUrl) && cr4.b(this.friendlyVerificationUrl, torBoxDeviceCodeData.friendlyVerificationUrl) && cr4.b(this.expiresAt, torBoxDeviceCodeData.expiresAt) && cr4.b(this.interval, torBoxDeviceCodeData.interval);
    }

    @kp6
    public final String getDeviceCode() {
        return this.deviceCode;
    }

    @pq6
    public final String getExpiresAt() {
        return this.expiresAt;
    }

    public final int getExpiresInSeconds() {
        try {
            String str = this.expiresAt;
            if (str == null) {
                return ScreenConfigRepository.MAX_TOTAL_ROWS;
            }
            Instant instant = Instant.parse(str);
            int iBetween = (int) ChronoUnit.SECONDS.between(Instant.now(), instant);
            if (iBetween < 0) {
                return 0;
            }
            return iBetween;
        } catch (Exception unused) {
            return ScreenConfigRepository.MAX_TOTAL_ROWS;
        }
    }

    @pq6
    public final String getFriendlyVerificationUrl() {
        return this.friendlyVerificationUrl;
    }

    @pq6
    public final Integer getInterval() {
        return this.interval;
    }

    @kp6
    public final String getUserCode() {
        return this.userCode;
    }

    @kp6
    public final String getVerificationUrl() {
        return this.verificationUrl;
    }

    public int hashCode() {
        int iB = vw2.b(vw2.b(this.deviceCode.hashCode() * 31, 31, this.userCode), 31, this.verificationUrl);
        String str = this.friendlyVerificationUrl;
        int iHashCode = (iB + (str == null ? 0 : str.hashCode())) * 31;
        String str2 = this.expiresAt;
        int iHashCode2 = (iHashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
        Integer num = this.interval;
        return iHashCode2 + (num != null ? num.hashCode() : 0);
    }

    @kp6
    public String toString() {
        String str = this.deviceCode;
        String str2 = this.userCode;
        String str3 = this.verificationUrl;
        String str4 = this.friendlyVerificationUrl;
        String str5 = this.expiresAt;
        Integer num = this.interval;
        StringBuilder sbM = fi7.m("TorBoxDeviceCodeData(deviceCode=", str, ", userCode=", str2, ", verificationUrl=");
        vw2.aa(sbM, str3, ", friendlyVerificationUrl=", str4, ", expiresAt=");
        sbM.append(str5);
        sbM.append(", interval=");
        sbM.append(num);
        sbM.append(")");
        return sbM.toString();
    }
}
