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;

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

public class ClientToSiteVpnServer   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("accountPassword")
  private Boolean accountPassword;

  @JsonProperty("tunnelMode")
  private Integer tunnelMode;

  @JsonProperty("openVpnMode")
  private Integer openVpnMode;

  @JsonProperty("remoteIp")
  private String remoteIp;

  @JsonProperty("networkType")
  private Integer networkType;

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

  @JsonProperty("customNetwork")
  @Valid
  private List<IpSubnetsVo> customNetwork = null;

  @JsonProperty("preSharedKey")
  private String preSharedKey;

  @JsonProperty("wan")
  @Valid
  private List<String> wan = new ArrayList<>();

  @JsonProperty("clientVpnType")
  private Integer clientVpnType;

  @JsonProperty("encryption")
  private Integer encryption;

  @JsonProperty("ipPoolType")
  private Integer ipPoolType;

  @JsonProperty("ipPoolStart")
  private String ipPoolStart;

  @JsonProperty("ipPoolEnd")
  private String ipPoolEnd;

  @JsonProperty("ipPool")
  private IpSubnetsVo ipPool;

  @JsonProperty("primaryDns")
  private String primaryDns;

  @JsonProperty("secondaryDns")
  private String secondaryDns;

  @JsonProperty("serviceType")
  private Integer serviceType;

  @JsonProperty("servicePort")
  private Integer servicePort;

  @JsonProperty("authMode")
  private Integer authMode;

  @JsonProperty("advancedSetting")
  private VpnAdvancedSettingOpenApiVo advancedSetting;

  public ClientToSiteVpnServer id(String id) {
    this.id = id;
    return this;
  }

  /**
   * ID of the VPN.
   * @return id
  */
  @ApiModelProperty(value = "ID of the VPN.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

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

@Pattern(regexp="^[\\041-\\0176]$|^[\\041-\\0176][\\040-\\0176]{0,61}[\\041-\\0176]$") 
  public String getName() {
    return name;
  }

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

  public ClientToSiteVpnServer status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * Status of the VPN.
   * @return status
  */
  @ApiModelProperty(value = "Status of the VPN.")


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public ClientToSiteVpnServer accountPassword(Boolean accountPassword) {
    this.accountPassword = accountPassword;
    return this;
  }

  /**
   * Account password of the VPN, only for server OpenVPN.
   * @return accountPassword
  */
  @ApiModelProperty(value = "Account password of the VPN, only for server OpenVPN.")


  public Boolean getAccountPassword() {
    return accountPassword;
  }

  public void setAccountPassword(Boolean accountPassword) {
    this.accountPassword = accountPassword;
  }

  public ClientToSiteVpnServer tunnelMode(Integer tunnelMode) {
    this.tunnelMode = tunnelMode;
    return this;
  }

  /**
   * Tunnel mode(only for server OpenVPN)should be a value as follows: 0: split; 1: full.
   * @return tunnelMode
  */
  @ApiModelProperty(value = "Tunnel mode(only for server OpenVPN)should be a value as follows: 0: split; 1: full.")


  public Integer getTunnelMode() {
    return tunnelMode;
  }

  public void setTunnelMode(Integer tunnelMode) {
    this.tunnelMode = tunnelMode;
  }

  public ClientToSiteVpnServer openVpnMode(Integer openVpnMode) {
    this.openVpnMode = openVpnMode;
    return this;
  }

  /**
   * OpenVPN mode should be a value as follows: 0: certification; 1: certification+account.
   * @return openVpnMode
  */
  @ApiModelProperty(value = "OpenVPN mode should be a value as follows: 0: certification; 1: certification+account.")


  public Integer getOpenVpnMode() {
    return openVpnMode;
  }

  public void setOpenVpnMode(Integer openVpnMode) {
    this.openVpnMode = openVpnMode;
  }

  public ClientToSiteVpnServer remoteIp(String remoteIp) {
    this.remoteIp = remoteIp;
    return this;
  }

  /**
   * Remote IP of the VPN
   * @return remoteIp
  */
  @ApiModelProperty(value = "Remote IP of the VPN")


  public String getRemoteIp() {
    return remoteIp;
  }

  public void setRemoteIp(String remoteIp) {
    this.remoteIp = remoteIp;
  }

  public ClientToSiteVpnServer networkType(Integer networkType) {
    this.networkType = networkType;
    return this;
  }

  /**
   * Network type should be a value as follows: 0: network list; 1: custom networks.
   * @return networkType
  */
  @ApiModelProperty(value = "Network type should be a value as follows: 0: network list; 1: custom networks.")


  public Integer getNetworkType() {
    return networkType;
  }

  public void setNetworkType(Integer networkType) {
    this.networkType = networkType;
  }

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

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

  /**
   * Network list of the VPN. Network can be created using 'Create LAN network' interface, and network ID can be obtained from 'Get LAN network list' interface.
   * @return networkList
  */
  @ApiModelProperty(value = "Network list of the VPN. Network can be created using 'Create LAN network' interface, and network ID can be obtained from 'Get LAN network list' interface.")


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

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

  public ClientToSiteVpnServer customNetwork(List<IpSubnetsVo> customNetwork) {
    this.customNetwork = customNetwork;
    return this;
  }

  public ClientToSiteVpnServer addCustomNetworkItem(IpSubnetsVo customNetworkItem) {
    if (this.customNetwork == null) {
      this.customNetwork = new ArrayList<>();
    }
    this.customNetwork.add(customNetworkItem);
    return this;
  }

  /**
   * Custom networks of the VPN.
   * @return customNetwork
  */
  @ApiModelProperty(value = "Custom networks of the VPN.")

  @Valid

  public List<IpSubnetsVo> getCustomNetwork() {
    return customNetwork;
  }

  public void setCustomNetwork(List<IpSubnetsVo> customNetwork) {
    this.customNetwork = customNetwork;
  }

  public ClientToSiteVpnServer preSharedKey(String preSharedKey) {
    this.preSharedKey = preSharedKey;
    return this;
  }

  /**
   * Pre-shared key of the VPN.
   * @return preSharedKey
  */
  @ApiModelProperty(value = "Pre-shared key of the VPN.")


  public String getPreSharedKey() {
    return preSharedKey;
  }

  public void setPreSharedKey(String preSharedKey) {
    this.preSharedKey = preSharedKey;
  }

  public ClientToSiteVpnServer wan(List<String> wan) {
    this.wan = wan;
    return this;
  }

  public ClientToSiteVpnServer addWanItem(String wanItem) {
    this.wan.add(wanItem);
    return this;
  }

  /**
   * WAN list of the VPN. WAN port ID can be obtained from 'Get internet basic info' interface.
   * @return wan
  */
  @ApiModelProperty(required = true, value = "WAN list of the VPN. WAN port ID can be obtained from 'Get internet basic info' interface.")
  @NotNull


  public List<String> getWan() {
    return wan;
  }

  public void setWan(List<String> wan) {
    this.wan = wan;
  }

  public ClientToSiteVpnServer clientVpnType(Integer clientVpnType) {
    this.clientVpnType = clientVpnType;
    return this;
  }

  /**
   * Client Vpn type should be a value as follows: 0: L2TP; 1: PPTP; 2: IPSec; 3: OpenVPN.
   * @return clientVpnType
  */
  @ApiModelProperty(required = true, value = "Client Vpn type should be a value as follows: 0: L2TP; 1: PPTP; 2: IPSec; 3: OpenVPN.")
  @NotNull


  public Integer getClientVpnType() {
    return clientVpnType;
  }

  public void setClientVpnType(Integer clientVpnType) {
    this.clientVpnType = clientVpnType;
  }

  public ClientToSiteVpnServer encryption(Integer encryption) {
    this.encryption = encryption;
    return this;
  }

  /**
   * Encryption should be a value as follows: 0: Encrypted; 1: Unencrypted.
   * @return encryption
  */
  @ApiModelProperty(value = "Encryption should be a value as follows: 0: Encrypted; 1: Unencrypted.")


  public Integer getEncryption() {
    return encryption;
  }

  public void setEncryption(Integer encryption) {
    this.encryption = encryption;
  }

  public ClientToSiteVpnServer ipPoolType(Integer ipPoolType) {
    this.ipPoolType = ipPoolType;
    return this;
  }

  /**
   * IP pool type should be a value as follows: 0: Ip Address/Mask; 1: Ip Address Range.
   * @return ipPoolType
  */
  @ApiModelProperty(value = "IP pool type should be a value as follows: 0: Ip Address/Mask; 1: Ip Address Range.")


  public Integer getIpPoolType() {
    return ipPoolType;
  }

  public void setIpPoolType(Integer ipPoolType) {
    this.ipPoolType = ipPoolType;
  }

  public ClientToSiteVpnServer ipPoolStart(String ipPoolStart) {
    this.ipPoolStart = ipPoolStart;
    return this;
  }

  /**
   * The start IP of the IP pool.
   * @return ipPoolStart
  */
  @ApiModelProperty(value = "The start IP of the IP pool.")


  public String getIpPoolStart() {
    return ipPoolStart;
  }

  public void setIpPoolStart(String ipPoolStart) {
    this.ipPoolStart = ipPoolStart;
  }

  public ClientToSiteVpnServer ipPoolEnd(String ipPoolEnd) {
    this.ipPoolEnd = ipPoolEnd;
    return this;
  }

  /**
   * The end IP of the IP pool.
   * @return ipPoolEnd
  */
  @ApiModelProperty(value = "The end IP of the IP pool.")


  public String getIpPoolEnd() {
    return ipPoolEnd;
  }

  public void setIpPoolEnd(String ipPoolEnd) {
    this.ipPoolEnd = ipPoolEnd;
  }

  public ClientToSiteVpnServer ipPool(IpSubnetsVo ipPool) {
    this.ipPool = ipPool;
    return this;
  }

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

  @Valid

  public IpSubnetsVo getIpPool() {
    return ipPool;
  }

  public void setIpPool(IpSubnetsVo ipPool) {
    this.ipPool = ipPool;
  }

  public ClientToSiteVpnServer primaryDns(String primaryDns) {
    this.primaryDns = primaryDns;
    return this;
  }

  /**
   * Primary DNS of the VPN.
   * @return primaryDns
  */
  @ApiModelProperty(required = true, value = "Primary DNS of the VPN.")
  @NotNull


  public String getPrimaryDns() {
    return primaryDns;
  }

  public void setPrimaryDns(String primaryDns) {
    this.primaryDns = primaryDns;
  }

  public ClientToSiteVpnServer secondaryDns(String secondaryDns) {
    this.secondaryDns = secondaryDns;
    return this;
  }

  /**
   * Secondary DNS of the VPN.
   * @return secondaryDns
  */
  @ApiModelProperty(value = "Secondary DNS of the VPN.")


  public String getSecondaryDns() {
    return secondaryDns;
  }

  public void setSecondaryDns(String secondaryDns) {
    this.secondaryDns = secondaryDns;
  }

  public ClientToSiteVpnServer serviceType(Integer serviceType) {
    this.serviceType = serviceType;
    return this;
  }

  /**
   * Service type of the VPN.
   * @return serviceType
  */
  @ApiModelProperty(value = "Service type of the VPN.")


  public Integer getServiceType() {
    return serviceType;
  }

  public void setServiceType(Integer serviceType) {
    this.serviceType = serviceType;
  }

  public ClientToSiteVpnServer servicePort(Integer servicePort) {
    this.servicePort = servicePort;
    return this;
  }

  /**
   * Service port should be within the range of 1–65535.
   * @return servicePort
  */
  @ApiModelProperty(value = "Service port should be within the range of 1–65535.")


  public Integer getServicePort() {
    return servicePort;
  }

  public void setServicePort(Integer servicePort) {
    this.servicePort = servicePort;
  }

  public ClientToSiteVpnServer authMode(Integer authMode) {
    this.authMode = authMode;
    return this;
  }

  /**
   * Authentication mode should be a value as follows: 0: Local; 1: LDAP.
   * @return authMode
  */
  @ApiModelProperty(value = "Authentication mode should be a value as follows: 0: Local; 1: LDAP.")


  public Integer getAuthMode() {
    return authMode;
  }

  public void setAuthMode(Integer authMode) {
    this.authMode = authMode;
  }

  public ClientToSiteVpnServer advancedSetting(VpnAdvancedSettingOpenApiVo advancedSetting) {
    this.advancedSetting = advancedSetting;
    return this;
  }

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

  @Valid

  public VpnAdvancedSettingOpenApiVo getAdvancedSetting() {
    return advancedSetting;
  }

  public void setAdvancedSetting(VpnAdvancedSettingOpenApiVo advancedSetting) {
    this.advancedSetting = advancedSetting;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ClientToSiteVpnServer clientToSiteVpnServer = (ClientToSiteVpnServer) o;
    return Objects.equals(this.id, clientToSiteVpnServer.id) &&
        Objects.equals(this.name, clientToSiteVpnServer.name) &&
        Objects.equals(this.status, clientToSiteVpnServer.status) &&
        Objects.equals(this.accountPassword, clientToSiteVpnServer.accountPassword) &&
        Objects.equals(this.tunnelMode, clientToSiteVpnServer.tunnelMode) &&
        Objects.equals(this.openVpnMode, clientToSiteVpnServer.openVpnMode) &&
        Objects.equals(this.remoteIp, clientToSiteVpnServer.remoteIp) &&
        Objects.equals(this.networkType, clientToSiteVpnServer.networkType) &&
        Objects.equals(this.networkList, clientToSiteVpnServer.networkList) &&
        Objects.equals(this.customNetwork, clientToSiteVpnServer.customNetwork) &&
        Objects.equals(this.preSharedKey, clientToSiteVpnServer.preSharedKey) &&
        Objects.equals(this.wan, clientToSiteVpnServer.wan) &&
        Objects.equals(this.clientVpnType, clientToSiteVpnServer.clientVpnType) &&
        Objects.equals(this.encryption, clientToSiteVpnServer.encryption) &&
        Objects.equals(this.ipPoolType, clientToSiteVpnServer.ipPoolType) &&
        Objects.equals(this.ipPoolStart, clientToSiteVpnServer.ipPoolStart) &&
        Objects.equals(this.ipPoolEnd, clientToSiteVpnServer.ipPoolEnd) &&
        Objects.equals(this.ipPool, clientToSiteVpnServer.ipPool) &&
        Objects.equals(this.primaryDns, clientToSiteVpnServer.primaryDns) &&
        Objects.equals(this.secondaryDns, clientToSiteVpnServer.secondaryDns) &&
        Objects.equals(this.serviceType, clientToSiteVpnServer.serviceType) &&
        Objects.equals(this.servicePort, clientToSiteVpnServer.servicePort) &&
        Objects.equals(this.authMode, clientToSiteVpnServer.authMode) &&
        Objects.equals(this.advancedSetting, clientToSiteVpnServer.advancedSetting);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, status, accountPassword, tunnelMode, openVpnMode, remoteIp, networkType, networkList, customNetwork, preSharedKey, wan, clientVpnType, encryption, ipPoolType, ipPoolStart, ipPoolEnd, ipPool, primaryDns, secondaryDns, serviceType, servicePort, authMode, advancedSetting);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ClientToSiteVpnServer {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    accountPassword: ").append(toIndentedString(accountPassword)).append("\n");
    sb.append("    tunnelMode: ").append(toIndentedString(tunnelMode)).append("\n");
    sb.append("    openVpnMode: ").append(toIndentedString(openVpnMode)).append("\n");
    sb.append("    remoteIp: ").append(toIndentedString(remoteIp)).append("\n");
    sb.append("    networkType: ").append(toIndentedString(networkType)).append("\n");
    sb.append("    networkList: ").append(toIndentedString(networkList)).append("\n");
    sb.append("    customNetwork: ").append(toIndentedString(customNetwork)).append("\n");
    sb.append("    preSharedKey: ").append(toIndentedString(preSharedKey)).append("\n");
    sb.append("    wan: ").append(toIndentedString(wan)).append("\n");
    sb.append("    clientVpnType: ").append(toIndentedString(clientVpnType)).append("\n");
    sb.append("    encryption: ").append(toIndentedString(encryption)).append("\n");
    sb.append("    ipPoolType: ").append(toIndentedString(ipPoolType)).append("\n");
    sb.append("    ipPoolStart: ").append(toIndentedString(ipPoolStart)).append("\n");
    sb.append("    ipPoolEnd: ").append(toIndentedString(ipPoolEnd)).append("\n");
    sb.append("    ipPool: ").append(toIndentedString(ipPool)).append("\n");
    sb.append("    primaryDns: ").append(toIndentedString(primaryDns)).append("\n");
    sb.append("    secondaryDns: ").append(toIndentedString(secondaryDns)).append("\n");
    sb.append("    serviceType: ").append(toIndentedString(serviceType)).append("\n");
    sb.append("    servicePort: ").append(toIndentedString(servicePort)).append("\n");
    sb.append("    authMode: ").append(toIndentedString(authMode)).append("\n");
    sb.append("    advancedSetting: ").append(toIndentedString(advancedSetting)).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    ");
  }
}

