io.swagger.client.model.Campaign Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticemail-RESTful-API Show documentation
Show all versions of elasticemail-RESTful-API Show documentation
Send your emails with ElasticEmail API
The newest version!
/*
* elasticemail_Restful_api
* Send your emails with ElasticEmail API
*
* OpenAPI spec version: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.CampaignOptions;
import io.swagger.client.model.CampaignRecipient;
import io.swagger.client.model.CampaignTemplate;
import io.swagger.client.model.TrackingOptions;
import java.io.IOException;
/**
* Campaign
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-03-29T15:32:30.861Z")
public class Campaign {
@SerializedName("CampaignTemplate")
private CampaignTemplate campaignTemplate = null;
@SerializedName("Name")
private String name = null;
/**
* Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
DELETED("Deleted"),
ACTIVE("Active"),
PROCESSING("Processing"),
SENDING("Sending"),
COMPLETED("Completed"),
PAUSED("Paused"),
CANCELLED("Cancelled"),
DRAFT("Draft");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("Status")
private StatusEnum status = null;
@SerializedName("Targets")
private CampaignRecipient targets = null;
@SerializedName("TrackingOptions")
private TrackingOptions trackingOptions = null;
@SerializedName("Options")
private CampaignOptions options = null;
public Campaign campaignTemplate(CampaignTemplate campaignTemplate) {
this.campaignTemplate = campaignTemplate;
return this;
}
/**
* Get campaignTemplate
* @return campaignTemplate
**/
@ApiModelProperty(required = true, value = "")
public CampaignTemplate getCampaignTemplate() {
return campaignTemplate;
}
public void setCampaignTemplate(CampaignTemplate campaignTemplate) {
this.campaignTemplate = campaignTemplate;
}
public Campaign name(String name) {
this.name = name;
return this;
}
/**
* Filename
* @return name
**/
@ApiModelProperty(example = "attachment.txt", required = true, value = "Filename")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Campaign status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
* @return status
**/
@ApiModelProperty(example = "Bounced", required = true, value = "Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public Campaign targets(CampaignRecipient targets) {
this.targets = targets;
return this;
}
/**
* Get targets
* @return targets
**/
@ApiModelProperty(required = true, value = "")
public CampaignRecipient getTargets() {
return targets;
}
public void setTargets(CampaignRecipient targets) {
this.targets = targets;
}
public Campaign trackingOptions(TrackingOptions trackingOptions) {
this.trackingOptions = trackingOptions;
return this;
}
/**
* Get trackingOptions
* @return trackingOptions
**/
@ApiModelProperty(required = true, value = "")
public TrackingOptions getTrackingOptions() {
return trackingOptions;
}
public void setTrackingOptions(TrackingOptions trackingOptions) {
this.trackingOptions = trackingOptions;
}
public Campaign options(CampaignOptions options) {
this.options = options;
return this;
}
/**
* Get options
* @return options
**/
@ApiModelProperty(required = true, value = "")
public CampaignOptions getOptions() {
return options;
}
public void setOptions(CampaignOptions options) {
this.options = options;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Campaign campaign = (Campaign) o;
return Objects.equals(this.campaignTemplate, campaign.campaignTemplate) &&
Objects.equals(this.name, campaign.name) &&
Objects.equals(this.status, campaign.status) &&
Objects.equals(this.targets, campaign.targets) &&
Objects.equals(this.trackingOptions, campaign.trackingOptions) &&
Objects.equals(this.options, campaign.options);
}
@Override
public int hashCode() {
return Objects.hash(campaignTemplate, name, status, targets, trackingOptions, options);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Campaign {\n");
sb.append(" campaignTemplate: ").append(toIndentedString(campaignTemplate)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" targets: ").append(toIndentedString(targets)).append("\n");
sb.append(" trackingOptions: ").append(toIndentedString(trackingOptions)).append("\n");
sb.append(" options: ").append(toIndentedString(options)).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