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 com.nirvana.tools.jsoner.JsonerTag; import java.lang.reflect.Field; import java.util.List; import org.json.JSONObject; public class TopErrorResponse implements Jsoner { private int code; private String msg; @JsonerTag(keyName = "request_id") private String requestId; @JsonerTag(keyName = "sub_msg") private String subMsg; @Override // com.nirvana.tools.jsoner.Jsoner public void fromJson(JSONObject jSONObject) { try { JSONUtils.fromJson(jSONObject, this, (List<Field>) null); } catch (Throwable th) { ExceptionProcessor.processException(th); } } public int getCode() { try { return this.code; } catch (Throwable th) { ExceptionProcessor.processException(th); return -1; } } public String getMsg() { try { return this.msg; } 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 getSubMsg() { try { return this.subMsg; } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } public void setCode(int i) { try { this.code = i; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setMsg(String str) { try { this.msg = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setRequestId(String str) { try { this.requestId = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } public void setSubMsg(String str) { try { this.subMsg = str; } catch (Throwable th) { ExceptionProcessor.processException(th); } } @Override // com.nirvana.tools.jsoner.Jsoner public JSONObject toJson() { try { return JSONUtils.toJson(this, null); } catch (Throwable th) { ExceptionProcessor.processException(th); return null; } } }