diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ccad4c1..1f69d82 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -24,6 +24,7 @@ Sources/Models/Environment.swift Sources/Models/Metadata.swift Sources/Models/NotFound.swift Sources/Models/RefreshTokenPayload.swift +Sources/Models/TooManyRequests.swift Sources/Models/Video.swift Sources/Models/VideoAssets.swift Sources/Models/VideoSource.swift @@ -43,6 +44,7 @@ docs/BadRequest.md docs/Metadata.md docs/NotFound.md docs/RefreshTokenPayload.md +docs/TooManyRequests.md docs/Video.md docs/VideoAssets.md docs/VideoSource.md diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index ee88061..2e368be 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -5678c55d78ebee898e89b47215b59cb855d1997cdda9202292548ec786d8e9f5 \ No newline at end of file +6f6d12eb33f0d5084520aa50a9dc9b3da87129501775807a5ed06bbf66485298 \ No newline at end of file diff --git a/README.md b/README.md index 7f67aad..bcb92e0 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ Method | HTTP request | Description - [Metadata](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/Metadata.md) - [NotFound](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/NotFound.md) - [RefreshTokenPayload](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/RefreshTokenPayload.md) + - [TooManyRequests](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/TooManyRequests.md) - [Video](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/Video.md) - [VideoAssets](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoAssets.md) - [VideoSource](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoSource.md) diff --git a/Sources/Models/TooManyRequests.swift b/Sources/Models/TooManyRequests.swift new file mode 100644 index 0000000..62133ba --- /dev/null +++ b/Sources/Models/TooManyRequests.swift @@ -0,0 +1,43 @@ +// +// TooManyRequests.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TooManyRequests: Codable, Hashable { + + /** A link to the error documentation. */ + public var type: String? + /** A description of the error that occurred. */ + public var title: String? + /** The HTTP status code. */ + public var status: Int? + + public init(type: String? = nil, title: String? = nil, status: Int? = nil) { + self.type = type + self.title = title + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case type + case title + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(title, forKey: .title) + try container.encodeIfPresent(status, forKey: .status) + } +} + diff --git a/Tests/TestResources/payloads/videos/upload/responses/429.json b/Tests/TestResources/payloads/videos/upload/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/Tests/TestResources/payloads/videos/upload/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/429.json b/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/429.json new file mode 100644 index 0000000..d312e2b --- /dev/null +++ b/Tests/TestResources/payloads/videos/uploadWithUploadToken/responses/429.json @@ -0,0 +1,5 @@ +{ + "type" : "https://docs.api.video/reference/too-many-requests", + "title" : "Too many requests.", + "status" : 429 +} \ No newline at end of file diff --git a/docs/TooManyRequests.md b/docs/TooManyRequests.md new file mode 100644 index 0000000..e010de3 --- /dev/null +++ b/docs/TooManyRequests.md @@ -0,0 +1,12 @@ +# TooManyRequests + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +