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