package com.mobile.auth.gatewayauth.model; import com.mobile.auth.gatewayauth.ExceptionProcessor; import com.nirvana.tools.jsoner.JSONUtils; import com.nirvana.tools.jsoner.Jsoner; import java.io.Serializable; import java.lang.reflect.Field; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; public class MonitorStruct implements Jsoner, Serializable { private String accessCode; private String action; private String apiLevel = ""; private Map<String, String> apiParams; private String authSdkCode; private String carrierFailedResultData; private long carrierReturnTime; private String carrierSdkCode; private String carrierSdkMsg; private String carrierTraceId; private String certifyId; private long endTime; private String failRet; private String isCache; private boolean isSuccess; private String networkType; private String performanceTrace; private String phoneNumber; private String privateIp; private String requestId; private String sessionId; private long startTime; private String topTraceId; private int urgency; private String vendorInfos; private String vendorKey; private long wholeMS; @Override // com.nirvana.tools.jsoner.Jsoner public void fromJson(JSONObject jSONObject) { try { JSONUtils.fromJson(jSONObject, this, (List<Field>) null); setApiParams(JSONUtils.json2MapForStringString(jSONObject.optJSONObject("apiParams"))); } catch (Throwable th) { ExceptionProcessor.processException(th); } } public String getAccessCode() { try { return this.accessCode; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getAction() { try { return this.action; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getApiLevel() { try { return this.apiLevel; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public Map<String, String> getApiParams() { try { return this.apiParams; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getAuthSdkCode() { try { return this.authSdkCode; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getCarrierFailedResultData() { try { return this.carrierFailedResultData; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public long getCarrierReturnTime() { try { return this.carrierReturnTime; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String getCarrierSdkCode() { try { return this.carrierSdkCode; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getCarrierSdkMsg() { try { return this.carrierSdkMsg; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getCarrierTraceId() { try { return this.carrierTraceId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getCertifyId() { try { return this.certifyId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public long getEndTime() { try { return this.endTime; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String getFailRet() { try { return this.failRet; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getIsCache() { try { return this.isCache; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getNetworkType() { try { return this.networkType; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getPerformanceTrace() { try { return this.performanceTrace; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getPhoneNumber() { try { return this.phoneNumber; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getPrivateIp() { try { return this.privateIp; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getRequestId() { try { return this.requestId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getSessionId() { try { return this.sessionId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public long getStartTime() { try { return this.startTime; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String getTopTraceId() { try { return this.topTraceId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public int getUrgency() { try { return this.urgency; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String getVendorInfos() { try { return this.vendorInfos; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getVendorKey() { try { return this.vendorKey; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public long getWholeMS() { try { return this.wholeMS; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String isCache() { try { return this.isCache; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public boolean isSuccess() { try { return this.isSuccess; } catch (Throwable th) { ExceptionProcessor.processException(th); return false; } } public void putApiParam(String str, String str2) { try { if (this.apiParams == null) { this.apiParams = new HashMap(5); } this.apiParams.put(str, str2); } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setAccessCode(String str) { try { this.accessCode = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setAction(String str) { try { this.action = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setApiLevel(String str) { try { this.apiLevel = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setApiParams(Map<String, String> map) { try { this.apiParams = map; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setAuthSdkCode(String str) { try { this.authSdkCode = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCache(String str) { try { this.isCache = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCarrierFailedResultData(String str) { try { this.carrierFailedResultData = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCarrierReturnTime(long j) { try { this.carrierReturnTime = j; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCarrierSdkCode(String str) { try { this.carrierSdkCode = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCarrierSdkMsg(String str) { try { this.carrierSdkMsg = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCarrierTraceId(String str) { try { this.carrierTraceId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setCertifyId(String str) { try { this.certifyId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setEndTime(long j) { try { this.endTime = j; this.wholeMS = j - this.startTime; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setFailRet(String str) { try { this.failRet = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setIsCache(String str) { try { this.isCache = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setNetworkType(String str) { try { this.networkType = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setPerformanceTrace(String str) { try { this.performanceTrace = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setPhoneNumber(String str) { try { this.phoneNumber = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setPrivateIp(String str) { try { this.privateIp = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setRequestId(String str) { try { this.requestId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setSessionId(String str) { try { this.sessionId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setStartTime(long j) { try { this.startTime = j; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setSuccess(boolean z) { try { this.isSuccess = z; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setTopTraceId(String str) { try { this.topTraceId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setUrgency(int i) { try { this.urgency = i; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setVendorInfos(String str) { try { this.vendorInfos = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setVendorKey(String str) { try { this.vendorKey = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setWholeMS(long j) { try { this.wholeMS = j; } catch (Throwable th) { ExceptionProcessor.processException(th); } } @Override // com.nirvana.tools.jsoner.Jsoner public JSONObject toJson() { try { JSONObject json = JSONUtils.toJson(this, null); try { json.put("apiParams", new JSONObject(this.apiParams)); } catch (JSONException e) { e.printStackTrace(); } return json; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } }