From da4a0cc178a269f396186d8322932acbac75308d Mon Sep 17 00:00:00 2001 From: Husnjak Date: Thu, 13 Mar 2025 15:04:50 +0100 Subject: [PATCH 1/2] Enums to Tables migration --- IGDB-SWIFT-API.podspec | 28 +- Package.resolved | 13 +- Package.swift | 5 +- .../APIStructs/igdbapi.pb.swift | 3823 ++++++++++++++--- .../IGDB-SWIFT-API/Wrapper/Endpoints.swift | 16 +- .../IGDB-SWIFT-API/Wrapper/IGDBWrapper.swift | 126 +- .../IGDB-SWIFT-API/Wrapper/JsonRequest.swift | 64 + .../IGDB-SWIFT-API/Wrapper/ProtoRequest.swift | 204 +- .../IGDB-SWIFT-APITests/TestIGDBWrapper.swift | 6 +- .../TestProtobufRequest.swift | 304 +- Tests/IGDB-SWIFT-APITests/TestProxy.swift | 6 +- 11 files changed, 3914 insertions(+), 681 deletions(-) diff --git a/IGDB-SWIFT-API.podspec b/IGDB-SWIFT-API.podspec index aa8d9fc..20cf0d1 100644 --- a/IGDB-SWIFT-API.podspec +++ b/IGDB-SWIFT-API.podspec @@ -1,20 +1,22 @@ Pod::Spec.new do |s| s.name = 'IGDB-SWIFT-API' - s.version = ENV['LIB_VERSION'] || '0.4.4' + s.version = ENV['LIB_VERSION'] || '0.5.0' s.summary = 'Wrapper for IGDBs API written in Swift.' - s.description = "A Swift wrapper for the IGDB.com Free Video Game Database API." - s.documentation_url = "https://api-docs.igdb.com" - s.homepage = 'https://github.com/husnjak/IGDB-API-SWIFT' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'Filip Husnjak' => 'filip@igdb.com' } - s.source = { :git => 'https://github.com/husnjak/IGDB-API-SWIFT.git', :tag => s.version.to_s } - s.platforms = { :ios => "12.2", :osx => "10.15", :watchos => "7" } - s.ios.deployment_target = '12.0' + s.description = 'A Swift wrapper for the IGDB.com Free Video Game Database API.' + s.documentation_url = 'https://api-docs.igdb.com' + s.homepage = 'https://github.com/husnjak/IGDB-API-SWIFT' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'Filip Husnjak' => 'filip@igdb.com' } + s.source = { :git => 'https://github.com/husnjak/IGDB-API-SWIFT.git', :tag => s.version.to_s } + + # Align platform versions with deployment targets + s.ios.deployment_target = '13.0' s.osx.deployment_target = '10.15' s.watchos.deployment_target = '7.0' - s.swift_version = '5.0' - s.source_files = 'Sources/IGDB-SWIFT-API/**/*.swift' + + s.swift_version = '5.0' + s.source_files = 'Sources/IGDB-SWIFT-API/**/*.swift' + + s.dependency 'SwiftProtobuf', '~> 1.29.0' - s.dependency 'SwiftProtobuf', '~> 1.25.1' - s.dependency 'Just', '~> 0.8.0' end diff --git a/Package.resolved b/Package.resolved index 1b98e93..33bd9df 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,22 +1,13 @@ { "object": { "pins": [ - { - "package": "Just", - "repositoryURL": "https://github.com/dduan/Just.git", - "state": { - "branch": null, - "revision": "1824bf84cf52d11d69ae20cfb89f0ce5bffa5650", - "version": "0.8.0" - } - }, { "package": "SwiftProtobuf", "repositoryURL": "https://github.com/apple/swift-protobuf.git", "state": { "branch": null, - "revision": "07f7f26ded8df9645c072f220378879c4642e063", - "version": "1.25.1" + "revision": "d72aed98f8253ec1aa9ea1141e28150f408cf17f", + "version": "1.29.0" } } ] diff --git a/Package.swift b/Package.swift index 5c38165..c773219 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ let package = Package( name: "IGDB-SWIFT-API", platforms: [ .macOS(.v10_15), - .iOS(.v12), + .iOS(.v13), .watchOS(.v6) ], products: [ @@ -16,13 +16,12 @@ let package = Package( targets: ["IGDB-SWIFT-API"]), ], dependencies: [ - .package(url: "https://github.com/dduan/Just.git", from: "0.8.0"), .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.25.1") ], targets: [ .target( name: "IGDB-SWIFT-API", - dependencies: ["Just", "SwiftProtobuf"]), + dependencies: ["SwiftProtobuf"]), .testTarget( name: "IGDB-SWIFT-APITests", dependencies: ["IGDB-SWIFT-API"]), diff --git a/Sources/IGDB-SWIFT-API/APIStructs/igdbapi.pb.swift b/Sources/IGDB-SWIFT-API/APIStructs/igdbapi.pb.swift index e2c0112..72ebb6a 100644 --- a/Sources/IGDB-SWIFT-API/APIStructs/igdbapi.pb.swift +++ b/Sources/IGDB-SWIFT-API/APIStructs/igdbapi.pb.swift @@ -7,6 +7,12 @@ // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ +// +// igdbapi.proto +// IGDB-SWIFT-API +// +// Created by Husnjak, Filip on 2025-03-13. + import Foundation import SwiftProtobuf @@ -836,6 +842,7 @@ public enum Proto_WebsiteCategoryEnum: SwiftProtobuf.Enum { case websiteEpicgames // = 16 case websiteGog // = 17 case websiteDiscord // = 18 + case websiteBluesky // = 19 case UNRECOGNIZED(Int) public init() { @@ -862,6 +869,7 @@ public enum Proto_WebsiteCategoryEnum: SwiftProtobuf.Enum { case 16: self = .websiteEpicgames case 17: self = .websiteGog case 18: self = .websiteDiscord + case 19: self = .websiteBluesky default: self = .UNRECOGNIZED(rawValue) } } @@ -886,6 +894,7 @@ public enum Proto_WebsiteCategoryEnum: SwiftProtobuf.Enum { case .websiteEpicgames: return 16 case .websiteGog: return 17 case .websiteDiscord: return 18 + case .websiteBluesky: return 19 case .UNRECOGNIZED(let i): return i } } @@ -915,6 +924,7 @@ extension Proto_WebsiteCategoryEnum: CaseIterable { .websiteEpicgames, .websiteGog, .websiteDiscord, + .websiteBluesky, ] } @@ -1597,23 +1607,128 @@ public struct Proto_AgeRating { // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var id: UInt64 = 0 + public var id: UInt64 { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var category: Proto_AgeRatingCategoryEnum { + get {return _storage._category} + set {_uniqueStorage()._category = newValue} + } + + public var contentDescriptions: [Proto_AgeRatingContentDescription] { + get {return _storage._contentDescriptions} + set {_uniqueStorage()._contentDescriptions = newValue} + } + + public var rating: Proto_AgeRatingRatingEnum { + get {return _storage._rating} + set {_uniqueStorage()._rating = newValue} + } + + public var ratingCoverURL: String { + get {return _storage._ratingCoverURL} + set {_uniqueStorage()._ratingCoverURL = newValue} + } + + public var synopsis: String { + get {return _storage._synopsis} + set {_uniqueStorage()._synopsis = newValue} + } + + public var checksum: String { + get {return _storage._checksum} + set {_uniqueStorage()._checksum = newValue} + } + + public var organization: Proto_AgeRatingOrganization { + get {return _storage._organization ?? Proto_AgeRatingOrganization()} + set {_uniqueStorage()._organization = newValue} + } + /// Returns true if `organization` has been explicitly set. + public var hasOrganization: Bool {return _storage._organization != nil} + /// Clears the value of `organization`. Subsequent reads from it will return its default value. + public mutating func clearOrganization() {_uniqueStorage()._organization = nil} + + public var ratingCategory: Proto_AgeRatingCategory { + get {return _storage._ratingCategory ?? Proto_AgeRatingCategory()} + set {_uniqueStorage()._ratingCategory = newValue} + } + /// Returns true if `ratingCategory` has been explicitly set. + public var hasRatingCategory: Bool {return _storage._ratingCategory != nil} + /// Clears the value of `ratingCategory`. Subsequent reads from it will return its default value. + public mutating func clearRatingCategory() {_uniqueStorage()._ratingCategory = nil} + + public var ratingContentDescriptions: [Proto_AgeRatingContentDescriptionV2] { + get {return _storage._ratingContentDescriptions} + set {_uniqueStorage()._ratingContentDescriptions = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Proto_AgeRatingCategoryResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var ageratingcategories: [Proto_AgeRatingCategory] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_AgeRatingCategory { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. - public var category: Proto_AgeRatingCategoryEnum = .ageratingCategoryNull + public var id: UInt64 = 0 - public var contentDescriptions: [Proto_AgeRatingContentDescription] = [] + public var rating: String = String() - public var rating: Proto_AgeRatingRatingEnum = .ageratingRatingNull + public var organization: Proto_AgeRatingOrganization { + get {return _organization ?? Proto_AgeRatingOrganization()} + set {_organization = newValue} + } + /// Returns true if `organization` has been explicitly set. + public var hasOrganization: Bool {return self._organization != nil} + /// Clears the value of `organization`. Subsequent reads from it will return its default value. + public mutating func clearOrganization() {self._organization = nil} - public var ratingCoverURL: String = String() + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} - public var synopsis: String = String() + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} public var checksum: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} + + fileprivate var _organization: Proto_AgeRatingOrganization? = nil + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil } public struct Proto_AgeRatingContentDescriptionResult { @@ -1646,6 +1761,114 @@ public struct Proto_AgeRatingContentDescription { public init() {} } +public struct Proto_AgeRatingContentDescriptionV2Result { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var ageratingcontentdescriptionsv2: [Proto_AgeRatingContentDescriptionV2] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_AgeRatingContentDescriptionV2 { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var description_p: String = String() + + public var organization: Proto_AgeRatingOrganization { + get {return _organization ?? Proto_AgeRatingOrganization()} + set {_organization = newValue} + } + /// Returns true if `organization` has been explicitly set. + public var hasOrganization: Bool {return self._organization != nil} + /// Clears the value of `organization`. Subsequent reads from it will return its default value. + public mutating func clearOrganization() {self._organization = nil} + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _organization: Proto_AgeRatingOrganization? = nil + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_AgeRatingOrganizationResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var ageratingorganizations: [Proto_AgeRatingOrganization] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_AgeRatingOrganization { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var name: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_AlternativeNameResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1835,6 +2058,24 @@ public struct Proto_Character { set {_uniqueStorage()._checksum = newValue} } + public var characterGender: Proto_CharacterGender { + get {return _storage._characterGender ?? Proto_CharacterGender()} + set {_uniqueStorage()._characterGender = newValue} + } + /// Returns true if `characterGender` has been explicitly set. + public var hasCharacterGender: Bool {return _storage._characterGender != nil} + /// Clears the value of `characterGender`. Subsequent reads from it will return its default value. + public mutating func clearCharacterGender() {_uniqueStorage()._characterGender = nil} + + public var characterSpecies: Proto_CharacterSpecie { + get {return _storage._characterSpecies ?? Proto_CharacterSpecie()} + set {_uniqueStorage()._characterSpecies = newValue} + } + /// Returns true if `characterSpecies` has been explicitly set. + public var hasCharacterSpecies: Bool {return _storage._characterSpecies != nil} + /// Clears the value of `characterSpecies`. Subsequent reads from it will return its default value. + public mutating func clearCharacterSpecies() {_uniqueStorage()._characterSpecies = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -1842,6 +2083,55 @@ public struct Proto_Character { fileprivate var _storage = _StorageClass.defaultInstance } +public struct Proto_CharacterGenderResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var charactergenders: [Proto_CharacterGender] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_CharacterGender { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var name: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_CharacterMugShotResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1880,55 +2170,104 @@ public struct Proto_CharacterMugShot { public init() {} } -public struct Proto_CollectionResult { +public struct Proto_CharacterSpecieResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var collections: [Proto_Collection] = [] + public var characterspecies: [Proto_CharacterSpecie] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } -public struct Proto_Collection { +public struct Proto_CharacterSpecie { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var id: UInt64 { - get {return _storage._id} - set {_uniqueStorage()._id = newValue} - } + public var id: UInt64 = 0 + + public var name: String = String() public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_uniqueStorage()._createdAt = newValue} + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} } /// Returns true if `createdAt` has been explicitly set. - public var hasCreatedAt: Bool {return _storage._createdAt != nil} + public var hasCreatedAt: Bool {return self._createdAt != nil} /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. - public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} - - public var games: [Proto_Game] { - get {return _storage._games} - set {_uniqueStorage()._games = newValue} - } - - public var name: String { - get {return _storage._name} - set {_uniqueStorage()._name = newValue} - } - - public var slug: String { - get {return _storage._slug} - set {_uniqueStorage()._slug = newValue} - } + public mutating func clearCreatedAt() {self._createdAt = nil} public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _storage._updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_uniqueStorage()._updatedAt = newValue} + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_CollectionResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var collections: [Proto_Collection] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_Collection { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return _storage._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} + + public var games: [Proto_Game] { + get {return _storage._games} + set {_uniqueStorage()._games = newValue} + } + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var slug: String { + get {return _storage._slug} + set {_uniqueStorage()._slug = newValue} + } + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _storage._updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._updatedAt = newValue} } /// Returns true if `updatedAt` has been explicitly set. public var hasUpdatedAt: Bool {return _storage._updatedAt != nil} @@ -2459,6 +2798,33 @@ public struct Proto_Company { set {_uniqueStorage()._checksum = newValue} } + public var status: Proto_CompanyStatus { + get {return _storage._status ?? Proto_CompanyStatus()} + set {_uniqueStorage()._status = newValue} + } + /// Returns true if `status` has been explicitly set. + public var hasStatus: Bool {return _storage._status != nil} + /// Clears the value of `status`. Subsequent reads from it will return its default value. + public mutating func clearStatus() {_uniqueStorage()._status = nil} + + public var startDateFormat: Proto_DateFormat { + get {return _storage._startDateFormat ?? Proto_DateFormat()} + set {_uniqueStorage()._startDateFormat = newValue} + } + /// Returns true if `startDateFormat` has been explicitly set. + public var hasStartDateFormat: Bool {return _storage._startDateFormat != nil} + /// Clears the value of `startDateFormat`. Subsequent reads from it will return its default value. + public mutating func clearStartDateFormat() {_uniqueStorage()._startDateFormat = nil} + + public var changeDateFormat: Proto_DateFormat { + get {return _storage._changeDateFormat ?? Proto_DateFormat()} + set {_uniqueStorage()._changeDateFormat = newValue} + } + /// Returns true if `changeDateFormat` has been explicitly set. + public var hasChangeDateFormat: Bool {return _storage._changeDateFormat != nil} + /// Clears the value of `changeDateFormat`. Subsequent reads from it will return its default value. + public mutating func clearChangeDateFormat() {_uniqueStorage()._changeDateFormat = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -2504,6 +2870,55 @@ public struct Proto_CompanyLogo { public init() {} } +public struct Proto_CompanyStatusResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var companystatuses: [Proto_CompanyStatus] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_CompanyStatus { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var name: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_CompanyWebsiteResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2531,9 +2946,20 @@ public struct Proto_CompanyWebsite { public var checksum: String = String() + public var type: Proto_WebsiteType { + get {return _type ?? Proto_WebsiteType()} + set {_type = newValue} + } + /// Returns true if `type` has been explicitly set. + public var hasType: Bool {return self._type != nil} + /// Clears the value of `type`. Subsequent reads from it will return its default value. + public mutating func clearType() {self._type = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} + + fileprivate var _type: Proto_WebsiteType? = nil } public struct Proto_CoverResult { @@ -2618,6 +3044,55 @@ public struct Proto_Cover { fileprivate var _storage = _StorageClass.defaultInstance } +public struct Proto_DateFormatResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var dateformats: [Proto_DateFormat] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_DateFormat { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var format: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_EventResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2914,89 +3389,133 @@ public struct Proto_ExternalGame { // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var id: UInt64 = 0 + public var id: UInt64 { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } - public var category: Proto_ExternalGameCategoryEnum = .externalgameCategoryNull + public var category: Proto_ExternalGameCategoryEnum { + get {return _storage._category} + set {_uniqueStorage()._category = newValue} + } public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_createdAt = newValue} + get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._createdAt = newValue} } /// Returns true if `createdAt` has been explicitly set. - public var hasCreatedAt: Bool {return self._createdAt != nil} + public var hasCreatedAt: Bool {return _storage._createdAt != nil} /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. - public mutating func clearCreatedAt() {self._createdAt = nil} + public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} public var game: Proto_Game { - get {return _game ?? Proto_Game()} - set {_game = newValue} + get {return _storage._game ?? Proto_Game()} + set {_uniqueStorage()._game = newValue} } /// Returns true if `game` has been explicitly set. - public var hasGame: Bool {return self._game != nil} + public var hasGame: Bool {return _storage._game != nil} /// Clears the value of `game`. Subsequent reads from it will return its default value. - public mutating func clearGame() {self._game = nil} + public mutating func clearGame() {_uniqueStorage()._game = nil} - public var name: String = String() + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } - public var uid: String = String() + public var uid: String { + get {return _storage._uid} + set {_uniqueStorage()._uid = newValue} + } public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_updatedAt = newValue} + get {return _storage._updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._updatedAt = newValue} } /// Returns true if `updatedAt` has been explicitly set. - public var hasUpdatedAt: Bool {return self._updatedAt != nil} + public var hasUpdatedAt: Bool {return _storage._updatedAt != nil} /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. - public mutating func clearUpdatedAt() {self._updatedAt = nil} + public mutating func clearUpdatedAt() {_uniqueStorage()._updatedAt = nil} - public var url: String = String() + public var url: String { + get {return _storage._url} + set {_uniqueStorage()._url = newValue} + } - public var year: Int32 = 0 + public var year: Int32 { + get {return _storage._year} + set {_uniqueStorage()._year = newValue} + } - public var media: Proto_ExternalGameMediaEnum = .externalgameMediaNull + public var media: Proto_ExternalGameMediaEnum { + get {return _storage._media} + set {_uniqueStorage()._media = newValue} + } public var platform: Proto_Platform { - get {return _platform ?? Proto_Platform()} - set {_platform = newValue} + get {return _storage._platform ?? Proto_Platform()} + set {_uniqueStorage()._platform = newValue} } /// Returns true if `platform` has been explicitly set. - public var hasPlatform: Bool {return self._platform != nil} + public var hasPlatform: Bool {return _storage._platform != nil} /// Clears the value of `platform`. Subsequent reads from it will return its default value. - public mutating func clearPlatform() {self._platform = nil} + public mutating func clearPlatform() {_uniqueStorage()._platform = nil} - public var countries: [Int32] = [] + public var countries: [Int32] { + get {return _storage._countries} + set {_uniqueStorage()._countries = newValue} + } - public var checksum: String = String() + public var checksum: String { + get {return _storage._checksum} + set {_uniqueStorage()._checksum = newValue} + } + + public var externalGameSource: Proto_ExternalGameSource { + get {return _storage._externalGameSource ?? Proto_ExternalGameSource()} + set {_uniqueStorage()._externalGameSource = newValue} + } + /// Returns true if `externalGameSource` has been explicitly set. + public var hasExternalGameSource: Bool {return _storage._externalGameSource != nil} + /// Clears the value of `externalGameSource`. Subsequent reads from it will return its default value. + public mutating func clearExternalGameSource() {_uniqueStorage()._externalGameSource = nil} + + public var gameReleaseFormat: Proto_GameReleaseFormat { + get {return _storage._gameReleaseFormat ?? Proto_GameReleaseFormat()} + set {_uniqueStorage()._gameReleaseFormat = newValue} + } + /// Returns true if `gameReleaseFormat` has been explicitly set. + public var hasGameReleaseFormat: Bool {return _storage._gameReleaseFormat != nil} + /// Clears the value of `gameReleaseFormat`. Subsequent reads from it will return its default value. + public mutating func clearGameReleaseFormat() {_uniqueStorage()._gameReleaseFormat = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} - fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil - fileprivate var _game: Proto_Game? = nil - fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil - fileprivate var _platform: Proto_Platform? = nil + fileprivate var _storage = _StorageClass.defaultInstance } -public struct Proto_FranchiseResult { +public struct Proto_ExternalGameSourceResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var franchises: [Proto_Franchise] = [] + public var externalgamesources: [Proto_ExternalGameSource] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } -public struct Proto_Franchise { +public struct Proto_ExternalGameSource { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var id: UInt64 = 0 + public var name: String = String() + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_createdAt = newValue} @@ -3006,12 +3525,59 @@ public struct Proto_Franchise { /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. public mutating func clearCreatedAt() {self._createdAt = nil} - public var games: [Proto_Game] = [] - - public var name: String = String() - - public var slug: String = String() - + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_FranchiseResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var franchises: [Proto_Franchise] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_Franchise { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var games: [Proto_Game] = [] + + public var name: String = String() + + public var slug: String = String() + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_updatedAt = newValue} @@ -3372,6 +3938,24 @@ public struct Proto_Game { set {_uniqueStorage()._collections = newValue} } + public var gameStatus: Proto_GameStatus { + get {return _storage._gameStatus ?? Proto_GameStatus()} + set {_uniqueStorage()._gameStatus = newValue} + } + /// Returns true if `gameStatus` has been explicitly set. + public var hasGameStatus: Bool {return _storage._gameStatus != nil} + /// Clears the value of `gameStatus`. Subsequent reads from it will return its default value. + public mutating func clearGameStatus() {_uniqueStorage()._gameStatus = nil} + + public var gameType: Proto_GameType { + get {return _storage._gameType ?? Proto_GameType()} + set {_uniqueStorage()._gameType = newValue} + } + /// Returns true if `gameType` has been explicitly set. + public var hasGameType: Bool {return _storage._gameType != nil} + /// Clears the value of `gameType`. Subsequent reads from it will return its default value. + public mutating func clearGameType() {_uniqueStorage()._gameType = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -3645,6 +4229,210 @@ public struct Proto_GameMode { fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil } +public struct Proto_GameReleaseFormatResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var gamereleaseformats: [Proto_GameReleaseFormat] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_GameReleaseFormat { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var format: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_GameStatusResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var gamestatuses: [Proto_GameStatus] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_GameStatus { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var status: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_GameTimeToBeatResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var gametimetobeats: [Proto_GameTimeToBeat] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_GameTimeToBeat { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var gameID: Int32 = 0 + + public var hastily: Int32 = 0 + + public var normally: Int32 = 0 + + public var completely: Int32 = 0 + + public var count: Int32 = 0 + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_GameTypeResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var gametypes: [Proto_GameType] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_GameType { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var type: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_GameVersionResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -4431,6 +5219,15 @@ public struct Proto_Platform { set {_uniqueStorage()._checksum = newValue} } + public var platformType: Proto_PlatformType { + get {return _storage._platformType ?? Proto_PlatformType()} + set {_uniqueStorage()._platformType = newValue} + } + /// Returns true if `platformType` has been explicitly set. + public var hasPlatformType: Bool {return _storage._platformType != nil} + /// Clears the value of `platformType`. Subsequent reads from it will return its default value. + public mutating func clearPlatformType() {_uniqueStorage()._platformType = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -4506,32 +5303,81 @@ public struct Proto_PlatformLogo { public init() {} } -public struct Proto_PlatformVersionResult { +public struct Proto_PlatformTypeResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var platformversions: [Proto_PlatformVersion] = [] + public var platformtypes: [Proto_PlatformType] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } -public struct Proto_PlatformVersion { +public struct Proto_PlatformType { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var id: UInt64 { - get {return _storage._id} - set {_uniqueStorage()._id = newValue} - } + public var id: UInt64 = 0 - public var companies: [Proto_PlatformVersionCompany] { - get {return _storage._companies} - set {_uniqueStorage()._companies = newValue} - } + public var name: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +public struct Proto_PlatformVersionResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var platformversions: [Proto_PlatformVersion] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_PlatformVersion { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var companies: [Proto_PlatformVersionCompany] { + get {return _storage._companies} + set {_uniqueStorage()._companies = newValue} + } public var connectivity: String { get {return _storage._connectivity} @@ -4572,11 +5418,6 @@ public struct Proto_PlatformVersion { set {_uniqueStorage()._name = newValue} } - public var online: String { - get {return _storage._online} - set {_uniqueStorage()._online = newValue} - } - public var os: String { get {return _storage._os} set {_uniqueStorage()._os = newValue} @@ -4703,64 +5544,100 @@ public struct Proto_PlatformVersionReleaseDate { // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - public var id: UInt64 = 0 + public var id: UInt64 { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } - public var category: Proto_DateFormatChangeDateCategoryEnum = .yyyymmmmdd + public var category: Proto_DateFormatChangeDateCategoryEnum { + get {return _storage._category} + set {_uniqueStorage()._category = newValue} + } public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_createdAt = newValue} + get {return _storage._createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._createdAt = newValue} } /// Returns true if `createdAt` has been explicitly set. - public var hasCreatedAt: Bool {return self._createdAt != nil} + public var hasCreatedAt: Bool {return _storage._createdAt != nil} /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. - public mutating func clearCreatedAt() {self._createdAt = nil} + public mutating func clearCreatedAt() {_uniqueStorage()._createdAt = nil} public var date: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _date ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_date = newValue} + get {return _storage._date ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._date = newValue} } /// Returns true if `date` has been explicitly set. - public var hasDate: Bool {return self._date != nil} + public var hasDate: Bool {return _storage._date != nil} /// Clears the value of `date`. Subsequent reads from it will return its default value. - public mutating func clearDate() {self._date = nil} + public mutating func clearDate() {_uniqueStorage()._date = nil} - public var human: String = String() + public var human: String { + get {return _storage._human} + set {_uniqueStorage()._human = newValue} + } - public var m: Int32 = 0 + public var m: Int32 { + get {return _storage._m} + set {_uniqueStorage()._m = newValue} + } public var platformVersion: Proto_PlatformVersion { - get {return _platformVersion ?? Proto_PlatformVersion()} - set {_platformVersion = newValue} + get {return _storage._platformVersion ?? Proto_PlatformVersion()} + set {_uniqueStorage()._platformVersion = newValue} } /// Returns true if `platformVersion` has been explicitly set. - public var hasPlatformVersion: Bool {return self._platformVersion != nil} + public var hasPlatformVersion: Bool {return _storage._platformVersion != nil} /// Clears the value of `platformVersion`. Subsequent reads from it will return its default value. - public mutating func clearPlatformVersion() {self._platformVersion = nil} + public mutating func clearPlatformVersion() {_uniqueStorage()._platformVersion = nil} - public var region: Proto_RegionRegionEnum = .regionRegionNull + public var region: Proto_RegionRegionEnum { + get {return _storage._region} + set {_uniqueStorage()._region = newValue} + } public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} - set {_updatedAt = newValue} + get {return _storage._updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._updatedAt = newValue} } /// Returns true if `updatedAt` has been explicitly set. - public var hasUpdatedAt: Bool {return self._updatedAt != nil} + public var hasUpdatedAt: Bool {return _storage._updatedAt != nil} /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. - public mutating func clearUpdatedAt() {self._updatedAt = nil} + public mutating func clearUpdatedAt() {_uniqueStorage()._updatedAt = nil} - public var y: Int32 = 0 + public var y: Int32 { + get {return _storage._y} + set {_uniqueStorage()._y = newValue} + } - public var checksum: String = String() + public var checksum: String { + get {return _storage._checksum} + set {_uniqueStorage()._checksum = newValue} + } + + public var dateFormat: Proto_DateFormat { + get {return _storage._dateFormat ?? Proto_DateFormat()} + set {_uniqueStorage()._dateFormat = newValue} + } + /// Returns true if `dateFormat` has been explicitly set. + public var hasDateFormat: Bool {return _storage._dateFormat != nil} + /// Clears the value of `dateFormat`. Subsequent reads from it will return its default value. + public mutating func clearDateFormat() {_uniqueStorage()._dateFormat = nil} + + public var releaseRegion: Proto_ReleaseDateRegion { + get {return _storage._releaseRegion ?? Proto_ReleaseDateRegion()} + set {_uniqueStorage()._releaseRegion = newValue} + } + /// Returns true if `releaseRegion` has been explicitly set. + public var hasReleaseRegion: Bool {return _storage._releaseRegion != nil} + /// Clears the value of `releaseRegion`. Subsequent reads from it will return its default value. + public mutating func clearReleaseRegion() {_uniqueStorage()._releaseRegion = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} - fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil - fileprivate var _date: SwiftProtobuf.Google_Protobuf_Timestamp? = nil - fileprivate var _platformVersion: Proto_PlatformVersion? = nil - fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _storage = _StorageClass.defaultInstance } public struct Proto_PlatformWebsiteResult { @@ -4926,6 +5803,15 @@ public struct Proto_PopularityPrimitive { set {_uniqueStorage()._checksum = newValue} } + public var externalPopularitySource: Proto_ExternalGameSource { + get {return _storage._externalPopularitySource ?? Proto_ExternalGameSource()} + set {_uniqueStorage()._externalPopularitySource = newValue} + } + /// Returns true if `externalPopularitySource` has been explicitly set. + public var hasExternalPopularitySource: Bool {return _storage._externalPopularitySource != nil} + /// Clears the value of `externalPopularitySource`. Subsequent reads from it will return its default value. + public mutating func clearExternalPopularitySource() {_uniqueStorage()._externalPopularitySource = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -4976,12 +5862,22 @@ public struct Proto_PopularityType { public var checksum: String = String() + public var externalPopularitySource: Proto_ExternalGameSource { + get {return _externalPopularitySource ?? Proto_ExternalGameSource()} + set {_externalPopularitySource = newValue} + } + /// Returns true if `externalPopularitySource` has been explicitly set. + public var hasExternalPopularitySource: Bool {return self._externalPopularitySource != nil} + /// Clears the value of `externalPopularitySource`. Subsequent reads from it will return its default value. + public mutating func clearExternalPopularitySource() {self._externalPopularitySource = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _externalPopularitySource: Proto_ExternalGameSource? = nil } public struct Proto_RegionResult { @@ -5143,6 +6039,24 @@ public struct Proto_ReleaseDate { /// Clears the value of `status`. Subsequent reads from it will return its default value. public mutating func clearStatus() {_uniqueStorage()._status = nil} + public var dateFormat: Proto_DateFormat { + get {return _storage._dateFormat ?? Proto_DateFormat()} + set {_uniqueStorage()._dateFormat = newValue} + } + /// Returns true if `dateFormat` has been explicitly set. + public var hasDateFormat: Bool {return _storage._dateFormat != nil} + /// Clears the value of `dateFormat`. Subsequent reads from it will return its default value. + public mutating func clearDateFormat() {_uniqueStorage()._dateFormat = nil} + + public var releaseRegion: Proto_ReleaseDateRegion { + get {return _storage._releaseRegion ?? Proto_ReleaseDateRegion()} + set {_uniqueStorage()._releaseRegion = newValue} + } + /// Returns true if `releaseRegion` has been explicitly set. + public var hasReleaseRegion: Bool {return _storage._releaseRegion != nil} + /// Clears the value of `releaseRegion`. Subsequent reads from it will return its default value. + public mutating func clearReleaseRegion() {_uniqueStorage()._releaseRegion = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -5150,6 +6064,55 @@ public struct Proto_ReleaseDate { fileprivate var _storage = _StorageClass.defaultInstance } +public struct Proto_ReleaseDateRegionResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var releasedateregions: [Proto_ReleaseDateRegion] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_ReleaseDateRegion { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var region: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + public struct Proto_ReleaseDateStatusResult { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -5590,11 +6553,70 @@ public struct Proto_Website { public var checksum: String = String() + public var type: Proto_WebsiteType { + get {return _type ?? Proto_WebsiteType()} + set {_type = newValue} + } + /// Returns true if `type` has been explicitly set. + public var hasType: Bool {return self._type != nil} + /// Clears the value of `type`. Subsequent reads from it will return its default value. + public mutating func clearType() {self._type = nil} + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _game: Proto_Game? = nil + fileprivate var _type: Proto_WebsiteType? = nil +} + +public struct Proto_WebsiteTypeResult { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var websitetypes: [Proto_WebsiteType] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +public struct Proto_WebsiteType { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var id: UInt64 = 0 + + public var type: String = String() + + public var createdAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _createdAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_createdAt = newValue} + } + /// Returns true if `createdAt` has been explicitly set. + public var hasCreatedAt: Bool {return self._createdAt != nil} + /// Clears the value of `createdAt`. Subsequent reads from it will return its default value. + public mutating func clearCreatedAt() {self._createdAt = nil} + + public var updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _updatedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_updatedAt = newValue} + } + /// Returns true if `updatedAt` has been explicitly set. + public var hasUpdatedAt: Bool {return self._updatedAt != nil} + /// Clears the value of `updatedAt`. Subsequent reads from it will return its default value. + public mutating func clearUpdatedAt() {self._updatedAt = nil} + + public var checksum: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + fileprivate var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil } #if swift(>=5.5) && canImport(_Concurrency) @@ -5620,16 +6642,26 @@ extension Proto_MultiQueryResult: @unchecked Sendable {} extension Proto_MultiQueryResultArray: @unchecked Sendable {} extension Proto_AgeRatingResult: @unchecked Sendable {} extension Proto_AgeRating: @unchecked Sendable {} +extension Proto_AgeRatingCategoryResult: @unchecked Sendable {} +extension Proto_AgeRatingCategory: @unchecked Sendable {} extension Proto_AgeRatingContentDescriptionResult: @unchecked Sendable {} extension Proto_AgeRatingContentDescription: @unchecked Sendable {} +extension Proto_AgeRatingContentDescriptionV2Result: @unchecked Sendable {} +extension Proto_AgeRatingContentDescriptionV2: @unchecked Sendable {} +extension Proto_AgeRatingOrganizationResult: @unchecked Sendable {} +extension Proto_AgeRatingOrganization: @unchecked Sendable {} extension Proto_AlternativeNameResult: @unchecked Sendable {} extension Proto_AlternativeName: @unchecked Sendable {} extension Proto_ArtworkResult: @unchecked Sendable {} extension Proto_Artwork: @unchecked Sendable {} extension Proto_CharacterResult: @unchecked Sendable {} extension Proto_Character: @unchecked Sendable {} +extension Proto_CharacterGenderResult: @unchecked Sendable {} +extension Proto_CharacterGender: @unchecked Sendable {} extension Proto_CharacterMugShotResult: @unchecked Sendable {} extension Proto_CharacterMugShot: @unchecked Sendable {} +extension Proto_CharacterSpecieResult: @unchecked Sendable {} +extension Proto_CharacterSpecie: @unchecked Sendable {} extension Proto_CollectionResult: @unchecked Sendable {} extension Proto_Collection: @unchecked Sendable {} extension Proto_CollectionMembershipResult: @unchecked Sendable {} @@ -5646,10 +6678,14 @@ extension Proto_CompanyResult: @unchecked Sendable {} extension Proto_Company: @unchecked Sendable {} extension Proto_CompanyLogoResult: @unchecked Sendable {} extension Proto_CompanyLogo: @unchecked Sendable {} +extension Proto_CompanyStatusResult: @unchecked Sendable {} +extension Proto_CompanyStatus: @unchecked Sendable {} extension Proto_CompanyWebsiteResult: @unchecked Sendable {} extension Proto_CompanyWebsite: @unchecked Sendable {} extension Proto_CoverResult: @unchecked Sendable {} extension Proto_Cover: @unchecked Sendable {} +extension Proto_DateFormatResult: @unchecked Sendable {} +extension Proto_DateFormat: @unchecked Sendable {} extension Proto_EventResult: @unchecked Sendable {} extension Proto_Event: @unchecked Sendable {} extension Proto_EventLogoResult: @unchecked Sendable {} @@ -5658,6 +6694,8 @@ extension Proto_EventNetworkResult: @unchecked Sendable {} extension Proto_EventNetwork: @unchecked Sendable {} extension Proto_ExternalGameResult: @unchecked Sendable {} extension Proto_ExternalGame: @unchecked Sendable {} +extension Proto_ExternalGameSourceResult: @unchecked Sendable {} +extension Proto_ExternalGameSource: @unchecked Sendable {} extension Proto_FranchiseResult: @unchecked Sendable {} extension Proto_Franchise: @unchecked Sendable {} extension Proto_GameResult: @unchecked Sendable {} @@ -5670,6 +6708,14 @@ extension Proto_GameLocalizationResult: @unchecked Sendable {} extension Proto_GameLocalization: @unchecked Sendable {} extension Proto_GameModeResult: @unchecked Sendable {} extension Proto_GameMode: @unchecked Sendable {} +extension Proto_GameReleaseFormatResult: @unchecked Sendable {} +extension Proto_GameReleaseFormat: @unchecked Sendable {} +extension Proto_GameStatusResult: @unchecked Sendable {} +extension Proto_GameStatus: @unchecked Sendable {} +extension Proto_GameTimeToBeatResult: @unchecked Sendable {} +extension Proto_GameTimeToBeat: @unchecked Sendable {} +extension Proto_GameTypeResult: @unchecked Sendable {} +extension Proto_GameType: @unchecked Sendable {} extension Proto_GameVersionResult: @unchecked Sendable {} extension Proto_GameVersion: @unchecked Sendable {} extension Proto_GameVersionFeatureResult: @unchecked Sendable {} @@ -5700,6 +6746,8 @@ extension Proto_PlatformFamilyResult: @unchecked Sendable {} extension Proto_PlatformFamily: @unchecked Sendable {} extension Proto_PlatformLogoResult: @unchecked Sendable {} extension Proto_PlatformLogo: @unchecked Sendable {} +extension Proto_PlatformTypeResult: @unchecked Sendable {} +extension Proto_PlatformType: @unchecked Sendable {} extension Proto_PlatformVersionResult: @unchecked Sendable {} extension Proto_PlatformVersion: @unchecked Sendable {} extension Proto_PlatformVersionCompanyResult: @unchecked Sendable {} @@ -5718,6 +6766,8 @@ extension Proto_RegionResult: @unchecked Sendable {} extension Proto_Region: @unchecked Sendable {} extension Proto_ReleaseDateResult: @unchecked Sendable {} extension Proto_ReleaseDate: @unchecked Sendable {} +extension Proto_ReleaseDateRegionResult: @unchecked Sendable {} +extension Proto_ReleaseDateRegion: @unchecked Sendable {} extension Proto_ReleaseDateStatusResult: @unchecked Sendable {} extension Proto_ReleaseDateStatus: @unchecked Sendable {} extension Proto_ScreenshotResult: @unchecked Sendable {} @@ -5730,6 +6780,8 @@ extension Proto_ThemeResult: @unchecked Sendable {} extension Proto_Theme: @unchecked Sendable {} extension Proto_WebsiteResult: @unchecked Sendable {} extension Proto_Website: @unchecked Sendable {} +extension Proto_WebsiteTypeResult: @unchecked Sendable {} +extension Proto_WebsiteType: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. @@ -5937,6 +6989,7 @@ extension Proto_WebsiteCategoryEnum: SwiftProtobuf._ProtoNameProviding { 16: .same(proto: "WEBSITE_EPICGAMES"), 17: .same(proto: "WEBSITE_GOG"), 18: .same(proto: "WEBSITE_DISCORD"), + 19: .same(proto: "WEBSITE_BLUESKY"), ] } @@ -6215,58 +7268,236 @@ extension Proto_AgeRating: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen 5: .standard(proto: "rating_cover_url"), 6: .same(proto: "synopsis"), 7: .same(proto: "checksum"), + 8: .same(proto: "organization"), + 9: .standard(proto: "rating_category"), + 10: .standard(proto: "rating_content_descriptions"), ] - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.category) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.contentDescriptions) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.rating) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.ratingCoverURL) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.synopsis) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.checksum) }() - default: break - } + fileprivate class _StorageClass { + var _id: UInt64 = 0 + var _category: Proto_AgeRatingCategoryEnum = .ageratingCategoryNull + var _contentDescriptions: [Proto_AgeRatingContentDescription] = [] + var _rating: Proto_AgeRatingRatingEnum = .ageratingRatingNull + var _ratingCoverURL: String = String() + var _synopsis: String = String() + var _checksum: String = String() + var _organization: Proto_AgeRatingOrganization? = nil + var _ratingCategory: Proto_AgeRatingCategory? = nil + var _ratingContentDescriptions: [Proto_AgeRatingContentDescriptionV2] = [] + + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _category = source._category + _contentDescriptions = source._contentDescriptions + _rating = source._rating + _ratingCoverURL = source._ratingCoverURL + _synopsis = source._synopsis + _checksum = source._checksum + _organization = source._organization + _ratingCategory = source._ratingCategory + _ratingContentDescriptions = source._ratingContentDescriptions } } - public func traverse(visitor: inout V) throws { - if self.id != 0 { - try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) - } - if self.category != .ageratingCategoryNull { - try visitor.visitSingularEnumField(value: self.category, fieldNumber: 2) + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._id) }() + case 2: try { try decoder.decodeSingularEnumField(value: &_storage._category) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._contentDescriptions) }() + case 4: try { try decoder.decodeSingularEnumField(value: &_storage._rating) }() + case 5: try { try decoder.decodeSingularStringField(value: &_storage._ratingCoverURL) }() + case 6: try { try decoder.decodeSingularStringField(value: &_storage._synopsis) }() + case 7: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 8: try { try decoder.decodeSingularMessageField(value: &_storage._organization) }() + case 9: try { try decoder.decodeSingularMessageField(value: &_storage._ratingCategory) }() + case 10: try { try decoder.decodeRepeatedMessageField(value: &_storage._ratingContentDescriptions) }() + default: break + } + } + } + } + + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if _storage._id != 0 { + try visitor.visitSingularUInt64Field(value: _storage._id, fieldNumber: 1) + } + if _storage._category != .ageratingCategoryNull { + try visitor.visitSingularEnumField(value: _storage._category, fieldNumber: 2) + } + if !_storage._contentDescriptions.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._contentDescriptions, fieldNumber: 3) + } + if _storage._rating != .ageratingRatingNull { + try visitor.visitSingularEnumField(value: _storage._rating, fieldNumber: 4) + } + if !_storage._ratingCoverURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._ratingCoverURL, fieldNumber: 5) + } + if !_storage._synopsis.isEmpty { + try visitor.visitSingularStringField(value: _storage._synopsis, fieldNumber: 6) + } + if !_storage._checksum.isEmpty { + try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 7) + } + try { if let v = _storage._organization { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } }() + try { if let v = _storage._ratingCategory { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } }() + if !_storage._ratingContentDescriptions.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._ratingContentDescriptions, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_AgeRating, rhs: Proto_AgeRating) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._category != rhs_storage._category {return false} + if _storage._contentDescriptions != rhs_storage._contentDescriptions {return false} + if _storage._rating != rhs_storage._rating {return false} + if _storage._ratingCoverURL != rhs_storage._ratingCoverURL {return false} + if _storage._synopsis != rhs_storage._synopsis {return false} + if _storage._checksum != rhs_storage._checksum {return false} + if _storage._organization != rhs_storage._organization {return false} + if _storage._ratingCategory != rhs_storage._ratingCategory {return false} + if _storage._ratingContentDescriptions != rhs_storage._ratingContentDescriptions {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_AgeRatingCategoryResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingCategoryResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "ageratingcategories"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.ageratingcategories) }() + default: break + } } - if !self.contentDescriptions.isEmpty { - try visitor.visitRepeatedMessageField(value: self.contentDescriptions, fieldNumber: 3) + } + + public func traverse(visitor: inout V) throws { + if !self.ageratingcategories.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ageratingcategories, fieldNumber: 1) } - if self.rating != .ageratingRatingNull { - try visitor.visitSingularEnumField(value: self.rating, fieldNumber: 4) + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_AgeRatingCategoryResult, rhs: Proto_AgeRatingCategoryResult) -> Bool { + if lhs.ageratingcategories != rhs.ageratingcategories {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_AgeRatingCategory: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingCategory" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "rating"), + 3: .same(proto: "organization"), + 4: .standard(proto: "created_at"), + 5: .standard(proto: "updated_at"), + 6: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.rating) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._organization) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } } - if !self.ratingCoverURL.isEmpty { - try visitor.visitSingularStringField(value: self.ratingCoverURL, fieldNumber: 5) + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } - if !self.synopsis.isEmpty { - try visitor.visitSingularStringField(value: self.synopsis, fieldNumber: 6) + if !self.rating.isEmpty { + try visitor.visitSingularStringField(value: self.rating, fieldNumber: 2) } + try { if let v = self._organization { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 7) + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 6) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_AgeRating, rhs: Proto_AgeRating) -> Bool { + public static func ==(lhs: Proto_AgeRatingCategory, rhs: Proto_AgeRatingCategory) -> Bool { if lhs.id != rhs.id {return false} - if lhs.category != rhs.category {return false} - if lhs.contentDescriptions != rhs.contentDescriptions {return false} if lhs.rating != rhs.rating {return false} - if lhs.ratingCoverURL != rhs.ratingCoverURL {return false} - if lhs.synopsis != rhs.synopsis {return false} + if lhs._organization != rhs._organization {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -6355,10 +7586,10 @@ extension Proto_AgeRatingContentDescription: SwiftProtobuf.Message, SwiftProtobu } } -extension Proto_AlternativeNameResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AlternativeNameResult" +extension Proto_AgeRatingContentDescriptionV2Result: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingContentDescriptionV2Result" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "alternativenames"), + 1: .same(proto: "ageratingcontentdescriptionsv2"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6367,34 +7598,35 @@ extension Proto_AlternativeNameResult: SwiftProtobuf.Message, SwiftProtobuf._Mes // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.alternativenames) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.ageratingcontentdescriptionsv2) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.alternativenames.isEmpty { - try visitor.visitRepeatedMessageField(value: self.alternativenames, fieldNumber: 1) + if !self.ageratingcontentdescriptionsv2.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ageratingcontentdescriptionsv2, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_AlternativeNameResult, rhs: Proto_AlternativeNameResult) -> Bool { - if lhs.alternativenames != rhs.alternativenames {return false} + public static func ==(lhs: Proto_AgeRatingContentDescriptionV2Result, rhs: Proto_AgeRatingContentDescriptionV2Result) -> Bool { + if lhs.ageratingcontentdescriptionsv2 != rhs.ageratingcontentdescriptionsv2 {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_AlternativeName: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AlternativeName" +extension Proto_AgeRatingContentDescriptionV2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingContentDescriptionV2" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .same(proto: "comment"), - 3: .same(proto: "game"), - 4: .same(proto: "name"), - 5: .same(proto: "checksum"), + 2: .same(proto: "description"), + 3: .same(proto: "organization"), + 4: .standard(proto: "created_at"), + 5: .standard(proto: "updated_at"), + 6: .same(proto: "checksum"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6404,10 +7636,11 @@ extension Proto_AlternativeName: SwiftProtobuf.Message, SwiftProtobuf._MessageIm // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.comment) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._game) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._organization) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.checksum) }() default: break } } @@ -6421,36 +7654,40 @@ extension Proto_AlternativeName: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if self.id != 0 { try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } - if !self.comment.isEmpty { - try visitor.visitSingularStringField(value: self.comment, fieldNumber: 2) + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) } - try { if let v = self._game { + try { if let v = self._organization { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) } }() - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) - } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 6) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_AlternativeName, rhs: Proto_AlternativeName) -> Bool { + public static func ==(lhs: Proto_AgeRatingContentDescriptionV2, rhs: Proto_AgeRatingContentDescriptionV2) -> Bool { if lhs.id != rhs.id {return false} - if lhs.comment != rhs.comment {return false} - if lhs._game != rhs._game {return false} - if lhs.name != rhs.name {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs._organization != rhs._organization {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_ArtworkResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ArtworkResult" +extension Proto_AgeRatingOrganizationResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingOrganizationResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "artworks"), + 1: .same(proto: "ageratingorganizations"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6459,38 +7696,34 @@ extension Proto_ArtworkResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.artworks) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.ageratingorganizations) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.artworks.isEmpty { - try visitor.visitRepeatedMessageField(value: self.artworks, fieldNumber: 1) + if !self.ageratingorganizations.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ageratingorganizations, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_ArtworkResult, rhs: Proto_ArtworkResult) -> Bool { - if lhs.artworks != rhs.artworks {return false} + public static func ==(lhs: Proto_AgeRatingOrganizationResult, rhs: Proto_AgeRatingOrganizationResult) -> Bool { + if lhs.ageratingorganizations != rhs.ageratingorganizations {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_Artwork: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Artwork" +extension Proto_AgeRatingOrganization: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AgeRatingOrganization" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .standard(proto: "alpha_channel"), - 3: .same(proto: "animated"), - 4: .same(proto: "game"), - 5: .same(proto: "height"), - 6: .standard(proto: "image_id"), - 7: .same(proto: "url"), - 8: .same(proto: "width"), - 9: .same(proto: "checksum"), + 2: .same(proto: "name"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6500,14 +7733,10 @@ extension Proto_Artwork: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularBoolField(value: &self.alphaChannel) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.animated) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._game) }() - case 5: try { try decoder.decodeSingularInt32Field(value: &self.height) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.imageID) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.url) }() - case 8: try { try decoder.decodeSingularInt32Field(value: &self.width) }() - case 9: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() default: break } } @@ -6521,52 +7750,244 @@ extension Proto_Artwork: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if self.id != 0 { try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } - if self.alphaChannel != false { - try visitor.visitSingularBoolField(value: self.alphaChannel, fieldNumber: 2) - } - if self.animated != false { - try visitor.visitSingularBoolField(value: self.animated, fieldNumber: 3) + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) } - try { if let v = self._game { + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) } }() - if self.height != 0 { - try visitor.visitSingularInt32Field(value: self.height, fieldNumber: 5) - } - if !self.imageID.isEmpty { - try visitor.visitSingularStringField(value: self.imageID, fieldNumber: 6) - } - if !self.url.isEmpty { - try visitor.visitSingularStringField(value: self.url, fieldNumber: 7) - } - if self.width != 0 { - try visitor.visitSingularInt32Field(value: self.width, fieldNumber: 8) - } if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 9) + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_Artwork, rhs: Proto_Artwork) -> Bool { + public static func ==(lhs: Proto_AgeRatingOrganization, rhs: Proto_AgeRatingOrganization) -> Bool { if lhs.id != rhs.id {return false} - if lhs.alphaChannel != rhs.alphaChannel {return false} - if lhs.animated != rhs.animated {return false} - if lhs._game != rhs._game {return false} - if lhs.height != rhs.height {return false} - if lhs.imageID != rhs.imageID {return false} - if lhs.url != rhs.url {return false} - if lhs.width != rhs.width {return false} + if lhs.name != rhs.name {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_CharacterResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CharacterResult" +extension Proto_AlternativeNameResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AlternativeNameResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "characters"), + 1: .same(proto: "alternativenames"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.alternativenames) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.alternativenames.isEmpty { + try visitor.visitRepeatedMessageField(value: self.alternativenames, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_AlternativeNameResult, rhs: Proto_AlternativeNameResult) -> Bool { + if lhs.alternativenames != rhs.alternativenames {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_AlternativeName: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".AlternativeName" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "comment"), + 3: .same(proto: "game"), + 4: .same(proto: "name"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.comment) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._game) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.comment.isEmpty { + try visitor.visitSingularStringField(value: self.comment, fieldNumber: 2) + } + try { if let v = self._game { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) + } + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_AlternativeName, rhs: Proto_AlternativeName) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.comment != rhs.comment {return false} + if lhs._game != rhs._game {return false} + if lhs.name != rhs.name {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_ArtworkResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ArtworkResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "artworks"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.artworks) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.artworks.isEmpty { + try visitor.visitRepeatedMessageField(value: self.artworks, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ArtworkResult, rhs: Proto_ArtworkResult) -> Bool { + if lhs.artworks != rhs.artworks {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_Artwork: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Artwork" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "alpha_channel"), + 3: .same(proto: "animated"), + 4: .same(proto: "game"), + 5: .same(proto: "height"), + 6: .standard(proto: "image_id"), + 7: .same(proto: "url"), + 8: .same(proto: "width"), + 9: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.alphaChannel) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.animated) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._game) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.height) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.imageID) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 8: try { try decoder.decodeSingularInt32Field(value: &self.width) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if self.alphaChannel != false { + try visitor.visitSingularBoolField(value: self.alphaChannel, fieldNumber: 2) + } + if self.animated != false { + try visitor.visitSingularBoolField(value: self.animated, fieldNumber: 3) + } + try { if let v = self._game { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if self.height != 0 { + try visitor.visitSingularInt32Field(value: self.height, fieldNumber: 5) + } + if !self.imageID.isEmpty { + try visitor.visitSingularStringField(value: self.imageID, fieldNumber: 6) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 7) + } + if self.width != 0 { + try visitor.visitSingularInt32Field(value: self.width, fieldNumber: 8) + } + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_Artwork, rhs: Proto_Artwork) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.alphaChannel != rhs.alphaChannel {return false} + if lhs.animated != rhs.animated {return false} + if lhs._game != rhs._game {return false} + if lhs.height != rhs.height {return false} + if lhs.imageID != rhs.imageID {return false} + if lhs.url != rhs.url {return false} + if lhs.width != rhs.width {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_CharacterResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "characters"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6612,6 +8033,8 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen 12: .standard(proto: "updated_at"), 13: .same(proto: "url"), 14: .same(proto: "checksum"), + 15: .standard(proto: "character_gender"), + 16: .standard(proto: "character_species"), ] fileprivate class _StorageClass { @@ -6629,6 +8052,8 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil var _url: String = String() var _checksum: String = String() + var _characterGender: Proto_CharacterGender? = nil + var _characterSpecies: Proto_CharacterSpecie? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -6657,6 +8082,8 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen _updatedAt = source._updatedAt _url = source._url _checksum = source._checksum + _characterGender = source._characterGender + _characterSpecies = source._characterSpecies } } @@ -6689,6 +8116,8 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen case 12: try { try decoder.decodeSingularMessageField(value: &_storage._updatedAt) }() case 13: try { try decoder.decodeSingularStringField(value: &_storage._url) }() case 14: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 15: try { try decoder.decodeSingularMessageField(value: &_storage._characterGender) }() + case 16: try { try decoder.decodeSingularMessageField(value: &_storage._characterSpecies) }() default: break } } @@ -6743,6 +8172,12 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if !_storage._checksum.isEmpty { try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 14) } + try { if let v = _storage._characterGender { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } }() + try { if let v = _storage._characterSpecies { + try visitor.visitSingularMessageField(value: v, fieldNumber: 16) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -6766,6 +8201,8 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if _storage._updatedAt != rhs_storage._updatedAt {return false} if _storage._url != rhs_storage._url {return false} if _storage._checksum != rhs_storage._checksum {return false} + if _storage._characterGender != rhs_storage._characterGender {return false} + if _storage._characterSpecies != rhs_storage._characterSpecies {return false} return true } if !storagesAreEqual {return false} @@ -6775,10 +8212,10 @@ extension Proto_Character: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } -extension Proto_CharacterMugShotResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CharacterMugShotResult" +extension Proto_CharacterGenderResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterGenderResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "charactermugshots"), + 1: .same(proto: "charactergenders"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6787,37 +8224,34 @@ extension Proto_CharacterMugShotResult: SwiftProtobuf.Message, SwiftProtobuf._Me // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.charactermugshots) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.charactergenders) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.charactermugshots.isEmpty { - try visitor.visitRepeatedMessageField(value: self.charactermugshots, fieldNumber: 1) + if !self.charactergenders.isEmpty { + try visitor.visitRepeatedMessageField(value: self.charactergenders, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_CharacterMugShotResult, rhs: Proto_CharacterMugShotResult) -> Bool { - if lhs.charactermugshots != rhs.charactermugshots {return false} + public static func ==(lhs: Proto_CharacterGenderResult, rhs: Proto_CharacterGenderResult) -> Bool { + if lhs.charactergenders != rhs.charactergenders {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_CharacterMugShot: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CharacterMugShot" +extension Proto_CharacterGender: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterGender" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .standard(proto: "alpha_channel"), - 3: .same(proto: "animated"), - 4: .same(proto: "height"), - 5: .standard(proto: "image_id"), - 6: .same(proto: "url"), - 7: .same(proto: "width"), - 8: .same(proto: "checksum"), + 2: .same(proto: "name"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -6827,29 +8261,124 @@ extension Proto_CharacterMugShot: SwiftProtobuf.Message, SwiftProtobuf._MessageI // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularBoolField(value: &self.alphaChannel) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.animated) }() - case 4: try { try decoder.decodeSingularInt32Field(value: &self.height) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.imageID) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.url) }() - case 7: try { try decoder.decodeSingularInt32Field(value: &self.width) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() default: break } } } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.id != 0 { try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } - if self.alphaChannel != false { - try visitor.visitSingularBoolField(value: self.alphaChannel, fieldNumber: 2) - } - if self.animated != false { - try visitor.visitSingularBoolField(value: self.animated, fieldNumber: 3) + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) } - if self.height != 0 { + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CharacterGender, rhs: Proto_CharacterGender) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.name != rhs.name {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_CharacterMugShotResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterMugShotResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "charactermugshots"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.charactermugshots) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.charactermugshots.isEmpty { + try visitor.visitRepeatedMessageField(value: self.charactermugshots, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CharacterMugShotResult, rhs: Proto_CharacterMugShotResult) -> Bool { + if lhs.charactermugshots != rhs.charactermugshots {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_CharacterMugShot: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterMugShot" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "alpha_channel"), + 3: .same(proto: "animated"), + 4: .same(proto: "height"), + 5: .standard(proto: "image_id"), + 6: .same(proto: "url"), + 7: .same(proto: "width"), + 8: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.alphaChannel) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.animated) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.height) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.imageID) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 7: try { try decoder.decodeSingularInt32Field(value: &self.width) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if self.alphaChannel != false { + try visitor.visitSingularBoolField(value: self.alphaChannel, fieldNumber: 2) + } + if self.animated != false { + try visitor.visitSingularBoolField(value: self.animated, fieldNumber: 3) + } + if self.height != 0 { try visitor.visitSingularInt32Field(value: self.height, fieldNumber: 4) } if !self.imageID.isEmpty { @@ -6881,6 +8410,98 @@ extension Proto_CharacterMugShot: SwiftProtobuf.Message, SwiftProtobuf._MessageI } } +extension Proto_CharacterSpecieResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterSpecieResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "characterspecies"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.characterspecies) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.characterspecies.isEmpty { + try visitor.visitRepeatedMessageField(value: self.characterspecies, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CharacterSpecieResult, rhs: Proto_CharacterSpecieResult) -> Bool { + if lhs.characterspecies != rhs.characterspecies {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_CharacterSpecie: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CharacterSpecie" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "name"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CharacterSpecie, rhs: Proto_CharacterSpecie) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.name != rhs.name {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Proto_CollectionResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CollectionResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -7749,6 +9370,9 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa 17: .same(proto: "url"), 18: .same(proto: "websites"), 19: .same(proto: "checksum"), + 20: .same(proto: "status"), + 21: .standard(proto: "start_date_format"), + 22: .standard(proto: "change_date_format"), ] fileprivate class _StorageClass { @@ -7771,6 +9395,9 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa var _url: String = String() var _websites: [Proto_CompanyWebsite] = [] var _checksum: String = String() + var _status: Proto_CompanyStatus? = nil + var _startDateFormat: Proto_DateFormat? = nil + var _changeDateFormat: Proto_DateFormat? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -7804,6 +9431,9 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa _url = source._url _websites = source._websites _checksum = source._checksum + _status = source._status + _startDateFormat = source._startDateFormat + _changeDateFormat = source._changeDateFormat } } @@ -7841,6 +9471,9 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa case 17: try { try decoder.decodeSingularStringField(value: &_storage._url) }() case 18: try { try decoder.decodeRepeatedMessageField(value: &_storage._websites) }() case 19: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 20: try { try decoder.decodeSingularMessageField(value: &_storage._status) }() + case 21: try { try decoder.decodeSingularMessageField(value: &_storage._startDateFormat) }() + case 22: try { try decoder.decodeSingularMessageField(value: &_storage._changeDateFormat) }() default: break } } @@ -7910,6 +9543,15 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !_storage._checksum.isEmpty { try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 19) } + try { if let v = _storage._status { + try visitor.visitSingularMessageField(value: v, fieldNumber: 20) + } }() + try { if let v = _storage._startDateFormat { + try visitor.visitSingularMessageField(value: v, fieldNumber: 21) + } }() + try { if let v = _storage._changeDateFormat { + try visitor.visitSingularMessageField(value: v, fieldNumber: 22) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -7938,6 +9580,9 @@ extension Proto_Company: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if _storage._url != rhs_storage._url {return false} if _storage._websites != rhs_storage._websites {return false} if _storage._checksum != rhs_storage._checksum {return false} + if _storage._status != rhs_storage._status {return false} + if _storage._startDateFormat != rhs_storage._startDateFormat {return false} + if _storage._changeDateFormat != rhs_storage._changeDateFormat {return false} return true } if !storagesAreEqual {return false} @@ -8053,10 +9698,10 @@ extension Proto_CompanyLogo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } -extension Proto_CompanyWebsiteResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CompanyWebsiteResult" +extension Proto_CompanyStatusResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CompanyStatusResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "companywebsites"), + 1: .same(proto: "companystatuses"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -8065,33 +9710,33 @@ extension Proto_CompanyWebsiteResult: SwiftProtobuf.Message, SwiftProtobuf._Mess // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.companywebsites) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.companystatuses) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.companywebsites.isEmpty { - try visitor.visitRepeatedMessageField(value: self.companywebsites, fieldNumber: 1) + if !self.companystatuses.isEmpty { + try visitor.visitRepeatedMessageField(value: self.companystatuses, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_CompanyWebsiteResult, rhs: Proto_CompanyWebsiteResult) -> Bool { - if lhs.companywebsites != rhs.companywebsites {return false} + public static func ==(lhs: Proto_CompanyStatusResult, rhs: Proto_CompanyStatusResult) -> Bool { + if lhs.companystatuses != rhs.companystatuses {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_CompanyWebsite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CompanyWebsite" +extension Proto_CompanyStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CompanyStatus" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .same(proto: "category"), - 3: .same(proto: "trusted"), - 4: .same(proto: "url"), + 2: .same(proto: "name"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), 5: .same(proto: "checksum"), ] @@ -8102,9 +9747,9 @@ extension Proto_CompanyWebsite: SwiftProtobuf.Message, SwiftProtobuf._MessageImp // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.category) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.trusted) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() default: break } @@ -8112,39 +9757,43 @@ extension Proto_CompanyWebsite: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 if self.id != 0 { try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } - if self.category != .websiteCategoryNull { - try visitor.visitSingularEnumField(value: self.category, fieldNumber: 2) - } - if self.trusted != false { - try visitor.visitSingularBoolField(value: self.trusted, fieldNumber: 3) - } - if !self.url.isEmpty { - try visitor.visitSingularStringField(value: self.url, fieldNumber: 4) + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() if !self.checksum.isEmpty { try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_CompanyWebsite, rhs: Proto_CompanyWebsite) -> Bool { + public static func ==(lhs: Proto_CompanyStatus, rhs: Proto_CompanyStatus) -> Bool { if lhs.id != rhs.id {return false} - if lhs.category != rhs.category {return false} - if lhs.trusted != rhs.trusted {return false} - if lhs.url != rhs.url {return false} + if lhs.name != rhs.name {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_CoverResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CoverResult" +extension Proto_CompanyWebsiteResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CompanyWebsiteResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "covers"), + 1: .same(proto: "companywebsites"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -8153,33 +9802,131 @@ extension Proto_CoverResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.covers) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.companywebsites) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.covers.isEmpty { - try visitor.visitRepeatedMessageField(value: self.covers, fieldNumber: 1) + if !self.companywebsites.isEmpty { + try visitor.visitRepeatedMessageField(value: self.companywebsites, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_CoverResult, rhs: Proto_CoverResult) -> Bool { - if lhs.covers != rhs.covers {return false} + public static func ==(lhs: Proto_CompanyWebsiteResult, rhs: Proto_CompanyWebsiteResult) -> Bool { + if lhs.companywebsites != rhs.companywebsites {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_Cover: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Cover" +extension Proto_CompanyWebsite: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CompanyWebsite" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .standard(proto: "alpha_channel"), - 3: .same(proto: "animated"), - 4: .same(proto: "game"), + 2: .same(proto: "category"), + 3: .same(proto: "trusted"), + 4: .same(proto: "url"), + 5: .same(proto: "checksum"), + 6: .same(proto: "type"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.category) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.trusted) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 6: try { try decoder.decodeSingularMessageField(value: &self._type) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if self.category != .websiteCategoryNull { + try visitor.visitSingularEnumField(value: self.category, fieldNumber: 2) + } + if self.trusted != false { + try visitor.visitSingularBoolField(value: self.trusted, fieldNumber: 3) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 4) + } + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try { if let v = self._type { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CompanyWebsite, rhs: Proto_CompanyWebsite) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.category != rhs.category {return false} + if lhs.trusted != rhs.trusted {return false} + if lhs.url != rhs.url {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs._type != rhs._type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_CoverResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".CoverResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "covers"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.covers) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.covers.isEmpty { + try visitor.visitRepeatedMessageField(value: self.covers, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_CoverResult, rhs: Proto_CoverResult) -> Bool { + if lhs.covers != rhs.covers {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_Cover: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Cover" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "alpha_channel"), + 3: .same(proto: "animated"), + 4: .same(proto: "game"), 5: .same(proto: "height"), 6: .standard(proto: "image_id"), 7: .same(proto: "url"), @@ -8321,6 +10068,98 @@ extension Proto_Cover: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementati } } +extension Proto_DateFormatResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".DateFormatResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "dateformats"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.dateformats) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.dateformats.isEmpty { + try visitor.visitRepeatedMessageField(value: self.dateformats, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_DateFormatResult, rhs: Proto_DateFormatResult) -> Bool { + if lhs.dateformats != rhs.dateformats {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_DateFormat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".DateFormat" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "format"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.format) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.format.isEmpty { + try visitor.visitSingularStringField(value: self.format, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_DateFormat, rhs: Proto_DateFormat) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.format != rhs.format {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Proto_EventResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EventResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8881,92 +10720,264 @@ extension Proto_ExternalGame: SwiftProtobuf.Message, SwiftProtobuf._MessageImple 11: .same(proto: "platform"), 12: .same(proto: "countries"), 13: .same(proto: "checksum"), + 14: .standard(proto: "external_game_source"), + 15: .standard(proto: "game_release_format"), ] - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.category) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._game) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.uid) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.url) }() - case 9: try { try decoder.decodeSingularInt32Field(value: &self.year) }() - case 10: try { try decoder.decodeSingularEnumField(value: &self.media) }() - case 11: try { try decoder.decodeSingularMessageField(value: &self._platform) }() - case 12: try { try decoder.decodeRepeatedInt32Field(value: &self.countries) }() - case 13: try { try decoder.decodeSingularStringField(value: &self.checksum) }() - default: break - } + fileprivate class _StorageClass { + var _id: UInt64 = 0 + var _category: Proto_ExternalGameCategoryEnum = .externalgameCategoryNull + var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _game: Proto_Game? = nil + var _name: String = String() + var _uid: String = String() + var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _url: String = String() + var _year: Int32 = 0 + var _media: Proto_ExternalGameMediaEnum = .externalgameMediaNull + var _platform: Proto_Platform? = nil + var _countries: [Int32] = [] + var _checksum: String = String() + var _externalGameSource: Proto_ExternalGameSource? = nil + var _gameReleaseFormat: Proto_GameReleaseFormat? = nil + + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _category = source._category + _createdAt = source._createdAt + _game = source._game + _name = source._name + _uid = source._uid + _updatedAt = source._updatedAt + _url = source._url + _year = source._year + _media = source._media + _platform = source._platform + _countries = source._countries + _checksum = source._checksum + _externalGameSource = source._externalGameSource + _gameReleaseFormat = source._gameReleaseFormat } } - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.id != 0 { - try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) - } - if self.category != .externalgameCategoryNull { - try visitor.visitSingularEnumField(value: self.category, fieldNumber: 2) - } - try { if let v = self._createdAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try { if let v = self._game { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 5) - } - if !self.uid.isEmpty { - try visitor.visitSingularStringField(value: self.uid, fieldNumber: 6) - } - try { if let v = self._updatedAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if !self.url.isEmpty { - try visitor.visitSingularStringField(value: self.url, fieldNumber: 8) - } - if self.year != 0 { - try visitor.visitSingularInt32Field(value: self.year, fieldNumber: 9) - } - if self.media != .externalgameMediaNull { - try visitor.visitSingularEnumField(value: self.media, fieldNumber: 10) - } - try { if let v = self._platform { - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } }() - if !self.countries.isEmpty { - try visitor.visitPackedInt32Field(value: self.countries, fieldNumber: 12) - } - if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 13) + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) } - try unknownFields.traverse(visitor: &visitor) + return _storage } - public static func ==(lhs: Proto_ExternalGame, rhs: Proto_ExternalGame) -> Bool { + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._id) }() + case 2: try { try decoder.decodeSingularEnumField(value: &_storage._category) }() + case 3: try { try decoder.decodeSingularMessageField(value: &_storage._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &_storage._game) }() + case 5: try { try decoder.decodeSingularStringField(value: &_storage._name) }() + case 6: try { try decoder.decodeSingularStringField(value: &_storage._uid) }() + case 7: try { try decoder.decodeSingularMessageField(value: &_storage._updatedAt) }() + case 8: try { try decoder.decodeSingularStringField(value: &_storage._url) }() + case 9: try { try decoder.decodeSingularInt32Field(value: &_storage._year) }() + case 10: try { try decoder.decodeSingularEnumField(value: &_storage._media) }() + case 11: try { try decoder.decodeSingularMessageField(value: &_storage._platform) }() + case 12: try { try decoder.decodeRepeatedInt32Field(value: &_storage._countries) }() + case 13: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 14: try { try decoder.decodeSingularMessageField(value: &_storage._externalGameSource) }() + case 15: try { try decoder.decodeSingularMessageField(value: &_storage._gameReleaseFormat) }() + default: break + } + } + } + } + + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if _storage._id != 0 { + try visitor.visitSingularUInt64Field(value: _storage._id, fieldNumber: 1) + } + if _storage._category != .externalgameCategoryNull { + try visitor.visitSingularEnumField(value: _storage._category, fieldNumber: 2) + } + try { if let v = _storage._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = _storage._game { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 5) + } + if !_storage._uid.isEmpty { + try visitor.visitSingularStringField(value: _storage._uid, fieldNumber: 6) + } + try { if let v = _storage._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() + if !_storage._url.isEmpty { + try visitor.visitSingularStringField(value: _storage._url, fieldNumber: 8) + } + if _storage._year != 0 { + try visitor.visitSingularInt32Field(value: _storage._year, fieldNumber: 9) + } + if _storage._media != .externalgameMediaNull { + try visitor.visitSingularEnumField(value: _storage._media, fieldNumber: 10) + } + try { if let v = _storage._platform { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } }() + if !_storage._countries.isEmpty { + try visitor.visitPackedInt32Field(value: _storage._countries, fieldNumber: 12) + } + if !_storage._checksum.isEmpty { + try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 13) + } + try { if let v = _storage._externalGameSource { + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + } }() + try { if let v = _storage._gameReleaseFormat { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } }() + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ExternalGame, rhs: Proto_ExternalGame) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._category != rhs_storage._category {return false} + if _storage._createdAt != rhs_storage._createdAt {return false} + if _storage._game != rhs_storage._game {return false} + if _storage._name != rhs_storage._name {return false} + if _storage._uid != rhs_storage._uid {return false} + if _storage._updatedAt != rhs_storage._updatedAt {return false} + if _storage._url != rhs_storage._url {return false} + if _storage._year != rhs_storage._year {return false} + if _storage._media != rhs_storage._media {return false} + if _storage._platform != rhs_storage._platform {return false} + if _storage._countries != rhs_storage._countries {return false} + if _storage._checksum != rhs_storage._checksum {return false} + if _storage._externalGameSource != rhs_storage._externalGameSource {return false} + if _storage._gameReleaseFormat != rhs_storage._gameReleaseFormat {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_ExternalGameSourceResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ExternalGameSourceResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "externalgamesources"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.externalgamesources) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.externalgamesources.isEmpty { + try visitor.visitRepeatedMessageField(value: self.externalgamesources, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ExternalGameSourceResult, rhs: Proto_ExternalGameSourceResult) -> Bool { + if lhs.externalgamesources != rhs.externalgamesources {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_ExternalGameSource: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ExternalGameSource" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "name"), + 4: .standard(proto: "created_at"), + 5: .standard(proto: "updated_at"), + 6: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ExternalGameSource, rhs: Proto_ExternalGameSource) -> Bool { if lhs.id != rhs.id {return false} - if lhs.category != rhs.category {return false} - if lhs._createdAt != rhs._createdAt {return false} - if lhs._game != rhs._game {return false} if lhs.name != rhs.name {return false} - if lhs.uid != rhs.uid {return false} + if lhs._createdAt != rhs._createdAt {return false} if lhs._updatedAt != rhs._updatedAt {return false} - if lhs.url != rhs.url {return false} - if lhs.year != rhs.year {return false} - if lhs.media != rhs.media {return false} - if lhs._platform != rhs._platform {return false} - if lhs.countries != rhs.countries {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -9176,6 +11187,8 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio 56: .standard(proto: "language_supports"), 57: .standard(proto: "game_localizations"), 58: .same(proto: "collections"), + 59: .standard(proto: "game_status"), + 60: .standard(proto: "game_type"), ] fileprivate class _StorageClass { @@ -9237,6 +11250,8 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio var _languageSupports: [Proto_LanguageSupport] = [] var _gameLocalizations: [Proto_GameLocalization] = [] var _collections: [Proto_Collection] = [] + var _gameStatus: Proto_GameStatus? = nil + var _gameType: Proto_GameType? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -9309,6 +11324,8 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio _languageSupports = source._languageSupports _gameLocalizations = source._gameLocalizations _collections = source._collections + _gameStatus = source._gameStatus + _gameType = source._gameType } } @@ -9385,6 +11402,8 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio case 56: try { try decoder.decodeRepeatedMessageField(value: &_storage._languageSupports) }() case 57: try { try decoder.decodeRepeatedMessageField(value: &_storage._gameLocalizations) }() case 58: try { try decoder.decodeRepeatedMessageField(value: &_storage._collections) }() + case 59: try { try decoder.decodeSingularMessageField(value: &_storage._gameStatus) }() + case 60: try { try decoder.decodeSingularMessageField(value: &_storage._gameType) }() default: break } } @@ -9571,6 +11590,12 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio if !_storage._collections.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._collections, fieldNumber: 58) } + try { if let v = _storage._gameStatus { + try visitor.visitSingularMessageField(value: v, fieldNumber: 59) + } }() + try { if let v = _storage._gameType { + try visitor.visitSingularMessageField(value: v, fieldNumber: 60) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -9638,6 +11663,8 @@ extension Proto_Game: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementatio if _storage._languageSupports != rhs_storage._languageSupports {return false} if _storage._gameLocalizations != rhs_storage._gameLocalizations {return false} if _storage._collections != rhs_storage._collections {return false} + if _storage._gameStatus != rhs_storage._gameStatus {return false} + if _storage._gameType != rhs_storage._gameType {return false} return true } if !storagesAreEqual {return false} @@ -10080,35 +12107,439 @@ extension Proto_GameLocalization: SwiftProtobuf.Message, SwiftProtobuf._MessageI try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 8) } } - try unknownFields.traverse(visitor: &visitor) + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameLocalization, rhs: Proto_GameLocalization) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._name != rhs_storage._name {return false} + if _storage._cover != rhs_storage._cover {return false} + if _storage._game != rhs_storage._game {return false} + if _storage._region != rhs_storage._region {return false} + if _storage._createdAt != rhs_storage._createdAt {return false} + if _storage._updatedAt != rhs_storage._updatedAt {return false} + if _storage._checksum != rhs_storage._checksum {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameModeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameModeResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "gamemodes"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gamemodes) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.gamemodes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.gamemodes, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameModeResult, rhs: Proto_GameModeResult) -> Bool { + if lhs.gamemodes != rhs.gamemodes {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameMode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameMode" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "created_at"), + 3: .same(proto: "name"), + 4: .same(proto: "slug"), + 5: .standard(proto: "updated_at"), + 6: .same(proto: "url"), + 7: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.slug) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 3) + } + if !self.slug.isEmpty { + try visitor.visitSingularStringField(value: self.slug, fieldNumber: 4) + } + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 6) + } + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 7) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameMode, rhs: Proto_GameMode) -> Bool { + if lhs.id != rhs.id {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs.name != rhs.name {return false} + if lhs.slug != rhs.slug {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.url != rhs.url {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameReleaseFormatResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameReleaseFormatResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "gamereleaseformats"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gamereleaseformats) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.gamereleaseformats.isEmpty { + try visitor.visitRepeatedMessageField(value: self.gamereleaseformats, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameReleaseFormatResult, rhs: Proto_GameReleaseFormatResult) -> Bool { + if lhs.gamereleaseformats != rhs.gamereleaseformats {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameReleaseFormat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameReleaseFormat" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "format"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.format) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.format.isEmpty { + try visitor.visitSingularStringField(value: self.format, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameReleaseFormat, rhs: Proto_GameReleaseFormat) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.format != rhs.format {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameStatusResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameStatusResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "gamestatuses"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gamestatuses) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.gamestatuses.isEmpty { + try visitor.visitRepeatedMessageField(value: self.gamestatuses, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameStatusResult, rhs: Proto_GameStatusResult) -> Bool { + if lhs.gamestatuses != rhs.gamestatuses {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameStatus" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "status"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.status) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.status.isEmpty { + try visitor.visitSingularStringField(value: self.status, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameStatus, rhs: Proto_GameStatus) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.status != rhs.status {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameTimeToBeatResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameTimeToBeatResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "gametimetobeats"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gametimetobeats) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.gametimetobeats.isEmpty { + try visitor.visitRepeatedMessageField(value: self.gametimetobeats, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameTimeToBeatResult, rhs: Proto_GameTimeToBeatResult) -> Bool { + if lhs.gametimetobeats != rhs.gametimetobeats {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_GameTimeToBeat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameTimeToBeat" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "game_id"), + 3: .same(proto: "hastily"), + 4: .same(proto: "normally"), + 5: .same(proto: "completely"), + 6: .same(proto: "count"), + 7: .standard(proto: "created_at"), + 8: .standard(proto: "updated_at"), + 9: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.gameID) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.hastily) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.normally) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.completely) }() + case 6: try { try decoder.decodeSingularInt32Field(value: &self.count) }() + case 7: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 8: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } } - public static func ==(lhs: Proto_GameLocalization, rhs: Proto_GameLocalization) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._id != rhs_storage._id {return false} - if _storage._name != rhs_storage._name {return false} - if _storage._cover != rhs_storage._cover {return false} - if _storage._game != rhs_storage._game {return false} - if _storage._region != rhs_storage._region {return false} - if _storage._createdAt != rhs_storage._createdAt {return false} - if _storage._updatedAt != rhs_storage._updatedAt {return false} - if _storage._checksum != rhs_storage._checksum {return false} - return true - } - if !storagesAreEqual {return false} + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if self.gameID != 0 { + try visitor.visitSingularInt32Field(value: self.gameID, fieldNumber: 2) + } + if self.hastily != 0 { + try visitor.visitSingularInt32Field(value: self.hastily, fieldNumber: 3) + } + if self.normally != 0 { + try visitor.visitSingularInt32Field(value: self.normally, fieldNumber: 4) + } + if self.completely != 0 { + try visitor.visitSingularInt32Field(value: self.completely, fieldNumber: 5) + } + if self.count != 0 { + try visitor.visitSingularInt32Field(value: self.count, fieldNumber: 6) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 9) } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_GameTimeToBeat, rhs: Proto_GameTimeToBeat) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.gameID != rhs.gameID {return false} + if lhs.hastily != rhs.hastily {return false} + if lhs.normally != rhs.normally {return false} + if lhs.completely != rhs.completely {return false} + if lhs.count != rhs.count {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_GameModeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".GameModeResult" +extension Proto_GameTypeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameTypeResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "gamemodes"), + 1: .same(proto: "gametypes"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -10117,36 +12548,34 @@ extension Proto_GameModeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImp // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gamemodes) }() + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.gametypes) }() default: break } } } public func traverse(visitor: inout V) throws { - if !self.gamemodes.isEmpty { - try visitor.visitRepeatedMessageField(value: self.gamemodes, fieldNumber: 1) + if !self.gametypes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.gametypes, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_GameModeResult, rhs: Proto_GameModeResult) -> Bool { - if lhs.gamemodes != rhs.gamemodes {return false} + public static func ==(lhs: Proto_GameTypeResult, rhs: Proto_GameTypeResult) -> Bool { + if lhs.gametypes != rhs.gametypes {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Proto_GameMode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".GameMode" +extension Proto_GameType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".GameType" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), - 2: .standard(proto: "created_at"), - 3: .same(proto: "name"), - 4: .same(proto: "slug"), - 5: .standard(proto: "updated_at"), - 6: .same(proto: "url"), - 7: .same(proto: "checksum"), + 2: .same(proto: "type"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -10156,12 +12585,10 @@ extension Proto_GameMode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.slug) }() - case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.url) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.type) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() default: break } } @@ -10175,34 +12602,26 @@ extension Proto_GameMode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if self.id != 0 { try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) } + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 2) + } try { if let v = self._createdAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) } }() - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 3) - } - if !self.slug.isEmpty { - try visitor.visitSingularStringField(value: self.slug, fieldNumber: 4) - } try { if let v = self._updatedAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) } }() - if !self.url.isEmpty { - try visitor.visitSingularStringField(value: self.url, fieldNumber: 6) - } if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 7) + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Proto_GameMode, rhs: Proto_GameMode) -> Bool { + public static func ==(lhs: Proto_GameType, rhs: Proto_GameType) -> Bool { if lhs.id != rhs.id {return false} + if lhs.type != rhs.type {return false} if lhs._createdAt != rhs._createdAt {return false} - if lhs.name != rhs.name {return false} - if lhs.slug != rhs.slug {return false} if lhs._updatedAt != rhs._updatedAt {return false} - if lhs.url != rhs.url {return false} if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -11592,6 +14011,7 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement 14: .same(proto: "versions"), 15: .same(proto: "websites"), 16: .same(proto: "checksum"), + 17: .standard(proto: "platform_type"), ] fileprivate class _StorageClass { @@ -11611,6 +14031,7 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement var _versions: [Proto_PlatformVersion] = [] var _websites: [Proto_PlatformWebsite] = [] var _checksum: String = String() + var _platformType: Proto_PlatformType? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -11641,6 +14062,7 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement _versions = source._versions _websites = source._websites _checksum = source._checksum + _platformType = source._platformType } } @@ -11675,6 +14097,7 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement case 14: try { try decoder.decodeRepeatedMessageField(value: &_storage._versions) }() case 15: try { try decoder.decodeRepeatedMessageField(value: &_storage._websites) }() case 16: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 17: try { try decoder.decodeSingularMessageField(value: &_storage._platformType) }() default: break } } @@ -11735,6 +14158,9 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if !_storage._checksum.isEmpty { try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 16) } + try { if let v = _storage._platformType { + try visitor.visitSingularMessageField(value: v, fieldNumber: 17) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -11760,6 +14186,7 @@ extension Proto_Platform: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if _storage._versions != rhs_storage._versions {return false} if _storage._websites != rhs_storage._websites {return false} if _storage._checksum != rhs_storage._checksum {return false} + if _storage._platformType != rhs_storage._platformType {return false} return true } if !storagesAreEqual {return false} @@ -11957,6 +14384,98 @@ extension Proto_PlatformLogo: SwiftProtobuf.Message, SwiftProtobuf._MessageImple } } +extension Proto_PlatformTypeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".PlatformTypeResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "platformtypes"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.platformtypes) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.platformtypes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.platformtypes, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_PlatformTypeResult, rhs: Proto_PlatformTypeResult) -> Bool { + if lhs.platformtypes != rhs.platformtypes {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_PlatformType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".PlatformType" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "name"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_PlatformType, rhs: Proto_PlatformType) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.name != rhs.name {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Proto_PlatformVersionResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PlatformVersionResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -12001,7 +14520,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm 7: .same(proto: "media"), 8: .same(proto: "memory"), 9: .same(proto: "name"), - 10: .same(proto: "online"), 11: .same(proto: "os"), 12: .same(proto: "output"), 13: .standard(proto: "platform_logo"), @@ -12025,7 +14543,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm var _media: String = String() var _memory: String = String() var _name: String = String() - var _online: String = String() var _os: String = String() var _output: String = String() var _platformLogo: Proto_PlatformLogo? = nil @@ -12060,7 +14577,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm _media = source._media _memory = source._memory _name = source._name - _online = source._online _os = source._os _output = source._output _platformLogo = source._platformLogo @@ -12099,7 +14615,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm case 7: try { try decoder.decodeSingularStringField(value: &_storage._media) }() case 8: try { try decoder.decodeSingularStringField(value: &_storage._memory) }() case 9: try { try decoder.decodeSingularStringField(value: &_storage._name) }() - case 10: try { try decoder.decodeSingularStringField(value: &_storage._online) }() case 11: try { try decoder.decodeSingularStringField(value: &_storage._os) }() case 12: try { try decoder.decodeSingularStringField(value: &_storage._output) }() case 13: try { try decoder.decodeSingularMessageField(value: &_storage._platformLogo) }() @@ -12150,9 +14665,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if !_storage._name.isEmpty { try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 9) } - if !_storage._online.isEmpty { - try visitor.visitSingularStringField(value: _storage._online, fieldNumber: 10) - } if !_storage._os.isEmpty { try visitor.visitSingularStringField(value: _storage._os, fieldNumber: 11) } @@ -12204,7 +14716,6 @@ extension Proto_PlatformVersion: SwiftProtobuf.Message, SwiftProtobuf._MessageIm if _storage._media != rhs_storage._media {return false} if _storage._memory != rhs_storage._memory {return false} if _storage._name != rhs_storage._name {return false} - if _storage._online != rhs_storage._online {return false} if _storage._os != rhs_storage._os {return false} if _storage._output != rhs_storage._output {return false} if _storage._platformLogo != rhs_storage._platformLogo {return false} @@ -12369,83 +14880,159 @@ extension Proto_PlatformVersionReleaseDate: SwiftProtobuf.Message, SwiftProtobuf 9: .standard(proto: "updated_at"), 10: .same(proto: "y"), 11: .same(proto: "checksum"), + 12: .standard(proto: "date_format"), + 13: .standard(proto: "release_region"), ] + fileprivate class _StorageClass { + var _id: UInt64 = 0 + var _category: Proto_DateFormatChangeDateCategoryEnum = .yyyymmmmdd + var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _date: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _human: String = String() + var _m: Int32 = 0 + var _platformVersion: Proto_PlatformVersion? = nil + var _region: Proto_RegionRegionEnum = .regionRegionNull + var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _y: Int32 = 0 + var _checksum: String = String() + var _dateFormat: Proto_DateFormat? = nil + var _releaseRegion: Proto_ReleaseDateRegion? = nil + + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _category = source._category + _createdAt = source._createdAt + _date = source._date + _human = source._human + _m = source._m + _platformVersion = source._platformVersion + _region = source._region + _updatedAt = source._updatedAt + _y = source._y + _checksum = source._checksum + _dateFormat = source._dateFormat + _releaseRegion = source._releaseRegion + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.category) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._date) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.human) }() - case 6: try { try decoder.decodeSingularInt32Field(value: &self.m) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._platformVersion) }() - case 8: try { try decoder.decodeSingularEnumField(value: &self.region) }() - case 9: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() - case 10: try { try decoder.decodeSingularInt32Field(value: &self.y) }() - case 11: try { try decoder.decodeSingularStringField(value: &self.checksum) }() - default: break + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._id) }() + case 2: try { try decoder.decodeSingularEnumField(value: &_storage._category) }() + case 3: try { try decoder.decodeSingularMessageField(value: &_storage._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &_storage._date) }() + case 5: try { try decoder.decodeSingularStringField(value: &_storage._human) }() + case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._m) }() + case 7: try { try decoder.decodeSingularMessageField(value: &_storage._platformVersion) }() + case 8: try { try decoder.decodeSingularEnumField(value: &_storage._region) }() + case 9: try { try decoder.decodeSingularMessageField(value: &_storage._updatedAt) }() + case 10: try { try decoder.decodeSingularInt32Field(value: &_storage._y) }() + case 11: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 12: try { try decoder.decodeSingularMessageField(value: &_storage._dateFormat) }() + case 13: try { try decoder.decodeSingularMessageField(value: &_storage._releaseRegion) }() + default: break + } } } } public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.id != 0 { - try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) - } - if self.category != .yyyymmmmdd { - try visitor.visitSingularEnumField(value: self.category, fieldNumber: 2) - } - try { if let v = self._createdAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try { if let v = self._date { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.human.isEmpty { - try visitor.visitSingularStringField(value: self.human, fieldNumber: 5) - } - if self.m != 0 { - try visitor.visitSingularInt32Field(value: self.m, fieldNumber: 6) - } - try { if let v = self._platformVersion { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if self.region != .regionRegionNull { - try visitor.visitSingularEnumField(value: self.region, fieldNumber: 8) - } - try { if let v = self._updatedAt { - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } }() - if self.y != 0 { - try visitor.visitSingularInt32Field(value: self.y, fieldNumber: 10) - } - if !self.checksum.isEmpty { - try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 11) + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if _storage._id != 0 { + try visitor.visitSingularUInt64Field(value: _storage._id, fieldNumber: 1) + } + if _storage._category != .yyyymmmmdd { + try visitor.visitSingularEnumField(value: _storage._category, fieldNumber: 2) + } + try { if let v = _storage._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = _storage._date { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !_storage._human.isEmpty { + try visitor.visitSingularStringField(value: _storage._human, fieldNumber: 5) + } + if _storage._m != 0 { + try visitor.visitSingularInt32Field(value: _storage._m, fieldNumber: 6) + } + try { if let v = _storage._platformVersion { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() + if _storage._region != .regionRegionNull { + try visitor.visitSingularEnumField(value: _storage._region, fieldNumber: 8) + } + try { if let v = _storage._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } }() + if _storage._y != 0 { + try visitor.visitSingularInt32Field(value: _storage._y, fieldNumber: 10) + } + if !_storage._checksum.isEmpty { + try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 11) + } + try { if let v = _storage._dateFormat { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } }() + try { if let v = _storage._releaseRegion { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } }() } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Proto_PlatformVersionReleaseDate, rhs: Proto_PlatformVersionReleaseDate) -> Bool { - if lhs.id != rhs.id {return false} - if lhs.category != rhs.category {return false} - if lhs._createdAt != rhs._createdAt {return false} - if lhs._date != rhs._date {return false} - if lhs.human != rhs.human {return false} - if lhs.m != rhs.m {return false} - if lhs._platformVersion != rhs._platformVersion {return false} - if lhs.region != rhs.region {return false} - if lhs._updatedAt != rhs._updatedAt {return false} - if lhs.y != rhs.y {return false} - if lhs.checksum != rhs.checksum {return false} + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._category != rhs_storage._category {return false} + if _storage._createdAt != rhs_storage._createdAt {return false} + if _storage._date != rhs_storage._date {return false} + if _storage._human != rhs_storage._human {return false} + if _storage._m != rhs_storage._m {return false} + if _storage._platformVersion != rhs_storage._platformVersion {return false} + if _storage._region != rhs_storage._region {return false} + if _storage._updatedAt != rhs_storage._updatedAt {return false} + if _storage._y != rhs_storage._y {return false} + if _storage._checksum != rhs_storage._checksum {return false} + if _storage._dateFormat != rhs_storage._dateFormat {return false} + if _storage._releaseRegion != rhs_storage._releaseRegion {return false} + return true + } + if !storagesAreEqual {return false} + } if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -12687,6 +15274,7 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa 7: .standard(proto: "created_at"), 8: .standard(proto: "updated_at"), 9: .same(proto: "checksum"), + 10: .standard(proto: "external_popularity_source"), ] fileprivate class _StorageClass { @@ -12699,6 +15287,7 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa var _createdAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil var _updatedAt: SwiftProtobuf.Google_Protobuf_Timestamp? = nil var _checksum: String = String() + var _externalPopularitySource: Proto_ExternalGameSource? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -12722,6 +15311,7 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa _createdAt = source._createdAt _updatedAt = source._updatedAt _checksum = source._checksum + _externalPopularitySource = source._externalPopularitySource } } @@ -12749,6 +15339,7 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa case 7: try { try decoder.decodeSingularMessageField(value: &_storage._createdAt) }() case 8: try { try decoder.decodeSingularMessageField(value: &_storage._updatedAt) }() case 9: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() + case 10: try { try decoder.decodeSingularMessageField(value: &_storage._externalPopularitySource) }() default: break } } @@ -12788,6 +15379,9 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa if !_storage._checksum.isEmpty { try visitor.visitSingularStringField(value: _storage._checksum, fieldNumber: 9) } + try { if let v = _storage._externalPopularitySource { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -12806,6 +15400,7 @@ extension Proto_PopularityPrimitive: SwiftProtobuf.Message, SwiftProtobuf._Messa if _storage._createdAt != rhs_storage._createdAt {return false} if _storage._updatedAt != rhs_storage._updatedAt {return false} if _storage._checksum != rhs_storage._checksum {return false} + if _storage._externalPopularitySource != rhs_storage._externalPopularitySource {return false} return true } if !storagesAreEqual {return false} @@ -12856,6 +15451,7 @@ extension Proto_PopularityType: SwiftProtobuf.Message, SwiftProtobuf._MessageImp 4: .standard(proto: "created_at"), 5: .standard(proto: "updated_at"), 6: .same(proto: "checksum"), + 7: .standard(proto: "external_popularity_source"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -12870,6 +15466,7 @@ extension Proto_PopularityType: SwiftProtobuf.Message, SwiftProtobuf._MessageImp case 4: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() case 5: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() case 6: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 7: try { try decoder.decodeSingularMessageField(value: &self._externalPopularitySource) }() default: break } } @@ -12898,6 +15495,9 @@ extension Proto_PopularityType: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if !self.checksum.isEmpty { try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 6) } + try { if let v = self._externalPopularitySource { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -12908,6 +15508,7 @@ extension Proto_PopularityType: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if lhs._createdAt != rhs._createdAt {return false} if lhs._updatedAt != rhs._updatedAt {return false} if lhs.checksum != rhs.checksum {return false} + if lhs._externalPopularitySource != rhs._externalPopularitySource {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -13065,6 +15666,8 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem 11: .same(proto: "y"), 12: .same(proto: "checksum"), 13: .same(proto: "status"), + 14: .standard(proto: "date_format"), + 15: .standard(proto: "release_region"), ] fileprivate class _StorageClass { @@ -13081,6 +15684,8 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem var _y: Int32 = 0 var _checksum: String = String() var _status: Proto_ReleaseDateStatus? = nil + var _dateFormat: Proto_DateFormat? = nil + var _releaseRegion: Proto_ReleaseDateRegion? = nil #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -13108,6 +15713,8 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem _y = source._y _checksum = source._checksum _status = source._status + _dateFormat = source._dateFormat + _releaseRegion = source._releaseRegion } } @@ -13139,6 +15746,8 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem case 11: try { try decoder.decodeSingularInt32Field(value: &_storage._y) }() case 12: try { try decoder.decodeSingularStringField(value: &_storage._checksum) }() case 13: try { try decoder.decodeSingularMessageField(value: &_storage._status) }() + case 14: try { try decoder.decodeSingularMessageField(value: &_storage._dateFormat) }() + case 15: try { try decoder.decodeSingularMessageField(value: &_storage._releaseRegion) }() default: break } } @@ -13190,6 +15799,12 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem try { if let v = _storage._status { try visitor.visitSingularMessageField(value: v, fieldNumber: 13) } }() + try { if let v = _storage._dateFormat { + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + } }() + try { if let v = _storage._releaseRegion { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -13212,6 +15827,8 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem if _storage._y != rhs_storage._y {return false} if _storage._checksum != rhs_storage._checksum {return false} if _storage._status != rhs_storage._status {return false} + if _storage._dateFormat != rhs_storage._dateFormat {return false} + if _storage._releaseRegion != rhs_storage._releaseRegion {return false} return true } if !storagesAreEqual {return false} @@ -13221,6 +15838,98 @@ extension Proto_ReleaseDate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } } +extension Proto_ReleaseDateRegionResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ReleaseDateRegionResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "releasedateregions"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.releasedateregions) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.releasedateregions.isEmpty { + try visitor.visitRepeatedMessageField(value: self.releasedateregions, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ReleaseDateRegionResult, rhs: Proto_ReleaseDateRegionResult) -> Bool { + if lhs.releasedateregions != rhs.releasedateregions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_ReleaseDateRegion: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ReleaseDateRegion" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "region"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.region) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.region.isEmpty { + try visitor.visitSingularStringField(value: self.region, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_ReleaseDateRegion, rhs: Proto_ReleaseDateRegion) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.region != rhs.region {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Proto_ReleaseDateStatusResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ReleaseDateStatusResult" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -14028,6 +16737,7 @@ extension Proto_Website: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa 4: .same(proto: "trusted"), 5: .same(proto: "url"), 6: .same(proto: "checksum"), + 7: .same(proto: "type"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -14042,6 +16752,7 @@ extension Proto_Website: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa case 4: try { try decoder.decodeSingularBoolField(value: &self.trusted) }() case 5: try { try decoder.decodeSingularStringField(value: &self.url) }() case 6: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + case 7: try { try decoder.decodeSingularMessageField(value: &self._type) }() default: break } } @@ -14070,6 +16781,9 @@ extension Proto_Website: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if !self.checksum.isEmpty { try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 6) } + try { if let v = self._type { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -14080,6 +16794,99 @@ extension Proto_Website: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa if lhs.trusted != rhs.trusted {return false} if lhs.url != rhs.url {return false} if lhs.checksum != rhs.checksum {return false} + if lhs._type != rhs._type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_WebsiteTypeResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".WebsiteTypeResult" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "websitetypes"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.websitetypes) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.websitetypes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.websitetypes, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_WebsiteTypeResult, rhs: Proto_WebsiteTypeResult) -> Bool { + if lhs.websitetypes != rhs.websitetypes {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Proto_WebsiteType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".WebsiteType" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "type"), + 3: .standard(proto: "created_at"), + 4: .standard(proto: "updated_at"), + 5: .same(proto: "checksum"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.type) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._createdAt) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._updatedAt) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.checksum) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if self.id != 0 { + try visitor.visitSingularUInt64Field(value: self.id, fieldNumber: 1) + } + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 2) + } + try { if let v = self._createdAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._updatedAt { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if !self.checksum.isEmpty { + try visitor.visitSingularStringField(value: self.checksum, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Proto_WebsiteType, rhs: Proto_WebsiteType) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.type != rhs.type {return false} + if lhs._createdAt != rhs._createdAt {return false} + if lhs._updatedAt != rhs._updatedAt {return false} + if lhs.checksum != rhs.checksum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/Sources/IGDB-SWIFT-API/Wrapper/Endpoints.swift b/Sources/IGDB-SWIFT-API/Wrapper/Endpoints.swift index 759a45f..5edccb1 100644 --- a/Sources/IGDB-SWIFT-API/Wrapper/Endpoints.swift +++ b/Sources/IGDB-SWIFT-API/Wrapper/Endpoints.swift @@ -9,10 +9,14 @@ import Foundation public enum Endpoint: String { - case AGE_RATINGS, AGE_RATING_CONTENT_DESCRIPTIONS, ALTERNATIVE_NAMES, ARTWORKS, - CHARACTERS, CHARACTER_MUG_SHOTS, COLLECTIONS, COMPANIES, COMPANY_WEBSITES, COMPANY_LOGOS, COVERS, EXTERNAL_GAMES, - FRANCHISES, GAMES, GAME_ENGINES, GAME_ENGINE_LOGOS, GAME_MODES, GAME_LOCALIZATIONS, GAME_VERSIONS, GAME_VERSION_FEATURES, - GAME_VERSION_FEATURE_VALUES, GAME_VIDEOS, GENRES, INVOLVED_COMPANIES, KEYWORDS, LANGUAGES, LANGUAGE_SUPPORTS, LANGUAGE_SUPPORT_TYPES, - MULTIPLAYER_MODES, PLATFORMS, PLATFORM_LOGOS,PLATFORM_VERSIONS, PLATFORM_VERSION_COMPANIES, PLATFORM_VERSION_RELEASE_DATES, - PLATFORM_WEBSITES, PLAYER_PERSPECTIVES, PLATFORM_FAMILIES, RELEASE_DATES, REGIONS, SCREENSHOTS, SEARCH, THEMES, TIME_TO_BEATS, TITLES, WEBSITES, EVENTS, EVENT_LOGOS, EVENT_NETWORKS, NETWORK_TYPES, COLLECTION_RELATION_TYPES, COLLECTION_TYPES, COLLECTION_MEMBERSHIPS, COLLECTION_MEMBERSHIP_TYPES, POPULARITY_TYPES, POPULARITY_PRIMITIVES + case AGE_RATING_CATEGORIES, AGE_RATING_CONTENT_DESCRIPTIONS, AGE_RATING_CONTENT_DESCRIPTIONS_V2, AGE_RATING_ORGANIZATIONS, AGE_RATINGS, + ALTERNATIVE_NAMES, ARTWORKS, CHARACTERS, CHARACTER_GENDERS, CHARACTER_MUG_SHOTS, CHARACTER_SPECIES, COLLECTION_MEMBERSHIPS, + COLLECTION_MEMBERSHIP_TYPES, COLLECTION_RELATIONS, COLLECTION_RELATION_TYPES, COLLECTION_TYPES, COLLECTIONS, COMPANIES, + COMPANY_LOGOS, COMPANY_STATUSES, COMPANY_WEBSITES, COVERS, DATE_FORMATS, EVENTS, EVENT_LOGOS, + EVENT_NETWORKS, EXTERNAL_GAMES, EXTERNAL_GAME_SOURCES, FRANCHISES, GAMES, GAME_ENGINES, GAME_ENGINE_LOGOS, GAME_LOCALIZATIONS, + GAME_MODES, GAME_RELEASE_FORMATS, GAME_STATUSES, GAME_TYPES, GAME_VERSIONS, GAME_VERSION_FEATURES, GAME_VERSION_FEATURE_VALUES, + GAME_VIDEOS, GENRES, INVOLVED_COMPANIES, KEYWORDS, LANGUAGES, LANGUAGE_SUPPORTS, LANGUAGE_SUPPORT_TYPES, MULTIPLAYER_MODES, + NETWORK_TYPES, PLATFORMS, PLATFORM_FAMILIES, PLATFORM_LOGOS, PLATFORM_TYPES, PLATFORM_VERSIONS, PLATFORM_VERSION_COMPANIES, + PLATFORM_VERSION_RELEASE_DATES, PLATFORM_WEBSITES, PLAYER_PERSPECTIVES, POPULARITY_PRIMITIVES, POPULARITY_TYPES, REGIONS, + RELEASE_DATES, RELEASE_DATE_REGIONS, SCREENSHOTS, SEARCH, THEMES, WEBSITES, WEBSITE_TYPES } diff --git a/Sources/IGDB-SWIFT-API/Wrapper/IGDBWrapper.swift b/Sources/IGDB-SWIFT-API/Wrapper/IGDBWrapper.swift index 13a77ac..8438013 100644 --- a/Sources/IGDB-SWIFT-API/Wrapper/IGDBWrapper.swift +++ b/Sources/IGDB-SWIFT-API/Wrapper/IGDBWrapper.swift @@ -7,7 +7,6 @@ // import Foundation -import Just private let APIURL = "https://api.igdb.com/v4" @@ -25,46 +24,119 @@ public class IGDBWrapper { requestHeaders["x-user-agent"] = "igdb-api-swift" } - public func apiProtoRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (Data) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + private func makeRequest(url urlString: String, body: Data?, completion: @escaping (Result<(Data, Int), RequestException>) -> Void) { + guard let url = URL(string: urlString) else { + completion(.failure(RequestException(statusCode: -1, url: urlString, msg: "Invalid URL"))) + return + } + + var request = URLRequest(url: url) + request.httpMethod = "POST" + request.httpBody = body + + for (key, value) in requestHeaders { + request.setValue(value, forHTTPHeaderField: key) + } + + let task = URLSession.shared.dataTask(with: request) { (data, response, error) in + if let error = error { + completion(.failure(RequestException(statusCode: -1, url: urlString, msg: error.localizedDescription))) + return + } + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(RequestException(statusCode: -1, url: urlString, msg: "Invalid response"))) + return + } + + guard let data = data else { + completion(.failure(RequestException(statusCode: httpResponse.statusCode, url: urlString, msg: "No data received"))) + return + } + + completion(.success((data, httpResponse.statusCode))) + } + task.resume() + } + + public func apiProtoRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (Data) -> Void, errorResponse: @escaping (RequestException) -> Void) { let requestURL = "\(requestURL)\(endpoint.url()).pb" - Just.post(requestURL, headers: requestHeaders, requestBody: apicalypseQuery.data(using: .utf8, allowLossyConversion: false), asyncCompletionHandler: { response in - if response.statusCode != 200 { - errorResponse(RequestException(statusCode: response.statusCode ?? -1, url: requestURL, msg: response.text ?? "")) + let body = apicalypseQuery.data(using: .utf8, allowLossyConversion: false) + + makeRequest(url: requestURL, body: body) { result in + switch result { + case .success(let (data, statusCode)): + if statusCode == 200 { + dataResponse(data) + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: String(data: data, encoding: .utf8) ?? "")) + } + case .failure(let error): + errorResponse(error) } - dataResponse(response.content!) - }) + } } - public func apiJsonRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + public func apiJsonRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (String) -> Void, errorResponse: @escaping (RequestException) -> Void) { let requestURL = "\(requestURL)\(endpoint.url())" - - Just.post(requestURL, headers: requestHeaders, requestBody: apicalypseQuery.data(using: .utf8, allowLossyConversion: false), asyncCompletionHandler: { response in - if response.statusCode != 200 { - errorResponse(RequestException(statusCode: response.statusCode ?? -1, url: requestURL, msg: response.text ?? "")) + let body = apicalypseQuery.data(using: .utf8, allowLossyConversion: false) + + makeRequest(url: requestURL, body: body) { result in + switch result { + case .success(let (data, statusCode)): + if statusCode == 200 { + if let text = String(data: data, encoding: .utf8) { + dataResponse(text) + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: "Could not decode response")) + } + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: String(data: data, encoding: .utf8) ?? "")) + } + case .failure(let error): + errorResponse(error) } - dataResponse(response.text ?? "") - }) + } } -// Adding count functions - public func apiProtoCountRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (Data) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + public func apiProtoCountRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (Data) -> Void, errorResponse: @escaping (RequestException) -> Void) { let requestURL = "\(requestURL)\(endpoint.url())/count.pb" - Just.post(requestURL, headers: requestHeaders, requestBody: apicalypseQuery.data(using: .utf8, allowLossyConversion: false), asyncCompletionHandler: { response in - if response.statusCode != 200 { - errorResponse(RequestException(statusCode: response.statusCode ?? -1, url: requestURL, msg: response.text ?? "")) + let body = apicalypseQuery.data(using: .utf8, allowLossyConversion: false) + + makeRequest(url: requestURL, body: body) { result in + switch result { + case .success(let (data, statusCode)): + if statusCode == 200 { + dataResponse(data) + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: String(data: data, encoding: .utf8) ?? "")) + } + case .failure(let error): + errorResponse(error) } - dataResponse(response.content!) - }) + } } - public func apiJsonCountRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + public func apiJsonCountRequest(endpoint: Endpoint, apicalypseQuery: String, dataResponse: @escaping (String) -> Void, errorResponse: @escaping (RequestException) -> Void) { let requestURL = "\(requestURL)\(endpoint.url())/count" - Just.post(requestURL, headers: requestHeaders, requestBody: apicalypseQuery.data(using: .utf8, allowLossyConversion: false), asyncCompletionHandler: { response in - if response.statusCode != 200 { - errorResponse(RequestException(statusCode: response.statusCode ?? -1, url: requestURL, msg: response.text ?? "")) + let body = apicalypseQuery.data(using: .utf8, allowLossyConversion: false) + + makeRequest(url: requestURL, body: body) { result in + switch result { + case .success(let (data, statusCode)): + if statusCode == 200 { + if let text = String(data: data, encoding: .utf8) { + dataResponse(text) + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: "Could not decode response")) + } + } else { + errorResponse(RequestException(statusCode: statusCode, url: requestURL, msg: String(data: data, encoding: .utf8) ?? "")) + } + case .failure(let error): + errorResponse(error) } - dataResponse(response.text ?? "") - }) + } } } diff --git a/Sources/IGDB-SWIFT-API/Wrapper/JsonRequest.swift b/Sources/IGDB-SWIFT-API/Wrapper/JsonRequest.swift index f1c04e1..196d852 100644 --- a/Sources/IGDB-SWIFT-API/Wrapper/JsonRequest.swift +++ b/Sources/IGDB-SWIFT-API/Wrapper/JsonRequest.swift @@ -14,10 +14,22 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .AGE_RATINGS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonAgeRatingCategories(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .AGE_RATING_CATEGORIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonAgeRatingContentDescriptions(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .AGE_RATING_CONTENT_DESCRIPTIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonAgeRatingContentDescriptionsV2(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .AGE_RATING_CONTENT_DESCRIPTIONS_V2, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + + func jsonAgeRatingOrganizations(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .AGE_RATING_ORGANIZATIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonAlternativeNames(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .ALTERNATIVE_NAMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -26,10 +38,34 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .ARTWORKS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonEvents(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .EVENTS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + + func jsonEventLogos(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .EVENT_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + + func jsonEventNetworks(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .EVENT_NETWORKS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + + func jsonNetworkTypes(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .NETWORK_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonCharacters(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .CHARACTERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonCharacterGenders(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .CHARACTER_GENDERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + + func jsonCharacterSpeciess(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .CHARACTER_SPECIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonCollections(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .COLLECTIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -42,6 +78,10 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .COMPANIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonCompanyStatuses(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .COMPANY_STATUSES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonCompanyWebsites(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .COMPANY_WEBSITES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -54,10 +94,18 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .COVERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonDateFormats(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .DATE_FORMATS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonExternalGames(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .EXTERNAL_GAMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonExternalGameSources(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .EXTERNAL_GAME_SOURCES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonFranschises(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .FRANCHISES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -82,6 +130,10 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .GAME_LOCALIZATIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonGameReleaseFormats(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .GAME_RELEASE_FORMATS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonGameVersions(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .GAME_VERSIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -134,6 +186,10 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .PLATFORM_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonPlatformTypes(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .PLATFORM_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonPlatformVersions(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .PLATFORM_VERSIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -162,6 +218,10 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .RELEASE_DATES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonReleaseDateRegions(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .RELEASE_DATE_REGIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonRegions(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .REGIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } @@ -182,6 +242,10 @@ public extension IGDBWrapper { apiJsonRequest(endpoint: .WEBSITES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } + func jsonWebsiteTypes(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiJsonRequest(endpoint: .WEBSITE_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) + } + func jsonPopularityTypes(apiCalypse: APICalypse, result: @escaping (String) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiJsonRequest(endpoint: .POPULARITY_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: result, errorResponse: errorResponse) } diff --git a/Sources/IGDB-SWIFT-API/Wrapper/ProtoRequest.swift b/Sources/IGDB-SWIFT-API/Wrapper/ProtoRequest.swift index c6dd710..988fa8f 100644 --- a/Sources/IGDB-SWIFT-API/Wrapper/ProtoRequest.swift +++ b/Sources/IGDB-SWIFT-API/Wrapper/ProtoRequest.swift @@ -13,371 +13,469 @@ public extension IGDBWrapper { func ageRatings(apiCalypse: APICalypse, result: @escaping ([Proto_AgeRating]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .AGE_RATINGS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_AgeRatingResult(serializedData: bytes).ageratings + let objects = try! Proto_AgeRatingResult(serializedBytes: bytes).ageratings + result(objects) + }, errorResponse: errorResponse) + } + + func ageRatingCategories(apiCalypse: APICalypse, result: @escaping ([Proto_AgeRatingCategory]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .AGE_RATING_CATEGORIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_AgeRatingCategoryResult(serializedBytes: bytes).ageratingcategories result(objects) }, errorResponse: errorResponse) } func ageRatingContentDescriptions(apiCalypse: APICalypse, result: @escaping ([Proto_AgeRatingContentDescription]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .AGE_RATING_CONTENT_DESCRIPTIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_AgeRatingContentDescriptionResult(serializedData: bytes).ageratingcontentdescriptions + let objects = try! Proto_AgeRatingContentDescriptionResult(serializedBytes: bytes).ageratingcontentdescriptions + result(objects) + }, errorResponse: errorResponse) + } + + func ageRatingContentDescriptionsV2(apiCalypse: APICalypse, result: @escaping ([Proto_AgeRatingContentDescriptionV2]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .AGE_RATING_CONTENT_DESCRIPTIONS_V2, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_AgeRatingContentDescriptionV2Result(serializedBytes: bytes).ageratingcontentdescriptionsv2 + result(objects) + }, errorResponse: errorResponse) + } + + func ageRatingOrganizations(apiCalypse: APICalypse, result: @escaping ([Proto_AgeRatingOrganization]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .AGE_RATING_ORGANIZATIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_AgeRatingOrganizationResult(serializedBytes: bytes).ageratingorganizations result(objects) }, errorResponse: errorResponse) } func alternativeNames(apiCalypse: APICalypse, result: @escaping ([Proto_AlternativeName]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .ALTERNATIVE_NAMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_AlternativeNameResult(serializedData: bytes).alternativenames + let objects = try! Proto_AlternativeNameResult(serializedBytes: bytes).alternativenames result(objects) }, errorResponse: errorResponse) } func artworks(apiCalypse: APICalypse, result: @escaping ([Proto_Artwork]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .ARTWORKS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_ArtworkResult(serializedData: bytes).artworks + let objects = try! Proto_ArtworkResult(serializedBytes: bytes).artworks result(objects) }, errorResponse: errorResponse) } func characters(apiCalypse: APICalypse, result: @escaping ([Proto_Character]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .CHARACTERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CharacterResult(serializedData: bytes).characters + let objects = try! Proto_CharacterResult(serializedBytes: bytes).characters + result(objects) + }, errorResponse: errorResponse) + } + + func characterGenders(apiCalypse: APICalypse, result: @escaping ([Proto_CharacterGender]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .CHARACTER_GENDERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_CharacterGenderResult(serializedBytes: bytes).charactergenders + result(objects) + }, errorResponse: errorResponse) + } + + func characterSpecies(apiCalypse: APICalypse, result: @escaping ([Proto_CharacterSpecie]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .CHARACTERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_CharacterSpecieResult(serializedBytes: bytes).characterspecies result(objects) }, errorResponse: errorResponse) } func collections(apiCalypse: APICalypse, result: @escaping ([Proto_Collection]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COLLECTIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CollectionResult(serializedData: bytes).collections + let objects = try! Proto_CollectionResult(serializedBytes: bytes).collections result(objects) }, errorResponse: errorResponse) } func characterMugShots(apiCalypse: APICalypse, result: @escaping ([Proto_CharacterMugShot]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .CHARACTER_MUG_SHOTS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CharacterMugShotResult(serializedData: bytes).charactermugshots + let objects = try! Proto_CharacterMugShotResult(serializedBytes: bytes).charactermugshots result(objects) }, errorResponse: errorResponse) } func companies(apiCalypse: APICalypse, result: @escaping ([Proto_Company]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COMPANIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CompanyResult(serializedData: bytes).companies + let objects = try! Proto_CompanyResult(serializedBytes: bytes).companies + result(objects) + }, errorResponse: errorResponse) + } + + func companyStatuses(apiCalypse: APICalypse, result: @escaping ([Proto_CompanyStatus]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .COMPANY_STATUSES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_CompanyStatusResult(serializedBytes: bytes).companystatuses result(objects) }, errorResponse: errorResponse) } func companyWebsites(apiCalypse: APICalypse, result: @escaping ([Proto_CompanyWebsite]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COMPANY_WEBSITES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CompanyWebsiteResult(serializedData: bytes).companywebsites + let objects = try! Proto_CompanyWebsiteResult(serializedBytes: bytes).companywebsites result(objects) }, errorResponse: errorResponse) } func companyLogos(apiCalypse: APICalypse, result: @escaping ([Proto_CompanyLogo]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COMPANY_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CompanyLogoResult(serializedData: bytes).companylogos + let objects = try! Proto_CompanyLogoResult(serializedBytes: bytes).companylogos result(objects) }, errorResponse: errorResponse) } func covers(apiCalypse: APICalypse, result: @escaping ([Proto_Cover]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COVERS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CoverResult(serializedData: bytes).covers + let objects = try! Proto_CoverResult(serializedBytes: bytes).covers + result(objects) + }, errorResponse: errorResponse) + } + + func dateFormats(apiCalypse: APICalypse, result: @escaping ([Proto_DateFormat]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .DATE_FORMATS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_DateFormatResult(serializedBytes: bytes).dateformats result(objects) }, errorResponse: errorResponse) } func externalGames(apiCalypse: APICalypse, result: @escaping ([Proto_ExternalGame]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .EXTERNAL_GAMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_ExternalGameResult(serializedData: bytes).externalgames + let objects = try! Proto_ExternalGameResult(serializedBytes: bytes).externalgames + result(objects) + }, errorResponse: errorResponse) + } + + func externalGameSources(apiCalypse: APICalypse, result: @escaping ([Proto_ExternalGameSource]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .EXTERNAL_GAME_SOURCES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_ExternalGameSourceResult(serializedBytes: bytes).externalgamesources result(objects) }, errorResponse: errorResponse) } func franschises(apiCalypse: APICalypse, result: @escaping ([Proto_Franchise]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .FRANCHISES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_FranchiseResult(serializedData: bytes).franchises + let objects = try! Proto_FranchiseResult(serializedBytes: bytes).franchises result(objects) }, errorResponse: errorResponse) } func games(apiCalypse: APICalypse, result: @escaping ([Proto_Game]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameResult(serializedData: bytes).games + let objects = try! Proto_GameResult(serializedBytes: bytes).games result(objects) }, errorResponse: errorResponse) } func gameEngines(apiCalypse: APICalypse, result: @escaping ([Proto_GameEngine]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_ENGINES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameEngineResult(serializedData: bytes).gameengines + let objects = try! Proto_GameEngineResult(serializedBytes: bytes).gameengines result(objects) }, errorResponse: errorResponse) } func gameEngineLogos(apiCalypse: APICalypse, result: @escaping ([Proto_GameEngineLogo]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_ENGINE_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameEngineLogoResult(serializedData: bytes).gameenginelogos + let objects = try! Proto_GameEngineLogoResult(serializedBytes: bytes).gameenginelogos result(objects) }, errorResponse: errorResponse) } func gameModes(apiCalypse: APICalypse, result: @escaping ([Proto_GameMode]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_MODES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameModeResult(serializedData: bytes).gamemodes + let objects = try! Proto_GameModeResult(serializedBytes: bytes).gamemodes result(objects) }, errorResponse: errorResponse) } func gameLocalizations(apiCalypse: APICalypse, result: @escaping ([Proto_GameLocalization]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_LOCALIZATIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameLocalizationResult(serializedData: bytes).gamelocalizations + let objects = try! Proto_GameLocalizationResult(serializedBytes: bytes).gamelocalizations + result(objects) + }, errorResponse: errorResponse) + } + + func gameReleaseFormats(apiCalypse: APICalypse, result: @escaping ([Proto_GameReleaseFormat]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .GAME_LOCALIZATIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_GameReleaseFormatResult(serializedBytes: bytes).gamereleaseformats result(objects) }, errorResponse: errorResponse) } func gameVersions(apiCalypse: APICalypse, result: @escaping ([Proto_GameVersion]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_VERSIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameVersionResult(serializedData: bytes).gameversions + let objects = try! Proto_GameVersionResult(serializedBytes: bytes).gameversions result(objects) }, errorResponse: errorResponse) } func gameVersionFeatures(apiCalypse: APICalypse, result: @escaping ([Proto_GameVersionFeature]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_VERSION_FEATURES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameVersionFeatureResult(serializedData: bytes).gameversionfeatures + let objects = try! Proto_GameVersionFeatureResult(serializedBytes: bytes).gameversionfeatures result(objects) }, errorResponse: errorResponse) } func gameVersionFeatureValues(apiCalypse: APICalypse, result: @escaping ([Proto_GameVersionFeatureValue]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_VERSION_FEATURE_VALUES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameVersionFeatureValueResult(serializedData: bytes).gameversionfeaturevalues + let objects = try! Proto_GameVersionFeatureValueResult(serializedBytes: bytes).gameversionfeaturevalues result(objects) }, errorResponse: errorResponse) } func gameVideos(apiCalypse: APICalypse, result: @escaping ([Proto_GameVideo]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GAME_VIDEOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GameVideoResult(serializedData: bytes).gamevideos + let objects = try! Proto_GameVideoResult(serializedBytes: bytes).gamevideos + result(objects) + }, errorResponse: errorResponse) + } + + func gameStatuses(apiCalypse: APICalypse, result: @escaping ([Proto_GameStatus]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .GAME_STATUSES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_GameStatusResult(serializedBytes: bytes).gamestatuses + result(objects) + }, errorResponse: errorResponse) + } + + func gameTypes(apiCalypse: APICalypse, result: @escaping ([Proto_GameType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .GAME_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_GameTypeResult(serializedBytes: bytes).gametypes result(objects) }, errorResponse: errorResponse) } func genres(apiCalypse: APICalypse, result: @escaping ([Proto_Genre]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .GENRES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_GenreResult(serializedData: bytes).genres + let objects = try! Proto_GenreResult(serializedBytes: bytes).genres result(objects) }, errorResponse: errorResponse) } func involvedCompanies(apiCalypse: APICalypse, result: @escaping ([Proto_InvolvedCompany]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .INVOLVED_COMPANIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_InvolvedCompanyResult(serializedData: bytes).involvedcompanies + let objects = try! Proto_InvolvedCompanyResult(serializedBytes: bytes).involvedcompanies result(objects) }, errorResponse: errorResponse) } func keywords(apiCalypse: APICalypse, result: @escaping ([Proto_Keyword]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .KEYWORDS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_KeywordResult(serializedData: bytes).keywords + let objects = try! Proto_KeywordResult(serializedBytes: bytes).keywords result(objects) }, errorResponse: errorResponse) } func languages(apiCalypse: APICalypse, result: @escaping ([Proto_Language]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .LANGUAGES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_LanguageResult(serializedData: bytes).languages + let objects = try! Proto_LanguageResult(serializedBytes: bytes).languages result(objects) }, errorResponse: errorResponse) } func languageSupports(apiCalypse: APICalypse, result: @escaping ([Proto_LanguageSupport]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .LANGUAGE_SUPPORTS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_LanguageSupportResult(serializedData: bytes).languagesupports + let objects = try! Proto_LanguageSupportResult(serializedBytes: bytes).languagesupports result(objects) }, errorResponse: errorResponse) } func languageSupportTypes(apiCalypse: APICalypse, result: @escaping ([Proto_LanguageSupportType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .LANGUAGE_SUPPORT_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_LanguageSupportTypeResult(serializedData: bytes).languagesupporttypes + let objects = try! Proto_LanguageSupportTypeResult(serializedBytes: bytes).languagesupporttypes result(objects) }, errorResponse: errorResponse) } func multiplayerModes(apiCalypse: APICalypse, result: @escaping ([Proto_MultiplayerMode]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .MULTIPLAYER_MODES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_MultiplayerModeResult(serializedData: bytes).multiplayermodes + let objects = try! Proto_MultiplayerModeResult(serializedBytes: bytes).multiplayermodes result(objects) }, errorResponse: errorResponse) } func platforms(apiCalypse: APICalypse, result: @escaping ([Proto_Platform]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORMS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformResult(serializedData: bytes).platforms + let objects = try! Proto_PlatformResult(serializedBytes: bytes).platforms result(objects) }, errorResponse: errorResponse) } func platformLogos(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformLogo]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformLogoResult(serializedData: bytes).platformlogos + let objects = try! Proto_PlatformLogoResult(serializedBytes: bytes).platformlogos + result(objects) + }, errorResponse: errorResponse) + } + + func platformTypes(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .PLATFORM_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_PlatformTypeResult(serializedBytes: bytes).platformtypes result(objects) }, errorResponse: errorResponse) } func platformVersions(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformVersion]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_VERSIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformVersionResult(serializedData: bytes).platformversions + let objects = try! Proto_PlatformVersionResult(serializedBytes: bytes).platformversions result(objects) }, errorResponse: errorResponse) } func platformVersionCompanies(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformVersionCompany]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_VERSION_COMPANIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformVersionCompanyResult(serializedData: bytes).platformversioncompanies + let objects = try! Proto_PlatformVersionCompanyResult(serializedBytes: bytes).platformversioncompanies result(objects) }, errorResponse: errorResponse) } func platformVersionReleaseDates(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformVersionReleaseDate]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_VERSION_RELEASE_DATES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformVersionReleaseDateResult(serializedData: bytes).platformversionreleasedates + let objects = try! Proto_PlatformVersionReleaseDateResult(serializedBytes: bytes).platformversionreleasedates result(objects) }, errorResponse: errorResponse) } func platformWebsites(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformWebsite]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_WEBSITES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformWebsiteResult(serializedData: bytes).platformwebsites + let objects = try! Proto_PlatformWebsiteResult(serializedBytes: bytes).platformwebsites result(objects) }, errorResponse: errorResponse) } func playerPerspectives(apiCalypse: APICalypse, result: @escaping ([Proto_PlayerPerspective]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLAYER_PERSPECTIVES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlayerPerspectiveResult(serializedData: bytes).playerperspectives + let objects = try! Proto_PlayerPerspectiveResult(serializedBytes: bytes).playerperspectives result(objects) }, errorResponse: errorResponse) } func platformFamilies(apiCalypse: APICalypse, result: @escaping ([Proto_PlatformFamily]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .PLATFORM_FAMILIES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PlatformFamilyResult(serializedData: bytes).platformfamilies + let objects = try! Proto_PlatformFamilyResult(serializedBytes: bytes).platformfamilies result(objects) }, errorResponse: errorResponse) } func releaseDates(apiCalypse: APICalypse, result: @escaping ([Proto_ReleaseDate]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .RELEASE_DATES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_ReleaseDateResult(serializedData: bytes).releasedates + let objects = try! Proto_ReleaseDateResult(serializedBytes: bytes).releasedates + result(objects) + }, errorResponse: errorResponse) + } + + func releaseDateRegion(apiCalypse: APICalypse, result: @escaping ([Proto_ReleaseDateRegion]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .RELEASE_DATE_REGIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_ReleaseDateRegionResult(serializedBytes: bytes).releasedateregions result(objects) }, errorResponse: errorResponse) } func regions(apiCalypse: APICalypse, result: @escaping ([Proto_Region]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .REGIONS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_RegionResult(serializedData: bytes).regions + let objects = try! Proto_RegionResult(serializedBytes: bytes).regions result(objects) }, errorResponse: errorResponse) } func screenshots(apiCalypse: APICalypse, result: @escaping ([Proto_Screenshot]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .SCREENSHOTS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_ScreenshotResult(serializedData: bytes).screenshots + let objects = try! Proto_ScreenshotResult(serializedBytes: bytes).screenshots result(objects) }, errorResponse: errorResponse) } func search(apiCalypse: APICalypse, result: @escaping ([Proto_Search]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .SEARCH, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_SearchResult(serializedData: bytes).searches + let objects = try! Proto_SearchResult(serializedBytes: bytes).searches result(objects) }, errorResponse: errorResponse) } func themes(apiCalypse: APICalypse, result: @escaping ([Proto_Theme]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .THEMES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_ThemeResult(serializedData: bytes).themes + let objects = try! Proto_ThemeResult(serializedBytes: bytes).themes result(objects) }, errorResponse: errorResponse) } func websites(apiCalypse: APICalypse, result: @escaping ([Proto_Website]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .WEBSITES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_WebsiteResult(serializedData: bytes).websites + let objects = try! Proto_WebsiteResult(serializedBytes: bytes).websites + result(objects) + }, errorResponse: errorResponse) + } + + func websiteTypes(apiCalypse: APICalypse, result: @escaping ([Proto_WebsiteType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { + apiProtoRequest(endpoint: .WEBSITE_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in + let objects = try! Proto_WebsiteTypeResult(serializedBytes: bytes).websitetypes result(objects) }, errorResponse: errorResponse) } func events(apiCalypse: APICalypse, result: @escaping ([Proto_Event]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .EVENTS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_EventResult(serializedData: bytes).events + let objects = try! Proto_EventResult(serializedBytes: bytes).events result(objects) }, errorResponse: errorResponse) } func eventLogos(apiCalypse: APICalypse, result: @escaping ([Proto_EventLogo]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .EVENT_LOGOS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_EventLogoResult(serializedData: bytes).eventlogos + let objects = try! Proto_EventLogoResult(serializedBytes: bytes).eventlogos result(objects) }, errorResponse: errorResponse) } func eventNetworks(apiCalypse: APICalypse, result: @escaping ([Proto_EventNetwork]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .EVENT_NETWORKS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_EventNetworkResult(serializedData: bytes).eventnetworks + let objects = try! Proto_EventNetworkResult(serializedBytes: bytes).eventnetworks result(objects) }, errorResponse: errorResponse) } func networkTypes(apiCalypse: APICalypse, result: @escaping ([Proto_NetworkType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .NETWORK_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_NetworkTypeResult(serializedData: bytes).networktypes + let objects = try! Proto_NetworkTypeResult(serializedBytes: bytes).networktypes result(objects) }, errorResponse: errorResponse) } func collectionRelationTypes(apiCalypse: APICalypse, result: @escaping ([Proto_CollectionRelationType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COLLECTION_RELATION_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CollectionRelationTypeResult(serializedData: bytes).collectionrelationtypes + let objects = try! Proto_CollectionRelationTypeResult(serializedBytes: bytes).collectionrelationtypes result(objects) }, errorResponse: errorResponse) } func collectionTypes(apiCalypse: APICalypse, result: @escaping ([Proto_CollectionType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COLLECTION_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CollectionTypeResult(serializedData: bytes).collectiontypes + let objects = try! Proto_CollectionTypeResult(serializedBytes: bytes).collectiontypes result(objects) }, errorResponse: errorResponse) } func collectionMemberships(apiCalypse: APICalypse, result: @escaping ([Proto_CollectionMembership]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COLLECTION_MEMBERSHIPS, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CollectionMembershipResult(serializedData: bytes).collectionmemberships + let objects = try! Proto_CollectionMembershipResult(serializedBytes: bytes).collectionmemberships result(objects) }, errorResponse: errorResponse) } func collectionMembershipTypes(apiCalypse: APICalypse, result: @escaping ([Proto_CollectionMembershipType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .COLLECTION_MEMBERSHIP_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_CollectionMembershipTypeResult(serializedData: bytes).collectionmembershiptypes + let objects = try! Proto_CollectionMembershipTypeResult(serializedBytes: bytes).collectionmembershiptypes result(objects) }, errorResponse: errorResponse) } func popularityTypes(apiCalypse: APICalypse, result: @escaping ([Proto_PopularityType]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .POPULARITY_TYPES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PopularityTypeResult(serializedData: bytes).popularitytypes + let objects = try! Proto_PopularityTypeResult(serializedBytes: bytes).popularitytypes result(objects) }, errorResponse: errorResponse) } func popularityPrimitives(apiCalypse: APICalypse, result: @escaping ([Proto_PopularityPrimitive]) -> (Void), errorResponse: @escaping (RequestException) -> (Void)) { apiProtoRequest(endpoint: .POPULARITY_PRIMITIVES, apicalypseQuery: apiCalypse.buildQuery(), dataResponse: { bytes -> (Void) in - let objects = try! Proto_PopularityPrimitiveResult(serializedData: bytes).popularityprimitives + let objects = try! Proto_PopularityPrimitiveResult(serializedBytes: bytes).popularityprimitives result(objects) }, errorResponse: errorResponse) } diff --git a/Tests/IGDB-SWIFT-APITests/TestIGDBWrapper.swift b/Tests/IGDB-SWIFT-APITests/TestIGDBWrapper.swift index 80968cb..8baa2e3 100644 --- a/Tests/IGDB-SWIFT-APITests/TestIGDBWrapper.swift +++ b/Tests/IGDB-SWIFT-APITests/TestIGDBWrapper.swift @@ -17,7 +17,7 @@ class TestIGDBWrapper: XCTestCase { ) func testComingSoonPS4Games() { - let date = String((Date().timeIntervalSince1970 / 1000)) + let date = Int(Date().timeIntervalSince1970) let query = APICalypse().fields(fields: "*") .where(query: "platforms = 48 & release_dates.date > \(date)") .sort(field: "release_dates.date", order: Sort.ASCENDING) @@ -25,7 +25,6 @@ class TestIGDBWrapper: XCTestCase { let expectation = self.expectation(description: "API Request") wrapper.games(apiCalypse: query, result: { games in XCTAssert(!games.isEmpty) - XCTAssertEqual(games.count, 10) expectation.fulfill() }) { error in XCTAssert(false) @@ -34,7 +33,7 @@ class TestIGDBWrapper: XCTestCase { } func testRecentlyReleasedPS4Games() { - let date = String((Date().timeIntervalSince1970 / 1000)) + let date = Int(Date().timeIntervalSince1970) let query = APICalypse().fields(fields: "*") .where(query: "platforms = 48 & release_dates.date < \(date)") .sort(field: "release_dates.date", order: Sort.DESCENDING) @@ -42,7 +41,6 @@ class TestIGDBWrapper: XCTestCase { let expectation = self.expectation(description: "API Request") wrapper.games(apiCalypse: query, result: { games in XCTAssert(!games.isEmpty) - XCTAssertEqual(games.count, 10) expectation.fulfill() }) { error in XCTAssert(false) diff --git a/Tests/IGDB-SWIFT-APITests/TestProtobufRequest.swift b/Tests/IGDB-SWIFT-APITests/TestProtobufRequest.swift index c30973d..3d4a2a4 100644 --- a/Tests/IGDB-SWIFT-APITests/TestProtobufRequest.swift +++ b/Tests/IGDB-SWIFT-APITests/TestProtobufRequest.swift @@ -16,10 +16,26 @@ class TestProtobufRequest: XCTestCase { accessToken: ProcessInfo.processInfo.environment["access_token"]! ) + private let apicalypseQuery = APICalypse().fields(fields: "*"); + func testAgeRating() { let expectation = self.expectation(description: "API Request") - wrapper.ageRatings(apiCalypse: APICalypse(), result: { result in + wrapper.ageRatings(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testAgeRatingCategories() { + let expectation = self.expectation(description: "API Request") + + wrapper.ageRatingCategories(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -33,7 +49,35 @@ class TestProtobufRequest: XCTestCase { func testAgeRatingContentDescriptions() { let expectation = self.expectation(description: "API Request") - wrapper.ageRatingContentDescriptions(apiCalypse: APICalypse(), result: { result in + wrapper.ageRatingContentDescriptions(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testAgeRatingContentDescriptionsV2() { + let expectation = self.expectation(description: "API Request") + + wrapper.ageRatingContentDescriptionsV2(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testAgeRatingOrganizations() { + let expectation = self.expectation(description: "API Request") + + wrapper.ageRatingOrganizations(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -47,7 +91,7 @@ class TestProtobufRequest: XCTestCase { func testAlternativeNames() { let expectation = self.expectation(description: "API Request") - wrapper.alternativeNames(apiCalypse: APICalypse(), result: { result in + wrapper.alternativeNames(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -61,7 +105,7 @@ class TestProtobufRequest: XCTestCase { func testArtwork() { let expectation = self.expectation(description: "API Request") - wrapper.artworks(apiCalypse: APICalypse(), result: { result in + wrapper.artworks(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -75,7 +119,35 @@ class TestProtobufRequest: XCTestCase { func testCharacters() { let expectation = self.expectation(description: "API Request") - wrapper.characters(apiCalypse: APICalypse(), result: { result in + wrapper.characters(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testCharacterGenders() { + let expectation = self.expectation(description: "API Request") + + wrapper.characterGenders(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testCharacterSpecies() { + let expectation = self.expectation(description: "API Request") + + wrapper.characterSpecies(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -89,7 +161,7 @@ class TestProtobufRequest: XCTestCase { func testCollections() { let expectation = self.expectation(description: "API Request") - wrapper.collections(apiCalypse: APICalypse(), result: { result in + wrapper.collections(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -103,7 +175,7 @@ class TestProtobufRequest: XCTestCase { func testCharacterMugShots() { let expectation = self.expectation(description: "API Request") - wrapper.characterMugShots(apiCalypse: APICalypse(), result: { result in + wrapper.characterMugShots(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -117,7 +189,21 @@ class TestProtobufRequest: XCTestCase { func testCompanies() { let expectation = self.expectation(description: "API Request") - wrapper.companies(apiCalypse: APICalypse(), result: { result in + wrapper.companies(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testCompanyStatuses() { + let expectation = self.expectation(description: "API Request") + + wrapper.companyStatuses(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -131,7 +217,7 @@ class TestProtobufRequest: XCTestCase { func testComapnyWebsites() { let expectation = self.expectation(description: "API Request") - wrapper.companyWebsites(apiCalypse: APICalypse(), result: { result in + wrapper.companyWebsites(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -145,7 +231,7 @@ class TestProtobufRequest: XCTestCase { func testCompantLogos() { let expectation = self.expectation(description: "API Request") - wrapper.companyLogos(apiCalypse: APICalypse(), result: { result in + wrapper.companyLogos(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -159,7 +245,21 @@ class TestProtobufRequest: XCTestCase { func testCover() { let expectation = self.expectation(description: "API Request") - wrapper.covers(apiCalypse: APICalypse(), result: { result in + wrapper.covers(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testDateFormats() { + let expectation = self.expectation(description: "API Request") + + wrapper.dateFormats(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -173,7 +273,21 @@ class TestProtobufRequest: XCTestCase { func testExternalGames() { let expectation = self.expectation(description: "API Request") - wrapper.externalGames(apiCalypse: APICalypse(), result: { result in + wrapper.externalGames(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testExternalGameSources() { + let expectation = self.expectation(description: "API Request") + + wrapper.externalGameSources(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -187,7 +301,7 @@ class TestProtobufRequest: XCTestCase { func testFranschises() { let expectation = self.expectation(description: "API Request") - wrapper.franschises(apiCalypse: APICalypse(), result: { result in + wrapper.franschises(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -220,6 +334,9 @@ class TestProtobufRequest: XCTestCase { let ageRatings = game.ageRatings let ageRating = ageRatings[0] XCTAssertFalse(ageRating.contentDescriptions.isEmpty) + XCTAssert(ageRating.hasOrganization) + XCTAssert(ageRating.hasRatingCategory) + XCTAssertFalse(ageRating.ratingContentDescriptions.isEmpty) XCTAssertFalse(ageRating.checksum.isEmpty) XCTAssertNotEqual(" ", ageRating.checksum) @@ -278,7 +395,7 @@ class TestProtobufRequest: XCTestCase { func testGameEngines() { let expectation = self.expectation(description: "API Request") - wrapper.gameEngines(apiCalypse: APICalypse(), result: { result in + wrapper.gameEngines(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -292,7 +409,7 @@ class TestProtobufRequest: XCTestCase { func testGameEngineLogos() { let expectation = self.expectation(description: "API Request") - wrapper.gameEngineLogos(apiCalypse: APICalypse(), result: { result in + wrapper.gameEngineLogos(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -306,7 +423,49 @@ class TestProtobufRequest: XCTestCase { func testGameModes() { let expectation = self.expectation(description: "API Request") - wrapper.gameModes(apiCalypse: APICalypse(), result: { result in + wrapper.gameModes(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testGameReleaseFormats() { + let expectation = self.expectation(description: "API Request") + + wrapper.gameReleaseFormats(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testGameStatuses() { + let expectation = self.expectation(description: "API Request") + + wrapper.gameStatuses(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testGameTypes() { + let expectation = self.expectation(description: "API Request") + + wrapper.gameTypes(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -320,7 +479,7 @@ class TestProtobufRequest: XCTestCase { func testGameVersions() { let expectation = self.expectation(description: "API Request") - wrapper.gameVersions(apiCalypse: APICalypse(), result: { result in + wrapper.gameVersions(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -334,7 +493,7 @@ class TestProtobufRequest: XCTestCase { func testGameVersionFeatures() { let expectation = self.expectation(description: "API Request") - wrapper.gameVersionFeatures(apiCalypse: APICalypse(), result: { result in + wrapper.gameVersionFeatures(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -348,7 +507,7 @@ class TestProtobufRequest: XCTestCase { func testGameVersionFeatureValues() { let expectation = self.expectation(description: "API Request") - wrapper.gameVersionFeatureValues(apiCalypse: APICalypse(), result: { result in + wrapper.gameVersionFeatureValues(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -362,7 +521,7 @@ class TestProtobufRequest: XCTestCase { func testGameVideos() { let expectation = self.expectation(description: "API Request") - wrapper.gameVideos(apiCalypse: APICalypse(), result: { result in + wrapper.gameVideos(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -376,7 +535,7 @@ class TestProtobufRequest: XCTestCase { func testGenres() { let expectation = self.expectation(description: "API Request") - wrapper.genres(apiCalypse: APICalypse(), result: { result in + wrapper.genres(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -390,7 +549,7 @@ class TestProtobufRequest: XCTestCase { func testInvolvedCompanies() { let expectation = self.expectation(description: "API Request") - wrapper.involvedCompanies(apiCalypse: APICalypse(), result: { result in + wrapper.involvedCompanies(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -404,7 +563,7 @@ class TestProtobufRequest: XCTestCase { func testKeywords() { let expectation = self.expectation(description: "API Request") - wrapper.keywords(apiCalypse: APICalypse(), result: { result in + wrapper.keywords(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -418,7 +577,7 @@ class TestProtobufRequest: XCTestCase { func testMultiplayerModes() { let expectation = self.expectation(description: "API Request") - wrapper.multiplayerModes(apiCalypse: APICalypse(), result: { result in + wrapper.multiplayerModes(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -432,7 +591,21 @@ class TestProtobufRequest: XCTestCase { func testPlatforms() { let expectation = self.expectation(description: "API Request") - wrapper.platforms(apiCalypse: APICalypse(), result: { result in + wrapper.platforms(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testPlatformTypes() { + let expectation = self.expectation(description: "API Request") + + wrapper.platformTypes(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -446,7 +619,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformLogos() { let expectation = self.expectation(description: "API Request") - wrapper.platformLogos(apiCalypse: APICalypse(), result: { result in + wrapper.platformLogos(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -459,7 +632,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformVersions() { let expectation = self.expectation(description: "API Request") - wrapper.platformVersions(apiCalypse: APICalypse(), result: { result in + wrapper.platformVersions(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -472,7 +645,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformVerisonCompanies() { let expectation = self.expectation(description: "API Request") - wrapper.platformVersionCompanies(apiCalypse: APICalypse(), result: { result in + wrapper.platformVersionCompanies(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -485,7 +658,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformVersionReleaseDates() { let expectation = self.expectation(description: "API Request") - wrapper.platformVersionReleaseDates(apiCalypse: APICalypse(), result: { result in + wrapper.platformVersionReleaseDates(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -498,7 +671,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformWebsites() { let expectation = self.expectation(description: "API Request") - wrapper.platformWebsites(apiCalypse: APICalypse(), result: { result in + wrapper.platformWebsites(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -511,7 +684,7 @@ class TestProtobufRequest: XCTestCase { func testPlayerPerspectives() { let expectation = self.expectation(description: "API Request") - wrapper.playerPerspectives(apiCalypse: APICalypse(), result: { result in + wrapper.playerPerspectives(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -524,7 +697,7 @@ class TestProtobufRequest: XCTestCase { func testPlatformFamilies() { let expectation = self.expectation(description: "API Request") - wrapper.platformFamilies(apiCalypse: APICalypse(), result: { result in + wrapper.platformFamilies(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -537,7 +710,20 @@ class TestProtobufRequest: XCTestCase { func testReleaseDates() { let expectation = self.expectation(description: "API Request") - wrapper.releaseDates(apiCalypse: APICalypse(), result: { result in + wrapper.releaseDates(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + func testReleaseDateRegions() { + let expectation = self.expectation(description: "API Request") + + wrapper.releaseDateRegion(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -550,7 +736,7 @@ class TestProtobufRequest: XCTestCase { func testScreenshots() { let expectation = self.expectation(description: "API Request") - wrapper.screenshots(apiCalypse: APICalypse(), result: { result in + wrapper.screenshots(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -563,7 +749,7 @@ class TestProtobufRequest: XCTestCase { func testSearch() { let expectation = self.expectation(description: "API Request") - wrapper.search(apiCalypse: APICalypse(), result: { result in + wrapper.search(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -576,7 +762,7 @@ class TestProtobufRequest: XCTestCase { func testThemes() { let expectation = self.expectation(description: "API Request") - wrapper.themes(apiCalypse: APICalypse(), result: { result in + wrapper.themes(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -589,7 +775,21 @@ class TestProtobufRequest: XCTestCase { func testWebsites() { let expectation = self.expectation(description: "API Request") - wrapper.websites(apiCalypse: APICalypse(), result: { result in + wrapper.websites(apiCalypse: apicalypseQuery, result: { result in + XCTAssertFalse(result.isEmpty) + + expectation.fulfill() + }) { error in + XCTAssert(false) + } + + waitForExpectations(timeout: 5, handler: nil) + } + + func testWebsiteTypes() { + let expectation = self.expectation(description: "API Request") + + wrapper.websites(apiCalypse: apicalypseQuery, result: { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -603,7 +803,7 @@ class TestProtobufRequest: XCTestCase { func testLanguages() { let expectation = self.expectation(description: "API Request") - wrapper.languages(apiCalypse: APICalypse()) { result in + wrapper.languages(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -616,7 +816,7 @@ class TestProtobufRequest: XCTestCase { func testLanguageSupports() { let expectation = self.expectation(description: "API Request") - wrapper.languageSupports(apiCalypse: APICalypse()) { result in + wrapper.languageSupports(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -629,7 +829,7 @@ class TestProtobufRequest: XCTestCase { func testLanguageSupportTypes() { let expectation = self.expectation(description: "API Request") - wrapper.languageSupportTypes(apiCalypse: APICalypse()) { result in + wrapper.languageSupportTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -642,7 +842,7 @@ class TestProtobufRequest: XCTestCase { func testGameLocalizations() { let expectation = self.expectation(description: "API Request") - wrapper.gameLocalizations(apiCalypse: APICalypse()) { result in + wrapper.gameLocalizations(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -655,7 +855,7 @@ class TestProtobufRequest: XCTestCase { func testRegions() { let expectation = self.expectation(description: "API Request") - wrapper.regions(apiCalypse: APICalypse()) { result in + wrapper.regions(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -668,7 +868,7 @@ class TestProtobufRequest: XCTestCase { func testEvents() { let expectation = self.expectation(description: "API Request") - wrapper.events(apiCalypse: APICalypse()) { result in + wrapper.events(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -681,7 +881,7 @@ class TestProtobufRequest: XCTestCase { func testEventLogos() { let expectation = self.expectation(description: "API Request") - wrapper.eventLogos(apiCalypse: APICalypse()) { result in + wrapper.eventLogos(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -694,7 +894,7 @@ class TestProtobufRequest: XCTestCase { func testEventNetworks() { let expectation = self.expectation(description: "API Request") - wrapper.eventNetworks(apiCalypse: APICalypse()) { result in + wrapper.eventNetworks(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -707,7 +907,7 @@ class TestProtobufRequest: XCTestCase { func testNetworkTypes() { let expectation = self.expectation(description: "API Request") - wrapper.networkTypes(apiCalypse: APICalypse()) { result in + wrapper.networkTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -720,7 +920,7 @@ class TestProtobufRequest: XCTestCase { func testCollectionRelationTypes() { let expectation = self.expectation(description: "API Request") - wrapper.collectionRelationTypes(apiCalypse: APICalypse()) { result in + wrapper.collectionRelationTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -733,7 +933,7 @@ class TestProtobufRequest: XCTestCase { func testCollectionTypes() { let expectation = self.expectation(description: "API Request") - wrapper.collectionTypes(apiCalypse: APICalypse()) { result in + wrapper.collectionTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -746,7 +946,7 @@ class TestProtobufRequest: XCTestCase { func testCollectionMemberships() { let expectation = self.expectation(description: "API Request") - wrapper.collectionMemberships(apiCalypse: APICalypse()) { result in + wrapper.collectionMemberships(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -759,7 +959,7 @@ class TestProtobufRequest: XCTestCase { func testCollectionMembershipTypes() { let expectation = self.expectation(description: "API Request") - wrapper.collectionMembershipTypes(apiCalypse: APICalypse()) { result in + wrapper.collectionMembershipTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -772,7 +972,7 @@ class TestProtobufRequest: XCTestCase { func testPopularityTypes() { let expectation = self.expectation(description: "API Request") - wrapper.popularityTypes(apiCalypse: APICalypse()) { result in + wrapper.popularityTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() @@ -785,7 +985,7 @@ class TestProtobufRequest: XCTestCase { func testPopularityPrimitives() { let expectation = self.expectation(description: "API Request") - wrapper.popularityTypes(apiCalypse: APICalypse()) { result in + wrapper.popularityTypes(apiCalypse: apicalypseQuery) { result in XCTAssertFalse(result.isEmpty) expectation.fulfill() diff --git a/Tests/IGDB-SWIFT-APITests/TestProxy.swift b/Tests/IGDB-SWIFT-APITests/TestProxy.swift index f265d33..4263601 100644 --- a/Tests/IGDB-SWIFT-APITests/TestProxy.swift +++ b/Tests/IGDB-SWIFT-APITests/TestProxy.swift @@ -17,7 +17,7 @@ class TestProxy: XCTestCase { ) func testComingSoonPS4Games() { - let date = String((Date().timeIntervalSince1970 / 1000)) + let date = Int(Date().timeIntervalSince1970) let query = APICalypse().fields(fields: "*") .where(query: "platforms = 48 & release_dates.date > \(date)") .sort(field: "release_dates.date", order: Sort.ASCENDING) @@ -25,7 +25,6 @@ class TestProxy: XCTestCase { let expectation = self.expectation(description: "API Request") wrapper.games(apiCalypse: query, result: { games in XCTAssert(!games.isEmpty) - XCTAssertEqual(games.count, 10) expectation.fulfill() }) { error in XCTAssert(false) @@ -34,7 +33,7 @@ class TestProxy: XCTestCase { } func testRecentlyReleasedPS4Games() { - let date = String((Date().timeIntervalSince1970 / 1000)) + let date = Int(Date().timeIntervalSince1970) let query = APICalypse().fields(fields: "*") .where(query: "platforms = 48 & release_dates.date < \(date)") .sort(field: "release_dates.date", order: Sort.DESCENDING) @@ -42,7 +41,6 @@ class TestProxy: XCTestCase { let expectation = self.expectation(description: "API Request") wrapper.games(apiCalypse: query, result: { games in XCTAssert(!games.isEmpty) - XCTAssertEqual(games.count, 10) expectation.fulfill() }) { error in XCTAssert(false) From 32e8d322460f21ab148a3cdb49d0e967a09eded3 Mon Sep 17 00:00:00 2001 From: Husnjak Date: Thu, 13 Mar 2025 15:08:19 +0100 Subject: [PATCH 2/2] Update Readme --- README.md | 4 ++-- Tests/IGDB-SWIFT-APITests/TestCount.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40a7880..15f4a9a 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You can either import this library using Xcode by simply pasting this repository Or if you have a `Package.swift` file you can add this: ```swift dependencies: [ -.package(url: "https://github.com/husnjak/IGDB-SWIFT-API.git", from: "0.4.5"), +.package(url: "https://github.com/husnjak/IGDB-SWIFT-API.git", from: "0.5.0"), ], targets: [ .target(name: "MyTarget", dependencies: ["IGDB-SWIFT-API"]), @@ -82,7 +82,7 @@ The class `APICalypse` handles the new querying language, so that you don't need This method handles IGDB generated proto classes which returns Data to be used to fill the appropriate class. ```swift wrapper.apiProtoRequest(endpoint: .GAMES, apicalypseQuery: "fields *;", dataResponse: { bytes in - let games: [Proto_Game] = try! Proto_GameResult(serializedData: bytes) // This converts Binary to a struct + let games: [Proto_Game] = try! Proto_GameResult(serializedBytes: bytes) // This converts Binary to a struct }, errorResponse: { error in // Do Something }) diff --git a/Tests/IGDB-SWIFT-APITests/TestCount.swift b/Tests/IGDB-SWIFT-APITests/TestCount.swift index 230958e..ceee521 100644 --- a/Tests/IGDB-SWIFT-APITests/TestCount.swift +++ b/Tests/IGDB-SWIFT-APITests/TestCount.swift @@ -19,7 +19,7 @@ class TestCount: XCTestCase { let expectation = self.expectation(description: "API Games Count request") wrapper.apiProtoCountRequest(endpoint: .GAMES, apicalypseQuery: "", dataResponse: { bytes -> (Void) in - let count = try! Proto_Count(serializedData: bytes).count + let count = try! Proto_Count(serializedBytes: bytes).count XCTAssert(count > 0) expectation.fulfill()