package com.eactive.eai.rms.onl.manage.circuitbreaker;

import org.mapstruct.BeanMapping;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;

import com.eactive.eai.data.entity.onl.circuitbreaker.CircuitBreakerConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.rms.data.entity.onl.circuitbreaker.CircuitBreakerServiceDto;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CircuitBreakerManMapper extends GenericMapper<CircuitBreakerManUI, CircuitBreakerConfig> {
	@Override
	CircuitBreakerManUI toVo(CircuitBreakerConfig entity);

	@Override
	@InheritInverseConfiguration
	CircuitBreakerConfig toEntity(CircuitBreakerManUI vo);
	
	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(CircuitBreakerManUI vo, @MappingTarget CircuitBreakerConfig entity);

	CircuitBreakerServiceDto toDto(CircuitBreakerConfig entity);

	CircuitBreakerManUI toVo(CircuitBreakerServiceDto serviceDto);
	
}
