All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jelastic.api.configuration.response.ApplySecretsResponse Maven / Gradle / Ivy

The newest version!
/*Server class MD5: df07341e48fdf782c06f50be428ec8b7*/
package com.jelastic.api.configuration.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 ApplySecretsResponse extends ScriptEvalProxyResponse {

    private Integer created = null;

    private Integer updated = null;

    public ApplySecretsResponse() {
        super();
    }

    public ApplySecretsResponse(Integer created, Integer updated) {
        super();
        this.created = created;
        this.updated = updated;
    }

    public ApplySecretsResponse(int result, String error) {
        super(result, error);
    }

    public Integer getCreated() {
        return created;
    }

    public void setCreated(Integer created) {
        this.created = created;
    }

    public Integer getUpdated() {
        return updated;
    }

    public void setUpdated(Integer updated) {
        this.updated = updated;
    }

    @Override
    public JSONObject _toJSON(JSONObject json) throws JSONException {
        if (created != null) {
            json.put("created", created);
        }
        if (updated != null) {
            json.put("updated", updated);
        }
        return json;
    }

    @Override
    public ApplySecretsResponse _fromJSON(JSONObject json) throws JSONException {
        super._fromJSON(json);
        if (!(getResponse() instanceof JSONObject)) {
            return this;
        }
        JSONObject responseJson = (JSONObject) getResponse();
        if (responseJson.has("created")) {
            this.created = responseJson.getInt("created");
        }
        if (responseJson.has("updated")) {
            this.updated = responseJson.getInt("updated");
        }
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy