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

import com.fasterxml.jackson.annotation.JsonProperty;
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;

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

public class ModelUpgradeSiteReqInfo   {
  @JsonProperty("currentPage")
  private Integer currentPage;

  @JsonProperty("currentPageSize")
  private Integer currentPageSize;

  @JsonProperty("models")
  @Valid
  private List<ModelBaseInfo> models = new ArrayList<>();

  public ModelUpgradeSiteReqInfo currentPage(Integer currentPage) {
    this.currentPage = currentPage;
    return this;
  }

  /**
   * Start page number. Start from 1.
   * @return currentPage
  */
  @ApiModelProperty(required = true, value = "Start page number. Start from 1.")
  @NotNull


  public Integer getCurrentPage() {
    return currentPage;
  }

  public void setCurrentPage(Integer currentPage) {
    this.currentPage = currentPage;
  }

  public ModelUpgradeSiteReqInfo currentPageSize(Integer currentPageSize) {
    this.currentPageSize = currentPageSize;
    return this;
  }

  /**
   * Number of entries per page. It should be within the range of 1–100.
   * @return currentPageSize
  */
  @ApiModelProperty(required = true, value = "Number of entries per page. It should be within the range of 1–100.")
  @NotNull


  public Integer getCurrentPageSize() {
    return currentPageSize;
  }

  public void setCurrentPageSize(Integer currentPageSize) {
    this.currentPageSize = currentPageSize;
  }

  public ModelUpgradeSiteReqInfo models(List<ModelBaseInfo> models) {
    this.models = models;
    return this;
  }

  public ModelUpgradeSiteReqInfo addModelsItem(ModelBaseInfo modelsItem) {
    this.models.add(modelsItem);
    return this;
  }

  /**
   * Model base information list, include Model type information and currentVersion list
   * @return models
  */
  @ApiModelProperty(required = true, value = "Model base information list, include Model type information and currentVersion list")
  @NotNull

  @Valid

  public List<ModelBaseInfo> getModels() {
    return models;
  }

  public void setModels(List<ModelBaseInfo> models) {
    this.models = models;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModelUpgradeSiteReqInfo modelUpgradeSiteReqInfo = (ModelUpgradeSiteReqInfo) o;
    return Objects.equals(this.currentPage, modelUpgradeSiteReqInfo.currentPage) &&
        Objects.equals(this.currentPageSize, modelUpgradeSiteReqInfo.currentPageSize) &&
        Objects.equals(this.models, modelUpgradeSiteReqInfo.models);
  }

  @Override
  public int hashCode() {
    return Objects.hash(currentPage, currentPageSize, models);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModelUpgradeSiteReqInfo {\n");
    
    sb.append("    currentPage: ").append(toIndentedString(currentPage)).append("\n");
    sb.append("    currentPageSize: ").append(toIndentedString(currentPageSize)).append("\n");
    sb.append("    models: ").append(toIndentedString(models)).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    ");
  }
}

