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;

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

public class ApRadioSetting   {
  @JsonProperty("radioEnable")
  private Boolean radioEnable;

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

  @JsonProperty("channelWidth")
  private String channelWidth;

  @JsonProperty("channel")
  private String channel;

  @JsonProperty("txPower")
  private Integer txPower;

  @JsonProperty("txPowerLevel")
  private Integer txPowerLevel;

  @JsonProperty("channelLimitEnable")
  private Boolean channelLimitEnable;

  @JsonProperty("freq")
  private Integer freq;

  @JsonProperty("wirelessMode")
  private Integer wirelessMode;

  public ApRadioSetting radioEnable(Boolean radioEnable) {
    this.radioEnable = radioEnable;
    return this;
  }

  /**
   * Enable/Disable radio setting(if false, other params is not required)
   * @return radioEnable
  */
  @ApiModelProperty(value = "Enable/Disable radio setting(if false, other params is not required)")


  public Boolean getRadioEnable() {
    return radioEnable;
  }

  public void setRadioEnable(Boolean radioEnable) {
    this.radioEnable = radioEnable;
  }

  public ApRadioSetting channelRange(List<Integer> channelRange) {
    this.channelRange = channelRange;
    return this;
  }

  public ApRadioSetting addChannelRangeItem(Integer channelRangeItem) {
    if (this.channelRange == null) {
      this.channelRange = new ArrayList<>();
    }
    this.channelRange.add(channelRangeItem);
    return this;
  }

  /**
   * Custom optional channel freq collection.
   * @return channelRange
  */
  @ApiModelProperty(value = "Custom optional channel freq collection.")


  public List<Integer> getChannelRange() {
    return channelRange;
  }

  public void setChannelRange(List<Integer> channelRange) {
    this.channelRange = channelRange;
  }

  public ApRadioSetting channelWidth(String channelWidth) {
    this.channelWidth = channelWidth;
    return this;
  }

  /**
   * RADIO_20 = 2; RADIO_40 = 3; RADIO_40_20 = 4(corresponding 2G Auto); RADIO_80 = 5; RADIO_80_40_20 = 6(corresponding 5G Auto); RADIO_160= 7; RADIO_160_80_40_20 = 8; RADIO_240 = 9; RADIO_320 = 10
   * @return channelWidth
  */
  @ApiModelProperty(value = "RADIO_20 = 2; RADIO_40 = 3; RADIO_40_20 = 4(corresponding 2G Auto); RADIO_80 = 5; RADIO_80_40_20 = 6(corresponding 5G Auto); RADIO_160= 7; RADIO_160_80_40_20 = 8; RADIO_240 = 9; RADIO_320 = 10")


  public String getChannelWidth() {
    return channelWidth;
  }

  public void setChannelWidth(String channelWidth) {
    this.channelWidth = channelWidth;
  }

  public ApRadioSetting channel(String channel) {
    this.channel = channel;
    return this;
  }

  /**
   * Channel
   * @return channel
  */
  @ApiModelProperty(value = "Channel")


  public String getChannel() {
    return channel;
  }

  public void setChannel(String channel) {
    this.channel = channel;
  }

  public ApRadioSetting txPower(Integer txPower) {
    this.txPower = txPower;
    return this;
  }

  /**
   * TX Power
   * @return txPower
  */
  @ApiModelProperty(value = "TX Power")


  public Integer getTxPower() {
    return txPower;
  }

  public void setTxPower(Integer txPower) {
    this.txPower = txPower;
  }

  public ApRadioSetting txPowerLevel(Integer txPowerLevel) {
    this.txPowerLevel = txPowerLevel;
    return this;
  }

  /**
   * It should be a value as follows: 0: Low; 1: Medium; 2: High; 3: Custom; 4: Auto
   * @return txPowerLevel
  */
  @ApiModelProperty(value = "It should be a value as follows: 0: Low; 1: Medium; 2: High; 3: Custom; 4: Auto")


  public Integer getTxPowerLevel() {
    return txPowerLevel;
  }

  public void setTxPowerLevel(Integer txPowerLevel) {
    this.txPowerLevel = txPowerLevel;
  }

  public ApRadioSetting channelLimitEnable(Boolean channelLimitEnable) {
    this.channelLimitEnable = channelLimitEnable;
    return this;
  }

