com.jelastic.api.data.po.BuildProject Maven / Gradle / Ivy
The newest version!
/*Server class MD5: 6c40174806518ebd4b13e71ea5164c33*/
package com.jelastic.api.data.po;
import org.json.JSONException;
import org.json.JSONObject;
/**
* @name Jelastic API Client
* @version 8.11.2
* @copyright Jelastic, Inc.
*/
public class BuildProject {
public static final String ID = "id";
public static final String NAME = "name";
public static final String CONTEXT = "context";
private int id;
private String name;
private String context;
public BuildProject() {
}
public BuildProject(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
protected BuildProject getClone() {
return new BuildProject(this.name);
}
public JSONObject _toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put(ID, id);
json.put(NAME, name);
json.put(CONTEXT, context);
return json;
}
public BuildProject _fromJSON(JSONObject json) throws JSONException {
if (json.has(ID)) {
id = json.getInt(ID);
}
if (json.has(NAME)) {
name = json.getString(NAME);
}
if (json.has(CONTEXT)) {
context = json.getString(CONTEXT);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy