package org.wfc.omada.api.device.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * List of model selected for planned upgrade
 */
@ApiModel(description = "List of model selected for planned upgrade")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

public class PlanUpgradeSelectedModel   {
  @JsonProperty("modelTypeInfo")
  private ModelTypeInfoOpenApiVo modelTypeInfo;

  @JsonProperty("currentVersion")
  @Valid
  private List<String> currentVersion = new ArrayList<>();

  @JsonProperty("targetVersion")
  private String targetVersion;

  public PlanUpgradeSelectedModel modelTypeInfo(ModelTypeInfoOpenApiVo modelTypeInfo) {
    this.modelTypeInfo = modelTypeInfo;
    return this;
  }

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

  @Valid

  public ModelTypeInfoOpenApiVo getModelTypeInfo() {
    return modelTypeInfo;
  }

  public void setModelTypeInfo(ModelTypeInfoOpenApiVo modelTypeInfo) {
    this.modelTypeInfo = modelTypeInfo;
  }

  public PlanUpgradeSelectedModel currentVersion(List<String> currentVersion) {
    this.currentVersion = currentVersion;
    return this;
  }

  public PlanUpgradeSelectedModel addCurrentVersionItem(String currentVersionItem) {
    this.currentVersion.add(currentVersionItem);
    return this;
  }

  /**
   * Selected model version list, software version, such as \"2.5.0 Build 20190118 Rel. 64821\".
   * @return currentVersion
  */
  @ApiModelProperty(required = true, value = "Selected model version list, software version, such as \"2.5.0 Build 20190118 Rel. 64821\".")
  @NotNull


  public List<String> getCurrentVersion() {
    return currentVersion;
  }

  public void setCurrentVersion(List<String> currentVersion) {
    this.currentVersion = currentVersion;
  }

  public PlanUpgradeSelectedModel targetVersion(String targetVersion) {
    this.targetVersion = targetVersion;
    return this;
  }

  /**
   * Target version.
   * @return targetVersion
  */
  @ApiModelProperty(required = true, value = "Target version.")
  @NotNull


  public String getTargetVersion() {
    return targetVersion;
  }

  public void setTargetVersion(String targetVersion) {
    this.targetVersion = targetVersion;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PlanUpgradeSelectedModel planUpgradeSelectedModel = (PlanUpgradeSelectedModel) o;
    return Objects.equals(this.modelTypeInfo, planUpgradeSelectedModel.modelTypeInfo) &&
        Objects.equals(this.currentVersion, planUpgradeSelectedModel.currentVersion) &&
        Objects.equals(this.targetVersion, planUpgradeSelectedModel.targetVersion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(modelTypeInfo, currentVersion, targetVersion);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PlanUpgradeSelectedModel {\n");
    
    sb.append("    modelTypeInfo: ").append(toIndentedString(modelTypeInfo)).append("\n");
    sb.append("    currentVersion: ").append(toIndentedString(currentVersion)).append("\n");
    sb.append("    targetVersion: ").append(toIndentedString(targetVersion)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

