class BackupRestoreV4RequestValidator {

    public ValidationResult validate(Stack stack, String location, String backupId) {
        ValidationResult.ValidationResultBuilder resultBuilder = ValidationResult.builder();
        String cloudPlatform = stack.cloudPlatform();

        if (Strings.isNullOrEmpty(backupId)) {
            resultBuilder.error("Parameter backupId required");
        }
        if (Strings.isNullOrEmpty(location)) {
            resultBuilder.error("Parameter backupLocation required");
        } else {
            validateCloudLocationScheme(cloudPlatform, location, resultBuilder);
        }
        return resultBuilder.build();
    }

}