/*
 * 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 org.threeten.bp.OffsetDateTime;

/**
 * EmailTemplateDto
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-13T10:03:17.753Z[GMT]")
public class EmailTemplateDto {
  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;

  /**
   * Gets or Sets media
   */
  @JsonAdapter(MediaEnum.Adapter.class)
  public enum MediaEnum {
    POSTAL_MAIL("POSTAL_MAIL"),
    
    EMAIL("EMAIL"),
    
    SMS("SMS"),
    
    IM("IM"),
    
    FAX("FAX"),
    
    VOICE("VOICE"),
    
    WEBSERVICE("WEBSERVICE"),
    
    QUEUE("QUEUE"),
    
    FTP_FILE("FTP_FILE"),
    
    CFT_FILE("CFT_FILE"),
    
    DATABASE("DATABASE");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_MEDIA = "media";
  @SerializedName(SERIALIZED_NAME_MEDIA)
  private MediaEnum media;

  public static final String SERIALIZED_NAME_TAG_START_DELIMITER = "tagStartDelimiter";
  @SerializedName(SERIALIZED_NAME_TAG_START_DELIMITER)
  private String tagStartDelimiter;

  public static final String SERIALIZED_NAME_TAG_END_DELIMITER = "tagEndDelimiter";
  @SerializedName(SERIALIZED_NAME_TAG_END_DELIMITER)
  private String tagEndDelimiter;

  public static final String SERIALIZED_NAME_START_DATE = "startDate";
  @SerializedName(SERIALIZED_NAME_START_DATE)
  private OffsetDateTime startDate;

  public static final String SERIALIZED_NAME_END_DATE = "endDate";
  @SerializedName(SERIALIZED_NAME_END_DATE)
  private OffsetDateTime endDate;

  /**
   * Gets or Sets type
   */
  @JsonAdapter(TypeEnum.Adapter.class)
  public enum TypeEnum {
    DUNNING("DUNNING"),
    
    INVOICE("INVOICE"),
    
    OTHER("OTHER");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private TypeEnum type;

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

  public static final String SERIALIZED_NAME_HTML_CONTENT = "htmlContent";
  @SerializedName(SERIALIZED_NAME_HTML_CONTENT)
  private String htmlContent;

  public static final String SERIALIZED_NAME_TEXT_CONTENT = "textContent";
  @SerializedName(SERIALIZED_NAME_TEXT_CONTENT)
  private String textContent;


  public EmailTemplateDto 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 EmailTemplateDto 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 EmailTemplateDto 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 EmailTemplateDto 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 EmailTemplateDto media(MediaEnum media) {
    
    this.media = media;
    return this;
  }

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

  public MediaEnum getMedia() {
    return media;
  }



  public void setMedia(MediaEnum media) {
    this.media = media;
  }


  public EmailTemplateDto tagStartDelimiter(String tagStartDelimiter) {
    
    this.tagStartDelimiter = tagStartDelimiter;
    return this;
  }

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

  public String getTagStartDelimiter() {
    return tagStartDelimiter;
  }



  public void setTagStartDelimiter(String tagStartDelimiter) {
    this.tagStartDelimiter = tagStartDelimiter;
  }


  public EmailTemplateDto tagEndDelimiter(String tagEndDelimiter) {
    
    this.tagEndDelimiter = tagEndDelimiter;
    return this;
  }

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

  public String getTagEndDelimiter() {
    return tagEndDelimiter;
  }



  public void setTagEndDelimiter(String tagEndDelimiter) {
    this.tagEndDelimiter = tagEndDelimiter;
  }


  public EmailTemplateDto startDate(OffsetDateTime startDate) {
    
    this.startDate = startDate;
    return this;
  }

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

  public OffsetDateTime getStartDate() {
    return startDate;
  }



  public void setStartDate(OffsetDateTime startDate) {
    this.startDate = startDate;
  }


  public EmailTemplateDto endDate(OffsetDateTime endDate) {
    
    this.endDate = endDate;
    return this;
  }

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

  public OffsetDateTime getEndDate() {
    return endDate;
  }



  public void setEndDate(OffsetDateTime endDate) {
    this.endDate = endDate;
  }


  public EmailTemplateDto type(TypeEnum type) {
    
    this.type = type;
    return this;
  }

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

  public TypeEnum getType() {
    return type;
  }



  public void setType(TypeEnum type) {
    this.type = type;
  }


  public EmailTemplateDto 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 EmailTemplateDto htmlContent(String htmlContent) {
    
    this.htmlContent = htmlContent;
    return this;
  }

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

  public String getHtmlContent() {
    return htmlContent;
  }



  public void setHtmlContent(String htmlContent) {
    this.htmlContent = htmlContent;
  }


  public EmailTemplateDto textContent(String textContent) {
    
    this.textContent = textContent;
    return this;
  }

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

  public String getTextContent() {
    return textContent;
  }



  public void setTextContent(String textContent) {
    this.textContent = textContent;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EmailTemplateDto emailTemplateDto = (EmailTemplateDto) o;
    return Objects.equals(this.id, emailTemplateDto.id) &&
        Objects.equals(this.code, emailTemplateDto.code) &&
        Objects.equals(this.description, emailTemplateDto.description) &&
        Objects.equals(this.updatedCode, emailTemplateDto.updatedCode) &&
        Objects.equals(this.media, emailTemplateDto.media) &&
        Objects.equals(this.tagStartDelimiter, emailTemplateDto.tagStartDelimiter) &&
        Objects.equals(this.tagEndDelimiter, emailTemplateDto.tagEndDelimiter) &&
        Objects.equals(this.startDate, emailTemplateDto.startDate) &&
        Objects.equals(this.endDate, emailTemplateDto.endDate) &&
        Objects.equals(this.type, emailTemplateDto.type) &&
        Objects.equals(this.subject, emailTemplateDto.subject) &&
        Objects.equals(this.htmlContent, emailTemplateDto.htmlContent) &&
        Objects.equals(this.textContent, emailTemplateDto.textContent);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, media, tagStartDelimiter, tagEndDelimiter, startDate, endDate, type, subject, htmlContent, textContent);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class EmailTemplateDto {\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("    media: ").append(toIndentedString(media)).append("\n");
    sb.append("    tagStartDelimiter: ").append(toIndentedString(tagStartDelimiter)).append("\n");
    sb.append("    tagEndDelimiter: ").append(toIndentedString(tagEndDelimiter)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    subject: ").append(toIndentedString(subject)).append("\n");
    sb.append("    htmlContent: ").append(toIndentedString(htmlContent)).append("\n");
    sb.append("    textContent: ").append(toIndentedString(textContent)).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    ");
  }

}

