package com.mobile.auth.gatewayauth.model.ctcctoken; import android.text.TextUtils; import com.mobile.auth.gatewayauth.ExceptionProcessor; import com.nirvana.tools.jsoner.JSONUtils; import com.nirvana.tools.jsoner.JsonType; import com.nirvana.tools.jsoner.Jsoner; import java.lang.reflect.Field; import java.util.List; import org.json.JSONException; import org.json.JSONObject; public class CTCCTokenRet implements Jsoner { private Data data; private String msg; private String reqId; private int result; public static CTCCTokenRet fromJson(String str) { try { if (!TextUtils.isEmpty(str)) { JSONObject jSONObject = new JSONObject(str); CTCCTokenRet cTCCTokenRet = (CTCCTokenRet) JSONUtils.fromJson(jSONObject, (JsonType) new JsonType<CTCCTokenRet>() { /* class com.mobile.auth.gatewayauth.model.ctcctoken.CTCCTokenRet.AnonymousClass1 */ }, (List<Field>) null); cTCCTokenRet.setData((Data) JSONUtils.fromJson(jSONObject.optJSONObject("data"), (JsonType) new JsonType<Data>() { /* class com.mobile.auth.gatewayauth.model.ctcctoken.CTCCTokenRet.AnonymousClass2 */ }, (List<Field>) null)); return cTCCTokenRet; } } catch (JSONException e) { try { e.printStackTrace(); } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } return null; } @Override // com.nirvana.tools.jsoner.Jsoner public void fromJson(JSONObject jSONObject) { try { JSONUtils.fromJson(jSONObject, this, (List<Field>) null); if (jSONObject != null) { setData((Data) JSONUtils.fromJson(jSONObject.optJSONObject("data"), (JsonType) new JsonType<Data>() { /* class com.mobile.auth.gatewayauth.model.ctcctoken.CTCCTokenRet.AnonymousClass3 */ }, (List<Field>) null)); } } catch (Throwable th) { ExceptionProcessor.processException(th); } } public Data getData() { try { return this.data; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getMsg() { try { return this.msg; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public String getReqId() { try { return this.reqId; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public int getResult() { try { return this.result; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public void setData(Data data2) { try { this.data = data2; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setMsg(String str) { try { this.msg = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setReqId(String str) { try { this.reqId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setResult(int i) { try { this.result = i; } catch (Throwable th) { ExceptionProcessor.processException(th); } } @Override // com.nirvana.tools.jsoner.Jsoner public JSONObject toJson() { try { JSONObject json = JSONUtils.toJson(this, null); try { Data data2 = this.data; json.put("data", data2 == null ? new JSONObject() : data2.toJson()); } catch (JSONException e) { e.printStackTrace(); } return json; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } }