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 javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class SwitchPortsPoe   {
  @JsonProperty("portList")
  @Valid
  private List<Integer> portList = new ArrayList<>();

  @JsonProperty("poeMode")
  private Integer poeMode;

  public SwitchPortsPoe portList(List<Integer> portList) {
    this.portList = portList;
    return this;
  }

  public SwitchPortsPoe addPortListItem(Integer portListItem) {
    this.portList.add(portListItem);
    return this;
  }

  /**
   * Port ID List.
   * @return portList
  */
  @ApiModelProperty(required = true, value = "Port ID List.")
  @NotNull

@Size(min=1,max=2147483647) 
  public List<Integer> getPortList() {
    return portList;
  }

  public void setPortList(List<Integer> portList) {
    this.portList = portList;
  }

  public SwitchPortsPoe poeMode(Integer poeMode) {
    this.poeMode = poeMode;
    return this;
  }

  /**
   * Poe mode should be a value as follows: 1: on(802.3at/af); 0: off.
   * @return poeMode
  */
  @ApiModelProperty(required = true, value = "Poe mode should be a value as follows: 1: on(802.3at/af); 0: off.")
  @NotNull


  public Integer getPoeMode() {
    return poeMode;
  }

  public void setPoeMode(Integer poeMode) {
    this.poeMode = poeMode;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SwitchPortsPoe switchPortsPoe = (SwitchPortsPoe) o;
    return Objects.equals(this.portList, switchPortsPoe.portList) &&
        Objects.equals(this.poeMode, switchPortsPoe.poeMode);
  }

  @Override
  public int hashCode() {
    return Objects.hash(portList, poeMode);
  }

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

