/*
 * ThingPark things management Networks API
 * REST interface for networks management. 
 *
 * The version of the OpenAPI document: 7.3
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package lora.ns.actility.api.model.basestation;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;

import lora.ns.actility.api.model.basestation.BsLogicalChannelsUpDownInner;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * The attribute returns the default list of LC indexes, as DECIMAL ranges,
 * sorted by: - Symmetric uplink/downlink channels, - Asymmetric downlink
 * channels, - And RX2 channel. NOTE: When the ISM band is unknown (i.e. not yet
 * reported by the LRR), the WS returns a default list of LC indexes. This
 * parameter must no longer be used: the endpoint &#x60;GET
 * /partners/{partnerUid}/rfRegions/{rfRegionUid}/lcs&#x60; must be used in
 * replacement.
 * 
 * @deprecated
 */
@Deprecated
@JsonPropertyOrder({ BsLogicalChannels.JSON_PROPERTY_UP_DOWN, BsLogicalChannels.JSON_PROPERTY_DOWN_ASYM,
    BsLogicalChannels.JSON_PROPERTY_RX2 })
@JsonTypeName("Bs_logicalChannels")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-31T16:08:44.630492043+02:00[Europe/Paris]", comments = "Generator version: 7.6.0")
public class BsLogicalChannels {
  public static final String JSON_PROPERTY_UP_DOWN = "upDown";
  private List<BsLogicalChannelsUpDownInner> upDown = new ArrayList<>();

  public static final String JSON_PROPERTY_DOWN_ASYM = "downAsym";
  private List<BsLogicalChannelsUpDownInner> downAsym = new ArrayList<>();

  public static final String JSON_PROPERTY_RX2 = "rx2";
  private String rx2;

  public BsLogicalChannels() {
  }

  public BsLogicalChannels upDown(List<BsLogicalChannelsUpDownInner> upDown) {

    this.upDown = upDown;
    return this;
  }

  public BsLogicalChannels addUpDownItem(BsLogicalChannelsUpDownInner upDownItem) {
    if (this.upDown == null) {
      this.upDown = new ArrayList<>();
    }
    this.upDown.add(upDownItem);
    return this;
  }

  /**
   * List of symmetric uplink/downlink channels **For eu868, eu433, cn779, as923,
   * kr920, sg920, tw920:** from 1 to 16 **For us915, au915:** from 0 to 71 **For
   * cn470:** from 0 to 95 **For ww2g4:** from 1 to 3
   * 
   * @return upDown
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_UP_DOWN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<BsLogicalChannelsUpDownInner> getUpDown() {
    return upDown;
  }

  @JsonProperty(JSON_PROPERTY_UP_DOWN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUpDown(List<BsLogicalChannelsUpDownInner> upDown) {
    this.upDown = upDown;
  }

  public BsLogicalChannels downAsym(List<BsLogicalChannelsUpDownInner> downAsym) {

    this.downAsym = downAsym;
    return this;
  }

  public BsLogicalChannels addDownAsymItem(BsLogicalChannelsUpDownInner downAsymItem) {
    if (this.downAsym == null) {
      this.downAsym = new ArrayList<>();
    }
    this.downAsym.add(downAsymItem);
    return this;
  }

  /**
   * List of asymmetric downlink channels **For eu868, eu433, cn779, as923, kr920,
   * sg920, tw920:** from 127 to 142 **For us915, au915:** from 127 to 134 **For
   * cn470:** from 127 to 174 **For ww2g4:** n/a
   * 
   * @return downAsym
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DOWN_ASYM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<BsLogicalChannelsUpDownInner> getDownAsym() {
    return downAsym;
  }

  @JsonProperty(JSON_PROPERTY_DOWN_ASYM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDownAsym(List<BsLogicalChannelsUpDownInner> downAsym) {
    this.downAsym = downAsym;
  }

  public BsLogicalChannels rx2(String rx2) {

    this.rx2 = rx2;
    return this;
  }

  /**
   * RX2 channel **For eu868, eu433, cn779, as923, kr920, sg920, tw920:** 255
   * **For us915, au915:** 255 **For cn470:** 255 **For ww2g4:** n/a
   * 
   * @return rx2
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RX2)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRx2() {
    return rx2;
  }

  @JsonProperty(JSON_PROPERTY_RX2)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRx2(String rx2) {
    this.rx2 = rx2;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BsLogicalChannels bsLogicalChannels = (BsLogicalChannels) o;
    return Objects.equals(this.upDown, bsLogicalChannels.upDown)
            && Objects.equals(this.downAsym, bsLogicalChannels.downAsym)
            && Objects.equals(this.rx2, bsLogicalChannels.rx2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(upDown, downAsym, rx2);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BsLogicalChannels {\n");
    sb.append("    upDown: ").append(toIndentedString(upDown)).append("\n");
    sb.append("    downAsym: ").append(toIndentedString(downAsym)).append("\n");
    sb.append("    rx2: ").append(toIndentedString(rx2)).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    ");
  }

}
