package org.wfc.omada.api.sitesetting.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class Ipv4Connection2OpenApiVo   {
  @JsonProperty("secondaryProtoType")
  private Integer secondaryProtoType;

  @JsonProperty("server")
  private String server;

  @JsonProperty("ipAddress")
  private String ipAddress;

  @JsonProperty("subnetMask")
  private String subnetMask;

  @JsonProperty("defaultGateway")
  private String defaultGateway;

  @JsonProperty("primaryDns")
  private String primaryDns;

  @JsonProperty("secondaryDns")
  private String secondaryDns;

  public Ipv4Connection2OpenApiVo secondaryProtoType(Integer secondaryProtoType) {
    this.secondaryProtoType = secondaryProtoType;
    return this;
  }

  /**
   * It should be a value as follows: 0:Static IP; 1:Dynamic IP; 2: None(Only for PPPoE).
   * @return secondaryProtoType
  */
  @ApiModelProperty(required = true, value = "It should be a value as follows: 0:Static IP; 1:Dynamic IP; 2: None(Only for PPPoE).")
  @NotNull


  public Integer getSecondaryProtoType() {
    return secondaryProtoType;
  }

  public void setSecondaryProtoType(Integer secondaryProtoType) {
    this.secondaryProtoType = secondaryProtoType;
  }

  public Ipv4Connection2OpenApiVo server(String server) {
    this.server = server;
    return this;
  }

  /**
   * (Optional) VPN Server/Domain Name. It is required for L2TP/PPTP.
   * @return server
  */
  @ApiModelProperty(value = "(Optional) VPN Server/Domain Name. It is required for L2TP/PPTP.")


  public String getServer() {
    return server;
  }

  public void setServer(String server) {
    this.server = server;
  }

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

  /**
   * (Optional) It is required when [secondaryProtoType] is 0.
   * @return ipAddress
  */
  @ApiModelProperty(value = "(Optional) It is required when [secondaryProtoType] is 0.")

@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 Ipv4Connection2OpenApiVo subnetMask(String subnetMask) {
    this.subnetMask = subnetMask;
    return this;
  }

  /**
   * (Optional) It is required when [secondaryProtoType] is 0.
   * @return subnetMask
  */
  @ApiModelProperty(value = "(Optional) It is required when [secondaryProtoType] is 0.")

@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 Ipv4Connection2OpenApiVo defaultGateway(String defaultGateway) {
    this.defaultGateway = defaultGateway;
    return this;
  }

  /**
   * (Optional) It is required when [secondaryProtoType] is 0.
   * @return defaultGateway
  */
  @ApiModelProperty(value = "(Optional) It is required when [secondaryProtoType] is 0.")

@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 Ipv4Connection2OpenApiVo primaryDns(String primaryDns) {
    this.primaryDns = primaryDns;
    return this;
  }

  /**
   * (Optional) It is required when [secondaryProtoType] is 0.
   * @return primaryDns
  */
  @ApiModelProperty(value = "(Optional) It is required when [secondaryProtoType] is 0.")

@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 Ipv4Connection2OpenApiVo secondaryDns(String secondaryDns) {
    this.secondaryDns = secondaryDns;
    return this;
  }

  /**
   * (Optional) It is required when [secondaryProtoType] is 0.
   * @return secondaryDns
  */
  @ApiModelProperty(value = "(Optional) It is required when [secondaryProtoType] is 0.")

@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;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Ipv4Connection2OpenApiVo ipv4Connection2OpenApiVo = (Ipv4Connection2OpenApiVo) o;
    return Objects.equals(this.secondaryProtoType, ipv4Connection2OpenApiVo.secondaryProtoType) &&
        Objects.equals(this.server, ipv4Connection2OpenApiVo.server) &&
        Objects.equals(this.ipAddress, ipv4Connection2OpenApiVo.ipAddress) &&
        Objects.equals(this.subnetMask, ipv4Connection2OpenApiVo.subnetMask) &&
        Objects.equals(this.defaultGateway, ipv4Connection2OpenApiVo.defaultGateway) &&
        Objects.equals(this.primaryDns, ipv4Connection2OpenApiVo.primaryDns) &&
        Objects.equals(this.secondaryDns, ipv4Connection2OpenApiVo.secondaryDns);
  }

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

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

