/*
 * 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.CustomFieldTemplateDto;
import org.openapitools.client.model.EntityCustomActionDto;

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

  public static final String SERIALIZED_NAME_STORE_AS_TABLE = "storeAsTable";
  @SerializedName(SERIALIZED_NAME_STORE_AS_TABLE)
  private Boolean storeAsTable;

  public static final String SERIALIZED_NAME_FIELDS = "fields";
  @SerializedName(SERIALIZED_NAME_FIELDS)
  private List<CustomFieldTemplateDto> fields = null;

  public static final String SERIALIZED_NAME_ACTIONS = "actions";
  @SerializedName(SERIALIZED_NAME_ACTIONS)
  private List<EntityCustomActionDto> actions = null;


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

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

  public String getName() {
    return name;
  }



  public void setName(String name) {
    this.name = name;
  }


  public CustomEntityTemplateDto storeAsTable(Boolean storeAsTable) {
    
    this.storeAsTable = storeAsTable;
    return this;
  }

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

  public Boolean getStoreAsTable() {
    return storeAsTable;
  }



  public void setStoreAsTable(Boolean storeAsTable) {
    this.storeAsTable = storeAsTable;
  }


  public CustomEntityTemplateDto fields(List<CustomFieldTemplateDto> fields) {
    
    this.fields = fields;
    return this;
  }

  public CustomEntityTemplateDto addFieldsItem(CustomFieldTemplateDto fieldsItem) {
    if (this.fields == null) {
      this.fields = new ArrayList<CustomFieldTemplateDto>();
    }
    this.fields.add(fieldsItem);
    return this;
  }

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

  public List<CustomFieldTemplateDto> getFields() {
    return fields;
  }



  public void setFields(List<CustomFieldTemplateDto> fields) {
    this.fields = fields;
  }


  public CustomEntityTemplateDto actions(List<EntityCustomActionDto> actions) {
    
    this.actions = actions;
    return this;
  }

  public CustomEntityTemplateDto addActionsItem(EntityCustomActionDto actionsItem) {
    if (this.actions == null) {
      this.actions = new ArrayList<EntityCustomActionDto>();
    }
    this.actions.add(actionsItem);
    return this;
  }

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

  public List<EntityCustomActionDto> getActions() {
    return actions;
  }



  public void setActions(List<EntityCustomActionDto> actions) {
    this.actions = actions;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CustomEntityTemplateDto customEntityTemplateDto = (CustomEntityTemplateDto) o;
    return Objects.equals(this.id, customEntityTemplateDto.id) &&
        Objects.equals(this.code, customEntityTemplateDto.code) &&
        Objects.equals(this.description, customEntityTemplateDto.description) &&
        Objects.equals(this.updatedCode, customEntityTemplateDto.updatedCode) &&
        Objects.equals(this.disabled, customEntityTemplateDto.disabled) &&
        Objects.equals(this.name, customEntityTemplateDto.name) &&
        Objects.equals(this.storeAsTable, customEntityTemplateDto.storeAsTable) &&
        Objects.equals(this.fields, customEntityTemplateDto.fields) &&
        Objects.equals(this.actions, customEntityTemplateDto.actions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, name, storeAsTable, fields, actions);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CustomEntityTemplateDto {\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("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    storeAsTable: ").append(toIndentedString(storeAsTable)).append("\n");
    sb.append("    fields: ").append(toIndentedString(fields)).append("\n");
    sb.append("    actions: ").append(toIndentedString(actions)).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    ");
  }

}

