def _from_dict(cls, _dict):
        """Initialize a AggregationResult object from a json dictionary."""
        args = {}
        if 'key' in _dict:
            args['key'] = _dict.get('key')
        if 'matching_results' in _dict:
            args['matching_results'] = _dict.get('matching_results')
        if 'aggregations' in _dict:
            args['aggregations'] = [
                QueryAggregation._from_dict(x)
                for x in (_dict.get('aggregations'))
            ]
        return cls(**args)
def _from_dict ( cls , _dict ) : args = { } if 'key' in _dict : args [ 'key' ] = _dict . get ( 'key' ) if 'matching_results' in _dict : args [ 'matching_results' ] = _dict . get ( 'matching_results' ) if 'aggregations' in _dict : args [ 'aggregations' ] = [ QueryAggregation . _from_dict ( x ) for x in ( _dict . get ( 'aggregations' ) ) ] return cls ( ** args )
Initialize a AggregationResult object from a json dictionary.