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; import org.bouncycastle.crypto.tls.CipherSuite; /* loaded from: classes.dex */ public final class kEG extends TypeAdapter implements HJa { private Gson a; private PYE d; private InterfaceC15734iCu e; public kEG(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.a = gson; this.e = interfaceC15734iCu; this.d = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); return; } gKq gkq = (gKq) obj; Gson gson = this.a; PYE pye = this.d; jsonWriter.beginObject(); if (gkq != gkq.e) { pye.c(jsonWriter, 11); String str = gkq.e; DTh.b(gson, String.class, str).write(jsonWriter, str); } if (gkq != gkq.c) { pye.c(jsonWriter, 337); String str2 = gkq.c; DTh.b(gson, String.class, str2).write(jsonWriter, str2); } if (gkq != gkq.b) { pye.c(jsonWriter, 102); String str3 = gkq.b; DTh.b(gson, String.class, str3).write(jsonWriter, str3); } if (gkq != gkq.a) { pye.c(jsonWriter, 677); String str4 = gkq.a; DTh.b(gson, String.class, str4).write(jsonWriter, str4); } if (gkq != gkq.d) { pye.c(jsonWriter, 208); String str5 = gkq.d; DTh.b(gson, String.class, str5).write(jsonWriter, str5); } if (gkq != gkq.i) { pye.c(jsonWriter, 380); String str6 = gkq.i; DTh.b(gson, String.class, str6).write(jsonWriter, str6); } if (gkq != gkq.h) { pye.c(jsonWriter, CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA384); String str7 = gkq.h; DTh.b(gson, String.class, str7).write(jsonWriter, str7); } if (gkq != gkq.j) { pye.c(jsonWriter, 474); String str8 = gkq.j; DTh.b(gson, String.class, str8).write(jsonWriter, str8); } if (gkq != gkq.g) { pye.c(jsonWriter, CipherSuite.TLS_PSK_WITH_RC4_128_SHA); String str9 = gkq.g; DTh.b(gson, String.class, str9).write(jsonWriter, str9); } if (gkq != gkq.f) { pye.c(jsonWriter, 453); String str10 = gkq.f; DTh.b(gson, String.class, str10).write(jsonWriter, str10); } if (gkq != gkq.m) { pye.c(jsonWriter, 372); String str11 = gkq.m; DTh.b(gson, String.class, str11).write(jsonWriter, str11); } gkq.d(gson, jsonWriter, pye); 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; } gKq gkq = new gKq(); Gson gson = this.a; InterfaceC15734iCu interfaceC15734iCu = this.e; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; switch (e) { case 84: if (!z) { gkq.j = null; break; } else { gkq.j = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case CipherSuite.TLS_PSK_WITH_3DES_EDE_CBC_SHA /* 139 */: if (!z) { gkq.f = null; break; } else { gkq.f = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 227: if (!z) { gkq.b = null; break; } else { gkq.b = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 259: if (!z) { gkq.i = null; break; } else { gkq.i = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 270: if (!z) { gkq.m = null; break; } else { gkq.m = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 309: if (!z) { gkq.c = null; break; } else { gkq.c = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 385: if (!z) { gkq.h = null; break; } else { gkq.h = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 452: if (!z) { gkq.e = null; break; } else { gkq.e = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 561: if (!z) { gkq.d = null; break; } else { gkq.d = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 584: if (!z) { gkq.a = null; break; } else { gkq.a = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 633: if (!z) { gkq.g = null; break; } else { gkq.g = (String) gson.getAdapter(String.class).read2(jsonReader); break; } default: gkq.a(gson, jsonReader, e); continue; } jsonReader.nextNull(); } jsonReader.endObject(); return gkq; } }