com.mypurecloud.sdk.model.CampaignRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-client Show documentation
Show all versions of platform-client Show documentation
The official Java SDK for the PureCloud Platform API SDK
The newest version!
package com.mypurecloud.sdk.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.mypurecloud.sdk.model.CampaignRuleAction;
import com.mypurecloud.sdk.model.CampaignRuleCondition;
import com.mypurecloud.sdk.model.CampaignRuleEntities;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.io.Serializable;
/**
* CampaignRule
*/
public class CampaignRule implements Serializable {
private String id = null;
private String name = null;
private Date dateCreated = null;
private Date dateModified = null;
private Integer version = null;
private CampaignRuleEntities campaignRuleEntities = null;
private List campaignRuleConditions = new ArrayList();
private List campaignRuleActions = new ArrayList();
private Boolean matchAnyConditions = null;
private Boolean enabled = null;
private String selfUri = null;
@ApiModelProperty(example = "null", value = "The globally unique identifier for the object.")
@JsonProperty("id")
public String getId() {
return id;
}
/**
**/
public CampaignRule name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ApiModelProperty(example = "null", value = "Creation time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("dateCreated")
public Date getDateCreated() {
return dateCreated;
}
@ApiModelProperty(example = "null", value = "Last modified time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("dateModified")
public Date getDateModified() {
return dateModified;
}
/**
* Required for updates, must match the version number of the most recent update
**/
public CampaignRule version(Integer version) {
this.version = version;
return this;
}
@ApiModelProperty(example = "null", value = "Required for updates, must match the version number of the most recent update")
@JsonProperty("version")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
/**
* the list of entities the rule monitors
**/
public CampaignRule campaignRuleEntities(CampaignRuleEntities campaignRuleEntities) {
this.campaignRuleEntities = campaignRuleEntities;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "the list of entities the rule monitors")
@JsonProperty("campaignRuleEntities")
public CampaignRuleEntities getCampaignRuleEntities() {
return campaignRuleEntities;
}
public void setCampaignRuleEntities(CampaignRuleEntities campaignRuleEntities) {
this.campaignRuleEntities = campaignRuleEntities;
}
/**
* the list of conditions the are evaluated
**/
public CampaignRule campaignRuleConditions(List campaignRuleConditions) {
this.campaignRuleConditions = campaignRuleConditions;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "the list of conditions the are evaluated")
@JsonProperty("campaignRuleConditions")
public List getCampaignRuleConditions() {
return campaignRuleConditions;
}
public void setCampaignRuleConditions(List campaignRuleConditions) {
this.campaignRuleConditions = campaignRuleConditions;
}
/**
* the list of actions that are executed if the conditions are satisfied
**/
public CampaignRule campaignRuleActions(List campaignRuleActions) {
this.campaignRuleActions = campaignRuleActions;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "the list of actions that are executed if the conditions are satisfied")
@JsonProperty("campaignRuleActions")
public List getCampaignRuleActions() {
return campaignRuleActions;
}
public void setCampaignRuleActions(List campaignRuleActions) {
this.campaignRuleActions = campaignRuleActions;
}
/**
**/
public CampaignRule matchAnyConditions(Boolean matchAnyConditions) {
this.matchAnyConditions = matchAnyConditions;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("matchAnyConditions")
public Boolean getMatchAnyConditions() {
return matchAnyConditions;
}
public void setMatchAnyConditions(Boolean matchAnyConditions) {
this.matchAnyConditions = matchAnyConditions;
}
/**
**/
public CampaignRule enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("enabled")
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
@ApiModelProperty(example = "null", value = "The URI for this object")
@JsonProperty("selfUri")
public String getSelfUri() {
return selfUri;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CampaignRule campaignRule = (CampaignRule) o;
return Objects.equals(this.id, campaignRule.id) &&
Objects.equals(this.name, campaignRule.name) &&
Objects.equals(this.dateCreated, campaignRule.dateCreated) &&
Objects.equals(this.dateModified, campaignRule.dateModified) &&
Objects.equals(this.version, campaignRule.version) &&
Objects.equals(this.campaignRuleEntities, campaignRule.campaignRuleEntities) &&
Objects.equals(this.campaignRuleConditions, campaignRule.campaignRuleConditions) &&
Objects.equals(this.campaignRuleActions, campaignRule.campaignRuleActions) &&
Objects.equals(this.matchAnyConditions, campaignRule.matchAnyConditions) &&
Objects.equals(this.enabled, campaignRule.enabled) &&
Objects.equals(this.selfUri, campaignRule.selfUri);
}
@Override
public int hashCode() {
return Objects.hash(id, name, dateCreated, dateModified, version, campaignRuleEntities, campaignRuleConditions, campaignRuleActions, matchAnyConditions, enabled, selfUri);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CampaignRule {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n");
sb.append(" dateModified: ").append(toIndentedString(dateModified)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" campaignRuleEntities: ").append(toIndentedString(campaignRuleEntities)).append("\n");
sb.append(" campaignRuleConditions: ").append(toIndentedString(campaignRuleConditions)).append("\n");
sb.append(" campaignRuleActions: ").append(toIndentedString(campaignRuleActions)).append("\n");
sb.append(" matchAnyConditions: ").append(toIndentedString(matchAnyConditions)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" selfUri: ").append(toIndentedString(selfUri)).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 ");
}
}