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;

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

public class SslVpnLockConfigOpenApiVo   {
  @JsonProperty("type")
  private Integer type;

  @JsonProperty("username")
  private String username;

  @JsonProperty("ip")
  private String ip;

  @JsonProperty("totalLockTime")
  private Integer totalLockTime;

  public SslVpnLockConfigOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type of the SSL VPN lock should be a value as follows: 0:username; 1:IP
   * @return type
  */
  @ApiModelProperty(required = true, value = "Type of the SSL VPN lock should be a value as follows: 0:username; 1:IP")
  @NotNull


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public SslVpnLockConfigOpenApiVo username(String username) {
    this.username = username;
    return this;
  }

  /**
   * Username of the SSL VPN lock. It is required when parameter [type] is 0.
   * @return username
  */
  @ApiModelProperty(value = "Username of the SSL VPN lock. It is required when parameter [type] is 0.")

@Pattern(regexp="^[\\041-\\0176]$|^[\\041-\\0176][\\040-\\0176]{0,18}[\\041-\\0176]$") 
  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public SslVpnLockConfigOpenApiVo ip(String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * IP of the SSL VPN lock. It is required when parameter [type] is 1.
   * @return ip
  */
  @ApiModelProperty(value = "IP of the SSL VPN lock. It is required when parameter [type] is 1.")


  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public SslVpnLockConfigOpenApiVo totalLockTime(Integer totalLockTime) {
    this.totalLockTime = totalLockTime;
    return this;
  }

  /**
   * Total lock time of the SSL VPN lock should be within the range of 1–1080(min).
   * @return totalLockTime
  */
  @ApiModelProperty(required = true, value = "Total lock time of the SSL VPN lock should be within the range of 1–1080(min).")
  @NotNull


  public Integer getTotalLockTime() {
    return totalLockTime;
  }

  public void setTotalLockTime(Integer totalLockTime) {
    this.totalLockTime = totalLockTime;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SslVpnLockConfigOpenApiVo sslVpnLockConfigOpenApiVo = (SslVpnLockConfigOpenApiVo) o;
    return Objects.equals(this.type, sslVpnLockConfigOpenApiVo.type) &&
        Objects.equals(this.username, sslVpnLockConfigOpenApiVo.username) &&
        Objects.equals(this.ip, sslVpnLockConfigOpenApiVo.ip) &&
        Objects.equals(this.totalLockTime, sslVpnLockConfigOpenApiVo.totalLockTime);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, username, ip, totalLockTime);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SslVpnLockConfigOpenApiVo {\n");
    
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    totalLockTime: ").append(toIndentedString(totalLockTime)).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    ");
  }
}

