@Override
    Map<String, Object> constructRequestArgs() {
        Map<String, Object> queryArgs = new HashMap<String, Object>();

        if (eventCollection != null) {
            queryArgs.put(KeenQueryConstants.EVENT_COLLECTION, eventCollection);
        }

        if (interval != null) {
            queryArgs.put(KeenQueryConstants.INTERVAL, interval);
        }

        // This will be overwritten by the timeframe if provided. Timezone is only applicable for
        // a relative timeframe, and so this property will go away in the future.
        if (timezone != null) {
            queryArgs.put(KeenQueryConstants.TIMEZONE, timezone);
        }

        if (groupBy != null) {
            queryArgs.put(KeenQueryConstants.GROUP_BY, groupBy);
        }

        if (maxAge != null) {
            queryArgs.put(KeenQueryConstants.MAX_AGE, maxAge);
        }

        if (targetProperty != null) {
            queryArgs.put(KeenQueryConstants.TARGET_PROPERTY, targetProperty);
        }

        if (percentile != null) {
            queryArgs.put(KeenQueryConstants.PERCENTILE, percentile);
        }

        if (filters != null) {
            queryArgs.put(KeenQueryConstants.FILTERS, filters.constructParameterRequestArgs());
        }

        if (timeframe != null) {
            queryArgs.putAll(timeframe.constructTimeframeArgs());
        }

        return queryArgs;
    }
@ Override Map < String , Object > constructRequestArgs ( ) { Map < String , Object > queryArgs = new HashMap < String , Object > ( ) ; if ( eventCollection != null ) { queryArgs . put ( KeenQueryConstants . EVENT_COLLECTION , eventCollection ) ; } if ( interval != null ) { queryArgs . put ( KeenQueryConstants . INTERVAL , interval ) ; } if ( timezone != null ) { queryArgs . put ( KeenQueryConstants . TIMEZONE , timezone ) ; } if ( groupBy != null ) { queryArgs . put ( KeenQueryConstants . GROUP_BY , groupBy ) ; } if ( maxAge != null ) { queryArgs . put ( KeenQueryConstants . MAX_AGE , maxAge ) ; } if ( targetProperty != null ) { queryArgs . put ( KeenQueryConstants . TARGET_PROPERTY , targetProperty ) ; } if ( percentile != null ) { queryArgs . put ( KeenQueryConstants . PERCENTILE , percentile ) ; } if ( filters != null ) { queryArgs . put ( KeenQueryConstants . FILTERS , filters . constructParameterRequestArgs ( ) ) ; } if ( timeframe != null ) { queryArgs . putAll ( timeframe . constructTimeframeArgs ( ) ) ; } return queryArgs ; }
Constructs the map to pass to the JSON handler, so that the proper required
and optional Query arguments can be sent out to the server.

@return The JSON object map.