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 java.util.List; /* loaded from: classes.dex */ public final class RhN extends TypeAdapter implements HJa { private PYE a; private Gson b; private InterfaceC15734iCu c; public RhN(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.b = gson; this.c = 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; } oyu oyuVar = (oyu) obj; Gson gson = this.b; PYE pye = this.a; jsonWriter.beginObject(); if (oyuVar != oyuVar.c) { pye.c(jsonWriter, 623); C15001geP c15001geP = new C15001geP(); List list = oyuVar.c; DTh.a(gson, c15001geP, list).write(jsonWriter, list); } 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; } oyu oyuVar = new oyu(); 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 != 264) { jsonReader.skipValue(); } else if (z) { oyuVar.c = (List) gson.getAdapter(new C15001geP()).read2(jsonReader); } else { oyuVar.c = null; jsonReader.nextNull(); } } jsonReader.endObject(); return oyuVar; } }