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.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class Ipv4PppoaOpenApiVo   {
  @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("serviceName")
  private String serviceName;

  @JsonProperty("mtu")
  private Integer mtu;

  @JsonProperty("mru")
  private Integer mru;

  @JsonProperty("mssClampingType")
  private Integer mssClampingType;

  @JsonProperty("mssClampingValue")
  private Integer mssClampingValue;

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

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


  public Integer getConnectionMode() {
    return connectionMode;
  }

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

  public Ipv4PppoaOpenApiVo 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 Ipv4PppoaOpenApiVo 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 Ipv4PppoaOpenApiVo 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 Ipv4PppoaOpenApiVo serviceName(String serviceName) {
    this.serviceName = serviceName;
    return this;
  }

  /**
   * Service Name. Keep it blank unless your ISP requires you to configure it.
   * @return serviceName
  */
  @ApiModelProperty(value = "Service Name. Keep it blank unless your ISP requires you to configure it.")

@Pattern(regexp="^[\\041-\\0176]{1,128}$") 
  public String getServiceName() {
    return serviceName;
  }

  public void setServiceName(String serviceName) {
    this.serviceName = serviceName;
  }

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

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


  public Integer getMtu() {
    return mtu;
  }

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

  public Ipv4PppoaOpenApiVo mru(Integer mru) {
    this.mru = mru;
    return this;
  }

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


  public Integer getMru() {
    return mru;
  }

  public void setMru(Integer mru) {
    this.mru = mru;
  }

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

  /**
   * It should be a value as follows: 0: Disable, 1: Auto, 2: Custom
   * @return mssClampingType
  */
  @ApiModelProperty(required = true, value = "It should be a value as follows: 0: Disable, 1: Auto, 2: Custom")
  @NotNull


  public Integer getMssClampingType() {
    return mssClampingType;
  }

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

  public Ipv4PppoaOpenApiVo 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;
  }


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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Ipv4PppoaOpenApiVo {\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("    serviceName: ").append(toIndentedString(serviceName)).append("\n");
    sb.append("    mtu: ").append(toIndentedString(mtu)).append("\n");
    sb.append("    mru: ").append(toIndentedString(mru)).append("\n");
    sb.append("    mssClampingType: ").append(toIndentedString(mssClampingType)).append("\n");
    sb.append("    mssClampingValue: ").append(toIndentedString(mssClampingValue)).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    ");
  }
}

