mesosphere.marathon.client.model.v2.App Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marathon-client Show documentation
Show all versions of marathon-client Show documentation
A Java API client for Mesosphere's Marathon.
package mesosphere.marathon.client.model.v2;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import mesosphere.marathon.client.utils.ModelUtils;
public class App {
private String id;
private String cmd;
private Integer instances;
private Double cpus;
private Double mem;
private Collection uris;
private List> constraints;
private Container container;
private Map env;
private String executor;
private List ports;
private Collection tasks;
private Integer tasksStaged;
private Integer tasksRunning;
private Collection healthChecks;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCmd() {
return cmd;
}
public void setCmd(String cmd) {
this.cmd = cmd;
}
public Integer getInstances() {
return instances;
}
public void setInstances(Integer instances) {
this.instances = instances;
}
public Double getCpus() {
return cpus;
}
public void setCpus(Double cpus) {
this.cpus = cpus;
}
public Double getMem() {
return mem;
}
public void setMem(Double mem) {
this.mem = mem;
}
public Collection getUris() {
return uris;
}
public void setUris(Collection uris) {
this.uris = uris;
}
public List> getConstraints() {
return constraints;
}
public void setConstraints(List> constraints) {
this.constraints = constraints;
}
public void addConstraint(String attribute, String operator, String value) {
if (this.constraints == null) {
this.constraints = new ArrayList>();
}
List constraint = new ArrayList(3);
constraint.add(attribute == null ? "" : attribute);
constraint.add(operator == null ? "" : operator);
constraint.add(value == null ? "" : value);
this.constraints.add(constraint);
}
public Container getContainer() {
return container;
}
public void setContainer(Container container) {
this.container = container;
}
public Map getEnv() {
return env;
}
public void setEnv(Map env) {
this.env = env;
}
public String getExecutor() {
return executor;
}
public void setExecutor(String executor) {
this.executor = executor;
}
public List getPorts() {
return ports;
}
public void setPorts(List ports) {
this.ports = ports;
}
public void addUri(String uri) {
if (this.uris == null) {
this.uris = new ArrayList();
}
this.uris.add(uri);
}
public void addPort(int port) {
if (this.ports == null) {
this.ports = new ArrayList();
}
this.ports.add(port);
}
public Collection getTasks() {
return tasks;
}
public void setTasks(Collection tasks) {
this.tasks = tasks;
}
public Integer getTasksStaged() {
return tasksStaged;
}
public void setTasksStaged(Integer tasksStaged) {
this.tasksStaged = tasksStaged;
}
public Integer getTasksRunning() {
return tasksRunning;
}
public void setTasksRunning(Integer tasksRunning) {
this.tasksRunning = tasksRunning;
}
public Collection getHealthChecks() {
return healthChecks;
}
public void setHealthChecks(Collection healthChecks) {
this.healthChecks = healthChecks;
}
@Override
public String toString() {
return ModelUtils.toString(this);
}
}