/*
 * 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.math.BigDecimal;

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

  public static final String SERIALIZED_NAME_UNITY = "unity";
  @SerializedName(SERIALIZED_NAME_UNITY)
  private String unity;

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

    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_CEILING = "ceiling";
  @SerializedName(SERIALIZED_NAME_CEILING)
  private BigDecimal ceiling;

  /**
   * Gets or Sets counterLevel
   */
  @JsonAdapter(CounterLevelEnum.Adapter.class)
  public enum CounterLevelEnum {
    SI("SI"),
    
    SU("SU"),
    
    UA("UA"),
    
    BA("BA");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_COUNTER_LEVEL = "counterLevel";
  @SerializedName(SERIALIZED_NAME_COUNTER_LEVEL)
  private CounterLevelEnum counterLevel;

  public static final String SERIALIZED_NAME_CEILING_EXPRESSION_EL = "ceilingExpressionEl";
  @SerializedName(SERIALIZED_NAME_CEILING_EXPRESSION_EL)
  private String ceilingExpressionEl;

  public static final String SERIALIZED_NAME_NOTIFICATION_LEVELS = "notificationLevels";
  @SerializedName(SERIALIZED_NAME_NOTIFICATION_LEVELS)
  private String notificationLevels;


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

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

  public String getCalendar() {
    return calendar;
  }



  public void setCalendar(String calendar) {
    this.calendar = calendar;
  }


  public CounterTemplateDto unity(String unity) {
    
    this.unity = unity;
    return this;
  }

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

  public String getUnity() {
    return unity;
  }



  public void setUnity(String unity) {
    this.unity = unity;
  }


  public CounterTemplateDto 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 CounterTemplateDto ceiling(BigDecimal ceiling) {
    
    this.ceiling = ceiling;
    return this;
  }

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

  public BigDecimal getCeiling() {
    return ceiling;
  }



  public void setCeiling(BigDecimal ceiling) {
    this.ceiling = ceiling;
  }


  public CounterTemplateDto counterLevel(CounterLevelEnum counterLevel) {
    
    this.counterLevel = counterLevel;
    return this;
  }

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

  public CounterLevelEnum getCounterLevel() {
    return counterLevel;
  }



  public void setCounterLevel(CounterLevelEnum counterLevel) {
    this.counterLevel = counterLevel;
  }


  public CounterTemplateDto ceilingExpressionEl(String ceilingExpressionEl) {
    
    this.ceilingExpressionEl = ceilingExpressionEl;
    return this;
  }

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

  public String getCeilingExpressionEl() {
    return ceilingExpressionEl;
  }



  public void setCeilingExpressionEl(String ceilingExpressionEl) {
    this.ceilingExpressionEl = ceilingExpressionEl;
  }


  public CounterTemplateDto notificationLevels(String notificationLevels) {
    
    this.notificationLevels = notificationLevels;
    return this;
  }

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

  public String getNotificationLevels() {
    return notificationLevels;
  }



  public void setNotificationLevels(String notificationLevels) {
    this.notificationLevels = notificationLevels;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CounterTemplateDto counterTemplateDto = (CounterTemplateDto) o;
    return Objects.equals(this.id, counterTemplateDto.id) &&
        Objects.equals(this.code, counterTemplateDto.code) &&
        Objects.equals(this.description, counterTemplateDto.description) &&
        Objects.equals(this.updatedCode, counterTemplateDto.updatedCode) &&
        Objects.equals(this.disabled, counterTemplateDto.disabled) &&
        Objects.equals(this.calendar, counterTemplateDto.calendar) &&
        Objects.equals(this.unity, counterTemplateDto.unity) &&
        Objects.equals(this.type, counterTemplateDto.type) &&
        Objects.equals(this.ceiling, counterTemplateDto.ceiling) &&
        Objects.equals(this.counterLevel, counterTemplateDto.counterLevel) &&
        Objects.equals(this.ceilingExpressionEl, counterTemplateDto.ceilingExpressionEl) &&
        Objects.equals(this.notificationLevels, counterTemplateDto.notificationLevels);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, calendar, unity, type, ceiling, counterLevel, ceilingExpressionEl, notificationLevels);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CounterTemplateDto {\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("    calendar: ").append(toIndentedString(calendar)).append("\n");
    sb.append("    unity: ").append(toIndentedString(unity)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    ceiling: ").append(toIndentedString(ceiling)).append("\n");
    sb.append("    counterLevel: ").append(toIndentedString(counterLevel)).append("\n");
    sb.append("    ceilingExpressionEl: ").append(toIndentedString(ceilingExpressionEl)).append("\n");
    sb.append("    notificationLevels: ").append(toIndentedString(notificationLevels)).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    ");
  }

}

