net.leanix.mtm.api.models.Setting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leanix-mtm-sdk-java Show documentation
Show all versions of leanix-mtm-sdk-java Show documentation
SDK for Java to access leanIX MTM REST API
package net.leanix.mtm.api.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import net.leanix.mtm.api.models.Account;
import net.leanix.mtm.api.models.Application;
import net.leanix.mtm.api.models.Contract;
import net.leanix.mtm.api.models.Link;
import net.leanix.mtm.api.models.Permission;
import net.leanix.mtm.api.models.User;
import net.leanix.mtm.api.models.Workspace;
public class Setting {
private String id = null;
private Account account = null;
private User user = null;
private Workspace workspace = null;
private Permission permission = null;
private Application application = null;
private Contract contract = null;
private String key = null;
private String value = null;
public enum TypeEnum {
SETUP("SETUP"),
CONFIG("CONFIG");
private String value;
TypeEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return value;
}
}
private TypeEnum type = null;
private String scope = null;
private List links = new ArrayList();
/**
**/
public Setting id(String id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/**
**/
public Setting account(Account account) {
this.account = account;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("account")
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
**/
public Setting user(User user) {
this.user = user;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("user")
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
/**
**/
public Setting workspace(Workspace workspace) {
this.workspace = workspace;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("workspace")
public Workspace getWorkspace() {
return workspace;
}
public void setWorkspace(Workspace workspace) {
this.workspace = workspace;
}
/**
**/
public Setting permission(Permission permission) {
this.permission = permission;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("permission")
public Permission getPermission() {
return permission;
}
public void setPermission(Permission permission) {
this.permission = permission;
}
/**
**/
public Setting application(Application application) {
this.application = application;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("application")
public Application getApplication() {
return application;
}
public void setApplication(Application application) {
this.application = application;
}
/**
**/
public Setting contract(Contract contract) {
this.contract = contract;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("contract")
public Contract getContract() {
return contract;
}
public void setContract(Contract contract) {
this.contract = contract;
}
/**
**/
public Setting key(String key) {
this.key = key;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("key")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
/**
**/
public Setting value(String value) {
this.value = value;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("value")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
/**
**/
public Setting type(TypeEnum type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("type")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("scope")
public String getScope() {
return scope;
}
/**
**/
public Setting links(List links) {
this.links = links;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("links")
public List getLinks() {
return links;
}
public void setLinks(List links) {
this.links = links;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Setting setting = (Setting) o;
return Objects.equals(this.id, setting.id) &&
Objects.equals(this.account, setting.account) &&
Objects.equals(this.user, setting.user) &&
Objects.equals(this.workspace, setting.workspace) &&
Objects.equals(this.permission, setting.permission) &&
Objects.equals(this.application, setting.application) &&
Objects.equals(this.contract, setting.contract) &&
Objects.equals(this.key, setting.key) &&
Objects.equals(this.value, setting.value) &&
Objects.equals(this.type, setting.type) &&
Objects.equals(this.scope, setting.scope) &&
Objects.equals(this.links, setting.links);
}
@Override
public int hashCode() {
return Objects.hash(id, account, user, workspace, permission, application, contract, key, value, type, scope, links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Setting {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" account: ").append(toIndentedString(account)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n");
sb.append(" permission: ").append(toIndentedString(permission)).append("\n");
sb.append(" application: ").append(toIndentedString(application)).append("\n");
sb.append(" contract: ").append(toIndentedString(contract)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy