Skip to content

Commit 6eddbf6

Browse files
committed
Generated Endpoints Using OpenSearch API Specifications
Signed-off-by: saimedhi <[email protected]>
1 parent 3ae14bd commit 6eddbf6

File tree

334 files changed

+11807
-5755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+11807
-5755
lines changed

src/OpenSearch/Client.php

Lines changed: 823 additions & 500 deletions
Large diffs are not rendered by default.

src/OpenSearch/Endpoints/AsyncSearch/Delete.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/OpenSearch/Endpoints/AsyncSearch/Get.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/OpenSearch/Endpoints/Bulk.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ public function getParamWhitelist(): array
5454
'_source_excludes',
5555
'_source_includes',
5656
'pipeline',
57-
'require_alias'
57+
'require_alias',
58+
'pretty',
59+
'human',
60+
'error_trace',
61+
'source',
62+
'filter_path'
5863
];
5964
}
6065

src/OpenSearch/Endpoints/Cat/Aliases.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public function getParamWhitelist(): array
4646
'help',
4747
's',
4848
'v',
49-
'expand_wildcards'
49+
'expand_wildcards',
50+
'pretty',
51+
'human',
52+
'error_trace',
53+
'source',
54+
'filter_path'
5055
];
5156
}
5257

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* SPDX-License-Identifier: Apache-2.0
7+
*
8+
* The OpenSearch Contributors require contributions made to
9+
* this file be licensed under the Apache-2.0 license or a
10+
* compatible open source license.
11+
*
12+
* Modifications Copyright OpenSearch Contributors. See
13+
* GitHub history for details.
14+
*/
15+
16+
namespace OpenSearch\Endpoints\Cat;
17+
18+
use OpenSearch\Endpoints\AbstractEndpoint;
19+
20+
class AllPitSegments extends AbstractEndpoint
21+
{
22+
public function getURI(): string
23+
{
24+
return "/_cat/pit_segments/_all";
25+
}
26+
27+
public function getParamWhitelist(): array
28+
{
29+
return [
30+
'format',
31+
'h',
32+
'help',
33+
's',
34+
'v',
35+
'bytes',
36+
'pretty',
37+
'human',
38+
'error_trace',
39+
'source',
40+
'filter_path'
41+
];
42+
}
43+
44+
public function getMethod(): string
45+
{
46+
return 'GET';
47+
}
48+
}

src/OpenSearch/Endpoints/Cat/Allocation.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,16 @@ public function getParamWhitelist(): array
4444
'bytes',
4545
'local',
4646
'master_timeout',
47+
'cluster_manager_timeout',
4748
'h',
4849
'help',
4950
's',
5051
'v',
51-
'cluster_manager_timeout'
52+
'pretty',
53+
'human',
54+
'error_trace',
55+
'source',
56+
'filter_path'
5257
];
5358
}
5459

src/OpenSearch/Endpoints/Cat/ClusterManager.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,27 @@ public function getParamWhitelist(): array
3535
return [
3636
'format',
3737
'local',
38+
'master_timeout',
3839
'cluster_manager_timeout',
3940
'h',
4041
'help',
4142
's',
42-
'v'
43+
'v',
44+
'pretty',
45+
'human',
46+
'error_trace',
47+
'source',
48+
'filter_path'
4349
];
4450
}
4551

4652
public function getMethod(): string
4753
{
4854
return 'GET';
4955
}
56+
57+
protected function getParamDeprecation(): array
58+
{
59+
return ['master_timeout' => 'cluster_manager_timeout'];
60+
}
5061
}

src/OpenSearch/Endpoints/Cat/Count.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ public function getParamWhitelist(): array
4242
'h',
4343
'help',
4444
's',
45-
'v'
45+
'v',
46+
'pretty',
47+
'human',
48+
'error_trace',
49+
'source',
50+
'filter_path'
4651
];
4752
}
4853

src/OpenSearch/Endpoints/Cat/Fielddata.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public function getParamWhitelist(): array
4646
'help',
4747
's',
4848
'v',
49-
'fields'
49+
'fields',
50+
'pretty',
51+
'human',
52+
'error_trace',
53+
'source',
54+
'filter_path'
5055
];
5156
}
5257

