com.jelastic.api.marketplace.response.ChecksumResponse Maven / Gradle / Ivy
The newest version!
/*Server class MD5: b3e6c5db2ee7526b750d3e3d6bd43183*/
package com.jelastic.api.marketplace.response;
import com.jelastic.api.response.ScriptEvalProxyResponse;
import org.json.JSONException;
import org.json.JSONObject;
/**
* @name Jelastic API Client
* @version 8.11.2
* @copyright Jelastic, Inc.
*/
public class ChecksumResponse extends ScriptEvalProxyResponse {
private String checksum = null;
public ChecksumResponse() {
super();
}
public ChecksumResponse(String checksum) {
super();
this.checksum = checksum;
}
public ChecksumResponse(int result, String error) {
super(result, error);
}
public String getChecksum() {
return checksum;
}
public void setChecksum(String checksum) {
this.checksum = checksum;
}
@Override
public JSONObject _toJSON(JSONObject json) throws JSONException {
if (checksum != null) {
json.put("checksum", checksum);
}
return json;
}
@Override
public ChecksumResponse _fromJSON(JSONObject json) throws JSONException {
super._fromJSON(json);
if (!(getResponse() instanceof JSONObject)) {
return this;
}
JSONObject responseJson = (JSONObject) getResponse();
if (responseJson.has("checksum")) {
this.checksum = responseJson.getString("checksum");
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy