package com.ss.android.ugc.aweme.discover.model;

import X.878;
import X.AZ6;
import X.LeC;
import X.MXg;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.model.LogPbBean;
import com.ss.android.ugc.aweme.feed.model.NewFaceSticker;
import com.ss.android.ugc.aweme.music.model.Music;
import com.ss.android.ugc.aweme.profile.model.User;
import java.util.List;

public class SearchUser {
    @c(LIZ = "ad_item")
    public Aweme adItem;
    @c(LIZ = "items")
    public List<Aweme> awemeCards;
    @c(LIZ = "challenges")
    public List<Challenge> challengeList;
    @c(LIZ = "dynamic_patch")
    public LeC dynamicPatch;
    @c(LIZ = "effects")
    public List<NewFaceSticker> effectCards;
    public LogPbBean logPb;
    public GlobalDoodleConfig mGlobalDoodleConfig;
    @c(LIZ = "mix_cursor")
    public Long mixCursor;
    @c(LIZ = "mix_has_more")
    public Boolean mixHasMore;
    @c(LIZ = "musics")
    public List<Music> musicCards;
    @c(LIZ = "mix_list")
    public List<AZ6> playlists;
    @c(LIZ = "position")
    public List<Position> position;
    @c(LIZ = "product")
    public MXg productGroup;
    public int rank;
    @c(LIZ = "remark_position")
    public List<Position> remarkPosition;
    @c(LIZ = "type")
    public int type;
    @c(LIZ = "uniqid_position")
    public List<Position> uniqidPosition;
    @c(LIZ = "user_info")
    public User user;

    static {
        Covode.recordClassIndex(65226);
    }

    public boolean isDynamicCard() {
        if (this.dynamicPatch != null) {
            return true;
        }
        return false;
    }

    public int getType() {
        if (isDynamicCard()) {
            return 999;
        }
        return 0;
    }

    public boolean isAladdin() {
        if (cardType() != 0) {
            return true;
        }
        return false;
    }

    public boolean isStar() {
        if (this.awemeCards == null && this.musicCards == null) {
            return false;
        }
        return true;
    }

    public int cardType() {
        if (!878.LIZ(this.awemeCards)) {
            return 1;
        }
        if (!878.LIZ(this.musicCards)) {
            return 2;
        }
        if (!878.LIZ(this.effectCards)) {
            return 3;
        }
        return 0;
    }

    public boolean hasMedia() {
        MXg mXg;
        if (!878.LIZ(this.awemeCards) || !878.LIZ(this.musicCards) || !878.LIZ(this.effectCards) || ((mXg = this.productGroup) != null && !878.LIZ(mXg.LIZIZ))) {
            return true;
        }
        return false;
    }

    public int hashCode() {
        int i;
        LeC leC = this.dynamicPatch;
        int i2 = 0;
        if (leC != null) {
            i = leC.hashCode();
        } else {
            i = 0;
        }
        int i3 = (i + 0) * 6;
        User user2 = this.user;
        if (!(user2 == null || user2.getUid() == null)) {
            i2 = this.user.getUid().hashCode();
        }
        return i3 + i2;
    }

    public SearchUser setUser(User user2) {
        this.user = user2;
        return this;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof SearchUser)) {
            return false;
        }
        SearchUser searchUser = (SearchUser) obj;
        if (!equals(this.dynamicPatch, searchUser.dynamicPatch)) {
            return false;
        }
        User user2 = this.user;
        if (user2 == null || searchUser.user == null) {
            return equals(user2, searchUser.user);
        }
        return TextUtils.equals(user2.getUid(), searchUser.user.getUid());
    }

    public static boolean equals(Object obj, Object obj2) {
        if (obj == obj2) {
            return true;
        }
        if (obj == null || !obj.equals(obj2)) {
            return false;
        }
        return true;
    }
}
