diff --git a/README.md b/README.md index eb1e566..074c6f1 100644 --- a/README.md +++ b/README.md @@ -132,8 +132,8 @@ $client->videos()->upload( Method | Description | HTTP request ------------- | ------------- | ------------- -[**getLiveStreamsPlays()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/AnalyticsApi.md#getLiveStreamsPlays) | Get play events for live stream | **GET** `/analytics/live-streams/plays` -[**getVideosPlays()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/AnalyticsApi.md#getVideosPlays) | Get play events for video | **GET** `/analytics/videos/plays` +**(deprecated)** [**getLiveStreamsPlays()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/AnalyticsApi.md#getLiveStreamsPlays) | Get play events for live stream | **GET** `/analytics/live-streams/plays` +**(deprecated)** [**getVideosPlays()**](https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/AnalyticsApi.md#getVideosPlays) | Get play events for video | **GET** `/analytics/videos/plays` #### CaptionsApi @@ -233,7 +233,16 @@ Method | Description | HTTP request - [AccessToken](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AccessToken.md) - [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AdditionalBadRequestErrors.md) + - [AnalyticsAggregatedMetricsResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsAggregatedMetricsResponse.md) + - [AnalyticsAggregatedMetricsResponseContext](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsAggregatedMetricsResponseContext.md) + - [AnalyticsAggregatedMetricsResponseContextTimeframe](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.md) - [AnalyticsData](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsData.md) + - [AnalyticsMetricsBreakdownResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsBreakdownResponse.md) + - [AnalyticsMetricsBreakdownResponseContext](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsBreakdownResponseContext.md) + - [AnalyticsMetricsBreakdownResponseData](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsBreakdownResponseData.md) + - [AnalyticsMetricsOverTimeResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsOverTimeResponse.md) + - [AnalyticsMetricsOverTimeResponseContext](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsOverTimeResponseContext.md) + - [AnalyticsMetricsOverTimeResponseData](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsMetricsOverTimeResponseData.md) - [AnalyticsPlays400Error](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsPlays400Error.md) - [AnalyticsPlaysResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AnalyticsPlaysResponse.md) - [AuthenticatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/AuthenticatePayload.md) @@ -249,12 +258,6 @@ Method | Description | HTTP request - [LiveStreamAssets](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamCreationPayload.md) - [LiveStreamListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamListResponse.md) - - [LiveStreamSession](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSession.md) - - [LiveStreamSessionClient](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSessionClient.md) - - [LiveStreamSessionDevice](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSessionDevice.md) - - [LiveStreamSessionLocation](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSessionLocation.md) - - [LiveStreamSessionReferrer](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSessionReferrer.md) - - [LiveStreamSessionSession](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamSessionSession.md) - [LiveStreamUpdatePayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/LiveStreamUpdatePayload.md) - [Metadata](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Metadata.md) - [Model403ErrorSchema](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Model403ErrorSchema.md) @@ -274,18 +277,12 @@ Method | Description | HTTP request - [TokenCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/TooManyRequests.md) + - [UnrecognizedRequestUrl](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/UnrecognizedRequestUrl.md) - [UploadToken](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/UploadToken.md) - [Video](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoAssets.md) - [VideoClip](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoClip.md) - [VideoCreationPayload](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoCreationPayload.md) - - [VideoSession](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSession.md) - - [VideoSessionClient](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionClient.md) - - [VideoSessionDevice](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionDevice.md) - - [VideoSessionLocation](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionLocation.md) - - [VideoSessionOs](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionOs.md) - - [VideoSessionReferrer](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionReferrer.md) - - [VideoSessionSession](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSessionSession.md) - [VideoSource](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSource.md) - [VideoSourceLiveStream](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSourceLiveStream.md) - [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-php-client/blob/main/docs/Model/VideoSourceLiveStreamLink.md) diff --git a/docs/Api/AnalyticsApi.md b/docs/Api/AnalyticsApi.md index 8606f8c..7e612a1 100644 --- a/docs/Api/AnalyticsApi.md +++ b/docs/Api/AnalyticsApi.md @@ -14,6 +14,12 @@ Method | Description | HTTP request Retrieve filtered analytics about the number of plays for your live streams in a project. + + +This endpoint will be deprecated with the release of Analytics v2.0. + + + ### Arguments @@ -50,6 +56,12 @@ Name | Type | Description | Notes Retrieve filtered analytics about the number of plays for your videos in a project. + + +This endpoint will be deprecated with the release of Analytics v2.0. + + + ### Arguments diff --git a/docs/Model/AnalyticsAggregatedMetricsResponse.md b/docs/Model/AnalyticsAggregatedMetricsResponse.md new file mode 100644 index 0000000..eeffea5 --- /dev/null +++ b/docs/Model/AnalyticsAggregatedMetricsResponse.md @@ -0,0 +1,11 @@ +# # AnalyticsAggregatedMetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContext**](AnalyticsAggregatedMetricsResponseContext.md) | | +**data** | **float[]** | | +**pagination** | [**\ApiVideo\Client\Model\Pagination**](Pagination.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalyticsAggregatedMetricsResponseContext.md b/docs/Model/AnalyticsAggregatedMetricsResponseContext.md new file mode 100644 index 0000000..0db5e2e --- /dev/null +++ b/docs/Model/AnalyticsAggregatedMetricsResponseContext.md @@ -0,0 +1,11 @@ +# # AnalyticsAggregatedMetricsResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **string** | Returns the metric you selected. | [optional] +**aggregation** | **string** | Returns the aggregation you selected. | [optional] +**timeframe** | [**\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [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/AnalyticsAggregatedMetricsResponseContextTimeframe.md b/docs/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.md new file mode 100644 index 0000000..8b65775 --- /dev/null +++ b/docs/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.md @@ -0,0 +1,10 @@ +# # AnalyticsAggregatedMetricsResponseContextTimeframe + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | [**\DateTime**](\DateTime.md) | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [optional] +**to** | [**\DateTime**](\DateTime.md) | Returns the starting date-time of the period you want analytics for in ATOM date-time format. | [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/AnalyticsMetricsBreakdownResponse.md b/docs/Model/AnalyticsMetricsBreakdownResponse.md new file mode 100644 index 0000000..ecd483d --- /dev/null +++ b/docs/Model/AnalyticsMetricsBreakdownResponse.md @@ -0,0 +1,11 @@ +# # AnalyticsMetricsBreakdownResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**\ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseContext**](AnalyticsMetricsBreakdownResponseContext.md) | | +**data** | [**\ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseData[]**](AnalyticsMetricsBreakdownResponseData.md) | Returns an array of dimensions and their respective metrics. | +**pagination** | [**\ApiVideo\Client\Model\Pagination**](Pagination.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalyticsMetricsBreakdownResponseContext.md b/docs/Model/AnalyticsMetricsBreakdownResponseContext.md new file mode 100644 index 0000000..6e15192 --- /dev/null +++ b/docs/Model/AnalyticsMetricsBreakdownResponseContext.md @@ -0,0 +1,11 @@ +# # AnalyticsMetricsBreakdownResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **string** | Returns the metric you selected. | [optional] +**breakdown** | **string** | Returns the dimension you selected. | [optional] +**timeframe** | [**\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [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/AnalyticsMetricsBreakdownResponseData.md b/docs/Model/AnalyticsMetricsBreakdownResponseData.md new file mode 100644 index 0000000..f28eb6d --- /dev/null +++ b/docs/Model/AnalyticsMetricsBreakdownResponseData.md @@ -0,0 +1,10 @@ +# # AnalyticsMetricsBreakdownResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensionValue** | **string** | Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". | [optional] +**metricValue** | **float** | Returns the data for a specific dimension value. | [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/AnalyticsMetricsOverTimeResponse.md b/docs/Model/AnalyticsMetricsOverTimeResponse.md new file mode 100644 index 0000000..d57e8b4 --- /dev/null +++ b/docs/Model/AnalyticsMetricsOverTimeResponse.md @@ -0,0 +1,11 @@ +# # AnalyticsMetricsOverTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**\ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseContext**](AnalyticsMetricsOverTimeResponseContext.md) | | +**data** | [**\ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseData[]**](AnalyticsMetricsOverTimeResponseData.md) | Returns an array of metrics and the timestamps . | +**pagination** | [**\ApiVideo\Client\Model\Pagination**](Pagination.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalyticsMetricsOverTimeResponseContext.md b/docs/Model/AnalyticsMetricsOverTimeResponseContext.md new file mode 100644 index 0000000..946fd40 --- /dev/null +++ b/docs/Model/AnalyticsMetricsOverTimeResponseContext.md @@ -0,0 +1,11 @@ +# # AnalyticsMetricsOverTimeResponseContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric** | **string** | Returns the metric you selected. | [optional] +**interval** | **string** | Returns the interval you selected. | [optional] +**timeframe** | [**\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe**](AnalyticsAggregatedMetricsResponseContextTimeframe.md) | | [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/AnalyticsMetricsOverTimeResponseData.md b/docs/Model/AnalyticsMetricsOverTimeResponseData.md new file mode 100644 index 0000000..4814d65 --- /dev/null +++ b/docs/Model/AnalyticsMetricsOverTimeResponseData.md @@ -0,0 +1,10 @@ +# # AnalyticsMetricsOverTimeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emittedAt** | **string** | Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. | [optional] +**metricValue** | **float** | Returns the data for a specific metric value. | [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/LiveStreamSession.md b/docs/Model/LiveStreamSession.md deleted file mode 100644 index 1f30f06..0000000 --- a/docs/Model/LiveStreamSession.md +++ /dev/null @@ -1,14 +0,0 @@ -# # LiveStreamSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**\ApiVideo\Client\Model\LiveStreamSessionSession**](LiveStreamSessionSession.md) | | [optional] -**location** | [**\ApiVideo\Client\Model\LiveStreamSessionLocation**](LiveStreamSessionLocation.md) | | [optional] -**referrer** | [**\ApiVideo\Client\Model\LiveStreamSessionReferrer**](LiveStreamSessionReferrer.md) | | [optional] -**device** | [**\ApiVideo\Client\Model\LiveStreamSessionDevice**](LiveStreamSessionDevice.md) | | [optional] -**os** | [**\ApiVideo\Client\Model\VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**\ApiVideo\Client\Model\LiveStreamSessionClient**](LiveStreamSessionClient.md) | | [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/LiveStreamSessionClient.md b/docs/Model/LiveStreamSessionClient.md deleted file mode 100644 index c3bf180..0000000 --- a/docs/Model/LiveStreamSessionClient.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LiveStreamSessionClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name of the browser used to view the live stream session. | [optional] -**version** | **string** | The version of the browser used to view the live stream session. | [optional] -**type** | **string** | The type of client used to view the live stream session. | [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/LiveStreamSessionDevice.md b/docs/Model/LiveStreamSessionDevice.md deleted file mode 100644 index a2acd62..0000000 --- a/docs/Model/LiveStreamSessionDevice.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LiveStreamSessionDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **string** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **string** | The specific model of the device, if known. | [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/LiveStreamSessionLocation.md b/docs/Model/LiveStreamSessionLocation.md deleted file mode 100644 index b8ae38b..0000000 --- a/docs/Model/LiveStreamSessionLocation.md +++ /dev/null @@ -1,10 +0,0 @@ -# # LiveStreamSessionLocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**country** | **string** | The country of the viewer of the live stream. | [optional] -**city** | **string** | The city of the viewer of the live stream. | [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/LiveStreamSessionReferrer.md b/docs/Model/LiveStreamSessionReferrer.md deleted file mode 100644 index 36b90d7..0000000 --- a/docs/Model/LiveStreamSessionReferrer.md +++ /dev/null @@ -1,12 +0,0 @@ -# # LiveStreamSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **string** | The website the viewer of the live stream was referred to in order to view the live stream. | [optional] -**medium** | **string** | The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. | [optional] -**source** | **string** | Where the viewer came from to see the live stream (usually where they searched from). | [optional] -**searchTerm** | **string** | What term they searched for that led them to the live stream. | [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/LiveStreamSessionSession.md b/docs/Model/LiveStreamSessionSession.md deleted file mode 100644 index bd9e1d8..0000000 --- a/docs/Model/LiveStreamSessionSession.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LiveStreamSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **string** | A unique identifier for your session. You can use this to track what happens during a specific session. | [optional] -**loadedAt** | [**\DateTime**](\DateTime.md) | When the session started, with the date and time presented in ISO-8601 format. | [optional] -**endedAt** | [**\DateTime**](\DateTime.md) | When the session ended, with the date and time presented in ISO-8601 format. | [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/VideoSessionLocation.md b/docs/Model/UnrecognizedRequestUrl.md similarity index 50% rename from docs/Model/VideoSessionLocation.md rename to docs/Model/UnrecognizedRequestUrl.md index 2805535..710f4c9 100644 --- a/docs/Model/VideoSessionLocation.md +++ b/docs/Model/UnrecognizedRequestUrl.md @@ -1,10 +1,11 @@ -# # VideoSessionLocation +# # UnrecognizedRequestUrl ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**country** | **string** | The country of the viewer. | [optional] -**city** | **string** | The city of the viewer. | [optional] +**type** | **string** | A link to the error documentation. | [optional] +**title** | **string** | A description of the error that occurred. | [optional] +**status** | **int** | The HTTP status code. | [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/VideoSession.md b/docs/Model/VideoSession.md deleted file mode 100644 index 494eb21..0000000 --- a/docs/Model/VideoSession.md +++ /dev/null @@ -1,14 +0,0 @@ -# # VideoSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session** | [**\ApiVideo\Client\Model\VideoSessionSession**](VideoSessionSession.md) | | [optional] -**location** | [**\ApiVideo\Client\Model\VideoSessionLocation**](VideoSessionLocation.md) | | [optional] -**referrer** | [**\ApiVideo\Client\Model\VideoSessionReferrer**](VideoSessionReferrer.md) | | [optional] -**device** | [**\ApiVideo\Client\Model\VideoSessionDevice**](VideoSessionDevice.md) | | [optional] -**os** | [**\ApiVideo\Client\Model\VideoSessionOs**](VideoSessionOs.md) | | [optional] -**client** | [**\ApiVideo\Client\Model\VideoSessionClient**](VideoSessionClient.md) | | [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/VideoSessionClient.md b/docs/Model/VideoSessionClient.md deleted file mode 100644 index ba59895..0000000 --- a/docs/Model/VideoSessionClient.md +++ /dev/null @@ -1,11 +0,0 @@ -# # VideoSessionClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name of the browser used to view the video session. | [optional] -**version** | **string** | The version of the browser used to view the video session. | [optional] -**type** | **string** | The type of client used to view the video session. | [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/VideoSessionDevice.md b/docs/Model/VideoSessionDevice.md deleted file mode 100644 index 192eca9..0000000 --- a/docs/Model/VideoSessionDevice.md +++ /dev/null @@ -1,11 +0,0 @@ -# # VideoSessionDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | What the type is like desktop, laptop, mobile. | [optional] -**vendor** | **string** | If known, what the brand of the device is, like Apple, Dell, etc. | [optional] -**model** | **string** | The specific model of the device, if known. | [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/VideoSessionOs.md b/docs/Model/VideoSessionOs.md deleted file mode 100644 index 8e153da..0000000 --- a/docs/Model/VideoSessionOs.md +++ /dev/null @@ -1,11 +0,0 @@ -# # VideoSessionOs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name of the operating system. | [optional] -**shortname** | **string** | The nickname for the operating system, often representing the version. | [optional] -**version** | **string** | The version of the operating system. | [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/VideoSessionReferrer.md b/docs/Model/VideoSessionReferrer.md deleted file mode 100644 index e567183..0000000 --- a/docs/Model/VideoSessionReferrer.md +++ /dev/null @@ -1,12 +0,0 @@ -# # VideoSessionReferrer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **string** | The link the viewer used to reach the video session. | [optional] -**medium** | **string** | How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. | [optional] -**source** | **string** | The source the referrer came from to the video session. For example if they searched through google to find the stream. | [optional] -**searchTerm** | **string** | The search term they typed to arrive at the video session. | [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/VideoSessionSession.md b/docs/Model/VideoSessionSession.md deleted file mode 100644 index f0e5bb9..0000000 --- a/docs/Model/VideoSessionSession.md +++ /dev/null @@ -1,12 +0,0 @@ -# # VideoSessionSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sessionId** | **string** | The unique identifier for the session that you can use to track what happens during it. | [optional] -**loadedAt** | [**\DateTime**](\DateTime.md) | When the video session started, presented in ISO-8601 format. | [optional] -**endedAt** | [**\DateTime**](\DateTime.md) | When the video session ended, presented in ISO-8601 format. | [optional] -**metadata** | [**\ApiVideo\Client\Model\Metadata[]**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/src/Model/LiveStreamSessionSession.php b/src/Model/AnalyticsAggregatedMetricsResponse.php similarity index 52% rename from src/Model/LiveStreamSessionSession.php rename to src/Model/AnalyticsAggregatedMetricsResponse.php index ff77f2b..e80347e 100644 --- a/src/Model/LiveStreamSessionSession.php +++ b/src/Model/AnalyticsAggregatedMetricsResponse.php @@ -17,48 +17,48 @@ use ApiVideo\Client\ObjectSerializer; /** - * LiveStreamSessionSession Class Doc Comment + * AnalyticsAggregatedMetricsResponse Class Doc Comment * * @category Class * @package ApiVideo\Client * @template TKey int|null * @template TValue mixed|null */ -class LiveStreamSessionSession implements ModelInterface, \JsonSerializable +class AnalyticsAggregatedMetricsResponse implements ModelInterface, \JsonSerializable { public static function getDefinition(): ModelDefinition { return new ModelDefinition( - 'live-stream-session-session', + 'analytics-aggregated-metrics-response', [ - 'sessionId' => 'string', - 'loadedAt' => '\DateTime', - 'endedAt' => '\DateTime' + 'context' => '\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContext', + 'data' => 'float[]', + 'pagination' => '\ApiVideo\Client\Model\Pagination' ], [ - 'sessionId' => null, - 'loadedAt' => 'date-time', - 'endedAt' => 'date-time' + 'context' => null, + 'data' => 'float', + 'pagination' => null ], [ - 'sessionId' => 'sessionId', - 'loadedAt' => 'loadedAt', - 'endedAt' => 'endedAt' + 'context' => 'context', + 'data' => 'data', + 'pagination' => 'pagination' ], [ - 'sessionId' => 'setSessionId', - 'loadedAt' => 'setLoadedAt', - 'endedAt' => 'setEndedAt' + 'context' => 'setContext', + 'data' => 'setData', + 'pagination' => 'setPagination' ], [ - 'sessionId' => 'getSessionId', - 'loadedAt' => 'getLoadedAt', - 'endedAt' => 'getEndedAt' + 'context' => 'getContext', + 'data' => 'getData', + 'pagination' => 'getPagination' ], [ - 'sessionId' => null, - 'loadedAt' => null, - 'endedAt' => null + 'context' => null, + 'data' => null, + 'pagination' => null ], null ); @@ -80,9 +80,9 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['sessionId'] = $data['sessionId'] ?? null; - $this->container['loadedAt'] = isset($data['loadedAt']) ? new \DateTime($data['loadedAt']) : null; - $this->container['endedAt'] = isset($data['endedAt']) ? new \DateTime($data['endedAt']) : null; + $this->container['context'] = isset($data['context']) ? new AnalyticsAggregatedMetricsResponseContext($data['context']) : null; + $this->container['data'] = $data['data'] ?? null; + $this->container['pagination'] = isset($data['pagination']) ? new Pagination($data['pagination']) : null; } /** @@ -94,6 +94,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['pagination'] === null) { + $invalidProperties[] = "'pagination' can't be null"; + } return $invalidProperties; } @@ -110,73 +119,73 @@ public function valid() /** - * Gets sessionId + * Gets context * - * @return string|null + * @return \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContext */ - public function getSessionId() + public function getContext() { - return $this->container['sessionId']; + return $this->container['context']; } /** - * Sets sessionId + * Sets context * - * @param string|null $sessionId A unique identifier for your session. You can use this to track what happens during a specific session. + * @param \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContext $context context * * @return self */ - public function setSessionId($sessionId) + public function setContext($context) { - $this->container['sessionId'] = $sessionId; + $this->container['context'] = $context; return $this; } /** - * Gets loadedAt + * Gets data * - * @return \DateTime|null + * @return float[] */ - public function getLoadedAt() + public function getData() { - return $this->container['loadedAt']; + return $this->container['data']; } /** - * Sets loadedAt + * Sets data * - * @param \DateTime|null $loadedAt When the session started, with the date and time presented in ISO-8601 format. + * @param float[] $data data * * @return self */ - public function setLoadedAt($loadedAt) + public function setData($data) { - $this->container['loadedAt'] = $loadedAt; + $this->container['data'] = $data; return $this; } /** - * Gets endedAt + * Gets pagination * - * @return \DateTime|null + * @return \ApiVideo\Client\Model\Pagination */ - public function getEndedAt() + public function getPagination() { - return $this->container['endedAt']; + return $this->container['pagination']; } /** - * Sets endedAt + * Sets pagination * - * @param \DateTime|null $endedAt When the session ended, with the date and time presented in ISO-8601 format. + * @param \ApiVideo\Client\Model\Pagination $pagination pagination * * @return self */ - public function setEndedAt($endedAt) + public function setPagination($pagination) { - $this->container['endedAt'] = $endedAt; + $this->container['pagination'] = $pagination; return $this; } diff --git a/src/Model/AnalyticsAggregatedMetricsResponseContext.php b/src/Model/AnalyticsAggregatedMetricsResponseContext.php new file mode 100644 index 0000000..bf1ca3d --- /dev/null +++ b/src/Model/AnalyticsAggregatedMetricsResponseContext.php @@ -0,0 +1,293 @@ + 'string', + 'aggregation' => 'string', + 'timeframe' => '\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe' + ], + [ + 'metric' => null, + 'aggregation' => null, + 'timeframe' => null + ], + [ + 'metric' => 'metric', + 'aggregation' => 'aggregation', + 'timeframe' => 'timeframe' + ], + [ + 'metric' => 'setMetric', + 'aggregation' => 'setAggregation', + 'timeframe' => 'setTimeframe' + ], + [ + 'metric' => 'getMetric', + 'aggregation' => 'getAggregation', + 'timeframe' => 'getTimeframe' + ], + [ + 'metric' => null, + 'aggregation' => null, + 'timeframe' => null + ], + null + ); + } + + const METRIC_PLAY = 'play'; + const METRIC_START = 'start'; + const METRIC_END = 'end'; + const METRIC_IMPRESSION = 'impression'; + const METRIC_IMPRESSION_TIME = 'impression-time'; + const METRIC_WATCH_TIME = 'watch-time'; + const AGGREGATION_COUNT = 'count'; + const AGGREGATION_RATE = 'rate'; + const AGGREGATION_TOTAL = 'total'; + const AGGREGATION_AVERAGE = 'average'; + const AGGREGATION_SUM = 'sum'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMetricAllowableValues() + { + return [ + self::METRIC_PLAY, + self::METRIC_START, + self::METRIC_END, + self::METRIC_IMPRESSION, + self::METRIC_IMPRESSION_TIME, + self::METRIC_WATCH_TIME, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAggregationAllowableValues() + { + return [ + self::AGGREGATION_COUNT, + self::AGGREGATION_RATE, + self::AGGREGATION_TOTAL, + self::AGGREGATION_AVERAGE, + self::AGGREGATION_SUM, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['metric'] = $data['metric'] ?? null; + $this->container['aggregation'] = $data['aggregation'] ?? null; + $this->container['timeframe'] = isset($data['timeframe']) ? new AnalyticsAggregatedMetricsResponseContextTimeframe($data['timeframe']) : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($this->container['metric']) && !in_array($this->container['metric'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'metric', must be one of '%s'", + $this->container['metric'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAggregationAllowableValues(); + if (!is_null($this->container['aggregation']) && !in_array($this->container['aggregation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'aggregation', must be one of '%s'", + $this->container['aggregation'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets metric + * + * @return string|null + */ + public function getMetric() + { + return $this->container['metric']; + } + + /** + * Sets metric + * + * @param string|null $metric Returns the metric you selected. + * + * @return self + */ + public function setMetric($metric) + { + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($metric) && !in_array($metric, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'metric', must be one of '%s'", + $metric, + implode("', '", $allowedValues) + ) + ); + } + $this->container['metric'] = $metric; + + return $this; + } + + /** + * Gets aggregation + * + * @return string|null + */ + public function getAggregation() + { + return $this->container['aggregation']; + } + + /** + * Sets aggregation + * + * @param string|null $aggregation Returns the aggregation you selected. + * + * @return self + */ + public function setAggregation($aggregation) + { + $allowedValues = $this->getAggregationAllowableValues(); + if (!is_null($aggregation) && !in_array($aggregation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'aggregation', must be one of '%s'", + $aggregation, + implode("', '", $allowedValues) + ) + ); + } + $this->container['aggregation'] = $aggregation; + + return $this; + } + + /** + * Gets timeframe + * + * @return \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null + */ + public function getTimeframe() + { + return $this->container['timeframe']; + } + + /** + * Sets timeframe + * + * @param \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null $timeframe timeframe + * + * @return self + */ + public function setTimeframe($timeframe) + { + $this->container['timeframe'] = $timeframe; + + 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 + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/src/Model/VideoSessionLocation.php b/src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.php similarity index 63% rename from src/Model/VideoSessionLocation.php rename to src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.php index 486dcb2..3f3bc4b 100644 --- a/src/Model/VideoSessionLocation.php +++ b/src/Model/AnalyticsAggregatedMetricsResponseContextTimeframe.php @@ -17,43 +17,43 @@ use ApiVideo\Client\ObjectSerializer; /** - * VideoSessionLocation Class Doc Comment + * AnalyticsAggregatedMetricsResponseContextTimeframe Class Doc Comment * * @category Class - * @description The location of the viewer. + * @description Returns the starting and ending date-times of the period you want analytics for. * @package ApiVideo\Client * @template TKey int|null * @template TValue mixed|null */ -class VideoSessionLocation implements ModelInterface, \JsonSerializable +class AnalyticsAggregatedMetricsResponseContextTimeframe implements ModelInterface, \JsonSerializable { public static function getDefinition(): ModelDefinition { return new ModelDefinition( - 'video-session-location', + 'analytics_aggregated_metrics_response_context_timeframe', [ - 'country' => 'string', - 'city' => 'string' + 'from' => '\DateTime', + 'to' => '\DateTime' ], [ - 'country' => null, - 'city' => null + 'from' => 'date-time', + 'to' => 'date-time' ], [ - 'country' => 'country', - 'city' => 'city' + 'from' => 'from', + 'to' => 'to' ], [ - 'country' => 'setCountry', - 'city' => 'setCity' + 'from' => 'setFrom', + 'to' => 'setTo' ], [ - 'country' => 'getCountry', - 'city' => 'getCity' + 'from' => 'getFrom', + 'to' => 'getTo' ], [ - 'country' => null, - 'city' => null + 'from' => null, + 'to' => null ], null ); @@ -75,8 +75,8 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['country'] = $data['country'] ?? null; - $this->container['city'] = $data['city'] ?? null; + $this->container['from'] = isset($data['from']) ? new \DateTime($data['from']) : null; + $this->container['to'] = isset($data['to']) ? new \DateTime($data['to']) : null; } /** @@ -104,49 +104,49 @@ public function valid() /** - * Gets country + * Gets from * - * @return string|null + * @return \DateTime|null */ - public function getCountry() + public function getFrom() { - return $this->container['country']; + return $this->container['from']; } /** - * Sets country + * Sets from * - * @param string|null $country The country of the viewer. + * @param \DateTime|null $from Returns the starting date-time of the period you want analytics for in ATOM date-time format. * * @return self */ - public function setCountry($country) + public function setFrom($from) { - $this->container['country'] = $country; + $this->container['from'] = $from; return $this; } /** - * Gets city + * Gets to * - * @return string|null + * @return \DateTime|null */ - public function getCity() + public function getTo() { - return $this->container['city']; + return $this->container['to']; } /** - * Sets city + * Sets to * - * @param string|null $city The city of the viewer. + * @param \DateTime|null $to Returns the starting date-time of the period you want analytics for in ATOM date-time format. * * @return self */ - public function setCity($city) + public function setTo($to) { - $this->container['city'] = $city; + $this->container['to'] = $to; return $this; } diff --git a/src/Model/AnalyticsMetricsBreakdownResponse.php b/src/Model/AnalyticsMetricsBreakdownResponse.php new file mode 100644 index 0000000..bac8751 --- /dev/null +++ b/src/Model/AnalyticsMetricsBreakdownResponse.php @@ -0,0 +1,220 @@ + '\ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseContext', + 'data' => '\ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseData[]', + 'pagination' => '\ApiVideo\Client\Model\Pagination' + ], + [ + 'context' => null, + 'data' => null, + 'pagination' => null + ], + [ + 'context' => 'context', + 'data' => 'data', + 'pagination' => 'pagination' + ], + [ + 'context' => 'setContext', + 'data' => 'setData', + 'pagination' => 'setPagination' + ], + [ + 'context' => 'getContext', + 'data' => 'getData', + 'pagination' => 'getPagination' + ], + [ + 'context' => null, + 'data' => null, + 'pagination' => null + ], + null + ); + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = isset($data['context']) ? new AnalyticsMetricsBreakdownResponseContext($data['context']) : null; + $this->container['data'] = isset($data['data']) ? array_map(function(array $value): AnalyticsMetricsBreakdownResponseData { return new AnalyticsMetricsBreakdownResponseData($value); }, $data['data']) : null; + $this->container['pagination'] = isset($data['pagination']) ? new Pagination($data['pagination']) : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['pagination'] === null) { + $invalidProperties[] = "'pagination' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets context + * + * @return \ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseContext + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param \ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseContext $context context + * + * @return self + */ + public function setContext($context) + { + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets data + * + * @return \ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseData[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \ApiVideo\Client\Model\AnalyticsMetricsBreakdownResponseData[] $data Returns an array of dimensions and their respective metrics. + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets pagination + * + * @return \ApiVideo\Client\Model\Pagination + */ + public function getPagination() + { + return $this->container['pagination']; + } + + /** + * Sets pagination + * + * @param \ApiVideo\Client\Model\Pagination $pagination pagination + * + * @return self + */ + public function setPagination($pagination) + { + $this->container['pagination'] = $pagination; + + 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 + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/src/Model/AnalyticsMetricsBreakdownResponseContext.php b/src/Model/AnalyticsMetricsBreakdownResponseContext.php new file mode 100644 index 0000000..09f86cd --- /dev/null +++ b/src/Model/AnalyticsMetricsBreakdownResponseContext.php @@ -0,0 +1,295 @@ + 'string', + 'breakdown' => 'string', + 'timeframe' => '\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe' + ], + [ + 'metric' => null, + 'breakdown' => null, + 'timeframe' => null + ], + [ + 'metric' => 'metric', + 'breakdown' => 'breakdown', + 'timeframe' => 'timeframe' + ], + [ + 'metric' => 'setMetric', + 'breakdown' => 'setBreakdown', + 'timeframe' => 'setTimeframe' + ], + [ + 'metric' => 'getMetric', + 'breakdown' => 'getBreakdown', + 'timeframe' => 'getTimeframe' + ], + [ + 'metric' => null, + 'breakdown' => null, + 'timeframe' => null + ], + null + ); + } + + const METRIC_PLAY = 'play'; + const METRIC_PLAY_RATE = 'play-rate'; + const METRIC_START = 'start'; + const METRIC_END = 'end'; + const METRIC_IMPRESSION = 'impression'; + const BREAKDOWN_MEDIA_ID = 'media-id'; + const BREAKDOWN_MEDIA_TYPE = 'media-type'; + const BREAKDOWN_CONTINENT = 'continent'; + const BREAKDOWN_COUNTRY = 'country'; + const BREAKDOWN_DEVICE_TYPE = 'device-type'; + const BREAKDOWN_OPERATING_SYSTEM = 'operating-system'; + const BREAKDOWN_BROWSER = 'browser'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMetricAllowableValues() + { + return [ + self::METRIC_PLAY, + self::METRIC_PLAY_RATE, + self::METRIC_START, + self::METRIC_END, + self::METRIC_IMPRESSION, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBreakdownAllowableValues() + { + return [ + self::BREAKDOWN_MEDIA_ID, + self::BREAKDOWN_MEDIA_TYPE, + self::BREAKDOWN_CONTINENT, + self::BREAKDOWN_COUNTRY, + self::BREAKDOWN_DEVICE_TYPE, + self::BREAKDOWN_OPERATING_SYSTEM, + self::BREAKDOWN_BROWSER, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['metric'] = $data['metric'] ?? null; + $this->container['breakdown'] = $data['breakdown'] ?? null; + $this->container['timeframe'] = isset($data['timeframe']) ? new AnalyticsAggregatedMetricsResponseContextTimeframe($data['timeframe']) : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($this->container['metric']) && !in_array($this->container['metric'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'metric', must be one of '%s'", + $this->container['metric'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getBreakdownAllowableValues(); + if (!is_null($this->container['breakdown']) && !in_array($this->container['breakdown'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'breakdown', must be one of '%s'", + $this->container['breakdown'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets metric + * + * @return string|null + */ + public function getMetric() + { + return $this->container['metric']; + } + + /** + * Sets metric + * + * @param string|null $metric Returns the metric you selected. + * + * @return self + */ + public function setMetric($metric) + { + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($metric) && !in_array($metric, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'metric', must be one of '%s'", + $metric, + implode("', '", $allowedValues) + ) + ); + } + $this->container['metric'] = $metric; + + return $this; + } + + /** + * Gets breakdown + * + * @return string|null + */ + public function getBreakdown() + { + return $this->container['breakdown']; + } + + /** + * Sets breakdown + * + * @param string|null $breakdown Returns the dimension you selected. + * + * @return self + */ + public function setBreakdown($breakdown) + { + $allowedValues = $this->getBreakdownAllowableValues(); + if (!is_null($breakdown) && !in_array($breakdown, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'breakdown', must be one of '%s'", + $breakdown, + implode("', '", $allowedValues) + ) + ); + } + $this->container['breakdown'] = $breakdown; + + return $this; + } + + /** + * Gets timeframe + * + * @return \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null + */ + public function getTimeframe() + { + return $this->container['timeframe']; + } + + /** + * Sets timeframe + * + * @param \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null $timeframe timeframe + * + * @return self + */ + public function setTimeframe($timeframe) + { + $this->container['timeframe'] = $timeframe; + + 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 + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/src/Model/VideoSessionClient.php b/src/Model/AnalyticsMetricsBreakdownResponseData.php similarity index 57% rename from src/Model/VideoSessionClient.php rename to src/Model/AnalyticsMetricsBreakdownResponseData.php index 01d616c..9d1874f 100644 --- a/src/Model/VideoSessionClient.php +++ b/src/Model/AnalyticsMetricsBreakdownResponseData.php @@ -17,49 +17,42 @@ use ApiVideo\Client\ObjectSerializer; /** - * VideoSessionClient Class Doc Comment + * AnalyticsMetricsBreakdownResponseData Class Doc Comment * * @category Class - * @description What kind of browser the viewer is using for the video session. * @package ApiVideo\Client * @template TKey int|null * @template TValue mixed|null */ -class VideoSessionClient implements ModelInterface, \JsonSerializable +class AnalyticsMetricsBreakdownResponseData implements ModelInterface, \JsonSerializable { public static function getDefinition(): ModelDefinition { return new ModelDefinition( - 'video-session-client', + 'analytics_metrics_breakdown_response_data', [ - 'name' => 'string', - 'version' => 'string', - 'type' => 'string' + 'dimensionValue' => 'string', + 'metricValue' => 'float' ], [ - 'name' => null, - 'version' => null, - 'type' => null + 'dimensionValue' => null, + 'metricValue' => 'float' ], [ - 'name' => 'name', - 'version' => 'version', - 'type' => 'type' + 'dimensionValue' => 'dimensionValue', + 'metricValue' => 'metricValue' ], [ - 'name' => 'setName', - 'version' => 'setVersion', - 'type' => 'setType' + 'dimensionValue' => 'setDimensionValue', + 'metricValue' => 'setMetricValue' ], [ - 'name' => 'getName', - 'version' => 'getVersion', - 'type' => 'getType' + 'dimensionValue' => 'getDimensionValue', + 'metricValue' => 'getMetricValue' ], [ - 'name' => null, - 'version' => null, - 'type' => null + 'dimensionValue' => null, + 'metricValue' => null ], null ); @@ -81,9 +74,8 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['name'] = $data['name'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['type'] = $data['type'] ?? null; + $this->container['dimensionValue'] = $data['dimensionValue'] ?? null; + $this->container['metricValue'] = $data['metricValue'] ?? null; } /** @@ -111,73 +103,49 @@ public function valid() /** - * Gets name + * Gets dimensionValue * * @return string|null */ - public function getName() + public function getDimensionValue() { - return $this->container['name']; + return $this->container['dimensionValue']; } /** - * Sets name + * Sets dimensionValue * - * @param string|null $name The name of the browser used to view the video session. + * @param string|null $dimensionValue Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\". * * @return self */ - public function setName($name) + public function setDimensionValue($dimensionValue) { - $this->container['name'] = $name; + $this->container['dimensionValue'] = $dimensionValue; return $this; } /** - * Gets version + * Gets metricValue * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version The version of the browser used to view the video session. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets type - * - * @return string|null + * @return float|null */ - public function getType() + public function getMetricValue() { - return $this->container['type']; + return $this->container['metricValue']; } /** - * Sets type + * Sets metricValue * - * @param string|null $type The type of client used to view the video session. + * @param float|null $metricValue Returns the data for a specific dimension value. * * @return self */ - public function setType($type) + public function setMetricValue($metricValue) { - $this->container['type'] = $type; + $this->container['metricValue'] = $metricValue; return $this; } diff --git a/src/Model/AnalyticsMetricsOverTimeResponse.php b/src/Model/AnalyticsMetricsOverTimeResponse.php new file mode 100644 index 0000000..72ab4fc --- /dev/null +++ b/src/Model/AnalyticsMetricsOverTimeResponse.php @@ -0,0 +1,220 @@ + '\ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseContext', + 'data' => '\ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseData[]', + 'pagination' => '\ApiVideo\Client\Model\Pagination' + ], + [ + 'context' => null, + 'data' => null, + 'pagination' => null + ], + [ + 'context' => 'context', + 'data' => 'data', + 'pagination' => 'pagination' + ], + [ + 'context' => 'setContext', + 'data' => 'setData', + 'pagination' => 'setPagination' + ], + [ + 'context' => 'getContext', + 'data' => 'getData', + 'pagination' => 'getPagination' + ], + [ + 'context' => null, + 'data' => null, + 'pagination' => null + ], + null + ); + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = isset($data['context']) ? new AnalyticsMetricsOverTimeResponseContext($data['context']) : null; + $this->container['data'] = isset($data['data']) ? array_map(function(array $value): AnalyticsMetricsOverTimeResponseData { return new AnalyticsMetricsOverTimeResponseData($value); }, $data['data']) : null; + $this->container['pagination'] = isset($data['pagination']) ? new Pagination($data['pagination']) : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['pagination'] === null) { + $invalidProperties[] = "'pagination' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets context + * + * @return \ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseContext + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param \ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseContext $context context + * + * @return self + */ + public function setContext($context) + { + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets data + * + * @return \ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseData[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \ApiVideo\Client\Model\AnalyticsMetricsOverTimeResponseData[] $data Returns an array of metrics and the timestamps . + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets pagination + * + * @return \ApiVideo\Client\Model\Pagination + */ + public function getPagination() + { + return $this->container['pagination']; + } + + /** + * Sets pagination + * + * @param \ApiVideo\Client\Model\Pagination $pagination pagination + * + * @return self + */ + public function setPagination($pagination) + { + $this->container['pagination'] = $pagination; + + 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 + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/src/Model/AnalyticsMetricsOverTimeResponseContext.php b/src/Model/AnalyticsMetricsOverTimeResponseContext.php new file mode 100644 index 0000000..efc843e --- /dev/null +++ b/src/Model/AnalyticsMetricsOverTimeResponseContext.php @@ -0,0 +1,285 @@ + 'string', + 'interval' => 'string', + 'timeframe' => '\ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe' + ], + [ + 'metric' => null, + 'interval' => null, + 'timeframe' => null + ], + [ + 'metric' => 'metric', + 'interval' => 'interval', + 'timeframe' => 'timeframe' + ], + [ + 'metric' => 'setMetric', + 'interval' => 'setInterval', + 'timeframe' => 'setTimeframe' + ], + [ + 'metric' => 'getMetric', + 'interval' => 'getInterval', + 'timeframe' => 'getTimeframe' + ], + [ + 'metric' => null, + 'interval' => null, + 'timeframe' => null + ], + null + ); + } + + const METRIC_PLAY = 'play'; + const METRIC_PLAY_RATE = 'play-rate'; + const METRIC_START = 'start'; + const METRIC_END = 'end'; + const METRIC_IMPRESSION = 'impression'; + const INTERVAL_HOUR = 'hour'; + const INTERVAL_DAY = 'day'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMetricAllowableValues() + { + return [ + self::METRIC_PLAY, + self::METRIC_PLAY_RATE, + self::METRIC_START, + self::METRIC_END, + self::METRIC_IMPRESSION, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIntervalAllowableValues() + { + return [ + self::INTERVAL_HOUR, + self::INTERVAL_DAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['metric'] = $data['metric'] ?? null; + $this->container['interval'] = $data['interval'] ?? null; + $this->container['timeframe'] = isset($data['timeframe']) ? new AnalyticsAggregatedMetricsResponseContextTimeframe($data['timeframe']) : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($this->container['metric']) && !in_array($this->container['metric'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'metric', must be one of '%s'", + $this->container['metric'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getIntervalAllowableValues(); + if (!is_null($this->container['interval']) && !in_array($this->container['interval'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'interval', must be one of '%s'", + $this->container['interval'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets metric + * + * @return string|null + */ + public function getMetric() + { + return $this->container['metric']; + } + + /** + * Sets metric + * + * @param string|null $metric Returns the metric you selected. + * + * @return self + */ + public function setMetric($metric) + { + $allowedValues = $this->getMetricAllowableValues(); + if (!is_null($metric) && !in_array($metric, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'metric', must be one of '%s'", + $metric, + implode("', '", $allowedValues) + ) + ); + } + $this->container['metric'] = $metric; + + return $this; + } + + /** + * Gets interval + * + * @return string|null + */ + public function getInterval() + { + return $this->container['interval']; + } + + /** + * Sets interval + * + * @param string|null $interval Returns the interval you selected. + * + * @return self + */ + public function setInterval($interval) + { + $allowedValues = $this->getIntervalAllowableValues(); + if (!is_null($interval) && !in_array($interval, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'interval', must be one of '%s'", + $interval, + implode("', '", $allowedValues) + ) + ); + } + $this->container['interval'] = $interval; + + return $this; + } + + /** + * Gets timeframe + * + * @return \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null + */ + public function getTimeframe() + { + return $this->container['timeframe']; + } + + /** + * Sets timeframe + * + * @param \ApiVideo\Client\Model\AnalyticsAggregatedMetricsResponseContextTimeframe|null $timeframe timeframe + * + * @return self + */ + public function setTimeframe($timeframe) + { + $this->container['timeframe'] = $timeframe; + + 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 + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/src/Model/LiveStreamSessionLocation.php b/src/Model/AnalyticsMetricsOverTimeResponseData.php similarity index 61% rename from src/Model/LiveStreamSessionLocation.php rename to src/Model/AnalyticsMetricsOverTimeResponseData.php index bd44ca5..dc2c9f5 100644 --- a/src/Model/LiveStreamSessionLocation.php +++ b/src/Model/AnalyticsMetricsOverTimeResponseData.php @@ -17,43 +17,42 @@ use ApiVideo\Client\ObjectSerializer; /** - * LiveStreamSessionLocation Class Doc Comment + * AnalyticsMetricsOverTimeResponseData Class Doc Comment * * @category Class - * @description The location of the viewer of the live stream. * @package ApiVideo\Client * @template TKey int|null * @template TValue mixed|null */ -class LiveStreamSessionLocation implements ModelInterface, \JsonSerializable +class AnalyticsMetricsOverTimeResponseData implements ModelInterface, \JsonSerializable { public static function getDefinition(): ModelDefinition { return new ModelDefinition( - 'live-stream-session-location', + 'analytics_metrics_over_time_response_data', [ - 'country' => 'string', - 'city' => 'string' + 'emittedAt' => 'string', + 'metricValue' => 'float' ], [ - 'country' => null, - 'city' => null + 'emittedAt' => null, + 'metricValue' => 'float' ], [ - 'country' => 'country', - 'city' => 'city' + 'emittedAt' => 'emittedAt', + 'metricValue' => 'metricValue' ], [ - 'country' => 'setCountry', - 'city' => 'setCity' + 'emittedAt' => 'setEmittedAt', + 'metricValue' => 'setMetricValue' ], [ - 'country' => 'getCountry', - 'city' => 'getCity' + 'emittedAt' => 'getEmittedAt', + 'metricValue' => 'getMetricValue' ], [ - 'country' => null, - 'city' => null + 'emittedAt' => null, + 'metricValue' => null ], null ); @@ -75,8 +74,8 @@ public static function getDefinition(): ModelDefinition */ public function __construct(array $data = null) { - $this->container['country'] = $data['country'] ?? null; - $this->container['city'] = $data['city'] ?? null; + $this->container['emittedAt'] = $data['emittedAt'] ?? null; + $this->container['metricValue'] = $data['metricValue'] ?? null; } /** @@ -104,49 +103,49 @@ public function valid() /** - * Gets country + * Gets emittedAt * * @return string|null */ - public function getCountry() + public function getEmittedAt() { - return $this->container['country']; + return $this->container['emittedAt']; } /** - * Sets country + * Sets emittedAt * - * @param string|null $country The country of the viewer of the live stream. + * @param string|null $emittedAt Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. * * @return self */ - public function setCountry($country) + public function setEmittedAt($emittedAt) { - $this->container['country'] = $country; + $this->container['emittedAt'] = $emittedAt; return $this; } /** - * Gets city + * Gets metricValue * - * @return string|null + * @return float|null */ - public function getCity() + public function getMetricValue() { - return $this->container['city']; + return $this->container['metricValue']; } /** - * Sets city + * Sets metricValue * - * @param string|null $city The city of the viewer of the live stream. + * @param float|null $metricValue Returns the data for a specific metric value. * * @return self */ - public function setCity($city) + public function setMetricValue($metricValue) { - $this->container['city'] = $city; + $this->container['metricValue'] = $metricValue; return $this; } diff --git a/src/Model/LiveStreamSession.php b/src/Model/LiveStreamSession.php deleted file mode 100644 index f3e7fa0..0000000 --- a/src/Model/LiveStreamSession.php +++ /dev/null @@ -1,304 +0,0 @@ - '\ApiVideo\Client\Model\LiveStreamSessionSession', - 'location' => '\ApiVideo\Client\Model\LiveStreamSessionLocation', - 'referrer' => '\ApiVideo\Client\Model\LiveStreamSessionReferrer', - 'device' => '\ApiVideo\Client\Model\LiveStreamSessionDevice', - 'os' => '\ApiVideo\Client\Model\VideoSessionOs', - 'client' => '\ApiVideo\Client\Model\LiveStreamSessionClient' - ], - [ - 'session' => null, - 'location' => null, - 'referrer' => null, - 'device' => null, - 'os' => null, - 'client' => null - ], - [ - 'session' => 'session', - 'location' => 'location', - 'referrer' => 'referrer', - 'device' => 'device', - 'os' => 'os', - 'client' => 'client' - ], - [ - 'session' => 'setSession', - 'location' => 'setLocation', - 'referrer' => 'setReferrer', - 'device' => 'setDevice', - 'os' => 'setOs', - 'client' => 'setClient' - ], - [ - 'session' => 'getSession', - 'location' => 'getLocation', - 'referrer' => 'getReferrer', - 'device' => 'getDevice', - 'os' => 'getOs', - 'client' => 'getClient' - ], - [ - 'session' => null, - 'location' => null, - 'referrer' => null, - 'device' => null, - 'os' => null, - 'client' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['session'] = isset($data['session']) ? new LiveStreamSessionSession($data['session']) : null; - $this->container['location'] = isset($data['location']) ? new LiveStreamSessionLocation($data['location']) : null; - $this->container['referrer'] = isset($data['referrer']) ? new LiveStreamSessionReferrer($data['referrer']) : null; - $this->container['device'] = isset($data['device']) ? new LiveStreamSessionDevice($data['device']) : null; - $this->container['os'] = isset($data['os']) ? new VideoSessionOs($data['os']) : null; - $this->container['client'] = isset($data['client']) ? new LiveStreamSessionClient($data['client']) : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets session - * - * @return \ApiVideo\Client\Model\LiveStreamSessionSession|null - */ - public function getSession() - { - return $this->container['session']; - } - - /** - * Sets session - * - * @param \ApiVideo\Client\Model\LiveStreamSessionSession|null $session session - * - * @return self - */ - public function setSession($session) - { - $this->container['session'] = $session; - - return $this; - } - - /** - * Gets location - * - * @return \ApiVideo\Client\Model\LiveStreamSessionLocation|null - */ - public function getLocation() - { - return $this->container['location']; - } - - /** - * Sets location - * - * @param \ApiVideo\Client\Model\LiveStreamSessionLocation|null $location location - * - * @return self - */ - public function setLocation($location) - { - $this->container['location'] = $location; - - return $this; - } - - /** - * Gets referrer - * - * @return \ApiVideo\Client\Model\LiveStreamSessionReferrer|null - */ - public function getReferrer() - { - return $this->container['referrer']; - } - - /** - * Sets referrer - * - * @param \ApiVideo\Client\Model\LiveStreamSessionReferrer|null $referrer referrer - * - * @return self - */ - public function setReferrer($referrer) - { - $this->container['referrer'] = $referrer; - - return $this; - } - - /** - * Gets device - * - * @return \ApiVideo\Client\Model\LiveStreamSessionDevice|null - */ - public function getDevice() - { - return $this->container['device']; - } - - /** - * Sets device - * - * @param \ApiVideo\Client\Model\LiveStreamSessionDevice|null $device device - * - * @return self - */ - public function setDevice($device) - { - $this->container['device'] = $device; - - return $this; - } - - /** - * Gets os - * - * @return \ApiVideo\Client\Model\VideoSessionOs|null - */ - public function getOs() - { - return $this->container['os']; - } - - /** - * Sets os - * - * @param \ApiVideo\Client\Model\VideoSessionOs|null $os os - * - * @return self - */ - public function setOs($os) - { - $this->container['os'] = $os; - - return $this; - } - - /** - * Gets client - * - * @return \ApiVideo\Client\Model\LiveStreamSessionClient|null - */ - public function getClient() - { - return $this->container['client']; - } - - /** - * Sets client - * - * @param \ApiVideo\Client\Model\LiveStreamSessionClient|null $client client - * - * @return self - */ - public function setClient($client) - { - $this->container['client'] = $client; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/LiveStreamSessionClient.php b/src/Model/LiveStreamSessionClient.php deleted file mode 100644 index fdca8fb..0000000 --- a/src/Model/LiveStreamSessionClient.php +++ /dev/null @@ -1,212 +0,0 @@ - 'string', - 'version' => 'string', - 'type' => 'string' - ], - [ - 'name' => null, - 'version' => null, - 'type' => null - ], - [ - 'name' => 'name', - 'version' => 'version', - 'type' => 'type' - ], - [ - 'name' => 'setName', - 'version' => 'setVersion', - 'type' => 'setType' - ], - [ - 'name' => 'getName', - 'version' => 'getVersion', - 'type' => 'getType' - ], - [ - 'name' => null, - 'version' => null, - 'type' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['type'] = $data['type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name of the browser used to view the live stream session. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets version - * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version The version of the browser used to view the live stream session. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The type of client used to view the live stream session. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/LiveStreamSessionDevice.php b/src/Model/LiveStreamSessionDevice.php deleted file mode 100644 index ddc414b..0000000 --- a/src/Model/LiveStreamSessionDevice.php +++ /dev/null @@ -1,212 +0,0 @@ - 'string', - 'vendor' => 'string', - 'model' => 'string' - ], - [ - 'type' => null, - 'vendor' => null, - 'model' => null - ], - [ - 'type' => 'type', - 'vendor' => 'vendor', - 'model' => 'model' - ], - [ - 'type' => 'setType', - 'vendor' => 'setVendor', - 'model' => 'setModel' - ], - [ - 'type' => 'getType', - 'vendor' => 'getVendor', - 'model' => 'getModel' - ], - [ - 'type' => null, - 'vendor' => null, - 'model' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['vendor'] = $data['vendor'] ?? null; - $this->container['model'] = $data['model'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type What the type is like desktop, laptop, mobile. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets vendor - * - * @return string|null - */ - public function getVendor() - { - return $this->container['vendor']; - } - - /** - * Sets vendor - * - * @param string|null $vendor If known, what the brand of the device is, like Apple, Dell, etc. - * - * @return self - */ - public function setVendor($vendor) - { - $this->container['vendor'] = $vendor; - - return $this; - } - - /** - * Gets model - * - * @return string|null - */ - public function getModel() - { - return $this->container['model']; - } - - /** - * Sets model - * - * @param string|null $model The specific model of the device, if known. - * - * @return self - */ - public function setModel($model) - { - $this->container['model'] = $model; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/LiveStreamSessionReferrer.php b/src/Model/LiveStreamSessionReferrer.php deleted file mode 100644 index a9c60e2..0000000 --- a/src/Model/LiveStreamSessionReferrer.php +++ /dev/null @@ -1,242 +0,0 @@ - 'string', - 'medium' => 'string', - 'source' => 'string', - 'searchTerm' => 'string' - ], - [ - 'url' => null, - 'medium' => null, - 'source' => null, - 'searchTerm' => null - ], - [ - 'url' => 'url', - 'medium' => 'medium', - 'source' => 'source', - 'searchTerm' => 'searchTerm' - ], - [ - 'url' => 'setUrl', - 'medium' => 'setMedium', - 'source' => 'setSource', - 'searchTerm' => 'setSearchTerm' - ], - [ - 'url' => 'getUrl', - 'medium' => 'getMedium', - 'source' => 'getSource', - 'searchTerm' => 'getSearchTerm' - ], - [ - 'url' => null, - 'medium' => null, - 'source' => null, - 'searchTerm' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['url'] = $data['url'] ?? null; - $this->container['medium'] = $data['medium'] ?? null; - $this->container['source'] = $data['source'] ?? null; - $this->container['searchTerm'] = $data['searchTerm'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets url - * - * @return string|null - */ - public function getUrl() - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string|null $url The website the viewer of the live stream was referred to in order to view the live stream. - * - * @return self - */ - public function setUrl($url) - { - $this->container['url'] = $url; - - return $this; - } - - /** - * Gets medium - * - * @return string|null - */ - public function getMedium() - { - return $this->container['medium']; - } - - /** - * Sets medium - * - * @param string|null $medium The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. - * - * @return self - */ - public function setMedium($medium) - { - $this->container['medium'] = $medium; - - return $this; - } - - /** - * Gets source - * - * @return string|null - */ - public function getSource() - { - return $this->container['source']; - } - - /** - * Sets source - * - * @param string|null $source Where the viewer came from to see the live stream (usually where they searched from). - * - * @return self - */ - public function setSource($source) - { - $this->container['source'] = $source; - - return $this; - } - - /** - * Gets searchTerm - * - * @return string|null - */ - public function getSearchTerm() - { - return $this->container['searchTerm']; - } - - /** - * Sets searchTerm - * - * @param string|null $searchTerm What term they searched for that led them to the live stream. - * - * @return self - */ - public function setSearchTerm($searchTerm) - { - $this->container['searchTerm'] = $searchTerm; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/VideoSessionDevice.php b/src/Model/UnrecognizedRequestUrl.php similarity index 69% rename from src/Model/VideoSessionDevice.php rename to src/Model/UnrecognizedRequestUrl.php index 00e9931..69053ed 100644 --- a/src/Model/VideoSessionDevice.php +++ b/src/Model/UnrecognizedRequestUrl.php @@ -17,49 +17,48 @@ use ApiVideo\Client\ObjectSerializer; /** - * VideoSessionDevice Class Doc Comment + * UnrecognizedRequestUrl Class Doc Comment * * @category Class - * @description What type of device the user is on when in the video session. * @package ApiVideo\Client * @template TKey int|null * @template TValue mixed|null */ -class VideoSessionDevice implements ModelInterface, \JsonSerializable +class UnrecognizedRequestUrl implements ModelInterface, \JsonSerializable { public static function getDefinition(): ModelDefinition { return new ModelDefinition( - 'video-session-device', + 'unrecognized-request-url', [ 'type' => 'string', - 'vendor' => 'string', - 'model' => 'string' + 'title' => 'string', + 'status' => 'int' ], [ 'type' => null, - 'vendor' => null, - 'model' => null + 'title' => null, + 'status' => null ], [ 'type' => 'type', - 'vendor' => 'vendor', - 'model' => 'model' + 'title' => 'title', + 'status' => 'status' ], [ 'type' => 'setType', - 'vendor' => 'setVendor', - 'model' => 'setModel' + 'title' => 'setTitle', + 'status' => 'setStatus' ], [ 'type' => 'getType', - 'vendor' => 'getVendor', - 'model' => 'getModel' + 'title' => 'getTitle', + 'status' => 'getStatus' ], [ 'type' => null, - 'vendor' => null, - 'model' => null + 'title' => null, + 'status' => null ], null ); @@ -82,8 +81,8 @@ public static function getDefinition(): ModelDefinition public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; - $this->container['vendor'] = $data['vendor'] ?? null; - $this->container['model'] = $data['model'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -123,7 +122,7 @@ public function getType() /** * Sets type * - * @param string|null $type What the type is like desktop, laptop, mobile. + * @param string|null $type A link to the error documentation. * * @return self */ @@ -135,49 +134,49 @@ public function setType($type) } /** - * Gets vendor + * Gets title * * @return string|null */ - public function getVendor() + public function getTitle() { - return $this->container['vendor']; + return $this->container['title']; } /** - * Sets vendor + * Sets title * - * @param string|null $vendor If known, what the brand of the device is, like Apple, Dell, etc. + * @param string|null $title A description of the error that occurred. * * @return self */ - public function setVendor($vendor) + public function setTitle($title) { - $this->container['vendor'] = $vendor; + $this->container['title'] = $title; return $this; } /** - * Gets model + * Gets status * - * @return string|null + * @return int|null */ - public function getModel() + public function getStatus() { - return $this->container['model']; + return $this->container['status']; } /** - * Sets model + * Sets status * - * @param string|null $model The specific model of the device, if known. + * @param int|null $status The HTTP status code. * * @return self */ - public function setModel($model) + public function setStatus($status) { - $this->container['model'] = $model; + $this->container['status'] = $status; return $this; } diff --git a/src/Model/VideoSession.php b/src/Model/VideoSession.php deleted file mode 100644 index fb6b838..0000000 --- a/src/Model/VideoSession.php +++ /dev/null @@ -1,304 +0,0 @@ - '\ApiVideo\Client\Model\VideoSessionSession', - 'location' => '\ApiVideo\Client\Model\VideoSessionLocation', - 'referrer' => '\ApiVideo\Client\Model\VideoSessionReferrer', - 'device' => '\ApiVideo\Client\Model\VideoSessionDevice', - 'os' => '\ApiVideo\Client\Model\VideoSessionOs', - 'client' => '\ApiVideo\Client\Model\VideoSessionClient' - ], - [ - 'session' => null, - 'location' => null, - 'referrer' => null, - 'device' => null, - 'os' => null, - 'client' => null - ], - [ - 'session' => 'session', - 'location' => 'location', - 'referrer' => 'referrer', - 'device' => 'device', - 'os' => 'os', - 'client' => 'client' - ], - [ - 'session' => 'setSession', - 'location' => 'setLocation', - 'referrer' => 'setReferrer', - 'device' => 'setDevice', - 'os' => 'setOs', - 'client' => 'setClient' - ], - [ - 'session' => 'getSession', - 'location' => 'getLocation', - 'referrer' => 'getReferrer', - 'device' => 'getDevice', - 'os' => 'getOs', - 'client' => 'getClient' - ], - [ - 'session' => null, - 'location' => null, - 'referrer' => null, - 'device' => null, - 'os' => null, - 'client' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['session'] = isset($data['session']) ? new VideoSessionSession($data['session']) : null; - $this->container['location'] = isset($data['location']) ? new VideoSessionLocation($data['location']) : null; - $this->container['referrer'] = isset($data['referrer']) ? new VideoSessionReferrer($data['referrer']) : null; - $this->container['device'] = isset($data['device']) ? new VideoSessionDevice($data['device']) : null; - $this->container['os'] = isset($data['os']) ? new VideoSessionOs($data['os']) : null; - $this->container['client'] = isset($data['client']) ? new VideoSessionClient($data['client']) : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets session - * - * @return \ApiVideo\Client\Model\VideoSessionSession|null - */ - public function getSession() - { - return $this->container['session']; - } - - /** - * Sets session - * - * @param \ApiVideo\Client\Model\VideoSessionSession|null $session session - * - * @return self - */ - public function setSession($session) - { - $this->container['session'] = $session; - - return $this; - } - - /** - * Gets location - * - * @return \ApiVideo\Client\Model\VideoSessionLocation|null - */ - public function getLocation() - { - return $this->container['location']; - } - - /** - * Sets location - * - * @param \ApiVideo\Client\Model\VideoSessionLocation|null $location location - * - * @return self - */ - public function setLocation($location) - { - $this->container['location'] = $location; - - return $this; - } - - /** - * Gets referrer - * - * @return \ApiVideo\Client\Model\VideoSessionReferrer|null - */ - public function getReferrer() - { - return $this->container['referrer']; - } - - /** - * Sets referrer - * - * @param \ApiVideo\Client\Model\VideoSessionReferrer|null $referrer referrer - * - * @return self - */ - public function setReferrer($referrer) - { - $this->container['referrer'] = $referrer; - - return $this; - } - - /** - * Gets device - * - * @return \ApiVideo\Client\Model\VideoSessionDevice|null - */ - public function getDevice() - { - return $this->container['device']; - } - - /** - * Sets device - * - * @param \ApiVideo\Client\Model\VideoSessionDevice|null $device device - * - * @return self - */ - public function setDevice($device) - { - $this->container['device'] = $device; - - return $this; - } - - /** - * Gets os - * - * @return \ApiVideo\Client\Model\VideoSessionOs|null - */ - public function getOs() - { - return $this->container['os']; - } - - /** - * Sets os - * - * @param \ApiVideo\Client\Model\VideoSessionOs|null $os os - * - * @return self - */ - public function setOs($os) - { - $this->container['os'] = $os; - - return $this; - } - - /** - * Gets client - * - * @return \ApiVideo\Client\Model\VideoSessionClient|null - */ - public function getClient() - { - return $this->container['client']; - } - - /** - * Sets client - * - * @param \ApiVideo\Client\Model\VideoSessionClient|null $client client - * - * @return self - */ - public function setClient($client) - { - $this->container['client'] = $client; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/VideoSessionOs.php b/src/Model/VideoSessionOs.php deleted file mode 100644 index ed647c8..0000000 --- a/src/Model/VideoSessionOs.php +++ /dev/null @@ -1,212 +0,0 @@ - 'string', - 'shortname' => 'string', - 'version' => 'string' - ], - [ - 'name' => null, - 'shortname' => null, - 'version' => null - ], - [ - 'name' => 'name', - 'shortname' => 'shortname', - 'version' => 'version' - ], - [ - 'name' => 'setName', - 'shortname' => 'setShortname', - 'version' => 'setVersion' - ], - [ - 'name' => 'getName', - 'shortname' => 'getShortname', - 'version' => 'getVersion' - ], - [ - 'name' => null, - 'shortname' => null, - 'version' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['shortname'] = $data['shortname'] ?? null; - $this->container['version'] = $data['version'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name of the operating system. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets shortname - * - * @return string|null - */ - public function getShortname() - { - return $this->container['shortname']; - } - - /** - * Sets shortname - * - * @param string|null $shortname The nickname for the operating system, often representing the version. - * - * @return self - */ - public function setShortname($shortname) - { - $this->container['shortname'] = $shortname; - - return $this; - } - - /** - * Gets version - * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version The version of the operating system. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/VideoSessionReferrer.php b/src/Model/VideoSessionReferrer.php deleted file mode 100644 index c2cd0fa..0000000 --- a/src/Model/VideoSessionReferrer.php +++ /dev/null @@ -1,242 +0,0 @@ - 'string', - 'medium' => 'string', - 'source' => 'string', - 'searchTerm' => 'string' - ], - [ - 'url' => null, - 'medium' => null, - 'source' => null, - 'searchTerm' => null - ], - [ - 'url' => 'url', - 'medium' => 'medium', - 'source' => 'source', - 'searchTerm' => 'searchTerm' - ], - [ - 'url' => 'setUrl', - 'medium' => 'setMedium', - 'source' => 'setSource', - 'searchTerm' => 'setSearchTerm' - ], - [ - 'url' => 'getUrl', - 'medium' => 'getMedium', - 'source' => 'getSource', - 'searchTerm' => 'getSearchTerm' - ], - [ - 'url' => null, - 'medium' => null, - 'source' => null, - 'searchTerm' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['url'] = $data['url'] ?? null; - $this->container['medium'] = $data['medium'] ?? null; - $this->container['source'] = $data['source'] ?? null; - $this->container['searchTerm'] = $data['searchTerm'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets url - * - * @return string|null - */ - public function getUrl() - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string|null $url The link the viewer used to reach the video session. - * - * @return self - */ - public function setUrl($url) - { - $this->container['url'] = $url; - - return $this; - } - - /** - * Gets medium - * - * @return string|null - */ - public function getMedium() - { - return $this->container['medium']; - } - - /** - * Sets medium - * - * @param string|null $medium How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. - * - * @return self - */ - public function setMedium($medium) - { - $this->container['medium'] = $medium; - - return $this; - } - - /** - * Gets source - * - * @return string|null - */ - public function getSource() - { - return $this->container['source']; - } - - /** - * Sets source - * - * @param string|null $source The source the referrer came from to the video session. For example if they searched through google to find the stream. - * - * @return self - */ - public function setSource($source) - { - $this->container['source'] = $source; - - return $this; - } - - /** - * Gets searchTerm - * - * @return string|null - */ - public function getSearchTerm() - { - return $this->container['searchTerm']; - } - - /** - * Sets searchTerm - * - * @param string|null $searchTerm The search term they typed to arrive at the video session. - * - * @return self - */ - public function setSearchTerm($searchTerm) - { - $this->container['searchTerm'] = $searchTerm; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - - diff --git a/src/Model/VideoSessionSession.php b/src/Model/VideoSessionSession.php deleted file mode 100644 index 9fd984f..0000000 --- a/src/Model/VideoSessionSession.php +++ /dev/null @@ -1,242 +0,0 @@ - 'string', - 'loadedAt' => '\DateTime', - 'endedAt' => '\DateTime', - 'metadata' => '\ApiVideo\Client\Model\Metadata[]' - ], - [ - 'sessionId' => null, - 'loadedAt' => 'date-time', - 'endedAt' => 'date-time', - 'metadata' => null - ], - [ - 'sessionId' => 'sessionId', - 'loadedAt' => 'loadedAt', - 'endedAt' => 'endedAt', - 'metadata' => 'metadata' - ], - [ - 'sessionId' => 'setSessionId', - 'loadedAt' => 'setLoadedAt', - 'endedAt' => 'setEndedAt', - 'metadata' => 'setMetadata' - ], - [ - 'sessionId' => 'getSessionId', - 'loadedAt' => 'getLoadedAt', - 'endedAt' => 'getEndedAt', - 'metadata' => 'getMetadata' - ], - [ - 'sessionId' => null, - 'loadedAt' => null, - 'endedAt' => null, - 'metadata' => null - ], - null - ); - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['sessionId'] = $data['sessionId'] ?? null; - $this->container['loadedAt'] = isset($data['loadedAt']) ? new \DateTime($data['loadedAt']) : null; - $this->container['endedAt'] = isset($data['endedAt']) ? new \DateTime($data['endedAt']) : null; - $this->container['metadata'] = isset($data['metadata']) ? array_map(function(array $value): Metadata { return new Metadata($value); }, $data['metadata']) : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets sessionId - * - * @return string|null - */ - public function getSessionId() - { - return $this->container['sessionId']; - } - - /** - * Sets sessionId - * - * @param string|null $sessionId The unique identifier for the session that you can use to track what happens during it. - * - * @return self - */ - public function setSessionId($sessionId) - { - $this->container['sessionId'] = $sessionId; - - return $this; - } - - /** - * Gets loadedAt - * - * @return \DateTime|null - */ - public function getLoadedAt() - { - return $this->container['loadedAt']; - } - - /** - * Sets loadedAt - * - * @param \DateTime|null $loadedAt When the video session started, presented in ISO-8601 format. - * - * @return self - */ - public function setLoadedAt($loadedAt) - { - $this->container['loadedAt'] = $loadedAt; - - return $this; - } - - /** - * Gets endedAt - * - * @return \DateTime|null - */ - public function getEndedAt() - { - return $this->container['endedAt']; - } - - /** - * Sets endedAt - * - * @param \DateTime|null $endedAt When the video session ended, presented in ISO-8601 format. - * - * @return self - */ - public function setEndedAt($endedAt) - { - $this->container['endedAt'] = $endedAt; - - return $this; - } - - /** - * Gets metadata - * - * @return \ApiVideo\Client\Model\Metadata[]|null - */ - public function getMetadata() - { - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param \ApiVideo\Client\Model\Metadata[]|null $metadata A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. - * - * @return self - */ - public function setMetadata($metadata) - { - $this->container['metadata'] = $metadata; - - 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 - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} - -