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.Pattern;
import java.util.Objects;

/**
 * Parameter [portSettings] should not be null when parameter [provider] is 6.
 */
@ApiModel(description = "Parameter [portSettings] should not be null when parameter [provider] is 6.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class PortSettingVo   {
  @JsonProperty("registrarPort")
  private Integer registrarPort;

  @JsonProperty("sipProxy")
  private String sipProxy;

  @JsonProperty("sipProxyPort")
  private Integer sipProxyPort;

  @JsonProperty("outboundProxy")
  private String outboundProxy;

  @JsonProperty("outboundProxyPort")
  private Integer outboundProxyPort;

  @JsonProperty("viaOutboundProxy")
  private Boolean viaOutboundProxy;

  public PortSettingVo registrarPort(Integer registrarPort) {
    this.registrarPort = registrarPort;
    return this;
  }

  /**
   * When parameter [provider] is 0, parameter [registrarPort] has a default value of [5060]. In other cases, parameter [registrarPort] is always 5060.
   * @return registrarPort
  */
  @ApiModelProperty(value = "When parameter [provider] is 0, parameter [registrarPort] has a default value of [5060]. In other cases, parameter [registrarPort] is always 5060.")


  public Integer getRegistrarPort() {
    return registrarPort;
  }

  public void setRegistrarPort(Integer registrarPort) {
    this.registrarPort = registrarPort;
  }

  public PortSettingVo sipProxy(String sipProxy) {
    this.sipProxy = sipProxy;
    return this;
  }

  /**
   * Parameter [sipProxy] should not be null when parameter [provider] is 6. When parameter [provider] is 0, parameter [sipProxy] has a default value of [0.0.0.0]. In other cases, parameter [sipProxy] is always [0.0.0.0].
   * @return sipProxy
  */
  @ApiModelProperty(value = "Parameter [sipProxy] should not be null when parameter [provider] is 6. When parameter [provider] is 0, parameter [sipProxy] has a default value of [0.0.0.0]. In other cases, parameter [sipProxy] is always [0.0.0.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 getSipProxy() {
    return sipProxy;
  }

  public void setSipProxy(String sipProxy) {
    this.sipProxy = sipProxy;
  }

  public PortSettingVo sipProxyPort(Integer sipProxyPort) {
    this.sipProxyPort = sipProxyPort;
    return this;
  }

  /**
   * When parameter [provider] is 0, parameter [sipProxyPort] has a default value of [5060]. In other cases, parameter [sipProxyPort] is always 5060.
   * @return sipProxyPort
  */
  @ApiModelProperty(value = "When parameter [provider] is 0, parameter [sipProxyPort] has a default value of [5060]. In other cases, parameter [sipProxyPort] is always 5060.")


  public Integer getSipProxyPort() {
    return sipProxyPort;
  }

  public void setSipProxyPort(Integer sipProxyPort) {
    this.sipProxyPort = sipProxyPort;
  }

  public PortSettingVo outboundProxy(String outboundProxy) {
    this.outboundProxy = outboundProxy;
    return this;
  }

  /**
   * When parameter [provider] is 0, parameter [outboundProxy] has a default value of [0.0.0.0]. In other cases, parameter [outboundProxy] is always [0.0.0.0].
   * @return outboundProxy
  */
  @ApiModelProperty(value = "When parameter [provider] is 0, parameter [outboundProxy] has a default value of [0.0.0.0]. In other cases, parameter [outboundProxy] is always [0.0.0.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 getOutboundProxy() {
    return outboundProxy;
  }

  public void setOutboundProxy(String outboundProxy) {
    this.outboundProxy = outboundProxy;
  }

  public PortSettingVo outboundProxyPort(Integer outboundProxyPort) {
    this.outboundProxyPort = outboundProxyPort;
    return this;
  }

  /**
   * When parameter [provider] is 0, parameter [outboundProxyPort] has a default value of [5060]. In other cases, parameter [outboundProxyPort] is always 5060.
   * @return outboundProxyPort
  */
  @ApiModelProperty(value = "When parameter [provider] is 0, parameter [outboundProxyPort] has a default value of [5060]. In other cases, parameter [outboundProxyPort] is always 5060.")


  public Integer getOutboundProxyPort() {
    return outboundProxyPort;
  }

  public void setOutboundProxyPort(Integer outboundProxyPort) {
    this.outboundProxyPort = outboundProxyPort;
  }

  public PortSettingVo viaOutboundProxy(Boolean viaOutboundProxy) {
    this.viaOutboundProxy = viaOutboundProxy;
    return this;
  }

  /**
   * When parameter [provider] is 0, parameter [viaOutboundProxy] has a default value of [true]. In other cases, parameter [viaOutboundProxy] is always true.
   * @return viaOutboundProxy
  */
  @ApiModelProperty(value = "When parameter [provider] is 0, parameter [viaOutboundProxy] has a default value of [true]. In other cases, parameter [viaOutboundProxy] is always true.")


  public Boolean getViaOutboundProxy() {
    return viaOutboundProxy;
  }

  public void setViaOutboundProxy(Boolean viaOutboundProxy) {
    this.viaOutboundProxy = viaOutboundProxy;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PortSettingVo portSettingVo = (PortSettingVo) o;
    return Objects.equals(this.registrarPort, portSettingVo.registrarPort) &&
        Objects.equals(this.sipProxy, portSettingVo.sipProxy) &&
        Objects.equals(this.sipProxyPort, portSettingVo.sipProxyPort) &&
        Objects.equals(this.outboundProxy, portSettingVo.outboundProxy) &&
        Objects.equals(this.outboundProxyPort, portSettingVo.outboundProxyPort) &&
        Objects.equals(this.viaOutboundProxy, portSettingVo.viaOutboundProxy);
  }

  @Override
  public int hashCode() {
    return Objects.hash(registrarPort, sipProxy, sipProxyPort, outboundProxy, outboundProxyPort, viaOutboundProxy);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PortSettingVo {\n");
    
    sb.append("    registrarPort: ").append(toIndentedString(registrarPort)).append("\n");
    sb.append("    sipProxy: ").append(toIndentedString(sipProxy)).append("\n");
    sb.append("    sipProxyPort: ").append(toIndentedString(sipProxyPort)).append("\n");
    sb.append("    outboundProxy: ").append(toIndentedString(outboundProxy)).append("\n");
    sb.append("    outboundProxyPort: ").append(toIndentedString(outboundProxyPort)).append("\n");
    sb.append("    viaOutboundProxy: ").append(toIndentedString(viaOutboundProxy)).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    ");
  }
}

