Skip to content

Commit

Permalink
Updated opensearch-php to reflect the latest OpenSearch API spec (202…
Browse files Browse the repository at this point in the history
…4-11-13)

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
dblock authored Nov 13, 2024
1 parent add2d03 commit 2662e35
Show file tree
Hide file tree
Showing 247 changed files with 1,546 additions and 1,219 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Fixed
- Fixed PHP 8.4 deprecations
### Updated APIs
- Updated opensearch-php APIs to reflect [opensearch-api-specification@fce5721](https://github.com/opensearch-project/opensearch-api-specification/commit/fce5721d72c946a7bf642a507ad1394984048039)
- Updated opensearch-php APIs to reflect [opensearch-api-specification@07e329e](https://github.com/opensearch-project/opensearch-api-specification/commit/07e329e8d01fd0576de6a0a3c35412fd5a9163db)
- Updated opensearch-php APIs to reflect [opensearch-api-specification@1db1840](https://github.com/opensearch-project/opensearch-api-specification/commit/1db184063a463c5180a2cc824b1efc1aeebfd5eb)
- Updated opensearch-php APIs to reflect [opensearch-api-specification@cb320b5](https://github.com/opensearch-project/opensearch-api-specification/commit/cb320b5482551c4f28afa26ff0d1653332699722)
Expand Down
266 changes: 140 additions & 126 deletions src/OpenSearch/Client.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/AsynchronousSearch/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function getMethod(): string
return 'POST';
}

public function setBody($body): Search
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
3 changes: 2 additions & 1 deletion src/OpenSearch/Endpoints/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getMethod(): string
return 'POST';
}

public function setBody($body): Bulk
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -89,4 +89,5 @@ public function setBody($body): Bulk
}
return $this;
}

}
3 changes: 2 additions & 1 deletion src/OpenSearch/Endpoints/BulkStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getMethod(): string
return 'PUT';
}

public function setBody($body): BulkStream
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -85,4 +85,5 @@ public function setBody($body): BulkStream
}
return $this;
}

}
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getMethod(): string
return 'GET';
}

public function setName($name): Aliases
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/Allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getMethod(): string
return 'GET';
}

