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

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("mode")
  private Integer mode;

  @JsonProperty("remoteSite")
  private String remoteSite;

  @JsonProperty("remoteIp")
  private String remoteIp;

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

  @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("openVpnTunnelMode")
  private Integer openVpnTunnelMode;

  @JsonProperty("openVpnMode")
  private Integer openVpnMode;

  @JsonProperty("serviceType")
  private Integer serviceType;

  @JsonProperty("servicePort")
  private Integer servicePort;

  @JsonProperty("encryption")
  private Integer encryption;

  @JsonProperty("workingMode")
  private Integer workingMode;

  @JsonProperty("clientUserName")
  private String clientUserName;

  @JsonProperty("clientPassword")
  private String clientPassword;

  @JsonProperty("vpnConfiguration")
  private VpnCertificateOpenApiVo vpnConfiguration;

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient 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 ClientToSiteVpnClient 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 ClientToSiteVpnClient mode(Integer mode) {
    this.mode = mode;
    return this;
  }

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


  public Integer getMode() {
    return mode;
  }

  public void setMode(Integer mode) {
    this.mode = mode;
  }

  public ClientToSiteVpnClient remoteSite(String remoteSite) {
    this.remoteSite = remoteSite;
    return this;
  }

  /**
   * Remote site of the VPN.
   * @return remoteSite
  */
  @ApiModelProperty(value = "Remote site of the VPN.")


  public String getRemoteSite() {
    return remoteSite;
  }

  public void setRemoteSite(String remoteSite) {
    this.remoteSite = remoteSite;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient remoteSubnet(List<IpSubnetsVo> remoteSubnet) {
    this.remoteSubnet = remoteSubnet;
    return this;
  }

  public ClientToSiteVpnClient addRemoteSubnetItem(IpSubnetsVo remoteSubnetItem) {
    if (this.remoteSubnet == null) {
      this.remoteSubnet = new ArrayList<>();
    }
    this.remoteSubnet.add(remoteSubnetItem);
    return this;
  }

  /**
   * Remote subnet of the VPN.
   * @return remoteSubnet
  */
  @ApiModelProperty(value = "Remote subnet of the VPN.")

  @Valid

  public List<IpSubnetsVo> getRemoteSubnet() {
    return remoteSubnet;
  }

  public void setRemoteSubnet(List<IpSubnetsVo> remoteSubnet) {
    this.remoteSubnet = remoteSubnet;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient networkList(List<String> networkList) {
    this.networkList = networkList;
    return this;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient customNetwork(List<IpSubnetsVo> customNetwork) {
    this.customNetwork = customNetwork;
    return this;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient 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 ClientToSiteVpnClient wan(List<String> wan) {
    this.wan = wan;
    return this;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient 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 ClientToSiteVpnClient openVpnTunnelMode(Integer openVpnTunnelMode) {
    this.openVpnTunnelMode = openVpnTunnelMode;
    return this;
  }

  /**
   * OpenVPN tunnel mode should be a value as follows: 0: split; 1: full.
   * @return openVpnTunnelMode
  */
  @ApiModelProperty(value = "OpenVPN tunnel mode should be a value as follows: 0: split; 1: full.")


  public Integer getOpenVpnTunnelMode() {
    return openVpnTunnelMode;
  }

  public void setOpenVpnTunnelMode(Integer openVpnTunnelMode) {
    this.openVpnTunnelMode = openVpnTunnelMode;
  }

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient serviceType(Integer serviceType) {
    this.serviceType = serviceType;
    return this;
  }

  /**
   * Service type should be a value as follows: 0: UDP; 1: TCP.
   * @return serviceType
  */
  @ApiModelProperty(value = "Service type should be a value as follows: 0: UDP; 1: TCP.")


  public Integer getServiceType() {
    return serviceType;
  }

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

  public ClientToSiteVpnClient 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 ClientToSiteVpnClient 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 ClientToSiteVpnClient workingMode(Integer workingMode) {
    this.workingMode = workingMode;
    return this;
  }

  /**
   * Working mode should be a value as follows: 0: NAT; 1: Routing.
   * @return workingMode
  */
  @ApiModelProperty(value = "Working mode should be a value as follows: 0: NAT; 1: Routing.")


  public Integer getWorkingMode() {
    return workingMode;
  }

  public void setWorkingMode(Integer workingMode) {
    this.workingMode = workingMode;
  }

  public ClientToSiteVpnClient clientUserName(String clientUserName) {
    this.clientUserName = clientUserName;
    return this;
  }

  /**
   * Client username should contain 1 to 64 characters.
   * @return clientUserName
  */
  @ApiModelProperty(value = "Client username should contain 1 to 64 characters.")

@Size(min=1,max=64) 
  public String getClientUserName() {
    return clientUserName;
  }

  public void setClientUserName(String clientUserName) {
    this.clientUserName = clientUserName;
  }

  public ClientToSiteVpnClient clientPassword(String clientPassword) {
    this.clientPassword = clientPassword;
    return this;
  }

  /**
   * Client password should contain 1 to 64 characters.
   * @return clientPassword
  */
  @ApiModelProperty(value = "Client password should contain 1 to 64 characters.")

@Size(min=1,max=64) 
  public String getClientPassword() {
    return clientPassword;
  }

  public void setClientPassword(String clientPassword) {
    this.clientPassword = clientPassword;
  }

  public ClientToSiteVpnClient vpnConfiguration(VpnCertificateOpenApiVo vpnConfiguration) {
    this.vpnConfiguration = vpnConfiguration;
    return this;
  }

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

  @Valid

  public VpnCertificateOpenApiVo getVpnConfiguration() {
    return vpnConfiguration;
  }

  public void setVpnConfiguration(VpnCertificateOpenApiVo vpnConfiguration) {
    this.vpnConfiguration = vpnConfiguration;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ClientToSiteVpnClient clientToSiteVpnClient = (ClientToSiteVpnClient) o;
    return Objects.equals(this.id, clientToSiteVpnClient.id) &&
        Objects.equals(this.name, clientToSiteVpnClient.name) &&
        Objects.equals(this.status, clientToSiteVpnClient.status) &&
        Objects.equals(this.mode, clientToSiteVpnClient.mode) &&
        Objects.equals(this.remoteSite, clientToSiteVpnClient.remoteSite) &&
        Objects.equals(this.remoteIp, clientToSiteVpnClient.remoteIp) &&
        Objects.equals(this.remoteSubnet, clientToSiteVpnClient.remoteSubnet) &&
        Objects.equals(this.networkType, clientToSiteVpnClient.networkType) &&
        Objects.equals(this.networkList, clientToSiteVpnClient.networkList) &&
        Objects.equals(this.customNetwork, clientToSiteVpnClient.customNetwork) &&
        Objects.equals(this.preSharedKey, clientToSiteVpnClient.preSharedKey) &&
        Objects.equals(this.wan, clientToSiteVpnClient.wan) &&
        Objects.equals(this.clientVpnType, clientToSiteVpnClient.clientVpnType) &&
        Objects.equals(this.openVpnTunnelMode, clientToSiteVpnClient.openVpnTunnelMode) &&
        Objects.equals(this.openVpnMode, clientToSiteVpnClient.openVpnMode) &&
        Objects.equals(this.serviceType, clientToSiteVpnClient.serviceType) &&
        Objects.equals(this.servicePort, clientToSiteVpnClient.servicePort) &&
        Objects.equals(this.encryption, clientToSiteVpnClient.encryption) &&
        Objects.equals(this.workingMode, clientToSiteVpnClient.workingMode) &&
        Objects.equals(this.clientUserName, clientToSiteVpnClient.clientUserName) &&
        Objects.equals(this.clientPassword, clientToSiteVpnClient.clientPassword) &&
        Objects.equals(this.vpnConfiguration, clientToSiteVpnClient.vpnConfiguration);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, status, mode, remoteSite, remoteIp, remoteSubnet, networkType, networkList, customNetwork, preSharedKey, wan, clientVpnType, openVpnTunnelMode, openVpnMode, serviceType, servicePort, encryption, workingMode, clientUserName, clientPassword, vpnConfiguration);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ClientToSiteVpnClient {\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("    mode: ").append(toIndentedString(mode)).append("\n");
    sb.append("    remoteSite: ").append(toIndentedString(remoteSite)).append("\n");
    sb.append("    remoteIp: ").append(toIndentedString(remoteIp)).append("\n");
    sb.append("    remoteSubnet: ").append(toIndentedString(remoteSubnet)).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("    openVpnTunnelMode: ").append(toIndentedString(openVpnTunnelMode)).append("\n");
    sb.append("    openVpnMode: ").append(toIndentedString(openVpnMode)).append("\n");
    sb.append("    serviceType: ").append(toIndentedString(serviceType)).append("\n");
    sb.append("    servicePort: ").append(toIndentedString(servicePort)).append("\n");
    sb.append("    encryption: ").append(toIndentedString(encryption)).append("\n");
    sb.append("    workingMode: ").append(toIndentedString(workingMode)).append("\n");
    sb.append("    clientUserName: ").append(toIndentedString(clientUserName)).append("\n");
    sb.append("    clientPassword: ").append(toIndentedString(clientPassword)).append("\n");
    sb.append("    vpnConfiguration: ").append(toIndentedString(vpnConfiguration)).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    ");
  }
}

