class HerdApiClientOperations {

    void checkPropertiesFile(PropertiesHelper propertiesHelper, Boolean messageFlag) throws ApiException
    {
        List<String> requiredProperties =
            Arrays.asList(HERD_BASE_URL_PROPERTY, HERD_USERNAME_PROPERTY, HERD_PASSWORD_PROPERTY, AWS_ROLE_ARN_PROPERTY, AWS_REGION_PROPERTY);
        Boolean missingProperty = false;
        StringBuilder errorMessage = new StringBuilder();

        for (String property : requiredProperties)
        {
            if (propertiesHelper.isBlankOrNull(property))
            {
                missingProperty = true;
                errorMessage.append(property);
                errorMessage.append('\n');
            }
        }

        if (messageFlag)
        {
            if (propertiesHelper.isBlankOrNull(AWS_SQS_QUEUE_URL_PROPERTY))
            {
                missingProperty = true;
                errorMessage.append(AWS_SQS_QUEUE_URL_PROPERTY);
                errorMessage.append('\n');
            }
        }
        else
        {
            requiredProperties = Arrays.asList(NAMESPACE_PROPERTY, BUSINESS_OBJECT_DEFINITION_NAME_PROPERTY, BUSINESS_OBJECT_FORMAT_USAGE_PROPERTY,
                BUSINESS_OBJECT_FORMAT_FILE_TYPE_PROPERTY, PRIMARY_PARTITION_VALUE_PROPERTY);

            for (String property : requiredProperties)
            {
                if (propertiesHelper.isBlankOrNull(property))
                {
                    missingProperty = true;
                    errorMessage.append(property);
                    errorMessage.append('\n');
                }
            }
        }

        if (missingProperty)
        {
            throw new ApiException("The following properties are missing. Please double check case and spelling:\n" + errorMessage.toString());
        }
    }

}