All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.swagger.client.model.ListPayload Maven / Gradle / Ivy

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 java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * ListPayload
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-03-29T15:32:30.861Z")
public class ListPayload {
  @SerializedName("ListName")
  private String listName = null;

  @SerializedName("CreateEmptyList")
  private Boolean createEmptyList = null;

  @SerializedName("AllowUnsubscribe")
  private Boolean allowUnsubscribe = null;

  @SerializedName("Emails")
  private List emails = new ArrayList();

  @SerializedName("AllContacts")
  private Boolean allContacts = null;

  @SerializedName("Rule")
  private String rule = null;

  public ListPayload listName(String listName) {
    this.listName = listName;
    return this;
  }

   /**
   * Name of your list.
   * @return listName
  **/
  @ApiModelProperty(example = "My List 1", required = true, value = "Name of your list.")
  public String getListName() {
    return listName;
  }

  public void setListName(String listName) {
    this.listName = listName;
  }

  public ListPayload createEmptyList(Boolean createEmptyList) {
    this.createEmptyList = createEmptyList;
    return this;
  }

   /**
   * True to create an empty list, otherwise false. Ignores rule and emails parameters if provided.
   * @return createEmptyList
  **/
  @ApiModelProperty(example = "false", required = true, value = "True to create an empty list, otherwise false. Ignores rule and emails parameters if provided.")
  public Boolean isCreateEmptyList() {
    return createEmptyList;
  }

  public void setCreateEmptyList(Boolean createEmptyList) {
    this.createEmptyList = createEmptyList;
  }

  public ListPayload allowUnsubscribe(Boolean allowUnsubscribe) {
    this.allowUnsubscribe = allowUnsubscribe;
    return this;
  }

   /**
   * True: Allow unsubscribing from this list. Otherwise, false
   * @return allowUnsubscribe
  **/
  @ApiModelProperty(example = "false", required = true, value = "True: Allow unsubscribing from this list. Otherwise, false")
  public Boolean isAllowUnsubscribe() {
    return allowUnsubscribe;
  }

  public void setAllowUnsubscribe(Boolean allowUnsubscribe) {
    this.allowUnsubscribe = allowUnsubscribe;
  }

  public ListPayload emails(List emails) {
    this.emails = emails;
    return this;
  }

  public ListPayload addEmailsItem(String emailsItem) {
    this.emails.add(emailsItem);
    return this;
  }

   /**
   * Comma delimited list of contact emails
   * @return emails
  **/
  @ApiModelProperty(required = true, value = "Comma delimited list of contact emails")
  public List getEmails() {
    return emails;
  }

  public void setEmails(List emails) {
    this.emails = emails;
  }

  public ListPayload allContacts(Boolean allContacts) {
    this.allContacts = allContacts;
    return this;
  }

   /**
   * True: Include every Contact in your Account. Otherwise, false
   * @return allContacts
  **/
  @ApiModelProperty(example = "false", value = "True: Include every Contact in your Account. Otherwise, false")
  public Boolean isAllContacts() {
    return allContacts;
  }

  public void setAllContacts(Boolean allContacts) {
    this.allContacts = allContacts;
  }

  public ListPayload rule(String rule) {
    this.rule = rule;
    return this;
  }

   /**
   * Query used for filtering.
   * @return rule
  **/
  @ApiModelProperty(example = "Status%20=%20Engaged", required = true, value = "Query used for filtering.")
  public String getRule() {
    return rule;
  }

  public void setRule(String rule) {
    this.rule = rule;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ListPayload listPayload = (ListPayload) o;
    return Objects.equals(this.listName, listPayload.listName) &&
        Objects.equals(this.createEmptyList, listPayload.createEmptyList) &&
        Objects.equals(this.allowUnsubscribe, listPayload.allowUnsubscribe) &&
        Objects.equals(this.emails, listPayload.emails) &&
        Objects.equals(this.allContacts, listPayload.allContacts) &&
        Objects.equals(this.rule, listPayload.rule);
  }

  @Override
  public int hashCode() {
    return Objects.hash(listName, createEmptyList, allowUnsubscribe, emails, allContacts, rule);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ListPayload {\n");
    
    sb.append("    listName: ").append(toIndentedString(listName)).append("\n");
    sb.append("    createEmptyList: ").append(toIndentedString(createEmptyList)).append("\n");
    sb.append("    allowUnsubscribe: ").append(toIndentedString(allowUnsubscribe)).append("\n");
    sb.append("    emails: ").append(toIndentedString(emails)).append("\n");
    sb.append("    allContacts: ").append(toIndentedString(allContacts)).append("\n");
    sb.append("    rule: ").append(toIndentedString(rule)).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