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

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

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

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

public class PoeUsage   {
  @JsonProperty("mac")
  private String mac;

  @JsonProperty("name")
  private String name;

  @JsonProperty("portNum")
  private Integer portNum;

  @JsonProperty("totalPowerUsed")
  private Integer totalPowerUsed;

  @JsonProperty("totalPercentUsed")
  private Double totalPercentUsed;

  @JsonProperty("totalPower")
  private Integer totalPower;

  @JsonProperty("poePorts")
  @Valid
  private List<PortPoe> poePorts = null;

  public PoeUsage mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * Device MAC
   * @return mac
  */
  @ApiModelProperty(value = "Device MAC")


  public String getMac() {
    return mac;
  }

  public void setMac(String mac) {
    this.mac = mac;
  }

  public PoeUsage name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Device name
   * @return name
  */
  @ApiModelProperty(value = "Device name")


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

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

  /**
   * Device port Number
   * @return portNum
  */
  @ApiModelProperty(value = "Device port Number")


  public Integer getPortNum() {
    return portNum;
  }

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

  public PoeUsage totalPowerUsed(Integer totalPowerUsed) {
    this.totalPowerUsed = totalPowerUsed;
    return this;
  }

  /**
   * Total power used (in watts)
   * @return totalPowerUsed
  */
  @ApiModelProperty(value = "Total power used (in watts)")


  public Integer getTotalPowerUsed() {
    return totalPowerUsed;
  }

  public void setTotalPowerUsed(Integer totalPowerUsed) {
    this.totalPowerUsed = totalPowerUsed;
  }

  public PoeUsage totalPercentUsed(Double totalPercentUsed) {
    this.totalPercentUsed = totalPercentUsed;
    return this;
  }

  /**
   * Percentage of total power used (integer reserved)
   * @return totalPercentUsed
  */
  @ApiModelProperty(value = "Percentage of total power used (integer reserved)")


  public Double getTotalPercentUsed() {
    return totalPercentUsed;
  }

  public void setTotalPercentUsed(Double totalPercentUsed) {
    this.totalPercentUsed = totalPercentUsed;
  }

  public PoeUsage totalPower(Integer totalPower) {
    this.totalPower = totalPower;
    return this;
  }

  /**
   * The total power of the switch port's POE (in watts)
   * @return totalPower
  */
  @ApiModelProperty(value = "The total power of the switch port's POE (in watts)")


  public Integer getTotalPower() {
    return totalPower;
  }

  public void setTotalPower(Integer totalPower) {
    this.totalPower = totalPower;
  }

  public PoeUsage poePorts(List<PortPoe> poePorts) {
    this.poePorts = poePorts;
    return this;
  }

  public PoeUsage addPoePortsItem(PortPoe poePortsItem) {
    if (this.poePorts == null) {
      this.poePorts = new ArrayList<>();
    }
    this.poePorts.add(poePortsItem);
    return this;
  }

  /**
   * Device PoE Ports
   * @return poePorts
  */
  @ApiModelProperty(value = "Device PoE Ports")

  @Valid

  public List<PortPoe> getPoePorts() {
    return poePorts;
  }

  public void setPoePorts(List<PortPoe> poePorts) {
    this.poePorts = poePorts;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PoeUsage poeUsage = (PoeUsage) o;
    return Objects.equals(this.mac, poeUsage.mac) &&
        Objects.equals(this.name, poeUsage.name) &&
        Objects.equals(this.portNum, poeUsage.portNum) &&
        Objects.equals(this.totalPowerUsed, poeUsage.totalPowerUsed) &&
        Objects.equals(this.totalPercentUsed, poeUsage.totalPercentUsed) &&
        Objects.equals(this.totalPower, poeUsage.totalPower) &&
        Objects.equals(this.poePorts, poeUsage.poePorts);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, name, portNum, totalPowerUsed, totalPercentUsed, totalPower, poePorts);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PoeUsage {\n");
    
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    portNum: ").append(toIndentedString(portNum)).append("\n");
    sb.append("    totalPowerUsed: ").append(toIndentedString(totalPowerUsed)).append("\n");
    sb.append("    totalPercentUsed: ").append(toIndentedString(totalPercentUsed)).append("\n");
    sb.append("    totalPower: ").append(toIndentedString(totalPower)).append("\n");
    sb.append("    poePorts: ").append(toIndentedString(poePorts)).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    ");
  }
}