public function setNodeId($node_id): Allocation
public function setNodeId($node_id): static
{
if (isset($node_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/Fielddata.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getMethod(): string
return 'GET';
}

public function setFields($fields): Fielddata
public function setFields($fields): static
{
if (isset($fields) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/PitSegments.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getMethod(): string
return 'GET';
}

public function setBody($body): PitSegments
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/Snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getMethod(): string
return 'GET';
}

public function setRepository($repository): Snapshots
public function setRepository($repository): static
{
if (isset($repository) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getMethod(): string
return 'GET';
}

public function setName($name): Templates
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cat/ThreadPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getMethod(): string
return 'GET';
}

public function setThreadPoolPatterns($thread_pool_patterns): ThreadPool
public function setThreadPoolPatterns($thread_pool_patterns): static
{
if (isset($thread_pool_patterns) !== true) {
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Endpoints/ClearScroll.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setBody($body): ClearScroll
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -69,7 +69,7 @@ public function setBody($body): ClearScroll
return $this;
}

public function setScrollId($scroll_id): ClearScroll
public function setScrollId($scroll_id): static
{
if (isset($scroll_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/AllocationExplain.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getMethod(): string
return isset($this->body) ? 'POST' : 'GET';
}

public function setBody($body): AllocationExplain
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setName($name): DeleteComponentTemplate
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setBody($body): DeleteWeightedRouting
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getMethod(): string
return 'HEAD';
}

public function setName($name): ExistsComponentTemplate
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getMethod(): string
return 'GET';
}

public function setName($name): GetComponentTemplate
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getMethod(): string
return 'GET';
}

public function setAwarenessAttributeName($awareness_attribute_name): GetDecommissionAwareness
public function setAwarenessAttributeName($awareness_attribute_name): static
{
if (isset($awareness_attribute_name) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getMethod(): string
return 'GET';
}

public function setAttribute($attribute): GetWeightedRouting
public function setAttribute($attribute): static
{
if (isset($attribute) !== true) {
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getMethod(): string
return 'PUT';
}

public function setBody($body): PutComponentTemplate
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -70,7 +70,7 @@ public function setBody($body): PutComponentTemplate
return $this;
}

public function setName($name): PutComponentTemplate
public function setName($name): static
{
if (isset($name) !== true) {
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getMethod(): string
return 'PUT';
}

public function setAwarenessAttributeName($awareness_attribute_name): PutDecommissionAwareness
public function setAwarenessAttributeName($awareness_attribute_name): static
{
if (isset($awareness_attribute_name) !== true) {
return $this;
Expand All @@ -62,7 +62,7 @@ public function setAwarenessAttributeName($awareness_attribute_name): PutDecommi
return $this;
}

public function setAwarenessAttributeValue($awareness_attribute_value): PutDecommissionAwareness
public function setAwarenessAttributeValue($awareness_attribute_value): static
{
if (isset($awareness_attribute_value) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/PutSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getMethod(): string
return 'PUT';
}

public function setBody($body): PutSettings
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getMethod(): string
return 'PUT';
}

public function setBody($body): PutWeightedRouting
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -60,7 +60,7 @@ public function setBody($body): PutWeightedRouting
return $this;
}

public function setAttribute($attribute): PutWeightedRouting
public function setAttribute($attribute): static
{
if (isset($attribute) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/Reroute.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getMethod(): string
return 'POST';
}

public function setBody($body): Reroute
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getMethod(): string
return 'GET';
}

public function setMetric($metric): State
public function setMetric($metric): static
{
if (isset($metric) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Cluster/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getMethod(): string
return 'GET';
}

public function setNodeId($node_id): Stats
public function setNodeId($node_id): static
{
if (isset($node_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getMethod(): string
return isset($this->body) ? 'POST' : 'GET';
}

public function setBody($body): Count
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getMethod(): string
return 'PUT';
}

public function setBody($body): Create
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setIndexUuid($index_uuid): DeleteDanglingIndex
public function setIndexUuid($index_uuid): static
{
if (isset($index_uuid) !== true) {
return $this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getMethod(): string
return 'POST';
}

public function setIndexUuid($index_uuid): ImportDanglingIndex
public function setIndexUuid($index_uuid): static
{
if (isset($index_uuid) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/DeleteByQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getMethod(): string
return 'POST';
}

public function setBody($body): DeleteByQuery
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getMethod(): string
return 'POST';
}

public function setTaskId($task_id): DeleteByQueryRethrottle
public function setTaskId($task_id): static
{
if (isset($task_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/DeletePit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setBody($body): DeletePit
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/Explain.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getMethod(): string
return isset($this->body) ? 'POST' : 'GET';
}

public function setBody($body): Explain
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/FieldCaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getMethod(): string
return isset($this->body) ? 'POST' : 'GET';
}

public function setBody($body): FieldCaps
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/FlowFramework/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getMethod(): string
return 'POST';
}

public function setBody($body): Create
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/FlowFramework/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getMethod(): string
return 'DELETE';
}

public function setWorkflowId($workflow_id): Delete
public function setWorkflowId($workflow_id): static
{
if (isset($workflow_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/FlowFramework/Deprovision.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getMethod(): string
return 'POST';
}

public function setWorkflowId($workflow_id): Deprovision
public function setWorkflowId($workflow_id): static
{
if (isset($workflow_id) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch/Endpoints/FlowFramework/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getMethod(): string
return 'GET';
}

public function setWorkflowId($workflow_id): Get
public function setWorkflowId($workflow_id): static
{
if (isset($workflow_id) !== true) {
return $this;
Expand Down
Loading

0 comments on commit 2662e35

Please sign in to comment.