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

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

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

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

  /**
   * Device total ports number.
   * @return portNum
  */
  @ApiModelProperty(value = "Device total ports number.")


  public Integer getPortNum() {
    return portNum;
  }

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

  public DevicePorts portIds(List<Integer> portIds) {
    this.portIds = portIds;
    return this;
  }

  public DevicePorts addPortIdsItem(Integer portIdsItem) {
    if (this.portIds == null) {
      this.portIds = new ArrayList<>();
    }
    this.portIds.add(portIdsItem);
    return this;
  }

  /**
   * List of device ports supporting port schedule.
   * @return portIds
  */
  @ApiModelProperty(value = "List of device ports supporting port schedule.")


  public List<Integer> getPortIds() {
    return portIds;
  }

  public void setPortIds(List<Integer> portIds) {
    this.portIds = portIds;
  }


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

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

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

