com.clinia.model.datacatalog.V1SFTPProtocol Maven / Gradle / Ivy
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.
package com.clinia.model.datacatalog;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.Objects;
/** V1SFTPProtocol */
@JsonDeserialize(as = V1SFTPProtocol.class)
public class V1SFTPProtocol implements V1FileProtocol {
/** Gets or Sets type */
public enum TypeEnum {
SFTP("SFTP");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@JsonProperty("type")
private TypeEnum type;
@JsonProperty("host")
private String host;
@JsonProperty("port")
private Integer port;
@JsonProperty("username")
private String username;
@JsonProperty("password")
private String password;
@JsonProperty("path")
private String path;
public V1SFTPProtocol setType(TypeEnum type) {
this.type = type;
return this;
}
/** Get type */
@javax.annotation.Nonnull
public TypeEnum getType() {
return type;
}
public V1SFTPProtocol setHost(String host) {
this.host = host;
return this;
}
/** The host of server. */
@javax.annotation.Nonnull
public String getHost() {
return host;
}
public V1SFTPProtocol setPort(Integer port) {
this.port = port;
return this;
}
/** The port of server. */
@javax.annotation.Nonnull
public Integer getPort() {
return port;
}
public V1SFTPProtocol setUsername(String username) {
this.username = username;
return this;
}
/** The username of server. */
@javax.annotation.Nonnull
public String getUsername() {
return username;
}
public V1SFTPProtocol setPassword(String password) {
this.password = password;
return this;
}
/** The password of server. */
@javax.annotation.Nonnull
public String getPassword() {
return password;
}
public V1SFTPProtocol setPath(String path) {
this.path = path;
return this;
}
/** The path of file. */
@javax.annotation.Nonnull
public String getPath() {
return path;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1SFTPProtocol v1SFTPProtocol = (V1SFTPProtocol) o;
return (
Objects.equals(this.type, v1SFTPProtocol.type) &&
Objects.equals(this.host, v1SFTPProtocol.host) &&
Objects.equals(this.port, v1SFTPProtocol.port) &&
Objects.equals(this.username, v1SFTPProtocol.username) &&
Objects.equals(this.password, v1SFTPProtocol.password) &&
Objects.equals(this.path, v1SFTPProtocol.path)
);
}
@Override
public int hashCode() {
return Objects.hash(type, host, port, username, password, path);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1SFTPProtocol {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" host: ").append(toIndentedString(host)).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(" path: ").append(toIndentedString(path)).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 ");
}
}