/*
 * 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;

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

  public static final String SERIALIZED_NAME_CURRENT_STATE = "currentState";
  @SerializedName(SERIALIZED_NAME_CURRENT_STATE)
  private Object currentState;

  /**
   * Gets or Sets auditType
   */
  @JsonAdapter(AuditTypeEnum.Adapter.class)
  public enum AuditTypeEnum {
    STATUS("STATUS"),
    
    RENEWAL("RENEWAL"),
    
    OTHER("OTHER");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_AUDIT_TYPE = "auditType";
  @SerializedName(SERIALIZED_NAME_AUDIT_TYPE)
  private AuditTypeEnum auditType;

  public static final String SERIALIZED_NAME_HISTORABLE = "historable";
  @SerializedName(SERIALIZED_NAME_HISTORABLE)
  private Boolean historable;

  public static final String SERIALIZED_NAME_NOTFIABLE = "notfiable";
  @SerializedName(SERIALIZED_NAME_NOTFIABLE)
  private Boolean notfiable;

  public static final String SERIALIZED_NAME_HISTORIZED = "historized";
  @SerializedName(SERIALIZED_NAME_HISTORIZED)
  private Boolean historized;

  public static final String SERIALIZED_NAME_NOTIFIED = "notified";
  @SerializedName(SERIALIZED_NAME_NOTIFIED)
  private Boolean notified;


  public AuditableFieldHistory fieldName(String fieldName) {
    
    this.fieldName = fieldName;
    return this;
  }

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

  public String getFieldName() {
    return fieldName;
  }



  public void setFieldName(String fieldName) {
    this.fieldName = fieldName;
  }


  public AuditableFieldHistory currentState(Object currentState) {
    
    this.currentState = currentState;
    return this;
  }

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

  public Object getCurrentState() {
    return currentState;
  }



  public void setCurrentState(Object currentState) {
    this.currentState = currentState;
  }


  public AuditableFieldHistory auditType(AuditTypeEnum auditType) {
    
    this.auditType = auditType;
    return this;
  }

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

  public AuditTypeEnum getAuditType() {
    return auditType;
  }



  public void setAuditType(AuditTypeEnum auditType) {
    this.auditType = auditType;
  }


  public AuditableFieldHistory historable(Boolean historable) {
    
    this.historable = historable;
    return this;
  }

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

  public Boolean getHistorable() {
    return historable;
  }



  public void setHistorable(Boolean historable) {
    this.historable = historable;
  }


  public AuditableFieldHistory notfiable(Boolean notfiable) {
    
    this.notfiable = notfiable;
    return this;
  }

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

  public Boolean getNotfiable() {
    return notfiable;
  }



  public void setNotfiable(Boolean notfiable) {
    this.notfiable = notfiable;
  }


  public AuditableFieldHistory historized(Boolean historized) {
    
    this.historized = historized;
    return this;
  }

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

  public Boolean getHistorized() {
    return historized;
  }



  public void setHistorized(Boolean historized) {
    this.historized = historized;
  }


  public AuditableFieldHistory notified(Boolean notified) {
    
    this.notified = notified;
    return this;
  }

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

  public Boolean getNotified() {
    return notified;
  }



  public void setNotified(Boolean notified) {
    this.notified = notified;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AuditableFieldHistory auditableFieldHistory = (AuditableFieldHistory) o;
    return Objects.equals(this.fieldName, auditableFieldHistory.fieldName) &&
        Objects.equals(this.currentState, auditableFieldHistory.currentState) &&
        Objects.equals(this.auditType, auditableFieldHistory.auditType) &&
        Objects.equals(this.historable, auditableFieldHistory.historable) &&
        Objects.equals(this.notfiable, auditableFieldHistory.notfiable) &&
        Objects.equals(this.historized, auditableFieldHistory.historized) &&
        Objects.equals(this.notified, auditableFieldHistory.notified);
  }

  @Override
  public int hashCode() {
    return Objects.hash(fieldName, currentState, auditType, historable, notfiable, historized, notified);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AuditableFieldHistory {\n");
    sb.append("    fieldName: ").append(toIndentedString(fieldName)).append("\n");
    sb.append("    currentState: ").append(toIndentedString(currentState)).append("\n");
    sb.append("    auditType: ").append(toIndentedString(auditType)).append("\n");
    sb.append("    historable: ").append(toIndentedString(historable)).append("\n");
    sb.append("    notfiable: ").append(toIndentedString(notfiable)).append("\n");
    sb.append("    historized: ").append(toIndentedString(historized)).append("\n");
    sb.append("    notified: ").append(toIndentedString(notified)).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    ");
  }

}

