net.leanix.mtm.api.models.Contract 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.Date;
import java.util.List;
import net.leanix.mtm.api.models.Account;
import net.leanix.mtm.api.models.Application;
import net.leanix.mtm.api.models.Feature;
import net.leanix.mtm.api.models.Link;
import net.leanix.mtm.api.models.ModulePurchase;
public class Contract {
private String id = null;
private String featureBundleId = null;
private Date startDate = null;
private Date endDate = null;
public enum TypeEnum {
REGULAR("REGULAR"),
TRIAL("TRIAL");
private String value;
TypeEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return value;
}
}
private TypeEnum type = null;
public enum StatusEnum {
ACTIVE("ACTIVE"),
BLOCKED("BLOCKED");
private String value;
StatusEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return value;
}
}
private StatusEnum status = null;
private String comment = null;
private List customFeatures = new ArrayList();
private List modulePurchases = new ArrayList();
private Account account = null;
private Application application = null;
private String displayName = null;
private Boolean active = false;
private List links = new ArrayList();
/**
**/
public Contract 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 Contract featureBundleId(String featureBundleId) {
this.featureBundleId = featureBundleId;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("featureBundleId")
public String getFeatureBundleId() {
return featureBundleId;
}
public void setFeatureBundleId(String featureBundleId) {
this.featureBundleId = featureBundleId;
}
/**
**/
public Contract startDate(Date startDate) {
this.startDate = startDate;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("startDate")
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
/**
**/
public Contract endDate(Date endDate) {
this.endDate = endDate;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("endDate")
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
**/
public Contract 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;
}
/**
**/
public Contract status(StatusEnum status) {
this.status = status;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
**/
public Contract comment(String comment) {
this.comment = comment;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("comment")
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
/**
**/
public Contract customFeatures(List customFeatures) {
this.customFeatures = customFeatures;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("customFeatures")
public List getCustomFeatures() {
return customFeatures;
}
public void setCustomFeatures(List customFeatures) {
this.customFeatures = customFeatures;
}
/**
**/
public Contract modulePurchases(List modulePurchases) {
this.modulePurchases = modulePurchases;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("modulePurchases")
public List getModulePurchases() {
return modulePurchases;
}
public void setModulePurchases(List modulePurchases) {
this.modulePurchases = modulePurchases;
}
/**
**/
public Contract 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 Contract application(Application application) {
this.application = application;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("application")
public Application getApplication() {
return application;
}
public void setApplication(Application application) {
this.application = application;
}
@ApiModelProperty(example = "null", value = "An artifical name describing the contract.")
@JsonProperty("displayName")
public String getDisplayName() {
return displayName;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("active")
public Boolean getActive() {
return active;
}
/**
**/
public Contract 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;
}
Contract contract = (Contract) o;
return Objects.equals(this.id, contract.id) &&
Objects.equals(this.featureBundleId, contract.featureBundleId) &&
Objects.equals(this.startDate, contract.startDate) &&
Objects.equals(this.endDate, contract.endDate) &&
Objects.equals(this.type, contract.type) &&
Objects.equals(this.status, contract.status) &&
Objects.equals(this.comment, contract.comment) &&
Objects.equals(this.customFeatures, contract.customFeatures) &&
Objects.equals(this.modulePurchases, contract.modulePurchases) &&
Objects.equals(this.account, contract.account) &&
Objects.equals(this.application, contract.application) &&
Objects.equals(this.displayName, contract.displayName) &&
Objects.equals(this.active, contract.active) &&
Objects.equals(this.links, contract.links);
}
@Override
public int hashCode() {
return Objects.hash(id, featureBundleId, startDate, endDate, type, status, comment, customFeatures, modulePurchases, account, application, displayName, active, links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Contract {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" featureBundleId: ").append(toIndentedString(featureBundleId)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" comment: ").append(toIndentedString(comment)).append("\n");
sb.append(" customFeatures: ").append(toIndentedString(customFeatures)).append("\n");
sb.append(" modulePurchases: ").append(toIndentedString(modulePurchases)).append("\n");
sb.append(" account: ").append(toIndentedString(account)).append("\n");
sb.append(" application: ").append(toIndentedString(application)).append("\n");
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
sb.append(" active: ").append(toIndentedString(active)).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