Total Complexity | 5 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace Nord\Lumen\Elasticsearch\Documents\Bulk; |
||
3 | class BulkAction |
||
4 | { |
||
5 | public const ACTION_INDEX = 'index'; |
||
6 | |||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $action; |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $metadata; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private $body; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | public function getAction() |
||
29 | } |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param string $action |
||
34 | * @param array $metadata |
||
35 | * @return BulkAction |
||
36 | */ |
||
37 | public function setAction($action, array $metadata) |
||
38 | { |
||
39 | $this->action = $action; |
||
40 | $this->metadata = $metadata; |
||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | |||
45 | /** |
||
46 | * @return array |
||
47 | */ |
||
48 | public function getMetadata() |
||
49 | { |
||
50 | return $this->metadata; |
||
51 | } |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getBody() |
||
58 | { |
||
59 | return $this->body; |
||
60 | } |
||
61 | |||
62 | |||
63 | /** |
||
64 | * @param array $body |
||
65 | * @return BulkAction |
||
66 | */ |
||
67 | public function setBody(array $body) |
||
71 | } |
||
72 | } |
||
73 |