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

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

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

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

public class RfScanRadio6g   {
  @JsonProperty("chan")
  private Integer chan;

  @JsonProperty("chanWidth")
  private Integer chanWidth;

  @JsonProperty("util")
  private Integer util;

  @JsonProperty("inter")
  @Valid
  private List<Interference> inter = null;

  public RfScanRadio6g chan(Integer chan) {
    this.chan = chan;
    return this;
  }

  /**
   * Channel number
   * @return chan
  */
  @ApiModelProperty(value = "Channel number")


  public Integer getChan() {
    return chan;
  }

  public void setChan(Integer chan) {
    this.chan = chan;
  }

  public RfScanRadio6g chanWidth(Integer chanWidth) {
    this.chanWidth = chanWidth;
    return this;
  }

  /**
   * ChanWidth should be a value as follows: 2: 20MHz, 3: 40MHz, 5: 80MHz
   * @return chanWidth
  */
  @ApiModelProperty(value = "ChanWidth should be a value as follows: 2: 20MHz, 3: 40MHz, 5: 80MHz")


  public Integer getChanWidth() {
    return chanWidth;
  }

  public void setChanWidth(Integer chanWidth) {
    this.chanWidth = chanWidth;
  }

  public RfScanRadio6g util(Integer util) {
    this.util = util;
    return this;
  }

  /**
   * Channel utilization should be within the range of 0–100.
   * @return util
  */
  @ApiModelProperty(value = "Channel utilization should be within the range of 0–100.")


  public Integer getUtil() {
    return util;
  }

  public void setUtil(Integer util) {
    this.util = util;
  }

  public RfScanRadio6g inter(List<Interference> inter) {
    this.inter = inter;
    return this;
  }

  public RfScanRadio6g addInterItem(Interference interItem) {
    if (this.inter == null) {
      this.inter = new ArrayList<>();
    }
    this.inter.add(interItem);
    return this;
  }

  /**
   * At most two types of interference data are reported in Inter, sorted in descending order of interference intensity
   * @return inter
  */
  @ApiModelProperty(value = "At most two types of interference data are reported in Inter, sorted in descending order of interference intensity")

  @Valid

  public List<Interference> getInter() {
    return inter;
  }

  public void setInter(List<Interference> inter) {
    this.inter = inter;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RfScanRadio6g rfScanRadio6g = (RfScanRadio6g) o;
    return Objects.equals(this.chan, rfScanRadio6g.chan) &&
        Objects.equals(this.chanWidth, rfScanRadio6g.chanWidth) &&
        Objects.equals(this.util, rfScanRadio6g.util) &&
        Objects.equals(this.inter, rfScanRadio6g.inter);
  }

  @Override
  public int hashCode() {
    return Objects.hash(chan, chanWidth, util, inter);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RfScanRadio6g {\n");
    
    sb.append("    chan: ").append(toIndentedString(chan)).append("\n");
    sb.append("    chanWidth: ").append(toIndentedString(chanWidth)).append("\n");
    sb.append("    util: ").append(toIndentedString(util)).append("\n");
    sb.append("    inter: ").append(toIndentedString(inter)).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    ");
  }
}

