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;

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

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

  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("ssidList")
  @Valid
  private List<String> ssidList = null;

  @JsonProperty("networkList")
  @Valid
  private List<String> networkList = null;

  @JsonProperty("authType")
  private Integer authType;

  @JsonProperty("authTimeout")
  private AuthTimeoutSetting authTimeout;

  @JsonProperty("httpsRedirectEnable")
  private Boolean httpsRedirectEnable;

  @JsonProperty("landingPage")
  private Integer landingPage;

  @JsonProperty("landingUrlScheme")
  private String landingUrlScheme;

  @JsonProperty("landingUrl")
  private String landingUrl;

  @JsonProperty("noAuth")
  private Object noAuth;

  @JsonProperty("simplePassword")
  private Object simplePassword;

  @JsonProperty("hotspot")
  private Object hotspot;

  @JsonProperty("sms")
  private SmsSetting sms;

  @JsonProperty("portalFormId")
  private String portalFormId;

  @JsonProperty("hotspotRadius")
  private HotspotRadiusSetting hotspotRadius;

  @JsonProperty("externalPortal")
  private Object externalPortal;

  @JsonProperty("externalRadius")
  private ExternalRadiusSetting externalRadius;

  @JsonProperty("ldap")
  private LdapSetting ldap;

  @JsonProperty("pageType")
  private Integer pageType;

  @JsonProperty("importedPortalPage")
  private ImportedPortalPageOpenApiVo importedPortalPage;

  @JsonProperty("portalCustomize")
  private PortalCustomizeOpenApiVo portalCustomize;

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

  /**
   * Portal Name, should contain 1 to 128 characters
   * @return name
  */
  @ApiModelProperty(required = true, value = "Portal Name, should contain 1 to 128 characters")
  @NotNull

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

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

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

  /**
   * Portal Enable
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Portal Enable")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

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

  public PortalSetting ssidList(List<String> ssidList) {
    this.ssidList = ssidList;
    return this;
  }

  public PortalSetting addSsidListItem(String ssidListItem) {
    if (this.ssidList == null) {
      this.ssidList = new ArrayList<>();
    }
    this.ssidList.add(ssidListItem);
    return this;
  }

  /**
   * SSID ID list bound with this Portal. SSID can be created using 'Create new SSID' ('Create new SSID template') interface, and SSID ID can be obtained from 'Get SSID list' ('Get SSID template list') interface
   * @return ssidList
  */
  @ApiModelProperty(value = "SSID ID list bound with this Portal. SSID can be created using 'Create new SSID' ('Create new SSID template') interface, and SSID ID can be obtained from 'Get SSID list' ('Get SSID template list') interface")


  public List<String> getSsidList() {
    return ssidList;
  }

  public void setSsidList(List<String> ssidList) {
    this.ssidList = ssidList;
  }

  public PortalSetting networkList(List<String> networkList) {
    this.networkList = networkList;
    return this;
  }

  public PortalSetting addNetworkListItem(String networkListItem) {
    if (this.networkList == null) {
      this.networkList = new ArrayList<>();
    }
    this.networkList.add(networkListItem);
    return this;
  }

  /**
   * Lan network ID list bound with this Portal. LAN Network can be created using 'Create LAN network' ('Create LAN network template') interface, and LAN Network ID can be obtained from 'Get LAN network list' ('Get LAN network template list') interface
   * @return networkList
  */
  @ApiModelProperty(value = "Lan network ID list bound with this Portal. LAN Network can be created using 'Create LAN network' ('Create LAN network template') interface, and LAN Network ID can be obtained from 'Get LAN network list' ('Get LAN network template list') interface")


  public List<String> getNetworkList() {
    return networkList;
  }

  public void setNetworkList(List<String> networkList) {
    this.networkList = networkList;
  }

  public PortalSetting authType(Integer authType) {
    this.authType = authType;
    return this;
  }

  /**
   * Auth Type, should be a value as follows: <br/>0：No Authentication; 1：Simple Password;<br/>2: External Radius Server; 4：External Portal Server;<br/>11：Hotspot; 15: Ldap.
   * @return authType
  */
  @ApiModelProperty(required = true, value = "Auth Type, should be a value as follows: <br/>0：No Authentication; 1：Simple Password;<br/>2: External Radius Server; 4：External Portal Server;<br/>11：Hotspot; 15: Ldap.")
  @NotNull


  public Integer getAuthType() {
    return authType;
  }

  public void setAuthType(Integer authType) {
    this.authType = authType;
  }

  public PortalSetting authTimeout(AuthTimeoutSetting authTimeout) {
    this.authTimeout = authTimeout;
    return this;
  }

  /**
   * Get authTimeout
   * @return authTimeout
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull

  @Valid

  public AuthTimeoutSetting getAuthTimeout() {
    return authTimeout;
  }

  public void setAuthTimeout(AuthTimeoutSetting authTimeout) {
    this.authTimeout = authTimeout;
  }

  public PortalSetting httpsRedirectEnable(Boolean httpsRedirectEnable) {
    this.httpsRedirectEnable = httpsRedirectEnable;
    return this;
  }

  /**
   * With this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites.
   * @return httpsRedirectEnable
  */
  @ApiModelProperty(required = true, value = "With this option enabled, unauthenticated clients will be redirected to the Portal page when they are trying to browse HTTPS websites.")
  @NotNull


  public Boolean getHttpsRedirectEnable() {
    return httpsRedirectEnable;
  }

  public void setHttpsRedirectEnable(Boolean httpsRedirectEnable) {
    this.httpsRedirectEnable = httpsRedirectEnable;
  }

  public PortalSetting landingPage(Integer landingPage) {
    this.landingPage = landingPage;
    return this;
  }

  /**
   * LandingPage enum: 1: Redirect to the original URL, 2: Redirect to Promotional URL, 3: Redirect to Logout Page. <br/>With The Original URL selected, clients are directed to the URL they request for after they pass Portal authentication. <br/>With The Promotional URL selected, clients are directed to the specified URL here after they pass Portal authentication. <br/>With The Logout Page selected, clients are directed to the Portal Logout Page after they pass Portal authentication. 
   * @return landingPage
  */
  @ApiModelProperty(required = true, value = "LandingPage enum: 1: Redirect to the original URL, 2: Redirect to Promotional URL, 3: Redirect to Logout Page. <br/>With The Original URL selected, clients are directed to the URL they request for after they pass Portal authentication. <br/>With The Promotional URL selected, clients are directed to the specified URL here after they pass Portal authentication. <br/>With The Logout Page selected, clients are directed to the Portal Logout Page after they pass Portal authentication. ")
  @NotNull


  public Integer getLandingPage() {
    return landingPage;
  }

  public void setLandingPage(Integer landingPage) {
    this.landingPage = landingPage;
  }

  public PortalSetting landingUrlScheme(String landingUrlScheme) {
    this.landingUrlScheme = landingUrlScheme;
    return this;
  }

  /**
   * If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https.
   * @return landingUrlScheme
  */
  @ApiModelProperty(value = "If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested, content is http or https.")

