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

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

  /**
   * Gets or Sets scriptType
   */
  @JsonAdapter(ScriptTypeEnum.Adapter.class)
  public enum ScriptTypeEnum {
    JAVA("JAVA"),
    
    SQL("SQL");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_SCRIPT_TYPE = "scriptType";
  @SerializedName(SERIALIZED_NAME_SCRIPT_TYPE)
  private ScriptTypeEnum scriptType;

  public static final String SERIALIZED_NAME_FILENAME_FORMAT = "filenameFormat";
  @SerializedName(SERIALIZED_NAME_FILENAME_FORMAT)
  private String filenameFormat;

  public static final String SERIALIZED_NAME_CATEGORY = "category";
  @SerializedName(SERIALIZED_NAME_CATEGORY)
  private String category;

  public static final String SERIALIZED_NAME_OUTPUT_DIR = "outputDir";
  @SerializedName(SERIALIZED_NAME_OUTPUT_DIR)
  private String outputDir;

  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_SQL_QUERY = "sqlQuery";
  @SerializedName(SERIALIZED_NAME_SQL_QUERY)
  private String sqlQuery;

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

  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 reportExtractResultType
   */
  @JsonAdapter(ReportExtractResultTypeEnum.Adapter.class)
  public enum ReportExtractResultTypeEnum {
    CSV("CSV"),
    
    HTML("HTML");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_REPORT_EXTRACT_RESULT_TYPE = "reportExtractResultType";
  @SerializedName(SERIALIZED_NAME_REPORT_EXTRACT_RESULT_TYPE)
  private ReportExtractResultTypeEnum reportExtractResultType;


  public ReportExtractDto 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 ReportExtractDto 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 ReportExtractDto 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 ReportExtractDto 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 ReportExtractDto 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 ReportExtractDto scriptType(ScriptTypeEnum scriptType) {
    
    this.scriptType = scriptType;
    return this;
  }

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

  public ScriptTypeEnum getScriptType() {
    return scriptType;
  }



  public void setScriptType(ScriptTypeEnum scriptType) {
    this.scriptType = scriptType;
  }


  public ReportExtractDto filenameFormat(String filenameFormat) {
    
    this.filenameFormat = filenameFormat;
    return this;
  }

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

  public String getFilenameFormat() {
    return filenameFormat;
  }



  public void setFilenameFormat(String filenameFormat) {
    this.filenameFormat = filenameFormat;
  }


  public ReportExtractDto category(String category) {
    
    this.category = category;
    return this;
  }

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

  public String getCategory() {
    return category;
  }



  public void setCategory(String category) {
    this.category = category;
  }


  public ReportExtractDto outputDir(String outputDir) {
    
    this.outputDir = outputDir;
    return this;
  }

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

  public String getOutputDir() {
    return outputDir;
  }



  public void setOutputDir(String outputDir) {
    this.outputDir = outputDir;
  }


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

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

  public String getSqlQuery() {
    return sqlQuery;
  }



  public void setSqlQuery(String sqlQuery) {
    this.sqlQuery = sqlQuery;
  }


  public ReportExtractDto params(Map<String, String> params) {
    
    this.params = params;
    return this;
  }

  public ReportExtractDto putParamsItem(String key, String paramsItem) {
    if (this.params == null) {
      this.params = new HashMap<String, String>();
    }
    this.params.put(key, paramsItem);
    return this;
  }

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

  public Map<String, String> getParams() {
    return params;
  }



  public void setParams(Map<String, String> params) {
    this.params = params;
  }


  public ReportExtractDto 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 ReportExtractDto 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 ReportExtractDto reportExtractResultType(ReportExtractResultTypeEnum reportExtractResultType) {
    
    this.reportExtractResultType = reportExtractResultType;
    return this;
  }

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

  public ReportExtractResultTypeEnum getReportExtractResultType() {
    return reportExtractResultType;
  }



  public void setReportExtractResultType(ReportExtractResultTypeEnum reportExtractResultType) {
    this.reportExtractResultType = reportExtractResultType;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ReportExtractDto reportExtractDto = (ReportExtractDto) o;
    return Objects.equals(this.id, reportExtractDto.id) &&
        Objects.equals(this.code, reportExtractDto.code) &&
        Objects.equals(this.description, reportExtractDto.description) &&
        Objects.equals(this.updatedCode, reportExtractDto.updatedCode) &&
        Objects.equals(this.disabled, reportExtractDto.disabled) &&
        Objects.equals(this.scriptType, reportExtractDto.scriptType) &&
        Objects.equals(this.filenameFormat, reportExtractDto.filenameFormat) &&
        Objects.equals(this.category, reportExtractDto.category) &&
        Objects.equals(this.outputDir, reportExtractDto.outputDir) &&
        Objects.equals(this.scriptInstanceCode, reportExtractDto.scriptInstanceCode) &&
        Objects.equals(this.sqlQuery, reportExtractDto.sqlQuery) &&
        Objects.equals(this.params, reportExtractDto.params) &&
        Objects.equals(this.startDate, reportExtractDto.startDate) &&
        Objects.equals(this.endDate, reportExtractDto.endDate) &&
        Objects.equals(this.reportExtractResultType, reportExtractDto.reportExtractResultType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, scriptType, filenameFormat, category, outputDir, scriptInstanceCode, sqlQuery, params, startDate, endDate, reportExtractResultType);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ReportExtractDto {\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("    scriptType: ").append(toIndentedString(scriptType)).append("\n");
    sb.append("    filenameFormat: ").append(toIndentedString(filenameFormat)).append("\n");
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
    sb.append("    outputDir: ").append(toIndentedString(outputDir)).append("\n");
    sb.append("    scriptInstanceCode: ").append(toIndentedString(scriptInstanceCode)).append("\n");
    sb.append("    sqlQuery: ").append(toIndentedString(sqlQuery)).append("\n");
    sb.append("    params: ").append(toIndentedString(params)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    reportExtractResultType: ").append(toIndentedString(reportExtractResultType)).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    ");
  }

}

