/*
 * 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.CustomFieldMatrixColumnDto;
import org.openapitools.client.model.LanguageDescriptionDto;

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

  /**
   * Gets or Sets fieldType
   */
  @JsonAdapter(FieldTypeEnum.Adapter.class)
  public enum FieldTypeEnum {
    STRING("STRING"),
    
    DATE("DATE"),
    
    LONG("LONG"),
    
    DOUBLE("DOUBLE"),
    
    LIST("LIST"),
    
    ENTITY("ENTITY"),
    
    TEXT_AREA("TEXT_AREA"),
    
    CHILD_ENTITY("CHILD_ENTITY"),
    
    MULTI_VALUE("MULTI_VALUE"),
    
    BOOLEAN("BOOLEAN");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_FIELD_TYPE = "fieldType";
  @SerializedName(SERIALIZED_NAME_FIELD_TYPE)
  private FieldTypeEnum fieldType;

  public static final String SERIALIZED_NAME_ACCOUNT_LEVEL = "accountLevel";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_LEVEL)
  private String accountLevel;

  public static final String SERIALIZED_NAME_APPLIES_TO = "appliesTo";
  @SerializedName(SERIALIZED_NAME_APPLIES_TO)
  private String appliesTo;

  public static final String SERIALIZED_NAME_DEFAULT_VALUE = "defaultValue";
  @SerializedName(SERIALIZED_NAME_DEFAULT_VALUE)
  private String defaultValue;

  public static final String SERIALIZED_NAME_USE_INHERITED_AS_DEFAULT_VALUE = "useInheritedAsDefaultValue";
  @SerializedName(SERIALIZED_NAME_USE_INHERITED_AS_DEFAULT_VALUE)
  private Boolean useInheritedAsDefaultValue;

  /**
   * Gets or Sets storageType
   */
  @JsonAdapter(StorageTypeEnum.Adapter.class)
  public enum StorageTypeEnum {
    SINGLE("SINGLE"),
    
    LIST("LIST"),
    
    MAP("MAP"),
    
    MATRIX("MATRIX");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_STORAGE_TYPE = "storageType";
  @SerializedName(SERIALIZED_NAME_STORAGE_TYPE)
  private StorageTypeEnum storageType;

  public static final String SERIALIZED_NAME_VALUE_REQUIRED = "valueRequired";
  @SerializedName(SERIALIZED_NAME_VALUE_REQUIRED)
  private Boolean valueRequired;

  public static final String SERIALIZED_NAME_VERSIONABLE = "versionable";
  @SerializedName(SERIALIZED_NAME_VERSIONABLE)
  private Boolean versionable;

  public static final String SERIALIZED_NAME_TRIGGER_END_PERIOD_EVENT = "triggerEndPeriodEvent";
  @SerializedName(SERIALIZED_NAME_TRIGGER_END_PERIOD_EVENT)
  private Boolean triggerEndPeriodEvent;

  public static final String SERIALIZED_NAME_CALENDAR = "calendar";
  @SerializedName(SERIALIZED_NAME_CALENDAR)
  private String calendar;

  public static final String SERIALIZED_NAME_CACHE_VALUE_TIMEPERIOD = "cacheValueTimeperiod";
  @SerializedName(SERIALIZED_NAME_CACHE_VALUE_TIMEPERIOD)
  private Integer cacheValueTimeperiod;

  public static final String SERIALIZED_NAME_ENTITY_CLAZZ = "entityClazz";
  @SerializedName(SERIALIZED_NAME_ENTITY_CLAZZ)
  private String entityClazz;

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

  public static final String SERIALIZED_NAME_ALLOW_EDIT = "allowEdit";
  @SerializedName(SERIALIZED_NAME_ALLOW_EDIT)
  private Boolean allowEdit;

  public static final String SERIALIZED_NAME_HIDE_ON_NEW = "hideOnNew";
  @SerializedName(SERIALIZED_NAME_HIDE_ON_NEW)
  private Boolean hideOnNew;

  public static final String SERIALIZED_NAME_MAX_VALUE = "maxValue";
  @SerializedName(SERIALIZED_NAME_MAX_VALUE)
  private Long maxValue;

  public static final String SERIALIZED_NAME_MIN_VALUE = "minValue";
  @SerializedName(SERIALIZED_NAME_MIN_VALUE)
  private Long minValue;

  public static final String SERIALIZED_NAME_REG_EXP = "regExp";
  @SerializedName(SERIALIZED_NAME_REG_EXP)
  private String regExp;

  public static final String SERIALIZED_NAME_CACHE_VALUE = "cacheValue";
  @SerializedName(SERIALIZED_NAME_CACHE_VALUE)
  private Boolean cacheValue;

  public static final String SERIALIZED_NAME_NB_DECIMAL = "nbDecimal";
  @SerializedName(SERIALIZED_NAME_NB_DECIMAL)
  private Integer nbDecimal;

  /**
   * Gets or Sets roundingMode
   */
  @JsonAdapter(RoundingModeEnum.Adapter.class)
  public enum RoundingModeEnum {
    NEAREST("NEAREST"),
    
    DOWN("DOWN"),
    
    UP("UP");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_ROUNDING_MODE = "roundingMode";
  @SerializedName(SERIALIZED_NAME_ROUNDING_MODE)
  private RoundingModeEnum roundingMode;

  public static final String SERIALIZED_NAME_GUI_POSITION = "guiPosition";
  @SerializedName(SERIALIZED_NAME_GUI_POSITION)
  private String guiPosition;

  /**
   * Gets or Sets mapKeyType
   */
  @JsonAdapter(MapKeyTypeEnum.Adapter.class)
  public enum MapKeyTypeEnum {
    STRING("STRING"),
    
    LONG("LONG"),
    
    DOUBLE("DOUBLE"),
    
    RON("RON");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_MAP_KEY_TYPE = "mapKeyType";
  @SerializedName(SERIALIZED_NAME_MAP_KEY_TYPE)
  private MapKeyTypeEnum mapKeyType;

  public static final String SERIALIZED_NAME_APPLICABLE_ON_EL = "applicableOnEl";
  @SerializedName(SERIALIZED_NAME_APPLICABLE_ON_EL)
  private String applicableOnEl;

  public static final String SERIALIZED_NAME_MATRIX_COLUMNS = "matrixColumns";
  @SerializedName(SERIALIZED_NAME_MATRIX_COLUMNS)
  private List<CustomFieldMatrixColumnDto> matrixColumns = null;

  public static final String SERIALIZED_NAME_CHILD_ENTITY_FIELDS_FOR_SUMMARY = "childEntityFieldsForSummary";
  @SerializedName(SERIALIZED_NAME_CHILD_ENTITY_FIELDS_FOR_SUMMARY)
  private List<String> childEntityFieldsForSummary = null;

  /**
   * Gets or Sets indexType
   */
  @JsonAdapter(IndexTypeEnum.Adapter.class)
  public enum IndexTypeEnum {
    STORE_ONLY("STORE_ONLY"),
    
    INDEX("INDEX"),
    
    INDEX_NOT_ANALYZE("INDEX_NOT_ANALYZE");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

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

  public static final String SERIALIZED_NAME_INDEX_TYPE = "indexType";
  @SerializedName(SERIALIZED_NAME_INDEX_TYPE)
  private IndexTypeEnum indexType;

  public static final String SERIALIZED_NAME_TAGS = "tags";
  @SerializedName(SERIALIZED_NAME_TAGS)
  private String tags;

  public static final String SERIALIZED_NAME_DISPLAY_FORMAT = "displayFormat";
  @SerializedName(SERIALIZED_NAME_DISPLAY_FORMAT)
  private String displayFormat;


  public CustomFieldTemplateDto 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 CustomFieldTemplateDto 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 CustomFieldTemplateDto 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 CustomFieldTemplateDto 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 CustomFieldTemplateDto 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 CustomFieldTemplateDto languageDescriptions(List<LanguageDescriptionDto> languageDescriptions) {
    
    this.languageDescriptions = languageDescriptions;
    return this;
  }

  public CustomFieldTemplateDto addLanguageDescriptionsItem(LanguageDescriptionDto languageDescriptionsItem) {
    if (this.languageDescriptions == null) {
      this.languageDescriptions = new ArrayList<LanguageDescriptionDto>();
    }
    this.languageDescriptions.add(languageDescriptionsItem);
    return this;
  }

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

  public List<LanguageDescriptionDto> getLanguageDescriptions() {
    return languageDescriptions;
  }



  public void setLanguageDescriptions(List<LanguageDescriptionDto> languageDescriptions) {
    this.languageDescriptions = languageDescriptions;
  }


  public CustomFieldTemplateDto fieldType(FieldTypeEnum fieldType) {
    
    this.fieldType = fieldType;
    return this;
  }

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

  public FieldTypeEnum getFieldType() {
    return fieldType;
  }



  public void setFieldType(FieldTypeEnum fieldType) {
    this.fieldType = fieldType;
  }


  public CustomFieldTemplateDto accountLevel(String accountLevel) {
    
    this.accountLevel = accountLevel;
    return this;
  }

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

  public String getAccountLevel() {
    return accountLevel;
  }



  public void setAccountLevel(String accountLevel) {
    this.accountLevel = accountLevel;
  }


  public CustomFieldTemplateDto appliesTo(String appliesTo) {
    
    this.appliesTo = appliesTo;
    return this;
  }

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

  public String getAppliesTo() {
    return appliesTo;
  }



  public void setAppliesTo(String appliesTo) {
    this.appliesTo = appliesTo;
  }


  public CustomFieldTemplateDto defaultValue(String defaultValue) {
    
    this.defaultValue = defaultValue;
    return this;
  }

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

  public String getDefaultValue() {
    return defaultValue;
  }



  public void setDefaultValue(String defaultValue) {
    this.defaultValue = defaultValue;
  }


  public CustomFieldTemplateDto useInheritedAsDefaultValue(Boolean useInheritedAsDefaultValue) {
    
    this.useInheritedAsDefaultValue = useInheritedAsDefaultValue;
    return this;
  }

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

  public Boolean getUseInheritedAsDefaultValue() {
    return useInheritedAsDefaultValue;
  }



  public void setUseInheritedAsDefaultValue(Boolean useInheritedAsDefaultValue) {
    this.useInheritedAsDefaultValue = useInheritedAsDefaultValue;
  }


  public CustomFieldTemplateDto storageType(StorageTypeEnum storageType) {
    
    this.storageType = storageType;
    return this;
  }

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

  public StorageTypeEnum getStorageType() {
    return storageType;
  }



  public void setStorageType(StorageTypeEnum storageType) {
    this.storageType = storageType;
  }


  public CustomFieldTemplateDto valueRequired(Boolean valueRequired) {
    
    this.valueRequired = valueRequired;
    return this;
  }

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

  public Boolean getValueRequired() {
    return valueRequired;
  }



  public void setValueRequired(Boolean valueRequired) {
    this.valueRequired = valueRequired;
  }


  public CustomFieldTemplateDto versionable(Boolean versionable) {
    
    this.versionable = versionable;
    return this;
  }

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

  public Boolean getVersionable() {
    return versionable;
  }



  public void setVersionable(Boolean versionable) {
    this.versionable = versionable;
  }


  public CustomFieldTemplateDto triggerEndPeriodEvent(Boolean triggerEndPeriodEvent) {
    
    this.triggerEndPeriodEvent = triggerEndPeriodEvent;
    return this;
  }

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

  public Boolean getTriggerEndPeriodEvent() {
    return triggerEndPeriodEvent;
  }



  public void setTriggerEndPeriodEvent(Boolean triggerEndPeriodEvent) {
    this.triggerEndPeriodEvent = triggerEndPeriodEvent;
  }


  public CustomFieldTemplateDto calendar(String calendar) {
    
    this.calendar = calendar;
    return this;
  }

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

  public String getCalendar() {
    return calendar;
  }



  public void setCalendar(String calendar) {
    this.calendar = calendar;
  }


  public CustomFieldTemplateDto cacheValueTimeperiod(Integer cacheValueTimeperiod) {
    
    this.cacheValueTimeperiod = cacheValueTimeperiod;
    return this;
  }

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

  public Integer getCacheValueTimeperiod() {
    return cacheValueTimeperiod;
  }



  public void setCacheValueTimeperiod(Integer cacheValueTimeperiod) {
    this.cacheValueTimeperiod = cacheValueTimeperiod;
  }


  public CustomFieldTemplateDto entityClazz(String entityClazz) {
    
    this.entityClazz = entityClazz;
    return this;
  }

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

  public String getEntityClazz() {
    return entityClazz;
  }



  public void setEntityClazz(String entityClazz) {
    this.entityClazz = entityClazz;
  }


  public CustomFieldTemplateDto listValues(Map<String, String> listValues) {
    
    this.listValues = listValues;
    return this;
  }

  public CustomFieldTemplateDto putListValuesItem(String key, String listValuesItem) {
    if (this.listValues == null) {
      this.listValues = new HashMap<String, String>();
    }
    this.listValues.put(key, listValuesItem);
    return this;
  }

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

  public Map<String, String> getListValues() {
    return listValues;
  }



  public void setListValues(Map<String, String> listValues) {
    this.listValues = listValues;
  }


  public CustomFieldTemplateDto allowEdit(Boolean allowEdit) {
    
    this.allowEdit = allowEdit;
    return this;
  }

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

  public Boolean getAllowEdit() {
    return allowEdit;
  }



  public void setAllowEdit(Boolean allowEdit) {
    this.allowEdit = allowEdit;
  }


  public CustomFieldTemplateDto hideOnNew(Boolean hideOnNew) {
    
    this.hideOnNew = hideOnNew;
    return this;
  }

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

  public Boolean getHideOnNew() {
    return hideOnNew;
  }



  public void setHideOnNew(Boolean hideOnNew) {
    this.hideOnNew = hideOnNew;
  }


  public CustomFieldTemplateDto maxValue(Long maxValue) {
    
    this.maxValue = maxValue;
    return this;
  }

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

  public Long getMaxValue() {
    return maxValue;
  }



  public void setMaxValue(Long maxValue) {
    this.maxValue = maxValue;
  }


  public CustomFieldTemplateDto minValue(Long minValue) {
    
    this.minValue = minValue;
    return this;
  }

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

  public Long getMinValue() {
    return minValue;
  }



  public void setMinValue(Long minValue) {
    this.minValue = minValue;
  }


  public CustomFieldTemplateDto regExp(String regExp) {
    
    this.regExp = regExp;
    return this;
  }

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

  public String getRegExp() {
    return regExp;
  }



  public void setRegExp(String regExp) {
    this.regExp = regExp;
  }


  public CustomFieldTemplateDto cacheValue(Boolean cacheValue) {
    
    this.cacheValue = cacheValue;
    return this;
  }

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

  public Boolean getCacheValue() {
    return cacheValue;
  }



  public void setCacheValue(Boolean cacheValue) {
    this.cacheValue = cacheValue;
  }


  public CustomFieldTemplateDto nbDecimal(Integer nbDecimal) {
    
    this.nbDecimal = nbDecimal;
    return this;
  }

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

  public Integer getNbDecimal() {
    return nbDecimal;
  }



  public void setNbDecimal(Integer nbDecimal) {
    this.nbDecimal = nbDecimal;
  }


  public CustomFieldTemplateDto roundingMode(RoundingModeEnum roundingMode) {
    
    this.roundingMode = roundingMode;
    return this;
  }

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

  public RoundingModeEnum getRoundingMode() {
    return roundingMode;
  }



  public void setRoundingMode(RoundingModeEnum roundingMode) {
    this.roundingMode = roundingMode;
  }


  public CustomFieldTemplateDto guiPosition(String guiPosition) {
    
    this.guiPosition = guiPosition;
    return this;
  }

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

  public String getGuiPosition() {
    return guiPosition;
  }



  public void setGuiPosition(String guiPosition) {
    this.guiPosition = guiPosition;
  }


  public CustomFieldTemplateDto mapKeyType(MapKeyTypeEnum mapKeyType) {
    
    this.mapKeyType = mapKeyType;
    return this;
  }

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

  public MapKeyTypeEnum getMapKeyType() {
    return mapKeyType;
  }



  public void setMapKeyType(MapKeyTypeEnum mapKeyType) {
    this.mapKeyType = mapKeyType;
  }


  public CustomFieldTemplateDto applicableOnEl(String applicableOnEl) {
    
    this.applicableOnEl = applicableOnEl;
    return this;
  }

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

  public String getApplicableOnEl() {
    return applicableOnEl;
  }



  public void setApplicableOnEl(String applicableOnEl) {
    this.applicableOnEl = applicableOnEl;
  }


  public CustomFieldTemplateDto matrixColumns(List<CustomFieldMatrixColumnDto> matrixColumns) {
    
    this.matrixColumns = matrixColumns;
    return this;
  }

  public CustomFieldTemplateDto addMatrixColumnsItem(CustomFieldMatrixColumnDto matrixColumnsItem) {
    if (this.matrixColumns == null) {
      this.matrixColumns = new ArrayList<CustomFieldMatrixColumnDto>();
    }
    this.matrixColumns.add(matrixColumnsItem);
    return this;
  }

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

  public List<CustomFieldMatrixColumnDto> getMatrixColumns() {
    return matrixColumns;
  }



  public void setMatrixColumns(List<CustomFieldMatrixColumnDto> matrixColumns) {
    this.matrixColumns = matrixColumns;
  }


  public CustomFieldTemplateDto childEntityFieldsForSummary(List<String> childEntityFieldsForSummary) {
    
    this.childEntityFieldsForSummary = childEntityFieldsForSummary;
    return this;
  }

  public CustomFieldTemplateDto addChildEntityFieldsForSummaryItem(String childEntityFieldsForSummaryItem) {
    if (this.childEntityFieldsForSummary == null) {
      this.childEntityFieldsForSummary = new ArrayList<String>();
    }
    this.childEntityFieldsForSummary.add(childEntityFieldsForSummaryItem);
    return this;
  }

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

  public List<String> getChildEntityFieldsForSummary() {
    return childEntityFieldsForSummary;
  }



  public void setChildEntityFieldsForSummary(List<String> childEntityFieldsForSummary) {
    this.childEntityFieldsForSummary = childEntityFieldsForSummary;
  }


  public CustomFieldTemplateDto indexType(IndexTypeEnum indexType) {
    
    this.indexType = indexType;
    return this;
  }

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

  public IndexTypeEnum getIndexType() {
    return indexType;
  }



  public void setIndexType(IndexTypeEnum indexType) {
    this.indexType = indexType;
  }


  public CustomFieldTemplateDto tags(String tags) {
    
    this.tags = tags;
    return this;
  }

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

  public String getTags() {
    return tags;
  }



  public void setTags(String tags) {
    this.tags = tags;
  }


  public CustomFieldTemplateDto displayFormat(String displayFormat) {
    
    this.displayFormat = displayFormat;
    return this;
  }

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

  public String getDisplayFormat() {
    return displayFormat;
  }



  public void setDisplayFormat(String displayFormat) {
    this.displayFormat = displayFormat;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CustomFieldTemplateDto customFieldTemplateDto = (CustomFieldTemplateDto) o;
    return Objects.equals(this.id, customFieldTemplateDto.id) &&
        Objects.equals(this.code, customFieldTemplateDto.code) &&
        Objects.equals(this.description, customFieldTemplateDto.description) &&
        Objects.equals(this.updatedCode, customFieldTemplateDto.updatedCode) &&
        Objects.equals(this.disabled, customFieldTemplateDto.disabled) &&
        Objects.equals(this.languageDescriptions, customFieldTemplateDto.languageDescriptions) &&
        Objects.equals(this.fieldType, customFieldTemplateDto.fieldType) &&
        Objects.equals(this.accountLevel, customFieldTemplateDto.accountLevel) &&
        Objects.equals(this.appliesTo, customFieldTemplateDto.appliesTo) &&
        Objects.equals(this.defaultValue, customFieldTemplateDto.defaultValue) &&
        Objects.equals(this.useInheritedAsDefaultValue, customFieldTemplateDto.useInheritedAsDefaultValue) &&
        Objects.equals(this.storageType, customFieldTemplateDto.storageType) &&
        Objects.equals(this.valueRequired, customFieldTemplateDto.valueRequired) &&
        Objects.equals(this.versionable, customFieldTemplateDto.versionable) &&
        Objects.equals(this.triggerEndPeriodEvent, customFieldTemplateDto.triggerEndPeriodEvent) &&
        Objects.equals(this.calendar, customFieldTemplateDto.calendar) &&
        Objects.equals(this.cacheValueTimeperiod, customFieldTemplateDto.cacheValueTimeperiod) &&
        Objects.equals(this.entityClazz, customFieldTemplateDto.entityClazz) &&
        Objects.equals(this.listValues, customFieldTemplateDto.listValues) &&
        Objects.equals(this.allowEdit, customFieldTemplateDto.allowEdit) &&
        Objects.equals(this.hideOnNew, customFieldTemplateDto.hideOnNew) &&
        Objects.equals(this.maxValue, customFieldTemplateDto.maxValue) &&
        Objects.equals(this.minValue, customFieldTemplateDto.minValue) &&
        Objects.equals(this.regExp, customFieldTemplateDto.regExp) &&
        Objects.equals(this.cacheValue, customFieldTemplateDto.cacheValue) &&
        Objects.equals(this.nbDecimal, customFieldTemplateDto.nbDecimal) &&
        Objects.equals(this.roundingMode, customFieldTemplateDto.roundingMode) &&
        Objects.equals(this.guiPosition, customFieldTemplateDto.guiPosition) &&
        Objects.equals(this.mapKeyType, customFieldTemplateDto.mapKeyType) &&
        Objects.equals(this.applicableOnEl, customFieldTemplateDto.applicableOnEl) &&
        Objects.equals(this.matrixColumns, customFieldTemplateDto.matrixColumns) &&
        Objects.equals(this.childEntityFieldsForSummary, customFieldTemplateDto.childEntityFieldsForSummary) &&
        Objects.equals(this.indexType, customFieldTemplateDto.indexType) &&
        Objects.equals(this.tags, customFieldTemplateDto.tags) &&
        Objects.equals(this.displayFormat, customFieldTemplateDto.displayFormat);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, code, description, updatedCode, disabled, languageDescriptions, fieldType, accountLevel, appliesTo, defaultValue, useInheritedAsDefaultValue, storageType, valueRequired, versionable, triggerEndPeriodEvent, calendar, cacheValueTimeperiod, entityClazz, listValues, allowEdit, hideOnNew, maxValue, minValue, regExp, cacheValue, nbDecimal, roundingMode, guiPosition, mapKeyType, applicableOnEl, matrixColumns, childEntityFieldsForSummary, indexType, tags, displayFormat);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CustomFieldTemplateDto {\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("    languageDescriptions: ").append(toIndentedString(languageDescriptions)).append("\n");
    sb.append("    fieldType: ").append(toIndentedString(fieldType)).append("\n");
    sb.append("    accountLevel: ").append(toIndentedString(accountLevel)).append("\n");
    sb.append("    appliesTo: ").append(toIndentedString(appliesTo)).append("\n");
    sb.append("    defaultValue: ").append(toIndentedString(defaultValue)).append("\n");
    sb.append("    useInheritedAsDefaultValue: ").append(toIndentedString(useInheritedAsDefaultValue)).append("\n");
    sb.append("    storageType: ").append(toIndentedString(storageType)).append("\n");
    sb.append("    valueRequired: ").append(toIndentedString(valueRequired)).append("\n");
    sb.append("    versionable: ").append(toIndentedString(versionable)).append("\n");
    sb.append("    triggerEndPeriodEvent: ").append(toIndentedString(triggerEndPeriodEvent)).append("\n");
    sb.append("    calendar: ").append(toIndentedString(calendar)).append("\n");
    sb.append("    cacheValueTimeperiod: ").append(toIndentedString(cacheValueTimeperiod)).append("\n");
    sb.append("    entityClazz: ").append(toIndentedString(entityClazz)).append("\n");
    sb.append("    listValues: ").append(toIndentedString(listValues)).append("\n");
    sb.append("    allowEdit: ").append(toIndentedString(allowEdit)).append("\n");
    sb.append("    hideOnNew: ").append(toIndentedString(hideOnNew)).append("\n");
    sb.append("    maxValue: ").append(toIndentedString(maxValue)).append("\n");
    sb.append("    minValue: ").append(toIndentedString(minValue)).append("\n");
    sb.append("    regExp: ").append(toIndentedString(regExp)).append("\n");
    sb.append("    cacheValue: ").append(toIndentedString(cacheValue)).append("\n");
    sb.append("    nbDecimal: ").append(toIndentedString(nbDecimal)).append("\n");
    sb.append("    roundingMode: ").append(toIndentedString(roundingMode)).append("\n");
    sb.append("    guiPosition: ").append(toIndentedString(guiPosition)).append("\n");
    sb.append("    mapKeyType: ").append(toIndentedString(mapKeyType)).append("\n");
    sb.append("    applicableOnEl: ").append(toIndentedString(applicableOnEl)).append("\n");
    sb.append("    matrixColumns: ").append(toIndentedString(matrixColumns)).append("\n");
    sb.append("    childEntityFieldsForSummary: ").append(toIndentedString(childEntityFieldsForSummary)).append("\n");
    sb.append("    indexType: ").append(toIndentedString(indexType)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    displayFormat: ").append(toIndentedString(displayFormat)).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    ");
  }

}

