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

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

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

/**
 * Device poe ports info.
 */
@ApiModel(description = "Device poe ports info.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class DevicePoePorts   {
  @JsonProperty("portNum")
  private Integer portNum;

  @JsonProperty("poePortIds")
  @Valid
  private List<Integer> poePortIds = null;

  public DevicePoePorts portNum(Integer portNum) {
    this.portNum = portNum;
    return this;
  }

  /**
   * Total port num.
   * @return portNum
  */
  @ApiModelProperty(value = "Total port num.")


  public Integer getPortNum() {
    return portNum;
  }

  public void setPortNum(Integer portNum) {
    this.portNum = portNum;
  }

  public DevicePoePorts poePortIds(List<Integer> poePortIds) {
    this.poePortIds = poePortIds;
    return this;
  }

  public DevicePoePorts addPoePortIdsItem(Integer poePortIdsItem) {
    if (this.poePortIds == null) {
      this.poePortIds = new ArrayList<>();
    }
    this.poePortIds.add(poePortIdsItem);
    return this;
  }

  /**
   * List of ports supporting Poe.
   * @return poePortIds
  */
  @ApiModelProperty(value = "List of ports supporting Poe.")


  public List<Integer> getPoePortIds() {
    return poePortIds;
  }

  public void setPoePortIds(List<Integer> poePortIds) {
    this.poePortIds = poePortIds;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DevicePoePorts devicePoePorts = (DevicePoePorts) o;
    return Objects.equals(this.portNum, devicePoePorts.portNum) &&
        Objects.equals(this.poePortIds, devicePoePorts.poePortIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(portNum, poePortIds);
  }

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

