org.openmetadata.schema.services.connections.database.GlueConnection Maven / Gradle / Ivy
package org.openmetadata.schema.services.connections.database;
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.schema.security.credentials.AWSCredentials;
/**
* GlueConnection
*
* Glue Connection Config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"awsConfig",
"databaseName",
"connectionOptions",
"connectionArguments",
"supportsMetadataExtraction",
"supportsDBTExtraction"
})
@Generated("jsonschema2pojo")
public class GlueConnection {
/**
* Service type.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Service type.")
private GlueConnection.GlueType type = GlueConnection.GlueType.fromValue("Glue");
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
@JsonPropertyDescription("AWS credentials configs.")
@Valid
@NotNull
private AWSCredentials awsConfig;
/**
* Database Name
*
* Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name.
*
*/
@JsonProperty("databaseName")
@JsonPropertyDescription("Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name.")
private String databaseName;
/**
* 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;
/**
* Supports DBT Extraction.
*
*/
@JsonProperty("supportsDBTExtraction")
@JsonPropertyDescription("Supports DBT Extraction.")
private Boolean supportsDBTExtraction = true;
/**
* Service type.
*
*/
@JsonProperty("type")
public GlueConnection.GlueType getType() {
return type;
}
/**
* Service type.
*
*/
@JsonProperty("type")
public void setType(GlueConnection.GlueType type) {
this.type = type;
}
public GlueConnection withType(GlueConnection.GlueType type) {
this.type = type;
return this;
}
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
public AWSCredentials getAwsConfig() {
return awsConfig;
}
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
public void setAwsConfig(AWSCredentials awsConfig) {
this.awsConfig = awsConfig;
}
public GlueConnection withAwsConfig(AWSCredentials awsConfig) {
this.awsConfig = awsConfig;
return this;
}
/**
* Database Name
*
* Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name.
*
*/
@JsonProperty("databaseName")
public String getDatabaseName() {
return databaseName;
}
/**
* Database Name
*
* Optional name to give to the database in OpenMetadata. If left blank, we will use default as the database name.
*
*/
@JsonProperty("databaseName")
public void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
public GlueConnection withDatabaseName(String databaseName) {
this.databaseName = databaseName;
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 GlueConnection 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 GlueConnection 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 GlueConnection withSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
return this;
}
/**
* Supports DBT Extraction.
*
*/
@JsonProperty("supportsDBTExtraction")
public Boolean getSupportsDBTExtraction() {
return supportsDBTExtraction;
}
/**
* Supports DBT Extraction.
*
*/
@JsonProperty("supportsDBTExtraction")
public void setSupportsDBTExtraction(Boolean supportsDBTExtraction) {
this.supportsDBTExtraction = supportsDBTExtraction;
}
public GlueConnection withSupportsDBTExtraction(Boolean supportsDBTExtraction) {
this.supportsDBTExtraction = supportsDBTExtraction;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(GlueConnection.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("awsConfig");
sb.append('=');
sb.append(((this.awsConfig == null)?"":this.awsConfig));
sb.append(',');
sb.append("databaseName");
sb.append('=');
sb.append(((this.databaseName == null)?"":this.databaseName));
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(',');
sb.append("supportsDBTExtraction");
sb.append('=');
sb.append(((this.supportsDBTExtraction == null)?"":this.supportsDBTExtraction));
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.databaseName == null)? 0 :this.databaseName.hashCode()));
result = ((result* 31)+((this.awsConfig == null)? 0 :this.awsConfig.hashCode()));
result = ((result* 31)+((this.connectionOptions == null)? 0 :this.connectionOptions.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.supportsDBTExtraction == null)? 0 :this.supportsDBTExtraction.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 GlueConnection) == false) {
return false;
}
GlueConnection rhs = ((GlueConnection) other);
return ((((((((this.supportsMetadataExtraction == rhs.supportsMetadataExtraction)||((this.supportsMetadataExtraction!= null)&&this.supportsMetadataExtraction.equals(rhs.supportsMetadataExtraction)))&&((this.databaseName == rhs.databaseName)||((this.databaseName!= null)&&this.databaseName.equals(rhs.databaseName))))&&((this.awsConfig == rhs.awsConfig)||((this.awsConfig!= null)&&this.awsConfig.equals(rhs.awsConfig))))&&((this.connectionOptions == rhs.connectionOptions)||((this.connectionOptions!= null)&&this.connectionOptions.equals(rhs.connectionOptions))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.supportsDBTExtraction == rhs.supportsDBTExtraction)||((this.supportsDBTExtraction!= null)&&this.supportsDBTExtraction.equals(rhs.supportsDBTExtraction))))&&((this.connectionArguments == rhs.connectionArguments)||((this.connectionArguments!= null)&&this.connectionArguments.equals(rhs.connectionArguments))));
}
/**
* Service type.
*
*/
@Generated("jsonschema2pojo")
public enum GlueType {
GLUE("Glue");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (GlueConnection.GlueType c: values()) {
CONSTANTS.put(c.value, c);
}
}
GlueType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static GlueConnection.GlueType fromValue(String value) {
GlueConnection.GlueType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}