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

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

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

/**
 * PlanUpgradeInfo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

public class PlanUpgradeInfo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("modelTypeInfo")
  private ModelTypeInfoOpenApiVo modelTypeInfo;

  @JsonProperty("siteNames")
  @Valid
  private List<String> siteNames = null;

  @JsonProperty("siteNum")
  private Integer siteNum;

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

  @JsonProperty("targetVersion")
  private String targetVersion;

  @JsonProperty("scheduledUpgradeTime")
  private String scheduledUpgradeTime;

  @JsonProperty("operator")
  private String operator;

  @JsonProperty("fromRollback")
  private Boolean fromRollback;

  public PlanUpgradeInfo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * ID.
   * @return id
  */
  @ApiModelProperty(value = "ID.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Get modelTypeInfo
   * @return modelTypeInfo
  */
  @ApiModelProperty(value = "")

  @Valid

  public ModelTypeInfoOpenApiVo getModelTypeInfo() {
    return modelTypeInfo;
  }

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

  public PlanUpgradeInfo siteNames(List<String> siteNames) {
    this.siteNames = siteNames;
    return this;
  }

  public PlanUpgradeInfo addSiteNamesItem(String siteNamesItem) {
    if (this.siteNames == null) {
      this.siteNames = new ArrayList<>();
    }
    this.siteNames.add(siteNamesItem);
    return this;
  }

  /**
   * Site names where the model is located.
   * @return siteNames
  */
  @ApiModelProperty(value = "Site names where the model is located.")


  public List<String> getSiteNames() {
    return siteNames;
  }

  public void setSiteNames(List<String> siteNames) {
    this.siteNames = siteNames;
  }

  public PlanUpgradeInfo siteNum(Integer siteNum) {
    this.siteNum = siteNum;
    return this;
  }

  /**
   * Number of sites where the model is located.
   * @return siteNum
  */
  @ApiModelProperty(value = "Number of sites where the model is located.")


  public Integer getSiteNum() {
    return siteNum;
  }

  public void setSiteNum(Integer siteNum) {
    this.siteNum = siteNum;
  }

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

  public PlanUpgradeInfo addCurrentVersionItem(String currentVersionItem) {
    if (this.currentVersion == null) {
      this.currentVersion = new ArrayList<>();
    }
    this.currentVersion.add(currentVersionItem);
    return this;
  }

  /**
   * Current version number.
   * @return currentVersion
  */
  @ApiModelProperty(value = "Current version number.")


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

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

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

  /**
   * Target upgrade version.
   * @return targetVersion
  */
  @ApiModelProperty(value = "Target upgrade version.")


  public String getTargetVersion() {
    return targetVersion;
  }

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

  public PlanUpgradeInfo scheduledUpgradeTime(String scheduledUpgradeTime) {
    this.scheduledUpgradeTime = scheduledUpgradeTime;
    return this;
  }

  /**
   * Plan upgrade time.
   * @return scheduledUpgradeTime
  */
  @ApiModelProperty(value = "Plan upgrade time.")


  public String getScheduledUpgradeTime() {
    return scheduledUpgradeTime;
  }

  public void setScheduledUpgradeTime(String scheduledUpgradeTime) {
    this.scheduledUpgradeTime = scheduledUpgradeTime;
  }

  public PlanUpgradeInfo operator(String operator) {
    this.operator = operator;
    return this;
  }

  /**
   * operator.
   * @return operator
  */
  @ApiModelProperty(value = "operator.")


  public String getOperator() {
    return operator;
  }

  public void setOperator(String operator) {
    this.operator = operator;
  }

  public PlanUpgradeInfo fromRollback(Boolean fromRollback) {
    this.fromRollback = fromRollback;
    return this;
  }

  /**
   * Is it from rollback?
   * @return fromRollback
  */
  @ApiModelProperty(value = "Is it from rollback?")


  public Boolean getFromRollback() {
    return fromRollback;
  }

  public void setFromRollback(Boolean fromRollback) {
    this.fromRollback = fromRollback;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PlanUpgradeInfo planUpgradeInfo = (PlanUpgradeInfo) o;
    return Objects.equals(this.id, planUpgradeInfo.id) &&
        Objects.equals(this.modelTypeInfo, planUpgradeInfo.modelTypeInfo) &&
        Objects.equals(this.siteNames, planUpgradeInfo.siteNames) &&
        Objects.equals(this.siteNum, planUpgradeInfo.siteNum) &&
        Objects.equals(this.currentVersion, planUpgradeInfo.currentVersion) &&
        Objects.equals(this.targetVersion, planUpgradeInfo.targetVersion) &&
        Objects.equals(this.scheduledUpgradeTime, planUpgradeInfo.scheduledUpgradeTime) &&
        Objects.equals(this.operator, planUpgradeInfo.operator) &&
        Objects.equals(this.fromRollback, planUpgradeInfo.fromRollback);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, modelTypeInfo, siteNames, siteNum, currentVersion, targetVersion, scheduledUpgradeTime, operator, fromRollback);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PlanUpgradeInfo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    modelTypeInfo: ").append(toIndentedString(modelTypeInfo)).append("\n");
    sb.append("    siteNames: ").append(toIndentedString(siteNames)).append("\n");
    sb.append("    siteNum: ").append(toIndentedString(siteNum)).append("\n");
    sb.append("    currentVersion: ").append(toIndentedString(currentVersion)).append("\n");
    sb.append("    targetVersion: ").append(toIndentedString(targetVersion)).append("\n");
    sb.append("    scheduledUpgradeTime: ").append(toIndentedString(scheduledUpgradeTime)).append("\n");
    sb.append("    operator: ").append(toIndentedString(operator)).append("\n");
    sb.append("    fromRollback: ").append(toIndentedString(fromRollback)).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    ");
  }
}

