/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;

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

  public ScriptNotificationDto 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 ScriptNotificationDto 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 ScriptNotificationDto 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 ScriptNotificationDto 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 ScriptNotificationDto 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;
  }


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

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


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ScriptNotificationDto {\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("}");
    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    ");
  }

}

