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 YLA extends TypeAdapter implements HJa { private PYE a; private InterfaceC15734iCu d; private Gson e; public YLA(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.e = gson; this.d = 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; } RvX rvX = (RvX) obj; Gson gson = this.e; PYE pye = this.a; jsonWriter.beginObject(); if (rvX != rvX.e) { pye.c(jsonWriter, CipherSuite.TLS_DHE_DSS_WITH_AES_256_GCM_SHA384); String str = rvX.e; DTh.b(gson, String.class, str).write(jsonWriter, str); } if (rvX != rvX.b) { pye.c(jsonWriter, 574); String str2 = rvX.b; 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; } RvX rvX = new RvX(); Gson gson = this.e; InterfaceC15734iCu interfaceC15734iCu = this.d; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; if (e != 204) { if (e != 448) { jsonReader.skipValue(); } else if (z) { rvX.b = (String) gson.getAdapter(String.class).read2(jsonReader); } else { rvX.b = null; jsonReader.nextNull(); } } else if (z) { rvX.e = (String) gson.getAdapter(String.class).read2(jsonReader); } else { rvX.e = null; jsonReader.nextNull(); } } jsonReader.endObject(); return rvX; } }