// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/SamlUpdateAuthRequestValidator.java
// public class SamlUpdateAuthRequestValidator extends UpdateAuthRequestValidator {
// 
// 	private static final Predicate<UpdateAuthRQ> FULL_NAME_IS_EMPTY = request -> FULL_NAME_ATTRIBUTE.getParameter(request).isEmpty();
// 	private static final Predicate<UpdateAuthRQ> FIRST_AND_LAST_NAME_IS_EMPTY = request ->
// 			LAST_NAME_ATTRIBUTE.getParameter(request).isEmpty() && FIRST_NAME_ATTRIBUTE.getParameter(request).isEmpty();
// 
// 	public SamlUpdateAuthRequestValidator(ParamNamesProvider paramNamesProvider) {
// 		super(paramNamesProvider);
// 	}
// 
// 	@Override
// 	public void validate(UpdateAuthRQ updateRequest) {
// 		super.validate(updateRequest);
// 		BusinessRule.expect(FULL_NAME_IS_EMPTY.test(updateRequest) && FIRST_AND_LAST_NAME_IS_EMPTY.test(updateRequest),
// 				equalTo(Boolean.FALSE)
// 		).verify(ErrorType.BAD_REQUEST_ERROR, "Fields Full name or combination of Last name and First name are empty");
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/UpdateAuthRequestValidator.java
// public class UpdateAuthRequestValidator implements AuthRequestValidator<UpdateAuthRQ> {
// 
// 	private final ParamNamesProvider paramNamesProvider;
// 
// 	public UpdateAuthRequestValidator(ParamNamesProvider paramNamesProvider) {
// 		this.paramNamesProvider = paramNamesProvider;
// 	}
// 
// 	@Override
// 	public void validate(UpdateAuthRQ updateRequest) {
// 		final List<String> paramNames = paramNamesProvider.provide();
// 		paramNames.stream()
// 				.map(it -> retrieveParam(updateRequest, it))
// 				.forEach(it -> expect(it, Optional::isPresent).verify(ErrorType.BAD_REQUEST_ERROR,
// 						formattedSupplier("parameter '{}' is required.", it)
// 				));
// 	}
// 
// 	private Optional<String> retrieveParam(UpdateAuthRQ updateRequest, String name) {
// 		return ofNullable(updateRequest.getIntegrationParams().get(name)).map(String::valueOf).filter(StringUtils::isNotBlank);
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/LdapRequiredParamNamesProvider.java
// @Service
// public class LdapRequiredParamNamesProvider implements ParamNamesProvider {
// 
// 	@Override
// 	public List<String> provide() {
// 		return Arrays.stream(LdapParameter.values())
// 				.filter(LdapParameter::isRequired)
// 				.map(LdapParameter::getParameterName)
// 				.collect(Collectors.toList());
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/ParamNamesProvider.java
// public interface ParamNamesProvider {
// 
// 	List<String> provide();
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/SamlRequiredParamNamesProvider.java
// @Service
// public class SamlRequiredParamNamesProvider implements ParamNamesProvider {
// 
// 	@Override
// 	public List<String> provide() {
// 		return Arrays.stream(SamlParameter.values())
// 				.filter(SamlParameter::isRequired)
// 				.map(SamlParameter::getParameterName)
// 				.collect(Collectors.toList());
// 	}
// }


import com.epam.reportportal.auth.integration.validator.request.SamlUpdateAuthRequestValidator;
import com.epam.reportportal.auth.integration.validator.request.UpdateAuthRequestValidator;
import com.epam.reportportal.auth.integration.validator.request.param.provider.LdapRequiredParamNamesProvider;
import com.epam.reportportal.auth.integration.validator.request.param.provider.ParamNamesProvider;
import com.epam.reportportal.auth.integration.validator.request.param.provider.SamlRequiredParamNamesProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
package com.epam.reportportal.auth.config;


@Configuration
public class AuthIntegrationValidatorConfig {

