-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kim Pepper <[email protected]>
- Loading branch information
Showing
44 changed files
with
1,300 additions
and
436 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,87 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
namespace OpenSearch\Endpoints\Ml; | ||
|
||
use OpenSearch\Common\Exceptions\RuntimeException; | ||
use OpenSearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* NOTE: This file is autogenerated using util/GenerateEndpoints.php | ||
*/ | ||
/** | ||
* @deprecated Use `upload_chunk` instead. | ||
*/ | ||
class ChunkModel extends AbstractEndpoint | ||
{ | ||
protected $chunk_number; | ||
protected $model_id; | ||
|
||
public function getURI(): string | ||
{ | ||
$chunk_number = $this->chunk_number ?? null; | ||
$model_id = $this->model_id ?? null; | ||
if (isset($model_id) && isset($chunk_number)) { | ||
return "/_plugins/_ml/models/$model_id/chunk/$chunk_number"; | ||
} | ||
throw new RuntimeException('Missing parameter for the endpoint ml.chunk_model'); | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return [ | ||
'pretty', | ||
'human', | ||
'error_trace', | ||
'source', | ||
'filter_path' | ||
]; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'POST'; | ||
} | ||
|
||
public function setBody($body): static | ||
{ | ||
if (is_null($body)) { | ||
return $this; | ||
} | ||
$this->body = $body; | ||
|
||
return $this; | ||
} | ||
|
||
public function setChunkNumber($chunk_number): static | ||
{ | ||
if (is_null($chunk_number)) { | ||
return $this; | ||
} | ||
$this->chunk_number = $chunk_number; | ||
|
||
return $this; | ||
} | ||
|
||
public function setModelId($model_id): static | ||
{ | ||
if (is_null($model_id)) { | ||
return $this; | ||
} | ||
$this->model_id = $model_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,58 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
namespace OpenSearch\Endpoints\Ml; | ||
|
||
use OpenSearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* NOTE: This file is autogenerated using util/GenerateEndpoints.php | ||
*/ | ||
/** | ||
* @deprecated Use `_register_meta` instead. | ||
*/ | ||
class CreateModelMeta extends AbstractEndpoint | ||
{ | ||
public function getURI(): string | ||
{ | ||
return "/_plugins/_ml/models/meta"; | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return [ | ||
'pretty', | ||
'human', | ||
'error_trace', | ||
'source', | ||
'filter_path' | ||
]; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'POST'; | ||
} | ||
|
||
public function setBody($body): static | ||
{ | ||
if (is_null($body)) { | ||
return $this; | ||
} | ||
$this->body = $body; | ||
|
||
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
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,65 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
namespace OpenSearch\Endpoints\Ml; | ||
|
||
use OpenSearch\Common\Exceptions\RuntimeException; | ||
use OpenSearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* NOTE: This file is autogenerated using util/GenerateEndpoints.php | ||
*/ | ||
/** | ||
* @deprecated Use `deploy_model` instead. | ||
*/ | ||
class LoadModel extends AbstractEndpoint | ||
{ | ||
protected $model_id; | ||
|
||
public function getURI(): string | ||
{ | ||
$model_id = $this->model_id ?? null; | ||
if (isset($model_id)) { | ||
return "/_plugins/_ml/models/$model_id/_load"; | ||
} | ||
throw new RuntimeException('Missing parameter for the endpoint ml.load_model'); | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return [ | ||
'pretty', | ||
'human', | ||
'error_trace', | ||
'source', | ||
'filter_path' | ||
]; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'POST'; | ||
} | ||
|
||
public function setModelId($model_id): static | ||
{ | ||
if (is_null($model_id)) { | ||
return $this; | ||
} | ||
$this->model_id = $model_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,72 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
namespace OpenSearch\Endpoints\Ml; | ||
|
||
use OpenSearch\Common\Exceptions\RuntimeException; | ||
use OpenSearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* NOTE: This file is autogenerated using util/GenerateEndpoints.php | ||
*/ | ||
class PredictModel extends AbstractEndpoint | ||
{ | ||
protected $model_id; | ||
|
||
public function getURI(): string | ||
{ | ||
$model_id = $this->model_id ?? null; | ||
if (isset($model_id)) { | ||
return "/_plugins/_ml/models/$model_id/_predict"; | ||
} | ||
throw new RuntimeException('Missing parameter for the endpoint ml.predict_model'); | ||
} | ||
|
||
public function getParamWhitelist(): array | ||
{ | ||
return [ | ||
'pretty', | ||
'human', | ||
'error_trace', | ||
'source', | ||
'filter_path' | ||
]; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'POST'; | ||
} | ||
|
||
public function setBody($body): static | ||
{ | ||
if (is_null($body)) { | ||
return $this; | ||
} | ||
$this->body = $body; | ||
|
||
return $this; | ||
} | ||
|
||
public function setModelId($model_id): static | ||
{ | ||
if (is_null($model_id)) { | ||
return $this; | ||
} | ||
$this->model_id = $model_id; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.