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.constraints.Pattern;
import java.util.Objects;

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

public class VirtualWanIpv4Connection2OpenApiVo   {
  @JsonProperty("mainProto")
  private String mainProto;

  @JsonProperty("proto")
  private String proto;

  @JsonProperty("server")
  private String server;

  @JsonProperty("ipaddr")
  private String ipaddr;

  @JsonProperty("netmask")
  private String netmask;

  @JsonProperty("gateway")
  private String gateway;

  @JsonProperty("dns1")
  private String dns1;

  @JsonProperty("dns2")
  private String dns2;

  public VirtualWanIpv4Connection2OpenApiVo mainProto(String mainProto) {
    this.mainProto = mainProto;
    return this;
  }

  /**
   * The main virtual WAN IPv4 proto type, use static, dhcp, pppoe.
   * @return mainProto
  */
  @ApiModelProperty(value = "The main virtual WAN IPv4 proto type, use static, dhcp, pppoe.")


  public String getMainProto() {
    return mainProto;
  }

  public void setMainProto(String mainProto) {
    this.mainProto = mainProto;
  }

  public VirtualWanIpv4Connection2OpenApiVo proto(String proto) {
    this.proto = proto;
    return this;
  }

  /**
   * The second virtual WAN IPv4 proto type, use static, dhcp, pppoe.
   * @return proto
  */
  @ApiModelProperty(value = "The second virtual WAN IPv4 proto type, use static, dhcp, pppoe.")


  public String getProto() {
    return proto;
  }

  public void setProto(String proto) {
    this.proto = proto;
  }

  public VirtualWanIpv4Connection2OpenApiVo server(String server) {
    this.server = server;
    return this;
  }

  /**
   * VPN server IP/domain.
   * @return server
  */
  @ApiModelProperty(value = "VPN server IP/domain.")


  public String getServer() {
    return server;
  }

  public void setServer(String server) {
    this.server = server;
  }

  public VirtualWanIpv4Connection2OpenApiVo ipaddr(String ipaddr) {
    this.ipaddr = ipaddr;
    return this;
  }

  /**
   * IP address.
   * @return ipaddr
  */
  @ApiModelProperty(value = "IP address.")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getIpaddr() {
    return ipaddr;
  }

  public void setIpaddr(String ipaddr) {
    this.ipaddr = ipaddr;
  }

  public VirtualWanIpv4Connection2OpenApiVo netmask(String netmask) {
    this.netmask = netmask;
    return this;
  }

  /**
   * Subnet mask.
   * @return netmask
  */
  @ApiModelProperty(value = "Subnet mask.")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getNetmask() {
    return netmask;
  }

  public void setNetmask(String netmask) {
    this.netmask = netmask;
  }

  public VirtualWanIpv4Connection2OpenApiVo gateway(String gateway) {
    this.gateway = gateway;
    return this;
  }

  /**
   * Gateway IP.
   * @return gateway
  */
  @ApiModelProperty(value = "Gateway IP.")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getGateway() {
    return gateway;
  }

  public void setGateway(String gateway) {
    this.gateway = gateway;
  }

  public VirtualWanIpv4Connection2OpenApiVo dns1(String dns1) {
    this.dns1 = dns1;
    return this;
  }

  /**
   * Primary DNS server.
   * @return dns1
  */
  @ApiModelProperty(value = "Primary DNS server.")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getDns1() {
    return dns1;
  }

  public void setDns1(String dns1) {
    this.dns1 = dns1;
  }

  public VirtualWanIpv4Connection2OpenApiVo dns2(String dns2) {
    this.dns2 = dns2;
    return this;
  }

  /**
   * Secondary DNS server.
   * @return dns2
  */
  @ApiModelProperty(value = "Secondary DNS server.")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getDns2() {
    return dns2;
  }

  public void setDns2(String dns2) {
    this.dns2 = dns2;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VirtualWanIpv4Connection2OpenApiVo virtualWanIpv4Connection2OpenApiVo = (VirtualWanIpv4Connection2OpenApiVo) o;
    return Objects.equals(this.mainProto, virtualWanIpv4Connection2OpenApiVo.mainProto) &&
        Objects.equals(this.proto, virtualWanIpv4Connection2OpenApiVo.proto) &&
        Objects.equals(this.server, virtualWanIpv4Connection2OpenApiVo.server) &&
        Objects.equals(this.ipaddr, virtualWanIpv4Connection2OpenApiVo.ipaddr) &&
        Objects.equals(this.netmask, virtualWanIpv4Connection2OpenApiVo.netmask) &&
        Objects.equals(this.gateway, virtualWanIpv4Connection2OpenApiVo.gateway) &&
        Objects.equals(this.dns1, virtualWanIpv4Connection2OpenApiVo.dns1) &&
        Objects.equals(this.dns2, virtualWanIpv4Connection2OpenApiVo.dns2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mainProto, proto, server, ipaddr, netmask, gateway, dns1, dns2);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VirtualWanIpv4Connection2OpenApiVo {\n");
    
    sb.append("    mainProto: ").append(toIndentedString(mainProto)).append("\n");
    sb.append("    proto: ").append(toIndentedString(proto)).append("\n");
    sb.append("    server: ").append(toIndentedString(server)).append("\n");
    sb.append("    ipaddr: ").append(toIndentedString(ipaddr)).append("\n");
    sb.append("    netmask: ").append(toIndentedString(netmask)).append("\n");
    sb.append("    gateway: ").append(toIndentedString(gateway)).append("\n");
    sb.append("    dns1: ").append(toIndentedString(dns1)).append("\n");
    sb.append("    dns2: ").append(toIndentedString(dns2)).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    ");
  }
}

