From c6e2ac34f2b04eaf1eac0640957a7d0d9b89c19d Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Fri, 8 Nov 2024 12:37:14 +0000 Subject: [PATCH] Update Summary endpoints --- CHANGELOG.md | 3 ++ README.md | 2 +- docs/Api/SummariesApi.md | 4 +- docs/Model/SummaryCreationPayload.md | 1 + docs/Model/SummarySource.md | 1 - docs/Model/SummaryUpdatePayload.md | 1 - docs/Model/VideoCreationPayload.md | 1 + docs/Model/VideoUpdatePayload.md | 1 + src/BaseClient.php | 4 +- src/Model/SummaryCreationPayload.php | 67 +++++++++++++++++++++++++--- src/Model/SummarySource.php | 31 ------------- src/Model/SummaryUpdatePayload.php | 31 ------------- src/Model/VideoCreationPayload.php | 67 +++++++++++++++++++++++++--- src/Model/VideoUpdatePayload.php | 67 +++++++++++++++++++++++++--- 14 files changed, 194 insertions(+), 87 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c6419f..0f1bbfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.4.7] - 2024-11-06 +- AI summary updates + ## [1.4.6] - 2024-11-04 - Analytics updates (ccv, views, ...) diff --git a/README.md b/README.md index bc40539..d1db230 100644 --- a/README.md +++ b/README.md @@ -383,7 +383,7 @@ $ BASE_URI="" API_KEY="..." vendor/bin/phpunit ``` -## Have you gotten use from this API client? +## Have you gotten use from this API client? Please take a moment to leave a star on the client ⭐ diff --git a/docs/Api/SummariesApi.md b/docs/Api/SummariesApi.md index 2c7aebd..19fe23a 100644 --- a/docs/Api/SummariesApi.md +++ b/docs/Api/SummariesApi.md @@ -15,7 +15,7 @@ Method | Description | HTTP request -Generate a title, abstract, and key takeaways for a video. +Generate an abstract and key takeaways for a video. ### Arguments @@ -40,7 +40,7 @@ Name | Type | Description | Notes -Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. +Update details for a summary. ### Arguments diff --git a/docs/Model/SummaryCreationPayload.md b/docs/Model/SummaryCreationPayload.md index c9e2325..5868e8d 100644 --- a/docs/Model/SummaryCreationPayload.md +++ b/docs/Model/SummaryCreationPayload.md @@ -6,5 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **videoId** | **string** | Create a summary of a video using the video ID. | **origin** | **string** | Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. If you do not set this parameter, **the API will not generate a summary automatically**. In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. | [optional] +**attributes** | **string[]** | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SummarySource.md b/docs/Model/SummarySource.md index f070e8c..f3004dc 100644 --- a/docs/Model/SummarySource.md +++ b/docs/Model/SummarySource.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | A video title, based on the contents of the video. | [optional] **abstract** | **string** | A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words. | [optional] **takeaways** | **string[]** | A list of 3 key points from the video, in chronological order. | [optional] diff --git a/docs/Model/SummaryUpdatePayload.md b/docs/Model/SummaryUpdatePayload.md index 028ae53..5e406fe 100644 --- a/docs/Model/SummaryUpdatePayload.md +++ b/docs/Model/SummaryUpdatePayload.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | A video title, based on the contents of the video. | [optional] **abstract** | **string** | A short outline of the contents of the video. | [optional] **takeaways** | **string[]** | A list of 3 key points from the video, in chronological order. | [optional] diff --git a/docs/Model/VideoCreationPayload.md b/docs/Model/VideoCreationPayload.md index b3263d0..ec0d593 100644 --- a/docs/Model/VideoCreationPayload.md +++ b/docs/Model/VideoCreationPayload.md @@ -18,5 +18,6 @@ Name | Type | Description | Notes **language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] **transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] **transcriptSummary** | **bool** | Use this parameter to enable summarization. We recommend using this parameter together with `transcript: true`. - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional] +**transcriptSummaryAttributes** | **string[]** | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VideoUpdatePayload.md b/docs/Model/VideoUpdatePayload.md index e23682d..3e55d5d 100644 --- a/docs/Model/VideoUpdatePayload.md +++ b/docs/Model/VideoUpdatePayload.md @@ -15,5 +15,6 @@ Name | Type | Description | Notes **language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] **transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] **transcriptSummary** | **bool** | Use this parameter to enable summarization. - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional] +**transcriptSummaryAttributes** | **string[]** | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/src/BaseClient.php b/src/BaseClient.php index c87df01..76e0e7e 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -78,7 +78,7 @@ public function __construct(string $baseUri, ?string $apiKey, ClientInterface $h $this->originSdkHeaderValue = ""; if ($apiKey) { - $this->authenticator = new Authenticator($this, $apiKey, 'php:1.4.6'); + $this->authenticator = new Authenticator($this, $apiKey, 'php:1.4.7'); } } @@ -111,7 +111,7 @@ public function request(Request $commandRequest, bool $skipAuthRequest = false): if($this->originSdkHeaderValue) { $request = $request->withHeader('AV-Origin-Sdk', $this->originSdkHeaderValue); } - $request = $request->withHeader('AV-Origin-Client', 'php:1.4.6'); + $request = $request->withHeader('AV-Origin-Client', 'php:1.4.7'); return $this->sendRequest($request, $skipAuthRequest); } diff --git a/src/Model/SummaryCreationPayload.php b/src/Model/SummaryCreationPayload.php index da6dd93..543347d 100644 --- a/src/Model/SummaryCreationPayload.php +++ b/src/Model/SummaryCreationPayload.php @@ -32,33 +32,41 @@ public static function getDefinition(): ModelDefinition 'summary-creation-payload', [ 'videoId' => 'string', - 'origin' => 'string' + 'origin' => 'string', + 'attributes' => 'string[]' ], [ 'videoId' => null, - 'origin' => null + 'origin' => null, + 'attributes' => null ], [ 'videoId' => 'videoId', - 'origin' => 'origin' + 'origin' => 'origin', + 'attributes' => 'attributes' ], [ 'videoId' => 'setVideoId', - 'origin' => 'setOrigin' + 'origin' => 'setOrigin', + 'attributes' => 'setAttributes' ], [ 'videoId' => 'getVideoId', - 'origin' => 'getOrigin' + 'origin' => 'getOrigin', + 'attributes' => 'getAttributes' ], [ 'videoId' => null, - 'origin' => null + 'origin' => null, + 'attributes' => null ], null ); } const ORIGIN_AUTO = 'auto'; + const ATTRIBUTES__ABSTRACT = 'abstract'; + const ATTRIBUTES_TAKEAWAYS = 'takeaways'; /** * Gets allowable values of the enum @@ -72,6 +80,19 @@ public function getOriginAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAttributesAllowableValues() + { + return [ + self::ATTRIBUTES__ABSTRACT, + self::ATTRIBUTES_TAKEAWAYS, + ]; + } + /** * Associative array for storing property values * @@ -89,6 +110,7 @@ public function __construct(array $data = null) { $this->container['videoId'] = $data['videoId'] ?? null; $this->container['origin'] = $data['origin'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; } /** @@ -185,6 +207,39 @@ public function setOrigin($origin) return $this; } + /** + * Gets attributes + * + * @return string[]|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param string[]|null $attributes Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. + * + * @return self + */ + public function setAttributes($attributes) + { + $allowedValues = $this->getAttributesAllowableValues(); + if (!is_null($attributes) && array_diff($attributes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'attributes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['attributes'] = $attributes; + + return $this; + } + /** * Serializes the object to a value that can be serialized natively by json_encode(). * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php diff --git a/src/Model/SummarySource.php b/src/Model/SummarySource.php index d2fe0c2..ee4d56b 100644 --- a/src/Model/SummarySource.php +++ b/src/Model/SummarySource.php @@ -31,32 +31,26 @@ public static function getDefinition(): ModelDefinition return new ModelDefinition( 'summary-source', [ - 'title' => 'string', 'abstract' => 'string', 'takeaways' => 'string[]' ], [ - 'title' => null, 'abstract' => null, 'takeaways' => null ], [ - 'title' => 'title', 'abstract' => 'abstract', 'takeaways' => 'takeaways' ], [ - 'title' => 'setTitle', 'abstract' => 'setAbstract', 'takeaways' => 'setTakeaways' ], [ - 'title' => 'getTitle', 'abstract' => 'getAbstract', 'takeaways' => 'getTakeaways' ], [ - 'title' => null, 'abstract' => null, 'takeaways' => null ], @@ -80,7 +74,6 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['title'] = $data['title'] ?? null; $this->container['abstract'] = $data['abstract'] ?? null; $this->container['takeaways'] = $data['takeaways'] ?? null; } @@ -113,30 +106,6 @@ public function valid() } - /** - * Gets title - * - * @return string|null - */ - public function getTitle() - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string|null $title A video title, based on the contents of the video. - * - * @return self - */ - public function setTitle($title) - { - $this->container['title'] = $title; - - return $this; - } - /** * Gets abstract * diff --git a/src/Model/SummaryUpdatePayload.php b/src/Model/SummaryUpdatePayload.php index b74ac6e..d2201d1 100644 --- a/src/Model/SummaryUpdatePayload.php +++ b/src/Model/SummaryUpdatePayload.php @@ -31,32 +31,26 @@ public static function getDefinition(): ModelDefinition return new ModelDefinition( 'summary-update-payload', [ - 'title' => 'string', 'abstract' => 'string', 'takeaways' => 'string[]' ], [ - 'title' => null, 'abstract' => null, 'takeaways' => null ], [ - 'title' => 'title', 'abstract' => 'abstract', 'takeaways' => 'takeaways' ], [ - 'title' => 'setTitle', 'abstract' => 'setAbstract', 'takeaways' => 'setTakeaways' ], [ - 'title' => 'getTitle', 'abstract' => 'getAbstract', 'takeaways' => 'getTakeaways' ], [ - 'title' => null, 'abstract' => null, 'takeaways' => null ], @@ -80,7 +74,6 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['title'] = $data['title'] ?? null; $this->container['abstract'] = $data['abstract'] ?? null; $this->container['takeaways'] = $data['takeaways'] ?? null; } @@ -113,30 +106,6 @@ public function valid() } - /** - * Gets title - * - * @return string|null - */ - public function getTitle() - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string|null $title A video title, based on the contents of the video. - * - * @return self - */ - public function setTitle($title) - { - $this->container['title'] = $title; - - return $this; - } - /** * Gets abstract * diff --git a/src/Model/VideoCreationPayload.php b/src/Model/VideoCreationPayload.php index c3eb105..b2dd339 100644 --- a/src/Model/VideoCreationPayload.php +++ b/src/Model/VideoCreationPayload.php @@ -44,7 +44,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => '\ApiVideo\Client\Model\VideoWatermark', 'language' => 'string', 'transcript' => 'bool', - 'transcriptSummary' => 'bool' + 'transcriptSummary' => 'bool', + 'transcriptSummaryAttributes' => 'string[]' ], [ 'title' => null, @@ -60,7 +61,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => null, 'language' => null, 'transcript' => null, - 'transcriptSummary' => null + 'transcriptSummary' => null, + 'transcriptSummaryAttributes' => null ], [ 'title' => 'title', @@ -76,7 +78,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => 'watermark', 'language' => 'language', 'transcript' => 'transcript', - 'transcriptSummary' => 'transcriptSummary' + 'transcriptSummary' => 'transcriptSummary', + 'transcriptSummaryAttributes' => 'transcriptSummaryAttributes' ], [ 'title' => 'setTitle', @@ -92,7 +95,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => 'setWatermark', 'language' => 'setLanguage', 'transcript' => 'setTranscript', - 'transcriptSummary' => 'setTranscriptSummary' + 'transcriptSummary' => 'setTranscriptSummary', + 'transcriptSummaryAttributes' => 'setTranscriptSummaryAttributes' ], [ 'title' => 'getTitle', @@ -108,7 +112,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => 'getWatermark', 'language' => 'getLanguage', 'transcript' => 'getTranscript', - 'transcriptSummary' => 'getTranscriptSummary' + 'transcriptSummary' => 'getTranscriptSummary', + 'transcriptSummaryAttributes' => 'getTranscriptSummaryAttributes' ], [ 'title' => null, @@ -124,7 +129,8 @@ public static function getDefinition(): ModelDefinition 'watermark' => null, 'language' => null, 'transcript' => null, - 'transcriptSummary' => null + 'transcriptSummary' => null, + 'transcriptSummaryAttributes' => null ], null ); @@ -163,6 +169,8 @@ public static function getDefinition(): ModelDefinition const LANGUAGE_UR = 'ur'; const LANGUAGE_VI = 'vi'; const LANGUAGE_ZH = 'zh'; + const TRANSCRIPT_SUMMARY_ATTRIBUTES__ABSTRACT = 'abstract'; + const TRANSCRIPT_SUMMARY_ATTRIBUTES_TAKEAWAYS = 'takeaways'; /** * Gets allowable values of the enum @@ -208,6 +216,19 @@ public function getLanguageAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTranscriptSummaryAttributesAllowableValues() + { + return [ + self::TRANSCRIPT_SUMMARY_ATTRIBUTES__ABSTRACT, + self::TRANSCRIPT_SUMMARY_ATTRIBUTES_TAKEAWAYS, + ]; + } + /** * Associative array for storing property values * @@ -237,6 +258,7 @@ public function __construct(array $data = null) $this->container['language'] = $data['language'] ?? null; $this->container['transcript'] = $data['transcript'] ?? null; $this->container['transcriptSummary'] = $data['transcriptSummary'] ?? null; + $this->container['transcriptSummaryAttributes'] = $data['transcriptSummaryAttributes'] ?? null; } /** @@ -621,6 +643,39 @@ public function setTranscriptSummary($transcriptSummary) return $this; } + /** + * Gets transcriptSummaryAttributes + * + * @return string[]|null + */ + public function getTranscriptSummaryAttributes() + { + return $this->container['transcriptSummaryAttributes']; + } + + /** + * Sets transcriptSummaryAttributes + * + * @param string[]|null $transcriptSummaryAttributes Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. + * + * @return self + */ + public function setTranscriptSummaryAttributes($transcriptSummaryAttributes) + { + $allowedValues = $this->getTranscriptSummaryAttributesAllowableValues(); + if (!is_null($transcriptSummaryAttributes) && array_diff($transcriptSummaryAttributes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'transcriptSummaryAttributes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['transcriptSummaryAttributes'] = $transcriptSummaryAttributes; + + return $this; + } + /** * Serializes the object to a value that can be serialized natively by json_encode(). * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php diff --git a/src/Model/VideoUpdatePayload.php b/src/Model/VideoUpdatePayload.php index 57e6fa8..a831b2b 100644 --- a/src/Model/VideoUpdatePayload.php +++ b/src/Model/VideoUpdatePayload.php @@ -41,7 +41,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => '\ApiVideo\Client\Model\Metadata[]', 'language' => 'string', 'transcript' => 'bool', - 'transcriptSummary' => 'bool' + 'transcriptSummary' => 'bool', + 'transcriptSummaryAttributes' => 'string[]' ], [ 'playerId' => null, @@ -54,7 +55,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => null, 'language' => null, 'transcript' => null, - 'transcriptSummary' => null + 'transcriptSummary' => null, + 'transcriptSummaryAttributes' => null ], [ 'playerId' => 'playerId', @@ -67,7 +69,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => 'metadata', 'language' => 'language', 'transcript' => 'transcript', - 'transcriptSummary' => 'transcriptSummary' + 'transcriptSummary' => 'transcriptSummary', + 'transcriptSummaryAttributes' => 'transcriptSummaryAttributes' ], [ 'playerId' => 'setPlayerId', @@ -80,7 +83,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => 'setMetadata', 'language' => 'setLanguage', 'transcript' => 'setTranscript', - 'transcriptSummary' => 'setTranscriptSummary' + 'transcriptSummary' => 'setTranscriptSummary', + 'transcriptSummaryAttributes' => 'setTranscriptSummaryAttributes' ], [ 'playerId' => 'getPlayerId', @@ -93,7 +97,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => 'getMetadata', 'language' => 'getLanguage', 'transcript' => 'getTranscript', - 'transcriptSummary' => 'getTranscriptSummary' + 'transcriptSummary' => 'getTranscriptSummary', + 'transcriptSummaryAttributes' => 'getTranscriptSummaryAttributes' ], [ 'playerId' => 'isPlayerIdDefined', @@ -106,7 +111,8 @@ public static function getDefinition(): ModelDefinition 'metadata' => null, 'language' => null, 'transcript' => null, - 'transcriptSummary' => null + 'transcriptSummary' => null, + 'transcriptSummaryAttributes' => null ], null ); @@ -145,6 +151,8 @@ public static function getDefinition(): ModelDefinition const LANGUAGE_UR = 'ur'; const LANGUAGE_VI = 'vi'; const LANGUAGE_ZH = 'zh'; + const TRANSCRIPT_SUMMARY_ATTRIBUTES__ABSTRACT = 'abstract'; + const TRANSCRIPT_SUMMARY_ATTRIBUTES_TAKEAWAYS = 'takeaways'; /** * Gets allowable values of the enum @@ -190,6 +198,19 @@ public function getLanguageAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTranscriptSummaryAttributesAllowableValues() + { + return [ + self::TRANSCRIPT_SUMMARY_ATTRIBUTES__ABSTRACT, + self::TRANSCRIPT_SUMMARY_ATTRIBUTES_TAKEAWAYS, + ]; + } + /** * Associative array for storing property values * @@ -216,6 +237,7 @@ public function __construct(array $data = null) $this->container['language'] = $data['language'] ?? null; $this->container['transcript'] = $data['transcript'] ?? null; $this->container['transcriptSummary'] = $data['transcriptSummary'] ?? null; + $this->container['transcriptSummaryAttributes'] = $data['transcriptSummaryAttributes'] ?? null; } /** @@ -535,6 +557,39 @@ public function setTranscriptSummary($transcriptSummary) return $this; } + /** + * Gets transcriptSummaryAttributes + * + * @return string[]|null + */ + public function getTranscriptSummaryAttributes() + { + return $this->container['transcriptSummaryAttributes']; + } + + /** + * Sets transcriptSummaryAttributes + * + * @param string[]|null $transcriptSummaryAttributes Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. + * + * @return self + */ + public function setTranscriptSummaryAttributes($transcriptSummaryAttributes) + { + $allowedValues = $this->getTranscriptSummaryAttributesAllowableValues(); + if (!is_null($transcriptSummaryAttributes) && array_diff($transcriptSummaryAttributes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'transcriptSummaryAttributes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['transcriptSummaryAttributes'] = $transcriptSummaryAttributes; + + return $this; + } + /** * Serializes the object to a value that can be serialized natively by json_encode(). * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php