/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.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.HashMap;
import java.util.List;
import java.util.Map;

/**
 * EmailNotificationDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class EmailNotificationDto {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private Long id;

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private String code;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_UPDATED_CODE = "updatedCode";
  @SerializedName(SERIALIZED_NAME_UPDATED_CODE)
  private String updatedCode;

  public static final String SERIALIZED_NAME_DISABLED = "disabled";
  @SerializedName(SERIALIZED_NAME_DISABLED)
  private Boolean disabled;

  public static final String SERIALIZED_NAME_CLASS_NAME_FILTER = "classNameFilter";
  @SerializedName(SERIALIZED_NAME_CLASS_NAME_FILTER)
  private String classNameFilter;

  /**
   * Gets or Sets eventTypeFilter
   */
  @JsonAdapter(EventTypeFilterEnum.Adapter.class)
  public enum EventTypeFilterEnum {
    CREATED("CREATED"),
    
    UPDATED("UPDATED"),
    
    REMOVED("REMOVED"),
    
    TERMINATED("TERMINATED"),
    
    DISABLED("DISABLED"),
    
    PROCESSED("PROCESSED"),
    
    REJECTED("REJECTED"),
    
    REJECTED_CDR("REJECTED_CDR"),
    
    LOGGED_IN("LOGGED_IN"),
    
    INBOUND_REQ("INBOUND_REQ"),
    
    ENABLED("ENABLED"),
    
    LOW_BALANCE("LOW_BALANCE"),
    
    FILE_UPLOAD("FILE_UPLOAD"),
    
    FILE_DOWNLOAD("FILE_DOWNLOAD"),
    
    FILE_RENAME("FILE_RENAME"),
    
    FILE_DELETE("FILE_DELETE"),
    
    COUNTER_DEDUCED("COUNTER_DEDUCED"),
    
    END_OF_TERM("END_OF_TERM"),
    
    STATUS_UPDATED("STATUS_UPDATED"),
    
    RENEWAL_UPDATED("RENEWAL_UPDATED");

    private String value;

    EventTypeFilterEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static EventTypeFilterEnum fromValue(String value) {
      for (EventTypeFilterEnum b : EventTypeFilterEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<EventTypeFilterEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final EventTypeFilterEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public EventTypeFilterEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return EventTypeFilterEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_EVENT_TYPE_FILTER = "eventTypeFilter";
  @SerializedName(SERIALIZED_NAME_EVENT_TYPE_FILTER)
  private EventTypeFilterEnum eventTypeFilter;

  public static final String SERIALIZED_NAME_EL_FILTER = "elFilter";
  @SerializedName(SERIALIZED_NAME_EL_FILTER)
  private String elFilter;

  public static final String SERIALIZED_NAME_SCRIPT_INSTANCE_CODE = "scriptInstanceCode";
  @SerializedName(SERIALIZED_NAME_SCRIPT_INSTANCE_CODE)
  private String scriptInstanceCode;

  public static final String SERIALIZED_NAME_SCRIPT_PARAMS = "scriptParams";
  @SerializedName(SERIALIZED_NAME_SCRIPT_PARAMS)
  private Map<String, String> scriptParams = null;

  public static final String SERIALIZED_NAME_COUNTER_TEMPLATE = "counterTemplate";
  @SerializedName(SERIALIZED_NAME_COUNTER_TEMPLATE)
  private String counterTemplate;

  public static final String SERIALIZED_NAME_PRIORITY = "priority";
  @SerializedName(SERIALIZED_NAME_PRIORITY)
  private Integer priority;

  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_RUN_ASYNC = "runAsync";
  @SerializedName(SERIALIZED_NAME_RUN_ASYNC)
  private Boolean runAsync;

  public static final String SERIALIZED_NAME_EMAIL_FROM = "emailFrom";
  @SerializedName(SERIALIZED_NAME_EMAIL_FROM)
  private String emailFrom;

  public static final String SERIALIZED_NAME_EMAIL_TO_EL = "emailToEl";
  @SerializedName(SERIALIZED_NAME_EMAIL_TO_EL)
  private String emailToEl;

  public static final String SERIALIZED_NAME_SUBJECT = "subject";
  @SerializedName(SERIALIZED_NAME_SUBJECT)
  private String subject;

  public static final String SERIALIZED_NAME_BODY = "body";
  @SerializedName(SERIALIZED_NAME_BODY)
  private String body;

  public static final String SERIALIZED_NAME_HTML_BODY = "htmlBody";
  @SerializedName(SERIALIZED_NAME_HTML_BODY)
  private String htmlBody;

  public static final String SERIALIZED_NAME_SEND_TO_MAIL = "sendToMail";
  @SerializedName(SERIALIZED_NAME_SEND_TO_MAIL)
  private List<String> sendToMail = null;


  public EmailNotificationDto id(Long id) {
    
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Long getId() {
    return id;
  }



  public void setId(Long id) {
    this.id = id;
  }


  public EmailNotificationDto code(String code) {
    
    this.code = code;
    return this;
  }

   /**
   * Get code
   * @return code
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getCode() {
    return code;
  }



  public void setCode(String code) {
    this.code = code;
  }


  public EmailNotificationDto description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * Get description
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getDescription() {
    return description;
  }



  public void setDescription(String description) {
    this.description = description;
  }


  public EmailNotificationDto updatedCode(String updatedCode) {
    
    this.updatedCode = updatedCode;
    return this;
  }

   /**
   * Get updatedCode
   * @return updatedCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getUpdatedCode() {
    return updatedCode;
  }



  public void setUpdatedCode(String updatedCode) {
    this.updatedCode = updatedCode;
  }


  public EmailNotificationDto disabled(Boolean disabled) {
    
    this.disabled = disabled;
    return this;
  }

   /**
   * Get disabled
   * @return disabled
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getDisabled() {
    return disabled;
  }



  public void setDisabled(Boolean disabled) {
    this.disabled = disabled;
  }


  public EmailNotificationDto classNameFilter(String classNameFilter) {
    
    this.classNameFilter = classNameFilter;
    return this;
  }

   /**
   * Get classNameFilter
   * @return classNameFilter
  **/
  @ApiModelProperty(required = true, value = "")

  public String getClassNameFilter() {
    return classNameFilter;
  }



  public void setClassNameFilter(String classNameFilter) {
    this.classNameFilter = classNameFilter;
  }


  public EmailNotificationDto eventTypeFilter(EventTypeFilterEnum eventTypeFilter) {
    
    this.eventTypeFilter = eventTypeFilter;
    return this;
  }

   /**
   * Get eventTypeFilter
   * @return eventTypeFilter
  **/
  @ApiModelProperty(required = true, value = "")

  public EventTypeFilterEnum getEventTypeFilter() {
    return eventTypeFilter;
  }



  public void setEventTypeFilter(EventTypeFilterEnum eventTypeFilter) {
    this.eventTypeFilter = eventTypeFilter;
  }


  public EmailNotificationDto elFilter(String elFilter) {
    
    this.elFilter = elFilter;
    return this;
  }

   /**
   * Get elFilter
   * @return elFilter
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getElFilter() {
    return elFilter;
  }



  public void setElFilter(String elFilter) {
    this.elFilter = elFilter;
  }


  public EmailNotificationDto scriptInstanceCode(String scriptInstanceCode) {
    
    this.scriptInstanceCode = scriptInstanceCode;
    return this;
  }

   /**
   * Get scriptInstanceCode
   * @return scriptInstanceCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getScriptInstanceCode() {
    return scriptInstanceCode;
  }



  public void setScriptInstanceCode(String scriptInstanceCode) {
    this.scriptInstanceCode = scriptInstanceCode;
  }


  public EmailNotificationDto scriptParams(Map<String, String> scriptParams) {
    
    this.scriptParams = scriptParams;
    return this;
  }

  public EmailNotificationDto putScriptParamsItem(String key, String scriptParamsItem) {
    if (this.scriptParams == null) {
      this.scriptParams = new HashMap<String, String>();
    }
    this.scriptParams.put(key, scriptParamsItem);
    return this;
  }

   /**
   * Get scriptParams
   * @return scriptParams
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Map<String, String> getScriptParams() {
    return scriptParams;
  }



  public void setScriptParams(Map<String, String> scriptParams) {
    this.scriptParams = scriptParams;
  }


  public EmailNotificationDto counterTemplate(String counterTemplate) {
    
    this.counterTemplate = counterTemplate;
    return this;
  }

   /**
   * Get counterTemplate
   * @return counterTemplate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getCounterTemplate() {
    return counterTemplate;
  }



  public void setCounterTemplate(String counterTemplate) {
    this.counterTemplate = counterTemplate;
  }


  public EmailNotificationDto priority(Integer priority) {
    
    this.priority = priority;
    return this;
  }

   /**
   * Get priority
   * @return priority
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Integer getPriority() {
    return priority;
  }



  public void setPriority(Integer priority) {
    this.priority = priority;
  }


  public EmailNotificationDto active(Boolean active) {
    
    this.active = active;
    return this;
  }

   /**
   * Get active
   * @return active
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getActive() {
    return active;
  }



  public void setActive(Boolean active) {
    this.active = active;
  }


  public EmailNotificationDto runAsync(Boolean runAsync) {
    
    this.runAsync = runAsync;
    return this;
  }

   /**
   * Get runAsync
   * @return runAsync
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Boolean getRunAsync() {
    return runAsync;
  }



  public void setRunAsync(Boolean runAsync) {
    this.runAsync = runAsync;
  }


  public EmailNotificationDto emailFrom(String emailFrom) {
    
    this.emailFrom = emailFrom;
    return this;
  }

   /**
   * Get emailFrom
   * @return emailFrom
  **/
  @ApiModelProperty(required = true, value = "")

  public String getEmailFrom() {
    return emailFrom;
  }



  public void setEmailFrom(String emailFrom) {
    this.emailFrom = emailFrom;
  }


  public EmailNotificationDto emailToEl(String emailToEl) {
    
    this.emailToEl = emailToEl;
    return this;
  }

   /**
   * Get emailToEl
   * @return emailToEl
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getEmailToEl() {
    return emailToEl;
  }



  public void setEmailToEl(String emailToEl) {
    this.emailToEl = emailToEl;
  }


  public EmailNotificationDto subject(String subject) {
    
    this.subject = subject;
    return this;
  }

   /**
   * Get subject
   * @return subject
  **/
  @ApiModelProperty(required = true, value = "")

  public String getSubject() {
    return subject;
  }



  public void setSubject(String subject) {
    this.subject = subject;
  }


  public EmailNotificationDto body(String body) {
    
    this.body = body;
    return this;
  }

   /**
   * Get body
   * @return body
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getBody() {
    return body;
  }



  public void setBody(String body) {
    this.body = body;
  }


  public EmailNotificationDto htmlBody(String htmlBody) {
    
    this.htmlBody = htmlBody;
    return this;
  }

   /**
   * Get htmlBody
   * @return htmlBody
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getHtmlBody() {
    return htmlBody;
  }



  public void setHtmlBody(String htmlBody) {
    this.htmlBody = htmlBody;
  }


  public EmailNotificationDto sendToMail(List<String> sendToMail) {
    
    this.sendToMail = sendToMail;
    return this;
  }

  public EmailNotificationDto addSendToMailItem(String sendToMailItem) {
    if (this.sendToMail == null) {
      this.sendToMail = new ArrayList<String>();
    }
    this.sendToMail.add(sendToMailItem);
    return this;
  }

   /**
   * Get sendToMail
   * @return sendToMail
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List<String> getSendToMail() {
    return sendToMail;
  }



  public void setSendToMail(List<String> sendToMail) {
    this.sendToMail = sendToMail;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EmailNotificationDto emailNotificationDto = (EmailNotificationDto) o;
    return Objects.equals(this.id, emailNotificationDto.id) &&
        Objects.equals(this.code, emailNotificationDto.code) &&
        Objects.equals(this.description, emailNotificationDto.description) &&
        Objects.equals(this.updatedCode, emailNotificationDto.updatedCode) &&
        Objects.equals(this.disabled, emailNotificationDto.disabled) &&
        Objects.equals(this.classNameFilter, emailNotificationDto.classNameFilter) &&
        Objects.equals(this.eventTypeFilter, emailNotificationDto.eventTypeFilter) &&
        Objects.equals(this.elFilter, emailNotificationDto.elFilter) &&
        Objects.equals(this.scriptInstanceCode, emailNotificationDto.scriptInstanceCode) &&
        Objects.equals(this.scriptParams, emailNotificationDto.scriptParams) &&
        Objects.equals(this.counterTemplate, emailNotificationDto.counterTemplate) &&
        Objects.equals(this.priority, emailNotificationDto.priority) &&
        Objects.equals(this.active, emailNotificationDto.active) &&
        Objects.equals(this.runAsync, emailNotificationDto.runAsync) &&
        Objects.equals(this.emailFrom, emailNotificationDto.emailFrom) &&
        Objects.equals(this.emailToEl, emailNotificationDto.emailToEl) &&
        Objects.equals(this.subject, emailNotificationDto.subject) &&
        Objects.equals(this.body, emailNotificationDto.body) &&
        Objects.equals(this.htmlBody, emailNotificationDto.htmlBody) &&
        Objects.equals(this.sendToMail, emailNotificationDto.sendToMail);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, classNameFilter, eventTypeFilter, elFilter, scriptInstanceCode, scriptParams, counterTemplate, priority, active, runAsync, emailFrom, emailToEl, subject, body, htmlBody, sendToMail);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class EmailNotificationDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    updatedCode: ").append(toIndentedString(updatedCode)).append("\n");
    sb.append("    disabled: ").append(toIndentedString(disabled)).append("\n");
    sb.append("    classNameFilter: ").append(toIndentedString(classNameFilter)).append("\n");
    sb.append("    eventTypeFilter: ").append(toIndentedString(eventTypeFilter)).append("\n");
    sb.append("    elFilter: ").append(toIndentedString(elFilter)).append("\n");
    sb.append("    scriptInstanceCode: ").append(toIndentedString(scriptInstanceCode)).append("\n");
    sb.append("    scriptParams: ").append(toIndentedString(scriptParams)).append("\n");
    sb.append("    counterTemplate: ").append(toIndentedString(counterTemplate)).append("\n");
    sb.append("    priority: ").append(toIndentedString(priority)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    runAsync: ").append(toIndentedString(runAsync)).append("\n");
    sb.append("    emailFrom: ").append(toIndentedString(emailFrom)).append("\n");
    sb.append("    emailToEl: ").append(toIndentedString(emailToEl)).append("\n");
    sb.append("    subject: ").append(toIndentedString(subject)).append("\n");
    sb.append("    body: ").append(toIndentedString(body)).append("\n");
    sb.append("    htmlBody: ").append(toIndentedString(htmlBody)).append("\n");
    sb.append("    sendToMail: ").append(toIndentedString(sendToMail)).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    ");
  }

}

