// Path: src/main/java/com/github/qcloudsms/httpclient/HTTPResponse.java
// public class HTTPResponse {
// 
//     public HTTPRequest request;
//     public int statusCode;
//     public String reason;
//     public String body;
//     public HashMap<String, String> headers;
// 
//     public HTTPResponse() {
//         this.headers = new HashMap<String, String>();
//     }
// 
//     public HTTPResponse(final int statusCode) {
//         this();
//         this.statusCode = statusCode;
//     }
// 
//     public HTTPResponse(final int statusCode, final String body) {
//         super();
//         this.statusCode = statusCode;
//         this.body = body;
//     }
// 
//     public HTTPResponse(final int statusCode, final String body, final String reason) {
//         super();
//         this.statusCode = statusCode;
//         this.body = body;
//         this.reason = reason;
//     }
// 
//     public HTTPResponse setStatusCode(int statusCode) {
//         this.statusCode = statusCode;
//         return this;
//     }
// 
//     public HTTPResponse setBody(String body) {
//         this.body = body;
//         return this;
//     }
// 
//     public HTTPResponse setReason(String reason) {
//         this.reason = reason;
//         return this;
//     }
// 
//     public HTTPResponse addHeader(String name, String value) {
//         headers.put(name, value);
//         return this;
//     }
// 
//     public HTTPResponse setRequest(HTTPRequest request) {
//         this.request = request;
//         return this;
//     }
// }


import com.github.qcloudsms.httpclient.HTTPResponse;
import org.json.JSONObject;
import org.json.JSONException;
package com.github.qcloudsms;




public class TtsVoiceSenderResult extends SmsResultBase {

    public int result;
    public String errMsg;
    public String ext;
    public String callid;

    public TtsVoiceSenderResult() {
        this.errMsg = "";
        this.ext = "";
        this.callid = "";
    }

    @Override
    public TtsVoiceSenderResult parseFromHTTPResponse(HTTPResponse response)
            throws JSONException {

        JSONObject json = parseToJson(response);

        result = json.getInt("result");
        errMsg = json.getString("errmsg");

        if (json.has("ext")) {
            ext = json.getString("ext");
        }
// Path: src/main/java/com/github/qcloudsms/httpclient/HTTPResponse.java
// public class HTTPResponse {
// 
//     public HTTPRequest request;
//     public int statusCode;
//     public String reason;
//     public String body;
//     public HashMap<String, String> headers;
// 
//     public HTTPResponse() {
//         this.headers = new HashMap<String, String>();
//     }
// 
//     public HTTPResponse(final int statusCode) {
//         this();
//         this.statusCode = statusCode;
//     }
// 
//     public HTTPResponse(final int statusCode, final String body) {
//         super();
//         this.statusCode = statusCode;
//         this.body = body;
//     }
// 
//     public HTTPResponse(final int statusCode, final String body, final String reason) {
//         super();
//         this.statusCode = statusCode;
//         this.body = body;
//         this.reason = reason;
//     }
// 
//     public HTTPResponse setStatusCode(int statusCode) {
//         this.statusCode = statusCode;
//         return this;
//     }
// 
//     public HTTPResponse setBody(String body) {
//         this.body = body;
//         return this;
//     }
// 
//     public HTTPResponse setReason(String reason) {
//         this.reason = reason;
//         return this;
//     }
// 
//     public HTTPResponse addHeader(String name, String value) {
//         headers.put(name, value);
//         return this;
//     }
// 
//     public HTTPResponse setRequest(HTTPRequest request) {
//         this.request = request;
//         return this;
//     }
// }


// Path: src/main/java/com/github/qcloudsms/TtsVoiceSenderResult.java
import com.github.qcloudsms.httpclient.HTTPResponse;
import org.json.JSONObject;
import org.json.JSONException;

package com.github.qcloudsms;




public class TtsVoiceSenderResult extends SmsResultBase {

    public int result;
    public String errMsg;
    public String ext;
    public String callid;

    public TtsVoiceSenderResult() {
        this.errMsg = "";
        this.ext = "";
        this.callid = "";
    }

    @Override
    public TtsVoiceSenderResult parseFromHTTPResponse(HTTPResponse response)
            throws JSONException {

        JSONObject json = parseToJson(response);

        result = json.getInt("result");
        errMsg = json.getString("errmsg");

        if (json.has("ext")) {
            ext = json.getString("ext");
        }
        if (json.has("callid")) {