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

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

import javax.validation.constraints.NotNull;
import java.util.Objects;

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

public class RaSetting   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("preference")
  private Integer preference;

  @JsonProperty("validLifetime")
  private Integer validLifetime;

  @JsonProperty("preferredLifetime")
  private Integer preferredLifetime;

  public RaSetting enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * The switch of Ra
   * @return enable
  */
  @ApiModelProperty(required = true, value = "The switch of Ra")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public RaSetting preference(Integer preference) {
    this.preference = preference;
    return this;
  }

  /**
   * Preference should be a value as follows: 0: \"low\"; 1: \"medium\"; 2: \"high\"
   * @return preference
  */
  @ApiModelProperty(value = "Preference should be a value as follows: 0: \"low\"; 1: \"medium\"; 2: \"high\"")


  public Integer getPreference() {
    return preference;
  }

  public void setPreference(Integer preference) {
    this.preference = preference;
  }

  public RaSetting validLifetime(Integer validLifetime) {
    this.validLifetime = validLifetime;
    return this;
  }

  /**
   * ValidLifetime should be larger than PreferredLifetime.
   * @return validLifetime
  */
  @ApiModelProperty(value = "ValidLifetime should be larger than PreferredLifetime.")


  public Integer getValidLifetime() {
    return validLifetime;
  }

  public void setValidLifetime(Integer validLifetime) {
    this.validLifetime = validLifetime;
  }

  public RaSetting preferredLifetime(Integer preferredLifetime) {
    this.preferredLifetime = preferredLifetime;
    return this;
  }

  /**
   * PreferredLifetime
   * @return preferredLifetime
  */
  @ApiModelProperty(value = "PreferredLifetime")


  public Integer getPreferredLifetime() {
    return preferredLifetime;
  }

  public void setPreferredLifetime(Integer preferredLifetime) {
    this.preferredLifetime = preferredLifetime;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RaSetting raSetting = (RaSetting) o;
    return Objects.equals(this.enable, raSetting.enable) &&
        Objects.equals(this.preference, raSetting.preference) &&
        Objects.equals(this.validLifetime, raSetting.validLifetime) &&
        Objects.equals(this.preferredLifetime, raSetting.preferredLifetime);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, preference, validLifetime, preferredLifetime);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RaSetting {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    preference: ").append(toIndentedString(preference)).append("\n");
    sb.append("    validLifetime: ").append(toIndentedString(validLifetime)).append("\n");
    sb.append("    preferredLifetime: ").append(toIndentedString(preferredLifetime)).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    ");
  }
}

