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;

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

public class StaticIpSettingEntity   {
  @JsonProperty("configIp")
  private String configIp;

  @JsonProperty("configMask")
  private String configMask;

  @JsonProperty("configGate")
  private String configGate;

  @JsonProperty("preferredDNS")
  private String preferredDNS;

  @JsonProperty("alternateDNS")
  private String alternateDNS;

  public StaticIpSettingEntity configIp(String configIp) {
    this.configIp = configIp;
    return this;
  }

  /**
   * Static IP address
   * @return configIp
  */
  @ApiModelProperty(value = "Static 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 getConfigIp() {
    return configIp;
  }

  public void setConfigIp(String configIp) {
    this.configIp = configIp;
  }

  public StaticIpSettingEntity configMask(String configMask) {
    this.configMask = configMask;
    return this;
  }

  /**
   * Subnet mask
   * @return configMask
  */
  @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 getConfigMask() {
    return configMask;
  }

  public void setConfigMask(String configMask) {
    this.configMask = configMask;
  }

  public StaticIpSettingEntity configGate(String configGate) {
    this.configGate = configGate;
    return this;
  }

  /**
   * Gateway IP address
   * @return configGate
  */
  @ApiModelProperty(value = "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 getConfigGate() {
    return configGate;
  }

  public void setConfigGate(String configGate) {
    this.configGate = configGate;
  }

  public StaticIpSettingEntity preferredDNS(String preferredDNS) {
    this.preferredDNS = preferredDNS;
    return this;
  }

  /**
   * Primary DNS server
   * @return preferredDNS
  */
  @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 getPreferredDNS() {
    return preferredDNS;
  }

  public void setPreferredDNS(String preferredDNS) {
    this.preferredDNS = preferredDNS;
  }

  public StaticIpSettingEntity alternateDNS(String alternateDNS) {
    this.alternateDNS = alternateDNS;
    return this;
  }

  /**
   * Secondary DNS server
   * @return alternateDNS
  */
  @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 getAlternateDNS() {
    return alternateDNS;
  }

  public void setAlternateDNS(String alternateDNS) {
    this.alternateDNS = alternateDNS;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StaticIpSettingEntity staticIpSettingEntity = (StaticIpSettingEntity) o;
    return Objects.equals(this.configIp, staticIpSettingEntity.configIp) &&
        Objects.equals(this.configMask, staticIpSettingEntity.configMask) &&
        Objects.equals(this.configGate, staticIpSettingEntity.configGate) &&
        Objects.equals(this.preferredDNS, staticIpSettingEntity.preferredDNS) &&
        Objects.equals(this.alternateDNS, staticIpSettingEntity.alternateDNS);
  }

  @Override
  public int hashCode() {
    return Objects.hash(configIp, configMask, configGate, preferredDNS, alternateDNS);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StaticIpSettingEntity {\n");
    
    sb.append("    configIp: ").append(toIndentedString(configIp)).append("\n");
    sb.append("    configMask: ").append(toIndentedString(configMask)).append("\n");
    sb.append("    configGate: ").append(toIndentedString(configGate)).append("\n");
    sb.append("    preferredDNS: ").append(toIndentedString(preferredDNS)).append("\n");
    sb.append("    alternateDNS: ").append(toIndentedString(alternateDNS)).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    ");
  }
}

