1<?php
2
3namespace Elastica\Bulk;
4
5use Elastica\Response as BaseResponse;
6
7class Response extends BaseResponse
8{
9    /**
10     * @var \Elastica\Bulk\Action
11     */
12    protected $_action;
13
14    /**
15     * @var string
16     */
17    protected $_opType;
18
19    /**
20     * @param array|string $responseData
21     * @param Action       $action
22     * @param string       $opType
23     */
24    public function __construct($responseData, Action $action, string $opType)
25    {
26        parent::__construct($responseData);
27
28        $this->_action = $action;
29        $this->_opType = $opType;
30    }
31
32    /**
33     * @return Action
34     */
35    public function getAction(): Action
36    {
37        return $this->_action;
38    }
39
40    /**
41     * @return string
42     */
43    public function getOpType(): string
44    {
45        return $this->_opType;
46    }
47}
48