org.openmetadata.schema.services.connections.dashboard.MicroStrategyConnection Maven / Gradle / Ivy
package org.openmetadata.schema.services.connections.dashboard;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
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;
/**
* MicroStrategyConnection
*
* MicroStrategy Connection Config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"username",
"password",
"hostPort",
"projectName",
"loginMode",
"supportsMetadataExtraction"
})
@Generated("jsonschema2pojo")
public class MicroStrategyConnection {
/**
* MicroStrategy service type
*
*/
@JsonProperty("type")
@JsonPropertyDescription("MicroStrategy service type")
private MicroStrategyConnection.MicroStrategyType type = MicroStrategyConnection.MicroStrategyType.fromValue("MicroStrategy");
/**
* Username
*
* Username to connect to MicroStrategy. This user should have privileges to read all the metadata in MicroStrategy.
* (Required)
*
*/
@JsonProperty("username")
@JsonPropertyDescription("Username to connect to MicroStrategy. This user should have privileges to read all the metadata in MicroStrategy.")
@NotNull
private String username;
/**
* Password
*
* Password to connect to MicroStrategy.
* (Required)
*
*/
@JsonProperty("password")
@JsonPropertyDescription("Password to connect to MicroStrategy.")
@PasswordField
@NotNull
private String password;
/**
* Host and Port
*
* Host and Port of the MicroStrategy instance.
* (Required)
*
*/
@JsonProperty("hostPort")
@JsonPropertyDescription("Host and Port of the MicroStrategy instance.")
@ExposedField
@NotNull
private URI hostPort;
/**
* Project Name
*
* MicroStrategy Project Name
*
*/
@JsonProperty("projectName")
@JsonPropertyDescription("MicroStrategy Project Name")
private String projectName;
/**
* Login Mode
*
* Login Mode for Microstrategy's REST API connection. You can authenticate with one of the following authentication modes: `Standard (1)`, `Anonymous (8)`. Default will be `Standard (1)`. If you're using demo account for Microstrategy, it will be needed to authenticate through loginMode `8`.
*
*/
@JsonProperty("loginMode")
@JsonPropertyDescription("Login Mode for Microstrategy's REST API connection. You can authenticate with one of the following authentication modes: `Standard (1)`, `Anonymous (8)`. Default will be `Standard (1)`. If you're using demo account for Microstrategy, it will be needed to authenticate through loginMode `8`.")
private String loginMode = "1";
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
@JsonPropertyDescription("Supports Metadata Extraction.")
private Boolean supportsMetadataExtraction = true;
/**
* MicroStrategy service type
*
*/
@JsonProperty("type")
public MicroStrategyConnection.MicroStrategyType getType() {
return type;
}
/**
* MicroStrategy service type
*
*/
@JsonProperty("type")
public void setType(MicroStrategyConnection.MicroStrategyType type) {
this.type = type;
}
public MicroStrategyConnection withType(MicroStrategyConnection.MicroStrategyType type) {
this.type = type;
return this;
}
/**
* Username
*
* Username to connect to MicroStrategy. This user should have privileges to read all the metadata in MicroStrategy.
* (Required)
*
*/
@JsonProperty("username")
public String getUsername() {
return username;
}
/**
* Username
*
* Username to connect to MicroStrategy. This user should have privileges to read all the metadata in MicroStrategy.
* (Required)
*
*/
@JsonProperty("username")
public void setUsername(String username) {
this.username = username;
}
public MicroStrategyConnection withUsername(String username) {
this.username = username;
return this;
}
/**
* Password
*
* Password to connect to MicroStrategy.
* (Required)
*
*/
@JsonProperty("password")
@PasswordField
public String getPassword() {
return password;
}
/**
* Password
*
* Password to connect to MicroStrategy.
* (Required)
*
*/
@JsonProperty("password")
@PasswordField
public void setPassword(String password) {
this.password = password;
}
public MicroStrategyConnection withPassword(String password) {
this.password = password;
return this;
}
/**
* Host and Port
*
* Host and Port of the MicroStrategy instance.
* (Required)
*
*/
@JsonProperty("hostPort")
@ExposedField
public URI getHostPort() {
return hostPort;
}
/**
* Host and Port
*
* Host and Port of the MicroStrategy instance.
* (Required)
*
*/
@JsonProperty("hostPort")
@ExposedField
public void setHostPort(URI hostPort) {
this.hostPort = hostPort;
}
public MicroStrategyConnection withHostPort(URI hostPort) {
this.hostPort = hostPort;
return this;
}
/**
* Project Name
*
* MicroStrategy Project Name
*
*/
@JsonProperty("projectName")
public String getProjectName() {
return projectName;
}
/**
* Project Name
*
* MicroStrategy Project Name
*
*/
@JsonProperty("projectName")
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public MicroStrategyConnection withProjectName(String projectName) {
this.projectName = projectName;
return this;
}
/**
* Login Mode
*
* Login Mode for Microstrategy's REST API connection. You can authenticate with one of the following authentication modes: `Standard (1)`, `Anonymous (8)`. Default will be `Standard (1)`. If you're using demo account for Microstrategy, it will be needed to authenticate through loginMode `8`.
*
*/
@JsonProperty("loginMode")
public String getLoginMode() {
return loginMode;
}
/**
* Login Mode
*
* Login Mode for Microstrategy's REST API connection. You can authenticate with one of the following authentication modes: `Standard (1)`, `Anonymous (8)`. Default will be `Standard (1)`. If you're using demo account for Microstrategy, it will be needed to authenticate through loginMode `8`.
*
*/
@JsonProperty("loginMode")
public void setLoginMode(String loginMode) {
this.loginMode = loginMode;
}
public MicroStrategyConnection withLoginMode(String loginMode) {
this.loginMode = loginMode;
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 MicroStrategyConnection withSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(MicroStrategyConnection.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("username");
sb.append('=');
sb.append(((this.username == null)?"":this.username));
sb.append(',');
sb.append("password");
sb.append('=');
sb.append(((this.password == null)?"":this.password));
sb.append(',');
sb.append("hostPort");
sb.append('=');
sb.append(((this.hostPort == null)?"":this.hostPort));
sb.append(',');
sb.append("projectName");
sb.append('=');
sb.append(((this.projectName == null)?"":this.projectName));
sb.append(',');
sb.append("loginMode");
sb.append('=');
sb.append(((this.loginMode == null)?"":this.loginMode));
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.password == null)? 0 :this.password.hashCode()));
result = ((result* 31)+((this.hostPort == null)? 0 :this.hostPort.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.projectName == null)? 0 :this.projectName.hashCode()));
result = ((result* 31)+((this.loginMode == null)? 0 :this.loginMode.hashCode()));
result = ((result* 31)+((this.username == null)? 0 :this.username.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof MicroStrategyConnection) == false) {
return false;
}
MicroStrategyConnection rhs = ((MicroStrategyConnection) other);
return ((((((((this.supportsMetadataExtraction == rhs.supportsMetadataExtraction)||((this.supportsMetadataExtraction!= null)&&this.supportsMetadataExtraction.equals(rhs.supportsMetadataExtraction)))&&((this.password == rhs.password)||((this.password!= null)&&this.password.equals(rhs.password))))&&((this.hostPort == rhs.hostPort)||((this.hostPort!= null)&&this.hostPort.equals(rhs.hostPort))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.projectName == rhs.projectName)||((this.projectName!= null)&&this.projectName.equals(rhs.projectName))))&&((this.loginMode == rhs.loginMode)||((this.loginMode!= null)&&this.loginMode.equals(rhs.loginMode))))&&((this.username == rhs.username)||((this.username!= null)&&this.username.equals(rhs.username))));
}
/**
* MicroStrategy service type
*
*/
@Generated("jsonschema2pojo")
public enum MicroStrategyType {
MICRO_STRATEGY("MicroStrategy");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (MicroStrategyConnection.MicroStrategyType c: values()) {
CONSTANTS.put(c.value, c);
}
}
MicroStrategyType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static MicroStrategyConnection.MicroStrategyType fromValue(String value) {
MicroStrategyConnection.MicroStrategyType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}