/*
 * Decompiled with CFR 0.152.
 */
public final class fk {
    public final int a;
    public final String b;
    public final iv c;
    public final String d;
    public final String e;
    public final String f;

    public final boolean d() {
        return this.a == 2;
    }

    public final boolean c() {
        return this.a == 1;
    }

    public final boolean b() {
        return this.a == 0;
    }

    public final int hashCode() {
        int n = (31 + this.a) * 31;
        int n2 = this.b == null ? 0 : this.b.hashCode();
        n = (n + n2) * 31;
        n2 = this.c != null ? this.c.hashCode() : 0;
        n = (n + n2) * 31;
        n2 = this.d != null ? this.d.hashCode() : 0;
        n = (n + n2) * 31;
        n2 = this.e == null ? 0 : this.e.hashCode();
        n = (n + n2) * 31;
        n2 = this.f != null ? this.f.hashCode() : 0;
        return n + n2;
    }

    public final String toString() {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("Waypoint {");
        stringBuffer.append("source=" + this.a);
        if (this.b != null) {
            stringBuffer.append(", query=\"" + this.b + "\"");
        }
        if (this.c != null) {
            stringBuffer.append(", coordinates=" + this.c);
        }
        if (this.d != null) {
            stringBuffer.append(", fingerprint=\"" + this.d + "\"");
        }
        if (this.e != null) {
            stringBuffer.append(", name=\"" + this.e + "\"");
        }
        if (this.f != null) {
            stringBuffer.append(", streetViewPanoramaId=\"" + this.f + "\"");
        }
        stringBuffer.append("}");
        return stringBuffer.toString();
    }

    public final lk a() {
        lk lk2 = new lk(la.aD);
        lk2.h(1, this.a);
        if (!ed.b(this.e)) {
            lk2.b(2, this.e);
        }
        return lk2;
    }

    public final boolean equals(Object object) {
        block2: {
            block3: {
                if (this == object) break block2;
                if (!(object instanceof fk)) break block3;
                fk fk2 = (fk)object;
                if (this.a == fk2.a && fk.a((Object)this.b, fk2.b) && fk.a(this.c, (Object)fk2.c) && fk.a((Object)this.d, fk2.d) && fk.a((Object)this.e, fk2.e) && fk.a((Object)this.f, fk2.f)) break block2;
            }
            return false;
        }
        return true;
    }

    private static boolean a(Object object, Object object2) {
        if (object == null && object2 == null) {
            return true;
        }
        if (object != null) {
            return object.equals(object2);
        }
        return false;
    }

    private fk(int n, String string, iv iv2, String string2, String string3, String string4) {
        this.a = n;
        this.b = string;
        this.c = iv2;
        this.d = string2;
        this.e = string3;
        this.f = string4;
    }

    public static fk a(String string, iv iv2, String string2, String string3, String string4) {
        return new fk(3, string, iv2, string2, string3, string4);
    }

    public static fk a(fk fk2, String string, String string2) {
        return new fk(fk2.a, fk2.b, fk2.c, fk2.d, string, string2);
    }

    public static fk a(String string, iv iv2) {
        return new fk(5, string, iv2, null, null, null);
    }

    public static fk a(iv iv2) {
        return new fk(1, null, iv2, null, null, null);
    }

    public static fk b(iv iv2) {
        return new fk(2, null, iv2, null, null, null);
    }

    public static fk a(String string) {
        return new fk(0, string, null, null, null, null);
    }

    public static fk b(ar ar2) {
        String string = ar2.v();
        iv iv2 = ar2.a();
        String string2 = ar2.d();
        return new fk(4, string2, iv2, null, string, null);
    }

    public static fk b(lk lk2, lk lk3) {
        int n = lk2.d(1);
        String string = lk2.g(2);
        String string2 = lk3.g(1);
        String string3 = lk3.g(3);
        iv iv2 = gu.c(lk3.f(2));
        return new fk(n, string2, iv2, string3, string, null);
    }

    public static fk a(lk lk2, lk lk3) {
        return fk.a(lk2.g(1), gu.c(lk2.f(2)), lk2.g(3), null, lk3.g(15));
    }

    public static fk a(ar ar2) {
        return fk.a(ar2.d(), ar2.a(), null, ar2.v(), ar2.U());
    }
}

