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; /* renamed from: o.gsw, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public final class C15527gsw extends TypeAdapter implements HJa { private PYE a; private InterfaceC15734iCu b; private Gson d; public C15527gsw(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.d = gson; this.b = 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; } C15520gsp c15520gsp = (C15520gsp) obj; Gson gson = this.d; PYE pye = this.a; jsonWriter.beginObject(); pye.c(jsonWriter, 31); Class cls = Short.TYPE; Short valueOf = Short.valueOf(c15520gsp.day); DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf); pye.c(jsonWriter, CipherSuite.TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256); Class cls2 = Short.TYPE; Short valueOf2 = Short.valueOf(c15520gsp.month); DTh.b(gson, cls2, valueOf2).write(jsonWriter, valueOf2); pye.c(jsonWriter, 62); Class cls3 = Integer.TYPE; Integer valueOf3 = Integer.valueOf(c15520gsp.year); DTh.b(gson, cls3, valueOf3).write(jsonWriter, valueOf3); 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; } C15520gsp c15520gsp = new C15520gsp(); 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 != 120) { if (e != 360) { if (e != 488) { jsonReader.peek(); JsonToken jsonToken = JsonToken.NULL; jsonReader.skipValue(); } else if (z) { c15520gsp.year = ((Integer) gson.getAdapter(Integer.class).read2(jsonReader)).intValue(); } else { jsonReader.nextNull(); } } else if (z) { c15520gsp.month = ((Short) gson.getAdapter(Short.class).read2(jsonReader)).shortValue(); } else { jsonReader.nextNull(); } } else if (z) { c15520gsp.day = ((Short) gson.getAdapter(Short.class).read2(jsonReader)).shortValue(); } else { jsonReader.nextNull(); } } jsonReader.endObject(); return c15520gsp; } }