index ?? null; if (isset($index)) { return "/$index/_eql/search"; } throw new RuntimeException('Missing parameter for the endpoint eql.search'); } public function getParamWhitelist(): array { return [ 'wait_for_completion_timeout', 'keep_on_completion', 'keep_alive' ]; } public function getMethod(): string { return isset($this->body) ? 'POST' : 'GET'; } public function setBody($body): Search { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } }