package com.bytedance.common.wschannel.model;

import X.7xf;
import X.C2555Pxw;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.common.wschannel.app.IWsApp;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;

public class SsWsApp implements Parcelable, IWsApp {
    public static final Parcelable.Creator<SsWsApp> CREATOR = new Parcelable.Creator<SsWsApp>() {
        static {
            Covode.recordClassIndex(24949);
        }

        public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
            return new SsWsApp[i];
        }

        public final /* synthetic */ Object createFromParcel(Parcel parcel) {
            return new SsWsApp(parcel);
        }
    };
    public Map<String, String> LIZ;
    public List<String> LIZIZ;
    public int LIZJ;
    public String LIZLLL;
    public int LJ;
    public String LJFF;
    public String LJI;
    public int LJII;
    public int LJIIIIZZ;
    public int LJIIIZ;
    public String LJIIJ;

    public int describeContents() {
        return 0;
    }

    public final int LIZ() {
        return this.LIZJ;
    }

    public final int LIZIZ() {
        return this.LJ;
    }

    public final String LIZJ() {
        return this.LJFF;
    }

    public final String LIZLLL() {
        return this.LJI;
    }

    public final int LJ() {
        return this.LJII;
    }

    public final int LJFF() {
        return this.LJIIIIZZ;
    }

    public final Map<String, String> LJI() {
        return this.LIZ;
    }

    public final String LJIIIIZZ() {
        return this.LJIIJ;
    }

    public final int LJIIIZ() {
        return this.LJIIIZ;
    }

    public final String LJIIJ() {
        return this.LIZLLL;
    }

    public final List<String> LJIIJJI() {
        return this.LIZIZ;
    }

    static {
        Covode.recordClassIndex(24948);
    }

    public SsWsApp() {
        this.LIZ = new HashMap();
        this.LIZIZ = new ArrayList();
    }

    public final JSONObject LJII() {
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("channel_id", this.LIZJ);
        jSONObject.put("app_id", this.LJ);
        jSONObject.put("device_id", this.LJFF);
        jSONObject.put("install_id", this.LJI);
        JSONArray jSONArray = new JSONArray();
        List<String> list = this.LIZIZ;
        if (list != null) {
            for (String put : list) {
                jSONArray.put(put);
            }
        }
        jSONObject.put("headers", 7xf.LIZ(this.LIZ));
        jSONObject.put("urls", jSONArray);
        jSONObject.put("app_version", this.LJII);
        jSONObject.put("platform", this.LJIIIIZZ);
        jSONObject.put("fpid", this.LJIIIZ);
        jSONObject.put("app_kay", this.LJIIJ);
        jSONObject.put("extra", this.LIZLLL);
        return jSONObject;
    }

    public int hashCode() {
        int i;
        int i2;
        int i3;
        int i4;
        int hashCode = this.LIZ.hashCode() * 31;
        List<String> list = this.LIZIZ;
        int i5 = 0;
        if (list != null) {
            i = list.hashCode();
        } else {
            i = 0;
        }
        int i6 = (((hashCode + i) * 31) + this.LIZJ) * 31;
        String str = this.LIZLLL;
        if (str != null) {
            i2 = str.hashCode();
        } else {
            i2 = 0;
        }
        int i7 = (((i6 + i2) * 31) + this.LJ) * 31;
        String str2 = this.LJFF;
        if (str2 != null) {
            i3 = str2.hashCode();
        } else {
            i3 = 0;
        }
        int i8 = (i7 + i3) * 31;
        String str3 = this.LJI;
        if (str3 != null) {
            i4 = str3.hashCode();
        } else {
            i4 = 0;
        }
        int i9 = (((((((i8 + i4) * 31) + this.LJII) * 31) + this.LJIIIIZZ) * 31) + this.LJIIIZ) * 31;
        String str4 = this.LJIIJ;
        if (str4 != null) {
            i5 = str4.hashCode();
        }
        return i9 + i5;
    }

    public SsWsApp(Parcel parcel) {
        this.LIZ = new HashMap();
        this.LIZIZ = new ArrayList();
        int readInt = parcel.readInt();
        this.LIZ = new HashMap(readInt);
        for (int i = 0; i < readInt; i++) {
            this.LIZ.put(parcel.readString(), parcel.readString());
        }
        this.LIZIZ = parcel.createStringArrayList();
        this.LIZJ = parcel.readInt();
        this.LIZLLL = parcel.readString();
        this.LJ = parcel.readInt();
        this.LJFF = parcel.readString();
        this.LJI = parcel.readString();
        this.LJII = parcel.readInt();
        this.LJIIIIZZ = parcel.readInt();
        this.LJIIIZ = parcel.readInt();
        this.LJIIJ = parcel.readString();
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && getClass() == obj.getClass()) {
            SsWsApp ssWsApp = (SsWsApp) obj;
            if (this.LIZJ != ssWsApp.LIZJ || this.LJ != ssWsApp.LJ || this.LJII != ssWsApp.LJII || this.LJIIIIZZ != ssWsApp.LJIIIIZZ || this.LJIIIZ != ssWsApp.LJIIIZ || !this.LIZ.equals(ssWsApp.LIZ)) {
                return false;
            }
            List<String> list = this.LIZIZ;
            if (list == null ? ssWsApp.LIZIZ != null : !list.equals(ssWsApp.LIZIZ)) {
                return false;
            }
            String str = this.LIZLLL;
            if (str == null ? ssWsApp.LIZLLL != null : !str.equals(ssWsApp.LIZLLL)) {
                return false;
            }
            String str2 = this.LJFF;
            if (str2 == null ? ssWsApp.LJFF != null : !str2.equals(ssWsApp.LJFF)) {
                return false;
            }
            String str3 = this.LJI;
            if (str3 == null ? ssWsApp.LJI != null : !str3.equals(ssWsApp.LJI)) {
                return false;
            }
            String str4 = this.LJIIJ;
            String str5 = ssWsApp.LJIIJ;
            if (str4 != null) {
                return str4.equals(str5);
            }
            if (str5 == null) {
                return true;
            }
        }
        return false;
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.LIZ.size());
        for (Map.Entry next : this.LIZ.entrySet()) {
            parcel.writeString((String) next.getKey());
            parcel.writeString((String) next.getValue());
        }
        parcel.writeStringList(this.LIZIZ);
        parcel.writeInt(this.LIZJ);
        parcel.writeString(this.LIZLLL);
        parcel.writeInt(this.LJ);
        parcel.writeString(this.LJFF);
        parcel.writeString(this.LJI);
        parcel.writeInt(this.LJII);
        parcel.writeInt(this.LJIIIIZZ);
        parcel.writeInt(this.LJIIIZ);
        parcel.writeString(this.LJIIJ);
    }

    public SsWsApp(int i, int i2, String str, String str2, List<String> list, int i3, int i4, int i5, String str3, String str4, C2555Pxw pxw) {
        this.LIZ = new HashMap();
        ArrayList arrayList = new ArrayList();
        this.LIZIZ = arrayList;
        this.LJ = i2;
        this.LIZJ = i;
        this.LJFF = str;
        this.LJI = str2;
        if (list != null) {
            arrayList.addAll(list);
        }
        this.LJII = i3;
        this.LJIIIIZZ = i4;
        this.LJIIIZ = i5;
        this.LJIIJ = str3;
        this.LIZLLL = str4;
        if (pxw.LJIIJ != null) {
            this.LIZ.putAll(pxw.LJIIJ);
        }
    }

    public /* synthetic */ SsWsApp(int i, int i2, String str, String str2, List list, int i3, int i4, int i5, String str3, String str4, C2555Pxw pxw, byte b) {
        this(i, i2, str, str2, list, i3, i4, i5, str3, str4, pxw);
    }
}
