class LeaderProperties {

	/**
	 * Should leader election be enabled. Default: true
	 */
	private boolean enabled = true;

	/**
	 * Should leader election be started automatically on startup. Default: true
	 */
	private boolean autoStartup = true;

	/**
	 * Role for which leadership this candidate will compete.
	 */
	private String role;

	/**
	 * Kubernetes namespace where the leaders ConfigMap and candidates are located.
	 */
	private String namespace;

	/**
	 * Kubernetes ConfigMap where leaders information will be stored. Default: leaders
	 */
	private String configMapName = "leaders";

	/**
	 * Leader id property prefix for the ConfigMap. Default: leader.id.
	 */
	private String leaderIdPrefix = "leader.id.";

	/**
	 * Leadership status check period. Default: 60s
	 */
	private Duration updatePeriod = Duration.ofMillis(60000);

	/**
	 * Enable/disable publishing events in case leadership acquisition fails. Default:
	 * false
	 */
	private boolean publishFailedEvents = false;

	/**
	 * Enable/disable creating ConfigMap if it does not exist. Default: true
	 */
	private boolean createConfigMap = true;

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public boolean isAutoStartup() {
		return autoStartup;
	}

	public void setAutoStartup(boolean autoStartup) {
		this.autoStartup = autoStartup;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getNamespace() {
		return namespace;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

	public String getNamespace(String defaultValue) {<FILL_FUNCTION_BODY>}

	public String getConfigMapName() {
		return configMapName;
	}

	public void setConfigMapName(String configMapName) {
		this.configMapName = configMapName;
	}

	public String getLeaderIdPrefix() {
		return leaderIdPrefix;
	}

	public void setLeaderIdPrefix(String leaderIdPrefix) {
		this.leaderIdPrefix = leaderIdPrefix;
	}

	public Duration getUpdatePeriod() {
		return updatePeriod;
	}

	public void setUpdatePeriod(Duration updatePeriod) {
		this.updatePeriod = updatePeriod;
	}

	public boolean isPublishFailedEvents() {
		return publishFailedEvents;
	}

	public void setPublishFailedEvents(boolean publishFailedEvents) {
		this.publishFailedEvents = publishFailedEvents;
	}

	public boolean isCreateConfigMap() {
		return createConfigMap;
	}

	public void setCreateConfigMap(boolean createConfigMap) {
		this.createConfigMap = createConfigMap;
	}

}

		if (namespace == null || namespace.isEmpty()) {
			return defaultValue;
		}

		return namespace;
	
<no_super_class>