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.Objects;

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

public class Ipv4PptpOpenApiVo   {
  @JsonProperty("userName")
  private String userName;

  @JsonProperty("password")
  private String password;

  @JsonProperty("ipFromIsp")
  private Boolean ipFromIsp;

  @JsonProperty("primaryDns")
  private String primaryDns;

  @JsonProperty("secondaryDns")
  private String secondaryDns;

  @JsonProperty("connectionMode")
  private Integer connectionMode;

  @JsonProperty("redialInterval")
  private Integer redialInterval;

  @JsonProperty("startTime")
  private String startTime;

  @JsonProperty("endTime")
  private String endTime;

  @JsonProperty("mtu")
  private Integer mtu;

  @JsonProperty("mssClampingType")
  private Integer mssClampingType;

  @JsonProperty("mssClampingValue")
  private Integer mssClampingValue;

  @JsonProperty("ipv4Connection2")
  private Ipv4Connection2OpenApiVo ipv4Connection2;

  public Ipv4PptpOpenApiVo userName(String userName) {
    this.userName = userName;
    return this;
  }

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

@Pattern(regexp="^[A-Za-z0-9\\`\\~\\!\\@\\#\\$\\&\\*\\(\\)\\-\\=\\_\\+\\[\\]\\{\\}\\;\\:\\'\\\"\\\\\\|/\\?\\.\\,\\<\\>\\%\\^/]{1,255}$") 
  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public Ipv4PptpOpenApiVo password(String password) {
    this.password = password;
    return this;
  }

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

@Pattern(regexp="^[A-Za-z0-9\\`\\~\\!\\@\\#\\$\\&\\*\\(\\)\\-\\=\\_\\+\\[\\]\\{\\}\\;\\:\\'\\\"\\\\\\|/\\?\\.\\,\\<\\>\\%\\^/]{1,255}$") 
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public Ipv4PptpOpenApiVo ipFromIsp(Boolean ipFromIsp) {
    this.ipFromIsp = ipFromIsp;
    return this;
  }

  /**
   * Get IP address from ISP.
   * @return ipFromIsp
  */
  @ApiModelProperty(required = true, value = "Get IP address from ISP.")
  @NotNull


  public Boolean getIpFromIsp() {
    return ipFromIsp;
  }

  public void setIpFromIsp(Boolean ipFromIsp) {
    this.ipFromIsp = ipFromIsp;
  }

  public Ipv4PptpOpenApiVo 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 Ipv4PptpOpenApiVo 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 Ipv4PptpOpenApiVo connectionMode(Integer connectionMode) {
    this.connectionMode = connectionMode;
    return this;
  }

  /**
   * It should be a value as follows: 0: Connect Automatically; 1: Connect Manually; 2: Time-based.
   * @return connectionMode
  */
  @ApiModelProperty(required = true, value = "It should be a value as follows: 0: Connect Automatically; 1: Connect Manually; 2: Time-based.")
  @NotNull


  public Integer getConnectionMode() {
    return connectionMode;
  }

  public void setConnectionMode(Integer connectionMode) {
    this.connectionMode = connectionMode;
  }

  public Ipv4PptpOpenApiVo redialInterval(Integer redialInterval) {
    this.redialInterval = redialInterval;
    return this;
  }

  /**
   * It is required when [linkType] is 0. Unit: Second
   * @return redialInterval
  */
  @ApiModelProperty(value = "It is required when [linkType] is 0. Unit: Second")


  public Integer getRedialInterval() {
    return redialInterval;
  }

  public void setRedialInterval(Integer redialInterval) {
    this.redialInterval = redialInterval;
  }

  public Ipv4PptpOpenApiVo startTime(String startTime) {
    this.startTime = startTime;
    return this;
  }

  /**
   * It is required when [linkType] is 2. For example, 12:30.
   * @return startTime
  */
  @ApiModelProperty(value = "It is required when [linkType] is 2. For example, 12:30.")


  public String getStartTime() {
    return startTime;
  }

  public void setStartTime(String startTime) {
    this.startTime = startTime;
  }

  public Ipv4PptpOpenApiVo endTime(String endTime) {
    this.endTime = endTime;
    return this;
  }

  /**
   * It is required when [linkType] is 2. For example, 12:30.
   * @return endTime
  */
  @ApiModelProperty(value = "It is required when [linkType] is 2. For example, 12:30.")


  public String getEndTime() {
    return endTime;
  }

  public void setEndTime(String endTime) {
    this.endTime = endTime;
  }

  public Ipv4PptpOpenApiVo mtu(Integer mtu) {
    this.mtu = mtu;
    return this;
  }

