package io.sentry.protocol; import io.sentry.ILogger; import io.sentry.JsonDeserializer; import io.sentry.JsonObjectReader; import io.sentry.JsonSerializable; import io.sentry.JsonUnknown; import io.sentry.ObjectWriter; import io.sentry.vendor.gson.stream.JsonToken; import java.io.IOException; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /* loaded from: classes3.dex */ public final class TransactionInfo implements JsonSerializable, JsonUnknown { private final String source; private Map unknown; /* loaded from: classes3.dex */ public static final class JsonKeys { public static final String SOURCE = "source"; } @Override // io.sentry.JsonUnknown public Map getUnknown() { return this.unknown; } @Override // io.sentry.JsonUnknown public void setUnknown(Map map) { this.unknown = map; } public TransactionInfo(String str) { this.source = str; } @Override // io.sentry.JsonSerializable public void serialize(ObjectWriter objectWriter, ILogger iLogger) throws IOException { objectWriter.beginObject(); if (this.source != null) { objectWriter.name(JsonKeys.SOURCE).value(iLogger, this.source); } Map map = this.unknown; if (map != null) { for (String str : map.keySet()) { Object obj = this.unknown.get(str); objectWriter.name(str); objectWriter.value(iLogger, obj); } } objectWriter.endObject(); } /* loaded from: classes3.dex */ public static final class Deserializer implements JsonDeserializer { /* JADX WARN: Can't rename method to resolve collision */ @Override // io.sentry.JsonDeserializer public TransactionInfo deserialize(JsonObjectReader jsonObjectReader, ILogger iLogger) throws Exception { jsonObjectReader.beginObject(); String str = null; ConcurrentHashMap concurrentHashMap = null; while (jsonObjectReader.peek() == JsonToken.NAME) { String nextName = jsonObjectReader.nextName(); nextName.hashCode(); if (nextName.equals(JsonKeys.SOURCE)) { str = jsonObjectReader.nextStringOrNull(); } else { if (concurrentHashMap == null) { concurrentHashMap = new ConcurrentHashMap(); } jsonObjectReader.nextUnknown(iLogger, concurrentHashMap, nextName); } } TransactionInfo transactionInfo = new TransactionInfo(str); transactionInfo.setUnknown(concurrentHashMap); jsonObjectReader.endObject(); return transactionInfo; } } }