  /**
   * Enable channel limit(site level)
   * @return channelLimitEnable
  */
  @ApiModelProperty(value = "Enable channel limit(site level)")


  public Boolean getChannelLimitEnable() {
    return channelLimitEnable;
  }

  public void setChannelLimitEnable(Boolean channelLimitEnable) {
    this.channelLimitEnable = channelLimitEnable;
  }

  public ApRadioSetting freq(Integer freq) {
    this.freq = freq;
    return this;
  }

  /**
   * Frequency
   * @return freq
  */
  @ApiModelProperty(value = "Frequency")


  public Integer getFreq() {
    return freq;
  }

  public void setFreq(Integer freq) {
    this.freq = freq;
  }

  public ApRadioSetting wirelessMode(Integer wirelessMode) {
    this.wirelessMode = wirelessMode;
    return this;
  }

  /**
   * Wireless mode config status of the device; -2 : Auto; 3 : 802.11b/g mixed(Only for 2.4G); 4 : 802.11b/g/n mixed(Only for 2.4G); 13 : 802.11b/g/n/ax mixed(Only for 2.4G); 17 : 802.11b/g/n/ax/be mixed(Only for 2.4G); 7 : 802.11a/n mixed(Only for 5G); 10 : 802.11a/n/ac mixed(Only for 5G); 16 : 802.11a/n/ac/ax mixed(Only for 5G); 18 : 802.11a/n/ac/ax/be mixed(Only for 5G); 11 : 802.11ax only(Only for 6G); 19 : 802.11ax/be mixed(Only for 6G).
   * @return wirelessMode
  */
  @ApiModelProperty(value = "Wireless mode config status of the device; -2 : Auto; 3 : 802.11b/g mixed(Only for 2.4G); 4 : 802.11b/g/n mixed(Only for 2.4G); 13 : 802.11b/g/n/ax mixed(Only for 2.4G); 17 : 802.11b/g/n/ax/be mixed(Only for 2.4G); 7 : 802.11a/n mixed(Only for 5G); 10 : 802.11a/n/ac mixed(Only for 5G); 16 : 802.11a/n/ac/ax mixed(Only for 5G); 18 : 802.11a/n/ac/ax/be mixed(Only for 5G); 11 : 802.11ax only(Only for 6G); 19 : 802.11ax/be mixed(Only for 6G).")


  public Integer getWirelessMode() {
    return wirelessMode;
  }

  public void setWirelessMode(Integer wirelessMode) {
    this.wirelessMode = wirelessMode;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApRadioSetting apRadioSetting = (ApRadioSetting) o;
    return Objects.equals(this.radioEnable, apRadioSetting.radioEnable) &&
        Objects.equals(this.channelRange, apRadioSetting.channelRange) &&
        Objects.equals(this.channelWidth, apRadioSetting.channelWidth) &&
        Objects.equals(this.channel, apRadioSetting.channel) &&
        Objects.equals(this.txPower, apRadioSetting.txPower) &&
        Objects.equals(this.txPowerLevel, apRadioSetting.txPowerLevel) &&
        Objects.equals(this.channelLimitEnable, apRadioSetting.channelLimitEnable) &&
        Objects.equals(this.freq, apRadioSetting.freq) &&
        Objects.equals(this.wirelessMode, apRadioSetting.wirelessMode);
  }

  @Override
  public int hashCode() {
    return Objects.hash(radioEnable, channelRange, channelWidth, channel, txPower, txPowerLevel, channelLimitEnable, freq, wirelessMode);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApRadioSetting {\n");
    
    sb.append("    radioEnable: ").append(toIndentedString(radioEnable)).append("\n");
    sb.append("    channelRange: ").append(toIndentedString(channelRange)).append("\n");
    sb.append("    channelWidth: ").append(toIndentedString(channelWidth)).append("\n");
    sb.append("    channel: ").append(toIndentedString(channel)).append("\n");
    sb.append("    txPower: ").append(toIndentedString(txPower)).append("\n");
    sb.append("    txPowerLevel: ").append(toIndentedString(txPowerLevel)).append("\n");
    sb.append("    channelLimitEnable: ").append(toIndentedString(channelLimitEnable)).append("\n");
    sb.append("    freq: ").append(toIndentedString(freq)).append("\n");
    sb.append("    wirelessMode: ").append(toIndentedString(wirelessMode)).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    ");
  }
}

