-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added XPack endpoints + fixed minor issue on endpoint generation
- Loading branch information
Showing
545 changed files
with
39,651 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace Elasticsearch\Endpoints\AsyncSearch; | ||
|
||
use Elasticsearch\Common\Exceptions\RuntimeException; | ||
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Delete | ||
* Elasticsearch API name async_search.delete | ||
* Generated running $ php util/GenerateEndpoints.php 7.7 | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\AsyncSearch | ||
* @author Enrico Zimuel <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* @link http://elastic.co | ||
*/ | ||
class Delete extends AbstractEndpoint | ||
{ | ||
|
||
public function getURI(): string | ||
{ | ||
$id = $this->id ?? null; | ||
|
||
if (isset($id)) { | ||
return "/_async_search/$id"; | ||
} | ||
throw new RuntimeException('Missing parameter for the endpoint async_search.delete'); | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return []; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'DELETE'; | ||
} | ||
|
||
public function setId($id): Delete | ||
{ | ||
if (isset($id) !== true) { | ||
return $this; | ||
} | ||
$this->id = $id; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace Elasticsearch\Endpoints\AsyncSearch; | ||
|
||
use Elasticsearch\Common\Exceptions\RuntimeException; | ||
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class Get | ||
* Elasticsearch API name async_search.get | ||
* Generated running $ php util/GenerateEndpoints.php 7.7 | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\AsyncSearch | ||
* @author Enrico Zimuel <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* @link http://elastic.co | ||
*/ | ||
class Get extends AbstractEndpoint | ||
{ | ||
|
||
public function getURI(): string | ||
{ | ||
$id = $this->id ?? null; | ||
|
||
if (isset($id)) { | ||
return "/_async_search/$id"; | ||
} | ||
throw new RuntimeException('Missing parameter for the endpoint async_search.get'); | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return [ | ||
'wait_for_completion_timeout', | ||
'keep_alive', | ||
'typed_keys' | ||
]; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'GET'; | ||
} | ||
|
||
public function setId($id): Get | ||
{ | ||
if (isset($id) !== true) { | ||
return $this; | ||
} | ||
$this->id = $id; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.