package org.wfc.omada.api.sitesetting.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;

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

public class QosBwcDetailOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("wan")
  private String wan;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("udpBandwidthCtrl")
  private Boolean udpBandwidthCtrl;

  @JsonProperty("udpRatio")
  private Integer udpRatio;

  @JsonProperty("outPrioritization")
  private Boolean outPrioritization;

  @JsonProperty("direction")
  private Integer direction;

  @JsonProperty("inBandwidth")
  private Integer inBandwidth;

  @JsonProperty("outBandwidth")
  private Integer outBandwidth;

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

  public QosBwcDetailOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The ID of Bandwidth Control rule.
   * @return id
  */
  @ApiModelProperty(value = "The ID of Bandwidth Control rule.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public QosBwcDetailOpenApiVo wan(String wan) {
    this.wan = wan;
    return this;
  }

  /**
   * The ID of WAN port to which this Bandwidth Control applies.
   * @return wan
  */
  @ApiModelProperty(value = "The ID of WAN port to which this Bandwidth Control applies.")


  public String getWan() {
    return wan;
  }

  public void setWan(String wan) {
    this.wan = wan;
  }

  public QosBwcDetailOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * The status of Bandwidth Control rule, valid values are true or false.
   * @return status
  */
  @ApiModelProperty(value = "The status of Bandwidth Control rule, valid values are true or false.")


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public QosBwcDetailOpenApiVo udpBandwidthCtrl(Boolean udpBandwidthCtrl) {
    this.udpBandwidthCtrl = udpBandwidthCtrl;
    return this;
  }

  /**
   * The UDP Bandwidth Control of Bandwidth Control rule, valid values are true or false.
   * @return udpBandwidthCtrl
  */
  @ApiModelProperty(value = "The UDP Bandwidth Control of Bandwidth Control rule, valid values are true or false.")


  public Boolean getUdpBandwidthCtrl() {
    return udpBandwidthCtrl;
  }

  public void setUdpBandwidthCtrl(Boolean udpBandwidthCtrl) {
    this.udpBandwidthCtrl = udpBandwidthCtrl;
  }

  public QosBwcDetailOpenApiVo udpRatio(Integer udpRatio) {
    this.udpRatio = udpRatio;
    return this;
  }

  /**
   * The Limited Bandwidth Ratio of Bandwidth Control rule. It should be within the range of 0-100 when parameter [udpBandwidthCtrl] is true.
   * @return udpRatio
  */
  @ApiModelProperty(value = "The Limited Bandwidth Ratio of Bandwidth Control rule. It should be within the range of 0-100 when parameter [udpBandwidthCtrl] is true.")


  public Integer getUdpRatio() {
    return udpRatio;
  }

  public void setUdpRatio(Integer udpRatio) {
    this.udpRatio = udpRatio;
  }

  public QosBwcDetailOpenApiVo outPrioritization(Boolean outPrioritization) {
    this.outPrioritization = outPrioritization;
    return this;
  }

  /**
   * The Outbound TCP ACK Prioritize of Bandwidth Control rule, valid values are true or false.
   * @return outPrioritization
  */
  @ApiModelProperty(value = "The Outbound TCP ACK Prioritize of Bandwidth Control rule, valid values are true or false.")


  public Boolean getOutPrioritization() {
    return outPrioritization;
  }

  public void setOutPrioritization(Boolean outPrioritization) {
    this.outPrioritization = outPrioritization;
  }

  public QosBwcDetailOpenApiVo direction(Integer direction) {
    this.direction = direction;
    return this;
  }

  /**
   * The direction value selected in the Direction configuration should be a value as follows: 0: Inbound; 1: Outbound; 2: Both.
   * @return direction
  */
  @ApiModelProperty(value = "The direction value selected in the Direction configuration should be a value as follows: 0: Inbound; 1: Outbound; 2: Both.")


  public Integer getDirection() {
    return direction;
  }

  public void setDirection(Integer direction) {
    this.direction = direction;
  }

  public QosBwcDetailOpenApiVo inBandwidth(Integer inBandwidth) {
    this.inBandwidth = inBandwidth;
    return this;
  }

  /**
   * The Inbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.
   * @return inBandwidth
  */
  @ApiModelProperty(value = "The Inbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.")


  public Integer getInBandwidth() {
    return inBandwidth;
  }

  public void setInBandwidth(Integer inBandwidth) {
    this.inBandwidth = inBandwidth;
  }

  public QosBwcDetailOpenApiVo outBandwidth(Integer outBandwidth) {
    this.outBandwidth = outBandwidth;
    return this;
  }

  /**
   * The Outbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.
   * @return outBandwidth
  */
  @ApiModelProperty(value = "The Outbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.")


  public Integer getOutBandwidth() {
    return outBandwidth;
  }

  public void setOutBandwidth(Integer outBandwidth) {
    this.outBandwidth = outBandwidth;
  }

  public QosBwcDetailOpenApiVo classRatio(List<Integer> classRatio) {
    this.classRatio = classRatio;
    return this;
  }

  public QosBwcDetailOpenApiVo addClassRatioItem(Integer classRatioItem) {
    if (this.classRatio == null) {
      this.classRatio = new ArrayList<>();
    }
    this.classRatio.add(classRatioItem);
    return this;
  }

  /**
   * The ratio of class type, value's format is [class1 ratio, class2 ratio, class3 ratio, others ratio].
   * @return classRatio
  */
  @ApiModelProperty(value = "The ratio of class type, value's format is [class1 ratio, class2 ratio, class3 ratio, others ratio].")


  public List<Integer> getClassRatio() {
    return classRatio;
  }

  public void setClassRatio(List<Integer> classRatio) {
    this.classRatio = classRatio;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    QosBwcDetailOpenApiVo qosBwcDetailOpenApiVo = (QosBwcDetailOpenApiVo) o;
    return Objects.equals(this.id, qosBwcDetailOpenApiVo.id) &&
        Objects.equals(this.wan, qosBwcDetailOpenApiVo.wan) &&
        Objects.equals(this.status, qosBwcDetailOpenApiVo.status) &&
        Objects.equals(this.udpBandwidthCtrl, qosBwcDetailOpenApiVo.udpBandwidthCtrl) &&
        Objects.equals(this.udpRatio, qosBwcDetailOpenApiVo.udpRatio) &&
        Objects.equals(this.outPrioritization, qosBwcDetailOpenApiVo.outPrioritization) &&
        Objects.equals(this.direction, qosBwcDetailOpenApiVo.direction) &&
        Objects.equals(this.inBandwidth, qosBwcDetailOpenApiVo.inBandwidth) &&
        Objects.equals(this.outBandwidth, qosBwcDetailOpenApiVo.outBandwidth) &&
        Objects.equals(this.classRatio, qosBwcDetailOpenApiVo.classRatio);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, wan, status, udpBandwidthCtrl, udpRatio, outPrioritization, direction, inBandwidth, outBandwidth, classRatio);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class QosBwcDetailOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    wan: ").append(toIndentedString(wan)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    udpBandwidthCtrl: ").append(toIndentedString(udpBandwidthCtrl)).append("\n");
    sb.append("    udpRatio: ").append(toIndentedString(udpRatio)).append("\n");
    sb.append("    outPrioritization: ").append(toIndentedString(outPrioritization)).append("\n");
    sb.append("    direction: ").append(toIndentedString(direction)).append("\n");
    sb.append("    inBandwidth: ").append(toIndentedString(inBandwidth)).append("\n");
    sb.append("    outBandwidth: ").append(toIndentedString(outBandwidth)).append("\n");
    sb.append("    classRatio: ").append(toIndentedString(classRatio)).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    ");
  }
}

