<?php
namespace Magento\Elasticsearch\SearchAdapter\Query\Builder\Aggregation;

/**
 * Interceptor class for @see \Magento\Elasticsearch\SearchAdapter\Query\Builder\Aggregation
 */
class Interceptor extends \Magento\Elasticsearch\SearchAdapter\Query\Builder\Aggregation implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

    public function __construct(\Magento\Elasticsearch\Model\Adapter\FieldMapperInterface $fieldMapper)
    {
        $this->___init();
        parent::__construct($fieldMapper);
    }

    /**
     * {@inheritdoc}
     */
    public function build(\Magento\Framework\Search\RequestInterface $request, array $searchQuery)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'build');
        return $pluginInfo ? $this->___callPlugins('build', func_get_args(), $pluginInfo) : parent::build($request, $searchQuery);
    }
}
