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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class CreateRadiusProfileOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("authServer")
  @Valid
  private List<RadiusAuthServerOpenApiVo> authServer = new ArrayList<>();

  @JsonProperty("radiusAccountingEnable")
  private Boolean radiusAccountingEnable;

  @JsonProperty("interimUpdateEnable")
  private Boolean interimUpdateEnable;

  @JsonProperty("interimUpdateInterval")
  private Integer interimUpdateInterval;

  @JsonProperty("acctServer")
  @Valid
  private List<RadiusAcctServerOpenApiVo> acctServer = null;

  @JsonProperty("wirelessVlanAssignment")
  private Boolean wirelessVlanAssignment;

  @JsonProperty("coaEnable")
  private Boolean coaEnable;

  @JsonProperty("coaPassword")
  private String coaPassword;

  public CreateRadiusProfileOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Radius profile name should contain 1 to 64 characters
   * @return name
  */
  @ApiModelProperty(required = true, value = "Radius profile name should contain 1 to 64 characters")
  @NotNull

@Pattern(regexp="^[^ \\+\\-\\@\\=]$|^[^ \\+\\-\\@\\=].{0,62}[^ ]$") 
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public CreateRadiusProfileOpenApiVo authServer(List<RadiusAuthServerOpenApiVo> authServer) {
    this.authServer = authServer;
    return this;
  }

  public CreateRadiusProfileOpenApiVo addAuthServerItem(RadiusAuthServerOpenApiVo authServerItem) {
    this.authServer.add(authServerItem);
    return this;
  }

  /**
   * Radius authentication server list
   * @return authServer
  */
  @ApiModelProperty(required = true, value = "Radius authentication server list")
  @NotNull

  @Valid

  public List<RadiusAuthServerOpenApiVo> getAuthServer() {
    return authServer;
  }

  public void setAuthServer(List<RadiusAuthServerOpenApiVo> authServer) {
    this.authServer = authServer;
  }

  public CreateRadiusProfileOpenApiVo radiusAccountingEnable(Boolean radiusAccountingEnable) {
    this.radiusAccountingEnable = radiusAccountingEnable;
    return this;
  }

  /**
   * Radius accounting enable status
   * @return radiusAccountingEnable
  */
  @ApiModelProperty(required = true, value = "Radius accounting enable status")
  @NotNull


  public Boolean getRadiusAccountingEnable() {
    return radiusAccountingEnable;
  }

  public void setRadiusAccountingEnable(Boolean radiusAccountingEnable) {
    this.radiusAccountingEnable = radiusAccountingEnable;
  }

  public CreateRadiusProfileOpenApiVo interimUpdateEnable(Boolean interimUpdateEnable) {
    this.interimUpdateEnable = interimUpdateEnable;
    return this;
  }

  /**
   * When radius accounting enables, interval update enable status
   * @return interimUpdateEnable
  */
  @ApiModelProperty(value = "When radius accounting enables, interval update enable status")


  public Boolean getInterimUpdateEnable() {
    return interimUpdateEnable;
  }

  public void setInterimUpdateEnable(Boolean interimUpdateEnable) {
    this.interimUpdateEnable = interimUpdateEnable;
  }

  public CreateRadiusProfileOpenApiVo interimUpdateInterval(Integer interimUpdateInterval) {
    this.interimUpdateInterval = interimUpdateInterval;
    return this;
  }

  /**
   * When interval update enables, interval update duration, unit: second. InterimUpdateInterval should be within the range of 60-86400
   * @return interimUpdateInterval
  */
  @ApiModelProperty(value = "When interval update enables, interval update duration, unit: second. InterimUpdateInterval should be within the range of 60-86400")


  public Integer getInterimUpdateInterval() {
    return interimUpdateInterval;
  }

  public void setInterimUpdateInterval(Integer interimUpdateInterval) {
    this.interimUpdateInterval = interimUpdateInterval;
  }

  public CreateRadiusProfileOpenApiVo acctServer(List<RadiusAcctServerOpenApiVo> acctServer) {
    this.acctServer = acctServer;
    return this;
  }

  public CreateRadiusProfileOpenApiVo addAcctServerItem(RadiusAcctServerOpenApiVo acctServerItem) {
    if (this.acctServer == null) {
      this.acctServer = new ArrayList<>();
    }
    this.acctServer.add(acctServerItem);
    return this;
  }

  /**
   * Radius accounting server list, valid when parameter [radiusAccountingEnable] is true
   * @return acctServer
  */
  @ApiModelProperty(value = "Radius accounting server list, valid when parameter [radiusAccountingEnable] is true")

  @Valid

  public List<RadiusAcctServerOpenApiVo> getAcctServer() {
    return acctServer;
  }

  public void setAcctServer(List<RadiusAcctServerOpenApiVo> acctServer) {
    this.acctServer = acctServer;
  }

  public CreateRadiusProfileOpenApiVo wirelessVlanAssignment(Boolean wirelessVlanAssignment) {
    this.wirelessVlanAssignment = wirelessVlanAssignment;
    return this;
  }

  /**
   * VLAN assignment for wireless network enable status
   * @return wirelessVlanAssignment
  */
  @ApiModelProperty(required = true, value = "VLAN assignment for wireless network enable status")
  @NotNull


  public Boolean getWirelessVlanAssignment() {
    return wirelessVlanAssignment;
  }

  public void setWirelessVlanAssignment(Boolean wirelessVlanAssignment) {
    this.wirelessVlanAssignment = wirelessVlanAssignment;
  }

  public CreateRadiusProfileOpenApiVo coaEnable(Boolean coaEnable) {
    this.coaEnable = coaEnable;
    return this;
  }

  /**
   * Radius CoA enable status. This configuration applies to the Pro Site of the Omada Pro Controller only
   * @return coaEnable
  */
  @ApiModelProperty(value = "Radius CoA enable status. This configuration applies to the Pro Site of the Omada Pro Controller only")


  public Boolean getCoaEnable() {
    return coaEnable;
  }

  public void setCoaEnable(Boolean coaEnable) {
    this.coaEnable = coaEnable;
  }

  public CreateRadiusProfileOpenApiVo coaPassword(String coaPassword) {
    this.coaPassword = coaPassword;
    return this;
  }

  /**
   * Radius CoA password, required when parameter [coaEnable] is true. CoaPassword should contain 1 to 128 characters. This configuration applies to the Pro Site of the Omada Pro Controller only
   * @return coaPassword
  */
  @ApiModelProperty(value = "Radius CoA password, required when parameter [coaEnable] is true. CoaPassword should contain 1 to 128 characters. This configuration applies to the Pro Site of the Omada Pro Controller only")


  public String getCoaPassword() {
    return coaPassword;
  }

  public void setCoaPassword(String coaPassword) {
    this.coaPassword = coaPassword;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateRadiusProfileOpenApiVo createRadiusProfileOpenApiVo = (CreateRadiusProfileOpenApiVo) o;
    return Objects.equals(this.name, createRadiusProfileOpenApiVo.name) &&
        Objects.equals(this.authServer, createRadiusProfileOpenApiVo.authServer) &&
        Objects.equals(this.radiusAccountingEnable, createRadiusProfileOpenApiVo.radiusAccountingEnable) &&
        Objects.equals(this.interimUpdateEnable, createRadiusProfileOpenApiVo.interimUpdateEnable) &&
        Objects.equals(this.interimUpdateInterval, createRadiusProfileOpenApiVo.interimUpdateInterval) &&
        Objects.equals(this.acctServer, createRadiusProfileOpenApiVo.acctServer) &&
        Objects.equals(this.wirelessVlanAssignment, createRadiusProfileOpenApiVo.wirelessVlanAssignment) &&
        Objects.equals(this.coaEnable, createRadiusProfileOpenApiVo.coaEnable) &&
        Objects.equals(this.coaPassword, createRadiusProfileOpenApiVo.coaPassword);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, authServer, radiusAccountingEnable, interimUpdateEnable, interimUpdateInterval, acctServer, wirelessVlanAssignment, coaEnable, coaPassword);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateRadiusProfileOpenApiVo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    authServer: ").append(toIndentedString(authServer)).append("\n");
    sb.append("    radiusAccountingEnable: ").append(toIndentedString(radiusAccountingEnable)).append("\n");
    sb.append("    interimUpdateEnable: ").append(toIndentedString(interimUpdateEnable)).append("\n");
    sb.append("    interimUpdateInterval: ").append(toIndentedString(interimUpdateInterval)).append("\n");
    sb.append("    acctServer: ").append(toIndentedString(acctServer)).append("\n");
    sb.append("    wirelessVlanAssignment: ").append(toIndentedString(wirelessVlanAssignment)).append("\n");
    sb.append("    coaEnable: ").append(toIndentedString(coaEnable)).append("\n");
    sb.append("    coaPassword: ").append(toIndentedString(coaPassword)).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    ");
  }
}

