Skip to content

Commit

Permalink
Generated Endpoints Using OpenSearch API Specifications (#203)
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi authored Jun 20, 2024
1 parent ac5ec1a commit debd022
Show file tree
Hide file tree
Showing 87 changed files with 805 additions and 142 deletions.
11 changes: 9 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Aliases extends AbstractEndpoint
{
protected $name;

public function getURI(): string
{
$name = $this->name ?? null;

if (isset($name)) {
return "/_cat/aliases/$name";
}
Expand All @@ -46,7 +48,12 @@ public function getParamWhitelist(): array
'help',
's',
'v',
'expand_wildcards'
'expand_wildcards',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
11 changes: 9 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Allocation extends AbstractEndpoint
{
protected $node_id;

public function getURI(): string
{
$node_id = $this->node_id ?? null;

if (isset($node_id)) {
return "/_cat/allocation/$node_id";
}
Expand All @@ -44,11 +46,16 @@ public function getParamWhitelist(): array
'bytes',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
11 changes: 9 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Count extends AbstractEndpoint
{
public function getURI(): string
{
$index = $this->index ?? null;

if (isset($index)) {
return "/_cat/count/$index";
}
Expand All @@ -42,7 +44,12 @@ public function getParamWhitelist(): array
'h',
'help',
's',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
11 changes: 9 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Fielddata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Fielddata extends AbstractEndpoint
{
protected $fields;

public function getURI(): string
{
$fields = $this->fields ?? null;

if (isset($fields)) {
return "/_cat/fielddata/$fields";
}
Expand All @@ -46,7 +48,12 @@ public function getParamWhitelist(): array
'help',
's',
'v',
'fields'
'fields',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
10 changes: 9 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Health extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -39,7 +42,12 @@ public function getParamWhitelist(): array
's',
'time',
'ts',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
10 changes: 9 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Help extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -34,7 +37,12 @@ public function getParamWhitelist(): array
{
return [
'help',
's'
's',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
12 changes: 10 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Indices.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Indices extends AbstractEndpoint
{
public function getURI(): string
{
$index = $this->index ?? null;

if (isset($index)) {
return "/_cat/indices/$index";
}
Expand All @@ -42,6 +44,7 @@ public function getParamWhitelist(): array
'bytes',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'health',
'help',
Expand All @@ -51,14 +54,19 @@ public function getParamWhitelist(): array
'v',
'include_unloaded_segments',
'expand_wildcards',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

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

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 10 additions & 1 deletion src/OpenSearch/Endpoints/Cat/NodeAttrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class NodeAttrs extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -36,18 +39,24 @@ public function getParamWhitelist(): array
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

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

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 10 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Nodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Nodes extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -38,19 +41,25 @@ public function getParamWhitelist(): array
'full_id',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'time',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

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

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 10 additions & 1 deletion src/OpenSearch/Endpoints/Cat/PendingTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class PendingTasks extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -36,19 +39,25 @@ public function getParamWhitelist(): array
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'time',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

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

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 10 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Plugins extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -36,18 +39,24 @@ public function getParamWhitelist(): array
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

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

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 9 additions & 2 deletions src/OpenSearch/Endpoints/Cat/Recovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* NOTE: This file is autogenerated using util/GenerateEndpoints.php
*/
class Recovery extends AbstractEndpoint
{
public function getURI(): string
{
$index = $this->index ?? null;

if (isset($index)) {
return "/_cat/recovery/$index";
}
Expand All @@ -47,7 +49,12 @@ public function getParamWhitelist(): array
'index',
's',
'time',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
Loading

0 comments on commit debd022

Please sign in to comment.