diff --git a/Campus-iOS.xcodeproj/project.pbxproj b/Campus-iOS.xcodeproj/project.pbxproj index 38718604..440d23de 100644 --- a/Campus-iOS.xcodeproj/project.pbxproj +++ b/Campus-iOS.xcodeproj/project.pbxproj @@ -256,6 +256,25 @@ 97C9AB1227732A200097B10C /* SwiftUICharts in Frameworks */ = {isa = PBXBuildFile; productRef = 97C9AB1127732A200097B10C /* SwiftUICharts */; }; 97F8A79327E641570099EE83 /* AcademicDegree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97F8A79227E641570099EE83 /* AcademicDegree.swift */; }; 99706870298569E10028D235 /* CrashlyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9970686F298569E10028D235 /* CrashlyticsService.swift */; }; + 99438F012950770400766197 /* CampusService.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99438EFF2950770400766197 /* CampusService.pb.swift */; }; + 99438F022950770400766197 /* CampusService.grpc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99438F002950770400766197 /* CampusService.grpc.swift */; }; + 9958318029361F6F00F25E11 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9958317F29361F6F00F25E11 /* AppDelegate.swift */; }; + 99583183293621A200F25E11 /* PushNotifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99583182293621A200F25E11 /* PushNotifications.swift */; }; + 9958318829362FCE00F25E11 /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = 9958318729362FCE00F25E11 /* SwiftProtobuf */; }; + 9958318A29362FCE00F25E11 /* SwiftProtobufPluginLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 9958318929362FCE00F25E11 /* SwiftProtobufPluginLibrary */; }; + 9958318F2936336900F25E11 /* CGRPCZlib in Frameworks */ = {isa = PBXBuildFile; productRef = 9958318E2936336900F25E11 /* CGRPCZlib */; }; + 995831912936336900F25E11 /* GRPC in Frameworks */ = {isa = PBXBuildFile; productRef = 995831902936336900F25E11 /* GRPC */; }; + 995831932936336900F25E11 /* protoc-gen-grpc-swift in Frameworks */ = {isa = PBXBuildFile; productRef = 995831922936336900F25E11 /* protoc-gen-grpc-swift */; }; + 995831952936469100F25E11 /* CampusBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995831942936469000F25E11 /* CampusBackend.swift */; }; + 99706870298569E10028D235 /* CrashlyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9970686F298569E10028D235 /* CrashlyticsService.swift */; }; + 99706872298572A50028D235 /* KeychainService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99706871298572A50028D235 /* KeychainService.swift */; }; + 997068732985752E0028D235 /* KeychainService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99706871298572A50028D235 /* KeychainService.swift */; }; + 9973857C29490EFE00B1AE34 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9973857B29490EFE00B1AE34 /* NotificationService.swift */; }; + 9973858029490EFE00B1AE34 /* NotificationService.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 9973857929490EFE00B1AE34 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 997385862949324F00B1AE34 /* CryptoExportImportManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 997385852949324F00B1AE34 /* CryptoExportImportManager.swift */; }; + 997385872949324F00B1AE34 /* CryptoExportImportManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 997385852949324F00B1AE34 /* CryptoExportImportManager.swift */; }; + 999E324B29859DDA0099755D /* Credentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36203E8A2761C6EC00C24658 /* Credentials.swift */; }; + 99F1850B2986B8FB00F5F920 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 99F1850A2986B8FB00F5F920 /* KeychainAccess */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -273,8 +292,29 @@ remoteGlobalIDString = 366F0E7F27580CFB0091651D; remoteInfo = "Campus-iOS"; }; + 9973857E29490EFE00B1AE34 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 366F0E7827580CFB0091651D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9973857829490EFE00B1AE34; + remoteInfo = NotificationService; + }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 997385742949004E00B1AE34 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 9973858029490EFE00B1AE34 /* NotificationService.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 08038F95287430FB0048DAE5 /* WidgetTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetTitleView.swift; sourceTree = ""; }; 0805DB7628C7F3E600712FF2 /* AnalyticsOptInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsOptInView.swift; sourceTree = ""; }; @@ -519,6 +559,18 @@ 974D5B9927E5E9CB00FD7B11 /* GlowBorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlowBorder.swift; sourceTree = ""; }; 97F8A79227E641570099EE83 /* AcademicDegree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcademicDegree.swift; sourceTree = ""; }; 9970686F298569E10028D235 /* CrashlyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashlyticsService.swift; sourceTree = ""; }; + 99438EFF2950770400766197 /* CampusService.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CampusService.pb.swift; sourceTree = ""; }; + 99438F002950770400766197 /* CampusService.grpc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CampusService.grpc.swift; sourceTree = ""; }; + 9958317F29361F6F00F25E11 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 99583182293621A200F25E11 /* PushNotifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PushNotifications.swift; sourceTree = ""; }; + 995831942936469000F25E11 /* CampusBackend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CampusBackend.swift; sourceTree = ""; }; + 9970686F298569E10028D235 /* CrashlyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashlyticsService.swift; sourceTree = ""; }; + 99706871298572A50028D235 /* KeychainService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainService.swift; sourceTree = ""; }; + 9973857929490EFE00B1AE34 /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 9973857B29490EFE00B1AE34 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; + 9973857D29490EFE00B1AE34 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9973858129490EFE00B1AE34 /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationService.entitlements; sourceTree = ""; }; + 997385852949324F00B1AE34 /* CryptoExportImportManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CryptoExportImportManager.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -532,11 +584,16 @@ 97C9AB1227732A200097B10C /* SwiftUICharts in Frameworks */, 36E964AA277498B60055777F /* KVKCalendar in Frameworks */, 36FF90722773BFC300F4C785 /* FirebaseAnalytics in Frameworks */, + 995831932936336900F25E11 /* protoc-gen-grpc-swift in Frameworks */, 36FF90682773BCA600F4C785 /* SWXMLHash in Frameworks */, 36FF90742773BFC300F4C785 /* FirebaseAnalyticsSwift-Beta in Frameworks */, + 9958318A29362FCE00F25E11 /* SwiftProtobufPluginLibrary in Frameworks */, + 9958318F2936336900F25E11 /* CGRPCZlib in Frameworks */, 36FF90762773BFC300F4C785 /* FirebaseCrashlytics in Frameworks */, + 995831912936336900F25E11 /* GRPC in Frameworks */, 36203E832761BDD100C24658 /* KeychainAccess in Frameworks */, 97997AE127722D660079F809 /* Alamofire in Frameworks */, + 9958318829362FCE00F25E11 /* SwiftProtobuf in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -554,6 +611,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 9973857629490EFE00B1AE34 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 99F1850B2986B8FB00F5F920 /* KeychainAccess in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -1067,8 +1132,10 @@ 366F0E8227580CFB0091651D /* Campus-iOS */, 366F0E9827580CFD0091651D /* Campus-iOSTests */, 366F0EA227580CFD0091651D /* Campus-iOSUITests */, + 9973857A29490EFE00B1AE34 /* NotificationService */, 366F0E8127580CFB0091651D /* Products */, 1FFEF086284E417E00ADD201 /* Recovered References */, + 99F185092986B8FB00F5F920 /* Frameworks */, ); sourceTree = ""; }; @@ -1078,6 +1145,7 @@ 366F0E8027580CFB0091651D /* Campus-iOS.app */, 366F0E9527580CFD0091651D /* Campus-iOSTests.xctest */, 366F0E9F27580CFD0091651D /* Campus-iOSUITests.xctest */, + 9973857929490EFE00B1AE34 /* NotificationService.appex */, ); name = Products; sourceTree = ""; @@ -1086,6 +1154,8 @@ isa = PBXGroup; children = ( 9970686E298569CE0028D235 /* Crashlytics */, + 9970686E298569CE0028D235 /* Crashlytics */, + 995831812936215D00F25E11 /* PushNotifications */, 085DE9C428AB7C3D0045095F /* AnalyticsComponent */, 3654F3692851710E008AD5DC /* RoomFinder */, 36BB6F8027B39B2200F224AB /* LectureSearchComponent */, @@ -1118,6 +1188,7 @@ 36AD5CFD27BA064E00DAE143 /* GoogleService-Info.plist */, 366F0E8E27580CFD0091651D /* Campus_iOS.xcdatamodeld */, 366F0E8927580CFD0091651D /* Preview Content */, + 9958317F29361F6F00F25E11 /* AppDelegate.swift */, ); path = "Campus-iOS"; sourceTree = ""; @@ -1200,6 +1271,9 @@ 36AF61C127A2FD7700FEBD98 /* TUMOnlineAPI.swift */, 36AF61C227A2FD7700FEBD98 /* Cache.swift */, 36AF61C327A2FD7700FEBD98 /* TUMCabeAPI.swift */, + 99438F002950770400766197 /* CampusService.grpc.swift */, + 99438EFF2950770400766197 /* CampusService.pb.swift */, + 995831942936469000F25E11 /* CampusBackend.swift */, ); path = Networking; sourceTree = ""; @@ -1517,6 +1591,16 @@ path = Icons; sourceTree = ""; }; + 995831812936215D00F25E11 /* PushNotifications */ = { + isa = PBXGroup; + children = ( + 99583182293621A200F25E11 /* PushNotifications.swift */, + 997385852949324F00B1AE34 /* CryptoExportImportManager.swift */, + 99706871298572A50028D235 /* KeychainService.swift */, + ); + path = PushNotifications; + sourceTree = ""; + }; 9970686E298569CE0028D235 /* Crashlytics */ = { isa = PBXGroup; children = ( @@ -1525,6 +1609,23 @@ path = Crashlytics; sourceTree = ""; }; + 9973857A29490EFE00B1AE34 /* NotificationService */ = { + isa = PBXGroup; + children = ( + 9973858129490EFE00B1AE34 /* NotificationService.entitlements */, + 9973857B29490EFE00B1AE34 /* NotificationService.swift */, + 9973857D29490EFE00B1AE34 /* Info.plist */, + ); + path = NotificationService; + sourceTree = ""; + }; + 99F185092986B8FB00F5F920 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1535,10 +1636,12 @@ 366F0E7C27580CFB0091651D /* Sources */, 366F0E7D27580CFB0091651D /* Frameworks */, 366F0E7E27580CFB0091651D /* Resources */, + 997385742949004E00B1AE34 /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( + 9973857F29490EFE00B1AE34 /* PBXTargetDependency */, ); name = "Campus-iOS"; packageProductDependencies = ( @@ -1553,6 +1656,11 @@ 36E964A9277498B60055777F /* KVKCalendar */, 226CB51D2798DF9C0043ABCA /* Snap */, 41D55D6D27A2EFB200DE7155 /* LRUCache */, + 9958318729362FCE00F25E11 /* SwiftProtobuf */, + 9958318929362FCE00F25E11 /* SwiftProtobufPluginLibrary */, + 9958318E2936336900F25E11 /* CGRPCZlib */, + 995831902936336900F25E11 /* GRPC */, + 995831922936336900F25E11 /* protoc-gen-grpc-swift */, ); productName = "Campus-iOS"; productReference = 366F0E8027580CFB0091651D /* Campus-iOS.app */; @@ -1594,6 +1702,26 @@ productReference = 366F0E9F27580CFD0091651D /* Campus-iOSUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; + 9973857829490EFE00B1AE34 /* NotificationService */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9973858229490EFE00B1AE34 /* Build configuration list for PBXNativeTarget "NotificationService" */; + buildPhases = ( + 9973857529490EFE00B1AE34 /* Sources */, + 9973857629490EFE00B1AE34 /* Frameworks */, + 9973857729490EFE00B1AE34 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NotificationService; + packageProductDependencies = ( + 99F1850A2986B8FB00F5F920 /* KeychainAccess */, + ); + productName = NotificationService; + productReference = 9973857929490EFE00B1AE34 /* NotificationService.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1601,7 +1729,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1310; + LastSwiftUpdateCheck = 1410; LastUpgradeCheck = 1320; TargetAttributes = { 366F0E7F27580CFB0091651D = { @@ -1615,6 +1743,9 @@ CreatedOnToolsVersion = 13.1; TestTargetID = 366F0E7F27580CFB0091651D; }; + 9973857829490EFE00B1AE34 = { + CreatedOnToolsVersion = 14.1; + }; }; }; buildConfigurationList = 366F0E7B27580CFB0091651D /* Build configuration list for PBXProject "Campus-iOS" */; @@ -1637,6 +1768,8 @@ 36E964A8277498B60055777F /* XCRemoteSwiftPackageReference "KVKCalendar" */, 226CB51C2798DF9C0043ABCA /* XCRemoteSwiftPackageReference "Snap" */, 41D55D6C27A2EFB200DE7155 /* XCRemoteSwiftPackageReference "LRUCache" */, + 9958318629362FCE00F25E11 /* XCRemoteSwiftPackageReference "swift-protobuf" */, + 9958318D2936336900F25E11 /* XCRemoteSwiftPackageReference "grpc-swift" */, ); productRefGroup = 366F0E8127580CFB0091651D /* Products */; projectDirPath = ""; @@ -1645,6 +1778,7 @@ 366F0E7F27580CFB0091651D /* Campus-iOS */, 366F0E9427580CFD0091651D /* Campus-iOSTests */, 366F0E9E27580CFD0091651D /* Campus-iOSUITests */, + 9973857829490EFE00B1AE34 /* NotificationService */, ); }; /* End PBXProject section */ @@ -1690,6 +1824,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 9973857729490EFE00B1AE34 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1745,6 +1886,7 @@ 3654F358285167C3008AD5DC /* StudyRoomsService.swift in Sources */, 36AD5CF227B7FEAD00DAE143 /* TumCalendarStyle.swift in Sources */, 36BB6F7F27B386D100F224AB /* AddToContactsView.swift in Sources */, + 9958318029361F6F00F25E11 /* AppDelegate.swift in Sources */, 36AF61DF27A2FD7800FEBD98 /* TUMOnlineAPI.swift in Sources */, 3654F37B2851710E008AD5DC /* RoomFinderListView.swift in Sources */, 36C70FB32854D2AB0097416E /* PanelContentStudyGroupsListView.swift in Sources */, @@ -1773,7 +1915,9 @@ 3629BA3127A1D0AD0036AC80 /* ScrollableCardsViewModifier.swift in Sources */, 36108C1927A307FA007DC62D /* Grade.swift in Sources */, 36108BBA27A3046B007DC62D /* LectureDetailsScreen.swift in Sources */, + 99583183293621A200F25E11 /* PushNotifications.swift in Sources */, 36203E8D2761C6EC00C24658 /* Credentials.swift in Sources */, + 99438F022950770400766197 /* CampusService.grpc.swift in Sources */, 08573BA7287B6152006AC06F /* GradeWidgetView.swift in Sources */, 0805E72228CA9DF5003C5CFD /* AppUsageData.swift in Sources */, 08FAFD1E288DEDD3006A0E27 /* WidgetRecommenderStrategy.swift in Sources */, @@ -1828,11 +1972,13 @@ 36BB6F7527B1D87200F224AB /* Tuition.swift in Sources */, 3616C4CD279020A0000A1BC9 /* TUMSexyView.swift in Sources */, 1F4C836728300E79006971C0 /* CafeteriasService.swift in Sources */, + 997385862949324F00B1AE34 /* CryptoExportImportManager.swift in Sources */, 36108C1E27A307FA007DC62D /* BarChartView.swift in Sources */, 3654F368285169AC008AD5DC /* TUMDevAppAPI.swift in Sources */, 3683C31A2758118A00082930 /* MockModel.swift in Sources */, 08DFB9812867ACB600E357DF /* StudyRoomWidgetViewModel.swift in Sources */, 3629BA3327A1E4A90036AC80 /* RoundedCornersShape.swift in Sources */, + 99438F012950770400766197 /* CampusService.pb.swift in Sources */, 1F2068E228FD73C400DBDF67 /* TokenPermissionsViewModel+State.swift in Sources */, 3654F37C2851710E008AD5DC /* RoomFinderView.swift in Sources */, 36BBE72F27989F8C0018FD3F /* SFSafariViewWrapper.swift in Sources */, @@ -1853,6 +1999,7 @@ 36AF61EA27A2FD7800FEBD98 /* Environment+Error.swift in Sources */, 3654F38A28518640008AD5DC /* StudyRoomDetailsView.swift in Sources */, 36AF61ED27A2FD7800FEBD98 /* FailedView.swift in Sources */, + 99706872298572A50028D235 /* KeychainService.swift in Sources */, 36108BBE27A3046B007DC62D /* LecturesService.swift in Sources */, 99706870298569E10028D235 /* CrashlyticsService.swift in Sources */, 36108BF027A304B6007DC62D /* PanelContentView.swift in Sources */, @@ -1861,6 +2008,7 @@ 08D9535A28E34596007ED2F1 /* Array+Groups.swift in Sources */, 36108C1A27A307FA007DC62D /* Modus.swift in Sources */, 3654F38028517156008AD5DC /* ImageFullScreenView.swift in Sources */, + 995831952936469100F25E11 /* CampusBackend.swift in Sources */, 36108BC127A3046B007DC62D /* LectureView.swift in Sources */, 366F0E9027580CFD0091651D /* Campus_iOS.xcdatamodeld in Sources */, 36108BFC27A30517007DC62D /* MovieCard.swift in Sources */, @@ -1933,6 +2081,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 9973857529490EFE00B1AE34 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9973857C29490EFE00B1AE34 /* NotificationService.swift in Sources */, + 997385872949324F00B1AE34 /* CryptoExportImportManager.swift in Sources */, + 999E324B29859DDA0099755D /* Credentials.swift in Sources */, + 997068732985752E0028D235 /* KeychainService.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1946,6 +2105,11 @@ target = 366F0E7F27580CFB0091651D /* Campus-iOS */; targetProxy = 366F0EA027580CFD0091651D /* PBXContainerItemProxy */; }; + 9973857F29490EFE00B1AE34 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9973857829490EFE00B1AE34 /* NotificationService */; + targetProxy = 9973857E29490EFE00B1AE34 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -2085,6 +2249,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0805E72D28CC2462003C5CFD /* Secrets.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; @@ -2129,6 +2294,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0805E72D28CC2462003C5CFD /* Secrets.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; @@ -2136,7 +2302,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 53; DEVELOPMENT_ASSET_PATHS = "\"Campus-iOS/Preview Content\""; - DEVELOPMENT_TEAM = 7PLLZ436SG; + DEVELOPMENT_TEAM = 2J3C6P6X3N; "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -2264,6 +2430,64 @@ }; name = Release; }; + 9973858329490EFE00B1AE34 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2J3C6P6X3N; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = NotificationService/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = NotificationService; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca.NotificationService; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 9973858429490EFE00B1AE34 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2J3C6P6X3N; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = NotificationService/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = NotificationService; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca.NotificationService; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -2303,6 +2527,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + 9973858229490EFE00B1AE34 /* Build configuration list for PBXNativeTarget "NotificationService" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9973858329490EFE00B1AE34 /* Debug */, + 9973858429490EFE00B1AE34 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -2378,6 +2611,22 @@ version = 2.10.1; }; }; + 9958318629362FCE00F25E11 /* XCRemoteSwiftPackageReference "swift-protobuf" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apple/swift-protobuf.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; + 9958318D2936336900F25E11 /* XCRemoteSwiftPackageReference "grpc-swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/grpc/grpc-swift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -2436,6 +2685,36 @@ package = 97C9AB1027732A200097B10C /* XCRemoteSwiftPackageReference "SwiftUICharts" */; productName = SwiftUICharts; }; + 9958318729362FCE00F25E11 /* SwiftProtobuf */ = { + isa = XCSwiftPackageProductDependency; + package = 9958318629362FCE00F25E11 /* XCRemoteSwiftPackageReference "swift-protobuf" */; + productName = SwiftProtobuf; + }; + 9958318929362FCE00F25E11 /* SwiftProtobufPluginLibrary */ = { + isa = XCSwiftPackageProductDependency; + package = 9958318629362FCE00F25E11 /* XCRemoteSwiftPackageReference "swift-protobuf" */; + productName = SwiftProtobufPluginLibrary; + }; + 9958318E2936336900F25E11 /* CGRPCZlib */ = { + isa = XCSwiftPackageProductDependency; + package = 9958318D2936336900F25E11 /* XCRemoteSwiftPackageReference "grpc-swift" */; + productName = CGRPCZlib; + }; + 995831902936336900F25E11 /* GRPC */ = { + isa = XCSwiftPackageProductDependency; + package = 9958318D2936336900F25E11 /* XCRemoteSwiftPackageReference "grpc-swift" */; + productName = GRPC; + }; + 995831922936336900F25E11 /* protoc-gen-grpc-swift */ = { + isa = XCSwiftPackageProductDependency; + package = 9958318D2936336900F25E11 /* XCRemoteSwiftPackageReference "grpc-swift" */; + productName = "protoc-gen-grpc-swift"; + }; + 99F1850A2986B8FB00F5F920 /* KeychainAccess */ = { + isa = XCSwiftPackageProductDependency; + package = 36203E812761BDD100C24658 /* XCRemoteSwiftPackageReference "KeychainAccess" */; + productName = KeychainAccess; + }; /* End XCSwiftPackageProductDependency section */ /* Begin XCVersionGroup section */ diff --git a/Campus-iOS/App.swift b/Campus-iOS/App.swift index 5efdf8e5..ec0fbf36 100644 --- a/Campus-iOS/App.swift +++ b/Campus-iOS/App.swift @@ -17,12 +17,15 @@ struct CampusApp: App { let persistenceController = PersistenceController.shared @State var selectedTab = 0 @State var isLoginSheetPresented = false - + + @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + init() { #if !DEBUG FirebaseApp.configure() #endif UITabBar.appearance().isOpaque = true + if #available(iOS 15.0, *) { let appearance = UITabBarAppearance() UITabBar.appearance().scrollEdgeAppearance = appearance @@ -69,12 +72,12 @@ struct CampusApp: App { model: model, service: LecturesService() ), refresh: $model.isUserAuthenticated) - .navigationTitle("Lectures") - .toolbar { - ToolbarItemGroup(placement: .navigationBarTrailing) { - ProfileToolbar(model: model) - } + .navigationTitle("Lectures") + .toolbar { + ToolbarItemGroup(placement: .navigationBarTrailing) { + ProfileToolbar(model: model) } + } } .tag(1) .tabItem { @@ -118,7 +121,7 @@ struct CampusApp: App { view.navigationViewStyle(.stack) }) - NavigationView { + NavigationView { MapScreenView(vm: MapViewModel(cafeteriaService: CafeteriasService(), studyRoomsService: StudyRoomsService())) } .tag(3) diff --git a/Campus-iOS/AppDelegate.swift b/Campus-iOS/AppDelegate.swift new file mode 100644 index 00000000..7e2e564f --- /dev/null +++ b/Campus-iOS/AppDelegate.swift @@ -0,0 +1,58 @@ +// +// AppDelegate.swift +// Campus-iOS +// +// Created by Anton Wyrowski on 29.11.22. +// + +import Foundation +import UIKit +import UserNotifications + + +class AppDelegate: NSObject, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + + UIApplication.shared.registerForRemoteNotifications() + registerForPushNotifications() + + return true + } + + func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) } + let token = tokenParts.joined() + + Task { + await PushNotifications.shared.registerDeviceToken(token) + } + } + + func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + CrashlyticsService.log("Failed to register for remote notifications with error message: \(error.localizedDescription)") + } + + func registerForPushNotifications() { + UNUserNotificationCenter.current() + .requestAuthorization(options: [.alert, .sound, .badge]) { granted, _ in + print("Notification Permission granted: \(granted)") + } + } + + func application( + _ application: UIApplication, + didReceiveRemoteNotification userInfo: [AnyHashable : Any], + fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void + ) { + Task { + do { + try await PushNotifications.shared.handleBackgroundNotification(data: userInfo) + completionHandler(.noData) + } catch { + completionHandler(.failed) + } + } + } + +} diff --git a/Campus-iOS/Base/Networking/CampusBackend.swift b/Campus-iOS/Base/Networking/CampusBackend.swift new file mode 100644 index 00000000..8ceb1207 --- /dev/null +++ b/Campus-iOS/Base/Networking/CampusBackend.swift @@ -0,0 +1,41 @@ +// +// CampusBackend.swift +// Campus-iOS +// +// Created by Anton Wyrowski on 29.11.22. +// + +import Foundation +import GRPC +import Logging + +struct CampusBackend { + + private static let s = CampusBackend() + + static let shared = s.client + + let client: Api_CampusAsyncClient + + private init() { + let group = PlatformSupport.makeEventLoopGroup(loopCount: 1) + + var logger = Logger(label: "gRPC", factory: StreamLogHandler.standardOutput(label:)) + logger.logLevel = .debug + + + let channel = ClientConnection + .usingPlatformAppropriateTLS(for: group) + .withBackgroundActivityLogger(logger) + .connect(host: "api-grpc.tum.app", port: 443) + + // For local development will be removed after + // backend changes are merged + /* let channel = ClientConnection + .insecure(group: group) + .withBackgroundActivityLogger(logger) + .connect(host: "192.168.178.41", port: 50051) */ + + client = Api_CampusAsyncClient(channel: channel) + } +} diff --git a/Campus-iOS/Base/Networking/CampusService.grpc.swift b/Campus-iOS/Base/Networking/CampusService.grpc.swift new file mode 100644 index 00000000..7f573954 --- /dev/null +++ b/Campus-iOS/Base/Networking/CampusService.grpc.swift @@ -0,0 +1,3862 @@ +// +// DO NOT EDIT. +// +// Generated by the protocol buffer compiler. +// Source: CampusService.proto +// + +// +// Copyright 2018, gRPC Authors All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import GRPC +import NIO +import NIOConcurrencyHelpers +import SwiftProtobuf + + +/// Usage: instantiate `Api_CampusClient`, then call methods of this protocol to make API calls. +internal protocol Api_CampusClientProtocol: GRPCClient { + var serviceName: String { get } + var interceptors: Api_CampusClientInterceptorFactoryProtocol? { get } + + func getTopNews( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getNewsSources( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func searchRooms( + _ request: Api_SearchRoomsRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getLocations( + _ request: Api_GetLocationsRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getRoomMaps( + _ request: Api_GetRoomMapsRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getRoomCoordinates( + _ request: Api_GetRoomCoordinatesRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getRoomSchedule( + _ request: Api_GetRoomScheduleRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getCafeteriaRatings( + _ request: Api_CafeteriaRatingRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getDishRatings( + _ request: Api_DishRatingRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func newCafeteriaRating( + _ request: Api_NewCafeteriaRatingRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func newDishRating( + _ request: Api_NewDishRatingRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getAvailableDishTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getNameTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getAvailableCafeteriaTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getCafeterias( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getDishes( + _ request: Api_GetDishesRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getResponsiblePerson( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getBuilding2Gps( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getAreaFacilitiesByBuildingNr( + _ request: Api_GetAreaFacilitiesByBuildingNrRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getListOfToilets( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getListOfElevators( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getMoreInformation( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getOpeningTimes( + _ request: Api_GetOpeningTimesRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getUpdateNote( + _ request: Api_GetUpdateNoteRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getStudyRoomList( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> UnaryCall + + func getEventList( + _ request: Api_GetEventListRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getKino( + _ request: Api_GetKinoRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func sendFeedback( + _ request: Api_SendFeedbackRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func sendFeedbackImage( + _ request: Api_SendFeedbackImageRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getUploadStatus( + _ request: Api_GetUploadStatusRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getNotification( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getNotificationConfirm( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getMembers( + _ request: Api_GetMembersRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func getCanteenHeadCount( + _ request: Api_GetCanteenHeadCountRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func iOSDeviceRequestResponse( + _ request: Api_IOSDeviceRequestResponseRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func registerDevice( + _ request: Api_RegisterDeviceRequest, + callOptions: CallOptions? + ) -> UnaryCall + + func removeDevice( + _ request: Api_RemoveDeviceRequest, + callOptions: CallOptions? + ) -> UnaryCall +} + +extension Api_CampusClientProtocol { + internal var serviceName: String { + return "api.Campus" + } + + /// Unary call to GetTopNews + /// + /// - Parameters: + /// - request: Request to send to GetTopNews. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getTopNews( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getTopNews.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetTopNewsInterceptors() ?? [] + ) + } + + /// Unary call to GetNewsSources + /// + /// - Parameters: + /// - request: Request to send to GetNewsSources. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getNewsSources( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getNewsSources.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNewsSourcesInterceptors() ?? [] + ) + } + + /// Unary call to SearchRooms + /// + /// - Parameters: + /// - request: Request to send to SearchRooms. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func searchRooms( + _ request: Api_SearchRoomsRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.searchRooms.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSearchRoomsInterceptors() ?? [] + ) + } + + /// a location is a campus location/building, e.g. "Garching Forschungszentrum" + /// + /// - Parameters: + /// - request: Request to send to GetLocations. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getLocations( + _ request: Api_GetLocationsRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getLocations.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetLocationsInterceptors() ?? [] + ) + } + + /// Unary call to GetRoomMaps + /// + /// - Parameters: + /// - request: Request to send to GetRoomMaps. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getRoomMaps( + _ request: Api_GetRoomMapsRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomMaps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomMapsInterceptors() ?? [] + ) + } + + /// Unary call to GetRoomCoordinates + /// + /// - Parameters: + /// - request: Request to send to GetRoomCoordinates. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getRoomCoordinates( + _ request: Api_GetRoomCoordinatesRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomCoordinates.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomCoordinatesInterceptors() ?? [] + ) + } + + /// Unary call to GetRoomSchedule + /// + /// - Parameters: + /// - request: Request to send to GetRoomSchedule. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getRoomSchedule( + _ request: Api_GetRoomScheduleRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomSchedule.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomScheduleInterceptors() ?? [] + ) + } + + /// This endpoint retrieves Cafeteria Ratings from the Backend. + /// + /// - Parameters: + /// - request: Request to send to GetCafeteriaRatings. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getCafeteriaRatings( + _ request: Api_CafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeteriaRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriaRatingsInterceptors() ?? [] + ) + } + + /// Unary call to GetDishRatings + /// + /// - Parameters: + /// - request: Request to send to GetDishRatings. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getDishRatings( + _ request: Api_DishRatingRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishRatingsInterceptors() ?? [] + ) + } + + /// Unary call to NewCafeteriaRating + /// + /// - Parameters: + /// - request: Request to send to NewCafeteriaRating. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func newCafeteriaRating( + _ request: Api_NewCafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.newCafeteriaRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewCafeteriaRatingInterceptors() ?? [] + ) + } + + /// Unary call to NewDishRating + /// + /// - Parameters: + /// - request: Request to send to NewDishRating. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func newDishRating( + _ request: Api_NewDishRatingRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.newDishRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewDishRatingInterceptors() ?? [] + ) + } + + /// Unary call to GetAvailableDishTags + /// + /// - Parameters: + /// - request: Request to send to GetAvailableDishTags. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getAvailableDishTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableDishTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableDishTagsInterceptors() ?? [] + ) + } + + /// Unary call to GetNameTags + /// + /// - Parameters: + /// - request: Request to send to GetNameTags. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getNameTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getNameTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNameTagsInterceptors() ?? [] + ) + } + + /// Unary call to GetAvailableCafeteriaTags + /// + /// - Parameters: + /// - request: Request to send to GetAvailableCafeteriaTags. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getAvailableCafeteriaTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableCafeteriaTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableCafeteriaTagsInterceptors() ?? [] + ) + } + + /// Unary call to GetCafeterias + /// + /// - Parameters: + /// - request: Request to send to GetCafeterias. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getCafeterias( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeterias.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriasInterceptors() ?? [] + ) + } + + /// Unary call to GetDishes + /// + /// - Parameters: + /// - request: Request to send to GetDishes. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getDishes( + _ request: Api_GetDishesRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishesInterceptors() ?? [] + ) + } + + /// Unary call to GetResponsiblePerson + /// + /// - Parameters: + /// - request: Request to send to GetResponsiblePerson. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getResponsiblePerson( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getResponsiblePerson.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetResponsiblePersonInterceptors() ?? [] + ) + } + + /// Unary call to GetBuilding2Gps + /// + /// - Parameters: + /// - request: Request to send to GetBuilding2Gps. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getBuilding2Gps( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getBuilding2Gps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetBuilding2GpsInterceptors() ?? [] + ) + } + + /// Unary call to GetAreaFacilitiesByBuildingNr + /// + /// - Parameters: + /// - request: Request to send to GetAreaFacilitiesByBuildingNr. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getAreaFacilitiesByBuildingNr( + _ request: Api_GetAreaFacilitiesByBuildingNrRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getAreaFacilitiesByBuildingNr.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAreaFacilitiesByBuildingNrInterceptors() ?? [] + ) + } + + /// Unary call to GetListOfToilets + /// + /// - Parameters: + /// - request: Request to send to GetListOfToilets. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getListOfToilets( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfToilets.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfToiletsInterceptors() ?? [] + ) + } + + /// Unary call to GetListOfElevators + /// + /// - Parameters: + /// - request: Request to send to GetListOfElevators. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getListOfElevators( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfElevators.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfElevatorsInterceptors() ?? [] + ) + } + + /// Unary call to GetMoreInformation + /// + /// - Parameters: + /// - request: Request to send to GetMoreInformation. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getMoreInformation( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getMoreInformation.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMoreInformationInterceptors() ?? [] + ) + } + + /// Unary call to GetOpeningTimes + /// + /// - Parameters: + /// - request: Request to send to GetOpeningTimes. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getOpeningTimes( + _ request: Api_GetOpeningTimesRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getOpeningTimes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetOpeningTimesInterceptors() ?? [] + ) + } + + /// Unary call to GetUpdateNote + /// + /// - Parameters: + /// - request: Request to send to GetUpdateNote. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getUpdateNote( + _ request: Api_GetUpdateNoteRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getUpdateNote.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUpdateNoteInterceptors() ?? [] + ) + } + + /// Unary call to GetStudyRoomList + /// + /// - Parameters: + /// - request: Request to send to GetStudyRoomList. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getStudyRoomList( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getStudyRoomList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetStudyRoomListInterceptors() ?? [] + ) + } + + /// Unary call to GetEventList + /// + /// - Parameters: + /// - request: Request to send to GetEventList. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getEventList( + _ request: Api_GetEventListRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getEventList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetEventListInterceptors() ?? [] + ) + } + + /// Unary call to GetKino + /// + /// - Parameters: + /// - request: Request to send to GetKino. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getKino( + _ request: Api_GetKinoRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getKino.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetKinoInterceptors() ?? [] + ) + } + + /// Unary call to SendFeedback + /// + /// - Parameters: + /// - request: Request to send to SendFeedback. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func sendFeedback( + _ request: Api_SendFeedbackRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedback.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackInterceptors() ?? [] + ) + } + + /// Unary call to SendFeedbackImage + /// + /// - Parameters: + /// - request: Request to send to SendFeedbackImage. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func sendFeedbackImage( + _ request: Api_SendFeedbackImageRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedbackImage.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackImageInterceptors() ?? [] + ) + } + + /// Unary call to GetUploadStatus + /// + /// - Parameters: + /// - request: Request to send to GetUploadStatus. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getUploadStatus( + _ request: Api_GetUploadStatusRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getUploadStatus.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUploadStatusInterceptors() ?? [] + ) + } + + /// Unary call to GetNotification + /// + /// - Parameters: + /// - request: Request to send to GetNotification. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getNotification( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotification.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationInterceptors() ?? [] + ) + } + + /// Unary call to GetNotificationConfirm + /// + /// - Parameters: + /// - request: Request to send to GetNotificationConfirm. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getNotificationConfirm( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotificationConfirm.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationConfirmInterceptors() ?? [] + ) + } + + /// Unary call to GetMembers + /// + /// - Parameters: + /// - request: Request to send to GetMembers. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getMembers( + _ request: Api_GetMembersRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getMembers.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMembersInterceptors() ?? [] + ) + } + + /// Unary call to GetCanteenHeadCount + /// + /// - Parameters: + /// - request: Request to send to GetCanteenHeadCount. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func getCanteenHeadCount( + _ request: Api_GetCanteenHeadCountRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.getCanteenHeadCount.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCanteenHeadCountInterceptors() ?? [] + ) + } + + /// Endpoint for the iOS app to respond to background notifications requests + /// + /// - Parameters: + /// - request: Request to send to IOSDeviceRequestResponse. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func iOSDeviceRequestResponse( + _ request: Api_IOSDeviceRequestResponseRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.iOSDeviceRequestResponse.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeIOSDeviceRequestResponseInterceptors() ?? [] + ) + } + + /// Register an Android, iOS or Windows device for push notifications + /// + /// - Parameters: + /// - request: Request to send to RegisterDevice. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func registerDevice( + _ request: Api_RegisterDeviceRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.registerDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [] + ) + } + + /// Unregister it from push notifications + /// + /// - Parameters: + /// - request: Request to send to RemoveDevice. + /// - callOptions: Call options. + /// - Returns: A `UnaryCall` with futures for the metadata, status and response. + internal func removeDevice( + _ request: Api_RemoveDeviceRequest, + callOptions: CallOptions? = nil + ) -> UnaryCall { + return self.makeUnaryCall( + path: Api_CampusClientMetadata.Methods.removeDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRemoveDeviceInterceptors() ?? [] + ) + } +} + +#if compiler(>=5.6) +@available(*, deprecated) +extension Api_CampusClient: @unchecked Sendable {} +#endif // compiler(>=5.6) + +@available(*, deprecated, renamed: "Api_CampusNIOClient") +internal final class Api_CampusClient: Api_CampusClientProtocol { + private let lock = Lock() + private var _defaultCallOptions: CallOptions + private var _interceptors: Api_CampusClientInterceptorFactoryProtocol? + internal let channel: GRPCChannel + internal var defaultCallOptions: CallOptions { + get { self.lock.withLock { return self._defaultCallOptions } } + set { self.lock.withLockVoid { self._defaultCallOptions = newValue } } + } + internal var interceptors: Api_CampusClientInterceptorFactoryProtocol? { + get { self.lock.withLock { return self._interceptors } } + set { self.lock.withLockVoid { self._interceptors = newValue } } + } + + /// Creates a client for the api.Campus service. + /// + /// - Parameters: + /// - channel: `GRPCChannel` to the service host. + /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them. + /// - interceptors: A factory providing interceptors for each RPC. + internal init( + channel: GRPCChannel, + defaultCallOptions: CallOptions = CallOptions(), + interceptors: Api_CampusClientInterceptorFactoryProtocol? = nil + ) { + self.channel = channel + self._defaultCallOptions = defaultCallOptions + self._interceptors = interceptors + } +} + +internal struct Api_CampusNIOClient: Api_CampusClientProtocol { + internal var channel: GRPCChannel + internal var defaultCallOptions: CallOptions + internal var interceptors: Api_CampusClientInterceptorFactoryProtocol? + + /// Creates a client for the api.Campus service. + /// + /// - Parameters: + /// - channel: `GRPCChannel` to the service host. + /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them. + /// - interceptors: A factory providing interceptors for each RPC. + internal init( + channel: GRPCChannel, + defaultCallOptions: CallOptions = CallOptions(), + interceptors: Api_CampusClientInterceptorFactoryProtocol? = nil + ) { + self.channel = channel + self.defaultCallOptions = defaultCallOptions + self.interceptors = interceptors + } +} + +#if compiler(>=5.6) +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +internal protocol Api_CampusAsyncClientProtocol: GRPCClient { + static var serviceDescriptor: GRPCServiceDescriptor { get } + var interceptors: Api_CampusClientInterceptorFactoryProtocol? { get } + + func makeGetTopNewsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetNewsSourcesCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeSearchRoomsCall( + _ request: Api_SearchRoomsRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetLocationsCall( + _ request: Api_GetLocationsRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetRoomMapsCall( + _ request: Api_GetRoomMapsRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetRoomCoordinatesCall( + _ request: Api_GetRoomCoordinatesRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetRoomScheduleCall( + _ request: Api_GetRoomScheduleRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetCafeteriaRatingsCall( + _ request: Api_CafeteriaRatingRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetDishRatingsCall( + _ request: Api_DishRatingRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeNewCafeteriaRatingCall( + _ request: Api_NewCafeteriaRatingRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeNewDishRatingCall( + _ request: Api_NewDishRatingRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetAvailableDishTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetNameTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetAvailableCafeteriaTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetCafeteriasCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetDishesCall( + _ request: Api_GetDishesRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetResponsiblePersonCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetBuilding2GpsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetAreaFacilitiesByBuildingNrCall( + _ request: Api_GetAreaFacilitiesByBuildingNrRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetListOfToiletsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetListOfElevatorsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetMoreInformationCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetOpeningTimesCall( + _ request: Api_GetOpeningTimesRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetUpdateNoteCall( + _ request: Api_GetUpdateNoteRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetStudyRoomListCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetEventListCall( + _ request: Api_GetEventListRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetKinoCall( + _ request: Api_GetKinoRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeSendFeedbackCall( + _ request: Api_SendFeedbackRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeSendFeedbackImageCall( + _ request: Api_SendFeedbackImageRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetUploadStatusCall( + _ request: Api_GetUploadStatusRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetNotificationCall( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetNotificationConfirmCall( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetMembersCall( + _ request: Api_GetMembersRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeGetCanteenHeadCountCall( + _ request: Api_GetCanteenHeadCountRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeIosdeviceRequestResponseCall( + _ request: Api_IOSDeviceRequestResponseRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeRegisterDeviceCall( + _ request: Api_RegisterDeviceRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall + + func makeRemoveDeviceCall( + _ request: Api_RemoveDeviceRequest, + callOptions: CallOptions? + ) -> GRPCAsyncUnaryCall +} + +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +extension Api_CampusAsyncClientProtocol { + internal static var serviceDescriptor: GRPCServiceDescriptor { + return Api_CampusClientMetadata.serviceDescriptor + } + + internal var interceptors: Api_CampusClientInterceptorFactoryProtocol? { + return nil + } + + internal func makeGetTopNewsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getTopNews.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetTopNewsInterceptors() ?? [] + ) + } + + internal func makeGetNewsSourcesCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNewsSources.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNewsSourcesInterceptors() ?? [] + ) + } + + internal func makeSearchRoomsCall( + _ request: Api_SearchRoomsRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.searchRooms.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSearchRoomsInterceptors() ?? [] + ) + } + + internal func makeGetLocationsCall( + _ request: Api_GetLocationsRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getLocations.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetLocationsInterceptors() ?? [] + ) + } + + internal func makeGetRoomMapsCall( + _ request: Api_GetRoomMapsRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomMaps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomMapsInterceptors() ?? [] + ) + } + + internal func makeGetRoomCoordinatesCall( + _ request: Api_GetRoomCoordinatesRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomCoordinates.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomCoordinatesInterceptors() ?? [] + ) + } + + internal func makeGetRoomScheduleCall( + _ request: Api_GetRoomScheduleRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomSchedule.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomScheduleInterceptors() ?? [] + ) + } + + internal func makeGetCafeteriaRatingsCall( + _ request: Api_CafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeteriaRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriaRatingsInterceptors() ?? [] + ) + } + + internal func makeGetDishRatingsCall( + _ request: Api_DishRatingRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishRatingsInterceptors() ?? [] + ) + } + + internal func makeNewCafeteriaRatingCall( + _ request: Api_NewCafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.newCafeteriaRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewCafeteriaRatingInterceptors() ?? [] + ) + } + + internal func makeNewDishRatingCall( + _ request: Api_NewDishRatingRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.newDishRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewDishRatingInterceptors() ?? [] + ) + } + + internal func makeGetAvailableDishTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableDishTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableDishTagsInterceptors() ?? [] + ) + } + + internal func makeGetNameTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNameTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNameTagsInterceptors() ?? [] + ) + } + + internal func makeGetAvailableCafeteriaTagsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableCafeteriaTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableCafeteriaTagsInterceptors() ?? [] + ) + } + + internal func makeGetCafeteriasCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeterias.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriasInterceptors() ?? [] + ) + } + + internal func makeGetDishesCall( + _ request: Api_GetDishesRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishesInterceptors() ?? [] + ) + } + + internal func makeGetResponsiblePersonCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getResponsiblePerson.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetResponsiblePersonInterceptors() ?? [] + ) + } + + internal func makeGetBuilding2GpsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getBuilding2Gps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetBuilding2GpsInterceptors() ?? [] + ) + } + + internal func makeGetAreaFacilitiesByBuildingNrCall( + _ request: Api_GetAreaFacilitiesByBuildingNrRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAreaFacilitiesByBuildingNr.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAreaFacilitiesByBuildingNrInterceptors() ?? [] + ) + } + + internal func makeGetListOfToiletsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfToilets.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfToiletsInterceptors() ?? [] + ) + } + + internal func makeGetListOfElevatorsCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfElevators.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfElevatorsInterceptors() ?? [] + ) + } + + internal func makeGetMoreInformationCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getMoreInformation.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMoreInformationInterceptors() ?? [] + ) + } + + internal func makeGetOpeningTimesCall( + _ request: Api_GetOpeningTimesRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getOpeningTimes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetOpeningTimesInterceptors() ?? [] + ) + } + + internal func makeGetUpdateNoteCall( + _ request: Api_GetUpdateNoteRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getUpdateNote.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUpdateNoteInterceptors() ?? [] + ) + } + + internal func makeGetStudyRoomListCall( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getStudyRoomList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetStudyRoomListInterceptors() ?? [] + ) + } + + internal func makeGetEventListCall( + _ request: Api_GetEventListRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getEventList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetEventListInterceptors() ?? [] + ) + } + + internal func makeGetKinoCall( + _ request: Api_GetKinoRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getKino.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetKinoInterceptors() ?? [] + ) + } + + internal func makeSendFeedbackCall( + _ request: Api_SendFeedbackRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedback.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackInterceptors() ?? [] + ) + } + + internal func makeSendFeedbackImageCall( + _ request: Api_SendFeedbackImageRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedbackImage.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackImageInterceptors() ?? [] + ) + } + + internal func makeGetUploadStatusCall( + _ request: Api_GetUploadStatusRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getUploadStatus.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUploadStatusInterceptors() ?? [] + ) + } + + internal func makeGetNotificationCall( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotification.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationInterceptors() ?? [] + ) + } + + internal func makeGetNotificationConfirmCall( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotificationConfirm.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationConfirmInterceptors() ?? [] + ) + } + + internal func makeGetMembersCall( + _ request: Api_GetMembersRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getMembers.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMembersInterceptors() ?? [] + ) + } + + internal func makeGetCanteenHeadCountCall( + _ request: Api_GetCanteenHeadCountRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCanteenHeadCount.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCanteenHeadCountInterceptors() ?? [] + ) + } + + internal func makeIosdeviceRequestResponseCall( + _ request: Api_IOSDeviceRequestResponseRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.iOSDeviceRequestResponse.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeIOSDeviceRequestResponseInterceptors() ?? [] + ) + } + + internal func makeRegisterDeviceCall( + _ request: Api_RegisterDeviceRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.registerDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [] + ) + } + + internal func makeRemoveDeviceCall( + _ request: Api_RemoveDeviceRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncUnaryCall { + return self.makeAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.removeDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRemoveDeviceInterceptors() ?? [] + ) + } +} + +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +extension Api_CampusAsyncClientProtocol { + internal func getTopNews( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetTopNewsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getTopNews.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetTopNewsInterceptors() ?? [] + ) + } + + internal func getNewsSources( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_NewsSourceArray { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNewsSources.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNewsSourcesInterceptors() ?? [] + ) + } + + internal func searchRooms( + _ request: Api_SearchRoomsRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_SearchRoomsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.searchRooms.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSearchRoomsInterceptors() ?? [] + ) + } + + internal func getLocations( + _ request: Api_GetLocationsRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetLocationsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getLocations.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetLocationsInterceptors() ?? [] + ) + } + + internal func getRoomMaps( + _ request: Api_GetRoomMapsRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetRoomMapsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomMaps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomMapsInterceptors() ?? [] + ) + } + + internal func getRoomCoordinates( + _ request: Api_GetRoomCoordinatesRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetRoomCoordinatesReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomCoordinates.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomCoordinatesInterceptors() ?? [] + ) + } + + internal func getRoomSchedule( + _ request: Api_GetRoomScheduleRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetRoomScheduleReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getRoomSchedule.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetRoomScheduleInterceptors() ?? [] + ) + } + + internal func getCafeteriaRatings( + _ request: Api_CafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_CafeteriaRatingReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeteriaRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriaRatingsInterceptors() ?? [] + ) + } + + internal func getDishRatings( + _ request: Api_DishRatingRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_DishRatingReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishRatings.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishRatingsInterceptors() ?? [] + ) + } + + internal func newCafeteriaRating( + _ request: Api_NewCafeteriaRatingRequest, + callOptions: CallOptions? = nil + ) async throws -> SwiftProtobuf.Google_Protobuf_Empty { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.newCafeteriaRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewCafeteriaRatingInterceptors() ?? [] + ) + } + + internal func newDishRating( + _ request: Api_NewDishRatingRequest, + callOptions: CallOptions? = nil + ) async throws -> SwiftProtobuf.Google_Protobuf_Empty { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.newDishRating.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeNewDishRatingInterceptors() ?? [] + ) + } + + internal func getAvailableDishTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetTagsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableDishTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableDishTagsInterceptors() ?? [] + ) + } + + internal func getNameTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetTagsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNameTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNameTagsInterceptors() ?? [] + ) + } + + internal func getAvailableCafeteriaTags( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetTagsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAvailableCafeteriaTags.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAvailableCafeteriaTagsInterceptors() ?? [] + ) + } + + internal func getCafeterias( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetCafeteriaReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCafeterias.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCafeteriasInterceptors() ?? [] + ) + } + + internal func getDishes( + _ request: Api_GetDishesRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetDishesReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getDishes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetDishesInterceptors() ?? [] + ) + } + + internal func getResponsiblePerson( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetResponsiblePersonReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getResponsiblePerson.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetResponsiblePersonInterceptors() ?? [] + ) + } + + internal func getBuilding2Gps( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetBuilding2GpsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getBuilding2Gps.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetBuilding2GpsInterceptors() ?? [] + ) + } + + internal func getAreaFacilitiesByBuildingNr( + _ request: Api_GetAreaFacilitiesByBuildingNrRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetAreaFacilitiesByBuildingNrReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getAreaFacilitiesByBuildingNr.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetAreaFacilitiesByBuildingNrInterceptors() ?? [] + ) + } + + internal func getListOfToilets( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetListOfToiletsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfToilets.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfToiletsInterceptors() ?? [] + ) + } + + internal func getListOfElevators( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetListOfElevatorsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getListOfElevators.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetListOfElevatorsInterceptors() ?? [] + ) + } + + internal func getMoreInformation( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetMoreInformationReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getMoreInformation.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMoreInformationInterceptors() ?? [] + ) + } + + internal func getOpeningTimes( + _ request: Api_GetOpeningTimesRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetOpeningTimesReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getOpeningTimes.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetOpeningTimesInterceptors() ?? [] + ) + } + + internal func getUpdateNote( + _ request: Api_GetUpdateNoteRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetUpdateNoteReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getUpdateNote.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUpdateNoteInterceptors() ?? [] + ) + } + + internal func getStudyRoomList( + _ request: SwiftProtobuf.Google_Protobuf_Empty, + callOptions: CallOptions? = nil + ) async throws -> Api_GetStudyRoomListReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getStudyRoomList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetStudyRoomListInterceptors() ?? [] + ) + } + + internal func getEventList( + _ request: Api_GetEventListRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetEventListReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getEventList.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetEventListInterceptors() ?? [] + ) + } + + internal func getKino( + _ request: Api_GetKinoRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetKinoReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getKino.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetKinoInterceptors() ?? [] + ) + } + + internal func sendFeedback( + _ request: Api_SendFeedbackRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_SendFeedbackImageReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedback.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackInterceptors() ?? [] + ) + } + + internal func sendFeedbackImage( + _ request: Api_SendFeedbackImageRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_SendFeedbackImageReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.sendFeedbackImage.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeSendFeedbackImageInterceptors() ?? [] + ) + } + + internal func getUploadStatus( + _ request: Api_GetUploadStatusRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetUploadStatusReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getUploadStatus.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetUploadStatusInterceptors() ?? [] + ) + } + + internal func getNotification( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetNotificationsReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotification.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationInterceptors() ?? [] + ) + } + + internal func getNotificationConfirm( + _ request: Api_NotificationsRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetNotificationsConfirmReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getNotificationConfirm.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetNotificationConfirmInterceptors() ?? [] + ) + } + + internal func getMembers( + _ request: Api_GetMembersRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetMembersReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getMembers.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetMembersInterceptors() ?? [] + ) + } + + internal func getCanteenHeadCount( + _ request: Api_GetCanteenHeadCountRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_GetCanteenHeadCountReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.getCanteenHeadCount.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeGetCanteenHeadCountInterceptors() ?? [] + ) + } + + internal func iOSDeviceRequestResponse( + _ request: Api_IOSDeviceRequestResponseRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_IOSDeviceRequestResponseReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.iOSDeviceRequestResponse.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeIOSDeviceRequestResponseInterceptors() ?? [] + ) + } + + internal func registerDevice( + _ request: Api_RegisterDeviceRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_RegisterDeviceReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.registerDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [] + ) + } + + internal func removeDevice( + _ request: Api_RemoveDeviceRequest, + callOptions: CallOptions? = nil + ) async throws -> Api_RemoveDeviceReply { + return try await self.performAsyncUnaryCall( + path: Api_CampusClientMetadata.Methods.removeDevice.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeRemoveDeviceInterceptors() ?? [] + ) + } +} + +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +internal struct Api_CampusAsyncClient: Api_CampusAsyncClientProtocol { + internal var channel: GRPCChannel + internal var defaultCallOptions: CallOptions + internal var interceptors: Api_CampusClientInterceptorFactoryProtocol? + + internal init( + channel: GRPCChannel, + defaultCallOptions: CallOptions = CallOptions(), + interceptors: Api_CampusClientInterceptorFactoryProtocol? = nil + ) { + self.channel = channel + self.defaultCallOptions = defaultCallOptions + self.interceptors = interceptors + } +} + +#endif // compiler(>=5.6) + +internal protocol Api_CampusClientInterceptorFactoryProtocol: GRPCSendable { + + /// - Returns: Interceptors to use when invoking 'getTopNews'. + func makeGetTopNewsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getNewsSources'. + func makeGetNewsSourcesInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'searchRooms'. + func makeSearchRoomsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getLocations'. + func makeGetLocationsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getRoomMaps'. + func makeGetRoomMapsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getRoomCoordinates'. + func makeGetRoomCoordinatesInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getRoomSchedule'. + func makeGetRoomScheduleInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getCafeteriaRatings'. + func makeGetCafeteriaRatingsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getDishRatings'. + func makeGetDishRatingsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'newCafeteriaRating'. + func makeNewCafeteriaRatingInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'newDishRating'. + func makeNewDishRatingInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getAvailableDishTags'. + func makeGetAvailableDishTagsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getNameTags'. + func makeGetNameTagsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getAvailableCafeteriaTags'. + func makeGetAvailableCafeteriaTagsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getCafeterias'. + func makeGetCafeteriasInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getDishes'. + func makeGetDishesInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getResponsiblePerson'. + func makeGetResponsiblePersonInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getBuilding2Gps'. + func makeGetBuilding2GpsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getAreaFacilitiesByBuildingNr'. + func makeGetAreaFacilitiesByBuildingNrInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getListOfToilets'. + func makeGetListOfToiletsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getListOfElevators'. + func makeGetListOfElevatorsInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getMoreInformation'. + func makeGetMoreInformationInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getOpeningTimes'. + func makeGetOpeningTimesInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getUpdateNote'. + func makeGetUpdateNoteInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getStudyRoomList'. + func makeGetStudyRoomListInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getEventList'. + func makeGetEventListInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getKino'. + func makeGetKinoInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'sendFeedback'. + func makeSendFeedbackInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'sendFeedbackImage'. + func makeSendFeedbackImageInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getUploadStatus'. + func makeGetUploadStatusInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getNotification'. + func makeGetNotificationInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getNotificationConfirm'. + func makeGetNotificationConfirmInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getMembers'. + func makeGetMembersInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'getCanteenHeadCount'. + func makeGetCanteenHeadCountInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'iOSDeviceRequestResponse'. + func makeIOSDeviceRequestResponseInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'registerDevice'. + func makeRegisterDeviceInterceptors() -> [ClientInterceptor] + + /// - Returns: Interceptors to use when invoking 'removeDevice'. + func makeRemoveDeviceInterceptors() -> [ClientInterceptor] +} + +internal enum Api_CampusClientMetadata { + internal static let serviceDescriptor = GRPCServiceDescriptor( + name: "Campus", + fullName: "api.Campus", + methods: [ + Api_CampusClientMetadata.Methods.getTopNews, + Api_CampusClientMetadata.Methods.getNewsSources, + Api_CampusClientMetadata.Methods.searchRooms, + Api_CampusClientMetadata.Methods.getLocations, + Api_CampusClientMetadata.Methods.getRoomMaps, + Api_CampusClientMetadata.Methods.getRoomCoordinates, + Api_CampusClientMetadata.Methods.getRoomSchedule, + Api_CampusClientMetadata.Methods.getCafeteriaRatings, + Api_CampusClientMetadata.Methods.getDishRatings, + Api_CampusClientMetadata.Methods.newCafeteriaRating, + Api_CampusClientMetadata.Methods.newDishRating, + Api_CampusClientMetadata.Methods.getAvailableDishTags, + Api_CampusClientMetadata.Methods.getNameTags, + Api_CampusClientMetadata.Methods.getAvailableCafeteriaTags, + Api_CampusClientMetadata.Methods.getCafeterias, + Api_CampusClientMetadata.Methods.getDishes, + Api_CampusClientMetadata.Methods.getResponsiblePerson, + Api_CampusClientMetadata.Methods.getBuilding2Gps, + Api_CampusClientMetadata.Methods.getAreaFacilitiesByBuildingNr, + Api_CampusClientMetadata.Methods.getListOfToilets, + Api_CampusClientMetadata.Methods.getListOfElevators, + Api_CampusClientMetadata.Methods.getMoreInformation, + Api_CampusClientMetadata.Methods.getOpeningTimes, + Api_CampusClientMetadata.Methods.getUpdateNote, + Api_CampusClientMetadata.Methods.getStudyRoomList, + Api_CampusClientMetadata.Methods.getEventList, + Api_CampusClientMetadata.Methods.getKino, + Api_CampusClientMetadata.Methods.sendFeedback, + Api_CampusClientMetadata.Methods.sendFeedbackImage, + Api_CampusClientMetadata.Methods.getUploadStatus, + Api_CampusClientMetadata.Methods.getNotification, + Api_CampusClientMetadata.Methods.getNotificationConfirm, + Api_CampusClientMetadata.Methods.getMembers, + Api_CampusClientMetadata.Methods.getCanteenHeadCount, + Api_CampusClientMetadata.Methods.iOSDeviceRequestResponse, + Api_CampusClientMetadata.Methods.registerDevice, + Api_CampusClientMetadata.Methods.removeDevice, + ] + ) + + internal enum Methods { + internal static let getTopNews = GRPCMethodDescriptor( + name: "GetTopNews", + path: "/api.Campus/GetTopNews", + type: GRPCCallType.unary + ) + + internal static let getNewsSources = GRPCMethodDescriptor( + name: "GetNewsSources", + path: "/api.Campus/GetNewsSources", + type: GRPCCallType.unary + ) + + internal static let searchRooms = GRPCMethodDescriptor( + name: "SearchRooms", + path: "/api.Campus/SearchRooms", + type: GRPCCallType.unary + ) + + internal static let getLocations = GRPCMethodDescriptor( + name: "GetLocations", + path: "/api.Campus/GetLocations", + type: GRPCCallType.unary + ) + + internal static let getRoomMaps = GRPCMethodDescriptor( + name: "GetRoomMaps", + path: "/api.Campus/GetRoomMaps", + type: GRPCCallType.unary + ) + + internal static let getRoomCoordinates = GRPCMethodDescriptor( + name: "GetRoomCoordinates", + path: "/api.Campus/GetRoomCoordinates", + type: GRPCCallType.unary + ) + + internal static let getRoomSchedule = GRPCMethodDescriptor( + name: "GetRoomSchedule", + path: "/api.Campus/GetRoomSchedule", + type: GRPCCallType.unary + ) + + internal static let getCafeteriaRatings = GRPCMethodDescriptor( + name: "GetCafeteriaRatings", + path: "/api.Campus/GetCafeteriaRatings", + type: GRPCCallType.unary + ) + + internal static let getDishRatings = GRPCMethodDescriptor( + name: "GetDishRatings", + path: "/api.Campus/GetDishRatings", + type: GRPCCallType.unary + ) + + internal static let newCafeteriaRating = GRPCMethodDescriptor( + name: "NewCafeteriaRating", + path: "/api.Campus/NewCafeteriaRating", + type: GRPCCallType.unary + ) + + internal static let newDishRating = GRPCMethodDescriptor( + name: "NewDishRating", + path: "/api.Campus/NewDishRating", + type: GRPCCallType.unary + ) + + internal static let getAvailableDishTags = GRPCMethodDescriptor( + name: "GetAvailableDishTags", + path: "/api.Campus/GetAvailableDishTags", + type: GRPCCallType.unary + ) + + internal static let getNameTags = GRPCMethodDescriptor( + name: "GetNameTags", + path: "/api.Campus/GetNameTags", + type: GRPCCallType.unary + ) + + internal static let getAvailableCafeteriaTags = GRPCMethodDescriptor( + name: "GetAvailableCafeteriaTags", + path: "/api.Campus/GetAvailableCafeteriaTags", + type: GRPCCallType.unary + ) + + internal static let getCafeterias = GRPCMethodDescriptor( + name: "GetCafeterias", + path: "/api.Campus/GetCafeterias", + type: GRPCCallType.unary + ) + + internal static let getDishes = GRPCMethodDescriptor( + name: "GetDishes", + path: "/api.Campus/GetDishes", + type: GRPCCallType.unary + ) + + internal static let getResponsiblePerson = GRPCMethodDescriptor( + name: "GetResponsiblePerson", + path: "/api.Campus/GetResponsiblePerson", + type: GRPCCallType.unary + ) + + internal static let getBuilding2Gps = GRPCMethodDescriptor( + name: "GetBuilding2Gps", + path: "/api.Campus/GetBuilding2Gps", + type: GRPCCallType.unary + ) + + internal static let getAreaFacilitiesByBuildingNr = GRPCMethodDescriptor( + name: "GetAreaFacilitiesByBuildingNr", + path: "/api.Campus/GetAreaFacilitiesByBuildingNr", + type: GRPCCallType.unary + ) + + internal static let getListOfToilets = GRPCMethodDescriptor( + name: "GetListOfToilets", + path: "/api.Campus/GetListOfToilets", + type: GRPCCallType.unary + ) + + internal static let getListOfElevators = GRPCMethodDescriptor( + name: "GetListOfElevators", + path: "/api.Campus/GetListOfElevators", + type: GRPCCallType.unary + ) + + internal static let getMoreInformation = GRPCMethodDescriptor( + name: "GetMoreInformation", + path: "/api.Campus/GetMoreInformation", + type: GRPCCallType.unary + ) + + internal static let getOpeningTimes = GRPCMethodDescriptor( + name: "GetOpeningTimes", + path: "/api.Campus/GetOpeningTimes", + type: GRPCCallType.unary + ) + + internal static let getUpdateNote = GRPCMethodDescriptor( + name: "GetUpdateNote", + path: "/api.Campus/GetUpdateNote", + type: GRPCCallType.unary + ) + + internal static let getStudyRoomList = GRPCMethodDescriptor( + name: "GetStudyRoomList", + path: "/api.Campus/GetStudyRoomList", + type: GRPCCallType.unary + ) + + internal static let getEventList = GRPCMethodDescriptor( + name: "GetEventList", + path: "/api.Campus/GetEventList", + type: GRPCCallType.unary + ) + + internal static let getKino = GRPCMethodDescriptor( + name: "GetKino", + path: "/api.Campus/GetKino", + type: GRPCCallType.unary + ) + + internal static let sendFeedback = GRPCMethodDescriptor( + name: "SendFeedback", + path: "/api.Campus/SendFeedback", + type: GRPCCallType.unary + ) + + internal static let sendFeedbackImage = GRPCMethodDescriptor( + name: "SendFeedbackImage", + path: "/api.Campus/SendFeedbackImage", + type: GRPCCallType.unary + ) + + internal static let getUploadStatus = GRPCMethodDescriptor( + name: "GetUploadStatus", + path: "/api.Campus/GetUploadStatus", + type: GRPCCallType.unary + ) + + internal static let getNotification = GRPCMethodDescriptor( + name: "GetNotification", + path: "/api.Campus/GetNotification", + type: GRPCCallType.unary + ) + + internal static let getNotificationConfirm = GRPCMethodDescriptor( + name: "GetNotificationConfirm", + path: "/api.Campus/GetNotificationConfirm", + type: GRPCCallType.unary + ) + + internal static let getMembers = GRPCMethodDescriptor( + name: "GetMembers", + path: "/api.Campus/GetMembers", + type: GRPCCallType.unary + ) + + internal static let getCanteenHeadCount = GRPCMethodDescriptor( + name: "GetCanteenHeadCount", + path: "/api.Campus/GetCanteenHeadCount", + type: GRPCCallType.unary + ) + + internal static let iOSDeviceRequestResponse = GRPCMethodDescriptor( + name: "IOSDeviceRequestResponse", + path: "/api.Campus/IOSDeviceRequestResponse", + type: GRPCCallType.unary + ) + + internal static let registerDevice = GRPCMethodDescriptor( + name: "RegisterDevice", + path: "/api.Campus/RegisterDevice", + type: GRPCCallType.unary + ) + + internal static let removeDevice = GRPCMethodDescriptor( + name: "RemoveDevice", + path: "/api.Campus/RemoveDevice", + type: GRPCCallType.unary + ) + } +} + +/// To build a server, implement a class that conforms to this protocol. +internal protocol Api_CampusProvider: CallHandlerProvider { + var interceptors: Api_CampusServerInterceptorFactoryProtocol? { get } + + func getTopNews(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getNewsSources(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func searchRooms(request: Api_SearchRoomsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + /// a location is a campus location/building, e.g. "Garching Forschungszentrum" + func getLocations(request: Api_GetLocationsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getRoomMaps(request: Api_GetRoomMapsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getRoomCoordinates(request: Api_GetRoomCoordinatesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getRoomSchedule(request: Api_GetRoomScheduleRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + /// This endpoint retrieves Cafeteria Ratings from the Backend. + func getCafeteriaRatings(request: Api_CafeteriaRatingRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getDishRatings(request: Api_DishRatingRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func newCafeteriaRating(request: Api_NewCafeteriaRatingRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func newDishRating(request: Api_NewDishRatingRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getAvailableDishTags(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getNameTags(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getAvailableCafeteriaTags(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getCafeterias(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getDishes(request: Api_GetDishesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getResponsiblePerson(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getBuilding2Gps(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getAreaFacilitiesByBuildingNr(request: Api_GetAreaFacilitiesByBuildingNrRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getListOfToilets(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getListOfElevators(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getMoreInformation(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getOpeningTimes(request: Api_GetOpeningTimesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getUpdateNote(request: Api_GetUpdateNoteRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getStudyRoomList(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture + + func getEventList(request: Api_GetEventListRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getKino(request: Api_GetKinoRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func sendFeedback(request: Api_SendFeedbackRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func sendFeedbackImage(request: Api_SendFeedbackImageRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getUploadStatus(request: Api_GetUploadStatusRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getNotification(request: Api_NotificationsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getNotificationConfirm(request: Api_NotificationsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getMembers(request: Api_GetMembersRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + func getCanteenHeadCount(request: Api_GetCanteenHeadCountRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + /// Endpoint for the iOS app to respond to background notifications requests + func iOSDeviceRequestResponse(request: Api_IOSDeviceRequestResponseRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + /// Register an Android, iOS or Windows device for push notifications + func registerDevice(request: Api_RegisterDeviceRequest, context: StatusOnlyCallContext) -> EventLoopFuture + + /// Unregister it from push notifications + func removeDevice(request: Api_RemoveDeviceRequest, context: StatusOnlyCallContext) -> EventLoopFuture +} + +extension Api_CampusProvider { + internal var serviceName: Substring { + return Api_CampusServerMetadata.serviceDescriptor.fullName[...] + } + + /// Determines, calls and returns the appropriate request handler, depending on the request's method. + /// Returns nil for methods not handled by this service. + internal func handle( + method name: Substring, + context: CallHandlerContext + ) -> GRPCServerHandlerProtocol? { + switch name { + case "GetTopNews": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetTopNewsInterceptors() ?? [], + userFunction: self.getTopNews(request:context:) + ) + + case "GetNewsSources": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNewsSourcesInterceptors() ?? [], + userFunction: self.getNewsSources(request:context:) + ) + + case "SearchRooms": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSearchRoomsInterceptors() ?? [], + userFunction: self.searchRooms(request:context:) + ) + + case "GetLocations": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetLocationsInterceptors() ?? [], + userFunction: self.getLocations(request:context:) + ) + + case "GetRoomMaps": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomMapsInterceptors() ?? [], + userFunction: self.getRoomMaps(request:context:) + ) + + case "GetRoomCoordinates": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomCoordinatesInterceptors() ?? [], + userFunction: self.getRoomCoordinates(request:context:) + ) + + case "GetRoomSchedule": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomScheduleInterceptors() ?? [], + userFunction: self.getRoomSchedule(request:context:) + ) + + case "GetCafeteriaRatings": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCafeteriaRatingsInterceptors() ?? [], + userFunction: self.getCafeteriaRatings(request:context:) + ) + + case "GetDishRatings": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetDishRatingsInterceptors() ?? [], + userFunction: self.getDishRatings(request:context:) + ) + + case "NewCafeteriaRating": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeNewCafeteriaRatingInterceptors() ?? [], + userFunction: self.newCafeteriaRating(request:context:) + ) + + case "NewDishRating": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeNewDishRatingInterceptors() ?? [], + userFunction: self.newDishRating(request:context:) + ) + + case "GetAvailableDishTags": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAvailableDishTagsInterceptors() ?? [], + userFunction: self.getAvailableDishTags(request:context:) + ) + + case "GetNameTags": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNameTagsInterceptors() ?? [], + userFunction: self.getNameTags(request:context:) + ) + + case "GetAvailableCafeteriaTags": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAvailableCafeteriaTagsInterceptors() ?? [], + userFunction: self.getAvailableCafeteriaTags(request:context:) + ) + + case "GetCafeterias": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCafeteriasInterceptors() ?? [], + userFunction: self.getCafeterias(request:context:) + ) + + case "GetDishes": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetDishesInterceptors() ?? [], + userFunction: self.getDishes(request:context:) + ) + + case "GetResponsiblePerson": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetResponsiblePersonInterceptors() ?? [], + userFunction: self.getResponsiblePerson(request:context:) + ) + + case "GetBuilding2Gps": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetBuilding2GpsInterceptors() ?? [], + userFunction: self.getBuilding2Gps(request:context:) + ) + + case "GetAreaFacilitiesByBuildingNr": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAreaFacilitiesByBuildingNrInterceptors() ?? [], + userFunction: self.getAreaFacilitiesByBuildingNr(request:context:) + ) + + case "GetListOfToilets": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetListOfToiletsInterceptors() ?? [], + userFunction: self.getListOfToilets(request:context:) + ) + + case "GetListOfElevators": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetListOfElevatorsInterceptors() ?? [], + userFunction: self.getListOfElevators(request:context:) + ) + + case "GetMoreInformation": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetMoreInformationInterceptors() ?? [], + userFunction: self.getMoreInformation(request:context:) + ) + + case "GetOpeningTimes": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetOpeningTimesInterceptors() ?? [], + userFunction: self.getOpeningTimes(request:context:) + ) + + case "GetUpdateNote": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetUpdateNoteInterceptors() ?? [], + userFunction: self.getUpdateNote(request:context:) + ) + + case "GetStudyRoomList": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetStudyRoomListInterceptors() ?? [], + userFunction: self.getStudyRoomList(request:context:) + ) + + case "GetEventList": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetEventListInterceptors() ?? [], + userFunction: self.getEventList(request:context:) + ) + + case "GetKino": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetKinoInterceptors() ?? [], + userFunction: self.getKino(request:context:) + ) + + case "SendFeedback": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSendFeedbackInterceptors() ?? [], + userFunction: self.sendFeedback(request:context:) + ) + + case "SendFeedbackImage": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSendFeedbackImageInterceptors() ?? [], + userFunction: self.sendFeedbackImage(request:context:) + ) + + case "GetUploadStatus": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetUploadStatusInterceptors() ?? [], + userFunction: self.getUploadStatus(request:context:) + ) + + case "GetNotification": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNotificationInterceptors() ?? [], + userFunction: self.getNotification(request:context:) + ) + + case "GetNotificationConfirm": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNotificationConfirmInterceptors() ?? [], + userFunction: self.getNotificationConfirm(request:context:) + ) + + case "GetMembers": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetMembersInterceptors() ?? [], + userFunction: self.getMembers(request:context:) + ) + + case "GetCanteenHeadCount": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCanteenHeadCountInterceptors() ?? [], + userFunction: self.getCanteenHeadCount(request:context:) + ) + + case "IOSDeviceRequestResponse": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeIOSDeviceRequestResponseInterceptors() ?? [], + userFunction: self.iOSDeviceRequestResponse(request:context:) + ) + + case "RegisterDevice": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [], + userFunction: self.registerDevice(request:context:) + ) + + case "RemoveDevice": + return UnaryServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeRemoveDeviceInterceptors() ?? [], + userFunction: self.removeDevice(request:context:) + ) + + default: + return nil + } + } +} + +#if compiler(>=5.6) + +/// To implement a server, implement an object which conforms to this protocol. +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +internal protocol Api_CampusAsyncProvider: CallHandlerProvider { + static var serviceDescriptor: GRPCServiceDescriptor { get } + var interceptors: Api_CampusServerInterceptorFactoryProtocol? { get } + + @Sendable func getTopNews( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetTopNewsReply + + @Sendable func getNewsSources( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_NewsSourceArray + + @Sendable func searchRooms( + request: Api_SearchRoomsRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_SearchRoomsReply + + /// a location is a campus location/building, e.g. "Garching Forschungszentrum" + @Sendable func getLocations( + request: Api_GetLocationsRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetLocationsReply + + @Sendable func getRoomMaps( + request: Api_GetRoomMapsRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetRoomMapsReply + + @Sendable func getRoomCoordinates( + request: Api_GetRoomCoordinatesRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetRoomCoordinatesReply + + @Sendable func getRoomSchedule( + request: Api_GetRoomScheduleRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetRoomScheduleReply + + /// This endpoint retrieves Cafeteria Ratings from the Backend. + @Sendable func getCafeteriaRatings( + request: Api_CafeteriaRatingRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_CafeteriaRatingReply + + @Sendable func getDishRatings( + request: Api_DishRatingRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_DishRatingReply + + @Sendable func newCafeteriaRating( + request: Api_NewCafeteriaRatingRequest, + context: GRPCAsyncServerCallContext + ) async throws -> SwiftProtobuf.Google_Protobuf_Empty + + @Sendable func newDishRating( + request: Api_NewDishRatingRequest, + context: GRPCAsyncServerCallContext + ) async throws -> SwiftProtobuf.Google_Protobuf_Empty + + @Sendable func getAvailableDishTags( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetTagsReply + + @Sendable func getNameTags( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetTagsReply + + @Sendable func getAvailableCafeteriaTags( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetTagsReply + + @Sendable func getCafeterias( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetCafeteriaReply + + @Sendable func getDishes( + request: Api_GetDishesRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetDishesReply + + @Sendable func getResponsiblePerson( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetResponsiblePersonReply + + @Sendable func getBuilding2Gps( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetBuilding2GpsReply + + @Sendable func getAreaFacilitiesByBuildingNr( + request: Api_GetAreaFacilitiesByBuildingNrRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetAreaFacilitiesByBuildingNrReply + + @Sendable func getListOfToilets( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetListOfToiletsReply + + @Sendable func getListOfElevators( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetListOfElevatorsReply + + @Sendable func getMoreInformation( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetMoreInformationReply + + @Sendable func getOpeningTimes( + request: Api_GetOpeningTimesRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetOpeningTimesReply + + @Sendable func getUpdateNote( + request: Api_GetUpdateNoteRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetUpdateNoteReply + + @Sendable func getStudyRoomList( + request: SwiftProtobuf.Google_Protobuf_Empty, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetStudyRoomListReply + + @Sendable func getEventList( + request: Api_GetEventListRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetEventListReply + + @Sendable func getKino( + request: Api_GetKinoRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetKinoReply + + @Sendable func sendFeedback( + request: Api_SendFeedbackRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_SendFeedbackImageReply + + @Sendable func sendFeedbackImage( + request: Api_SendFeedbackImageRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_SendFeedbackImageReply + + @Sendable func getUploadStatus( + request: Api_GetUploadStatusRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetUploadStatusReply + + @Sendable func getNotification( + request: Api_NotificationsRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetNotificationsReply + + @Sendable func getNotificationConfirm( + request: Api_NotificationsRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetNotificationsConfirmReply + + @Sendable func getMembers( + request: Api_GetMembersRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetMembersReply + + @Sendable func getCanteenHeadCount( + request: Api_GetCanteenHeadCountRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_GetCanteenHeadCountReply + + /// Endpoint for the iOS app to respond to background notifications requests + @Sendable func iOSDeviceRequestResponse( + request: Api_IOSDeviceRequestResponseRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_IOSDeviceRequestResponseReply + + /// Register an Android, iOS or Windows device for push notifications + @Sendable func registerDevice( + request: Api_RegisterDeviceRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_RegisterDeviceReply + + /// Unregister it from push notifications + @Sendable func removeDevice( + request: Api_RemoveDeviceRequest, + context: GRPCAsyncServerCallContext + ) async throws -> Api_RemoveDeviceReply +} + +@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) +extension Api_CampusAsyncProvider { + internal static var serviceDescriptor: GRPCServiceDescriptor { + return Api_CampusServerMetadata.serviceDescriptor + } + + internal var serviceName: Substring { + return Api_CampusServerMetadata.serviceDescriptor.fullName[...] + } + + internal var interceptors: Api_CampusServerInterceptorFactoryProtocol? { + return nil + } + + internal func handle( + method name: Substring, + context: CallHandlerContext + ) -> GRPCServerHandlerProtocol? { + switch name { + case "GetTopNews": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetTopNewsInterceptors() ?? [], + wrapping: self.getTopNews(request:context:) + ) + + case "GetNewsSources": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNewsSourcesInterceptors() ?? [], + wrapping: self.getNewsSources(request:context:) + ) + + case "SearchRooms": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSearchRoomsInterceptors() ?? [], + wrapping: self.searchRooms(request:context:) + ) + + case "GetLocations": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetLocationsInterceptors() ?? [], + wrapping: self.getLocations(request:context:) + ) + + case "GetRoomMaps": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomMapsInterceptors() ?? [], + wrapping: self.getRoomMaps(request:context:) + ) + + case "GetRoomCoordinates": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomCoordinatesInterceptors() ?? [], + wrapping: self.getRoomCoordinates(request:context:) + ) + + case "GetRoomSchedule": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetRoomScheduleInterceptors() ?? [], + wrapping: self.getRoomSchedule(request:context:) + ) + + case "GetCafeteriaRatings": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCafeteriaRatingsInterceptors() ?? [], + wrapping: self.getCafeteriaRatings(request:context:) + ) + + case "GetDishRatings": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetDishRatingsInterceptors() ?? [], + wrapping: self.getDishRatings(request:context:) + ) + + case "NewCafeteriaRating": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeNewCafeteriaRatingInterceptors() ?? [], + wrapping: self.newCafeteriaRating(request:context:) + ) + + case "NewDishRating": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeNewDishRatingInterceptors() ?? [], + wrapping: self.newDishRating(request:context:) + ) + + case "GetAvailableDishTags": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAvailableDishTagsInterceptors() ?? [], + wrapping: self.getAvailableDishTags(request:context:) + ) + + case "GetNameTags": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNameTagsInterceptors() ?? [], + wrapping: self.getNameTags(request:context:) + ) + + case "GetAvailableCafeteriaTags": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAvailableCafeteriaTagsInterceptors() ?? [], + wrapping: self.getAvailableCafeteriaTags(request:context:) + ) + + case "GetCafeterias": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCafeteriasInterceptors() ?? [], + wrapping: self.getCafeterias(request:context:) + ) + + case "GetDishes": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetDishesInterceptors() ?? [], + wrapping: self.getDishes(request:context:) + ) + + case "GetResponsiblePerson": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetResponsiblePersonInterceptors() ?? [], + wrapping: self.getResponsiblePerson(request:context:) + ) + + case "GetBuilding2Gps": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetBuilding2GpsInterceptors() ?? [], + wrapping: self.getBuilding2Gps(request:context:) + ) + + case "GetAreaFacilitiesByBuildingNr": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetAreaFacilitiesByBuildingNrInterceptors() ?? [], + wrapping: self.getAreaFacilitiesByBuildingNr(request:context:) + ) + + case "GetListOfToilets": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetListOfToiletsInterceptors() ?? [], + wrapping: self.getListOfToilets(request:context:) + ) + + case "GetListOfElevators": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetListOfElevatorsInterceptors() ?? [], + wrapping: self.getListOfElevators(request:context:) + ) + + case "GetMoreInformation": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetMoreInformationInterceptors() ?? [], + wrapping: self.getMoreInformation(request:context:) + ) + + case "GetOpeningTimes": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetOpeningTimesInterceptors() ?? [], + wrapping: self.getOpeningTimes(request:context:) + ) + + case "GetUpdateNote": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetUpdateNoteInterceptors() ?? [], + wrapping: self.getUpdateNote(request:context:) + ) + + case "GetStudyRoomList": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetStudyRoomListInterceptors() ?? [], + wrapping: self.getStudyRoomList(request:context:) + ) + + case "GetEventList": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetEventListInterceptors() ?? [], + wrapping: self.getEventList(request:context:) + ) + + case "GetKino": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetKinoInterceptors() ?? [], + wrapping: self.getKino(request:context:) + ) + + case "SendFeedback": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSendFeedbackInterceptors() ?? [], + wrapping: self.sendFeedback(request:context:) + ) + + case "SendFeedbackImage": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeSendFeedbackImageInterceptors() ?? [], + wrapping: self.sendFeedbackImage(request:context:) + ) + + case "GetUploadStatus": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetUploadStatusInterceptors() ?? [], + wrapping: self.getUploadStatus(request:context:) + ) + + case "GetNotification": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNotificationInterceptors() ?? [], + wrapping: self.getNotification(request:context:) + ) + + case "GetNotificationConfirm": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetNotificationConfirmInterceptors() ?? [], + wrapping: self.getNotificationConfirm(request:context:) + ) + + case "GetMembers": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetMembersInterceptors() ?? [], + wrapping: self.getMembers(request:context:) + ) + + case "GetCanteenHeadCount": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeGetCanteenHeadCountInterceptors() ?? [], + wrapping: self.getCanteenHeadCount(request:context:) + ) + + case "IOSDeviceRequestResponse": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeIOSDeviceRequestResponseInterceptors() ?? [], + wrapping: self.iOSDeviceRequestResponse(request:context:) + ) + + case "RegisterDevice": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [], + wrapping: self.registerDevice(request:context:) + ) + + case "RemoveDevice": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeRemoveDeviceInterceptors() ?? [], + wrapping: self.removeDevice(request:context:) + ) + + default: + return nil + } + } +} + +#endif // compiler(>=5.6) + +internal protocol Api_CampusServerInterceptorFactoryProtocol { + + /// - Returns: Interceptors to use when handling 'getTopNews'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetTopNewsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getNewsSources'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetNewsSourcesInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'searchRooms'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSearchRoomsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getLocations'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetLocationsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getRoomMaps'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetRoomMapsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getRoomCoordinates'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetRoomCoordinatesInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getRoomSchedule'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetRoomScheduleInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getCafeteriaRatings'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetCafeteriaRatingsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getDishRatings'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetDishRatingsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'newCafeteriaRating'. + /// Defaults to calling `self.makeInterceptors()`. + func makeNewCafeteriaRatingInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'newDishRating'. + /// Defaults to calling `self.makeInterceptors()`. + func makeNewDishRatingInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getAvailableDishTags'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetAvailableDishTagsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getNameTags'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetNameTagsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getAvailableCafeteriaTags'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetAvailableCafeteriaTagsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getCafeterias'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetCafeteriasInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getDishes'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetDishesInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getResponsiblePerson'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetResponsiblePersonInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getBuilding2Gps'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetBuilding2GpsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getAreaFacilitiesByBuildingNr'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetAreaFacilitiesByBuildingNrInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getListOfToilets'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetListOfToiletsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getListOfElevators'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetListOfElevatorsInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getMoreInformation'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetMoreInformationInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getOpeningTimes'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetOpeningTimesInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getUpdateNote'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetUpdateNoteInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getStudyRoomList'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetStudyRoomListInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getEventList'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetEventListInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getKino'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetKinoInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'sendFeedback'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSendFeedbackInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'sendFeedbackImage'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSendFeedbackImageInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getUploadStatus'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetUploadStatusInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getNotification'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetNotificationInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getNotificationConfirm'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetNotificationConfirmInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getMembers'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetMembersInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'getCanteenHeadCount'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetCanteenHeadCountInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'iOSDeviceRequestResponse'. + /// Defaults to calling `self.makeInterceptors()`. + func makeIOSDeviceRequestResponseInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'registerDevice'. + /// Defaults to calling `self.makeInterceptors()`. + func makeRegisterDeviceInterceptors() -> [ServerInterceptor] + + /// - Returns: Interceptors to use when handling 'removeDevice'. + /// Defaults to calling `self.makeInterceptors()`. + func makeRemoveDeviceInterceptors() -> [ServerInterceptor] +} + +internal enum Api_CampusServerMetadata { + internal static let serviceDescriptor = GRPCServiceDescriptor( + name: "Campus", + fullName: "api.Campus", + methods: [ + Api_CampusServerMetadata.Methods.getTopNews, + Api_CampusServerMetadata.Methods.getNewsSources, + Api_CampusServerMetadata.Methods.searchRooms, + Api_CampusServerMetadata.Methods.getLocations, + Api_CampusServerMetadata.Methods.getRoomMaps, + Api_CampusServerMetadata.Methods.getRoomCoordinates, + Api_CampusServerMetadata.Methods.getRoomSchedule, + Api_CampusServerMetadata.Methods.getCafeteriaRatings, + Api_CampusServerMetadata.Methods.getDishRatings, + Api_CampusServerMetadata.Methods.newCafeteriaRating, + Api_CampusServerMetadata.Methods.newDishRating, + Api_CampusServerMetadata.Methods.getAvailableDishTags, + Api_CampusServerMetadata.Methods.getNameTags, + Api_CampusServerMetadata.Methods.getAvailableCafeteriaTags, + Api_CampusServerMetadata.Methods.getCafeterias, + Api_CampusServerMetadata.Methods.getDishes, + Api_CampusServerMetadata.Methods.getResponsiblePerson, + Api_CampusServerMetadata.Methods.getBuilding2Gps, + Api_CampusServerMetadata.Methods.getAreaFacilitiesByBuildingNr, + Api_CampusServerMetadata.Methods.getListOfToilets, + Api_CampusServerMetadata.Methods.getListOfElevators, + Api_CampusServerMetadata.Methods.getMoreInformation, + Api_CampusServerMetadata.Methods.getOpeningTimes, + Api_CampusServerMetadata.Methods.getUpdateNote, + Api_CampusServerMetadata.Methods.getStudyRoomList, + Api_CampusServerMetadata.Methods.getEventList, + Api_CampusServerMetadata.Methods.getKino, + Api_CampusServerMetadata.Methods.sendFeedback, + Api_CampusServerMetadata.Methods.sendFeedbackImage, + Api_CampusServerMetadata.Methods.getUploadStatus, + Api_CampusServerMetadata.Methods.getNotification, + Api_CampusServerMetadata.Methods.getNotificationConfirm, + Api_CampusServerMetadata.Methods.getMembers, + Api_CampusServerMetadata.Methods.getCanteenHeadCount, + Api_CampusServerMetadata.Methods.iOSDeviceRequestResponse, + Api_CampusServerMetadata.Methods.registerDevice, + Api_CampusServerMetadata.Methods.removeDevice, + ] + ) + + internal enum Methods { + internal static let getTopNews = GRPCMethodDescriptor( + name: "GetTopNews", + path: "/api.Campus/GetTopNews", + type: GRPCCallType.unary + ) + + internal static let getNewsSources = GRPCMethodDescriptor( + name: "GetNewsSources", + path: "/api.Campus/GetNewsSources", + type: GRPCCallType.unary + ) + + internal static let searchRooms = GRPCMethodDescriptor( + name: "SearchRooms", + path: "/api.Campus/SearchRooms", + type: GRPCCallType.unary + ) + + internal static let getLocations = GRPCMethodDescriptor( + name: "GetLocations", + path: "/api.Campus/GetLocations", + type: GRPCCallType.unary + ) + + internal static let getRoomMaps = GRPCMethodDescriptor( + name: "GetRoomMaps", + path: "/api.Campus/GetRoomMaps", + type: GRPCCallType.unary + ) + + internal static let getRoomCoordinates = GRPCMethodDescriptor( + name: "GetRoomCoordinates", + path: "/api.Campus/GetRoomCoordinates", + type: GRPCCallType.unary + ) + + internal static let getRoomSchedule = GRPCMethodDescriptor( + name: "GetRoomSchedule", + path: "/api.Campus/GetRoomSchedule", + type: GRPCCallType.unary + ) + + internal static let getCafeteriaRatings = GRPCMethodDescriptor( + name: "GetCafeteriaRatings", + path: "/api.Campus/GetCafeteriaRatings", + type: GRPCCallType.unary + ) + + internal static let getDishRatings = GRPCMethodDescriptor( + name: "GetDishRatings", + path: "/api.Campus/GetDishRatings", + type: GRPCCallType.unary + ) + + internal static let newCafeteriaRating = GRPCMethodDescriptor( + name: "NewCafeteriaRating", + path: "/api.Campus/NewCafeteriaRating", + type: GRPCCallType.unary + ) + + internal static let newDishRating = GRPCMethodDescriptor( + name: "NewDishRating", + path: "/api.Campus/NewDishRating", + type: GRPCCallType.unary + ) + + internal static let getAvailableDishTags = GRPCMethodDescriptor( + name: "GetAvailableDishTags", + path: "/api.Campus/GetAvailableDishTags", + type: GRPCCallType.unary + ) + + internal static let getNameTags = GRPCMethodDescriptor( + name: "GetNameTags", + path: "/api.Campus/GetNameTags", + type: GRPCCallType.unary + ) + + internal static let getAvailableCafeteriaTags = GRPCMethodDescriptor( + name: "GetAvailableCafeteriaTags", + path: "/api.Campus/GetAvailableCafeteriaTags", + type: GRPCCallType.unary + ) + + internal static let getCafeterias = GRPCMethodDescriptor( + name: "GetCafeterias", + path: "/api.Campus/GetCafeterias", + type: GRPCCallType.unary + ) + + internal static let getDishes = GRPCMethodDescriptor( + name: "GetDishes", + path: "/api.Campus/GetDishes", + type: GRPCCallType.unary + ) + + internal static let getResponsiblePerson = GRPCMethodDescriptor( + name: "GetResponsiblePerson", + path: "/api.Campus/GetResponsiblePerson", + type: GRPCCallType.unary + ) + + internal static let getBuilding2Gps = GRPCMethodDescriptor( + name: "GetBuilding2Gps", + path: "/api.Campus/GetBuilding2Gps", + type: GRPCCallType.unary + ) + + internal static let getAreaFacilitiesByBuildingNr = GRPCMethodDescriptor( + name: "GetAreaFacilitiesByBuildingNr", + path: "/api.Campus/GetAreaFacilitiesByBuildingNr", + type: GRPCCallType.unary + ) + + internal static let getListOfToilets = GRPCMethodDescriptor( + name: "GetListOfToilets", + path: "/api.Campus/GetListOfToilets", + type: GRPCCallType.unary + ) + + internal static let getListOfElevators = GRPCMethodDescriptor( + name: "GetListOfElevators", + path: "/api.Campus/GetListOfElevators", + type: GRPCCallType.unary + ) + + internal static let getMoreInformation = GRPCMethodDescriptor( + name: "GetMoreInformation", + path: "/api.Campus/GetMoreInformation", + type: GRPCCallType.unary + ) + + internal static let getOpeningTimes = GRPCMethodDescriptor( + name: "GetOpeningTimes", + path: "/api.Campus/GetOpeningTimes", + type: GRPCCallType.unary + ) + + internal static let getUpdateNote = GRPCMethodDescriptor( + name: "GetUpdateNote", + path: "/api.Campus/GetUpdateNote", + type: GRPCCallType.unary + ) + + internal static let getStudyRoomList = GRPCMethodDescriptor( + name: "GetStudyRoomList", + path: "/api.Campus/GetStudyRoomList", + type: GRPCCallType.unary + ) + + internal static let getEventList = GRPCMethodDescriptor( + name: "GetEventList", + path: "/api.Campus/GetEventList", + type: GRPCCallType.unary + ) + + internal static let getKino = GRPCMethodDescriptor( + name: "GetKino", + path: "/api.Campus/GetKino", + type: GRPCCallType.unary + ) + + internal static let sendFeedback = GRPCMethodDescriptor( + name: "SendFeedback", + path: "/api.Campus/SendFeedback", + type: GRPCCallType.unary + ) + + internal static let sendFeedbackImage = GRPCMethodDescriptor( + name: "SendFeedbackImage", + path: "/api.Campus/SendFeedbackImage", + type: GRPCCallType.unary + ) + + internal static let getUploadStatus = GRPCMethodDescriptor( + name: "GetUploadStatus", + path: "/api.Campus/GetUploadStatus", + type: GRPCCallType.unary + ) + + internal static let getNotification = GRPCMethodDescriptor( + name: "GetNotification", + path: "/api.Campus/GetNotification", + type: GRPCCallType.unary + ) + + internal static let getNotificationConfirm = GRPCMethodDescriptor( + name: "GetNotificationConfirm", + path: "/api.Campus/GetNotificationConfirm", + type: GRPCCallType.unary + ) + + internal static let getMembers = GRPCMethodDescriptor( + name: "GetMembers", + path: "/api.Campus/GetMembers", + type: GRPCCallType.unary + ) + + internal static let getCanteenHeadCount = GRPCMethodDescriptor( + name: "GetCanteenHeadCount", + path: "/api.Campus/GetCanteenHeadCount", + type: GRPCCallType.unary + ) + + internal static let iOSDeviceRequestResponse = GRPCMethodDescriptor( + name: "IOSDeviceRequestResponse", + path: "/api.Campus/IOSDeviceRequestResponse", + type: GRPCCallType.unary + ) + + internal static let registerDevice = GRPCMethodDescriptor( + name: "RegisterDevice", + path: "/api.Campus/RegisterDevice", + type: GRPCCallType.unary + ) + + internal static let removeDevice = GRPCMethodDescriptor( + name: "RemoveDevice", + path: "/api.Campus/RemoveDevice", + type: GRPCCallType.unary + ) + } +} + diff --git a/Campus-iOS/Base/Networking/CampusService.pb.swift b/Campus-iOS/Base/Networking/CampusService.pb.swift new file mode 100644 index 00000000..42dbacd8 --- /dev/null +++ b/Campus-iOS/Base/Networking/CampusService.pb.swift @@ -0,0 +1,5134 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: CampusService.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +enum Api_DeviceType: SwiftProtobuf.Enum { + typealias RawValue = Int + case ios // = 0 + case android // = 1 + case windows // = 2 + case UNRECOGNIZED(Int) + + init() { + self = .ios + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .ios + case 1: self = .android + case 2: self = .windows + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .ios: return 0 + case .android: return 1 + case .windows: return 2 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Api_DeviceType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Api_DeviceType] = [ + .ios, + .android, + .windows, + ] +} + +#endif // swift(>=4.2) + +struct Api_RegisterDeviceRequest { + // 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. + + var deviceID: String = String() + + var publicKey: String { + get {return _publicKey ?? String()} + set {_publicKey = newValue} + } + /// Returns true if `publicKey` has been explicitly set. + var hasPublicKey: Bool {return self._publicKey != nil} + /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. + mutating func clearPublicKey() {self._publicKey = nil} + + var deviceType: Api_DeviceType = .ios + + var campusApiToken: String { + get {return _campusApiToken ?? String()} + set {_campusApiToken = newValue} + } + /// Returns true if `campusApiToken` has been explicitly set. + var hasCampusApiToken: Bool {return self._campusApiToken != nil} + /// Clears the value of `campusApiToken`. Subsequent reads from it will return its default value. + mutating func clearCampusApiToken() {self._campusApiToken = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _publicKey: String? = nil + fileprivate var _campusApiToken: String? = nil +} + +struct Api_RegisterDeviceReply { + // 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. + + var deviceID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RemoveDeviceRequest { + // 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. + + var deviceID: String = String() + + var deviceType: Api_DeviceType = .ios + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RemoveDeviceReply { + // 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. + + var deviceID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_IOSDeviceRequestResponseRequest { + // 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. + + var requestID: String = String() + + var payload: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_IOSDeviceRequestResponseReply { + // 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. + + var message: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetRoomScheduleRequest { + // 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. + + var room: Int32 = 0 + + var start: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _start ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_start = newValue} + } + /// Returns true if `start` has been explicitly set. + var hasStart: Bool {return self._start != nil} + /// Clears the value of `start`. Subsequent reads from it will return its default value. + mutating func clearStart() {self._start = nil} + + var end: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _end ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_end = newValue} + } + /// Returns true if `end` has been explicitly set. + var hasEnd: Bool {return self._end != nil} + /// Clears the value of `end`. Subsequent reads from it will return its default value. + mutating func clearEnd() {self._end = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _start: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _end: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_GetRoomScheduleReply { + // 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. + + var events: [Api_GetRoomScheduleReply.RoomScheduleEvent] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + struct RoomScheduleEvent { + // 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. + + var start: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _start ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_start = newValue} + } + /// Returns true if `start` has been explicitly set. + var hasStart: Bool {return self._start != nil} + /// Clears the value of `start`. Subsequent reads from it will return its default value. + mutating func clearStart() {self._start = nil} + + var end: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _end ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_end = newValue} + } + /// Returns true if `end` has been explicitly set. + var hasEnd: Bool {return self._end != nil} + /// Clears the value of `end`. Subsequent reads from it will return its default value. + mutating func clearEnd() {self._end = nil} + + var title: String = String() + + var eventID: Int32 = 0 + + var courseCode: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _start: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _end: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + } + + init() {} +} + +struct Api_GetRoomCoordinatesRequest { + // 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. + + var archID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetRoomCoordinatesReply { + // 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. + + var utmZone: String = String() + + var utmEasting: Float = 0 + + var utmNorthing: Float = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetRoomMapsRequest { + // 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. + + var archID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetRoomMapsReply { + // 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. + + var maps: [Api_GetRoomMapsReply.Map] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + struct Map { + // 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. + + var mapID: Int64 = 0 + + var description_p: String = String() + + var scale: Int64 = 0 + + var width: Int64 = 0 + + var height: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + + init() {} +} + +struct Api_GetLocationsRequest { + // 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. + + var location: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetLocationsReply { + // 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. + + var locations: [Api_GetLocationsReply.Location] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + struct Location { + // 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. + + var location: String = String() + + var name: String = String() + + var lon: String = String() + + var lat: String = String() + + var radius: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + + init() {} +} + +struct Api_SearchRoomsRequest { + // 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. + + var query: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_SearchRoomsReply { + // 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. + + var rooms: [Api_Room] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_Room { + // 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. + + var roomID: Int32 = 0 + + var roomCode: String = String() + + var buildingNr: String = String() + + var archID: String = String() + + var info: String = String() + + var address: String = String() + + var purpose: String = String() + + var campus: String = String() + + var name: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_NewsSourceArray { + // 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. + + var sources: [Api_NewsSource] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_NewsSource { + // 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. + + var source: String = String() + + var title: String = String() + + var icon: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetTopNewsReply { + // 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. + + var imageURL: String = String() + + var link: String = String() + + var created: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _created ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_created = newValue} + } + /// Returns true if `created` has been explicitly set. + var hasCreated: Bool {return self._created != nil} + /// Clears the value of `created`. Subsequent reads from it will return its default value. + mutating func clearCreated() {self._created = nil} + + var from: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _from ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_from = newValue} + } + /// Returns true if `from` has been explicitly set. + var hasFrom: Bool {return self._from != nil} + /// Clears the value of `from`. Subsequent reads from it will return its default value. + mutating func clearFrom() {self._from = nil} + + var to: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _to ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_to = newValue} + } + /// Returns true if `to` has been explicitly set. + var hasTo: Bool {return self._to != nil} + /// Clears the value of `to`. Subsequent reads from it will return its default value. + mutating func clearTo() {self._to = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _created: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _from: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _to: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_CafeteriaRatingRequest { + // 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. + + /// cafeteriaId Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING") + var cafeteriaID: String = String() + + /// Optional Parameter to define an interval for the ratings (Lower bound) + var from: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _from ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_from = newValue} + } + /// Returns true if `from` has been explicitly set. + var hasFrom: Bool {return self._from != nil} + /// Clears the value of `from`. Subsequent reads from it will return its default value. + mutating func clearFrom() {self._from = nil} + + /// Optional Parameter to define an interval for the ratings (Upper bound) + var to: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _to ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_to = newValue} + } + /// Returns true if `to` has been explicitly set. + var hasTo: Bool {return self._to != nil} + /// Clears the value of `to`. Subsequent reads from it will return its default value. + mutating func clearTo() {self._to = nil} + + /// Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter "-1" + var limit: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _from: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _to: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_DishRatingRequest { + // 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. + + /// Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING") + var cafeteriaID: String = String() + + /// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa + var dish: String = String() + + /// Optional Parameter to define an interval for the ratings (Lower bound) + var from: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _from ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_from = newValue} + } + /// Returns true if `from` has been explicitly set. + var hasFrom: Bool {return self._from != nil} + /// Clears the value of `from`. Subsequent reads from it will return its default value. + mutating func clearFrom() {self._from = nil} + + /// Optional Parameter to define an interval for the ratings (Upper bound) + var to: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _to ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_to = newValue} + } + /// Returns true if `to` has been explicitly set. + var hasTo: Bool {return self._to != nil} + /// Clears the value of `to`. Subsequent reads from it will return its default value. + mutating func clearTo() {self._to = nil} + + /// Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter "-1" + var limit: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _from: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _to: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_CafeteriaRatingReply { + // 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. + + var rating: [Api_SingleRatingReply] = [] + + var avg: Double = 0 + + var std: Double = 0 + + var min: Int32 = 0 + + var max: Int32 = 0 + + var ratingTags: [Api_RatingTagResult] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_DishRatingReply { + // 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. + + var rating: [Api_SingleRatingReply] = [] + + var avg: Double = 0 + + var std: Double = 0 + + var min: Int32 = 0 + + var max: Int32 = 0 + + var ratingTags: [Api_RatingTagResult] = [] + + var nameTags: [Api_RatingTagResult] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_SingleRatingReply { + // 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. + + /// number in the range 1-5 + var points: Int32 = 0 + + /// Optional JPEG image in Base64 + var image: Data = Data() + + /// Optional comment (max 256 chars) + var comment: String = String() + + var ratingTags: [Api_RatingTagNewRequest] = [] + + var visited: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _visited ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_visited = newValue} + } + /// Returns true if `visited` has been explicitly set. + var hasVisited: Bool {return self._visited != nil} + /// Clears the value of `visited`. Subsequent reads from it will return its default value. + mutating func clearVisited() {self._visited = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _visited: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_NewCafeteriaRatingRequest { + // 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. + + /// number in the range 1-5 + var points: Int32 = 0 + + var cafeteriaID: String = String() + + var image: Data = Data() + + /// Optional list of tag ratings add as many tags with a rating (1-5) of the list of cafeteriaRatingTags + var ratingTags: [Api_RatingTag] = [] + + /// Optional comment (max 256 chars) + var comment: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_NewDishRatingRequest { + // 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. + + /// number in the range 1-5 + var points: Int32 = 0 + + /// Mandatory Name of the dish (EAT-API naming scheme "MENSA_GARCHING") Must be available int the given mensa + var cafeteriaID: String = String() + + /// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa + var dish: String = String() + + /// Optional JPEG image in Base64 + var image: Data = Data() + + /// Optional list of tag ratings add as many tags with a rating (1-5) of the list of dishRatingTags + var ratingTags: [Api_RatingTag] = [] + + /// Optional comment (max 256 chars) + var comment: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetTagsReply { + // 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. + + var ratingTags: [Api_TagsOverview] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_TagsOverview { + // 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. + + var tagID: Int32 = 0 + + var de: String = String() + + var en: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RatingTag { + // 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. + + var tagID: Int32 = 0 + + var points: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RatingTagNewRequest { + // 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. + + var tagID: Int32 = 0 + + var points: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RatingTagResult { + // 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. + + var tagID: Int32 = 0 + + var avg: Double = 0 + + var std: Double = 0 + + var min: Int32 = 0 + + var max: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetCafeteriaReply { + // 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. + + var cafeteria: [Api_Cafeteria] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_Cafeteria { + // 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. + + var id: String = String() + + var address: String = String() + + var longitude: Double = 0 + + var latitude: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetDishesRequest { + // 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. + + var cafeteriaID: String = String() + + /// >=2022 until the current year + var year: Int32 = 0 + + /// range 1 - 53 + var week: Int32 = 0 + + /// range 0 (Monday) - 4 (Friday) + var day: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetDishesReply { + // 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. + + var dish: [String] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetResponsiblePersonReply { + // 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. + + var responsiblePerson: [Api_ResponsiblePersonElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_ResponsiblePersonElement { + // 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. + + var name: String = String() + + var telephone: String = String() + + var email: String = String() + + var faculty: String = String() + + var tumID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetBuilding2GpsReply { + // 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. + + var building2Gps: [Api_Building2GpsElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_Building2GpsElement { + // 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. + + var id: String = String() + + var latitude: String = String() + + var longitude: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetAreaFacilitiesByBuildingNrReply { + // 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. + + var areaFacilitiesByBuildingNr: [Api_RoomInformationElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetAreaFacilitiesByBuildingNrRequest { + // 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. + + var buildingNr: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetListOfToiletsReply { + // 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. + + var listOfToilets: [Api_RoomInformationElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_RoomInformationElement { + // 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. + + var roomID: Int32 = 0 + + var roomCode: String = String() + + var buildingNr: String = String() + + var archID: String = String() + + var info: String = String() + + var address: String = String() + + var purpose: String = String() + + var campus: String = String() + + var name: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetListOfElevatorsReply { + // 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. + + var listOfElevators: [Api_RoomInformationElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetMoreInformationReply { + // 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. + + var information: [Api_MoreInformationElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_MoreInformationElement { + // 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. + + var title: String = String() + + var category: String = String() + + var url: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetOpeningTimesRequest { + // 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. + + var language: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetOpeningTimesReply { + // 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. + + var facilities: [Api_OpeningTimesMsgElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_OpeningTimesMsgElement { + // 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. + + var id: Int32 = 0 + + var category: String = String() + + var name: String = String() + + var address: String = String() + + var room: String = String() + + var transportStation: String = String() + + var openingHours: String = String() + + var infos: String = String() + + var url: String = String() + + var language: String = String() + + var referenceID: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetUpdateNoteRequest { + // 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. + + var version: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetUpdateNoteReply { + // 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. + + var message: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetStudyRoomListReply { + // 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. + + var rooms: [Api_StudyRoomMsgElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_StudyRoomMsgElement { + // 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. + + var id: Int32 = 0 + + var name: String = String() + + var details: String = String() + + var rooms: [Api_StudyRoom] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_StudyRoom { + // 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. + + var groupID: Int32 = 0 + + var roomID: Int32 = 0 + + var roomCode: String = String() + + var roomName: String = String() + + var buildingName: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetEventListRequest { + // 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. + + /// optional parameter, will return all events if no id is specified + var eventID: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetEventListReply { + // 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. + + var events: [Api_EventListMsgElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_EventListMsgElement { + // 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. + + var name: String = String() + + var path: String = String() + + var event: Int32 = 0 + + var news: Int32 = 0 + + var kino: Int32 = 0 + + var file: Int32 = 0 + + var title: String = String() + + var description_p: String = String() + + var locality: String = String() + + var link: String = String() + + var start: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _start ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_start = newValue} + } + /// Returns true if `start` has been explicitly set. + var hasStart: Bool {return self._start != nil} + /// Clears the value of `start`. Subsequent reads from it will return its default value. + mutating func clearStart() {self._start = nil} + + var end: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _end ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_end = newValue} + } + /// Returns true if `end` has been explicitly set. + var hasEnd: Bool {return self._end != nil} + /// Clears the value of `end`. Subsequent reads from it will return its default value. + mutating func clearEnd() {self._end = nil} + + var ticketGroup: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _start: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + fileprivate var _end: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +struct Api_GetKinoRequest { + // 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. + + var lastID: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetKinoReply { + // 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. + + var kinos: [Api_KinoMsgElement] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_KinoMsgElement { + // 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. + + var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + var path: String { + get {return _storage._path} + set {_uniqueStorage()._path = newValue} + } + + var kino: Int32 { + get {return _storage._kino} + set {_uniqueStorage()._kino = newValue} + } + + var date: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _storage._date ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._date = newValue} + } + /// Returns true if `date` has been explicitly set. + var hasDate: Bool {return _storage._date != nil} + /// Clears the value of `date`. Subsequent reads from it will return its default value. + mutating func clearDate() {_uniqueStorage()._date = nil} + + var created: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _storage._created ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_uniqueStorage()._created = newValue} + } + /// Returns true if `created` has been explicitly set. + var hasCreated: Bool {return _storage._created != nil} + /// Clears the value of `created`. Subsequent reads from it will return its default value. + mutating func clearCreated() {_uniqueStorage()._created = nil} + + var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + var year: String { + get {return _storage._year} + set {_uniqueStorage()._year = newValue} + } + + var runtime: String { + get {return _storage._runtime} + set {_uniqueStorage()._runtime = newValue} + } + + var genre: String { + get {return _storage._genre} + set {_uniqueStorage()._genre = newValue} + } + + var director: String { + get {return _storage._director} + set {_uniqueStorage()._director = newValue} + } + + var actors: String { + get {return _storage._actors} + set {_uniqueStorage()._actors = newValue} + } + + var rating: String { + get {return _storage._rating} + set {_uniqueStorage()._rating = newValue} + } + + var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + var cover: Int32 { + get {return _storage._cover} + set {_uniqueStorage()._cover = newValue} + } + + var trailer: String { + get {return _storage._trailer} + set {_uniqueStorage()._trailer = newValue} + } + + var link: String { + get {return _storage._link} + set {_uniqueStorage()._link = newValue} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct Api_SendFeedbackRequest { + // 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. + + var topic: String = String() + + var email: String = String() + + var emailID: String = String() + + var message: String = String() + + var imageCount: Int32 = 0 + + var latitude: Double = 0 + + var longitude: Double = 0 + + var osVersion: String = String() + + var appVersion: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_SendFeedbackImageReply { + // 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. + + var status: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_SendFeedbackImageRequest { + // 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. + + var id: Int32 = 0 + + ///todo where does the file come from? + var imageNr: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetMembersRequest { + // 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. + + var lrzID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetMembersReply { + // 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. + + var lrzID: String = String() + + var name: String = String() + + var memberID: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetUploadStatusRequest { + // 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. + + var lrzID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetUploadStatusReply { + // 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. + + var fcmToken: String = String() + + var publicKey: String = String() + + var studentID: Bool = false + + var employeeID: Bool = false + + var externalID: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetNotificationsReply { + // 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. + + var notificationID: Int32 = 0 + + var type: Int32 = 0 + + var title: String = String() + + var description_p: String = String() + + var signature: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_NotificationsRequest { + // 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. + + var notificationID: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetNotificationsConfirmReply { + // 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. + + var status: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetCanteenHeadCountRequest { + // 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. + + /// The requested canteen ID + var canteenID: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Api_GetCanteenHeadCountReply { + // 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. + + /// The absolut count of humans in the canteen. Only valid in case percent != -1. + var count: UInt32 = 0 + + /// The maximum nunmber of humans in the canteen for the percent to be 100.00. Only valid in case percent != -1. + var maxCount: UInt32 = 0 + + /// Current capacity utilization of the canteen clamped to 0 and 100 or -1 in case no data is available. + var percent: Float = 0 + + /// A time stamp indicating how up to date the response is. Only valid in case percent != -1. + var timestamp: SwiftProtobuf.Google_Protobuf_Timestamp { + get {return _timestamp ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + set {_timestamp = newValue} + } + /// Returns true if `timestamp` has been explicitly set. + var hasTimestamp: Bool {return self._timestamp != nil} + /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. + mutating func clearTimestamp() {self._timestamp = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _timestamp: SwiftProtobuf.Google_Protobuf_Timestamp? = nil +} + +#if swift(>=5.5) && canImport(_Concurrency) +extension Api_DeviceType: @unchecked Sendable {} +extension Api_RegisterDeviceRequest: @unchecked Sendable {} +extension Api_RegisterDeviceReply: @unchecked Sendable {} +extension Api_RemoveDeviceRequest: @unchecked Sendable {} +extension Api_RemoveDeviceReply: @unchecked Sendable {} +extension Api_IOSDeviceRequestResponseRequest: @unchecked Sendable {} +extension Api_IOSDeviceRequestResponseReply: @unchecked Sendable {} +extension Api_GetRoomScheduleRequest: @unchecked Sendable {} +extension Api_GetRoomScheduleReply: @unchecked Sendable {} +extension Api_GetRoomScheduleReply.RoomScheduleEvent: @unchecked Sendable {} +extension Api_GetRoomCoordinatesRequest: @unchecked Sendable {} +extension Api_GetRoomCoordinatesReply: @unchecked Sendable {} +extension Api_GetRoomMapsRequest: @unchecked Sendable {} +extension Api_GetRoomMapsReply: @unchecked Sendable {} +extension Api_GetRoomMapsReply.Map: @unchecked Sendable {} +extension Api_GetLocationsRequest: @unchecked Sendable {} +extension Api_GetLocationsReply: @unchecked Sendable {} +extension Api_GetLocationsReply.Location: @unchecked Sendable {} +extension Api_SearchRoomsRequest: @unchecked Sendable {} +extension Api_SearchRoomsReply: @unchecked Sendable {} +extension Api_Room: @unchecked Sendable {} +extension Api_NewsSourceArray: @unchecked Sendable {} +extension Api_NewsSource: @unchecked Sendable {} +extension Api_GetTopNewsReply: @unchecked Sendable {} +extension Api_CafeteriaRatingRequest: @unchecked Sendable {} +extension Api_DishRatingRequest: @unchecked Sendable {} +extension Api_CafeteriaRatingReply: @unchecked Sendable {} +extension Api_DishRatingReply: @unchecked Sendable {} +extension Api_SingleRatingReply: @unchecked Sendable {} +extension Api_NewCafeteriaRatingRequest: @unchecked Sendable {} +extension Api_NewDishRatingRequest: @unchecked Sendable {} +extension Api_GetTagsReply: @unchecked Sendable {} +extension Api_TagsOverview: @unchecked Sendable {} +extension Api_RatingTag: @unchecked Sendable {} +extension Api_RatingTagNewRequest: @unchecked Sendable {} +extension Api_RatingTagResult: @unchecked Sendable {} +extension Api_GetCafeteriaReply: @unchecked Sendable {} +extension Api_Cafeteria: @unchecked Sendable {} +extension Api_GetDishesRequest: @unchecked Sendable {} +extension Api_GetDishesReply: @unchecked Sendable {} +extension Api_GetResponsiblePersonReply: @unchecked Sendable {} +extension Api_ResponsiblePersonElement: @unchecked Sendable {} +extension Api_GetBuilding2GpsReply: @unchecked Sendable {} +extension Api_Building2GpsElement: @unchecked Sendable {} +extension Api_GetAreaFacilitiesByBuildingNrReply: @unchecked Sendable {} +extension Api_GetAreaFacilitiesByBuildingNrRequest: @unchecked Sendable {} +extension Api_GetListOfToiletsReply: @unchecked Sendable {} +extension Api_RoomInformationElement: @unchecked Sendable {} +extension Api_GetListOfElevatorsReply: @unchecked Sendable {} +extension Api_GetMoreInformationReply: @unchecked Sendable {} +extension Api_MoreInformationElement: @unchecked Sendable {} +extension Api_GetOpeningTimesRequest: @unchecked Sendable {} +extension Api_GetOpeningTimesReply: @unchecked Sendable {} +extension Api_OpeningTimesMsgElement: @unchecked Sendable {} +extension Api_GetUpdateNoteRequest: @unchecked Sendable {} +extension Api_GetUpdateNoteReply: @unchecked Sendable {} +extension Api_GetStudyRoomListReply: @unchecked Sendable {} +extension Api_StudyRoomMsgElement: @unchecked Sendable {} +extension Api_StudyRoom: @unchecked Sendable {} +extension Api_GetEventListRequest: @unchecked Sendable {} +extension Api_GetEventListReply: @unchecked Sendable {} +extension Api_EventListMsgElement: @unchecked Sendable {} +extension Api_GetKinoRequest: @unchecked Sendable {} +extension Api_GetKinoReply: @unchecked Sendable {} +extension Api_KinoMsgElement: @unchecked Sendable {} +extension Api_SendFeedbackRequest: @unchecked Sendable {} +extension Api_SendFeedbackImageReply: @unchecked Sendable {} +extension Api_SendFeedbackImageRequest: @unchecked Sendable {} +extension Api_GetMembersRequest: @unchecked Sendable {} +extension Api_GetMembersReply: @unchecked Sendable {} +extension Api_GetUploadStatusRequest: @unchecked Sendable {} +extension Api_GetUploadStatusReply: @unchecked Sendable {} +extension Api_GetNotificationsReply: @unchecked Sendable {} +extension Api_NotificationsRequest: @unchecked Sendable {} +extension Api_GetNotificationsConfirmReply: @unchecked Sendable {} +extension Api_GetCanteenHeadCountRequest: @unchecked Sendable {} +extension Api_GetCanteenHeadCountReply: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "api" + +extension Api_DeviceType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "IOS"), + 1: .same(proto: "ANDROID"), + 2: .same(proto: "WINDOWS"), + ] +} + +extension Api_RegisterDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RegisterDeviceRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "deviceId"), + 2: .same(proto: "publicKey"), + 3: .same(proto: "deviceType"), + 4: .same(proto: "campusApiToken"), + ] + + 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.decodeSingularStringField(value: &self.deviceID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self._publicKey) }() + case 3: try { try decoder.decodeSingularEnumField(value: &self.deviceType) }() + case 4: try { try decoder.decodeSingularStringField(value: &self._campusApiToken) }() + default: break + } + } + } + + 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.deviceID.isEmpty { + try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) + } + try { if let v = self._publicKey { + try visitor.visitSingularStringField(value: v, fieldNumber: 2) + } }() + if self.deviceType != .ios { + try visitor.visitSingularEnumField(value: self.deviceType, fieldNumber: 3) + } + try { if let v = self._campusApiToken { + try visitor.visitSingularStringField(value: v, fieldNumber: 4) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RegisterDeviceRequest, rhs: Api_RegisterDeviceRequest) -> Bool { + if lhs.deviceID != rhs.deviceID {return false} + if lhs._publicKey != rhs._publicKey {return false} + if lhs.deviceType != rhs.deviceType {return false} + if lhs._campusApiToken != rhs._campusApiToken {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RegisterDeviceReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RegisterDeviceReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "deviceId"), + ] + + 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.decodeSingularStringField(value: &self.deviceID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.deviceID.isEmpty { + try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RegisterDeviceReply, rhs: Api_RegisterDeviceReply) -> Bool { + if lhs.deviceID != rhs.deviceID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RemoveDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RemoveDeviceRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "deviceId"), + 2: .same(proto: "deviceType"), + ] + + 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.decodeSingularStringField(value: &self.deviceID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.deviceType) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.deviceID.isEmpty { + try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) + } + if self.deviceType != .ios { + try visitor.visitSingularEnumField(value: self.deviceType, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RemoveDeviceRequest, rhs: Api_RemoveDeviceRequest) -> Bool { + if lhs.deviceID != rhs.deviceID {return false} + if lhs.deviceType != rhs.deviceType {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RemoveDeviceReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RemoveDeviceReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "deviceId"), + ] + + 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.decodeSingularStringField(value: &self.deviceID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.deviceID.isEmpty { + try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RemoveDeviceReply, rhs: Api_RemoveDeviceReply) -> Bool { + if lhs.deviceID != rhs.deviceID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_IOSDeviceRequestResponseRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".IOSDeviceRequestResponseRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "requestId"), + 2: .same(proto: "payload"), + ] + + 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.decodeSingularStringField(value: &self.requestID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.payload) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.requestID.isEmpty { + try visitor.visitSingularStringField(value: self.requestID, fieldNumber: 1) + } + if !self.payload.isEmpty { + try visitor.visitSingularStringField(value: self.payload, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_IOSDeviceRequestResponseRequest, rhs: Api_IOSDeviceRequestResponseRequest) -> Bool { + if lhs.requestID != rhs.requestID {return false} + if lhs.payload != rhs.payload {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_IOSDeviceRequestResponseReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".IOSDeviceRequestResponseReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "message"), + ] + + 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.decodeSingularStringField(value: &self.message) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_IOSDeviceRequestResponseReply, rhs: Api_IOSDeviceRequestResponseReply) -> Bool { + if lhs.message != rhs.message {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomScheduleRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomScheduleRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "room"), + 2: .same(proto: "start"), + 3: .same(proto: "end"), + ] + + 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.decodeSingularInt32Field(value: &self.room) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._start) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._end) }() + default: break + } + } + } + + 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.room != 0 { + try visitor.visitSingularInt32Field(value: self.room, fieldNumber: 1) + } + try { if let v = self._start { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try { if let v = self._end { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomScheduleRequest, rhs: Api_GetRoomScheduleRequest) -> Bool { + if lhs.room != rhs.room {return false} + if lhs._start != rhs._start {return false} + if lhs._end != rhs._end {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomScheduleReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomScheduleReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "events"), + ] + + 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.events) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.events.isEmpty { + try visitor.visitRepeatedMessageField(value: self.events, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomScheduleReply, rhs: Api_GetRoomScheduleReply) -> Bool { + if lhs.events != rhs.events {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomScheduleReply.RoomScheduleEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Api_GetRoomScheduleReply.protoMessageName + ".RoomScheduleEvent" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "start"), + 2: .same(proto: "end"), + 3: .same(proto: "title"), + 4: .standard(proto: "event_id"), + 5: .standard(proto: "course_code"), + ] + + 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.decodeSingularMessageField(value: &self._start) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._end) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.title) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.eventID) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.courseCode) }() + default: break + } + } + } + + 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 + try { if let v = self._start { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try { if let v = self._end { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + if !self.title.isEmpty { + try visitor.visitSingularStringField(value: self.title, fieldNumber: 3) + } + if self.eventID != 0 { + try visitor.visitSingularInt32Field(value: self.eventID, fieldNumber: 4) + } + if !self.courseCode.isEmpty { + try visitor.visitSingularStringField(value: self.courseCode, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomScheduleReply.RoomScheduleEvent, rhs: Api_GetRoomScheduleReply.RoomScheduleEvent) -> Bool { + if lhs._start != rhs._start {return false} + if lhs._end != rhs._end {return false} + if lhs.title != rhs.title {return false} + if lhs.eventID != rhs.eventID {return false} + if lhs.courseCode != rhs.courseCode {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomCoordinatesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomCoordinatesRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "arch_id"), + ] + + 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.decodeSingularStringField(value: &self.archID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.archID.isEmpty { + try visitor.visitSingularStringField(value: self.archID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomCoordinatesRequest, rhs: Api_GetRoomCoordinatesRequest) -> Bool { + if lhs.archID != rhs.archID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomCoordinatesReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomCoordinatesReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "utm_zone"), + 2: .standard(proto: "utm_easting"), + 3: .standard(proto: "utm_northing"), + ] + + 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.decodeSingularStringField(value: &self.utmZone) }() + case 2: try { try decoder.decodeSingularFloatField(value: &self.utmEasting) }() + case 3: try { try decoder.decodeSingularFloatField(value: &self.utmNorthing) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.utmZone.isEmpty { + try visitor.visitSingularStringField(value: self.utmZone, fieldNumber: 1) + } + if self.utmEasting != 0 { + try visitor.visitSingularFloatField(value: self.utmEasting, fieldNumber: 2) + } + if self.utmNorthing != 0 { + try visitor.visitSingularFloatField(value: self.utmNorthing, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomCoordinatesReply, rhs: Api_GetRoomCoordinatesReply) -> Bool { + if lhs.utmZone != rhs.utmZone {return false} + if lhs.utmEasting != rhs.utmEasting {return false} + if lhs.utmNorthing != rhs.utmNorthing {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomMapsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomMapsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "arch_id"), + ] + + 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.decodeSingularStringField(value: &self.archID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.archID.isEmpty { + try visitor.visitSingularStringField(value: self.archID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomMapsRequest, rhs: Api_GetRoomMapsRequest) -> Bool { + if lhs.archID != rhs.archID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomMapsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRoomMapsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "maps"), + ] + + 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.maps) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.maps.isEmpty { + try visitor.visitRepeatedMessageField(value: self.maps, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomMapsReply, rhs: Api_GetRoomMapsReply) -> Bool { + if lhs.maps != rhs.maps {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetRoomMapsReply.Map: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Api_GetRoomMapsReply.protoMessageName + ".Map" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "map_id"), + 2: .same(proto: "description"), + 3: .same(proto: "scale"), + 4: .same(proto: "width"), + 5: .same(proto: "height"), + ] + + 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.decodeSingularInt64Field(value: &self.mapID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.scale) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.width) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.height) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.mapID != 0 { + try visitor.visitSingularInt64Field(value: self.mapID, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + if self.scale != 0 { + try visitor.visitSingularInt64Field(value: self.scale, fieldNumber: 3) + } + if self.width != 0 { + try visitor.visitSingularInt64Field(value: self.width, fieldNumber: 4) + } + if self.height != 0 { + try visitor.visitSingularInt64Field(value: self.height, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetRoomMapsReply.Map, rhs: Api_GetRoomMapsReply.Map) -> Bool { + if lhs.mapID != rhs.mapID {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs.scale != rhs.scale {return false} + if lhs.width != rhs.width {return false} + if lhs.height != rhs.height {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetLocationsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetLocationsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "location"), + ] + + 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.decodeSingularStringField(value: &self.location) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.location.isEmpty { + try visitor.visitSingularStringField(value: self.location, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetLocationsRequest, rhs: Api_GetLocationsRequest) -> Bool { + if lhs.location != rhs.location {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetLocationsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetLocationsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "locations"), + ] + + 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.locations) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.locations.isEmpty { + try visitor.visitRepeatedMessageField(value: self.locations, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetLocationsReply, rhs: Api_GetLocationsReply) -> Bool { + if lhs.locations != rhs.locations {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetLocationsReply.Location: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Api_GetLocationsReply.protoMessageName + ".Location" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "location"), + 2: .same(proto: "name"), + 3: .same(proto: "lon"), + 4: .same(proto: "lat"), + 5: .same(proto: "radius"), + ] + + 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.decodeSingularStringField(value: &self.location) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.lon) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.lat) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.radius) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.location.isEmpty { + try visitor.visitSingularStringField(value: self.location, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if !self.lon.isEmpty { + try visitor.visitSingularStringField(value: self.lon, fieldNumber: 3) + } + if !self.lat.isEmpty { + try visitor.visitSingularStringField(value: self.lat, fieldNumber: 4) + } + if !self.radius.isEmpty { + try visitor.visitSingularStringField(value: self.radius, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetLocationsReply.Location, rhs: Api_GetLocationsReply.Location) -> Bool { + if lhs.location != rhs.location {return false} + if lhs.name != rhs.name {return false} + if lhs.lon != rhs.lon {return false} + if lhs.lat != rhs.lat {return false} + if lhs.radius != rhs.radius {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SearchRoomsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SearchRoomsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "query"), + ] + + 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.decodeSingularStringField(value: &self.query) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.query.isEmpty { + try visitor.visitSingularStringField(value: self.query, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SearchRoomsRequest, rhs: Api_SearchRoomsRequest) -> Bool { + if lhs.query != rhs.query {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SearchRoomsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SearchRoomsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "rooms"), + ] + + 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.rooms) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rooms.isEmpty { + try visitor.visitRepeatedMessageField(value: self.rooms, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SearchRoomsReply, rhs: Api_SearchRoomsReply) -> Bool { + if lhs.rooms != rhs.rooms {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_Room: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Room" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "roomId"), + 2: .standard(proto: "room_code"), + 3: .standard(proto: "building_nr"), + 4: .standard(proto: "arch_id"), + 5: .same(proto: "info"), + 6: .same(proto: "address"), + 7: .same(proto: "purpose"), + 8: .same(proto: "campus"), + 9: .same(proto: "name"), + ] + + 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.decodeSingularInt32Field(value: &self.roomID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.roomCode) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.buildingNr) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.archID) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.info) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.purpose) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.campus) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.name) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.roomID != 0 { + try visitor.visitSingularInt32Field(value: self.roomID, fieldNumber: 1) + } + if !self.roomCode.isEmpty { + try visitor.visitSingularStringField(value: self.roomCode, fieldNumber: 2) + } + if !self.buildingNr.isEmpty { + try visitor.visitSingularStringField(value: self.buildingNr, fieldNumber: 3) + } + if !self.archID.isEmpty { + try visitor.visitSingularStringField(value: self.archID, fieldNumber: 4) + } + if !self.info.isEmpty { + try visitor.visitSingularStringField(value: self.info, fieldNumber: 5) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 6) + } + if !self.purpose.isEmpty { + try visitor.visitSingularStringField(value: self.purpose, fieldNumber: 7) + } + if !self.campus.isEmpty { + try visitor.visitSingularStringField(value: self.campus, fieldNumber: 8) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_Room, rhs: Api_Room) -> Bool { + if lhs.roomID != rhs.roomID {return false} + if lhs.roomCode != rhs.roomCode {return false} + if lhs.buildingNr != rhs.buildingNr {return false} + if lhs.archID != rhs.archID {return false} + if lhs.info != rhs.info {return false} + if lhs.address != rhs.address {return false} + if lhs.purpose != rhs.purpose {return false} + if lhs.campus != rhs.campus {return false} + if lhs.name != rhs.name {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_NewsSourceArray: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewsSourceArray" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "sources"), + ] + + 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.sources) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.sources.isEmpty { + try visitor.visitRepeatedMessageField(value: self.sources, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_NewsSourceArray, rhs: Api_NewsSourceArray) -> Bool { + if lhs.sources != rhs.sources {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_NewsSource: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewsSource" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "source"), + 2: .same(proto: "title"), + 3: .same(proto: "icon"), + ] + + 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.decodeSingularStringField(value: &self.source) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.title) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.icon) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.source.isEmpty { + try visitor.visitSingularStringField(value: self.source, fieldNumber: 1) + } + if !self.title.isEmpty { + try visitor.visitSingularStringField(value: self.title, fieldNumber: 2) + } + if !self.icon.isEmpty { + try visitor.visitSingularStringField(value: self.icon, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_NewsSource, rhs: Api_NewsSource) -> Bool { + if lhs.source != rhs.source {return false} + if lhs.title != rhs.title {return false} + if lhs.icon != rhs.icon {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetTopNewsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetTopNewsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "image_url"), + 2: .same(proto: "link"), + 3: .same(proto: "created"), + 4: .same(proto: "from"), + 5: .same(proto: "to"), + ] + + 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.decodeSingularStringField(value: &self.imageURL) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.link) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._created) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._from) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._to) }() + default: break + } + } + } + + 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.imageURL.isEmpty { + try visitor.visitSingularStringField(value: self.imageURL, fieldNumber: 1) + } + if !self.link.isEmpty { + try visitor.visitSingularStringField(value: self.link, fieldNumber: 2) + } + try { if let v = self._created { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._from { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = self._to { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetTopNewsReply, rhs: Api_GetTopNewsReply) -> Bool { + if lhs.imageURL != rhs.imageURL {return false} + if lhs.link != rhs.link {return false} + if lhs._created != rhs._created {return false} + if lhs._from != rhs._from {return false} + if lhs._to != rhs._to {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_CafeteriaRatingRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".CafeteriaRatingRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "cafeteriaId"), + 2: .same(proto: "from"), + 3: .same(proto: "to"), + 4: .same(proto: "limit"), + ] + + 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.decodeSingularStringField(value: &self.cafeteriaID) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._from) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._to) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.limit) }() + default: break + } + } + } + + 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.cafeteriaID.isEmpty { + try visitor.visitSingularStringField(value: self.cafeteriaID, fieldNumber: 1) + } + try { if let v = self._from { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try { if let v = self._to { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + if self.limit != 0 { + try visitor.visitSingularInt32Field(value: self.limit, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_CafeteriaRatingRequest, rhs: Api_CafeteriaRatingRequest) -> Bool { + if lhs.cafeteriaID != rhs.cafeteriaID {return false} + if lhs._from != rhs._from {return false} + if lhs._to != rhs._to {return false} + if lhs.limit != rhs.limit {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_DishRatingRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DishRatingRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "cafeteriaId"), + 2: .same(proto: "dish"), + 3: .same(proto: "from"), + 4: .same(proto: "to"), + 5: .same(proto: "limit"), + ] + + 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.decodeSingularStringField(value: &self.cafeteriaID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.dish) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._from) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._to) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.limit) }() + default: break + } + } + } + + 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.cafeteriaID.isEmpty { + try visitor.visitSingularStringField(value: self.cafeteriaID, fieldNumber: 1) + } + if !self.dish.isEmpty { + try visitor.visitSingularStringField(value: self.dish, fieldNumber: 2) + } + try { if let v = self._from { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = self._to { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + if self.limit != 0 { + try visitor.visitSingularInt32Field(value: self.limit, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_DishRatingRequest, rhs: Api_DishRatingRequest) -> Bool { + if lhs.cafeteriaID != rhs.cafeteriaID {return false} + if lhs.dish != rhs.dish {return false} + if lhs._from != rhs._from {return false} + if lhs._to != rhs._to {return false} + if lhs.limit != rhs.limit {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_CafeteriaRatingReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".CafeteriaRatingReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "rating"), + 2: .same(proto: "avg"), + 3: .same(proto: "std"), + 4: .same(proto: "min"), + 5: .same(proto: "max"), + 6: .same(proto: "ratingTags"), + ] + + 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.rating) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.avg) }() + case 3: try { try decoder.decodeSingularDoubleField(value: &self.std) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.min) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.max) }() + case 6: try { try decoder.decodeRepeatedMessageField(value: &self.ratingTags) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rating.isEmpty { + try visitor.visitRepeatedMessageField(value: self.rating, fieldNumber: 1) + } + if self.avg != 0 { + try visitor.visitSingularDoubleField(value: self.avg, fieldNumber: 2) + } + if self.std != 0 { + try visitor.visitSingularDoubleField(value: self.std, fieldNumber: 3) + } + if self.min != 0 { + try visitor.visitSingularInt32Field(value: self.min, fieldNumber: 4) + } + if self.max != 0 { + try visitor.visitSingularInt32Field(value: self.max, fieldNumber: 5) + } + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_CafeteriaRatingReply, rhs: Api_CafeteriaRatingReply) -> Bool { + if lhs.rating != rhs.rating {return false} + if lhs.avg != rhs.avg {return false} + if lhs.std != rhs.std {return false} + if lhs.min != rhs.min {return false} + if lhs.max != rhs.max {return false} + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_DishRatingReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DishRatingReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "rating"), + 2: .same(proto: "avg"), + 3: .same(proto: "std"), + 4: .same(proto: "min"), + 5: .same(proto: "max"), + 6: .same(proto: "ratingTags"), + 7: .same(proto: "nameTags"), + ] + + 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.rating) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.avg) }() + case 3: try { try decoder.decodeSingularDoubleField(value: &self.std) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.min) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.max) }() + case 6: try { try decoder.decodeRepeatedMessageField(value: &self.ratingTags) }() + case 7: try { try decoder.decodeRepeatedMessageField(value: &self.nameTags) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rating.isEmpty { + try visitor.visitRepeatedMessageField(value: self.rating, fieldNumber: 1) + } + if self.avg != 0 { + try visitor.visitSingularDoubleField(value: self.avg, fieldNumber: 2) + } + if self.std != 0 { + try visitor.visitSingularDoubleField(value: self.std, fieldNumber: 3) + } + if self.min != 0 { + try visitor.visitSingularInt32Field(value: self.min, fieldNumber: 4) + } + if self.max != 0 { + try visitor.visitSingularInt32Field(value: self.max, fieldNumber: 5) + } + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 6) + } + if !self.nameTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.nameTags, fieldNumber: 7) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_DishRatingReply, rhs: Api_DishRatingReply) -> Bool { + if lhs.rating != rhs.rating {return false} + if lhs.avg != rhs.avg {return false} + if lhs.std != rhs.std {return false} + if lhs.min != rhs.min {return false} + if lhs.max != rhs.max {return false} + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs.nameTags != rhs.nameTags {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SingleRatingReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SingleRatingReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "points"), + 2: .same(proto: "image"), + 3: .same(proto: "comment"), + 4: .same(proto: "ratingTags"), + 5: .same(proto: "visited"), + ] + + 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.decodeSingularInt32Field(value: &self.points) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.image) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.comment) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.ratingTags) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._visited) }() + default: break + } + } + } + + 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.points != 0 { + try visitor.visitSingularInt32Field(value: self.points, fieldNumber: 1) + } + if !self.image.isEmpty { + try visitor.visitSingularBytesField(value: self.image, fieldNumber: 2) + } + if !self.comment.isEmpty { + try visitor.visitSingularStringField(value: self.comment, fieldNumber: 3) + } + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 4) + } + try { if let v = self._visited { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SingleRatingReply, rhs: Api_SingleRatingReply) -> Bool { + if lhs.points != rhs.points {return false} + if lhs.image != rhs.image {return false} + if lhs.comment != rhs.comment {return false} + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs._visited != rhs._visited {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_NewCafeteriaRatingRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewCafeteriaRatingRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "points"), + 2: .same(proto: "cafeteriaId"), + 3: .same(proto: "image"), + 4: .same(proto: "ratingTags"), + 6: .same(proto: "comment"), + ] + + 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.decodeSingularInt32Field(value: &self.points) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.cafeteriaID) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.image) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.ratingTags) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.comment) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.points != 0 { + try visitor.visitSingularInt32Field(value: self.points, fieldNumber: 1) + } + if !self.cafeteriaID.isEmpty { + try visitor.visitSingularStringField(value: self.cafeteriaID, fieldNumber: 2) + } + if !self.image.isEmpty { + try visitor.visitSingularBytesField(value: self.image, fieldNumber: 3) + } + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 4) + } + if !self.comment.isEmpty { + try visitor.visitSingularStringField(value: self.comment, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_NewCafeteriaRatingRequest, rhs: Api_NewCafeteriaRatingRequest) -> Bool { + if lhs.points != rhs.points {return false} + if lhs.cafeteriaID != rhs.cafeteriaID {return false} + if lhs.image != rhs.image {return false} + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs.comment != rhs.comment {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_NewDishRatingRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewDishRatingRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "points"), + 2: .same(proto: "cafeteriaId"), + 3: .same(proto: "dish"), + 4: .same(proto: "image"), + 5: .same(proto: "ratingTags"), + 7: .same(proto: "comment"), + ] + + 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.decodeSingularInt32Field(value: &self.points) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.cafeteriaID) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.dish) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self.image) }() + case 5: try { try decoder.decodeRepeatedMessageField(value: &self.ratingTags) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.comment) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.points != 0 { + try visitor.visitSingularInt32Field(value: self.points, fieldNumber: 1) + } + if !self.cafeteriaID.isEmpty { + try visitor.visitSingularStringField(value: self.cafeteriaID, fieldNumber: 2) + } + if !self.dish.isEmpty { + try visitor.visitSingularStringField(value: self.dish, fieldNumber: 3) + } + if !self.image.isEmpty { + try visitor.visitSingularBytesField(value: self.image, fieldNumber: 4) + } + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 5) + } + if !self.comment.isEmpty { + try visitor.visitSingularStringField(value: self.comment, fieldNumber: 7) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_NewDishRatingRequest, rhs: Api_NewDishRatingRequest) -> Bool { + if lhs.points != rhs.points {return false} + if lhs.cafeteriaID != rhs.cafeteriaID {return false} + if lhs.dish != rhs.dish {return false} + if lhs.image != rhs.image {return false} + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs.comment != rhs.comment {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetTagsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetTagsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "ratingTags"), + ] + + 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.ratingTags) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.ratingTags.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ratingTags, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetTagsReply, rhs: Api_GetTagsReply) -> Bool { + if lhs.ratingTags != rhs.ratingTags {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_TagsOverview: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".TagsOverview" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tagId"), + 2: .same(proto: "de"), + 3: .same(proto: "en"), + ] + + 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.decodeSingularInt32Field(value: &self.tagID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.de) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.en) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.tagID != 0 { + try visitor.visitSingularInt32Field(value: self.tagID, fieldNumber: 1) + } + if !self.de.isEmpty { + try visitor.visitSingularStringField(value: self.de, fieldNumber: 2) + } + if !self.en.isEmpty { + try visitor.visitSingularStringField(value: self.en, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_TagsOverview, rhs: Api_TagsOverview) -> Bool { + if lhs.tagID != rhs.tagID {return false} + if lhs.de != rhs.de {return false} + if lhs.en != rhs.en {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RatingTag: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RatingTag" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tagId"), + 2: .same(proto: "points"), + ] + + 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.decodeSingularInt32Field(value: &self.tagID) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.points) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.tagID != 0 { + try visitor.visitSingularInt32Field(value: self.tagID, fieldNumber: 1) + } + if self.points != 0 { + try visitor.visitSingularDoubleField(value: self.points, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RatingTag, rhs: Api_RatingTag) -> Bool { + if lhs.tagID != rhs.tagID {return false} + if lhs.points != rhs.points {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RatingTagNewRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RatingTagNewRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tagId"), + 2: .same(proto: "points"), + ] + + 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.decodeSingularInt32Field(value: &self.tagID) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.points) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.tagID != 0 { + try visitor.visitSingularInt32Field(value: self.tagID, fieldNumber: 1) + } + if self.points != 0 { + try visitor.visitSingularInt32Field(value: self.points, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RatingTagNewRequest, rhs: Api_RatingTagNewRequest) -> Bool { + if lhs.tagID != rhs.tagID {return false} + if lhs.points != rhs.points {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RatingTagResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RatingTagResult" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tagId"), + 2: .same(proto: "avg"), + 3: .same(proto: "std"), + 4: .same(proto: "min"), + 5: .same(proto: "max"), + ] + + 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.decodeSingularInt32Field(value: &self.tagID) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.avg) }() + case 3: try { try decoder.decodeSingularDoubleField(value: &self.std) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.min) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.max) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.tagID != 0 { + try visitor.visitSingularInt32Field(value: self.tagID, fieldNumber: 1) + } + if self.avg != 0 { + try visitor.visitSingularDoubleField(value: self.avg, fieldNumber: 2) + } + if self.std != 0 { + try visitor.visitSingularDoubleField(value: self.std, fieldNumber: 3) + } + if self.min != 0 { + try visitor.visitSingularInt32Field(value: self.min, fieldNumber: 4) + } + if self.max != 0 { + try visitor.visitSingularInt32Field(value: self.max, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RatingTagResult, rhs: Api_RatingTagResult) -> Bool { + if lhs.tagID != rhs.tagID {return false} + if lhs.avg != rhs.avg {return false} + if lhs.std != rhs.std {return false} + if lhs.min != rhs.min {return false} + if lhs.max != rhs.max {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetCafeteriaReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetCafeteriaReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "cafeteria"), + ] + + 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.cafeteria) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.cafeteria.isEmpty { + try visitor.visitRepeatedMessageField(value: self.cafeteria, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetCafeteriaReply, rhs: Api_GetCafeteriaReply) -> Bool { + if lhs.cafeteria != rhs.cafeteria {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_Cafeteria: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Cafeteria" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "address"), + 3: .same(proto: "longitude"), + 4: .same(proto: "latitude"), + ] + + 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.decodeSingularStringField(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 3: try { try decoder.decodeSingularDoubleField(value: &self.longitude) }() + case 4: try { try decoder.decodeSingularDoubleField(value: &self.latitude) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.id.isEmpty { + try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 2) + } + if self.longitude != 0 { + try visitor.visitSingularDoubleField(value: self.longitude, fieldNumber: 3) + } + if self.latitude != 0 { + try visitor.visitSingularDoubleField(value: self.latitude, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_Cafeteria, rhs: Api_Cafeteria) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.address != rhs.address {return false} + if lhs.longitude != rhs.longitude {return false} + if lhs.latitude != rhs.latitude {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetDishesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetDishesRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "cafeteriaId"), + 2: .same(proto: "year"), + 3: .same(proto: "week"), + 4: .same(proto: "day"), + ] + + 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.decodeSingularStringField(value: &self.cafeteriaID) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.year) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.week) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.day) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.cafeteriaID.isEmpty { + try visitor.visitSingularStringField(value: self.cafeteriaID, fieldNumber: 1) + } + if self.year != 0 { + try visitor.visitSingularInt32Field(value: self.year, fieldNumber: 2) + } + if self.week != 0 { + try visitor.visitSingularInt32Field(value: self.week, fieldNumber: 3) + } + if self.day != 0 { + try visitor.visitSingularInt32Field(value: self.day, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetDishesRequest, rhs: Api_GetDishesRequest) -> Bool { + if lhs.cafeteriaID != rhs.cafeteriaID {return false} + if lhs.year != rhs.year {return false} + if lhs.week != rhs.week {return false} + if lhs.day != rhs.day {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetDishesReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetDishesReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "dish"), + ] + + 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.decodeRepeatedStringField(value: &self.dish) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.dish.isEmpty { + try visitor.visitRepeatedStringField(value: self.dish, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetDishesReply, rhs: Api_GetDishesReply) -> Bool { + if lhs.dish != rhs.dish {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetResponsiblePersonReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetResponsiblePersonReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "responsiblePerson"), + ] + + 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.responsiblePerson) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.responsiblePerson.isEmpty { + try visitor.visitRepeatedMessageField(value: self.responsiblePerson, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetResponsiblePersonReply, rhs: Api_GetResponsiblePersonReply) -> Bool { + if lhs.responsiblePerson != rhs.responsiblePerson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_ResponsiblePersonElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ResponsiblePersonElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "telephone"), + 3: .same(proto: "email"), + 4: .same(proto: "faculty"), + 5: .same(proto: "tumID"), + ] + + 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.decodeSingularStringField(value: &self.name) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.telephone) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.email) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.faculty) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.tumID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.telephone.isEmpty { + try visitor.visitSingularStringField(value: self.telephone, fieldNumber: 2) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 3) + } + if !self.faculty.isEmpty { + try visitor.visitSingularStringField(value: self.faculty, fieldNumber: 4) + } + if !self.tumID.isEmpty { + try visitor.visitSingularStringField(value: self.tumID, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_ResponsiblePersonElement, rhs: Api_ResponsiblePersonElement) -> Bool { + if lhs.name != rhs.name {return false} + if lhs.telephone != rhs.telephone {return false} + if lhs.email != rhs.email {return false} + if lhs.faculty != rhs.faculty {return false} + if lhs.tumID != rhs.tumID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetBuilding2GpsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetBuilding2GpsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "building2Gps"), + ] + + 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.building2Gps) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.building2Gps.isEmpty { + try visitor.visitRepeatedMessageField(value: self.building2Gps, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetBuilding2GpsReply, rhs: Api_GetBuilding2GpsReply) -> Bool { + if lhs.building2Gps != rhs.building2Gps {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_Building2GpsElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Building2GpsElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "latitude"), + 3: .same(proto: "longitude"), + ] + + 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.decodeSingularStringField(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.latitude) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.longitude) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.id.isEmpty { + try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) + } + if !self.latitude.isEmpty { + try visitor.visitSingularStringField(value: self.latitude, fieldNumber: 2) + } + if !self.longitude.isEmpty { + try visitor.visitSingularStringField(value: self.longitude, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_Building2GpsElement, rhs: Api_Building2GpsElement) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.latitude != rhs.latitude {return false} + if lhs.longitude != rhs.longitude {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetAreaFacilitiesByBuildingNrReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetAreaFacilitiesByBuildingNrReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "areaFacilitiesByBuildingNr"), + ] + + 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.areaFacilitiesByBuildingNr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.areaFacilitiesByBuildingNr.isEmpty { + try visitor.visitRepeatedMessageField(value: self.areaFacilitiesByBuildingNr, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetAreaFacilitiesByBuildingNrReply, rhs: Api_GetAreaFacilitiesByBuildingNrReply) -> Bool { + if lhs.areaFacilitiesByBuildingNr != rhs.areaFacilitiesByBuildingNr {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetAreaFacilitiesByBuildingNrRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetAreaFacilitiesByBuildingNrRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "building_nr"), + ] + + 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.decodeSingularStringField(value: &self.buildingNr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.buildingNr.isEmpty { + try visitor.visitSingularStringField(value: self.buildingNr, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetAreaFacilitiesByBuildingNrRequest, rhs: Api_GetAreaFacilitiesByBuildingNrRequest) -> Bool { + if lhs.buildingNr != rhs.buildingNr {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetListOfToiletsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetListOfToiletsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "listOfToilets"), + ] + + 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.listOfToilets) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.listOfToilets.isEmpty { + try visitor.visitRepeatedMessageField(value: self.listOfToilets, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetListOfToiletsReply, rhs: Api_GetListOfToiletsReply) -> Bool { + if lhs.listOfToilets != rhs.listOfToilets {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_RoomInformationElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RoomInformationElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "roomId"), + 2: .standard(proto: "room_code"), + 3: .standard(proto: "building_nr"), + 4: .standard(proto: "arch_id"), + 5: .same(proto: "info"), + 6: .same(proto: "address"), + 7: .same(proto: "purpose"), + 8: .same(proto: "campus"), + 9: .same(proto: "name"), + ] + + 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.decodeSingularInt32Field(value: &self.roomID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.roomCode) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.buildingNr) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.archID) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.info) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.purpose) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.campus) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.name) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.roomID != 0 { + try visitor.visitSingularInt32Field(value: self.roomID, fieldNumber: 1) + } + if !self.roomCode.isEmpty { + try visitor.visitSingularStringField(value: self.roomCode, fieldNumber: 2) + } + if !self.buildingNr.isEmpty { + try visitor.visitSingularStringField(value: self.buildingNr, fieldNumber: 3) + } + if !self.archID.isEmpty { + try visitor.visitSingularStringField(value: self.archID, fieldNumber: 4) + } + if !self.info.isEmpty { + try visitor.visitSingularStringField(value: self.info, fieldNumber: 5) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 6) + } + if !self.purpose.isEmpty { + try visitor.visitSingularStringField(value: self.purpose, fieldNumber: 7) + } + if !self.campus.isEmpty { + try visitor.visitSingularStringField(value: self.campus, fieldNumber: 8) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_RoomInformationElement, rhs: Api_RoomInformationElement) -> Bool { + if lhs.roomID != rhs.roomID {return false} + if lhs.roomCode != rhs.roomCode {return false} + if lhs.buildingNr != rhs.buildingNr {return false} + if lhs.archID != rhs.archID {return false} + if lhs.info != rhs.info {return false} + if lhs.address != rhs.address {return false} + if lhs.purpose != rhs.purpose {return false} + if lhs.campus != rhs.campus {return false} + if lhs.name != rhs.name {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetListOfElevatorsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetListOfElevatorsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "listOfElevators"), + ] + + 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.listOfElevators) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.listOfElevators.isEmpty { + try visitor.visitRepeatedMessageField(value: self.listOfElevators, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetListOfElevatorsReply, rhs: Api_GetListOfElevatorsReply) -> Bool { + if lhs.listOfElevators != rhs.listOfElevators {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetMoreInformationReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetMoreInformationReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "information"), + ] + + 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.information) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.information.isEmpty { + try visitor.visitRepeatedMessageField(value: self.information, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetMoreInformationReply, rhs: Api_GetMoreInformationReply) -> Bool { + if lhs.information != rhs.information {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_MoreInformationElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MoreInformationElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "title"), + 2: .same(proto: "category"), + 3: .same(proto: "url"), + ] + + 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.decodeSingularStringField(value: &self.title) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.category) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.url) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.title.isEmpty { + try visitor.visitSingularStringField(value: self.title, fieldNumber: 1) + } + if !self.category.isEmpty { + try visitor.visitSingularStringField(value: self.category, fieldNumber: 2) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_MoreInformationElement, rhs: Api_MoreInformationElement) -> Bool { + if lhs.title != rhs.title {return false} + if lhs.category != rhs.category {return false} + if lhs.url != rhs.url {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetOpeningTimesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetOpeningTimesRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "language"), + ] + + 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.decodeSingularStringField(value: &self.language) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.language.isEmpty { + try visitor.visitSingularStringField(value: self.language, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetOpeningTimesRequest, rhs: Api_GetOpeningTimesRequest) -> Bool { + if lhs.language != rhs.language {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetOpeningTimesReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetOpeningTimesReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "facilities"), + ] + + 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.facilities) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.facilities.isEmpty { + try visitor.visitRepeatedMessageField(value: self.facilities, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetOpeningTimesReply, rhs: Api_GetOpeningTimesReply) -> Bool { + if lhs.facilities != rhs.facilities {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_OpeningTimesMsgElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".OpeningTimesMsgElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "category"), + 3: .same(proto: "name"), + 4: .same(proto: "address"), + 5: .same(proto: "room"), + 6: .standard(proto: "transport_station"), + 7: .standard(proto: "opening_hours"), + 8: .same(proto: "infos"), + 9: .same(proto: "url"), + 10: .same(proto: "language"), + 11: .standard(proto: "reference_id"), + ] + + 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.decodeSingularInt32Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.category) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.room) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.transportStation) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.openingHours) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.infos) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.url) }() + case 10: try { try decoder.decodeSingularStringField(value: &self.language) }() + case 11: try { try decoder.decodeSingularInt32Field(value: &self.referenceID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.id != 0 { + try visitor.visitSingularInt32Field(value: self.id, fieldNumber: 1) + } + if !self.category.isEmpty { + try visitor.visitSingularStringField(value: self.category, fieldNumber: 2) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 3) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 4) + } + if !self.room.isEmpty { + try visitor.visitSingularStringField(value: self.room, fieldNumber: 5) + } + if !self.transportStation.isEmpty { + try visitor.visitSingularStringField(value: self.transportStation, fieldNumber: 6) + } + if !self.openingHours.isEmpty { + try visitor.visitSingularStringField(value: self.openingHours, fieldNumber: 7) + } + if !self.infos.isEmpty { + try visitor.visitSingularStringField(value: self.infos, fieldNumber: 8) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 9) + } + if !self.language.isEmpty { + try visitor.visitSingularStringField(value: self.language, fieldNumber: 10) + } + if self.referenceID != 0 { + try visitor.visitSingularInt32Field(value: self.referenceID, fieldNumber: 11) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_OpeningTimesMsgElement, rhs: Api_OpeningTimesMsgElement) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.category != rhs.category {return false} + if lhs.name != rhs.name {return false} + if lhs.address != rhs.address {return false} + if lhs.room != rhs.room {return false} + if lhs.transportStation != rhs.transportStation {return false} + if lhs.openingHours != rhs.openingHours {return false} + if lhs.infos != rhs.infos {return false} + if lhs.url != rhs.url {return false} + if lhs.language != rhs.language {return false} + if lhs.referenceID != rhs.referenceID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetUpdateNoteRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetUpdateNoteRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "version"), + ] + + 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.decodeSingularInt32Field(value: &self.version) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.version != 0 { + try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetUpdateNoteRequest, rhs: Api_GetUpdateNoteRequest) -> Bool { + if lhs.version != rhs.version {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetUpdateNoteReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetUpdateNoteReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "message"), + ] + + 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.decodeSingularStringField(value: &self.message) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetUpdateNoteReply, rhs: Api_GetUpdateNoteReply) -> Bool { + if lhs.message != rhs.message {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetStudyRoomListReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetStudyRoomListReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "rooms"), + ] + + 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.rooms) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rooms.isEmpty { + try visitor.visitRepeatedMessageField(value: self.rooms, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetStudyRoomListReply, rhs: Api_GetStudyRoomListReply) -> Bool { + if lhs.rooms != rhs.rooms {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_StudyRoomMsgElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StudyRoomMsgElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "name"), + 3: .same(proto: "details"), + 4: .same(proto: "rooms"), + ] + + 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.decodeSingularInt32Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.details) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.rooms) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.id != 0 { + try visitor.visitSingularInt32Field(value: self.id, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if !self.details.isEmpty { + try visitor.visitSingularStringField(value: self.details, fieldNumber: 3) + } + if !self.rooms.isEmpty { + try visitor.visitRepeatedMessageField(value: self.rooms, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_StudyRoomMsgElement, rhs: Api_StudyRoomMsgElement) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.name != rhs.name {return false} + if lhs.details != rhs.details {return false} + if lhs.rooms != rhs.rooms {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_StudyRoom: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StudyRoom" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "group_id"), + 2: .same(proto: "roomId"), + 3: .standard(proto: "room_code"), + 4: .standard(proto: "room_name"), + 5: .standard(proto: "building_name"), + ] + + 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.decodeSingularInt32Field(value: &self.groupID) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.roomID) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.roomCode) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.roomName) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.buildingName) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.groupID != 0 { + try visitor.visitSingularInt32Field(value: self.groupID, fieldNumber: 1) + } + if self.roomID != 0 { + try visitor.visitSingularInt32Field(value: self.roomID, fieldNumber: 2) + } + if !self.roomCode.isEmpty { + try visitor.visitSingularStringField(value: self.roomCode, fieldNumber: 3) + } + if !self.roomName.isEmpty { + try visitor.visitSingularStringField(value: self.roomName, fieldNumber: 4) + } + if !self.buildingName.isEmpty { + try visitor.visitSingularStringField(value: self.buildingName, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_StudyRoom, rhs: Api_StudyRoom) -> Bool { + if lhs.groupID != rhs.groupID {return false} + if lhs.roomID != rhs.roomID {return false} + if lhs.roomCode != rhs.roomCode {return false} + if lhs.roomName != rhs.roomName {return false} + if lhs.buildingName != rhs.buildingName {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetEventListRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetEventListRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "eventId"), + ] + + 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.decodeSingularInt32Field(value: &self.eventID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.eventID != 0 { + try visitor.visitSingularInt32Field(value: self.eventID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetEventListRequest, rhs: Api_GetEventListRequest) -> Bool { + if lhs.eventID != rhs.eventID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetEventListReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetEventListReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "events"), + ] + + 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.events) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.events.isEmpty { + try visitor.visitRepeatedMessageField(value: self.events, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetEventListReply, rhs: Api_GetEventListReply) -> Bool { + if lhs.events != rhs.events {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_EventListMsgElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".EventListMsgElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "path"), + 3: .same(proto: "event"), + 4: .same(proto: "news"), + 5: .same(proto: "kino"), + 6: .same(proto: "file"), + 7: .same(proto: "title"), + 8: .same(proto: "description"), + 9: .same(proto: "locality"), + 10: .same(proto: "link"), + 11: .same(proto: "start"), + 12: .same(proto: "end"), + 13: .standard(proto: "ticket_group"), + ] + + 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.decodeSingularStringField(value: &self.name) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.path) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.event) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.news) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.kino) }() + case 6: try { try decoder.decodeSingularInt32Field(value: &self.file) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.title) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.locality) }() + case 10: try { try decoder.decodeSingularStringField(value: &self.link) }() + case 11: try { try decoder.decodeSingularMessageField(value: &self._start) }() + case 12: try { try decoder.decodeSingularMessageField(value: &self._end) }() + case 13: try { try decoder.decodeSingularInt32Field(value: &self.ticketGroup) }() + default: break + } + } + } + + 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.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + if self.event != 0 { + try visitor.visitSingularInt32Field(value: self.event, fieldNumber: 3) + } + if self.news != 0 { + try visitor.visitSingularInt32Field(value: self.news, fieldNumber: 4) + } + if self.kino != 0 { + try visitor.visitSingularInt32Field(value: self.kino, fieldNumber: 5) + } + if self.file != 0 { + try visitor.visitSingularInt32Field(value: self.file, fieldNumber: 6) + } + if !self.title.isEmpty { + try visitor.visitSingularStringField(value: self.title, fieldNumber: 7) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 8) + } + if !self.locality.isEmpty { + try visitor.visitSingularStringField(value: self.locality, fieldNumber: 9) + } + if !self.link.isEmpty { + try visitor.visitSingularStringField(value: self.link, fieldNumber: 10) + } + try { if let v = self._start { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } }() + try { if let v = self._end { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } }() + if self.ticketGroup != 0 { + try visitor.visitSingularInt32Field(value: self.ticketGroup, fieldNumber: 13) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_EventListMsgElement, rhs: Api_EventListMsgElement) -> Bool { + if lhs.name != rhs.name {return false} + if lhs.path != rhs.path {return false} + if lhs.event != rhs.event {return false} + if lhs.news != rhs.news {return false} + if lhs.kino != rhs.kino {return false} + if lhs.file != rhs.file {return false} + if lhs.title != rhs.title {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs.locality != rhs.locality {return false} + if lhs.link != rhs.link {return false} + if lhs._start != rhs._start {return false} + if lhs._end != rhs._end {return false} + if lhs.ticketGroup != rhs.ticketGroup {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetKinoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetKinoRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "lastId"), + ] + + 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.decodeSingularInt32Field(value: &self.lastID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.lastID != 0 { + try visitor.visitSingularInt32Field(value: self.lastID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetKinoRequest, rhs: Api_GetKinoRequest) -> Bool { + if lhs.lastID != rhs.lastID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetKinoReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetKinoReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "kinos"), + ] + + 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.kinos) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.kinos.isEmpty { + try visitor.visitRepeatedMessageField(value: self.kinos, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetKinoReply, rhs: Api_GetKinoReply) -> Bool { + if lhs.kinos != rhs.kinos {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_KinoMsgElement: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".KinoMsgElement" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "path"), + 3: .same(proto: "kino"), + 4: .same(proto: "date"), + 5: .same(proto: "created"), + 6: .same(proto: "title"), + 7: .same(proto: "year"), + 8: .same(proto: "runtime"), + 9: .same(proto: "genre"), + 10: .same(proto: "director"), + 11: .same(proto: "actors"), + 12: .same(proto: "rating"), + 13: .same(proto: "description"), + 14: .same(proto: "cover"), + 15: .same(proto: "trailer"), + 16: .same(proto: "link"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _path: String = String() + var _kino: Int32 = 0 + var _date: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _created: SwiftProtobuf.Google_Protobuf_Timestamp? = nil + var _title: String = String() + var _year: String = String() + var _runtime: String = String() + var _genre: String = String() + var _director: String = String() + var _actors: String = String() + var _rating: String = String() + var _description_p: String = String() + var _cover: Int32 = 0 + var _trailer: String = String() + var _link: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _path = source._path + _kino = source._kino + _date = source._date + _created = source._created + _title = source._title + _year = source._year + _runtime = source._runtime + _genre = source._genre + _director = source._director + _actors = source._actors + _rating = source._rating + _description_p = source._description_p + _cover = source._cover + _trailer = source._trailer + _link = source._link + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + 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.decodeSingularStringField(value: &_storage._name) }() + case 2: try { try decoder.decodeSingularStringField(value: &_storage._path) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &_storage._kino) }() + case 4: try { try decoder.decodeSingularMessageField(value: &_storage._date) }() + case 5: try { try decoder.decodeSingularMessageField(value: &_storage._created) }() + case 6: try { try decoder.decodeSingularStringField(value: &_storage._title) }() + case 7: try { try decoder.decodeSingularStringField(value: &_storage._year) }() + case 8: try { try decoder.decodeSingularStringField(value: &_storage._runtime) }() + case 9: try { try decoder.decodeSingularStringField(value: &_storage._genre) }() + case 10: try { try decoder.decodeSingularStringField(value: &_storage._director) }() + case 11: try { try decoder.decodeSingularStringField(value: &_storage._actors) }() + case 12: try { try decoder.decodeSingularStringField(value: &_storage._rating) }() + case 13: try { try decoder.decodeSingularStringField(value: &_storage._description_p) }() + case 14: try { try decoder.decodeSingularInt32Field(value: &_storage._cover) }() + case 15: try { try decoder.decodeSingularStringField(value: &_storage._trailer) }() + case 16: try { try decoder.decodeSingularStringField(value: &_storage._link) }() + default: break + } + } + } + } + + 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._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._path.isEmpty { + try visitor.visitSingularStringField(value: _storage._path, fieldNumber: 2) + } + if _storage._kino != 0 { + try visitor.visitSingularInt32Field(value: _storage._kino, fieldNumber: 3) + } + try { if let v = _storage._date { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = _storage._created { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 6) + } + if !_storage._year.isEmpty { + try visitor.visitSingularStringField(value: _storage._year, fieldNumber: 7) + } + if !_storage._runtime.isEmpty { + try visitor.visitSingularStringField(value: _storage._runtime, fieldNumber: 8) + } + if !_storage._genre.isEmpty { + try visitor.visitSingularStringField(value: _storage._genre, fieldNumber: 9) + } + if !_storage._director.isEmpty { + try visitor.visitSingularStringField(value: _storage._director, fieldNumber: 10) + } + if !_storage._actors.isEmpty { + try visitor.visitSingularStringField(value: _storage._actors, fieldNumber: 11) + } + if !_storage._rating.isEmpty { + try visitor.visitSingularStringField(value: _storage._rating, fieldNumber: 12) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 13) + } + if _storage._cover != 0 { + try visitor.visitSingularInt32Field(value: _storage._cover, fieldNumber: 14) + } + if !_storage._trailer.isEmpty { + try visitor.visitSingularStringField(value: _storage._trailer, fieldNumber: 15) + } + if !_storage._link.isEmpty { + try visitor.visitSingularStringField(value: _storage._link, fieldNumber: 16) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_KinoMsgElement, rhs: Api_KinoMsgElement) -> 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._name != rhs_storage._name {return false} + if _storage._path != rhs_storage._path {return false} + if _storage._kino != rhs_storage._kino {return false} + if _storage._date != rhs_storage._date {return false} + if _storage._created != rhs_storage._created {return false} + if _storage._title != rhs_storage._title {return false} + if _storage._year != rhs_storage._year {return false} + if _storage._runtime != rhs_storage._runtime {return false} + if _storage._genre != rhs_storage._genre {return false} + if _storage._director != rhs_storage._director {return false} + if _storage._actors != rhs_storage._actors {return false} + if _storage._rating != rhs_storage._rating {return false} + if _storage._description_p != rhs_storage._description_p {return false} + if _storage._cover != rhs_storage._cover {return false} + if _storage._trailer != rhs_storage._trailer {return false} + if _storage._link != rhs_storage._link {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SendFeedbackRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendFeedbackRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "topic"), + 2: .same(proto: "email"), + 3: .same(proto: "emailId"), + 4: .same(proto: "message"), + 5: .standard(proto: "image_count"), + 6: .same(proto: "latitude"), + 7: .same(proto: "longitude"), + 8: .same(proto: "osVersion"), + 9: .same(proto: "appVersion"), + ] + + 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.decodeSingularStringField(value: &self.topic) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.email) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.emailID) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.message) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.imageCount) }() + case 6: try { try decoder.decodeSingularDoubleField(value: &self.latitude) }() + case 7: try { try decoder.decodeSingularDoubleField(value: &self.longitude) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.osVersion) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.appVersion) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.topic.isEmpty { + try visitor.visitSingularStringField(value: self.topic, fieldNumber: 1) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 2) + } + if !self.emailID.isEmpty { + try visitor.visitSingularStringField(value: self.emailID, fieldNumber: 3) + } + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 4) + } + if self.imageCount != 0 { + try visitor.visitSingularInt32Field(value: self.imageCount, fieldNumber: 5) + } + if self.latitude != 0 { + try visitor.visitSingularDoubleField(value: self.latitude, fieldNumber: 6) + } + if self.longitude != 0 { + try visitor.visitSingularDoubleField(value: self.longitude, fieldNumber: 7) + } + if !self.osVersion.isEmpty { + try visitor.visitSingularStringField(value: self.osVersion, fieldNumber: 8) + } + if !self.appVersion.isEmpty { + try visitor.visitSingularStringField(value: self.appVersion, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SendFeedbackRequest, rhs: Api_SendFeedbackRequest) -> Bool { + if lhs.topic != rhs.topic {return false} + if lhs.email != rhs.email {return false} + if lhs.emailID != rhs.emailID {return false} + if lhs.message != rhs.message {return false} + if lhs.imageCount != rhs.imageCount {return false} + if lhs.latitude != rhs.latitude {return false} + if lhs.longitude != rhs.longitude {return false} + if lhs.osVersion != rhs.osVersion {return false} + if lhs.appVersion != rhs.appVersion {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SendFeedbackImageReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendFeedbackImageReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "status"), + ] + + 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.decodeSingularStringField(value: &self.status) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.status.isEmpty { + try visitor.visitSingularStringField(value: self.status, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SendFeedbackImageReply, rhs: Api_SendFeedbackImageReply) -> Bool { + if lhs.status != rhs.status {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_SendFeedbackImageRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendFeedbackImageRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "imageNr"), + ] + + 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.decodeSingularInt32Field(value: &self.id) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.imageNr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.id != 0 { + try visitor.visitSingularInt32Field(value: self.id, fieldNumber: 1) + } + if self.imageNr != 0 { + try visitor.visitSingularInt32Field(value: self.imageNr, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_SendFeedbackImageRequest, rhs: Api_SendFeedbackImageRequest) -> Bool { + if lhs.id != rhs.id {return false} + if lhs.imageNr != rhs.imageNr {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetMembersRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetMembersRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "lrzId"), + ] + + 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.decodeSingularStringField(value: &self.lrzID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.lrzID.isEmpty { + try visitor.visitSingularStringField(value: self.lrzID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetMembersRequest, rhs: Api_GetMembersRequest) -> Bool { + if lhs.lrzID != rhs.lrzID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetMembersReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetMembersReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "lrzId"), + 2: .same(proto: "name"), + 3: .same(proto: "memberId"), + ] + + 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.decodeSingularStringField(value: &self.lrzID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.memberID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.lrzID.isEmpty { + try visitor.visitSingularStringField(value: self.lrzID, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if self.memberID != 0 { + try visitor.visitSingularInt32Field(value: self.memberID, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetMembersReply, rhs: Api_GetMembersReply) -> Bool { + if lhs.lrzID != rhs.lrzID {return false} + if lhs.name != rhs.name {return false} + if lhs.memberID != rhs.memberID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetUploadStatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetUploadStatusRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "lrzId"), + ] + + 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.decodeSingularStringField(value: &self.lrzID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.lrzID.isEmpty { + try visitor.visitSingularStringField(value: self.lrzID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetUploadStatusRequest, rhs: Api_GetUploadStatusRequest) -> Bool { + if lhs.lrzID != rhs.lrzID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetUploadStatusReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetUploadStatusReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "fcm_token"), + 2: .standard(proto: "public_key"), + 3: .standard(proto: "student_id"), + 4: .standard(proto: "employee_id"), + 5: .standard(proto: "external_id"), + ] + + 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.decodeSingularStringField(value: &self.fcmToken) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.publicKey) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.studentID) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.employeeID) }() + case 5: try { try decoder.decodeSingularBoolField(value: &self.externalID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.fcmToken.isEmpty { + try visitor.visitSingularStringField(value: self.fcmToken, fieldNumber: 1) + } + if !self.publicKey.isEmpty { + try visitor.visitSingularStringField(value: self.publicKey, fieldNumber: 2) + } + if self.studentID != false { + try visitor.visitSingularBoolField(value: self.studentID, fieldNumber: 3) + } + if self.employeeID != false { + try visitor.visitSingularBoolField(value: self.employeeID, fieldNumber: 4) + } + if self.externalID != false { + try visitor.visitSingularBoolField(value: self.externalID, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetUploadStatusReply, rhs: Api_GetUploadStatusReply) -> Bool { + if lhs.fcmToken != rhs.fcmToken {return false} + if lhs.publicKey != rhs.publicKey {return false} + if lhs.studentID != rhs.studentID {return false} + if lhs.employeeID != rhs.employeeID {return false} + if lhs.externalID != rhs.externalID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetNotificationsReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetNotificationsReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "notificationId"), + 2: .same(proto: "type"), + 3: .same(proto: "title"), + 4: .same(proto: "description"), + 5: .same(proto: "signature"), + ] + + 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.decodeSingularInt32Field(value: &self.notificationID) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.type) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.title) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.signature) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.notificationID != 0 { + try visitor.visitSingularInt32Field(value: self.notificationID, fieldNumber: 1) + } + if self.type != 0 { + try visitor.visitSingularInt32Field(value: self.type, fieldNumber: 2) + } + if !self.title.isEmpty { + try visitor.visitSingularStringField(value: self.title, fieldNumber: 3) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) + } + if !self.signature.isEmpty { + try visitor.visitSingularStringField(value: self.signature, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetNotificationsReply, rhs: Api_GetNotificationsReply) -> Bool { + if lhs.notificationID != rhs.notificationID {return false} + if lhs.type != rhs.type {return false} + if lhs.title != rhs.title {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs.signature != rhs.signature {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_NotificationsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NotificationsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "notificationId"), + ] + + 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.decodeSingularInt32Field(value: &self.notificationID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.notificationID != 0 { + try visitor.visitSingularInt32Field(value: self.notificationID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_NotificationsRequest, rhs: Api_NotificationsRequest) -> Bool { + if lhs.notificationID != rhs.notificationID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetNotificationsConfirmReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetNotificationsConfirmReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "status"), + ] + + 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.decodeSingularStringField(value: &self.status) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.status.isEmpty { + try visitor.visitSingularStringField(value: self.status, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetNotificationsConfirmReply, rhs: Api_GetNotificationsConfirmReply) -> Bool { + if lhs.status != rhs.status {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetCanteenHeadCountRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetCanteenHeadCountRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "canteenId"), + ] + + 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.decodeSingularStringField(value: &self.canteenID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.canteenID.isEmpty { + try visitor.visitSingularStringField(value: self.canteenID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetCanteenHeadCountRequest, rhs: Api_GetCanteenHeadCountRequest) -> Bool { + if lhs.canteenID != rhs.canteenID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Api_GetCanteenHeadCountReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetCanteenHeadCountReply" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "count"), + 2: .same(proto: "maxCount"), + 3: .same(proto: "percent"), + 4: .same(proto: "timestamp"), + ] + + 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.decodeSingularUInt32Field(value: &self.count) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self.maxCount) }() + case 3: try { try decoder.decodeSingularFloatField(value: &self.percent) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._timestamp) }() + default: break + } + } + } + + 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.count != 0 { + try visitor.visitSingularUInt32Field(value: self.count, fieldNumber: 1) + } + if self.maxCount != 0 { + try visitor.visitSingularUInt32Field(value: self.maxCount, fieldNumber: 2) + } + if self.percent != 0 { + try visitor.visitSingularFloatField(value: self.percent, fieldNumber: 3) + } + try { if let v = self._timestamp { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Api_GetCanteenHeadCountReply, rhs: Api_GetCanteenHeadCountReply) -> Bool { + if lhs.count != rhs.count {return false} + if lhs.maxCount != rhs.maxCount {return false} + if lhs.percent != rhs.percent {return false} + if lhs._timestamp != rhs._timestamp {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + diff --git a/Campus-iOS/Campus-iOS.entitlements b/Campus-iOS/Campus-iOS.entitlements index b8cf6f9e..2cbc780f 100644 --- a/Campus-iOS/Campus-iOS.entitlements +++ b/Campus-iOS/Campus-iOS.entitlements @@ -2,7 +2,19 @@ + aps-environment + development + com.apple.developer.aps-environment + development + com.apple.security.application-groups + + group.de.tum.tca.notificationserviceextension + com.apple.security.personal-information.location + keychain-access-groups + + $(AppIdentifierPrefix)de.tum.tca.notificationextension + diff --git a/Campus-iOS/Crashlytics/CrashlyticsService.swift b/Campus-iOS/Crashlytics/CrashlyticsService.swift index 27d3f320..7bc4b1cf 100644 --- a/Campus-iOS/Crashlytics/CrashlyticsService.swift +++ b/Campus-iOS/Crashlytics/CrashlyticsService.swift @@ -17,7 +17,7 @@ class CrashlyticsService { #endif } - static func log(_ value: String) -> Void { + static func log(_ error: String) -> Void { #if !DEBUG CrashlyticsService.crashlytics.log(value) #endif diff --git a/Campus-iOS/Info.plist b/Campus-iOS/Info.plist index 5afd3719..dccfcab1 100644 --- a/Campus-iOS/Info.plist +++ b/Campus-iOS/Info.plist @@ -62,6 +62,10 @@ UINewsstandBindingTypeMagazine + UIBackgroundModes + + remote-notification + UILaunchScreen UIColorName diff --git a/Campus-iOS/PushNotifications/CryptoExportImportManager.swift b/Campus-iOS/PushNotifications/CryptoExportImportManager.swift new file mode 100644 index 00000000..4b3cbd10 --- /dev/null +++ b/Campus-iOS/PushNotifications/CryptoExportImportManager.swift @@ -0,0 +1,287 @@ +// +// CryptoExportImportManager +// CryptoExportImportManager +// +// Created by Ignacio Nieto Carvajal on 6/10/15. +// Copyright © 2015 Ignacio Nieto Carvajal. All rights reserved. +// +import UIKit + +/* +EC keys: http://www.opensource.apple.com/source/security_certtool/security_certtool-55103/src/dumpasn1.cfg +EC param 1 +OID = 06 07 2A 86 48 CE 3D 02 01 +Comment = ANSI X9.62 public key type +Description = ecPublicKey (1 2 840 10045 2 1) +EC param 2 +OID = 06 08 2A 86 48 CE 3D 03 01 07 +Comment = ANSI X9.62 named elliptic curve +Description = ansiX9p256r1 (1 2 840 10045 3 1 7) +OID = 06 05 2B 81 04 00 22 +Comment = SECG (Certicom) named elliptic curve +Description = secp384r1 (1 3 132 0 34) +OID = 06 05 2B 81 04 00 23 +Comment = SECG (Certicom) named elliptic curve +Description = secp521r1 (1 3 132 0 35) +EC params sequence: public key + curve 256r1 +30 13 06 07 2A 86 48 CE 3D 02 01 06 08 2A 86 48 CE 3D 03 01 07 +*/ + +// SECP256R1 EC public key header (length + EC params (sequence) + bitstring +private let kCryptoExportImportManagerSecp256r1CurveLen = 256 +private let kCryptoExportImportManagerSecp256r1header: [UInt8] = [0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00] +private let kCryptoExportImportManagerSecp256r1headerLen = 26 + +private let kCryptoExportImportManagerSecp384r1CurveLen = 384 +private let kCryptoExportImportManagerSecp384r1header: [UInt8] = [0x30, 0x76, 0x30, 0x10, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x05, 0x2B, 0x81, 0x04, 0x00, 0x22, 0x03, 0x62, 0x00] +private let kCryptoExportImportManagerSecp384r1headerLen = 23 + +private let kCryptoExportImportManagerSecp521r1CurveLen = 521 +private let kCryptoExportImportManagerSecp521r1header: [UInt8] = [0x30, 0x81, 0x9B, 0x30, 0x10, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x05, 0x2B, 0x81, 0x04, 0x00, 0x23, 0x03, 0x81, 0x86, 0x00] +private let kCryptoExportImportManagerSecp521r1headerLen = 25 + +/* +RSA keys: http://www.opensource.apple.com/source/security_certtool/security_certtool-55103/src/dumpasn1.cfg +OID = 06 09 2A 86 48 86 F7 0D 01 01 01 +Comment = PKCS #1 +Description = rsaEncryption (1 2 840 113549 1 1 1) +NULL byte: 05 00 +*/ + +// RSA OID header +private let kCryptoExportImportManagerRSAOIDHeader: [UInt8] = [0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00] +private let kCryptoExportImportManagerRSAOIDHeaderLength = 15 + +// ASN.1 encoding parameters. +private let kCryptoExportImportManagerASNHeaderSequenceMark: UInt8 = 48 // 0x30 +private let kCryptoExportImportManagerASNHeaderIntegerMark: UInt8 = 02 // 0x32 +private let kCryptoExportImportManagerASNHeaderBitstringMark: UInt8 = 03 //0x03 +private let kCryptoExportImportManagerASNHeaderNullMark: UInt8 = 05 //0x05 +private let kCryptoExportImportManagerASNHeaderRSAEncryptionObjectMark: UInt8 = 06 //0x06 +private let kCryptoExportImportManagerExtendedLengthMark: UInt8 = 128 // 0x80 +private let kCryptoExportImportManagerASNHeaderLengthForRSA = 15 + +// PEM encoding constants +private let kCryptoExportImportManagerPublicKeyInitialTag = "-----BEGIN PUBLIC KEY-----\n" +private let kCryptoExportImportManagerPublicKeyFinalTag = "-----END PUBLIC KEY-----" +private let kCryptoExportImportManagerPublicNumberOfCharactersInALine = 64 + +/** + * This class exists due to the easy and intuitive way of using public keys generated outside iOS in + * the Security framework and CommonCrypto tools (yes, I'm being sarcastic here). + * CryptoCertificateImportManager is in charge of importing a certificate and obtaining a valid key + * reference to use in any of SecKey operations (SecKeyEncrypt, SecKeyRawVerify...). + * As far as I know, any other way of importing and using public keys from the outside is not + * advised: https://devforums.apple.com/message/301532#301532 + */ +class CryptoExportImportManager: NSObject { + // MARK: - Import methods. + + /** + * Extracts the public key from a X.509 certificate and returns a valid SecKeyRef that can be + * used in any of SecKey operations (SecKeyEncrypt, SecKeyRawVerify...). + * Receives the certificate data in DER format. + */ + func importPublicKeyReferenceFromDERCertificate(_ certData: Data) -> SecKey? { + // first we create the certificate reference + guard let certRef = SecCertificateCreateWithData(nil, certData as CFData) else { return nil } + print("Successfully generated a valid certificate reference from the data.") + + // now create a SecTrust structure from the certificate where to extract the key from + var secTrust: SecTrust? + let secTrustStatus = SecTrustCreateWithCertificates(certRef, nil, &secTrust) + print("Generating a SecTrust reference from the certificate: \(secTrustStatus)") + if secTrustStatus != errSecSuccess { return nil } + + // now evaluate the certificate. + var resultType: SecTrustResultType = SecTrustResultType(rawValue: UInt32(0))! // result will be ignored. + let evaluateStatus = SecTrustEvaluate(secTrust!, &resultType) + print("Evaluating the obtained SecTrust reference: \(evaluateStatus)") + if evaluateStatus != errSecSuccess { return nil } + + // lastly, once evaluated, we can export the public key from the certificate leaf. + let publicKeyRef = SecTrustCopyPublicKey(secTrust!) + print("Got public key reference: \(String(describing: publicKeyRef))") + return publicKeyRef + } + + // MARK: - Export methods. + + /** + * Exports a key retrieved from the keychain so it can be used outside iOS (i.e: in OpenSSL). + * Returns a DER representation of the key. + */ + func exportPublicKeyToDER(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> Data? { + if keyType == kSecAttrKeyTypeEC as String { + return exportECPublicKeyToDER(rawPublicKeyBytes, keyType: keyType, keySize: keySize) + } else if keyType == kSecAttrKeyTypeRSA as String { + return exportRSAPublicKeyToDER(rawPublicKeyBytes, keyType: keyType, keySize: keySize) + } + // unknown key type? return nil + return nil + } + + /** + * Exports a key retrieved from the keychain so it can be used outside iOS (i.e: in OpenSSL). + * Returns a PEM representation of the key. + */ + func exportPublicKeyToPEM(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> String? { + if keyType == kSecAttrKeyTypeEC as String { + return exportECPublicKeyToPEM(rawPublicKeyBytes, keyType: keyType, keySize: keySize) + } else if keyType == kSecAttrKeyTypeRSA as String { + return exportRSAPublicKeyToPEM(rawPublicKeyBytes, keyType: keyType, keySize: keySize) + } + // unknown key type? return nil + return nil + } + + /** + * This function prepares a RSA public key generated with Apple SecKeyGeneratePair to be exported + * and used outisde iOS, be it openSSL, PHP, Perl, whatever. By default Apple exports RSA public + * keys in a very raw format. If we want to use it on OpenSSL, PHP or almost anywhere outside iOS, we + * need to remove add the full PKCS#1 ASN.1 wrapping. Returns a DER representation of the key. + */ + func exportRSAPublicKeyToDER(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> Data { + // first we create the space for the ASN.1 header and decide about its length + let bitstringEncodingLength = bytesNeededForRepresentingInteger(rawPublicKeyBytes.count) + + // start building the ASN.1 header + var headerBuffer = [UInt8](repeating: 0, count: kCryptoExportImportManagerASNHeaderLengthForRSA); + headerBuffer[0] = kCryptoExportImportManagerASNHeaderSequenceMark; + + // total size (OID + encoding + key size) + 2 (marks) + let totalSize = kCryptoExportImportManagerRSAOIDHeaderLength + bitstringEncodingLength + rawPublicKeyBytes.count + 3 + let totalSizebitstringEncodingLength = encodeASN1LengthParameter(totalSize, buffer: &(headerBuffer[1])) + + // bitstring header + var keyLengthBytesEncoded = 0 + var bitstringBuffer = [UInt8](repeating: 0, count: kCryptoExportImportManagerASNHeaderLengthForRSA); + bitstringBuffer[0] = kCryptoExportImportManagerASNHeaderBitstringMark + keyLengthBytesEncoded = encodeASN1LengthParameter(rawPublicKeyBytes.count+1, buffer: &(bitstringBuffer[1])) + bitstringBuffer[keyLengthBytesEncoded + 1] = 0x00 + + // build DER key. + var derKey = Data(capacity: totalSize + totalSizebitstringEncodingLength) + derKey.append(headerBuffer, count: totalSizebitstringEncodingLength + 1) + derKey.append(kCryptoExportImportManagerRSAOIDHeader, count: kCryptoExportImportManagerRSAOIDHeaderLength) // Add OID header + derKey.append(bitstringBuffer, count: keyLengthBytesEncoded + 2) // 0x03 + key bitstring length + 0x00 + derKey.append(rawPublicKeyBytes) // public key raw data. + return derKey + } + + /** + * This function prepares a RSA public key generated with Apple SecKeyGeneratePair to be exported + * and used outisde iOS, be it openSSL, PHP, Perl, whatever. By default Apple exports RSA public + * keys in a very raw format. If we want to use it on OpenSSL, PHP or almost anywhere outside iOS, we + * need to remove add the full PKCS#1 ASN.1 wrapping. Returns a DER representation of the key. + */ + func exportRSAPublicKeyToPEM(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> String { + return PEMKeyFromDERKey(exportRSAPublicKeyToDER(rawPublicKeyBytes, keyType: keyType, keySize: keySize)) + } + + + /** + * Returns the number of bytes needed to represent an integer. + */ + func bytesNeededForRepresentingInteger(_ number: Int) -> Int { + if number <= 0 { return 0 } + var i = 1 + while (i < 8 && number >= (1 << (i * 8))) { i += 1 } + return i + } + + /** + * Generates an ASN.1 length sequence for the given length. Modifies the buffer parameter by + * writing the ASN.1 sequence. The memory of buffer must be initialized (i.e: from an NSData). + * Returns the number of bytes used to write the sequence. + */ + func encodeASN1LengthParameter(_ length: Int, buffer: UnsafeMutablePointer) -> Int { + if length < Int(kCryptoExportImportManagerExtendedLengthMark) { + buffer[0] = UInt8(length) + return 1 // just one byte was used, no need for length starting mark (0x80). + } else { + let extraBytes = bytesNeededForRepresentingInteger(length) + var currentLengthValue = length + + buffer[0] = kCryptoExportImportManagerExtendedLengthMark + UInt8(extraBytes) + for i in 0 ..< extraBytes { + buffer[extraBytes - i] = UInt8(currentLengthValue & 0xff) + currentLengthValue = currentLengthValue >> 8 + } + return extraBytes + 1 // 1 byte for the starting mark (0x80 + bytes used) + bytes used to encode length. + } + } + + + /** + * This function prepares a EC public key generated with Apple SecKeyGeneratePair to be exported + * and used outisde iOS, be it openSSL, PHP, Perl, whatever. It basically adds the proper ASN.1 + * header and codifies the result as valid base64 string, 64 characters split. + * Returns a DER representation of the key. + */ + func exportECPublicKeyToDER(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> Data { + print("Exporting EC raw key: \(rawPublicKeyBytes)") + // first retrieve the header with the OID for the proper key curve. + let curveOIDHeader: [UInt8] + let curveOIDHeaderLen: Int + switch (keySize) { + case kCryptoExportImportManagerSecp256r1CurveLen: + curveOIDHeader = kCryptoExportImportManagerSecp256r1header + curveOIDHeaderLen = kCryptoExportImportManagerSecp256r1headerLen + case kCryptoExportImportManagerSecp384r1CurveLen: + curveOIDHeader = kCryptoExportImportManagerSecp384r1header + curveOIDHeaderLen = kCryptoExportImportManagerSecp384r1headerLen + case kCryptoExportImportManagerSecp521r1CurveLen: + curveOIDHeader = kCryptoExportImportManagerSecp521r1header + curveOIDHeaderLen = kCryptoExportImportManagerSecp521r1headerLen + default: + curveOIDHeader = [] + curveOIDHeaderLen = 0 + } + var data = Data(bytes: curveOIDHeader, count: curveOIDHeaderLen) + + // now add the raw data from the retrieved public key + data.append(rawPublicKeyBytes) + return data + } + + /** + * This function prepares a EC public key generated with Apple SecKeyGeneratePair to be exported + * and used outisde iOS, be it openSSL, PHP, Perl, whatever. It basically adds the proper ASN.1 + * header and codifies the result as valid base64 string, 64 characters split. + * Returns a DER representation of the key. + */ + func exportECPublicKeyToPEM(_ rawPublicKeyBytes: Data, keyType: String, keySize: Int) -> String { + return PEMKeyFromDERKey(exportECPublicKeyToDER(rawPublicKeyBytes, keyType: keyType, keySize: keySize)) + } + + /** + * This method transforms a DER encoded key to PEM format. It gets a Base64 representation of + * the key and then splits this base64 string in 64 character chunks. Then it wraps it in + * BEGIN and END key tags. + */ + func PEMKeyFromDERKey(_ data: Data) -> String { + // base64 encode the result + let base64EncodedString = data.base64EncodedString(options: []) + + // split in lines of 64 characters. + var currentLine = "" + var resultString = kCryptoExportImportManagerPublicKeyInitialTag + var charCount = 0 + for character in base64EncodedString { + charCount += 1 + currentLine.append(character) + if charCount == kCryptoExportImportManagerPublicNumberOfCharactersInALine { + resultString += currentLine + "\n" + charCount = 0 + currentLine = "" + } + } + // final line (if any) + if currentLine.count > 0 { resultString += currentLine + "\n" } + // final tag + resultString += kCryptoExportImportManagerPublicKeyFinalTag + return resultString + } + +} diff --git a/Campus-iOS/PushNotifications/KeychainService.swift b/Campus-iOS/PushNotifications/KeychainService.swift new file mode 100644 index 00000000..524e9136 --- /dev/null +++ b/Campus-iOS/PushNotifications/KeychainService.swift @@ -0,0 +1,205 @@ +// +// KeychainService.swift +// Campus-iOS +// +// Created by Anton Wyrowski on 28.01.23. +// + +import Foundation +import KeychainAccess + +typealias RSAKeyPair = (privateKey: String, publicKey: String) + +enum RSAKeyPairError: Error { + case failedGeneratingPrivateKey(_ error: String) + case failedObtainingKeyPairFromKeyChain + case failedObtainingPublicKeyFromPrivateKey + case failedObtainingExternalRepresentationOfKey(_ error: String) + case failedToExportPublicKey(_ error: String) +} + +class KeychainService { + private let privateKeyApplicationTag = "de.tum.tca.keys.push_rsa_key" + private let keychainAccessGroupName = "2J3C6P6X3N.de.tum.tca.notificationextension" + private let keyType = kSecAttrKeyTypeRSA as String + private let keySize = 2048 + private let keychain = Keychain(service: "de.tum.campusapp") + .synchronizable(true) + .accessibility(.afterFirstUnlock) + + private var credentials: Credentials? { + guard let data = keychain[data: "credentials"] else { return nil } + return try? PropertyListDecoder().decode(Credentials.self, from: data) + } + + var campusToken: String? { + switch credentials { + case .none, .noTumID: + return nil + case .tumID(_, let token): + return token + case .tumIDAndKey(_, let token, _): + return token + } + } + + /** + Checks if the there are already public and private keys stored in the keychain. If yes, it just returns them, otherwise it generates new ones. + + - Returns: A tuple containing the RSA public and private key + */ + func obtainOrGeneratePublicPrivateKeys() throws -> RSAKeyPair { + guard let privateKey = optionalOptainPrivateKey() else { + try generatePrivateKey() + + return try obtainPublicPrivateKey() + } + + let publicKey = try obtainPublicKey(privateKey) + + return try publicPrivateKeyToValidFormat(publicKey: publicKey, privateKey: privateKey) + } + + /** + Generates a private inside the Keychain can then be queried afterwards + */ + private func generatePrivateKey() throws { + let attributes: [String: Any] = [ + kSecAttrKeyType as String: keyType, + kSecAttrKeySizeInBits as String: keySize, + kSecPrivateKeyAttrs as String: [ + kSecAttrIsPermanent as String: true, + kSecAttrApplicationTag as String: privateKeyApplicationTag, + ], + kSecAttrAccessGroup as String: keychainAccessGroupName, + kSecAttrAccessible as String: kSecAttrAccessibleAfterFirstUnlock + ] + + var error: Unmanaged? + guard SecKeyCreateRandomKey(attributes as CFDictionary, &error) != nil else { + throw RSAKeyPairError.failedGeneratingPrivateKey(error.debugDescription) + } + } + + + func optionalOptainPrivateKey() -> SecKey? { + do { + return try obtainPrivateKey() + } catch { + return nil + } + } + + /** + Tries to query for the private key using the `privateKeyKeychainQuery` + */ + func obtainPrivateKey() throws -> SecKey { + var item: CFTypeRef? + let status = SecItemCopyMatching(privateKeyQuery as CFDictionary, &item) + + guard status == errSecSuccess && item != nil && CFGetTypeID(item) == SecKeyGetTypeID() else { + throw RSAKeyPairError.failedObtainingKeyPairFromKeyChain + } + + return item as! SecKey + } + + func obtainPrivateKey() throws -> String { + let privateKey: SecKey = try obtainPrivateKey() + + let privateData = try getExternalRepresenation(privateKey) + + return exportPrivateKeyAsValidString(privateData) + } + + /** + Obtains the private key from the keychain, creates a public key from the private key and finally returns an external representation for the keys. + */ + private func obtainPublicPrivateKey() throws -> RSAKeyPair { + let privateKey: SecKey = try obtainPrivateKey() + + let publicKey = try obtainPublicKey(privateKey) + + return try publicPrivateKeyToValidFormat(publicKey: publicKey, privateKey: privateKey) + } + + + /** + Creates an external representation for both the `publicKey` and the `privateKey` + */ + private func publicPrivateKeyToValidFormat(publicKey: SecKey, privateKey: SecKey) throws -> RSAKeyPair { + let privateData = try getExternalRepresenation(privateKey) + + let publicData = try getExternalRepresenation(publicKey) + + return (exportPrivateKeyAsValidString(privateData), exportPublicKeyAsValidPEM(publicData)) + } + + private func getExternalRepresenation(_ key: SecKey) throws -> Data { + var error: Unmanaged? + guard let keyERData = SecKeyCopyExternalRepresentation(key, &error) else { + throw RSAKeyPairError.failedObtainingExternalRepresentationOfKey(error.debugDescription) + } + + return keyERData as Data + } + + private func exportPrivateKeyAsValidString(_ privateKey: Data) -> String { + return privateKey.base64EncodedString() + } + + /** + Uses `CryptoExportImportManager` to export the public key in a format (PEM) that can be read by the backend + */ + private func exportPublicKeyAsValidPEM(_ publicKey: Data) -> String { + let exportManager = CryptoExportImportManager() + + return exportManager.exportRSAPublicKeyToPEM(publicKey, keyType: keyType, keySize: keySize) + } + + /** + Generates a public key, from a `privateKey` + */ + private func obtainPublicKey(_ privateKey: SecKey) throws -> SecKey { + guard let publicKey = SecKeyCopyPublicKey(privateKey) else { + throw RSAKeyPairError.failedObtainingPublicKeyFromPrivateKey + } + + return publicKey + } + + /** + Decrypts a given `cipherText` using the RSA `privateKey` + + - Parameters: + - cipherText: Encrypted text that should be decrypted + - privateKey: RSA PrivateKey from the keychain + + */ + func decrypt(cipherText: String, privateKey: SecKey) -> String? { + guard let cipherData = Data(base64Encoded: cipherText) else { + return nil + } + + var error: Unmanaged? + let plaintext = SecKeyCreateDecryptedData(privateKey, .rsaEncryptionOAEPSHA256, cipherData as CFData, &error) + + guard let data: NSData = plaintext else { + return nil + } + + return String(data: data as Data, encoding: .utf8) + } + + private var privateKeyQuery: [String: Any] { + return [ + kSecClass as String: kSecClassKey, + kSecAttrKeyClass as String: kSecAttrKeyClassPrivate, + kSecAttrKeyType as String: keyType, + kSecAttrKeySizeInBits as String: keySize, + kSecAttrApplicationTag as String: privateKeyApplicationTag, + kSecReturnRef as String: true, + kSecAttrAccessGroup as String: keychainAccessGroupName + ] + } +} diff --git a/Campus-iOS/PushNotifications/PushNotifications.swift b/Campus-iOS/PushNotifications/PushNotifications.swift new file mode 100644 index 00000000..e5e1dd61 --- /dev/null +++ b/Campus-iOS/PushNotifications/PushNotifications.swift @@ -0,0 +1,126 @@ +// +// PushNotifications.swift +// Campus-iOS +// +// Created by Anton Wyrowski on 29.11.22. +// + +import Foundation + +enum HandlePushDeviceRequestError: Error { + case noCampusToken + case noRequestId + case noNotificationType + case invalidNotificationType +} + +enum HandleRegisterDeviceError: Error { + case noCampusToken +} + +enum BackgroundNotificationType: String { + case campusTokenRequest = "CAMPUS_TOKEN_REQUEST" + case lectureUpdateRequest = "LECTURE_UPDATE_REQUEST" +} + +/** + Integrates keychain management, including generating and storing of public and private RSA keys. + Handles registering the device id in the backend, responding to background notifications and reading the Campus API Token from the keychain. + + The `PushNotification` class can be used as singleton by accessing the static `shared` property. + */ +class PushNotifications { + private final let keychain: KeychainService = KeychainService() + + static let shared = PushNotifications() + + /** + Registers the `deviceToken` in the backend to receive push notifications. + + - Parameter deviceToken: the current device token + */ + func registerDeviceToken(_ deviceToken: String) async -> Void { + do { + let keyPair = try keychain.obtainOrGeneratePublicPrivateKeys() + + guard let campusToken = keychain.campusToken else { + throw HandleRegisterDeviceError.noCampusToken + } + + let device: Api_RegisterDeviceRequest = .with({ + $0.deviceID = deviceToken + $0.publicKey = keyPair.publicKey + $0.deviceType = .ios + $0.campusApiToken = campusToken + }) + + let _ = try await CampusBackend.shared.registerDevice(device) + } catch RSAKeyPairError.failedGeneratingPrivateKey(let error) { + CrashlyticsService.log("Something went wrong while generating the rsa private key with error message: \(error)") + } catch RSAKeyPairError.failedObtainingKeyPairFromKeyChain { + CrashlyticsService.log("Something went wrong while obtaining the rsa private key") + } catch RSAKeyPairError.failedObtainingPublicKeyFromPrivateKey { + CrashlyticsService.log("Something went wrong while obtaining the public key from the private key") + } catch RSAKeyPairError.failedObtainingExternalRepresentationOfKey(let error) { + CrashlyticsService.log("Something went wrong while obtaining the external string representation of a key with error message: \(error)") + } catch RSAKeyPairError.failedToExportPublicKey(let error) { + CrashlyticsService.log("Something went wrong while exporting the public key with error message: \(error)") + } catch HandleRegisterDeviceError.noCampusToken { + CrashlyticsService.log("No campus token was available when trying to register the device.") + } catch { + CrashlyticsService.log("Failed registering ios device token! \(error)") + } + + } + + /** + Handles incoming background notification requests from the backend. + + - Throws: + - `HandlePushDeviceRequestError.noRequestId`: if the push notification body does not contain the `request_id` parameter + - `HandlePushDeviceRequestError.noNotificationType`: if if the push notification body does not contain the `notification_type` parameter + - `HandlePushDeviceRequestError.invalidNotificationType`: if the `notification_type` is other then `BackgroundNotificationType` + + - Parameter data: the background notification body + */ + func handleBackgroundNotification(data: [AnyHashable : Any]) async throws { + guard let requestId = data["request_id"] as? String else { + CrashlyticsService.log("Failed responding to push device request because no 'request_id' was defined") + throw HandlePushDeviceRequestError.noRequestId + } + + guard let notificationType = data["notification_type"] as? String else { + CrashlyticsService.log("Failed responding to push device request because no 'notification_type' was defined") + throw HandlePushDeviceRequestError.noNotificationType + } + + switch notificationType { + case BackgroundNotificationType.campusTokenRequest.rawValue, BackgroundNotificationType.lectureUpdateRequest.rawValue: + return try await handleCampusTokenRequest(requestId) + default: + CrashlyticsService.log("Failed responding to push device request because 'notification_type' was invalid") + throw HandlePushDeviceRequestError.invalidNotificationType + } + } + + /** + Handles a `BackgroundNotificationType.campusTokenRequest`. + Reads the `campusToken` from the keychain and sends it to the backend including the `requestId`. + + - Parameter requestId: identifies the background notification request in the backend and needs to be transmitted with the campus token + - Throws: `HandlePushDeviceRequestError.noCampusToken` if the campus token cannot be read from the keychain + */ + private func handleCampusTokenRequest(_ requestId: String) async throws { + guard let campusToken = keychain.campusToken else { + CrashlyticsService.log("Failed responding to push device request because no campus token was available") + throw HandlePushDeviceRequestError.noCampusToken + } + + let response: Api_IOSDeviceRequestResponseRequest = .with({ + $0.payload = campusToken + $0.requestID = requestId + }) + + let _ = try await CampusBackend.shared.iOSDeviceRequestResponse(response) + } +} diff --git a/NotificationService/Info.plist b/NotificationService/Info.plist new file mode 100644 index 00000000..57421ebf --- /dev/null +++ b/NotificationService/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.usernotifications.service + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).NotificationService + + + diff --git a/NotificationService/NotificationService.entitlements b/NotificationService/NotificationService.entitlements new file mode 100644 index 00000000..d098bdce --- /dev/null +++ b/NotificationService/NotificationService.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + keychain-access-groups + + $(AppIdentifierPrefix)de.tum.tca.notificationextension + + + diff --git a/NotificationService/NotificationService.swift b/NotificationService/NotificationService.swift new file mode 100644 index 00000000..7ea7c706 --- /dev/null +++ b/NotificationService/NotificationService.swift @@ -0,0 +1,71 @@ +// +// NotificationService.swift +// NotificationService +// +// Created by Anton Wyrowski on 13.12.22. +// + +import UserNotifications + +class NotificationService: UNNotificationServiceExtension { + var contentHandler: ((UNNotificationContent) -> Void)? + var bestAttemptContent: UNMutableNotificationContent? + + private final let keychain: KeychainService = KeychainService() + + /** + Called before the push notification is displayed to the user + */ + override func didReceive( + _ request: UNNotificationRequest, + withContentHandler contentHandler: + @escaping (UNNotificationContent) -> Void + ) { + self.contentHandler = contentHandler + bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) + + guard let bestAttemptContent = bestAttemptContent else { + return + } + + func shouldNotHappen(_ error: String = "") { + bestAttemptContent.title = "Encrypted Notification Payload 🚨" + bestAttemptContent.subtitle = "Message our support if that happens again." + bestAttemptContent.body = error + + contentHandler(bestAttemptContent) + } + + guard let privateKey = keychain.optionalOptainPrivateKey() else { + return shouldNotHappen("Encryption key does not exist in KeyChain") + } + + if bestAttemptContent.title != "" { + let plainText = keychain.decrypt(cipherText: bestAttemptContent.title, privateKey: privateKey) + + bestAttemptContent.title = plainText ?? "Decryption Error" + } + + if bestAttemptContent.subtitle != "" { + let plainText = keychain.decrypt(cipherText: bestAttemptContent.subtitle, privateKey: privateKey) + + bestAttemptContent.subtitle = plainText ?? "Decryption Error" + } + + if bestAttemptContent.body != "" { + let plainText = keychain.decrypt(cipherText: bestAttemptContent.body, privateKey: privateKey) + + bestAttemptContent.body = plainText ?? "Decryption Error" + } + + contentHandler(bestAttemptContent) + } + + override func serviceExtensionTimeWillExpire() { + // Called just before the extension will be terminated by the system. + // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. + if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { + contentHandler(bestAttemptContent) + } + } +}