package y2;

import android.util.JsonReader;
import android.util.JsonToken;
import java.io.BufferedReader;
import java.io.IOException;

/* JADX INFO: loaded from: classes.dex */
public final class u {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final long f18971a;

    public u(long j8) {
        this.f18971a = j8;
    }

    public static u a(BufferedReader bufferedReader) throws IOException {
        JsonReader jsonReader = new JsonReader(bufferedReader);
        try {
            jsonReader.beginObject();
            while (jsonReader.hasNext()) {
                if (jsonReader.nextName().equals("nextRequestWaitMillis")) {
                    return jsonReader.peek() == JsonToken.STRING ? new u(Long.parseLong(jsonReader.nextString())) : new u(jsonReader.nextLong());
                }
                jsonReader.skipValue();
            }
            throw new IOException("Response is missing nextRequestWaitMillis field.");
        } finally {
            jsonReader.close();
        }
    }

    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj instanceof u) {
            if (this.f18971a == ((u) obj).f18971a) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        long j8 = this.f18971a;
        return ((int) (j8 ^ (j8 >>> 32))) ^ 1000003;
    }

    public final String toString() {
        return I1.a.q(new StringBuilder("LogResponse{nextRequestWaitMillis="), this.f18971a, "}");
    }
}
