public Properties toProperties() {
        Properties ret = new Properties();

        if (applicationUri != null) {
            ret.setProperty(APPLICATION_URI, applicationUri);
        }

        if (applicationTarget != null) {
            ret.setProperty(APPLICATION_TARGET, applicationTarget);
        }

        StringBuilder uris = new StringBuilder();
        for (String apiEndpointUri : apiEndpointUris) {
            if (uris.length() > 0) {
                uris.append('\n');
            }

            uris.append(apiEndpointUri);
        }
        ret.setProperty(API_ENDPOINT_URIS, uris.toString());

        ret.setProperty(API_SSL_CN_CHECK, String.valueOf(apiSslCnCheck));
        ret.setProperty(API_CONNECT_TIMEOUT, String.valueOf(apiConnectTimeout));
        ret.setProperty(API_SOCKET_TIMEOUT, String.valueOf(apiSocketTimeout));
        ret.setProperty(API_MAX_CONNECTIONS, String.valueOf(apiMaxConnections));

        ret.setProperty(SHOW_ACTIVITY_TYPES, String.valueOf(showActivityType));
        ret.setProperty(DEFAULT_NUMBER_OF_EVENTS, String.valueOf(defaultNumberOfEvents));

        if (apiKey != null) {
            ret.setProperty(API_KEY, apiKey);
        }

        ret.setProperty(MAX_NUMBER_OF_EVENTS, String.valueOf(maxNumberOfEvents));

        if (usernameDomainPrefix != null) {
            ret.setProperty(USERNAME_DOMAIN_PREFIX, usernameDomainPrefix);
        }

        if (usernamePostfix != null) {
            ret.setProperty(USERNAME_POSTFIX, usernamePostfix);
        }

        if (!timetableTypes.isEmpty()) {
            ret.setProperty(TIMETABLE_TYPES, Joiner.on(';').skipNulls().join(timetableTypes));
        }

        if (unknownLocationDescription != null) {
            ret.setProperty(UNKNOWN_LOCATION_DESCRIPTION, unknownLocationDescription);
        }

        return ret;
    }