package org.wfc.omada.api.maintenance.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * File server configuration.
 */
@ApiModel(description = "File server configuration.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:40:12.680+08:00[Asia/Shanghai]")

public class FileServerOpenApiVo   {
  @JsonProperty("protocol")
  private String protocol;

  @JsonProperty("hostname")
  private String hostname;

  @JsonProperty("port")
  private Integer port;

  @JsonProperty("username")
  private String username;

  @JsonProperty("password")
  private String password;

  public FileServerOpenApiVo protocol(String protocol) {
    this.protocol = protocol;
    return this;
  }

  /**
   * File server protocol, protocol should be a value as follows: FTP: FTP protocal; SFTP: SFTP protocal; TFTP: TFTP protocal; SCP: SCP protocal.
   * @return protocol
  */
  @ApiModelProperty(required = true, value = "File server protocol, protocol should be a value as follows: FTP: FTP protocal; SFTP: SFTP protocal; TFTP: TFTP protocal; SCP: SCP protocal.")
  @NotNull


  public String getProtocol() {
    return protocol;
  }

  public void setProtocol(String protocol) {
    this.protocol = protocol;
  }

  public FileServerOpenApiVo hostname(String hostname) {
    this.hostname = hostname;
    return this;
  }

  /**
   * File server host name or IP. Parameter [filePath] should be 1 - 128 ASCII characters.
   * @return hostname
  */
  @ApiModelProperty(required = true, value = "File server host name or IP. Parameter [filePath] should be 1 - 128 ASCII characters.")
  @NotNull


  public String getHostname() {
    return hostname;
  }

  public void setHostname(String hostname) {
    this.hostname = hostname;
  }

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

  /**
   * File server port. The value must be between 1 and 65535.
   * @return port
  */
  @ApiModelProperty(required = true, value = "File server port. The value must be between 1 and 65535.")
  @NotNull


  public Integer getPort() {
    return port;
  }

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

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

  /**
   * File server access username, if needed in FTP/SFTP/SCP protocol. Parameter [username] should be 1 - 128 ASCII characters.
   * @return username
  */
  @ApiModelProperty(value = "File server access username, if needed in FTP/SFTP/SCP protocol. Parameter [username] should be 1 - 128 ASCII characters.")


  public String getUsername() {
    return username;
  }

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

  public FileServerOpenApiVo password(String password) {
    this.password = password;
    return this;
  }

  /**
   * File server access password, if needed in FTP/SFTP protocol. Parameter [password] should be 1 - 128 ASCII characters.
   * @return password
  */
  @ApiModelProperty(value = "File server access password, if needed in FTP/SFTP protocol. Parameter [password] should be 1 - 128 ASCII characters.")


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    FileServerOpenApiVo fileServerOpenApiVo = (FileServerOpenApiVo) o;
    return Objects.equals(this.protocol, fileServerOpenApiVo.protocol) &&
        Objects.equals(this.hostname, fileServerOpenApiVo.hostname) &&
        Objects.equals(this.port, fileServerOpenApiVo.port) &&
        Objects.equals(this.username, fileServerOpenApiVo.username) &&
        Objects.equals(this.password, fileServerOpenApiVo.password);
  }

  @Override
  public int hashCode() {
    return Objects.hash(protocol, hostname, port, username, password);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class FileServerOpenApiVo {\n");
    
    sb.append("    protocol: ").append(toIndentedString(protocol)).append("\n");
    sb.append("    hostname: ").append(toIndentedString(hostname)).append("\n");
    sb.append("    port: ").append(toIndentedString(port)).append("\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).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    ");
  }
}

