AllocationExplain.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace Elasticsearch\Endpoints\Cluster;
  3. use Elasticsearch\Endpoints\AbstractEndpoint;
  4. /**
  5. * Class AllocationExplain
  6. *
  7. * @category Elasticsearch
  8. * @package Elasticsearch\Endpoints\Cluster
  9. * @author Zachary Tong <zach@elastic.co>
  10. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  11. * @link http://elastic.co
  12. */
  13. class AllocationExplain extends AbstractEndpoint
  14. {
  15. /**
  16. * @param array $body
  17. *
  18. * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException
  19. * @return $this
  20. */
  21. public function setBody($body)
  22. {
  23. if (isset($body) !== true) {
  24. return $this;
  25. }
  26. $this->body = $body;
  27. return $this;
  28. }
  29. /**
  30. * @return string
  31. */
  32. public function getURI()
  33. {
  34. return "/_cluster/allocation/explain";
  35. }
  36. /**
  37. * @return string[]
  38. */
  39. public function getParamWhitelist()
  40. {
  41. return array(
  42. 'include_yes_decisions',
  43. 'include_disk_info',
  44. );
  45. }
  46. /**
  47. * @return string
  48. */
  49. public function getMethod()
  50. {
  51. return 'GET';
  52. }
  53. }