class GatewayV4RequestValidator implements Validator<GatewayV4Request> {

    @Override
    public ValidationResult validate(GatewayV4Request subject) {
        ValidationResultBuilder validationResultBuilder = ValidationResult.builder();
        if (CollectionUtils.isEmpty(subject.getTopologies())) {
            return validationResultBuilder.error("No topology is defined in gateway request. Please define a topology in "
                    + "'gateway.topologies'.").build();
        }
        validateTopologyNames(subject, validationResultBuilder);
        return validationResultBuilder.build();
    }

}