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

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

public class Ipv4DhcpOpenApiVo   {
  @JsonProperty("unicastDhcp")
  private Boolean unicastDhcp;

  @JsonProperty("primaryDns")
  private String primaryDns;

  @JsonProperty("secondaryDns")
  private String secondaryDns;

  @JsonProperty("hostname")
  private String hostname;

  @JsonProperty("mtu")
  private Integer mtu;

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

  public Ipv4DhcpOpenApiVo unicastDhcp(Boolean unicastDhcp) {
    this.unicastDhcp = unicastDhcp;
    return this;
  }

  /**
   * Unicast DHCP
   * @return unicastDhcp
  */
  @ApiModelProperty(value = "Unicast DHCP")


  public Boolean getUnicastDhcp() {
    return unicastDhcp;
  }

  public void setUnicastDhcp(Boolean unicastDhcp) {
    this.unicastDhcp = unicastDhcp;
  }

  public Ipv4DhcpOpenApiVo primaryDns(String primaryDns) {
    this.primaryDns = primaryDns;
    return this;
  }

  /**
   * Primary DNS
   * @return primaryDns
  */
  @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 getPrimaryDns() {
    return primaryDns;
  }

  public void setPrimaryDns(String primaryDns) {
    this.primaryDns = primaryDns;
  }

  public Ipv4DhcpOpenApiVo secondaryDns(String secondaryDns) {
    this.secondaryDns = secondaryDns;
    return this;
  }

  /**
   * Secondary DNS
   * @return secondaryDns
  */
  @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 getSecondaryDns() {
    return secondaryDns;
  }

  public void setSecondaryDns(String secondaryDns) {
    this.secondaryDns = secondaryDns;
  }

  public Ipv4DhcpOpenApiVo hostname(String hostname) {
    this.hostname = hostname;
    return this;
  }

  /**
   * Host name
   * @return hostname
  */
  @ApiModelProperty(value = "Host name")

@Pattern(regexp="^[a-zA-Z0-9_]{0,63}$") 
  public String getHostname() {
    return hostname;
  }

  public void setHostname(String hostname) {
    this.hostname = hostname;
  }

  public Ipv4DhcpOpenApiVo mtu(Integer mtu) {
    this.mtu = mtu;
    return this;
  }

  /**
   * 576-1500, default:1500.
   * @return mtu
  */
  @ApiModelProperty(required = true, value = "576-1500, default:1500.")
  @NotNull


  public Integer getMtu() {
    return mtu;
  }

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

  public Ipv4DhcpOpenApiVo wanMultipleIps(List<WanMultipleIpOpenApiVo> wanMultipleIps) {
    this.wanMultipleIps = wanMultipleIps;
    return this;
  }

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

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

  @Valid

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

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Ipv4DhcpOpenApiVo ipv4DhcpOpenApiVo = (Ipv4DhcpOpenApiVo) o;
    return Objects.equals(this.unicastDhcp, ipv4DhcpOpenApiVo.unicastDhcp) &&
        Objects.equals(this.primaryDns, ipv4DhcpOpenApiVo.primaryDns) &&
        Objects.equals(this.secondaryDns, ipv4DhcpOpenApiVo.secondaryDns) &&
        Objects.equals(this.hostname, ipv4DhcpOpenApiVo.hostname) &&
        Objects.equals(this.mtu, ipv4DhcpOpenApiVo.mtu) &&
        Objects.equals(this.wanMultipleIps, ipv4DhcpOpenApiVo.wanMultipleIps);
  }

  @Override
  public int hashCode() {
    return Objects.hash(unicastDhcp, primaryDns, secondaryDns, hostname, mtu, wanMultipleIps);
  }

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