@Pattern(regexp="http|https") 
  public String getLandingUrlScheme() {
    return landingUrlScheme;
  }

  public void setLandingUrlScheme(String landingUrlScheme) {
    this.landingUrlScheme = landingUrlScheme;
  }

  public PortalSetting landingUrl(String landingUrl) {
    this.landingUrl = landingUrl;
    return this;
  }

  /**
   * If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested.
   * @return landingUrl
  */
  @ApiModelProperty(value = "If Parameter [landingPage] is 2(Redirect to Promotional URL),this Parameter is requested.")

@Pattern(regexp="^(([-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,63})|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.)){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))((:([1-9]|[1-9]\\d|[1-9]\\d{2}|[1-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5]))?)(/([-a-zA-Z0-9@:%_+.~#?&//=]*))?$") 
  public String getLandingUrl() {
    return landingUrl;
  }

  public void setLandingUrl(String landingUrl) {
    this.landingUrl = landingUrl;
  }

  public PortalSetting noAuth(Object noAuth) {
    this.noAuth = noAuth;
    return this;
  }

  /**
   * Get noAuth
   * @return noAuth
  */
  @ApiModelProperty(value = "")

  @Valid

  public Object getNoAuth() {
    return noAuth;
  }

  public void setNoAuth(Object noAuth) {
    this.noAuth = noAuth;
  }

  public PortalSetting simplePassword(Object simplePassword) {
    this.simplePassword = simplePassword;
    return this;
  }

  /**
   * Get simplePassword
   * @return simplePassword
  */
  @ApiModelProperty(value = "")

  @Valid

  public Object getSimplePassword() {
    return simplePassword;
  }

  public void setSimplePassword(Object simplePassword) {
    this.simplePassword = simplePassword;
  }

  public PortalSetting hotspot(Object hotspot) {
    this.hotspot = hotspot;
    return this;
  }

  /**
   * Get hotspot
   * @return hotspot
  */
  @ApiModelProperty(value = "")

  @Valid

  public Object getHotspot() {
    return hotspot;
  }

  public void setHotspot(Object hotspot) {
    this.hotspot = hotspot;
  }

  public PortalSetting sms(SmsSetting sms) {
    this.sms = sms;
    return this;
  }

  /**
   * Get sms
   * @return sms
  */
  @ApiModelProperty(value = "")

  @Valid

  public SmsSetting getSms() {
    return sms;
  }

  public void setSms(SmsSetting sms) {
    this.sms = sms;
  }

  public PortalSetting portalFormId(String portalFormId) {
    this.portalFormId = portalFormId;
    return this;
  }

  /**
   * Portal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12.
   * @return portalFormId
  */
  @ApiModelProperty(value = "Portal form ID, required when [authType] is 11 and hotspot [enabledTypes] contains 12.")


  public String getPortalFormId() {
    return portalFormId;
  }

  public void setPortalFormId(String portalFormId) {
    this.portalFormId = portalFormId;
  }

  public PortalSetting hotspotRadius(HotspotRadiusSetting hotspotRadius) {
    this.hotspotRadius = hotspotRadius;
    return this;
  }

  /**
   * Get hotspotRadius
   * @return hotspotRadius
  */
  @ApiModelProperty(value = "")

  @Valid

  public HotspotRadiusSetting getHotspotRadius() {
    return hotspotRadius;
  }

  public void setHotspotRadius(HotspotRadiusSetting hotspotRadius) {
    this.hotspotRadius = hotspotRadius;
  }

  public PortalSetting externalPortal(Object externalPortal) {
    this.externalPortal = externalPortal;
    return this;
  }

  /**
   * Get externalPortal
   * @return externalPortal
  */
  @ApiModelProperty(value = "")

  @Valid

  public Object getExternalPortal() {
    return externalPortal;
  }

  public void setExternalPortal(Object externalPortal) {
    this.externalPortal = externalPortal;
  }

  public PortalSetting externalRadius(ExternalRadiusSetting externalRadius) {
    this.externalRadius = externalRadius;
    return this;
  }

  /**
   * Get externalRadius
   * @return externalRadius
  */
  @ApiModelProperty(value = "")

  @Valid

  public ExternalRadiusSetting getExternalRadius() {
    return externalRadius;
  }

  public void setExternalRadius(ExternalRadiusSetting externalRadius) {
    this.externalRadius = externalRadius;
  }

  public PortalSetting ldap(LdapSetting ldap) {
    this.ldap = ldap;
    return this;
  }

  /**
   * Get ldap
   * @return ldap
  */
  @ApiModelProperty(value = "")

  @Valid

  public LdapSetting getLdap() {
    return ldap;
  }

  public void setLdap(LdapSetting ldap) {
    this.ldap = ldap;
  }

  public PortalSetting pageType(Integer pageType) {
    this.pageType = pageType;
    return this;
  }

  /**
   * Page type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1
   * @return pageType
  */
  @ApiModelProperty(value = "Page type, should be a value as follows: 1: Use default page, 2: use uploaded page. When [pageType] is null, it defaults to 1")


  public Integer getPageType() {
    return pageType;
  }

  public void setPageType(Integer pageType) {
    this.pageType = pageType;
  }

  public PortalSetting importedPortalPage(ImportedPortalPageOpenApiVo importedPortalPage) {
    this.importedPortalPage = importedPortalPage;
    return this;
  }

  /**
   * Get importedPortalPage
   * @return importedPortalPage
  */
  @ApiModelProperty(value = "")

  @Valid

  public ImportedPortalPageOpenApiVo getImportedPortalPage() {
    return importedPortalPage;
  }

  public void setImportedPortalPage(ImportedPortalPageOpenApiVo importedPortalPage) {
    this.importedPortalPage = importedPortalPage;
  }

  public PortalSetting portalCustomize(PortalCustomizeOpenApiVo portalCustomize) {
    this.portalCustomize = portalCustomize;
    return this;
  }

  /**
   * Get portalCustomize
   * @return portalCustomize
  */
  @ApiModelProperty(value = "")

  @Valid

  public PortalCustomizeOpenApiVo getPortalCustomize() {
    return portalCustomize;
  }

  public void setPortalCustomize(PortalCustomizeOpenApiVo portalCustomize) {
    this.portalCustomize = portalCustomize;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PortalSetting portalSetting = (PortalSetting) o;
    return Objects.equals(this.name, portalSetting.name) &&
        Objects.equals(this.enable, portalSetting.enable) &&
        Objects.equals(this.ssidList, portalSetting.ssidList) &&
        Objects.equals(this.networkList, portalSetting.networkList) &&
        Objects.equals(this.authType, portalSetting.authType) &&
        Objects.equals(this.authTimeout, portalSetting.authTimeout) &&
        Objects.equals(this.httpsRedirectEnable, portalSetting.httpsRedirectEnable) &&
        Objects.equals(this.landingPage, portalSetting.landingPage) &&
        Objects.equals(this.landingUrlScheme, portalSetting.landingUrlScheme) &&
        Objects.equals(this.landingUrl, portalSetting.landingUrl) &&
        Objects.equals(this.noAuth, portalSetting.noAuth) &&
        Objects.equals(this.simplePassword, portalSetting.simplePassword) &&
        Objects.equals(this.hotspot, portalSetting.hotspot) &&
        Objects.equals(this.sms, portalSetting.sms) &&
        Objects.equals(this.portalFormId, portalSetting.portalFormId) &&
        Objects.equals(this.hotspotRadius, portalSetting.hotspotRadius) &&
        Objects.equals(this.externalPortal, portalSetting.externalPortal) &&
        Objects.equals(this.externalRadius, portalSetting.externalRadius) &&
        Objects.equals(this.ldap, portalSetting.ldap) &&
        Objects.equals(this.pageType, portalSetting.pageType) &&
        Objects.equals(this.importedPortalPage, portalSetting.importedPortalPage) &&
        Objects.equals(this.portalCustomize, portalSetting.portalCustomize);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, enable, ssidList, networkList, authType, authTimeout, httpsRedirectEnable, landingPage, landingUrlScheme, landingUrl, noAuth, simplePassword, hotspot, sms, portalFormId, hotspotRadius, externalPortal, externalRadius, ldap, pageType, importedPortalPage, portalCustomize);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PortalSetting {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    ssidList: ").append(toIndentedString(ssidList)).append("\n");
    sb.append("    networkList: ").append(toIndentedString(networkList)).append("\n");
    sb.append("    authType: ").append(toIndentedString(authType)).append("\n");
    sb.append("    authTimeout: ").append(toIndentedString(authTimeout)).append("\n");
    sb.append("    httpsRedirectEnable: ").append(toIndentedString(httpsRedirectEnable)).append("\n");
    sb.append("    landingPage: ").append(toIndentedString(landingPage)).append("\n");
    sb.append("    landingUrlScheme: ").append(toIndentedString(landingUrlScheme)).append("\n");
    sb.append("    landingUrl: ").append(toIndentedString(landingUrl)).append("\n");
    sb.append("    noAuth: ").append(toIndentedString(noAuth)).append("\n");
    sb.append("    simplePassword: ").append(toIndentedString(simplePassword)).append("\n");
    sb.append("    hotspot: ").append(toIndentedString(hotspot)).append("\n");
    sb.append("    sms: ").append(toIndentedString(sms)).append("\n");
    sb.append("    portalFormId: ").append(toIndentedString(portalFormId)).append("\n");
    sb.append("    hotspotRadius: ").append(toIndentedString(hotspotRadius)).append("\n");
    sb.append("    externalPortal: ").append(toIndentedString(externalPortal)).append("\n");
    sb.append("    externalRadius: ").append(toIndentedString(externalRadius)).append("\n");
    sb.append("    ldap: ").append(toIndentedString(ldap)).append("\n");
    sb.append("    pageType: ").append(toIndentedString(pageType)).append("\n");
    sb.append("    importedPortalPage: ").append(toIndentedString(importedPortalPage)).append("\n");
    sb.append("    portalCustomize: ").append(toIndentedString(portalCustomize)).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    ");
  }
}

