All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmetadata.schema.services.connections.database.AthenaConnection Maven / Gradle / Ivy

There is a newer version: 1.6.0-rc1
Show newest version

package org.openmetadata.schema.services.connections.database;

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.schema.security.credentials.AWSCredentials;


/**
 * AthenaConnection
 * 

* AWS Athena Connection Config * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "type", "scheme", "awsConfig", "s3StagingDir", "workgroup", "databaseName", "connectionOptions", "connectionArguments", "supportsMetadataExtraction", "supportsDBTExtraction", "supportsProfiler", "supportsQueryComment", "supportsUsageExtraction", "supportsLineageExtraction", "supportsDataDiff", "sampleDataStorageConfig" }) @Generated("jsonschema2pojo") public class AthenaConnection { /** * Service type. * */ @JsonProperty("type") @JsonPropertyDescription("Service type.") private AthenaConnection.AthenaType type = AthenaConnection.AthenaType.fromValue("Athena"); /** * SQLAlchemy driver scheme options. * */ @JsonProperty("scheme") @JsonPropertyDescription("SQLAlchemy driver scheme options.") private AthenaConnection.AthenaScheme scheme = AthenaConnection.AthenaScheme.fromValue("awsathena+rest"); /** * AWSCredentials *

* AWS credentials configs. * (Required) * */ @JsonProperty("awsConfig") @JsonPropertyDescription("AWS credentials configs.") @Valid @NotNull private AWSCredentials awsConfig; /** * S3 Staging Directory *

* S3 Staging Directory. Example: s3://postgres/input/ * (Required) * */ @JsonProperty("s3StagingDir") @JsonPropertyDescription("S3 Staging Directory. Example: s3://postgres/input/") @NotNull private URI s3StagingDir; /** * Athena Workgroup *

* Athena workgroup. * (Required) * */ @JsonProperty("workgroup") @JsonPropertyDescription("Athena workgroup.") @NotNull private String workgroup; /** * 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; /** * Supports Profiler * */ @JsonProperty("supportsProfiler") @JsonPropertyDescription("Supports Profiler") private Boolean supportsProfiler = true; /** * For Database Services using SQLAlchemy, True to enable running a comment for all queries run from OpenMetadata. * */ @JsonProperty("supportsQueryComment") @JsonPropertyDescription("For Database Services using SQLAlchemy, True to enable running a comment for all queries run from OpenMetadata.") private Boolean supportsQueryComment = true; /** * Supports Usage Extraction. * */ @JsonProperty("supportsUsageExtraction") @JsonPropertyDescription("Supports Usage Extraction.") private Boolean supportsUsageExtraction = true; /** * Supports Lineage Extraction. * */ @JsonProperty("supportsLineageExtraction") @JsonPropertyDescription("Supports Lineage Extraction.") private Boolean supportsLineageExtraction = true; /** * Supports the data diff data qualty specification. * */ @JsonProperty("supportsDataDiff") @JsonPropertyDescription("Supports the data diff data qualty specification.") private Boolean supportsDataDiff = true; /** * Storage config to store sample data * */ @JsonProperty("sampleDataStorageConfig") @JsonPropertyDescription("Storage config to store sample data") @Valid private SampleDataStorageConfig sampleDataStorageConfig; /** * Service type. * */ @JsonProperty("type") public AthenaConnection.AthenaType getType() { return type; } /** * Service type. * */ @JsonProperty("type") public void setType(AthenaConnection.AthenaType type) { this.type = type; } public AthenaConnection withType(AthenaConnection.AthenaType type) { this.type = type; return this; } /** * SQLAlchemy driver scheme options. * */ @JsonProperty("scheme") public AthenaConnection.AthenaScheme getScheme() { return scheme; } /** * SQLAlchemy driver scheme options. * */ @JsonProperty("scheme") public void setScheme(AthenaConnection.AthenaScheme scheme) { this.scheme = scheme; } public AthenaConnection withScheme(AthenaConnection.AthenaScheme scheme) { this.scheme = scheme; 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 AthenaConnection withAwsConfig(AWSCredentials awsConfig) { this.awsConfig = awsConfig; return this; } /** * S3 Staging Directory *

* S3 Staging Directory. Example: s3://postgres/input/ * (Required) * */ @JsonProperty("s3StagingDir") public URI getS3StagingDir() { return s3StagingDir; } /** * S3 Staging Directory *

* S3 Staging Directory. Example: s3://postgres/input/ * (Required) * */ @JsonProperty("s3StagingDir") public void setS3StagingDir(URI s3StagingDir) { this.s3StagingDir = s3StagingDir; } public AthenaConnection withS3StagingDir(URI s3StagingDir) { this.s3StagingDir = s3StagingDir; return this; } /** * Athena Workgroup *

* Athena workgroup. * (Required) * */ @JsonProperty("workgroup") public String getWorkgroup() { return workgroup; } /** * Athena Workgroup *

* Athena workgroup. * (Required) * */ @JsonProperty("workgroup") public void setWorkgroup(String workgroup) { this.workgroup = workgroup; } public AthenaConnection withWorkgroup(String workgroup) { this.workgroup = workgroup; 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 AthenaConnection 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 AthenaConnection 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 AthenaConnection 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 AthenaConnection 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 AthenaConnection withSupportsDBTExtraction(Boolean supportsDBTExtraction) { this.supportsDBTExtraction = supportsDBTExtraction; return this; } /** * Supports Profiler * */ @JsonProperty("supportsProfiler") public Boolean getSupportsProfiler() { return supportsProfiler; } /** * Supports Profiler * */ @JsonProperty("supportsProfiler") public void setSupportsProfiler(Boolean supportsProfiler) { this.supportsProfiler = supportsProfiler; } public AthenaConnection withSupportsProfiler(Boolean supportsProfiler) { this.supportsProfiler = supportsProfiler; return this; } /** * For Database Services using SQLAlchemy, True to enable running a comment for all queries run from OpenMetadata. * */ @JsonProperty("supportsQueryComment") public Boolean getSupportsQueryComment() { return supportsQueryComment; } /** * For Database Services using SQLAlchemy, True to enable running a comment for all queries run from OpenMetadata. * */ @JsonProperty("supportsQueryComment") public void setSupportsQueryComment(Boolean supportsQueryComment) { this.supportsQueryComment = supportsQueryComment; } public AthenaConnection withSupportsQueryComment(Boolean supportsQueryComment) { this.supportsQueryComment = supportsQueryComment; return this; } /** * Supports Usage Extraction. * */ @JsonProperty("supportsUsageExtraction") public Boolean getSupportsUsageExtraction() { return supportsUsageExtraction; } /** * Supports Usage Extraction. * */ @JsonProperty("supportsUsageExtraction") public void setSupportsUsageExtraction(Boolean supportsUsageExtraction) { this.supportsUsageExtraction = supportsUsageExtraction; } public AthenaConnection withSupportsUsageExtraction(Boolean supportsUsageExtraction) { this.supportsUsageExtraction = supportsUsageExtraction; return this; } /** * Supports Lineage Extraction. * */ @JsonProperty("supportsLineageExtraction") public Boolean getSupportsLineageExtraction() { return supportsLineageExtraction; } /** * Supports Lineage Extraction. * */ @JsonProperty("supportsLineageExtraction") public void setSupportsLineageExtraction(Boolean supportsLineageExtraction) { this.supportsLineageExtraction = supportsLineageExtraction; } public AthenaConnection withSupportsLineageExtraction(Boolean supportsLineageExtraction) { this.supportsLineageExtraction = supportsLineageExtraction; return this; } /** * Supports the data diff data qualty specification. * */ @JsonProperty("supportsDataDiff") public Boolean getSupportsDataDiff() { return supportsDataDiff; } /** * Supports the data diff data qualty specification. * */ @JsonProperty("supportsDataDiff") public void setSupportsDataDiff(Boolean supportsDataDiff) { this.supportsDataDiff = supportsDataDiff; } public AthenaConnection withSupportsDataDiff(Boolean supportsDataDiff) { this.supportsDataDiff = supportsDataDiff; return this; } /** * Storage config to store sample data * */ @JsonProperty("sampleDataStorageConfig") public SampleDataStorageConfig getSampleDataStorageConfig() { return sampleDataStorageConfig; } /** * Storage config to store sample data * */ @JsonProperty("sampleDataStorageConfig") public void setSampleDataStorageConfig(SampleDataStorageConfig sampleDataStorageConfig) { this.sampleDataStorageConfig = sampleDataStorageConfig; } public AthenaConnection withSampleDataStorageConfig(SampleDataStorageConfig sampleDataStorageConfig) { this.sampleDataStorageConfig = sampleDataStorageConfig; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(AthenaConnection.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("scheme"); sb.append('='); sb.append(((this.scheme == null)?"":this.scheme)); sb.append(','); sb.append("awsConfig"); sb.append('='); sb.append(((this.awsConfig == null)?"":this.awsConfig)); sb.append(','); sb.append("s3StagingDir"); sb.append('='); sb.append(((this.s3StagingDir == null)?"":this.s3StagingDir)); sb.append(','); sb.append("workgroup"); sb.append('='); sb.append(((this.workgroup == null)?"":this.workgroup)); 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(','); sb.append("supportsProfiler"); sb.append('='); sb.append(((this.supportsProfiler == null)?"":this.supportsProfiler)); sb.append(','); sb.append("supportsQueryComment"); sb.append('='); sb.append(((this.supportsQueryComment == null)?"":this.supportsQueryComment)); sb.append(','); sb.append("supportsUsageExtraction"); sb.append('='); sb.append(((this.supportsUsageExtraction == null)?"":this.supportsUsageExtraction)); sb.append(','); sb.append("supportsLineageExtraction"); sb.append('='); sb.append(((this.supportsLineageExtraction == null)?"":this.supportsLineageExtraction)); sb.append(','); sb.append("supportsDataDiff"); sb.append('='); sb.append(((this.supportsDataDiff == null)?"":this.supportsDataDiff)); sb.append(','); sb.append("sampleDataStorageConfig"); sb.append('='); sb.append(((this.sampleDataStorageConfig == null)?"":this.sampleDataStorageConfig)); 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.workgroup == null)? 0 :this.workgroup.hashCode())); result = ((result* 31)+((this.supportsMetadataExtraction == null)? 0 :this.supportsMetadataExtraction.hashCode())); result = ((result* 31)+((this.scheme == null)? 0 :this.scheme.hashCode())); result = ((result* 31)+((this.databaseName == null)? 0 :this.databaseName.hashCode())); result = ((result* 31)+((this.supportsProfiler == null)? 0 :this.supportsProfiler.hashCode())); result = ((result* 31)+((this.sampleDataStorageConfig == null)? 0 :this.sampleDataStorageConfig.hashCode())); result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode())); result = ((result* 31)+((this.supportsUsageExtraction == null)? 0 :this.supportsUsageExtraction.hashCode())); result = ((result* 31)+((this.supportsDBTExtraction == null)? 0 :this.supportsDBTExtraction.hashCode())); result = ((result* 31)+((this.connectionArguments == null)? 0 :this.connectionArguments.hashCode())); result = ((result* 31)+((this.supportsLineageExtraction == null)? 0 :this.supportsLineageExtraction.hashCode())); result = ((result* 31)+((this.supportsDataDiff == null)? 0 :this.supportsDataDiff.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.supportsQueryComment == null)? 0 :this.supportsQueryComment.hashCode())); result = ((result* 31)+((this.s3StagingDir == null)? 0 :this.s3StagingDir.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof AthenaConnection) == false) { return false; } AthenaConnection rhs = ((AthenaConnection) other); return (((((((((((((((((this.workgroup == rhs.workgroup)||((this.workgroup!= null)&&this.workgroup.equals(rhs.workgroup)))&&((this.supportsMetadataExtraction == rhs.supportsMetadataExtraction)||((this.supportsMetadataExtraction!= null)&&this.supportsMetadataExtraction.equals(rhs.supportsMetadataExtraction))))&&((this.scheme == rhs.scheme)||((this.scheme!= null)&&this.scheme.equals(rhs.scheme))))&&((this.databaseName == rhs.databaseName)||((this.databaseName!= null)&&this.databaseName.equals(rhs.databaseName))))&&((this.supportsProfiler == rhs.supportsProfiler)||((this.supportsProfiler!= null)&&this.supportsProfiler.equals(rhs.supportsProfiler))))&&((this.sampleDataStorageConfig == rhs.sampleDataStorageConfig)||((this.sampleDataStorageConfig!= null)&&this.sampleDataStorageConfig.equals(rhs.sampleDataStorageConfig))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.supportsUsageExtraction == rhs.supportsUsageExtraction)||((this.supportsUsageExtraction!= null)&&this.supportsUsageExtraction.equals(rhs.supportsUsageExtraction))))&&((this.supportsDBTExtraction == rhs.supportsDBTExtraction)||((this.supportsDBTExtraction!= null)&&this.supportsDBTExtraction.equals(rhs.supportsDBTExtraction))))&&((this.connectionArguments == rhs.connectionArguments)||((this.connectionArguments!= null)&&this.connectionArguments.equals(rhs.connectionArguments))))&&((this.supportsLineageExtraction == rhs.supportsLineageExtraction)||((this.supportsLineageExtraction!= null)&&this.supportsLineageExtraction.equals(rhs.supportsLineageExtraction))))&&((this.supportsDataDiff == rhs.supportsDataDiff)||((this.supportsDataDiff!= null)&&this.supportsDataDiff.equals(rhs.supportsDataDiff))))&&((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.supportsQueryComment == rhs.supportsQueryComment)||((this.supportsQueryComment!= null)&&this.supportsQueryComment.equals(rhs.supportsQueryComment))))&&((this.s3StagingDir == rhs.s3StagingDir)||((this.s3StagingDir!= null)&&this.s3StagingDir.equals(rhs.s3StagingDir)))); } /** * SQLAlchemy driver scheme options. * */ @Generated("jsonschema2pojo") public enum AthenaScheme { AWSATHENA_REST("awsathena+rest"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (AthenaConnection.AthenaScheme c: values()) { CONSTANTS.put(c.value, c); } } AthenaScheme(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static AthenaConnection.AthenaScheme fromValue(String value) { AthenaConnection.AthenaScheme constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } /** * Service type. * */ @Generated("jsonschema2pojo") public enum AthenaType { ATHENA("Athena"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (AthenaConnection.AthenaType c: values()) { CONSTANTS.put(c.value, c); } } AthenaType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static AthenaConnection.AthenaType fromValue(String value) { AthenaConnection.AthenaType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy