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 UIq extends TypeAdapter implements HJa { private PYE a; private Gson b; private InterfaceC15734iCu e; public UIq(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.b = gson; this.e = interfaceC15734iCu; this.a = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); return; } YcS ycS = (YcS) obj; Gson gson = this.b; PYE pye = this.a; jsonWriter.beginObject(); String str = ycS.c; pye.c(jsonWriter, 662); String str2 = ycS.c; DTh.b(gson, String.class, str2).write(jsonWriter, str2); String str3 = ycS.e; pye.c(jsonWriter, 367); String str4 = ycS.e; DTh.b(gson, String.class, str4).write(jsonWriter, str4); String str5 = ycS.b; pye.c(jsonWriter, 416); String str6 = ycS.b; DTh.b(gson, String.class, str6).write(jsonWriter, str6); String str7 = ycS.d; pye.c(jsonWriter, 142); String str8 = ycS.d; DTh.b(gson, String.class, str8).write(jsonWriter, str8); 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; } YcS ycS = new YcS(); Gson gson = this.b; InterfaceC15734iCu interfaceC15734iCu = this.e; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; if (e != 48) { if (e != 52) { if (e != 585) { if (e != 649) { jsonReader.skipValue(); } else if (z) { ycS.b = (String) gson.getAdapter(String.class).read2(jsonReader); } else { ycS.b = null; jsonReader.nextNull(); } } else if (z) { ycS.d = (String) gson.getAdapter(String.class).read2(jsonReader); } else { ycS.d = null; jsonReader.nextNull(); } } else if (z) { ycS.c = (String) gson.getAdapter(String.class).read2(jsonReader); } else { ycS.c = null; jsonReader.nextNull(); } } else if (z) { ycS.e = (String) gson.getAdapter(String.class).read2(jsonReader); } else { ycS.e = null; jsonReader.nextNull(); } } jsonReader.endObject(); return ycS; } }