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

import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.feed.model.LogPbBean;
import com.ss.android.ugc.aweme.music.model.Music;
import java.io.Serializable;
import java.util.List;
import kotlin.h.b.n;

public class SearchMusic implements Serializable {
    @c(LIZ = "card_type")
    public int cardType = 1;
    public boolean hasMobShow;
    @c(LIZ = "has_more")
    public boolean hasMore;
    public LogPbBean logPb;
    @c(LIZ = "music")
    public Music music;
    @c(LIZ = "musics")
    public List<? extends Music> musicList;

    static {
        Covode.recordClassIndex(65206);
    }

    public final int getCardType() {
        return this.cardType;
    }

    public final boolean getHasMobShow() {
        return this.hasMobShow;
    }

    public final boolean getHasMore() {
        return this.hasMore;
    }

    public final LogPbBean getLogPb() {
        return this.logPb;
    }

    public final Music getMusic() {
        return this.music;
    }

    public final List<Music> getMusicList() {
        return this.musicList;
    }

    public int hashCode() {
        if (this.cardType != CardType.TYPE_CLUSTER.getValue()) {
            Music music2 = this.music;
            if (music2 != null) {
                return music2.hashCode();
            }
            return 0;
        }
        List<? extends Music> list = this.musicList;
        if (list == null || list.isEmpty()) {
            return 0;
        }
        List<? extends Music> list2 = this.musicList;
        if (list2 == null) {
            n.LIZIZ();
        }
        return list2.get(0).hashCode();
    }

    public final void setCardType(int i) {
        this.cardType = i;
    }

    public final void setHasMobShow(boolean z) {
        this.hasMobShow = z;
    }

    public final void setHasMore(boolean z) {
        this.hasMore = z;
    }

    public final void setLogPb(LogPbBean logPbBean) {
        this.logPb = logPbBean;
    }

    public final void setMusic(Music music2) {
        this.music = music2;
    }

    public final void setMusicList(List<? extends Music> list) {
        this.musicList = list;
    }

    public final void setRequestId(String str) {
        Music music2 = this.music;
        if (music2 != null) {
            music2.setRequestId(str);
        }
        List<? extends Music> list = this.musicList;
        if (list != null) {
            for (Music requestId : list) {
                requestId.setRequestId(str);
            }
        }
    }

    public boolean equals(Object obj) {
        boolean z;
        boolean z2;
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof SearchMusic)) {
            return false;
        }
        int i = this.cardType;
        SearchMusic searchMusic = (SearchMusic) obj;
        if (i != searchMusic.cardType) {
            return false;
        }
        if (i != CardType.TYPE_CLUSTER.getValue() && this.cardType != CardType.TYPE_MUSICIAN.getValue()) {
            return n.LIZ(this.music, searchMusic.music);
        }
        List<? extends Music> list = this.musicList;
        if (list == null || list.isEmpty()) {
            z = true;
        } else {
            z = false;
        }
        List<? extends Music> list2 = searchMusic.musicList;
        if (list2 == null || list2.isEmpty()) {
            z2 = true;
        } else {
            z2 = false;
        }
        if (z != z2) {
            return false;
        }
        if (!z) {
            List<? extends Music> list3 = this.musicList;
            if (list3 == null) {
                n.LIZIZ();
            }
            int size = list3.size();
            List<? extends Music> list4 = searchMusic.musicList;
            if (list4 == null) {
                n.LIZIZ();
            }
            if (size != list4.size()) {
                return false;
            }
            List<? extends Music> list5 = this.musicList;
            if (list5 == null) {
                n.LIZIZ();
            }
            int size2 = list5.size() - 1;
            if (size2 >= 0) {
                int i2 = 0;
                while (true) {
                    List<? extends Music> list6 = this.musicList;
                    if (list6 == null) {
                        n.LIZIZ();
                    }
                    Music music2 = list6.get(i2);
                    List<? extends Music> list7 = searchMusic.musicList;
                    if (list7 == null) {
                        n.LIZIZ();
                    }
                    if (music2.equals(list7.get(i2))) {
                        if (i2 == size2) {
                            break;
                        }
                        i2++;
                    } else {
                        return false;
                    }
                }
            }
        }
        return true;
    }
}
