package org.wfc.omada.api.device.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;

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

public class DhcpIpSettingEntity   {
  @JsonProperty("fallback")
  private Boolean fallback;

  @JsonProperty("fallbackIp")
  private String fallbackIp;

  @JsonProperty("fallbackMask")
  private String fallbackMask;

  @JsonProperty("fallbackGate")
  private String fallbackGate;

  @JsonProperty("useFixedAddr")
  private Boolean useFixedAddr;

  @JsonProperty("netId")
  private String netId;

  @JsonProperty("dhcpIp")
  private String dhcpIp;

  public DhcpIpSettingEntity fallback(Boolean fallback) {
    this.fallback = fallback;
    return this;
  }

  /**
   * Enable/Disable fallback(if false, other params is not required)
   * @return fallback
  */
  @ApiModelProperty(value = "Enable/Disable fallback(if false, other params is not required)")


  public Boolean getFallback() {
    return fallback;
  }

  public void setFallback(Boolean fallback) {
    this.fallback = fallback;
  }

  public DhcpIpSettingEntity fallbackIp(String fallbackIp) {
    this.fallbackIp = fallbackIp;
    return this;
  }

  /**
   * Fallback IP address
   * @return fallbackIp
  */
  @ApiModelProperty(value = "Fallback 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 getFallbackIp() {
    return fallbackIp;
  }

  public void setFallbackIp(String fallbackIp) {
    this.fallbackIp = fallbackIp;
  }

  public DhcpIpSettingEntity fallbackMask(String fallbackMask) {
    this.fallbackMask = fallbackMask;
    return this;
  }

  /**
   * Fallback IP mask
   * @return fallbackMask
  */
  @ApiModelProperty(value = "Fallback IP 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 getFallbackMask() {
    return fallbackMask;
  }

  public void setFallbackMask(String fallbackMask) {
    this.fallbackMask = fallbackMask;
  }

  public DhcpIpSettingEntity fallbackGate(String fallbackGate) {
    this.fallbackGate = fallbackGate;
    return this;
  }

  /**
   * Fallback gateway IP address
   * @return fallbackGate
  */
  @ApiModelProperty(value = "Fallback gateway 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 getFallbackGate() {
    return fallbackGate;
  }

  public void setFallbackGate(String fallbackGate) {
    this.fallbackGate = fallbackGate;
  }

  public DhcpIpSettingEntity useFixedAddr(Boolean useFixedAddr) {
    this.useFixedAddr = useFixedAddr;
    return this;
  }

  /**
   * Enable reserved address(Gateway required)
   * @return useFixedAddr
  */
  @ApiModelProperty(value = "Enable reserved address(Gateway required)")


  public Boolean getUseFixedAddr() {
    return useFixedAddr;
  }

  public void setUseFixedAddr(Boolean useFixedAddr) {
    this.useFixedAddr = useFixedAddr;
  }

  public DhcpIpSettingEntity netId(String netId) {
    this.netId = netId;
    return this;
  }

  /**
   * Network ID
   * @return netId
  */
  @ApiModelProperty(value = "Network ID")


  public String getNetId() {
    return netId;
  }

  public void setNetId(String netId) {
    this.netId = netId;
  }

  public DhcpIpSettingEntity dhcpIp(String dhcpIp) {
    this.dhcpIp = dhcpIp;
    return this;
  }

  /**
   * Reserved IP address
   * @return dhcpIp
  */
  @ApiModelProperty(value = "Reserved 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 getDhcpIp() {
    return dhcpIp;
  }

  public void setDhcpIp(String dhcpIp) {
    this.dhcpIp = dhcpIp;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DhcpIpSettingEntity dhcpIpSettingEntity = (DhcpIpSettingEntity) o;
    return Objects.equals(this.fallback, dhcpIpSettingEntity.fallback) &&
        Objects.equals(this.fallbackIp, dhcpIpSettingEntity.fallbackIp) &&
        Objects.equals(this.fallbackMask, dhcpIpSettingEntity.fallbackMask) &&
        Objects.equals(this.fallbackGate, dhcpIpSettingEntity.fallbackGate) &&
        Objects.equals(this.useFixedAddr, dhcpIpSettingEntity.useFixedAddr) &&
        Objects.equals(this.netId, dhcpIpSettingEntity.netId) &&
        Objects.equals(this.dhcpIp, dhcpIpSettingEntity.dhcpIp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(fallback, fallbackIp, fallbackMask, fallbackGate, useFixedAddr, netId, dhcpIp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DhcpIpSettingEntity {\n");
    
    sb.append("    fallback: ").append(toIndentedString(fallback)).append("\n");
    sb.append("    fallbackIp: ").append(toIndentedString(fallbackIp)).append("\n");
    sb.append("    fallbackMask: ").append(toIndentedString(fallbackMask)).append("\n");
    sb.append("    fallbackGate: ").append(toIndentedString(fallbackGate)).append("\n");
    sb.append("    useFixedAddr: ").append(toIndentedString(useFixedAddr)).append("\n");
    sb.append("    netId: ").append(toIndentedString(netId)).append("\n");
    sb.append("    dhcpIp: ").append(toIndentedString(dhcpIp)).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    ");
  }
}

