package com.oguerreiro.resilient.service.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

/**
 * A DTO for the {@link com.oguerreiro.resilient.domain.VariableClass} entity.
 */
@Schema(description = "Variable Class\nA sub-variable classification. Example: Variable=FUEL CONSUMPTIOM; CLASS=GASOLINE; OR ELECTRICAL; ETC...")
public class VariableClassDTO extends AbstractResilientDTO<Long> {
  private static final long serialVersionUID = 1L;

  @NotNull
  @Schema(description = "Code of the class. Must be unique within the Variavle", requiredMode = Schema.RequiredMode.REQUIRED)
  private String code;

  @NotNull
  @Schema(description = "Human name of the class. Must be unique within the Variable, because it will be used as key for the Excel integration data.", requiredMode = Schema.RequiredMode.REQUIRED)
  private String name;

  private VariableClassTypeDTO variableClassType;

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getName() {
    return name;
  }

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

  public VariableClassTypeDTO getVariableClassType() {
    return variableClassType;
  }

  public void setVariableClassType(VariableClassTypeDTO variableClassType) {
    this.variableClassType = variableClassType;
  }

  //@formatter:off
  @Override
  public String toString() {
    return "VariableClassDTO{" +
              "id=" + getId() +
              ", code='" + getCode() + "'" +
              ", name='" + getName() + "'" +
              ", variableClassType=" + getVariableClassType() +
              ", version=" + getVersion() +
           "}";
  }
  //@formatter:on
}
