package jp.naver.line.android.obs.model; import android.os.Parcel; import android.os.Parcelable; import b.d; import em3.q; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import kotlin.Deprecated; import kotlin.Metadata; import kotlin.Unit; import n3.n; import org.json.JSONArray; import org.json.JSONObject; import q3.u0; @Deprecated(message = "Use obs module instead. {@link https://wiki.linecorp.com/x/iBWwjw}") @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\b\u0018\u00002\u00020\u00012\u00020\u0002¨\u0006\u0003"}, d2 = {"Ljp/naver/line/android/obs/model/OBSCopyParams;", "Ljava/io/Serializable;", "Landroid/os/Parcelable;", "common-libs_release"}, k = 1, mv = {1, 6, 0}) public final class OBSCopyParams implements Serializable, Parcelable { public static final Parcelable.Creator<OBSCopyParams> CREATOR = new a(); private static final long serialVersionUID = 8736549627637288482L; /* renamed from: b reason: collision with root package name */ public final String f97604b; /* renamed from: c reason: collision with root package name */ public final String f97605c; /* renamed from: d reason: collision with root package name */ public final String f97606d; /* renamed from: e reason: collision with root package name */ public Map<String, String> f97607e; /* renamed from: f reason: collision with root package name */ public Map<String, String> f97608f; /* renamed from: g reason: collision with root package name */ public List<String> f97609g; /* renamed from: h reason: collision with root package name */ public Map<String, String> f97610h; /* renamed from: i reason: collision with root package name */ public Map<String, String> f97611i; /* renamed from: j reason: collision with root package name */ public List<String> f97612j; /* renamed from: k reason: collision with root package name */ public Boolean f97613k; /* renamed from: l reason: collision with root package name */ public Boolean f97614l; /* renamed from: m reason: collision with root package name */ public Boolean f97615m; public static final class a implements Parcelable.Creator<OBSCopyParams> { /* Return type fixed from 'java.lang.Object' to match base method */ @Override // android.os.Parcelable.Creator public OBSCopyParams createFromParcel(Parcel parcel) { q.f(parcel, "parcel"); String readString = parcel.readString(); q.d(readString); String readString2 = parcel.readString(); q.d(readString2); String readString3 = parcel.readString(); q.d(readString3); OBSCopyParams oBSCopyParams = new OBSCopyParams(readString, readString2, readString3, new LinkedHashMap(), new LinkedHashMap(), new ArrayList(), new LinkedHashMap(), new LinkedHashMap(), new ArrayList(), null, null, null); parcel.readMap(oBSCopyParams.f97607e, OBSCopyParams.class.getClassLoader()); parcel.readMap(oBSCopyParams.f97608f, OBSCopyParams.class.getClassLoader()); parcel.readList(oBSCopyParams.f97609g, OBSCopyParams.class.getClassLoader()); parcel.readMap(oBSCopyParams.f97610h, OBSCopyParams.class.getClassLoader()); parcel.readMap(oBSCopyParams.f97611i, OBSCopyParams.class.getClassLoader()); parcel.readList(oBSCopyParams.f97612j, OBSCopyParams.class.getClassLoader()); Class cls = Boolean.TYPE; Object readValue = parcel.readValue(cls.getClassLoader()); Boolean bool = null; oBSCopyParams.f97613k = readValue instanceof Boolean ? (Boolean) readValue : null; Object readValue2 = parcel.readValue(cls.getClassLoader()); oBSCopyParams.f97614l = readValue2 instanceof Boolean ? (Boolean) readValue2 : null; Object readValue3 = parcel.readValue(cls.getClassLoader()); if (readValue3 instanceof Boolean) { bool = (Boolean) readValue3; } oBSCopyParams.f97615m = bool; return oBSCopyParams; } /* Return type fixed from 'java.lang.Object[]' to match base method */ @Override // android.os.Parcelable.Creator public OBSCopyParams[] newArray(int i14) { return new OBSCopyParams[i14]; } } public OBSCopyParams(String str, String str2, String str3, Map<String, String> map, Map<String, String> map2, List<String> list, Map<String, String> map3, Map<String, String> map4, List<String> list2, Boolean bool, Boolean bool2, Boolean bool3) { q.f(str, "sourceServiceCode"); q.f(str2, "sourceSid"); q.f(str3, "sourceOid"); q.f(map, "sourceHeaders"); q.f(map2, "sourceParams"); q.f(list, "sourceCommonHeaders"); q.f(map3, "destinationHeaders"); q.f(map4, "destinationParams"); q.f(list2, "destinationCommonHeaders"); this.f97604b = str; this.f97605c = str2; this.f97606d = str3; this.f97607e = map; this.f97608f = map2; this.f97609g = list; this.f97610h = map3; this.f97611i = map4; this.f97612j = list2; this.f97613k = bool; this.f97614l = bool2; this.f97615m = bool3; } public final JSONObject a() { String str; String str2; JSONObject put = new JSONObject().put("src", new JSONObject().put("svcCode", this.f97604b).put("sid", this.f97605c).put("oid", this.f97606d).put("relay", new JSONObject().put("headers", d(this.f97607e)).put("params", d(this.f97608f)).put("commonHeaders", b(this.f97609g)))).put("dst", new JSONObject().put("relay", new JSONObject().put("headers", d(this.f97610h)).put("params", d(this.f97611i)).put("commonHeaders", b(this.f97612j)))); JSONObject jSONObject = new JSONObject(); Boolean bool = this.f97613k; String str3 = "yes"; if (bool != null) { if (q.b(bool, Boolean.TRUE)) { str2 = str3; } else { str2 = "no"; } jSONObject.put("requestImageSize", str2); } Boolean bool2 = this.f97615m; if (bool2 != null) { if (q.b(bool2, Boolean.TRUE)) { str = str3; } else { str = "no"; } jSONObject.put("encodeIfRequired", str); } Boolean bool3 = this.f97614l; if (bool3 != null) { if (!q.b(bool3, Boolean.TRUE)) { str3 = "no"; } jSONObject.put("requestVideoInfo", str3); } Unit unit = Unit.INSTANCE; JSONObject put2 = put.put("options", jSONObject); q.e(put2, "JSONObject()\n … }\n )"); return put2; } public final JSONArray b(List<String> list) { JSONArray jSONArray = new JSONArray(); Iterator<T> it3 = list.iterator(); while (it3.hasNext()) { jSONArray.put(it3.next()); } return jSONArray; } public final JSONObject d(Map<String, String> map) { JSONObject jSONObject = new JSONObject(); for (T t14 : map.entrySet()) { jSONObject.put((String) t14.getKey(), t14.getValue()); } return jSONObject; } public int describeContents() { return 0; } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof OBSCopyParams)) { return false; } OBSCopyParams oBSCopyParams = (OBSCopyParams) obj; return q.b(this.f97604b, oBSCopyParams.f97604b) && q.b(this.f97605c, oBSCopyParams.f97605c) && q.b(this.f97606d, oBSCopyParams.f97606d) && q.b(this.f97607e, oBSCopyParams.f97607e) && q.b(this.f97608f, oBSCopyParams.f97608f) && q.b(this.f97609g, oBSCopyParams.f97609g) && q.b(this.f97610h, oBSCopyParams.f97610h) && q.b(this.f97611i, oBSCopyParams.f97611i) && q.b(this.f97612j, oBSCopyParams.f97612j) && q.b(this.f97613k, oBSCopyParams.f97613k) && q.b(this.f97614l, oBSCopyParams.f97614l) && q.b(this.f97615m, oBSCopyParams.f97615m); } public int hashCode() { int a14 = u0.a(this.f97612j, lr.a.a(this.f97611i, lr.a.a(this.f97610h, u0.a(this.f97609g, lr.a.a(this.f97608f, lr.a.a(this.f97607e, n.a(this.f97606d, n.a(this.f97605c, this.f97604b.hashCode() * 31, 31), 31), 31), 31), 31), 31), 31), 31); Boolean bool = this.f97613k; int i14 = 0; int hashCode = (a14 + (bool == null ? 0 : bool.hashCode())) * 31; Boolean bool2 = this.f97614l; int hashCode2 = (hashCode + (bool2 == null ? 0 : bool2.hashCode())) * 31; Boolean bool3 = this.f97615m; if (bool3 != null) { i14 = bool3.hashCode(); } return hashCode2 + i14; } public String toString() { StringBuilder a14 = d.a("OBSCopyParams: "); a14.append(a().toString(2)); return a14.toString(); } public void writeToParcel(Parcel parcel, int i14) { q.f(parcel, "parcel"); parcel.writeString(this.f97604b); parcel.writeString(this.f97605c); parcel.writeString(this.f97606d); parcel.writeMap(this.f97607e); parcel.writeMap(this.f97608f); parcel.writeList(this.f97609g); parcel.writeMap(this.f97610h); parcel.writeMap(this.f97611i); parcel.writeList(this.f97612j); parcel.writeValue(this.f97613k); parcel.writeValue(this.f97614l); parcel.writeValue(this.f97615m); } }