src/OpenSearch/Endpoints/Cat/Health.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ public function getParamWhitelist(): array
3939
's',
4040
'time',
4141
'ts',
42-
'v'
42+
'v',
43+
'pretty',
44+
'human',
45+
'error_trace',
46+
'source',
47+
'filter_path'
4348
];
4449
}
4550

src/OpenSearch/Endpoints/Cat/Help.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ public function getParamWhitelist(): array
3434
{
3535
return [
3636
'help',
37-
's'
37+
's',
38+
'pretty',
39+
'human',
40+
'error_trace',
41+
'source',
42+
'filter_path'
3843
];
3944
}
4045

src/OpenSearch/Endpoints/Cat/Indices.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function getParamWhitelist(): array
4242
'bytes',
4343
'local',
4444
'master_timeout',
45+
'cluster_manager_timeout',
4546
'h',
4647
'health',
4748
'help',
@@ -51,14 +52,19 @@ public function getParamWhitelist(): array
5152
'v',
5253
'include_unloaded_segments',
5354
'expand_wildcards',
54-
'cluster_manager_timeout'
55+
'pretty',
56+
'human',
57+
'error_trace',
58+
'source',
59+
'filter_path'
5560
];
5661
}
5762

5863
public function getMethod(): string
5964
{
6065
return 'GET';
6166
}
67+
6268
protected function getParamDeprecation(): array
6369
{
6470
return ['master_timeout' => 'cluster_manager_timeout'];

src/OpenSearch/Endpoints/Cat/Master.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323

2424
use OpenSearch\Endpoints\AbstractEndpoint;
2525

26-
/**
27-
* @deprecated use \OpenSearch\Endpoints\Cat\ClusterManager instead
28-
*/
2926
class Master extends AbstractEndpoint
3027
{
3128
public function getURI(): string
@@ -39,18 +36,24 @@ public function getParamWhitelist(): array
3936
'format',
4037
'local',
4138
'master_timeout',
39+
'cluster_manager_timeout',
4240
'h',
4341
'help',
4442
's',
4543
'v',
46-
'cluster_manager_timeout'
44+
'pretty',
45+
'human',
46+
'error_trace',
47+
'source',
48+
'filter_path'
4749
];
4850
}
4951

5052
public function getMethod(): string
5153
{
5254
return 'GET';
5355
}
56+
5457
protected function getParamDeprecation(): array
5558
{
5659
return ['master_timeout' => 'cluster_manager_timeout'];

src/OpenSearch/Endpoints/Cat/NodeAttrs.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,24 @@ public function getParamWhitelist(): array
3636
'format',
3737
'local',
3838
'master_timeout',
39+
'cluster_manager_timeout',
3940
'h',
4041
'help',
4142
's',
4243
'v',
43-
'cluster_manager_timeout'
44+
'pretty',
45+
'human',
46+
'error_trace',
47+
'source',
48+
'filter_path'
4449
];
4550
}
4651

4752
public function getMethod(): string
4853
{
4954
return 'GET';
5055
}
56+
5157
protected function getParamDeprecation(): array
5258
{
5359
return ['master_timeout' => 'cluster_manager_timeout'];

src/OpenSearch/Endpoints/Cat/Nodes.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,25 @@ public function getParamWhitelist(): array
3838
'full_id',
3939
'local',
4040
'master_timeout',
41+
'cluster_manager_timeout',
4142
'h',
4243
'help',
4344
's',
4445
'time',
4546
'v',
46-
'cluster_manager_timeout'
47+
'pretty',
48+
'human',
49+
'error_trace',
50+
'source',
51+
'filter_path'
4752
];
4853
}
4954

5055
public function getMethod(): string
5156
{
5257
return 'GET';
5358
}
59+
5460
protected function getParamDeprecation(): array
5561
{
5662
return ['master_timeout' => 'cluster_manager_timeout'];

0 commit comments

Comments
 (0)