Skip to content

Commit

Permalink
Generated Ml Namespace Endpoints Using OpenSearch API Specifications (#…
Browse files Browse the repository at this point in the history
…214)

* Generated Ml Namespace Endpoints Using OpenSearch API Specifications

Signed-off-by: saimedhi <[email protected]>

* Generated Ml Namespace Endpoints Using OpenSearch API Specifications

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi authored Jul 15, 2024
1 parent 1131d3f commit 11b123e
Show file tree
Hide file tree
Showing 51 changed files with 1,065 additions and 519 deletions.
70 changes: 37 additions & 33 deletions src/OpenSearch/Client.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/OpenSearch/Endpoints/Indices/ClearCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getParamWhitelist(): array
'expand_wildcards',
'fielddata',
'fields',
'file',
'ignore_unavailable',
'index',
'query',
Expand Down
1 change: 1 addition & 0 deletions src/OpenSearch/Endpoints/Indices/GetMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getParamWhitelist(): array
'cluster_manager_timeout',
'expand_wildcards',
'ignore_unavailable',
'index',
'local',
'master_timeout',
'pretty',
Expand Down

This file was deleted.

This file was deleted.

51 changes: 0 additions & 51 deletions src/OpenSearch/Endpoints/MachineLearning/Models/DeleteModel.php

This file was deleted.

43 changes: 0 additions & 43 deletions src/OpenSearch/Endpoints/MachineLearning/Models/GetModels.php

This file was deleted.

43 changes: 0 additions & 43 deletions src/OpenSearch/Endpoints/MachineLearning/Models/RegisterModel.php

This file was deleted.

51 changes: 0 additions & 51 deletions src/OpenSearch/Endpoints/MachineLearning/Tasks/GetTask.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* compatible open source license.
*/

namespace OpenSearch\Endpoints\MachineLearning\Connectors;
namespace OpenSearch\Endpoints\Ml;

use OpenSearch\Endpoints\AbstractEndpoint;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* compatible open source license.
*/

namespace OpenSearch\Endpoints\MachineLearning\Connectors;
namespace OpenSearch\Endpoints\Ml;

use OpenSearch\Common\Exceptions\RuntimeException;
use OpenSearch\Endpoints\AbstractEndpoint;
Expand Down
50 changes: 50 additions & 0 deletions src/OpenSearch/Endpoints/Ml/DeleteModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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 DeleteModel extends AbstractEndpoint
{
public function getURI(): string
{
$id = $this->id ?? null;
if (isset($id)) {
return "/_plugins/_ml/models/$id";
}
throw new RuntimeException('Missing parameter for the endpoint ml.delete_model');
}

public function getParamWhitelist(): array
{
return [
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'DELETE';
}
}
Loading

0 comments on commit 11b123e

Please sign in to comment.