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;

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

public class UpgradeLogOpenApiInfo   {
  @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("upgradeTime")
  private String upgradeTime;

  @JsonProperty("operator")
  private String operator;

  @JsonProperty("rollbacked")
  private Boolean rollbacked;

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

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


  public String getId() {
    return id;
  }

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

  public UpgradeLogOpenApiInfo 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 UpgradeLogOpenApiInfo siteNames(List<String> siteNames) {
    this.siteNames = siteNames;
    return this;
  }

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

  /**
   * The siteName lists where the model belongs.
   * @return siteNames
  */
  @ApiModelProperty(value = "The siteName lists where the model belongs.")


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

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

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

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


  public Integer getSiteNum() {
    return siteNum;
  }

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

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

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

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


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

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

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

  /**
   * The time when the upgrade is complete.
   * @return upgradeTime
  */
  @ApiModelProperty(value = "The time when the upgrade is complete.")


  public String getUpgradeTime() {
    return upgradeTime;
  }

  public void setUpgradeTime(String upgradeTime) {
    this.upgradeTime = upgradeTime;
  }

  public UpgradeLogOpenApiInfo 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 UpgradeLogOpenApiInfo rollbacked(Boolean rollbacked) {
    this.rollbacked = rollbacked;
    return this;
  }

  /**
   * Whether the log is rolled back or not. The logs that are rolled back cannot be rolled back repeatedly.
   * @return rollbacked
  */
  @ApiModelProperty(value = "Whether the log is rolled back or not. The logs that are rolled back cannot be rolled back repeatedly.")


  public Boolean getRollbacked() {
    return rollbacked;
  }

  public void setRollbacked(Boolean rollbacked) {
    this.rollbacked = rollbacked;
  }


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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpgradeLogOpenApiInfo {\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("    upgradeTime: ").append(toIndentedString(upgradeTime)).append("\n");
    sb.append("    operator: ").append(toIndentedString(operator)).append("\n");
    sb.append("    rollbacked: ").append(toIndentedString(rollbacked)).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    ");
  }
}

