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

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

public class VirtualWanIpv4IpoaOpenApiVo   {
  @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;

  @JsonProperty("wanMultipleIps")
  @Valid
  private List<VirtualWanMultipleIpVo> wanMultipleIps = null;

  public VirtualWanIpv4IpoaOpenApiVo 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 VirtualWanIpv4IpoaOpenApiVo 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 VirtualWanIpv4IpoaOpenApiVo 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 VirtualWanIpv4IpoaOpenApiVo 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 VirtualWanIpv4IpoaOpenApiVo 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 VirtualWanIpv4IpoaOpenApiVo 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;
  }

  public VirtualWanIpv4IpoaOpenApiVo wanMultipleIps(List<VirtualWanMultipleIpVo> wanMultipleIps) {
    this.wanMultipleIps = wanMultipleIps;
    return this;
  }

  public VirtualWanIpv4IpoaOpenApiVo addWanMultipleIpsItem(VirtualWanMultipleIpVo wanMultipleIpsItem) {
    if (this.wanMultipleIps == null) {
      this.wanMultipleIps = new ArrayList<>();
    }
    this.wanMultipleIps.add(wanMultipleIpsItem);
    return this;
  }

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

  @Valid

  public List<VirtualWanMultipleIpVo> getWanMultipleIps() {
    return wanMultipleIps;
  }

  public void setWanMultipleIps(List<VirtualWanMultipleIpVo> wanMultipleIps) {
    this.wanMultipleIps = wanMultipleIps;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VirtualWanIpv4IpoaOpenApiVo virtualWanIpv4IpoaOpenApiVo = (VirtualWanIpv4IpoaOpenApiVo) o;
    return Objects.equals(this.ipaddr, virtualWanIpv4IpoaOpenApiVo.ipaddr) &&
        Objects.equals(this.netmask, virtualWanIpv4IpoaOpenApiVo.netmask) &&
        Objects.equals(this.gateway, virtualWanIpv4IpoaOpenApiVo.gateway) &&
        Objects.equals(this.mtu, virtualWanIpv4IpoaOpenApiVo.mtu) &&
        Objects.equals(this.dns1, virtualWanIpv4IpoaOpenApiVo.dns1) &&
        Objects.equals(this.dns2, virtualWanIpv4IpoaOpenApiVo.dns2) &&
        Objects.equals(this.wanMultipleIps, virtualWanIpv4IpoaOpenApiVo.wanMultipleIps);
  }

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

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

