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

public class Ipv4PppoeOpenApiVo   {
  @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;

  @JsonProperty("ipv4Connection2")
  private Ipv4Connection2OpenApiVo ipv4Connection2;

  public Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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 Ipv4PppoeOpenApiVo 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;
    }
    Ipv4PppoeOpenApiVo ipv4PppoeOpenApiVo = (Ipv4PppoeOpenApiVo) o;
    return Objects.equals(this.userName, ipv4PppoeOpenApiVo.userName) &&
        Objects.equals(this.password, ipv4PppoeOpenApiVo.password) &&
        Objects.equals(this.ipFromIsp, ipv4PppoeOpenApiVo.ipFromIsp) &&
        Objects.equals(this.primaryDns, ipv4PppoeOpenApiVo.primaryDns) &&
        Objects.equals(this.secondaryDns, ipv4PppoeOpenApiVo.secondaryDns) &&
        Objects.equals(this.connectionMode, ipv4PppoeOpenApiVo.connectionMode) &&
        Objects.equals(this.redialInterval, ipv4PppoeOpenApiVo.redialInterval) &&
        Objects.equals(this.startTime, ipv4PppoeOpenApiVo.startTime) &&
        Objects.equals(this.endTime, ipv4PppoeOpenApiVo.endTime) &&
        Objects.equals(this.serviceName, ipv4PppoeOpenApiVo.serviceName) &&
        Objects.equals(this.mtu, ipv4PppoeOpenApiVo.mtu) &&
        Objects.equals(this.mru, ipv4PppoeOpenApiVo.mru) &&
        Objects.equals(this.mssClampingType, ipv4PppoeOpenApiVo.mssClampingType) &&
        Objects.equals(this.mssClampingValue, ipv4PppoeOpenApiVo.mssClampingValue) &&
        Objects.equals(this.ipv4Connection2, ipv4PppoeOpenApiVo.ipv4Connection2);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Ipv4PppoeOpenApiVo {\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("    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    ");
  }
}

