org.openmetadata.schema.services.connections.metadata.AlationSinkConnection Maven / Gradle / Ivy
package org.openmetadata.schema.services.connections.metadata;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openmetadata.annotations.ExposedField;
import org.openmetadata.annotations.MaskedField;
import org.openmetadata.schema.security.ssl.VerifySSL;
import org.openmetadata.schema.services.connections.database.ConnectionArguments;
import org.openmetadata.schema.services.connections.database.ConnectionOptions;
/**
* AlationSinkConnection
*
* Alation Sink Connection Config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"hostPort",
"authType",
"projectName",
"paginationLimit",
"datasourceLinks",
"verifySSL",
"sslConfig",
"connectionOptions",
"connectionArguments",
"supportsMetadataExtraction"
})
@Generated("jsonschema2pojo")
public class AlationSinkConnection {
/**
* Service type.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Service type.")
private AlationSinkConnection.AlationSinkType type = AlationSinkConnection.AlationSinkType.fromValue("AlationSink");
/**
* Host and Port
*
* Host and port of the Alation service.
* (Required)
*
*/
@JsonProperty("hostPort")
@JsonPropertyDescription("Host and port of the Alation service.")
@ExposedField
@NotNull
private URI hostPort;
/**
* Authentication type for Alation
*
* Types of methods used to authenticate to the alation instance
* (Required)
*
*/
@JsonProperty("authType")
@JsonPropertyDescription("Types of methods used to authenticate to the alation instance")
@MaskedField
@NotNull
private Object authType;
/**
* Project Name
*
* Project name to create the refreshToken. Can be anything
*
*/
@JsonProperty("projectName")
@JsonPropertyDescription("Project name to create the refreshToken. Can be anything")
private String projectName = "AlationAPI";
/**
* Pagination Limit
*
* Pagination limit used for Alation APIs pagination
*
*/
@JsonProperty("paginationLimit")
@JsonPropertyDescription("Pagination limit used for Alation APIs pagination")
private Integer paginationLimit = 10;
/**
* Datasource Links
*
* Add the links between alation datasources and OpenMetadata Database services
*
*/
@JsonProperty("datasourceLinks")
@JsonPropertyDescription("Add the links between alation datasources and OpenMetadata Database services")
@Valid
private DatasourceLinks datasourceLinks;
/**
* Verify SSL
*
* Client SSL verification. Make sure to configure the SSLConfig if enabled.
*
*/
@JsonProperty("verifySSL")
@JsonPropertyDescription("Client SSL verification. Make sure to configure the SSLConfig if enabled.")
private VerifySSL verifySSL = VerifySSL.fromValue("no-ssl");
/**
* SSL Config
*
* Client SSL configuration
*
*/
@JsonProperty("sslConfig")
@JsonPropertyDescription("Client SSL configuration")
@MaskedField
private Object sslConfig;
/**
* Additional connection options to build the URL that can be sent to service during the connection.
*
*/
@JsonProperty("connectionOptions")
@JsonPropertyDescription("Additional connection options to build the URL that can be sent to service during the connection.")
@Valid
private ConnectionOptions connectionOptions;
/**
* Additional connection arguments such as security or protocol configs that can be sent to service during connection.
*
*/
@JsonProperty("connectionArguments")
@JsonPropertyDescription("Additional connection arguments such as security or protocol configs that can be sent to service during connection.")
@Valid
private ConnectionArguments connectionArguments;
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
@JsonPropertyDescription("Supports Metadata Extraction.")
private Boolean supportsMetadataExtraction = true;
/**
* Service type.
*
*/
@JsonProperty("type")
public AlationSinkConnection.AlationSinkType getType() {
return type;
}
/**
* Service type.
*
*/
@JsonProperty("type")
public void setType(AlationSinkConnection.AlationSinkType type) {
this.type = type;
}
public AlationSinkConnection withType(AlationSinkConnection.AlationSinkType type) {
this.type = type;
return this;
}
/**
* Host and Port
*
* Host and port of the Alation service.
* (Required)
*
*/
@JsonProperty("hostPort")
@ExposedField
public URI getHostPort() {
return hostPort;
}
/**
* Host and Port
*
* Host and port of the Alation service.
* (Required)
*
*/
@JsonProperty("hostPort")
@ExposedField
public void setHostPort(URI hostPort) {
this.hostPort = hostPort;
}
public AlationSinkConnection withHostPort(URI hostPort) {
this.hostPort = hostPort;
return this;
}
/**
* Authentication type for Alation
*
* Types of methods used to authenticate to the alation instance
* (Required)
*
*/
@JsonProperty("authType")
@MaskedField
public Object getAuthType() {
return authType;
}
/**
* Authentication type for Alation
*
* Types of methods used to authenticate to the alation instance
* (Required)
*
*/
@JsonProperty("authType")
@MaskedField
public void setAuthType(Object authType) {
this.authType = authType;
}
public AlationSinkConnection withAuthType(Object authType) {
this.authType = authType;
return this;
}
/**
* Project Name
*
* Project name to create the refreshToken. Can be anything
*
*/
@JsonProperty("projectName")
public String getProjectName() {
return projectName;
}
/**
* Project Name
*
* Project name to create the refreshToken. Can be anything
*
*/
@JsonProperty("projectName")
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public AlationSinkConnection withProjectName(String projectName) {
this.projectName = projectName;
return this;
}
/**
* Pagination Limit
*
* Pagination limit used for Alation APIs pagination
*
*/
@JsonProperty("paginationLimit")
public Integer getPaginationLimit() {
return paginationLimit;
}
/**
* Pagination Limit
*
* Pagination limit used for Alation APIs pagination
*
*/
@JsonProperty("paginationLimit")
public void setPaginationLimit(Integer paginationLimit) {
this.paginationLimit = paginationLimit;
}
public AlationSinkConnection withPaginationLimit(Integer paginationLimit) {
this.paginationLimit = paginationLimit;
return this;
}
/**
* Datasource Links
*
* Add the links between alation datasources and OpenMetadata Database services
*
*/
@JsonProperty("datasourceLinks")
public DatasourceLinks getDatasourceLinks() {
return datasourceLinks;
}
/**
* Datasource Links
*
* Add the links between alation datasources and OpenMetadata Database services
*
*/
@JsonProperty("datasourceLinks")
public void setDatasourceLinks(DatasourceLinks datasourceLinks) {
this.datasourceLinks = datasourceLinks;
}
public AlationSinkConnection withDatasourceLinks(DatasourceLinks datasourceLinks) {
this.datasourceLinks = datasourceLinks;
return this;
}
/**
* Verify SSL
*
* Client SSL verification. Make sure to configure the SSLConfig if enabled.
*
*/
@JsonProperty("verifySSL")
public VerifySSL getVerifySSL() {
return verifySSL;
}
/**
* Verify SSL
*
* Client SSL verification. Make sure to configure the SSLConfig if enabled.
*
*/
@JsonProperty("verifySSL")
public void setVerifySSL(VerifySSL verifySSL) {
this.verifySSL = verifySSL;
}
public AlationSinkConnection withVerifySSL(VerifySSL verifySSL) {
this.verifySSL = verifySSL;
return this;
}
/**
* SSL Config
*
* Client SSL configuration
*
*/
@JsonProperty("sslConfig")
@MaskedField
public Object getSslConfig() {
return sslConfig;
}
/**
* SSL Config
*
* Client SSL configuration
*
*/
@JsonProperty("sslConfig")
@MaskedField
public void setSslConfig(Object sslConfig) {
this.sslConfig = sslConfig;
}
public AlationSinkConnection withSslConfig(Object sslConfig) {
this.sslConfig = sslConfig;
return this;
}
/**
* Additional connection options to build the URL that can be sent to service during the connection.
*
*/
@JsonProperty("connectionOptions")
public ConnectionOptions getConnectionOptions() {
return connectionOptions;
}
/**
* Additional connection options to build the URL that can be sent to service during the connection.
*
*/
@JsonProperty("connectionOptions")
public void setConnectionOptions(ConnectionOptions connectionOptions) {
this.connectionOptions = connectionOptions;
}
public AlationSinkConnection withConnectionOptions(ConnectionOptions connectionOptions) {
this.connectionOptions = connectionOptions;
return this;
}
/**
* Additional connection arguments such as security or protocol configs that can be sent to service during connection.
*
*/
@JsonProperty("connectionArguments")
public ConnectionArguments getConnectionArguments() {
return connectionArguments;
}
/**
* Additional connection arguments such as security or protocol configs that can be sent to service during connection.
*
*/
@JsonProperty("connectionArguments")
public void setConnectionArguments(ConnectionArguments connectionArguments) {
this.connectionArguments = connectionArguments;
}
public AlationSinkConnection withConnectionArguments(ConnectionArguments connectionArguments) {
this.connectionArguments = connectionArguments;
return this;
}
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
public Boolean getSupportsMetadataExtraction() {
return supportsMetadataExtraction;
}
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
public void setSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
}
public AlationSinkConnection withSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(AlationSinkConnection.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("type");
sb.append('=');
sb.append(((this.type == null)?"":this.type));
sb.append(',');
sb.append("hostPort");
sb.append('=');
sb.append(((this.hostPort == null)?"":this.hostPort));
sb.append(',');
sb.append("authType");
sb.append('=');
sb.append(((this.authType == null)?"":this.authType));
sb.append(',');
sb.append("projectName");
sb.append('=');
sb.append(((this.projectName == null)?"":this.projectName));
sb.append(',');
sb.append("paginationLimit");
sb.append('=');
sb.append(((this.paginationLimit == null)?"":this.paginationLimit));
sb.append(',');
sb.append("datasourceLinks");
sb.append('=');
sb.append(((this.datasourceLinks == null)?"":this.datasourceLinks));
sb.append(',');
sb.append("verifySSL");
sb.append('=');
sb.append(((this.verifySSL == null)?"":this.verifySSL));
sb.append(',');
sb.append("sslConfig");
sb.append('=');
sb.append(((this.sslConfig == null)?"":this.sslConfig));
sb.append(',');
sb.append("connectionOptions");
sb.append('=');
sb.append(((this.connectionOptions == null)?"":this.connectionOptions));
sb.append(',');
sb.append("connectionArguments");
sb.append('=');
sb.append(((this.connectionArguments == null)?"":this.connectionArguments));
sb.append(',');
sb.append("supportsMetadataExtraction");
sb.append('=');
sb.append(((this.supportsMetadataExtraction == null)?"":this.supportsMetadataExtraction));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.supportsMetadataExtraction == null)? 0 :this.supportsMetadataExtraction.hashCode()));
result = ((result* 31)+((this.sslConfig == null)? 0 :this.sslConfig.hashCode()));
result = ((result* 31)+((this.datasourceLinks == null)? 0 :this.datasourceLinks.hashCode()));
result = ((result* 31)+((this.connectionOptions == null)? 0 :this.connectionOptions.hashCode()));
result = ((result* 31)+((this.verifySSL == null)? 0 :this.verifySSL.hashCode()));
result = ((result* 31)+((this.hostPort == null)? 0 :this.hostPort.hashCode()));
result = ((result* 31)+((this.paginationLimit == null)? 0 :this.paginationLimit.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.authType == null)? 0 :this.authType.hashCode()));
result = ((result* 31)+((this.projectName == null)? 0 :this.projectName.hashCode()));
result = ((result* 31)+((this.connectionArguments == null)? 0 :this.connectionArguments.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof AlationSinkConnection) == false) {
return false;
}
AlationSinkConnection rhs = ((AlationSinkConnection) other);
return ((((((((((((this.supportsMetadataExtraction == rhs.supportsMetadataExtraction)||((this.supportsMetadataExtraction!= null)&&this.supportsMetadataExtraction.equals(rhs.supportsMetadataExtraction)))&&((this.sslConfig == rhs.sslConfig)||((this.sslConfig!= null)&&this.sslConfig.equals(rhs.sslConfig))))&&((this.datasourceLinks == rhs.datasourceLinks)||((this.datasourceLinks!= null)&&this.datasourceLinks.equals(rhs.datasourceLinks))))&&((this.connectionOptions == rhs.connectionOptions)||((this.connectionOptions!= null)&&this.connectionOptions.equals(rhs.connectionOptions))))&&((this.verifySSL == rhs.verifySSL)||((this.verifySSL!= null)&&this.verifySSL.equals(rhs.verifySSL))))&&((this.hostPort == rhs.hostPort)||((this.hostPort!= null)&&this.hostPort.equals(rhs.hostPort))))&&((this.paginationLimit == rhs.paginationLimit)||((this.paginationLimit!= null)&&this.paginationLimit.equals(rhs.paginationLimit))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.authType == rhs.authType)||((this.authType!= null)&&this.authType.equals(rhs.authType))))&&((this.projectName == rhs.projectName)||((this.projectName!= null)&&this.projectName.equals(rhs.projectName))))&&((this.connectionArguments == rhs.connectionArguments)||((this.connectionArguments!= null)&&this.connectionArguments.equals(rhs.connectionArguments))));
}
/**
* Service type.
*
*/
@Generated("jsonschema2pojo")
public enum AlationSinkType {
ALATION_SINK("AlationSink");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (AlationSinkConnection.AlationSinkType c: values()) {
CONSTANTS.put(c.value, c);
}
}
AlationSinkType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static AlationSinkConnection.AlationSinkType fromValue(String value) {
AlationSinkConnection.AlationSinkType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}