/**
 * 
 */
package org.springblade.etl.connector.source.config;

import java.util.List;

import org.springblade.etl.connector.base.SeatunnelConfig;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author wookvn
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SeatunnelMysqlCdcSourceConfig extends SeatunnelConfig {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * {@link org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.JdbcCatalogOptions}
	 */
	@JsonProperty(required = true)
	private String username;
	
	@JsonProperty(required = true)
	private String password;
	
	@JsonProperty(value = "base-url", required = true)
	private String jdbcUrl;
	
	/**
	 * {@link org.apache.seatunnel.connectors.cdc.base.option.JdbcSourceOptions}
	 */
	@JsonProperty(value = "database-names", required = true)
	private List<String> databaseNames;
	
	@JsonProperty(value = "table-names", required = true)
	private List<String> tableNames;
	
	@JsonProperty("startup.mode")
	private String startMode = "INITIAL";
	
	@JsonProperty("startup.specific-offset.file")
	private String specificOffsetFile;
	
	@JsonProperty("startup.specific-offset.pos")
	private Long specificOffsetPos;
	
	/**
	 * A numeric ID or a numeric ID range of this database client
	 */
	@JsonProperty("server-id")
	private String serverId;// = "5000-6000";
	
	@JsonProperty("snapshot.fetch.size")
	private Integer fetchSize = 1024;
	
	@JsonProperty("snapshot.split.size")
	private Integer splitSize = 8096;
	
	@JsonProperty("server-time-zone")
	private String serverTimeZone = "Asia/Shanghai";
	
	@JsonProperty("connect.timeout.ms")
	private String connectTimeoutMis;
	
	@JsonProperty("connect.max-retries")
	private Integer connectMaxRetries = 3;
	
	@JsonProperty("connection.pool.size")
	private Integer connectPoolSize = 20;
	
	/**
	 * {@link org.apache.seatunnel.connectors.cdc.debezium.DeserializeFormat}
	 */
	private String format;
	
	private DebeziumConfig debezium;
	
	@Data
	public static class DebeziumConfig {
		
	}
}
