com.aliyun.datahub.client.model.SinkHologresConfig Maven / Gradle / Ivy
The newest version!
package com.aliyun.datahub.client.model;
import java.util.Objects;
public class SinkHologresConfig extends SinkConfig {
public enum HoloInsertMode {
INVALID("-1"),
IGNORE("0"),
REPLACE("1");
private final String value;
HoloInsertMode(String value) {
this.value = value;
}
public String getValue() { return value; }
public static HoloInsertMode fromValue(String value) {
for (HoloInsertMode type : HoloInsertMode.values()) {
if (Objects.equals(type.value, value)) {
return type;
}
}
return INVALID;
}
}
public enum HoloSyncMode {
INVALID("-1"),
DEFAULT("0"),
DTS("1"),
DTS_OLD("2");
private final String value;
HoloSyncMode(String value) {
this.value = value;
}
public String getValue() { return value; }
public static HoloSyncMode fromValue(String value) {
for (HoloSyncMode type : HoloSyncMode.values()) {
if (Objects.equals(type.value, value)) {
return type;
}
}
return INVALID;
}
}
private String instanceId;
private String database;
private String table;
private AuthMode authMode;
private String accessId;
private String accessKey;
private HoloInsertMode insertMode = HoloInsertMode.REPLACE;
private HoloSyncMode syncMode = HoloSyncMode.DEFAULT;
/**
* Not used by normal user
*/
private InternalConfig internalConfig = new InternalConfig();
/**
* Binary parser config
*/
private BinaryParserConfig binaryParserConfig = null;
@Deprecated
public String getEndpoint() {
return null;
}
@Deprecated
public void setEndpoint(String endpoint) {
}
@Deprecated
public String getProjectName() {
return database;
}
@Deprecated
public void setProjectName(String projectName) {
this.database = projectName;
}
@Deprecated
public String getTopicName() {
return table;
}
@Deprecated
public void setTopicName(String topicName) {
this.table = topicName;
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getDatabase() {
return database;
}
public void setDatabase(String database) {
this.database = database;
}
public String getTable() {
return table;
}
public void setTable(String table) {
this.table = table;
}
public AuthMode getAuthMode() {
return authMode;
}
public void setAuthMode(AuthMode authMode) {
this.authMode = authMode;
}
public String getAccessId() {
return accessId;
}
public void setAccessId(String accessId) {
this.accessId = accessId;
}
public String getAccessKey() {
return accessKey;
}
public void setAccessKey(String accessKey) {
this.accessKey = accessKey;
}
public HoloInsertMode getInsertMode() { return insertMode; }
public void setInsertMode(HoloInsertMode insertMode) { this.insertMode = insertMode; }
public HoloSyncMode getSyncMode() { return syncMode; }
public void setSyncMode(HoloSyncMode syncMode) { this.syncMode = syncMode; }
public InternalConfig getInternalConfig() {
return internalConfig;
}
public void setInternalConfig(InternalConfig internalConfig) {
this.internalConfig = internalConfig;
}
public BinaryParserConfig getBinaryParserConfig() {
return binaryParserConfig;
}
public void setBinaryParserConfig(BinaryParserConfig binaryParserConfig) {
this.binaryParserConfig = binaryParserConfig;
}
public static class InternalConfig {
/**
* Internal use.
*/
private Boolean skipDirtyPack;
public Boolean isSkipDirtyPack() {
return skipDirtyPack;
}
public void setSkipDirtyPack(Boolean skipDirtyPack) {
this.skipDirtyPack = skipDirtyPack;
}
}
}