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;

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

public class RemoteLogSettingVo   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("host")
  private String host;

  @JsonProperty("port")
  private Integer port;

  @JsonProperty("moreClientLog")
  private Boolean moreClientLog;

  public RemoteLogSettingVo enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * Whether to enable the feature
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Whether to enable the feature")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public RemoteLogSettingVo host(String host) {
    this.host = host;
    return this;
  }

  /**
   * The IP address of the remote log server
   * @return host
  */
  @ApiModelProperty(value = "The IP address of the remote log server")

@Pattern(regexp="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])){3}|([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})") 
  public String getHost() {
    return host;
  }

  public void setHost(String host) {
    this.host = host;
  }

  public RemoteLogSettingVo port(Integer port) {
    this.port = port;
    return this;
  }

  /**
   * Port of the remote log server, port should be within the range of 1-65535
   * @return port
  */
  @ApiModelProperty(value = "Port of the remote log server, port should be within the range of 1-65535")


  public Integer getPort() {
    return port;
  }

  public void setPort(Integer port) {
    this.port = port;
  }

  public RemoteLogSettingVo moreClientLog(Boolean moreClientLog) {
    this.moreClientLog = moreClientLog;
    return this;
  }

  /**
   * Whether it contains client log
   * @return moreClientLog
  */
  @ApiModelProperty(value = "Whether it contains client log")


  public Boolean getMoreClientLog() {
    return moreClientLog;
  }

  public void setMoreClientLog(Boolean moreClientLog) {
    this.moreClientLog = moreClientLog;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RemoteLogSettingVo remoteLogSettingVo = (RemoteLogSettingVo) o;
    return Objects.equals(this.enable, remoteLogSettingVo.enable) &&
        Objects.equals(this.host, remoteLogSettingVo.host) &&
        Objects.equals(this.port, remoteLogSettingVo.port) &&
        Objects.equals(this.moreClientLog, remoteLogSettingVo.moreClientLog);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, host, port, moreClientLog);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RemoteLogSettingVo {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    host: ").append(toIndentedString(host)).append("\n");
    sb.append("    port: ").append(toIndentedString(port)).append("\n");
    sb.append("    moreClientLog: ").append(toIndentedString(moreClientLog)).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    ");
  }
}

