/*
 * 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.ArrayList;
import java.util.List;
import org.openapitools.client.model.FilterDto;
import org.openapitools.client.model.GWFTransitionDto;
import org.openapitools.client.model.WFStatusDto;

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

  public static final String SERIALIZED_NAME_TARGET_CET_CODE = "targetCetCode";
  @SerializedName(SERIALIZED_NAME_TARGET_CET_CODE)
  private String targetCetCode;

  public static final String SERIALIZED_NAME_FILTER = "filter";
  @SerializedName(SERIALIZED_NAME_FILTER)
  private FilterDto filter;

  public static final String SERIALIZED_NAME_INIT_STATUS = "initStatus";
  @SerializedName(SERIALIZED_NAME_INIT_STATUS)
  private String initStatus;

  public static final String SERIALIZED_NAME_STATUSES = "statuses";
  @SerializedName(SERIALIZED_NAME_STATUSES)
  private List<WFStatusDto> statuses = null;

  public static final String SERIALIZED_NAME_TRANSITIONS = "transitions";
  @SerializedName(SERIALIZED_NAME_TRANSITIONS)
  private List<GWFTransitionDto> transitions = null;

  public static final String SERIALIZED_NAME_ENABLE_HISTORY = "enableHistory";
  @SerializedName(SERIALIZED_NAME_ENABLE_HISTORY)
  private Boolean enableHistory;


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

   /**
   * Get targetEntityClass
   * @return targetEntityClass
  **/
  @ApiModelProperty(required = true, value = "")

  public String getTargetEntityClass() {
    return targetEntityClass;
  }



  public void setTargetEntityClass(String targetEntityClass) {
    this.targetEntityClass = targetEntityClass;
  }


  public GenericWorkflowDto targetCetCode(String targetCetCode) {
    
    this.targetCetCode = targetCetCode;
    return this;
  }

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

  public String getTargetCetCode() {
    return targetCetCode;
  }



  public void setTargetCetCode(String targetCetCode) {
    this.targetCetCode = targetCetCode;
  }


  public GenericWorkflowDto filter(FilterDto filter) {
    
    this.filter = filter;
    return this;
  }

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

  public FilterDto getFilter() {
    return filter;
  }



  public void setFilter(FilterDto filter) {
    this.filter = filter;
  }


  public GenericWorkflowDto initStatus(String initStatus) {
    
    this.initStatus = initStatus;
    return this;
  }

   /**
   * Get initStatus
   * @return initStatus
  **/
  @ApiModelProperty(required = true, value = "")

  public String getInitStatus() {
    return initStatus;
  }



  public void setInitStatus(String initStatus) {
    this.initStatus = initStatus;
  }


  public GenericWorkflowDto statuses(List<WFStatusDto> statuses) {
    
    this.statuses = statuses;
    return this;
  }

  public GenericWorkflowDto addStatusesItem(WFStatusDto statusesItem) {
    if (this.statuses == null) {
      this.statuses = new ArrayList<WFStatusDto>();
    }
    this.statuses.add(statusesItem);
    return this;
  }

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

  public List<WFStatusDto> getStatuses() {
    return statuses;
  }



  public void setStatuses(List<WFStatusDto> statuses) {
    this.statuses = statuses;
  }


  public GenericWorkflowDto transitions(List<GWFTransitionDto> transitions) {
    
    this.transitions = transitions;
    return this;
  }

  public GenericWorkflowDto addTransitionsItem(GWFTransitionDto transitionsItem) {
    if (this.transitions == null) {
      this.transitions = new ArrayList<GWFTransitionDto>();
    }
    this.transitions.add(transitionsItem);
    return this;
  }

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

  public List<GWFTransitionDto> getTransitions() {
    return transitions;
  }



  public void setTransitions(List<GWFTransitionDto> transitions) {
    this.transitions = transitions;
  }


  public GenericWorkflowDto enableHistory(Boolean enableHistory) {
    
    this.enableHistory = enableHistory;
    return this;
  }

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

  public Boolean getEnableHistory() {
    return enableHistory;
  }



  public void setEnableHistory(Boolean enableHistory) {
    this.enableHistory = enableHistory;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GenericWorkflowDto genericWorkflowDto = (GenericWorkflowDto) o;
    return Objects.equals(this.id, genericWorkflowDto.id) &&
        Objects.equals(this.code, genericWorkflowDto.code) &&
        Objects.equals(this.description, genericWorkflowDto.description) &&
        Objects.equals(this.updatedCode, genericWorkflowDto.updatedCode) &&
        Objects.equals(this.disabled, genericWorkflowDto.disabled) &&
        Objects.equals(this.targetEntityClass, genericWorkflowDto.targetEntityClass) &&
        Objects.equals(this.targetCetCode, genericWorkflowDto.targetCetCode) &&
        Objects.equals(this.filter, genericWorkflowDto.filter) &&
        Objects.equals(this.initStatus, genericWorkflowDto.initStatus) &&
        Objects.equals(this.statuses, genericWorkflowDto.statuses) &&
        Objects.equals(this.transitions, genericWorkflowDto.transitions) &&
        Objects.equals(this.enableHistory, genericWorkflowDto.enableHistory);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, targetEntityClass, targetCetCode, filter, initStatus, statuses, transitions, enableHistory);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GenericWorkflowDto {\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("    targetEntityClass: ").append(toIndentedString(targetEntityClass)).append("\n");
    sb.append("    targetCetCode: ").append(toIndentedString(targetCetCode)).append("\n");
    sb.append("    filter: ").append(toIndentedString(filter)).append("\n");
    sb.append("    initStatus: ").append(toIndentedString(initStatus)).append("\n");
    sb.append("    statuses: ").append(toIndentedString(statuses)).append("\n");
    sb.append("    transitions: ").append(toIndentedString(transitions)).append("\n");
    sb.append("    enableHistory: ").append(toIndentedString(enableHistory)).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    ");
  }

}

