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;

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("siteVpnType")
  private Integer siteVpnType;

  @JsonProperty("status")
  private Boolean status;

  @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 = null;

  @JsonProperty("advancedSetting")
  private VpnAdvancedSettingOpenApiVo advancedSetting;

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

  /**
   * Site VPN type should be a value as follows: 0: Auto IPSec; 1: Manual IPSec.
   * @return siteVpnType
  */
  @ApiModelProperty(required = true, value = "Site VPN type should be a value as follows: 0: Auto IPSec; 1: Manual IPSec.")
  @NotNull


  public Integer getSiteVpnType() {
    return siteVpnType;
  }

  public void setSiteVpnType(Integer siteVpnType) {
    this.siteVpnType = siteVpnType;
  }

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

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


  public Boolean getStatus() {
    return status;
  }

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

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

  /**
   * Remote site of the VPN, only for Auto IPSec type.
   * @return remoteSite
  */
  @ApiModelProperty(value = "Remote site of the VPN, only for Auto IPSec type.")


  public String getRemoteSite() {
    return remoteSite;
  }

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

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

  /**
   * Remote IP of the VPN, only for Manual IPSec type.
   * @return remoteIp
  */
  @ApiModelProperty(value = "Remote IP of the VPN, only for Manual IPSec type.")


  public String getRemoteIp() {
    return remoteIp;
  }

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

  public SiteToSiteVpn remoteSubnet(List<IpSubnetsVo> remoteSubnet) {
    this.remoteSubnet = remoteSubnet;
    return this;
  }

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

  /**
   * Remote subnet of the VPN, only for Manual IPSec type.
   * @return remoteSubnet
  */
  @ApiModelProperty(value = "Remote subnet of the VPN, only for Manual IPSec type.")

  @Valid

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

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

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

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

  /**
   * Network list of the VPN, only for Manual IPSec type. 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, only for Manual IPSec type. 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 SiteToSiteVpn customNetwork(List<IpSubnetsVo> customNetwork) {
    this.customNetwork = customNetwork;
    return this;
  }

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

  /**
   * Custom networks of the VPN, only for Manual IPSec type.
   * @return customNetwork
  */
  @ApiModelProperty(value = "Custom networks of the VPN, only for Manual IPSec type.")

  @Valid

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

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

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

  /**
   * Pre-shared key of the VPN, only for Manual IPSec type.
   * @return preSharedKey
  */
  @ApiModelProperty(value = "Pre-shared key of the VPN, only for Manual IPSec type.")


  public String getPreSharedKey() {
    return preSharedKey;
  }

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

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

  public SiteToSiteVpn addWanItem(String wanItem) {
    if (this.wan == null) {
      this.wan = new ArrayList<>();
    }
    this.wan.add(wanItem);
    return this;
  }

  /**
   * WAN list of the VPN, only for Manual IPSec type. WAN port ID can be obtained from 'Get internet basic info' interface.
   * @return wan
  */
  @ApiModelProperty(value = "WAN list of the VPN, only for Manual IPSec type. WAN port ID can be obtained from 'Get internet basic info' interface.")


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

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

  public SiteToSiteVpn 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;
    }
    SiteToSiteVpn siteToSiteVpn = (SiteToSiteVpn) o;
    return Objects.equals(this.id, siteToSiteVpn.id) &&
        Objects.equals(this.name, siteToSiteVpn.name) &&
        Objects.equals(this.siteVpnType, siteToSiteVpn.siteVpnType) &&
        Objects.equals(this.status, siteToSiteVpn.status) &&
        Objects.equals(this.remoteSite, siteToSiteVpn.remoteSite) &&
        Objects.equals(this.remoteIp, siteToSiteVpn.remoteIp) &&
        Objects.equals(this.remoteSubnet, siteToSiteVpn.remoteSubnet) &&
        Objects.equals(this.networkType, siteToSiteVpn.networkType) &&
        Objects.equals(this.networkList, siteToSiteVpn.networkList) &&
        Objects.equals(this.customNetwork, siteToSiteVpn.customNetwork) &&
        Objects.equals(this.preSharedKey, siteToSiteVpn.preSharedKey) &&
        Objects.equals(this.wan, siteToSiteVpn.wan) &&
        Objects.equals(this.advancedSetting, siteToSiteVpn.advancedSetting);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, siteVpnType, status, remoteSite, remoteIp, remoteSubnet, networkType, networkList, customNetwork, preSharedKey, wan, advancedSetting);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SiteToSiteVpn {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    siteVpnType: ").append(toIndentedString(siteVpnType)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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("    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    ");
  }
}

