package com.ss.android.ugc.effectmanager.common.model;

import X.2HN;
import X.M12;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.ss.ugc.effectplatform.model.UrlModel;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class UrlModelTemplate extends UrlModel implements Parcelable, Serializable {
    public static final Parcelable.Creator CREATOR = new Creator();
    public List<String> urlList;
    public final transient UrlModel urlModel;

    public static class Creator implements Parcelable.Creator {
        static {
            Covode.recordClassIndex(125290);
        }

        public final Object createFromParcel(Parcel parcel) {
            M12.LIZ(parcel);
            return new UrlModelTemplate((UrlModel) parcel.readParcelable(UrlModelTemplate.class.getClassLoader()));
        }

        public final Object[] newArray(int i) {
            return new UrlModelTemplate[i];
        }
    }

    static {
        Covode.recordClassIndex(125289);
    }

    public UrlModelTemplate() {
        this((UrlModel) null, 1, (2HN) null);
    }

    public static /* synthetic */ void urlList$annotations() {
    }

    public void writeToParcel(Parcel parcel, int i) {
        M12.LIZ(parcel);
        parcel.writeParcelable(this.urlModel, i);
    }

    public UrlModel getUrlModel() {
        return this.urlModel;
    }

    public final boolean isValid() {
        List<String> urlList2 = getUrlList();
        if (urlList2 == null || urlList2.isEmpty()) {
            return false;
        }
        return true;
    }

    public List<String> getUrlList() {
        List<String> url_list;
        UrlModel urlModel2 = getUrlModel();
        if (urlModel2 == null || (url_list = urlModel2.getUrl_list()) == null) {
            return super.getUrl_list();
        }
        return url_list;
    }

    public String toString() {
        String urlModel2;
        UrlModel urlModel3 = getUrlModel();
        if (urlModel3 == null || (urlModel2 = urlModel3.toString()) == null) {
            return super.toString();
        }
        return urlModel2;
    }

    public UrlModelTemplate(UrlModel urlModel2) {
        super((List) null, (String) null, 3, (2HN) null);
        this.urlModel = urlModel2;
        this.urlList = new ArrayList();
    }

    public void setUrlList(List<String> list) {
        M12.LIZ(list);
        this.urlList = list;
        UrlModel urlModel2 = getUrlModel();
        if (urlModel2 != null) {
            urlModel2.setUrl_list(list);
        }
        super.setUrl_list(list);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ UrlModelTemplate(UrlModel urlModel2, int i, 2HN r4) {
        this((i & 1) != 0 ? null : urlModel2);
    }
}
