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;

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

public class ApChannelDetailOpenApiVo   {
  @JsonProperty("channel")
  private Integer channel;

  @JsonProperty("freq")
  private Integer freq;

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

  public ApChannelDetailOpenApiVo channel(Integer channel) {
    this.channel = channel;
    return this;
  }

  /**
   * channel value; For example, 1 in 1/2412MHz.
   * @return channel
  */
  @ApiModelProperty(value = "channel value; For example, 1 in 1/2412MHz.")


  public Integer getChannel() {
    return channel;
  }

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

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

  /**
   * channel frequency; For example, 2412 in 1/2412MHz.
   * @return freq
  */
  @ApiModelProperty(value = "channel frequency; For example, 2412 in 1/2412MHz.")


  public Integer getFreq() {
    return freq;
  }

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

  public ApChannelDetailOpenApiVo availableChannelWidthList(List<Integer> availableChannelWidthList) {
    this.availableChannelWidthList = availableChannelWidthList;
    return this;
  }

  public ApChannelDetailOpenApiVo addAvailableChannelWidthListItem(Integer availableChannelWidthListItem) {
    if (this.availableChannelWidthList == null) {
      this.availableChannelWidthList = new ArrayList<>();
    }
    this.availableChannelWidthList.add(availableChannelWidthListItem);
    return this;
  }

  /**
   * Available bandwidth list for the channel configuration; For example: [20, 40, 80, 160, 240, 320].
   * @return availableChannelWidthList
  */
  @ApiModelProperty(value = "Available bandwidth list for the channel configuration; For example: [20, 40, 80, 160, 240, 320].")


  public List<Integer> getAvailableChannelWidthList() {
    return availableChannelWidthList;
  }

  public void setAvailableChannelWidthList(List<Integer> availableChannelWidthList) {
    this.availableChannelWidthList = availableChannelWidthList;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApChannelDetailOpenApiVo apChannelDetailOpenApiVo = (ApChannelDetailOpenApiVo) o;
    return Objects.equals(this.channel, apChannelDetailOpenApiVo.channel) &&
        Objects.equals(this.freq, apChannelDetailOpenApiVo.freq) &&
        Objects.equals(this.availableChannelWidthList, apChannelDetailOpenApiVo.availableChannelWidthList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(channel, freq, availableChannelWidthList);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApChannelDetailOpenApiVo {\n");
    
    sb.append("    channel: ").append(toIndentedString(channel)).append("\n");
    sb.append("    freq: ").append(toIndentedString(freq)).append("\n");
    sb.append("    availableChannelWidthList: ").append(toIndentedString(availableChannelWidthList)).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    ");
  }
}