  /**
   * 576-1500, default:1420
   * @return mtu
  */
  @ApiModelProperty(required = true, value = "576-1500, default:1420")
  @NotNull


  public Integer getMtu() {
    return mtu;
  }

  public void setMtu(Integer mtu) {
    this.mtu = mtu;
  }

  public Ipv4PptpOpenApiVo mssClampingType(Integer mssClampingType) {
    this.mssClampingType = mssClampingType;
    return this;
  }

  /**
   * 0: Disable, 1: Auto, 2: Custom
   * @return mssClampingType
  */
  @ApiModelProperty(value = "0: Disable, 1: Auto, 2: Custom")


  public Integer getMssClampingType() {
    return mssClampingType;
  }

  public void setMssClampingType(Integer mssClampingType) {
    this.mssClampingType = mssClampingType;
  }

  public Ipv4PptpOpenApiVo mssClampingValue(Integer mssClampingValue) {
    this.mssClampingValue = mssClampingValue;
    return this;
  }

  /**
   * (Optional) It is required when [mssClampingType] is 2, which ranges from 532 ~ 1452.
   * @return mssClampingValue
  */
  @ApiModelProperty(value = "(Optional) It is required when [mssClampingType] is 2, which ranges from 532 ~ 1452.")


  public Integer getMssClampingValue() {
    return mssClampingValue;
  }

  public void setMssClampingValue(Integer mssClampingValue) {
    this.mssClampingValue = mssClampingValue;
  }

  public Ipv4PptpOpenApiVo ipv4Connection2(Ipv4Connection2OpenApiVo ipv4Connection2) {
    this.ipv4Connection2 = ipv4Connection2;
    return this;
  }

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

  @Valid

  public Ipv4Connection2OpenApiVo getIpv4Connection2() {
    return ipv4Connection2;
  }

  public void setIpv4Connection2(Ipv4Connection2OpenApiVo ipv4Connection2) {
    this.ipv4Connection2 = ipv4Connection2;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Ipv4PptpOpenApiVo ipv4PptpOpenApiVo = (Ipv4PptpOpenApiVo) o;
    return Objects.equals(this.userName, ipv4PptpOpenApiVo.userName) &&
        Objects.equals(this.password, ipv4PptpOpenApiVo.password) &&
        Objects.equals(this.ipFromIsp, ipv4PptpOpenApiVo.ipFromIsp) &&
        Objects.equals(this.primaryDns, ipv4PptpOpenApiVo.primaryDns) &&
        Objects.equals(this.secondaryDns, ipv4PptpOpenApiVo.secondaryDns) &&
        Objects.equals(this.connectionMode, ipv4PptpOpenApiVo.connectionMode) &&
        Objects.equals(this.redialInterval, ipv4PptpOpenApiVo.redialInterval) &&
        Objects.equals(this.startTime, ipv4PptpOpenApiVo.startTime) &&
        Objects.equals(this.endTime, ipv4PptpOpenApiVo.endTime) &&
        Objects.equals(this.mtu, ipv4PptpOpenApiVo.mtu) &&
        Objects.equals(this.mssClampingType, ipv4PptpOpenApiVo.mssClampingType) &&
        Objects.equals(this.mssClampingValue, ipv4PptpOpenApiVo.mssClampingValue) &&
        Objects.equals(this.ipv4Connection2, ipv4PptpOpenApiVo.ipv4Connection2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(userName, password, ipFromIsp, primaryDns, secondaryDns, connectionMode, redialInterval, startTime, endTime, mtu, mssClampingType, mssClampingValue, ipv4Connection2);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Ipv4PptpOpenApiVo {\n");
    
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    ipFromIsp: ").append(toIndentedString(ipFromIsp)).append("\n");
    sb.append("    primaryDns: ").append(toIndentedString(primaryDns)).append("\n");
    sb.append("    secondaryDns: ").append(toIndentedString(secondaryDns)).append("\n");
    sb.append("    connectionMode: ").append(toIndentedString(connectionMode)).append("\n");
    sb.append("    redialInterval: ").append(toIndentedString(redialInterval)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    endTime: ").append(toIndentedString(endTime)).append("\n");
    sb.append("    mtu: ").append(toIndentedString(mtu)).append("\n");
    sb.append("    mssClampingType: ").append(toIndentedString(mssClampingType)).append("\n");
    sb.append("    mssClampingValue: ").append(toIndentedString(mssClampingValue)).append("\n");
    sb.append("    ipv4Connection2: ").append(toIndentedString(ipv4Connection2)).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    ");
  }
}

