/*
 * 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 com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Power source of the base station. Empty until the configuration is reported
 * by the base station.
 */
@JsonPropertyOrder({ BsPower.JSON_PROPERTY_BATTERY_LEVEL, BsPower.JSON_PROPERTY_STATUS })
@JsonTypeName("Bs_power")
@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 BsPower {
  public static final String JSON_PROPERTY_BATTERY_LEVEL = "batteryLevel";
  private Integer batteryLevel;

  public static final String JSON_PROPERTY_STATUS = "status";
  private Integer status;

  public BsPower() {
  }

  public BsPower batteryLevel(Integer batteryLevel) {

    this.batteryLevel = batteryLevel;
    return this;
  }

  /**
   * Battery remaining level (%)
   * 
   * @return batteryLevel
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getBatteryLevel() {
    return batteryLevel;
  }

  @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBatteryLevel(Integer batteryLevel) {
    this.batteryLevel = batteryLevel;
  }

  public BsPower status(Integer status) {

    this.status = status;
    return this;
  }

  /**
   * Power status: - WIND (1) - SOLAR (2) - BATTERY (3) - POE (4) - MAINS (5) -
   * Unknown because of disconnected Base Station (null)
   * 
   * @return status
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getStatus() {
    return status;
  }

  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(Integer status) {
    this.status = status;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BsPower bsPower = (BsPower) o;
    return Objects.equals(this.batteryLevel, bsPower.batteryLevel) && Objects.equals(this.status, bsPower.status);
  }

  @Override
  public int hashCode() {
    return Objects.hash(batteryLevel, status);
  }

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

}
