cloud.genesys.webmessaging.sdk.model.ContentGeneric Maven / Gradle / Ivy
package cloud.genesys.webmessaging.sdk.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.util.Objects;
import java.io.IOException;
import cloud.genesys.webmessaging.sdk.model.ButtonComponent;
import cloud.genesys.webmessaging.sdk.model.ContentActions;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
/**
* Generic content (Deprecated). Deprecated, should use Card.
*/
@ApiModel(description = "Generic content (Deprecated). Deprecated, should use Card.")
public class ContentGeneric implements Serializable {
private ContentActions actions = null;
private List components = new ArrayList();
private String description = null;
private String id = null;
private String image = null;
private String title = null;
private String video = null;
/**
* Actions to be taken (Deprecated).
**/
public ContentGeneric actions(ContentActions actions) {
this.actions = actions;
return this;
}
@ApiModelProperty(example = "null", value = "Actions to be taken (Deprecated).")
@JsonProperty("actions")
public ContentActions getActions() {
return actions;
}
public void setActions(ContentActions actions) {
this.actions = actions;
}
/**
* An array of component objects.
**/
public ContentGeneric components(List components) {
this.components = components;
return this;
}
@ApiModelProperty(example = "null", value = "An array of component objects.")
@JsonProperty("components")
public List getComponents() {
return components;
}
public void setComponents(List components) {
this.components = components;
}
/**
* Text to show in the description.
**/
public ContentGeneric description(String description) {
this.description = description;
return this;
}
@ApiModelProperty(example = "null", value = "Text to show in the description.")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
* A unique ID assigned to this rich message content (Deprecated).
**/
public ContentGeneric id(String id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "A unique ID assigned to this rich message content (Deprecated).")
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/**
* URL of an image.
**/
public ContentGeneric image(String image) {
this.image = image;
return this;
}
@ApiModelProperty(example = "null", value = "URL of an image.")
@JsonProperty("image")
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
/**
* Text to show in the title.
**/
public ContentGeneric title(String title) {
this.title = title;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "Text to show in the title.")
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
/**
* URL of a video.
**/
public ContentGeneric video(String video) {
this.video = video;
return this;
}
@ApiModelProperty(example = "null", value = "URL of a video.")
@JsonProperty("video")
public String getVideo() {
return video;
}
public void setVideo(String video) {
this.video = video;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContentGeneric contentGeneric = (ContentGeneric) o;
return Objects.equals(this.actions, contentGeneric.actions) &&
Objects.equals(this.components, contentGeneric.components) &&
Objects.equals(this.description, contentGeneric.description) &&
Objects.equals(this.id, contentGeneric.id) &&
Objects.equals(this.image, contentGeneric.image) &&
Objects.equals(this.title, contentGeneric.title) &&
Objects.equals(this.video, contentGeneric.video);
}
@Override
public int hashCode() {
return Objects.hash(actions, components, description, id, image, title, video);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ContentGeneric {\n");
sb.append(" actions: ").append(toIndentedString(actions)).append("\n");
sb.append(" components: ").append(toIndentedString(components)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" video: ").append(toIndentedString(video)).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 ");
}
}