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.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

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

public class ModelFirmwarePoolGridInfoModelLatestFwInfo   {
  @JsonProperty("totalRows")
  private Long totalRows;

  @JsonProperty("currentPage")
  private Integer currentPage;

  @JsonProperty("currentSize")
  private Integer currentSize;

  @JsonProperty("data")
  @Valid
  private List<ModelLatestFwInfo> data = null;

  @JsonProperty("fwNum")
  @Valid
  private Map<String, Integer> fwNum = null;

  public ModelFirmwarePoolGridInfoModelLatestFwInfo totalRows(Long totalRows) {
    this.totalRows = totalRows;
    return this;
  }

  /**
   * Total rows of all items.
   * @return totalRows
  */
  @ApiModelProperty(value = "Total rows of all items.")


  public Long getTotalRows() {
    return totalRows;
  }

  public void setTotalRows(Long totalRows) {
    this.totalRows = totalRows;
  }

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

  /**
   * Current page number.
   * @return currentPage
  */
  @ApiModelProperty(value = "Current page number.")


  public Integer getCurrentPage() {
    return currentPage;
  }

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

  public ModelFirmwarePoolGridInfoModelLatestFwInfo currentSize(Integer currentSize) {
    this.currentSize = currentSize;
    return this;
  }

  /**
   * Number of entries per page.
   * @return currentSize
  */
  @ApiModelProperty(value = "Number of entries per page.")


  public Integer getCurrentSize() {
    return currentSize;
  }

  public void setCurrentSize(Integer currentSize) {
    this.currentSize = currentSize;
  }

  public ModelFirmwarePoolGridInfoModelLatestFwInfo data(List<ModelLatestFwInfo> data) {
    this.data = data;
    return this;
  }

  public ModelFirmwarePoolGridInfoModelLatestFwInfo addDataItem(ModelLatestFwInfo dataItem) {
    if (this.data == null) {
      this.data = new ArrayList<>();
    }
    this.data.add(dataItem);
    return this;
  }

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

  @Valid

  public List<ModelLatestFwInfo> getData() {
    return data;
  }

  public void setData(List<ModelLatestFwInfo> data) {
    this.data = data;
  }

  public ModelFirmwarePoolGridInfoModelLatestFwInfo fwNum(Map<String, Integer> fwNum) {
    this.fwNum = fwNum;
    return this;
  }

  public ModelFirmwarePoolGridInfoModelLatestFwInfo putFwNumItem(String key, Integer fwNumItem) {
    if (this.fwNum == null) {
      this.fwNum = new HashMap<>();
    }
    this.fwNum.put(key, fwNumItem);
    return this;
  }

  /**
   * The firmware quantity map for each channel: The key is channel: (0: stable; 1: Release Candidate(RC); 2: Beta), The Value is the quantity
   * @return fwNum
  */
  @ApiModelProperty(value = "The firmware quantity map for each channel: The key is channel: (0: stable; 1: Release Candidate(RC); 2: Beta), The Value is the quantity")


  public Map<String, Integer> getFwNum() {
    return fwNum;
  }

  public void setFwNum(Map<String, Integer> fwNum) {
    this.fwNum = fwNum;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModelFirmwarePoolGridInfoModelLatestFwInfo modelFirmwarePoolGridInfoModelLatestFwInfo = (ModelFirmwarePoolGridInfoModelLatestFwInfo) o;
    return Objects.equals(this.totalRows, modelFirmwarePoolGridInfoModelLatestFwInfo.totalRows) &&
        Objects.equals(this.currentPage, modelFirmwarePoolGridInfoModelLatestFwInfo.currentPage) &&
        Objects.equals(this.currentSize, modelFirmwarePoolGridInfoModelLatestFwInfo.currentSize) &&
        Objects.equals(this.data, modelFirmwarePoolGridInfoModelLatestFwInfo.data) &&
        Objects.equals(this.fwNum, modelFirmwarePoolGridInfoModelLatestFwInfo.fwNum);
  }

  @Override
  public int hashCode() {
    return Objects.hash(totalRows, currentPage, currentSize, data, fwNum);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModelFirmwarePoolGridInfoModelLatestFwInfo {\n");
    
    sb.append("    totalRows: ").append(toIndentedString(totalRows)).append("\n");
    sb.append("    currentPage: ").append(toIndentedString(currentPage)).append("\n");
    sb.append("    currentSize: ").append(toIndentedString(currentSize)).append("\n");
    sb.append("    data: ").append(toIndentedString(data)).append("\n");
    sb.append("    fwNum: ").append(toIndentedString(fwNum)).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    ");
  }
}

