Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Ml Namespace Endpoints Using OpenSearch API Specifications #214

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

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
Loading