
com.jelastic.api.system.persistence.PcsCluster Maven / Gradle / Ivy
/*Server class MD5: ed1d90d0695323e6b791ddfd6f0b1aa1*/
package com.jelastic.api.system.persistence;
import com.jelastic.api.common.annotation.Transform;
import com.jelastic.api.development.response.interfaces.ArrayItem;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashSet;
import java.util.Set;
/**
* @name Jelastic API Client
* @version 8.11.2
* @copyright Jelastic, Inc.
*/
public class PcsCluster extends ArrayItem {
private String name;
@Transform(skip = true)
private String password = "";
@Transform(skip = true)
private String clusterKey;
private Set hardwareNodeClusters = new HashSet();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
if (password == null) {
password = "";
}
this.password = password;
}
public Set getHardwareNodeClusters() {
return hardwareNodeClusters;
}
public void setHardwareNodeClusters(Set hardwareNodeClusters) {
this.hardwareNodeClusters = hardwareNodeClusters;
}
public String getClusterKey() {
return clusterKey;
}
public void setClusterKey(String clusterKey) {
this.clusterKey = clusterKey;
}
@Override
public JSONObject _toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put("name", name);
return json;
}
@Override
public PcsCluster _fromJSON(JSONObject json) throws JSONException {
if (json.has("name")) {
this.name = json.getString("name");
}
if (json.has("password")) {
this.password = json.getString("password");
}
if (json.has("clusterKey")) {
this.clusterKey = json.getString("clusterKey");
}
return this;
}
@Override
public String toString() {
try {
return this._toJSON().toString();
} catch (JSONException e) {
e.printStackTrace();
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy