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

79 lines
2.4 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 sRH extends TypeAdapter implements HJa {
private InterfaceC15734iCu a;
private Gson b;
private PYE e;
public sRH(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = gson;
this.a = 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;
}
TfH tfH = (TfH) obj;
Gson gson = this.b;
PYE pye = this.e;
jsonWriter.beginObject();
if (tfH != tfH.d) {
pye.c(jsonWriter, 201);
String str = tfH.d;
DTh.b(gson, String.class, str).write(jsonWriter, str);
}
if (tfH != tfH.c) {
pye.c(jsonWriter, 234);
String str2 = tfH.c;
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;
}
TfH tfH = new TfH();
Gson gson = this.b;
InterfaceC15734iCu interfaceC15734iCu = this.a;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 82) {
if (e != 269) {
jsonReader.skipValue();
} else if (z) {
tfH.d = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
tfH.d = null;
jsonReader.nextNull();
}
} else if (z) {
tfH.c = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
tfH.c = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return tfH;
}
}