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.constraints.NotNull;
import java.util.Objects;

/**
 * Bandwidth port settings of the bandwidth control.
 */
@ApiModel(description = "Bandwidth port settings of the bandwidth control.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class BandwidthPortSetting   {
  @JsonProperty("upstreamBandwidthUnit")
  private Integer upstreamBandwidthUnit;

  @JsonProperty("upstreamBandwidth")
  private Integer upstreamBandwidth;

  @JsonProperty("downstreamBandwidth")
  private Integer downstreamBandwidth;

  @JsonProperty("downstreamBandwidthUnit")
  private Integer downstreamBandwidthUnit;

  public BandwidthPortSetting upstreamBandwidthUnit(Integer upstreamBandwidthUnit) {
    this.upstreamBandwidthUnit = upstreamBandwidthUnit;
    return this;
  }

  /**
   * Upstream bandwidth unit should be a value as follows: 1: Kbps, 2: Mbps.
   * @return upstreamBandwidthUnit
  */
  @ApiModelProperty(required = true, value = "Upstream bandwidth unit should be a value as follows: 1: Kbps, 2: Mbps.")
  @NotNull


  public Integer getUpstreamBandwidthUnit() {
    return upstreamBandwidthUnit;
  }

  public void setUpstreamBandwidthUnit(Integer upstreamBandwidthUnit) {
    this.upstreamBandwidthUnit = upstreamBandwidthUnit;
  }

  public BandwidthPortSetting upstreamBandwidth(Integer upstreamBandwidth) {
    this.upstreamBandwidth = upstreamBandwidth;
    return this;
  }

  /**
   * Upstream bandwidth should be within the range of 1–9999999.
   * @return upstreamBandwidth
  */
  @ApiModelProperty(value = "Upstream bandwidth should be within the range of 1–9999999.")


  public Integer getUpstreamBandwidth() {
    return upstreamBandwidth;
  }

  public void setUpstreamBandwidth(Integer upstreamBandwidth) {
    this.upstreamBandwidth = upstreamBandwidth;
  }

  public BandwidthPortSetting downstreamBandwidth(Integer downstreamBandwidth) {
    this.downstreamBandwidth = downstreamBandwidth;
    return this;
  }

  /**
   * Downstream bandwidth should be within the range of 1–9999999.
   * @return downstreamBandwidth
  */
  @ApiModelProperty(value = "Downstream bandwidth should be within the range of 1–9999999.")


  public Integer getDownstreamBandwidth() {
    return downstreamBandwidth;
  }

  public void setDownstreamBandwidth(Integer downstreamBandwidth) {
    this.downstreamBandwidth = downstreamBandwidth;
  }

  public BandwidthPortSetting downstreamBandwidthUnit(Integer downstreamBandwidthUnit) {
    this.downstreamBandwidthUnit = downstreamBandwidthUnit;
    return this;
  }

  /**
   * Downstream bandwidth unit should be a value as follows: 1: Kbps, 2: Mbps.
   * @return downstreamBandwidthUnit
  */
  @ApiModelProperty(value = "Downstream bandwidth unit should be a value as follows: 1: Kbps, 2: Mbps.")


  public Integer getDownstreamBandwidthUnit() {
    return downstreamBandwidthUnit;
  }

  public void setDownstreamBandwidthUnit(Integer downstreamBandwidthUnit) {
    this.downstreamBandwidthUnit = downstreamBandwidthUnit;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BandwidthPortSetting bandwidthPortSetting = (BandwidthPortSetting) o;
    return Objects.equals(this.upstreamBandwidthUnit, bandwidthPortSetting.upstreamBandwidthUnit) &&
        Objects.equals(this.upstreamBandwidth, bandwidthPortSetting.upstreamBandwidth) &&
        Objects.equals(this.downstreamBandwidth, bandwidthPortSetting.downstreamBandwidth) &&
        Objects.equals(this.downstreamBandwidthUnit, bandwidthPortSetting.downstreamBandwidthUnit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(upstreamBandwidthUnit, upstreamBandwidth, downstreamBandwidth, downstreamBandwidthUnit);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BandwidthPortSetting {\n");
    
    sb.append("    upstreamBandwidthUnit: ").append(toIndentedString(upstreamBandwidthUnit)).append("\n");
    sb.append("    upstreamBandwidth: ").append(toIndentedString(upstreamBandwidth)).append("\n");
    sb.append("    downstreamBandwidth: ").append(toIndentedString(downstreamBandwidth)).append("\n");
    sb.append("    downstreamBandwidthUnit: ").append(toIndentedString(downstreamBandwidthUnit)).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    ");
  }
}

