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

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

public class DhcpServersSetting   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("dhcpSvr1")
  private String dhcpSvr1;

  @JsonProperty("dhcpSvr2")
  private String dhcpSvr2;

  public DhcpServersSetting enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * The switch of DHCP Guarding
   * @return enable
  */
  @ApiModelProperty(required = true, value = "The switch of DHCP Guarding")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public DhcpServersSetting dhcpSvr1(String dhcpSvr1) {
    this.dhcpSvr1 = dhcpSvr1;
    return this;
  }

  /**
   * DHCP Server IP1
   * @return dhcpSvr1
  */
  @ApiModelProperty(value = "DHCP Server IP1")

@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 getDhcpSvr1() {
    return dhcpSvr1;
  }

  public void setDhcpSvr1(String dhcpSvr1) {
    this.dhcpSvr1 = dhcpSvr1;
  }

  public DhcpServersSetting dhcpSvr2(String dhcpSvr2) {
    this.dhcpSvr2 = dhcpSvr2;
    return this;
  }

  /**
   * DHCP Server IP2
   * @return dhcpSvr2
  */
  @ApiModelProperty(value = "DHCP Server IP2")

@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 getDhcpSvr2() {
    return dhcpSvr2;
  }

  public void setDhcpSvr2(String dhcpSvr2) {
    this.dhcpSvr2 = dhcpSvr2;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DhcpServersSetting dhcpServersSetting = (DhcpServersSetting) o;
    return Objects.equals(this.enable, dhcpServersSetting.enable) &&
        Objects.equals(this.dhcpSvr1, dhcpServersSetting.dhcpSvr1) &&
        Objects.equals(this.dhcpSvr2, dhcpServersSetting.dhcpSvr2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, dhcpSvr1, dhcpSvr2);
  }

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

