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

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

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

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

public class QosBwcOpenApiVo   {
  @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 = new ArrayList<>();

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

  /**
   * The ID of WAN port to which this Bandwidth Control applies. Each WAN port can only be configured with one rule. WAN ID can be obtained from 'Get WAN ports info for Gateway QoS' interface.
   * @return wan
  */
  @ApiModelProperty(required = true, value = "The ID of WAN port to which this Bandwidth Control applies. Each WAN port can only be configured with one rule. WAN ID can be obtained from 'Get WAN ports info for Gateway QoS' interface.")
  @NotNull


  public String getWan() {
    return wan;
  }

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

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

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


  public Boolean getStatus() {
    return status;
  }

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

  public QosBwcOpenApiVo 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(required = true, value = "The UDP Bandwidth Control of Bandwidth Control rule, valid values are true or false.")
  @NotNull


  public Boolean getUdpBandwidthCtrl() {
    return udpBandwidthCtrl;
  }

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

  public QosBwcOpenApiVo 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 QosBwcOpenApiVo 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(required = true, value = "The Outbound TCP ACK Prioritize of Bandwidth Control rule, valid values are true or false.")
  @NotNull


  public Boolean getOutPrioritization() {
    return outPrioritization;
  }

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

  public QosBwcOpenApiVo 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(required = true, value = "The direction value selected in the Direction configuration should be a value as follows: 0: Inbound; 1: Outbound; 2: Both.")
  @NotNull


  public Integer getDirection() {
    return direction;
  }

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

  public QosBwcOpenApiVo 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(required = true, value = "The Inbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.")
  @NotNull


  public Integer getInBandwidth() {
    return inBandwidth;
  }

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

  public QosBwcOpenApiVo 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(required = true, value = "The Outbound Bandwidth of Bandwidth Control rule should be within the range of 100-1000000.")
  @NotNull


  public Integer getOutBandwidth() {
    return outBandwidth;
  }

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

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

  public QosBwcOpenApiVo addClassRatioItem(Integer classRatioItem) {
    this.classRatio.add(classRatioItem);
    return this;
  }

  /**
   * The ratio of class type, value's format is [class1 ratio, class2 ratio, class3 ratio, others ratio], and the total sum should be 100.
   * @return classRatio
  */
  @ApiModelProperty(required = true, value = "The ratio of class type, value's format is [class1 ratio, class2 ratio, class3 ratio, others ratio], and the total sum should be 100.")
  @NotNull


  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;
    }
    QosBwcOpenApiVo qosBwcOpenApiVo = (QosBwcOpenApiVo) o;
    return Objects.equals(this.wan, qosBwcOpenApiVo.wan) &&
        Objects.equals(this.status, qosBwcOpenApiVo.status) &&
        Objects.equals(this.udpBandwidthCtrl, qosBwcOpenApiVo.udpBandwidthCtrl) &&
        Objects.equals(this.udpRatio, qosBwcOpenApiVo.udpRatio) &&
        Objects.equals(this.outPrioritization, qosBwcOpenApiVo.outPrioritization) &&
        Objects.equals(this.direction, qosBwcOpenApiVo.direction) &&
        Objects.equals(this.inBandwidth, qosBwcOpenApiVo.inBandwidth) &&
        Objects.equals(this.outBandwidth, qosBwcOpenApiVo.outBandwidth) &&
        Objects.equals(this.classRatio, qosBwcOpenApiVo.classRatio);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class QosBwcOpenApiVo {\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    ");
  }
}

