org.openmetadata.schema.services.connections.pipeline.DBTCloudConnection Maven / Gradle / Ivy
package org.openmetadata.schema.services.connections.pipeline;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
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.PasswordField;
/**
* DBTCloudConnection
*
* DBTCloud Connection Config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"host",
"discoveryAPI",
"accountId",
"jobIds",
"projectIds",
"token"
})
@Generated("jsonschema2pojo")
public class DBTCloudConnection {
/**
* Service type.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Service type.")
private DBTCloudConnection.DBTCloudType type = DBTCloudConnection.DBTCloudType.fromValue("DBTCloud");
/**
* Host
*
* DBT cloud Access URL.
* (Required)
*
*/
@JsonProperty("host")
@JsonPropertyDescription("DBT cloud Access URL.")
@ExposedField
@NotNull
private URI host;
/**
* Discovery API URL
*
* DBT cloud Metadata API URL.
* (Required)
*
*/
@JsonProperty("discoveryAPI")
@JsonPropertyDescription("DBT cloud Metadata API URL.")
@ExposedField
@NotNull
private URI discoveryAPI;
/**
* Account Id
*
* ID of your DBT cloud account
* (Required)
*
*/
@JsonProperty("accountId")
@JsonPropertyDescription("ID of your DBT cloud account")
@NotNull
private String accountId;
/**
* Job Ids
*
* List of IDs of your DBT cloud jobs seperated by comma `,`
*
*/
@JsonProperty("jobIds")
@JsonPropertyDescription("List of IDs of your DBT cloud jobs seperated by comma `,`")
@Valid
private List jobIds = new ArrayList();
/**
* Project Ids
*
* List of IDs of your DBT cloud projects seperated by comma `,`
*
*/
@JsonProperty("projectIds")
@JsonPropertyDescription("List of IDs of your DBT cloud projects seperated by comma `,`")
@Valid
private List projectIds = new ArrayList();
/**
* Token
*
* Generated Token to connect to DBTCloud.
* (Required)
*
*/
@JsonProperty("token")
@JsonPropertyDescription("Generated Token to connect to DBTCloud.")
@PasswordField
@NotNull
private String token;
/**
* Service type.
*
*/
@JsonProperty("type")
public DBTCloudConnection.DBTCloudType getType() {
return type;
}
/**
* Service type.
*
*/
@JsonProperty("type")
public void setType(DBTCloudConnection.DBTCloudType type) {
this.type = type;
}
public DBTCloudConnection withType(DBTCloudConnection.DBTCloudType type) {
this.type = type;
return this;
}
/**
* Host
*
* DBT cloud Access URL.
* (Required)
*
*/
@JsonProperty("host")
@ExposedField
public URI getHost() {
return host;
}
/**
* Host
*
* DBT cloud Access URL.
* (Required)
*
*/
@JsonProperty("host")
@ExposedField
public void setHost(URI host) {
this.host = host;
}
public DBTCloudConnection withHost(URI host) {
this.host = host;
return this;
}
/**
* Discovery API URL
*
* DBT cloud Metadata API URL.
* (Required)
*
*/
@JsonProperty("discoveryAPI")
@ExposedField
public URI getDiscoveryAPI() {
return discoveryAPI;
}
/**
* Discovery API URL
*
* DBT cloud Metadata API URL.
* (Required)
*
*/
@JsonProperty("discoveryAPI")
@ExposedField
public void setDiscoveryAPI(URI discoveryAPI) {
this.discoveryAPI = discoveryAPI;
}
public DBTCloudConnection withDiscoveryAPI(URI discoveryAPI) {
this.discoveryAPI = discoveryAPI;
return this;
}
/**
* Account Id
*
* ID of your DBT cloud account
* (Required)
*
*/
@JsonProperty("accountId")
public String getAccountId() {
return accountId;
}
/**
* Account Id
*
* ID of your DBT cloud account
* (Required)
*
*/
@JsonProperty("accountId")
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public DBTCloudConnection withAccountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* Job Ids
*
* List of IDs of your DBT cloud jobs seperated by comma `,`
*
*/
@JsonProperty("jobIds")
public List getJobIds() {
return jobIds;
}
/**
* Job Ids
*
* List of IDs of your DBT cloud jobs seperated by comma `,`
*
*/
@JsonProperty("jobIds")
public void setJobIds(List jobIds) {
this.jobIds = jobIds;
}
public DBTCloudConnection withJobIds(List jobIds) {
this.jobIds = jobIds;
return this;
}
/**
* Project Ids
*
* List of IDs of your DBT cloud projects seperated by comma `,`
*
*/
@JsonProperty("projectIds")
public List getProjectIds() {
return projectIds;
}
/**
* Project Ids
*
* List of IDs of your DBT cloud projects seperated by comma `,`
*
*/
@JsonProperty("projectIds")
public void setProjectIds(List projectIds) {
this.projectIds = projectIds;
}
public DBTCloudConnection withProjectIds(List projectIds) {
this.projectIds = projectIds;
return this;
}
/**
* Token
*
* Generated Token to connect to DBTCloud.
* (Required)
*
*/
@JsonProperty("token")
@PasswordField
public String getToken() {
return token;
}
/**
* Token
*
* Generated Token to connect to DBTCloud.
* (Required)
*
*/
@JsonProperty("token")
@PasswordField
public void setToken(String token) {
this.token = token;
}
public DBTCloudConnection withToken(String token) {
this.token = token;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(DBTCloudConnection.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("host");
sb.append('=');
sb.append(((this.host == null)?"":this.host));
sb.append(',');
sb.append("discoveryAPI");
sb.append('=');
sb.append(((this.discoveryAPI == null)?"":this.discoveryAPI));
sb.append(',');
sb.append("accountId");
sb.append('=');
sb.append(((this.accountId == null)?"":this.accountId));
sb.append(',');
sb.append("jobIds");
sb.append('=');
sb.append(((this.jobIds == null)?"":this.jobIds));
sb.append(',');
sb.append("projectIds");
sb.append('=');
sb.append(((this.projectIds == null)?"":this.projectIds));
sb.append(',');
sb.append("token");
sb.append('=');
sb.append(((this.token == null)?"":this.token));
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.jobIds == null)? 0 :this.jobIds.hashCode()));
result = ((result* 31)+((this.accountId == null)? 0 :this.accountId.hashCode()));
result = ((result* 31)+((this.host == null)? 0 :this.host.hashCode()));
result = ((result* 31)+((this.discoveryAPI == null)? 0 :this.discoveryAPI.hashCode()));
result = ((result* 31)+((this.projectIds == null)? 0 :this.projectIds.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.token == null)? 0 :this.token.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof DBTCloudConnection) == false) {
return false;
}
DBTCloudConnection rhs = ((DBTCloudConnection) other);
return ((((((((this.jobIds == rhs.jobIds)||((this.jobIds!= null)&&this.jobIds.equals(rhs.jobIds)))&&((this.accountId == rhs.accountId)||((this.accountId!= null)&&this.accountId.equals(rhs.accountId))))&&((this.host == rhs.host)||((this.host!= null)&&this.host.equals(rhs.host))))&&((this.discoveryAPI == rhs.discoveryAPI)||((this.discoveryAPI!= null)&&this.discoveryAPI.equals(rhs.discoveryAPI))))&&((this.projectIds == rhs.projectIds)||((this.projectIds!= null)&&this.projectIds.equals(rhs.projectIds))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.token == rhs.token)||((this.token!= null)&&this.token.equals(rhs.token))));
}
/**
* Service type.
*
*/
@Generated("jsonschema2pojo")
public enum DBTCloudType {
DBT_CLOUD("DBTCloud");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (DBTCloudConnection.DBTCloudType c: values()) {
CONSTANTS.put(c.value, c);
}
}
DBTCloudType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static DBTCloudConnection.DBTCloudType fromValue(String value) {
DBTCloudConnection.DBTCloudType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}