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.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class PpskProfile   {
  @JsonProperty("profileName")
  private String profileName;

  @JsonProperty("ppsk")
  @Valid
  private List<PpskSetting> ppsk = new ArrayList<>();

  @JsonProperty("type")
  private Integer type;

  public PpskProfile profileName(String profileName) {
    this.profileName = profileName;
    return this;
  }

  /**
   * PPSK Profile Name, should contain 1 to 64 characters.
   * @return profileName
  */
  @ApiModelProperty(required = true, value = "PPSK Profile Name, should contain 1 to 64 characters.")
  @NotNull

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

  public void setProfileName(String profileName) {
    this.profileName = profileName;
  }

  public PpskProfile ppsk(List<PpskSetting> ppsk) {
    this.ppsk = ppsk;
    return this;
  }

  public PpskProfile addPpskItem(PpskSetting ppskItem) {
    this.ppsk.add(ppskItem);
    return this;
  }

  /**
   * PPSK List In the PPSK Profile
   * @return ppsk
  */
  @ApiModelProperty(required = true, value = "PPSK List In the PPSK Profile")
  @NotNull

  @Valid

  public List<PpskSetting> getPpsk() {
    return ppsk;
  }

  public void setPpsk(List<PpskSetting> ppsk) {
    this.ppsk = ppsk;
  }

  public PpskProfile type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * PPSK Profile type: 0：PPSK Without RADIUS;Cloud Based Controller only support PPSK Without RADIUS.
   * @return type
  */
  @ApiModelProperty(required = true, value = "PPSK Profile type: 0：PPSK Without RADIUS;Cloud Based Controller only support PPSK Without RADIUS.")
  @NotNull


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PpskProfile ppskProfile = (PpskProfile) o;
    return Objects.equals(this.profileName, ppskProfile.profileName) &&
        Objects.equals(this.ppsk, ppskProfile.ppsk) &&
        Objects.equals(this.type, ppskProfile.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(profileName, ppsk, type);
  }

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

