1<?php 2 3declare(strict_types = 1); 4 5namespace Elasticsearch\Endpoints\Cat; 6 7use Elasticsearch\Endpoints\AbstractEndpoint; 8 9/** 10 * Class Recovery 11 * 12 * @category Elasticsearch 13 * @package Elasticsearch\Endpoints\Cat 14 * @author Zachary Tong <zach@elastic.co> 15 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 16 * @link http://elastic.co 17 */ 18class Recovery extends AbstractEndpoint 19{ 20 public function getURI(): string 21 { 22 $index = $this->index ?? null; 23 24 if (isset($index)) { 25 return "/_cat/recovery/$index"; 26 } 27 28 return "/_cat/recovery"; 29 } 30 31 public function getParamWhitelist(): array 32 { 33 return [ 34 'format', 35 'bytes', 36 'local', 37 'master_timeout', 38 'h', 39 'help', 40 's', 41 'v' 42 ]; 43 } 44 45 public function getMethod(): string 46 { 47 return 'GET'; 48 } 49} 50