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

public class Ipv4StaticOpenApiVo   {
  @JsonProperty("ipAddress")
  private String ipAddress;

  @JsonProperty("subnetMask")
  private String subnetMask;

  @JsonProperty("defaultGateway")
  private String defaultGateway;

  @JsonProperty("mtu")
  private Integer mtu;

  @JsonProperty("primaryDns")
  private String primaryDns;

  @JsonProperty("secondaryDns")
  private String secondaryDns;

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

  public Ipv4StaticOpenApiVo ipAddress(String ipAddress) {
    this.ipAddress = ipAddress;
    return this;
  }

  /**
   * IP address
   * @return ipAddress
  */
  @ApiModelProperty(required = true, value = "IP address")
  @NotNull

@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 getIpAddress() {
    return ipAddress;
  }

  public void setIpAddress(String ipAddress) {
    this.ipAddress = ipAddress;
  }

  public Ipv4StaticOpenApiVo subnetMask(String subnetMask) {
    this.subnetMask = subnetMask;
    return this;
  }

  /**
   * Get subnetMask
   * @return subnetMask
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull

@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 getSubnetMask() {
    return subnetMask;
  }

  public void setSubnetMask(String subnetMask) {
    this.subnetMask = subnetMask;
  }

  public Ipv4StaticOpenApiVo defaultGateway(String defaultGateway) {
    this.defaultGateway = defaultGateway;
    return this;
  }

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

@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 getDefaultGateway() {
    return defaultGateway;
  }

  public void setDefaultGateway(String defaultGateway) {
    this.defaultGateway = defaultGateway;
  }

  public Ipv4StaticOpenApiVo 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 Ipv4StaticOpenApiVo 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 Ipv4StaticOpenApiVo 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 Ipv4StaticOpenApiVo wanMultipleIps(List<WanMultipleIpOpenApiVo> wanMultipleIps) {
    this.wanMultipleIps = wanMultipleIps;
    return this;
  }

  public Ipv4StaticOpenApiVo 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;
    }
    Ipv4StaticOpenApiVo ipv4StaticOpenApiVo = (Ipv4StaticOpenApiVo) o;
    return Objects.equals(this.ipAddress, ipv4StaticOpenApiVo.ipAddress) &&
        Objects.equals(this.subnetMask, ipv4StaticOpenApiVo.subnetMask) &&
        Objects.equals(this.defaultGateway, ipv4StaticOpenApiVo.defaultGateway) &&
        Objects.equals(this.mtu, ipv4StaticOpenApiVo.mtu) &&
        Objects.equals(this.primaryDns, ipv4StaticOpenApiVo.primaryDns) &&
        Objects.equals(this.secondaryDns, ipv4StaticOpenApiVo.secondaryDns) &&
        Objects.equals(this.wanMultipleIps, ipv4StaticOpenApiVo.wanMultipleIps);
  }

  @Override
  public int hashCode() {
    return Objects.hash(ipAddress, subnetMask, defaultGateway, mtu, primaryDns, secondaryDns, wanMultipleIps);
  }

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

