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

import X.0HH;
import X.C5533OZc;
import X.H79;
import X.LeC;
import X.OTY;
import android.net.Uri;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.base.model.UrlModel;
import com.ss.android.ugc.aweme.discover.model.Position;
import com.ss.android.ugc.aweme.feed.model.LogPbBean;
import com.ss.android.ugc.aweme.music.model.MatchedPGCSoundInfo;
import com.ss.android.ugc.aweme.music.model.MatchedSoundInfo;
import com.ss.android.ugc.aweme.music.model.Music;
import com.ss.android.ugc.aweme.music.model.MusicBeat;
import com.ss.android.ugc.aweme.music.model.MusicHighPrecisionDuration;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class MusicModel implements OTY, Serializable, Cloneable {
    public static final long serialVersionUID = -8201137807648519242L;
    public String album;
    public String allRate;
    public int auditionDuration;
    public String awemeId;
    public MusicBeat beatInfo;
    public int billboardRank;
    public String bindChallengeId;
    public CardType cardType = CardType.AWESearchMusicCardSinger;
    public String categoryID;
    public int challengeUserCount;
    public CollectionType collectionType;
    public int comeFromForMod;
    public int commercialRightType;
    public int dataType;
    public boolean dmvAutoShow;
    public int duration;
    public MusicHighPrecisionDuration durationHighPrecision;
    public String enterPosition = "";
    public String extra;
    public FromSection fromSection = FromSection.OTHER;
    public long id;
    public boolean isArtist;
    public boolean isChallengeMusic;
    public boolean isCommerceMusic;
    public boolean isMvThemeMusic;
    public boolean isOriginal;
    public boolean isOriginalSound;
    public boolean isPgc;
    public long localMusicDuration;
    public int localMusicId;
    public String localPath;
    public LogPbBean logPb;
    public int lrcType;
    public String lrcUrl;
    public String lyricShort;
    public List<Position> lyricShortPosition;
    public LeC mDynamicPatch;
    public C5533OZc mExtraParamFromPretreatment;
    public MatchedSoundInfo mMatchedSongInfo;
    public int mSoundsListType;
    public MatchedPGCSoundInfo matchedPGCSoundInfo;
    public Music music;
    public int musicBeginTime;
    public String musicEditFrom;
    public String musicEffectsUrl;
    public int musicEndFromCut;
    public int musicEndTime;
    public String musicId;
    public int musicStartFromCut;
    public int musicStatus;
    public MusicType musicType;
    public MusicWaveBean musicWaveBean;
    public boolean muteShare;
    public String name;
    public boolean needSetCookie;
    public String offlineDesc;
    public String picBig;
    public String picHuge;
    public String picPremium;
    public String picSmall;
    public UrlModel playUrl;
    public boolean preventDownload;
    public float previewStartTime;
    public UrlModel reuseAudioPlayUrl;
    public String searchId;
    public String searchKeyWords;
    public int shootDuration;
    public boolean showDetail;
    public String singer;
    public String songId;
    public int sourcePlatform;
    public UrlModel strongBeatUrl;
    public int userCount;
    public int videoDuration;

    public enum CardType {
        AWESearchMusicCardNone,
        AWESearchMusicCardOrdinary,
        AWESearchMusicCardDuplicated,
        AWESearchMusicCardSinger,
        AWESearchMusicCardMusicWithVideo
    }

    public enum MusicType {
        LOCAL,
        ONLINE,
        REUSE_AUDIO
    }

    static {
        Covode.recordClassIndex(111022);
    }

    public String getAlbum() {
        return this.album;
    }

    public String getAllRate() {
        return this.allRate;
    }

    public MusicBeat getBeatInfo() {
        return this.beatInfo;
    }

    public int getBillboardRank() {
        return this.billboardRank;
    }

    public String getBindChallengeId() {
        return this.bindChallengeId;
    }

    public CardType getCardType() {
        return this.cardType;
    }

    public String getCategoryID() {
        return this.categoryID;
    }

    public int getChallengeUserCount() {
        return this.challengeUserCount;
    }

    public int getComeFromForMod() {
        return this.comeFromForMod;
    }

    public int getCommercialRightType() {
        return this.commercialRightType;
    }

    public int getDataType() {
        return this.dataType;
    }

    public boolean getDmvAutoShow() {
        return this.dmvAutoShow;
    }

    public int getDuration() {
        return this.duration;
    }

    public MusicHighPrecisionDuration getDurationHighPrecision() {
        return this.durationHighPrecision;
    }

    public LeC getDynamicPatch() {
        return this.mDynamicPatch;
    }

    public String getEditFrom() {
        return this.musicEditFrom;
    }

    public String getEnterPosition() {
        return this.enterPosition;
    }

    public String getExtra() {
        return this.extra;
    }

    public FromSection getFromSection() {
        return this.fromSection;
    }

    public long getId() {
        return this.id;
    }

    public long getLocalMusicDuration() {
        return this.localMusicDuration;
    }

    public int getLocalMusicId() {
        return this.localMusicId;
    }

    public String getLocalPath() {
        return this.localPath;
    }

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

    public int getLrcType() {
        return this.lrcType;
    }

    public String getLrcUrl() {
        return this.lrcUrl;
    }

    public String getLyricShort() {
        return this.lyricShort;
    }

    public List<Position> getLyricShortPosition() {
        return this.lyricShortPosition;
    }

    public MatchedPGCSoundInfo getMatchedPGCSoundInfo() {
        return this.matchedPGCSoundInfo;
    }

    public MatchedSoundInfo getMatchedSongInfo() {
        return this.mMatchedSongInfo;
    }

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

    public int getMusicBeginTime() {
        return this.musicBeginTime;
    }

    public String getMusicEffects() {
        return this.musicEffectsUrl;
    }

    public int getMusicEndFromCut() {
        return this.musicEndFromCut;
    }

    public int getMusicEndTime() {
        return this.musicEndTime;
    }

    public String getMusicId() {
        return this.musicId;
    }

    public int getMusicStartFromCut() {
        return this.musicStartFromCut;
    }

    public int getMusicStatus() {
        return this.musicStatus;
    }

    public MusicType getMusicType() {
        return this.musicType;
    }

    public MusicWaveBean getMusicWaveBean() {
        return this.musicWaveBean;
    }

    public String getName() {
        return this.name;
    }

    public String getOfflineDesc() {
        return this.offlineDesc;
    }

    public String getPicBig() {
        return this.picBig;
    }

    public String getPicHuge() {
        return this.picHuge;
    }

    public String getPicPremium() {
        return this.picPremium;
    }

    public String getPicSmall() {
        return this.picSmall;
    }

    public float getPreviewStartTime() {
        return this.previewStartTime;
    }

    public UrlModel getReuseAudioPlayUrl() {
        return this.reuseAudioPlayUrl;
    }

    public String getSearchId() {
        return this.searchId;
    }

    public String getSearchKeyWords() {
        return this.searchKeyWords;
    }

    public String getSinger() {
        return this.singer;
    }

    public String getSongId() {
        return this.songId;
    }

    public int getSoundsListType() {
        return this.mSoundsListType;
    }

    public int getSourcePlatform() {
        return this.sourcePlatform;
    }

    public UrlModel getStrongBeatUrl() {
        return this.strongBeatUrl;
    }

    public UrlModel getUrl() {
        return this.playUrl;
    }

    public int getUserCount() {
        return this.userCount;
    }

    public int getVideoDuration() {
        return this.videoDuration;
    }

    public boolean isArtist() {
        return this.isArtist;
    }

    public boolean isChallengeMusic() {
        return this.isChallengeMusic;
    }

    public boolean isCommerceMusic() {
        return this.isCommerceMusic;
    }

    public boolean isMuteShare() {
        return this.muteShare;
    }

    public boolean isMvThemeMusic() {
        return this.isMvThemeMusic;
    }

    public boolean isNeedSetCookie() {
        return this.needSetCookie;
    }

    public boolean isOriginal() {
        return this.isOriginal;
    }

    public boolean isOriginalSound() {
        return this.isOriginalSound;
    }

    public boolean isPgc() {
        return this.isPgc;
    }

    public boolean isPreventDownload() {
        return this.preventDownload;
    }

    public Integer getAuditionDuration() {
        return Integer.valueOf(this.auditionDuration);
    }

    public String getAwemeId() {
        String str = this.awemeId;
        if (str == null) {
            return "";
        }
        return str;
    }

    public Integer getShootDuration() {
        return Integer.valueOf(this.shootDuration);
    }

    public int getTrimmedMusicDuration() {
        return this.musicEndTime - this.musicBeginTime;
    }

    public MusicModel clone() {
        try {
            return (MusicModel) super.clone();
        } catch (CloneNotSupportedException e) {
            0HH.LIZ(e);
            return null;
        }
    }

    public C5533OZc getExtraParamFromPretreatment() {
        if (this.mExtraParamFromPretreatment == null) {
            this.mExtraParamFromPretreatment = new C5533OZc();
        }
        return this.mExtraParamFromPretreatment;
    }

    public int getRealAuditionDuration() {
        int i = this.auditionDuration;
        if (i > 0) {
            return i;
        }
        return getPresenterDuration();
    }

    public CollectionType getCollectionType() {
        Music music2 = this.music;
        if (music2 == null) {
            return this.collectionType;
        }
        if (music2.getCollectStatus() != 1) {
            return CollectionType.NOT_COLLECTED;
        }
        return CollectionType.COLLECTED;
    }

    public int getPresenterDuration() {
        if (this.musicType == MusicType.LOCAL) {
            return (int) this.localMusicDuration;
        }
        int i = this.shootDuration;
        if (i > 0) {
            return i;
        }
        return this.duration;
    }

    public String getUri() {
        UrlModel urlModel;
        if ((this.musicType != MusicType.REUSE_AUDIO || (urlModel = this.reuseAudioPlayUrl) == null) && (urlModel = this.playUrl) == null) {
            return "";
        }
        return urlModel.getUri();
    }

    public boolean isPlayUrlValid() {
        UrlModel urlModel;
        if (this.musicType != MusicType.REUSE_AUDIO || (urlModel = this.reuseAudioPlayUrl) == null) {
            urlModel = this.playUrl;
        }
        if (urlModel != null && !TextUtils.isEmpty(urlModel.getUri()) && !H79.LIZ(urlModel.getUrlList())) {
            return true;
        }
        return false;
    }

    public Music convertToMusic() {
        int i;
        Music music2 = new Music();
        music2.setMid(this.musicId);
        music2.setId(this.id);
        if (this.collectionType == CollectionType.COLLECTED) {
            i = 1;
        } else {
            i = 0;
        }
        music2.setCollectStatus(i);
        music2.setAlbum(this.album);
        music2.setAuthorName(this.singer);
        if (getMusic() != null) {
            music2.setChallenge(getMusic().getChallenge());
        }
        ArrayList arrayList = new ArrayList();
        arrayList.add(this.picBig);
        UrlModel urlModel = new UrlModel();
        urlModel.setUrlList(arrayList);
        urlModel.setUri(Uri.decode(this.picBig));
        music2.setCoverLarge(urlModel);
        ArrayList arrayList2 = new ArrayList();
        arrayList2.add(this.picPremium);
        UrlModel urlModel2 = new UrlModel();
        urlModel2.setUrlList(arrayList2);
        urlModel2.setUri(Uri.decode(this.picPremium));
        music2.setCoverMedium(urlModel2);
        ArrayList arrayList3 = new ArrayList();
        arrayList3.add(this.picSmall);
        UrlModel urlModel3 = new UrlModel();
        urlModel3.setUrlList(arrayList3);
        urlModel3.setUri(Uri.decode(this.picSmall));
        music2.setCoverThumb(urlModel3);
        music2.setDuration(this.duration);
        music2.setShootDuration(Integer.valueOf(this.shootDuration));
        music2.setAuditionDuration(Integer.valueOf(this.auditionDuration));
        music2.setDurationHighPrecision(this.durationHighPrecision);
        music2.setMusicName(this.name);
        music2.setUserCount(this.userCount);
        music2.setBillboardRank(this.billboardRank);
        music2.setCommercialMusic(this.isCommerceMusic);
        music2.setOriginalSound(this.isOriginalSound);
        if (this.musicType == MusicType.ONLINE) {
            music2.setPlayUrl(this.playUrl);
        } else if (this.musicType == MusicType.REUSE_AUDIO) {
            music2.setReuseAudioPlayUrl(this.reuseAudioPlayUrl);
        }
        music2.setOfflineDesc(this.offlineDesc);
        music2.setMusicStatus(this.musicStatus);
        music2.setStrongBeatUrl(this.strongBeatUrl);
        music2.setLrcType(this.lrcType);
        music2.setPreviewStartTime(this.previewStartTime);
        music2.setLrcUrl(this.lrcUrl);
        music2.setPreventDownload(isPreventDownload());
        music2.setLyricShort(this.lyricShort);
        music2.setLyricShortPosition(this.lyricShortPosition);
        music2.setNeedSetCookie(isNeedSetCookie());
        music2.setVideoDuration(this.videoDuration);
        music2.setPgc(this.isPgc);
        music2.setBeatInfo(this.beatInfo);
        music2.setSoundsListType(this.mSoundsListType);
        music2.setLocalMusicId(this.localMusicId);
        music2.setMuteShare(this.muteShare);
        return music2;
    }

    public void setAlbum(String str) {
        this.album = str;
    }

    public void setAllRate(String str) {
        this.allRate = str;
    }

    public void setArtist(boolean z) {
        this.isArtist = z;
    }

    public void setAwemeId(String str) {
        this.awemeId = str;
    }

    public void setBeatInfo(MusicBeat musicBeat) {
        this.beatInfo = musicBeat;
    }

    public void setBillboardRank(int i) {
        this.billboardRank = i;
    }

    public void setBindChallengeId(String str) {
        this.bindChallengeId = str;
    }

    public void setCardType(CardType cardType2) {
        this.cardType = cardType2;
    }

    public void setCategoryID(String str) {
        this.categoryID = str;
    }

    public void setChallengeMusic(boolean z) {
        this.isChallengeMusic = z;
    }

    public void setChallengeUserCount(int i) {
        this.challengeUserCount = i;
    }

    public void setComeFromForMod(int i) {
        this.comeFromForMod = i;
    }

    public void setCommerceMusic(boolean z) {
        this.isCommerceMusic = z;
    }

    public void setCommercialRightType(int i) {
        this.commercialRightType = i;
    }

    public void setDataType(int i) {
        this.dataType = i;
    }

    public void setDmvAutoShow(boolean z) {
        this.dmvAutoShow = z;
    }

    public void setDuration(int i) {
        this.duration = i;
    }

    public void setDurationHighPrecision(MusicHighPrecisionDuration musicHighPrecisionDuration) {
        this.durationHighPrecision = musicHighPrecisionDuration;
    }

    public void setDynamicPatch(LeC leC) {
        this.mDynamicPatch = leC;
    }

    public void setEditFrom(String str) {
        this.musicEditFrom = str;
    }

    public void setEnterPosition(String str) {
        this.enterPosition = str;
    }

    public void setExtra(String str) {
        this.extra = str;
    }

    public void setExtraParamFromPretreatment(C5533OZc oZc) {
        this.mExtraParamFromPretreatment = oZc;
    }

    public void setFromSection(FromSection fromSection2) {
        this.fromSection = fromSection2;
    }

    public void setId(long j) {
        this.id = j;
    }

    public void setLocalMusicDuration(long j) {
        this.localMusicDuration = j;
    }

    public void setLocalMusicId(int i) {
        this.localMusicId = i;
    }

    public void setLocalPath(String str) {
        this.localPath = str;
    }

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

    public void setLrcType(int i) {
        this.lrcType = i;
    }

    public void setLrcUrl(String str) {
        this.lrcUrl = str;
    }

    public void setLyricShort(String str) {
        this.lyricShort = str;
    }

    public void setLyricShortPosition(List<Position> list) {
        this.lyricShortPosition = list;
    }

    public void setMatchedPGCSoundInfo(MatchedPGCSoundInfo matchedPGCSoundInfo2) {
        this.matchedPGCSoundInfo = matchedPGCSoundInfo2;
    }

    public void setMatchedSoundInfo(MatchedSoundInfo matchedSoundInfo) {
        this.mMatchedSongInfo = matchedSoundInfo;
    }

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

    public void setMusicBeginTime(int i) {
        this.musicBeginTime = i;
    }

    public MusicModel setMusicEffects(String str) {
        this.musicEffectsUrl = str;
        return this;
    }

    public void setMusicEndFromCut(int i) {
        this.musicEndFromCut = i;
    }

    public void setMusicEndTime(int i) {
        this.musicEndTime = i;
    }

    public void setMusicId(String str) {
        this.musicId = str;
    }

    public void setMusicStartFromCut(int i) {
        this.musicStartFromCut = i;
    }

    public void setMusicStatus(int i) {
        this.musicStatus = i;
    }

    public void setMusicType(MusicType musicType2) {
        this.musicType = musicType2;
    }

    public void setMusicWaveBean(MusicWaveBean musicWaveBean2) {
        this.musicWaveBean = musicWaveBean2;
    }

    public void setMuteShare(boolean z) {
        this.muteShare = z;
    }

    public void setMvThemeMusic(boolean z) {
        this.isMvThemeMusic = z;
    }

    public void setName(String str) {
        this.name = str;
    }

    public void setNeedSetCookie(boolean z) {
        this.needSetCookie = z;
    }

    public void setOfflineDesc(String str) {
        this.offlineDesc = str;
    }

    public void setOriginal(boolean z) {
        this.isOriginal = z;
    }

    public void setOriginalSound(boolean z) {
        this.isOriginalSound = z;
    }

    public void setPgc(boolean z) {
        this.isPgc = z;
    }

    public void setPicBig(String str) {
        this.picBig = str;
    }

    public void setPicHuge(String str) {
        this.picHuge = str;
    }

    public void setPicPremium(String str) {
        this.picPremium = str;
    }

    public void setPicSmall(String str) {
        this.picSmall = str;
    }

    public void setPreventDownload(boolean z) {
        this.preventDownload = z;
    }

    public void setPreviewStartTime(float f) {
        this.previewStartTime = f;
    }

    public void setReuseAudioPlayUrl(UrlModel urlModel) {
        this.reuseAudioPlayUrl = urlModel;
    }

    public void setSearchId(String str) {
        this.searchId = str;
    }

    public void setSearchKeyWords(String str) {
        this.searchKeyWords = str;
    }

    public void setSinger(String str) {
        this.singer = str;
    }

    public void setSongId(String str) {
        this.songId = str;
    }

    public void setSoundsListType(int i) {
        this.mSoundsListType = i;
    }

    public void setSourcePlatform(int i) {
        this.sourcePlatform = i;
    }

    public void setStrongBeatUrl(UrlModel urlModel) {
        this.strongBeatUrl = urlModel;
    }

    public void setUrl(UrlModel urlModel) {
        this.playUrl = urlModel;
    }

    public void setUserCount(int i) {
        this.userCount = i;
    }

    public void setVideoDuration(int i) {
        this.videoDuration = i;
    }

    public void setAuditionDuration(Integer num) {
        this.auditionDuration = num.intValue();
    }

    public void setShootDuration(Integer num) {
        this.shootDuration = num.intValue();
    }

    public void setCollectionType(CollectionType collectionType2) {
        int i;
        this.collectionType = collectionType2;
        Music music2 = this.music;
        if (music2 != null) {
            if (collectionType2 == CollectionType.NOT_COLLECTED) {
                i = 0;
            } else {
                i = 1;
            }
            music2.setCollectStatus(i);
        }
    }

    public enum FromSection {
        OTHER("other"),
        CSP_BANNER("csp_banner"),
        CSP_RECOMMENDED("csp_recommended"),
        CSP_PLAYLISTS("csp_playlists"),
        CSP_UNFOLDED_PLAYLISTS("csp_unfolded_playlists");
        
        public final String value;

        /* access modifiers changed from: public */
        FromSection(String str) {
            this.value = str;
        }
    }
}
