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; import org.bouncycastle.crypto.tls.CipherSuite; /* loaded from: classes.dex */ public final class CLo extends TypeAdapter implements HJa { private InterfaceC15734iCu b; private Gson d; private PYE e; public CLo(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.d = gson; this.b = interfaceC15734iCu; this.e = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); return; } VAh vAh = (VAh) obj; Gson gson = this.d; PYE pye = this.e; jsonWriter.beginObject(); if (vAh != vAh.a) { pye.c(jsonWriter, CipherSuite.TLS_DH_RSA_WITH_AES_256_GCM_SHA384); ZYU zyu = new ZYU(); List list = vAh.a; DTh.a(gson, zyu, list).write(jsonWriter, list); } String str = vAh.d; pye.c(jsonWriter, 581); String str2 = vAh.d; 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; } VAh vAh = new VAh(); Gson gson = this.d; InterfaceC15734iCu interfaceC15734iCu = this.b; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; if (e != 86) { if (e != 439) { jsonReader.skipValue(); } else if (z) { vAh.d = (String) gson.getAdapter(String.class).read2(jsonReader); } else { vAh.d = null; jsonReader.nextNull(); } } else if (z) { vAh.a = (List) gson.getAdapter(new ZYU()).read2(jsonReader); } else { vAh.a = null; jsonReader.nextNull(); } } jsonReader.endObject(); return vAh; } }