package o; import com.google.gson.Gson; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import java.io.IOException; /* loaded from: classes.dex */ public final class XK extends TypeAdapter implements HJa { private Gson a; private InterfaceC15734iCu b; private PYE c; public XK(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.a = gson; this.b = interfaceC15734iCu; this.c = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); return; } C1203Xy c1203Xy = (C1203Xy) obj; Gson gson = this.a; PYE pye = this.c; jsonWriter.beginObject(); if (c1203Xy != c1203Xy.a) { pye.c(jsonWriter, 640); String str = c1203Xy.a; DTh.b(gson, String.class, str).write(jsonWriter, str); } pye.c(jsonWriter, 102); Class cls = Double.TYPE; Double valueOf = Double.valueOf(c1203Xy.c); DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf); if (c1203Xy != c1203Xy.b) { pye.c(jsonWriter, 17); String str2 = c1203Xy.b; DTh.b(gson, String.class, str2).write(jsonWriter, str2); } if (c1203Xy != c1203Xy.d) { pye.c(jsonWriter, 111); String str3 = c1203Xy.d; DTh.b(gson, String.class, str3).write(jsonWriter, str3); } if (c1203Xy != c1203Xy.f) { pye.c(jsonWriter, 160); C1202Xx c1202Xx = c1203Xy.f; DTh.b(gson, C1202Xx.class, c1202Xx).write(jsonWriter, c1202Xx); } if (c1203Xy != c1203Xy.h) { pye.c(jsonWriter, 510); String str4 = c1203Xy.h; DTh.b(gson, String.class, str4).write(jsonWriter, str4); } if (c1203Xy != c1203Xy.g) { pye.c(jsonWriter, 49); String str5 = c1203Xy.g; DTh.b(gson, String.class, str5).write(jsonWriter, str5); } if (c1203Xy != c1203Xy.i) { pye.c(jsonWriter, 536); String str6 = c1203Xy.i; DTh.b(gson, String.class, str6).write(jsonWriter, str6); } if (c1203Xy != c1203Xy.j) { pye.c(jsonWriter, 645); String str7 = c1203Xy.j; DTh.b(gson, String.class, str7).write(jsonWriter, str7); } if (c1203Xy != c1203Xy.l) { pye.c(jsonWriter, 607); String str8 = c1203Xy.l; DTh.b(gson, String.class, str8).write(jsonWriter, str8); } if (c1203Xy != c1203Xy.m) { pye.c(jsonWriter, 226); String str9 = c1203Xy.m; DTh.b(gson, String.class, str9).write(jsonWriter, str9); } if (c1203Xy != c1203Xy.f8457o) { pye.c(jsonWriter, 489); String str10 = c1203Xy.f8457o; DTh.b(gson, String.class, str10).write(jsonWriter, str10); } pye.c(jsonWriter, 566); Class cls2 = Boolean.TYPE; Boolean valueOf2 = Boolean.valueOf(c1203Xy.k); DTh.b(gson, cls2, valueOf2).write(jsonWriter, valueOf2); pye.c(jsonWriter, 601); Class cls3 = Boolean.TYPE; Boolean valueOf3 = Boolean.valueOf(c1203Xy.e); DTh.b(gson, cls3, valueOf3).write(jsonWriter, valueOf3); jsonWriter.endObject(); } @Override // com.google.gson.TypeAdapter /* renamed from: read */ public final Object read2(JsonReader jsonReader) throws IOException { if (jsonReader.peek() == JsonToken.NULL) { jsonReader.skipValue(); return null; } C1203Xy c1203Xy = new C1203Xy(); Gson gson = this.a; InterfaceC15734iCu interfaceC15734iCu = this.b; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; switch (e) { case 57: if (!z) { c1203Xy.i = null; break; } else { c1203Xy.i = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 81: if (!z) { break; } else { c1203Xy.k = ((Boolean) gson.getAdapter(Boolean.class).read2(jsonReader)).booleanValue(); break; } case 218: if (!z) { c1203Xy.f = null; break; } else { c1203Xy.f = (C1202Xx) gson.getAdapter(C1202Xx.class).read2(jsonReader); break; } case 227: if (!z) { break; } else { c1203Xy.c = ((Double) gson.getAdapter(Double.class).read2(jsonReader)).doubleValue(); break; } case 228: if (!z) { c1203Xy.d = null; break; } else { c1203Xy.d = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 242: if (!z) { c1203Xy.h = null; break; } else { c1203Xy.h = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 337: if (!z) { c1203Xy.j = null; break; } else { c1203Xy.j = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 355: if (!z) { c1203Xy.a = null; break; } else { c1203Xy.a = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 412: if (!z) { c1203Xy.g = null; break; } else { c1203Xy.g = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 491: if (!z) { c1203Xy.f8457o = null; break; } else { c1203Xy.f8457o = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 529: if (!z) { c1203Xy.b = null; break; } else { c1203Xy.b = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 596: if (!z) { c1203Xy.l = null; break; } else { c1203Xy.l = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 686: if (!z) { c1203Xy.m = null; break; } else { c1203Xy.m = (String) gson.getAdapter(String.class).read2(jsonReader); break; } default: c1203Xy.a(gson, jsonReader, e); continue; } jsonReader.nextNull(); } jsonReader.endObject(); return c1203Xy; } }