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; import org.threeten.bp.OffsetDateTime; /* loaded from: classes.dex */ public final class BLc extends TypeAdapter implements HJa { private PYE b; private Gson d; private InterfaceC15734iCu e; public BLc(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.d = gson; this.e = interfaceC15734iCu; this.b = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); return; } GCM gcm = (GCM) obj; Gson gson = this.d; PYE pye = this.b; jsonWriter.beginObject(); if (gcm != gcm.e) { pye.c(jsonWriter, 102); Double d = gcm.e; DTh.b(gson, Double.class, d).write(jsonWriter, d); } if (gcm != gcm.a) { pye.c(jsonWriter, 506); String str = gcm.a; DTh.b(gson, String.class, str).write(jsonWriter, str); } if (gcm != gcm.b) { pye.c(jsonWriter, 676); String str2 = gcm.b; DTh.b(gson, String.class, str2).write(jsonWriter, str2); } if (gcm != gcm.c) { pye.c(jsonWriter, 49); String str3 = gcm.c; DTh.b(gson, String.class, str3).write(jsonWriter, str3); } if (gcm != gcm.d) { pye.c(jsonWriter, 322); OffsetDateTime offsetDateTime = gcm.d; DTh.b(gson, OffsetDateTime.class, offsetDateTime).write(jsonWriter, offsetDateTime); } if (gcm != gcm.i) { pye.c(jsonWriter, 79); String str4 = gcm.i; DTh.b(gson, String.class, str4).write(jsonWriter, str4); } if (gcm != gcm.h) { pye.c(jsonWriter, 297); OffsetDateTime offsetDateTime2 = gcm.h; DTh.b(gson, OffsetDateTime.class, offsetDateTime2).write(jsonWriter, offsetDateTime2); } if (gcm != gcm.j) { pye.c(jsonWriter, 585); String str5 = gcm.j; DTh.b(gson, String.class, str5).write(jsonWriter, str5); } if (gcm != gcm.g) { pye.c(jsonWriter, 15); String str6 = gcm.g; DTh.b(gson, String.class, str6).write(jsonWriter, str6); } if (gcm != gcm.f) { pye.c(jsonWriter, 346); String str7 = gcm.f; DTh.b(gson, String.class, str7).write(jsonWriter, str7); } if (gcm != gcm.n) { pye.c(jsonWriter, 355); String str8 = gcm.n; DTh.b(gson, String.class, str8).write(jsonWriter, str8); } if (gcm != gcm.m) { pye.c(jsonWriter, 222); String str9 = gcm.m; DTh.b(gson, String.class, str9).write(jsonWriter, str9); } if (gcm != gcm.k) { pye.c(jsonWriter, 495); String str10 = gcm.k; DTh.b(gson, String.class, str10).write(jsonWriter, str10); } 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; } GCM gcm = new GCM(); Gson gson = this.d; InterfaceC15734iCu interfaceC15734iCu = this.e; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; switch (e) { case 39: if (!z) { gcm.m = null; break; } else { gcm.m = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case CipherSuite.TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 /* 197 */: if (!z) { gcm.i = null; break; } else { gcm.i = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 199: if (!z) { gcm.k = null; break; } else { gcm.k = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 227: if (!z) { gcm.e = null; break; } else { gcm.e = (Double) gson.getAdapter(Double.class).read2(jsonReader); break; } case 330: if (!z) { gcm.a = null; break; } else { gcm.a = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 362: if (!z) { gcm.d = null; break; } else { gcm.d = (OffsetDateTime) gson.getAdapter(OffsetDateTime.class).read2(jsonReader); break; } case 412: if (!z) { gcm.c = null; break; } else { gcm.c = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 430: if (!z) { gcm.b = null; break; } else { gcm.b = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 438: if (!z) { gcm.g = null; break; } else { gcm.g = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 487: if (!z) { gcm.j = null; break; } else { gcm.j = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 528: if (!z) { gcm.h = null; break; } else { gcm.h = (OffsetDateTime) gson.getAdapter(OffsetDateTime.class).read2(jsonReader); break; } case 651: if (!z) { gcm.f = null; break; } else { gcm.f = (String) gson.getAdapter(String.class).read2(jsonReader); break; } case 653: if (!z) { gcm.n = null; break; } else { gcm.n = (String) gson.getAdapter(String.class).read2(jsonReader); break; } default: jsonReader.skipValue(); continue; } jsonReader.nextNull(); } jsonReader.endObject(); return gcm; } }