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 jZa extends TypeAdapter implements HJa { private Gson b; private InterfaceC15734iCu c; private PYE d; public jZa(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.b = gson; this.c = 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; } GvZ gvZ = (GvZ) obj; Gson gson = this.b; PYE pye = this.d; jsonWriter.beginObject(); pye.c(jsonWriter, 188); Class cls = Integer.TYPE; Integer valueOf = Integer.valueOf(gvZ.e); DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf); if (gvZ != gvZ.d) { pye.c(jsonWriter, 467); String str = gvZ.d; DTh.b(gson, String.class, str).write(jsonWriter, str); } if (gvZ != gvZ.a) { pye.c(jsonWriter, 118); String str2 = gvZ.a; DTh.b(gson, String.class, str2).write(jsonWriter, str2); } 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; } GvZ gvZ = new GvZ(); Gson gson = this.b; InterfaceC15734iCu interfaceC15734iCu = this.c; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; if (e != 43) { if (e != 255) { if (e != 576) { jsonReader.skipValue(); } else if (z) { gvZ.d = (String) gson.getAdapter(String.class).read2(jsonReader); } else { gvZ.d = null; jsonReader.nextNull(); } } else if (z) { gvZ.a = (String) gson.getAdapter(String.class).read2(jsonReader); } else { gvZ.a = null; jsonReader.nextNull(); } } else if (z) { gvZ.e = ((Integer) gson.getAdapter(Integer.class).read2(jsonReader)).intValue(); } else { jsonReader.nextNull(); } } jsonReader.endObject(); return gvZ; } }