	@Bean
	public ParamNamesProvider ldapParamNamesProvider() {
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/SamlUpdateAuthRequestValidator.java
// public class SamlUpdateAuthRequestValidator extends UpdateAuthRequestValidator {
// 
// 	private static final Predicate<UpdateAuthRQ> FULL_NAME_IS_EMPTY = request -> FULL_NAME_ATTRIBUTE.getParameter(request).isEmpty();
// 	private static final Predicate<UpdateAuthRQ> FIRST_AND_LAST_NAME_IS_EMPTY = request ->
// 			LAST_NAME_ATTRIBUTE.getParameter(request).isEmpty() && FIRST_NAME_ATTRIBUTE.getParameter(request).isEmpty();
// 
// 	public SamlUpdateAuthRequestValidator(ParamNamesProvider paramNamesProvider) {
// 		super(paramNamesProvider);
// 	}
// 
// 	@Override
// 	public void validate(UpdateAuthRQ updateRequest) {
// 		super.validate(updateRequest);
// 		BusinessRule.expect(FULL_NAME_IS_EMPTY.test(updateRequest) && FIRST_AND_LAST_NAME_IS_EMPTY.test(updateRequest),
// 				equalTo(Boolean.FALSE)
// 		).verify(ErrorType.BAD_REQUEST_ERROR, "Fields Full name or combination of Last name and First name are empty");
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/UpdateAuthRequestValidator.java
// public class UpdateAuthRequestValidator implements AuthRequestValidator<UpdateAuthRQ> {
// 
// 	private final ParamNamesProvider paramNamesProvider;
// 
// 	public UpdateAuthRequestValidator(ParamNamesProvider paramNamesProvider) {
// 		this.paramNamesProvider = paramNamesProvider;
// 	}
// 
// 	@Override
// 	public void validate(UpdateAuthRQ updateRequest) {
// 		final List<String> paramNames = paramNamesProvider.provide();
// 		paramNames.stream()
// 				.map(it -> retrieveParam(updateRequest, it))
// 				.forEach(it -> expect(it, Optional::isPresent).verify(ErrorType.BAD_REQUEST_ERROR,
// 						formattedSupplier("parameter '{}' is required.", it)
// 				));
// 	}
// 
// 	private Optional<String> retrieveParam(UpdateAuthRQ updateRequest, String name) {
// 		return ofNullable(updateRequest.getIntegrationParams().get(name)).map(String::valueOf).filter(StringUtils::isNotBlank);
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/LdapRequiredParamNamesProvider.java
// @Service
// public class LdapRequiredParamNamesProvider implements ParamNamesProvider {
// 
// 	@Override
// 	public List<String> provide() {
// 		return Arrays.stream(LdapParameter.values())
// 				.filter(LdapParameter::isRequired)
// 				.map(LdapParameter::getParameterName)
// 				.collect(Collectors.toList());
// 	}
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/ParamNamesProvider.java
// public interface ParamNamesProvider {
// 
// 	List<String> provide();
// }
// 
// Path: src/main/java/com/epam/reportportal/auth/integration/validator/request/param/provider/SamlRequiredParamNamesProvider.java
// @Service
// public class SamlRequiredParamNamesProvider implements ParamNamesProvider {
// 
// 	@Override
// 	public List<String> provide() {
// 		return Arrays.stream(SamlParameter.values())
// 				.filter(SamlParameter::isRequired)
// 				.map(SamlParameter::getParameterName)
// 				.collect(Collectors.toList());
// 	}
// }


// Path: src/main/java/com/epam/reportportal/auth/config/AuthIntegrationValidatorConfig.java
import com.epam.reportportal.auth.integration.validator.request.SamlUpdateAuthRequestValidator;
import com.epam.reportportal.auth.integration.validator.request.UpdateAuthRequestValidator;
import com.epam.reportportal.auth.integration.validator.request.param.provider.LdapRequiredParamNamesProvider;
import com.epam.reportportal.auth.integration.validator.request.param.provider.ParamNamesProvider;
import com.epam.reportportal.auth.integration.validator.request.param.provider.SamlRequiredParamNamesProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

package com.epam.reportportal.auth.config;


@Configuration
public class AuthIntegrationValidatorConfig {

	@Bean
	public ParamNamesProvider ldapParamNamesProvider() {
		return new LdapRequiredParamNamesProvider();