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;

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

public class VirtualWanIpv4StaticOpenApiVo   {
  @JsonProperty("ipaddr")
  private String ipaddr;

  @JsonProperty("netmask")
  private String netmask;

  @JsonProperty("gateway")
  private String gateway;

  @JsonProperty("mtu")
  private Integer mtu;

  @JsonProperty("dns1")
  private String dns1;

  @JsonProperty("dns2")
  private String dns2;

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

  /**
   * Parameter [mtu] should be a value between 576 and 1500.
   * @return mtu
  */
  @ApiModelProperty(value = "Parameter [mtu] should be a value between 576 and 1500.")


  public Integer getMtu() {
    return mtu;
  }

  public void setMtu(Integer mtu) {
    this.mtu = mtu;
  }

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

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

@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 VirtualWanIpv4StaticOpenApiVo dns2(String dns2) {
    this.dns2 = dns2;
    return this;
  }

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

@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;
    }
    VirtualWanIpv4StaticOpenApiVo virtualWanIpv4StaticOpenApiVo = (VirtualWanIpv4StaticOpenApiVo) o;
    return Objects.equals(this.ipaddr, virtualWanIpv4StaticOpenApiVo.ipaddr) &&
        Objects.equals(this.netmask, virtualWanIpv4StaticOpenApiVo.netmask) &&
        Objects.equals(this.gateway, virtualWanIpv4StaticOpenApiVo.gateway) &&
        Objects.equals(this.mtu, virtualWanIpv4StaticOpenApiVo.mtu) &&
        Objects.equals(this.dns1, virtualWanIpv4StaticOpenApiVo.dns1) &&
        Objects.equals(this.dns2, virtualWanIpv4StaticOpenApiVo.dns2);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VirtualWanIpv4StaticOpenApiVo {\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("    mtu: ").append(toIndentedString(mtu)).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    ");
  }
}

