diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index c8d66fb..722172f 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -b89163ac996bc8f2bcaf0a054a6a9c28de9b0cf52e16fbcb17055f42852e2a57 \ No newline at end of file +537e3bf0e0c693d71e97957e0415808809b7ced990706c2592da7111f091fe56 \ No newline at end of file diff --git a/Sources/Models/Video.swift b/Sources/Models/Video.swift index c33a245..2204749 100644 --- a/Sources/Models/Video.swift +++ b/Sources/Models/Video.swift @@ -14,19 +14,25 @@ public struct Video: Codable, Hashable { /** The unique identifier of the video object. */ public var videoId: String - /** When a video was created, presented in ISO-8601 format. */ + /** When a video was created, presented in ATOM UTC format. */ public var createdAt: Date? /** The title of the video content. */ public var title: String? /** A description for the video content. */ public var description: String? - /** The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. */ + /** The date and time the API created the video. Date and time are provided using ATOM UTC format. */ public var publishedAt: Date? - /** The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. */ + /** The date and time the video was updated. Date and time are provided using ATOM UTC format. */ public var updatedAt: Date? + /** The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. */ + public var discardedAt: Date? + /** The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. */ + public var deletesAt: Date? + /** Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. */ + public var discarded: Bool? /** One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. */ public var tags: [String]? - /** Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. */ + /** Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. */ public var metadata: [Metadata]? public var source: VideoSource? public var assets: VideoAssets? @@ -39,13 +45,16 @@ public struct Video: Codable, Hashable { /** This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video. */ public var mp4Support: Bool? - public init(videoId: String, createdAt: Date? = nil, title: String? = nil, description: String? = nil, publishedAt: Date? = nil, updatedAt: Date? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, source: VideoSource? = nil, assets: VideoAssets? = nil, playerId: String? = nil, _public: Bool? = nil, panoramic: Bool? = nil, mp4Support: Bool? = nil) { + public init(videoId: String, createdAt: Date? = nil, title: String? = nil, description: String? = nil, publishedAt: Date? = nil, updatedAt: Date? = nil, discardedAt: Date? = nil, deletesAt: Date? = nil, discarded: Bool? = nil, tags: [String]? = nil, metadata: [Metadata]? = nil, source: VideoSource? = nil, assets: VideoAssets? = nil, playerId: String? = nil, _public: Bool? = nil, panoramic: Bool? = nil, mp4Support: Bool? = nil) { self.videoId = videoId self.createdAt = createdAt self.title = title self.description = description self.publishedAt = publishedAt self.updatedAt = updatedAt + self.discardedAt = discardedAt + self.deletesAt = deletesAt + self.discarded = discarded self.tags = tags self.metadata = metadata self.source = source @@ -63,6 +72,9 @@ public struct Video: Codable, Hashable { case description case publishedAt case updatedAt + case discardedAt + case deletesAt + case discarded case tags case metadata case source @@ -83,6 +95,9 @@ public struct Video: Codable, Hashable { try container.encodeIfPresent(description, forKey: .description) try container.encodeIfPresent(publishedAt, forKey: .publishedAt) try container.encodeIfPresent(updatedAt, forKey: .updatedAt) + try container.encodeIfPresent(discardedAt, forKey: .discardedAt) + try container.encodeIfPresent(deletesAt, forKey: .deletesAt) + try container.encodeIfPresent(discarded, forKey: .discarded) try container.encodeIfPresent(tags, forKey: .tags) try container.encodeIfPresent(metadata, forKey: .metadata) try container.encodeIfPresent(source, forKey: .source) diff --git a/Tests/TestResources/payloads/videos/upload/responses/201.json b/Tests/TestResources/payloads/videos/upload/responses/201.json index a7f6cca..38528b6 100644 --- a/Tests/TestResources/payloads/videos/upload/responses/201.json +++ b/Tests/TestResources/payloads/videos/upload/responses/201.json @@ -14,7 +14,8 @@ "key" : "Format", "value" : "Tutorial" } ], - "publishedAt" : "4665-07-14T23:36:18.598Z", + "publishedAt" : "2024-07-14T23:36:07+00:00", + "discarded" : false, "source" : { "uri" : "/videos/vi4blUQJFrYWbaG44NChkH27/source" }, diff --git a/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/201.json b/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/201.json index 4769217..8aeb102 100644 --- a/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/201.json +++ b/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/201.json @@ -13,7 +13,8 @@ "key" : "Format", "value" : "Tutorial" } ], - "publishedAt" : "4665-07-14T23:36:18.598Z", + "publishedAt" : "2024-07-14T23:36:07+00:00", + "discarded" : false, "source" : { "uri" : "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source" }, diff --git a/docs/Video.md b/docs/Video.md index 8ca8b89..2156f95 100644 --- a/docs/Video.md +++ b/docs/Video.md @@ -4,13 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **videoId** | **String** | The unique identifier of the video object. | -**createdAt** | **Date** | When a video was created, presented in ISO-8601 format. | [optional] +**createdAt** | **Date** | When a video was created, presented in ATOM UTC format. | [optional] **title** | **String** | The title of the video content. | [optional] **description** | **String** | A description for the video content. | [optional] -**publishedAt** | **Date** | The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. | [optional] -**updatedAt** | **Date** | The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. | [optional] +**publishedAt** | **Date** | The date and time the API created the video. Date and time are provided using ATOM UTC format. | [optional] +**updatedAt** | **Date** | The date and time the video was updated. Date and time are provided using ATOM UTC format. | [optional] +**discardedAt** | **Date** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional] +**deletesAt** | **Date** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional] +**discarded** | **Bool** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional] **tags** | **[String]** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional] -**metadata** | [Metadata] | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair. | [optional] +**metadata** | [Metadata] | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional] **source** | [**VideoSource**](VideoSource.md) | | [optional] **assets** | [**VideoAssets**](VideoAssets.md) | | [optional] **playerId** | **String** | The id of the player that will be applied on the video. | [optional]