what-the-bank/sources/o/Ngi.java

88 lines
2.8 KiB
Java

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 Ngi extends TypeAdapter implements HJa {
private InterfaceC15734iCu c;
private Gson d;
private PYE e;
public Ngi(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.d = gson;
this.c = 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;
}
hoG hog = (hoG) obj;
Gson gson = this.d;
PYE pye = this.e;
jsonWriter.beginObject();
Integer num = hog.e;
pye.c(jsonWriter, 23);
Integer num2 = hog.e;
DTh.b(gson, Integer.class, num2).write(jsonWriter, num2);
Long l = hog.d;
pye.c(jsonWriter, 522);
Long l2 = hog.d;
DTh.b(gson, Long.class, l2).write(jsonWriter, l2);
Boolean bool = hog.c;
pye.c(jsonWriter, 30);
Boolean bool2 = hog.c;
DTh.b(gson, Boolean.class, bool2).write(jsonWriter, bool2);
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;
}
hoG hog = new hoG();
Gson gson = this.d;
InterfaceC15734iCu interfaceC15734iCu = this.c;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 182) {
if (e != 262) {
if (e != 296) {
jsonReader.skipValue();
} else if (z) {
hog.c = (Boolean) gson.getAdapter(Boolean.class).read2(jsonReader);
} else {
hog.c = null;
jsonReader.nextNull();
}
} else if (z) {
hog.d = (Long) gson.getAdapter(Long.class).read2(jsonReader);
} else {
hog.d = null;
jsonReader.nextNull();
}
} else if (z) {
hog.e = (Integer) gson.getAdapter(Integer.class).read2(jsonReader);
} else {
hog.e = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return hog;
}
}