diff --git a/android/app/build.gradle b/android/app/build.gradle index fc7e5e7..01ad02e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -57,7 +57,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "be.unov.mymuseum.fortsaintheribert" // Update for mdlf and other clients -- "be.unov.mymuseum.fortsaintheribert" // be.unov.myinfomate.mdlf - minSdkVersion flutter.minSdkVersion + minSdkVersion 24// flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/assets/files/Duck.glb b/assets/files/Duck.glb new file mode 100644 index 0000000..217170d Binary files /dev/null and b/assets/files/Duck.glb differ diff --git a/assets/files/xr_environment.html b/assets/files/xr_environment.html new file mode 100644 index 0000000..8288c6b --- /dev/null +++ b/assets/files/xr_environment.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + Immersive AR Session + + +
+
+ Immersive AR Session +

+ This sample demonstrates how to use an 'immersive-ar' XRSession to + present a simple WebGL scene to a transparent or passthrough XR + device. The logic is largely the same as the corresponding VR sample, + with the primary difference being that no background is rendered and + the model is scaled down for easier viewing in a real-world space. + Back +

+
+
+ + + \ No newline at end of file diff --git a/lib/Components/LanguageSelection.dart b/lib/Components/LanguageSelection.dart index e9ba842..9fab41e 100644 --- a/lib/Components/LanguageSelection.dart +++ b/lib/Components/LanguageSelection.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; //import 'package:flutter_svg_provider/flutter_svg_provider.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/app_context.dart'; import 'package:mymuseum_visitapp/constants.dart'; diff --git a/lib/Components/ScannerDialog.dart b/lib/Components/ScannerDialog.dart index 4e4fc21..2e2f5d9 100644 --- a/lib/Components/ScannerDialog.dart +++ b/lib/Components/ScannerDialog.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'dart:io'; import 'package:flutter/foundation.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/Screens/Article/article_page.dart'; @@ -191,7 +191,7 @@ class _ScannerDialogState extends State { ), ); break; - case SectionType.Quizz: + case SectionType.Quiz: Navigator.pushReplacement( context, MaterialPageRoute( diff --git a/lib/Components/ShowImagePopup.dart b/lib/Components/ShowImagePopup.dart index b6fba39..9c3f3c3 100644 --- a/lib/Components/ShowImagePopup.dart +++ b/lib/Components/ShowImagePopup.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; import 'package:mymuseum_visitapp/Models/resourceModel.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; diff --git a/lib/Components/SliderImages.dart b/lib/Components/SliderImages.dart index 561e4df..cdb01b7 100644 --- a/lib/Components/SliderImages.dart +++ b/lib/Components/SliderImages.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/ShowImagePopup.dart'; import 'package:mymuseum_visitapp/Models/resourceModel.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; diff --git a/lib/Components/loading_common.dart b/lib/Components/loading_common.dart index 96396a9..9ee3739 100644 --- a/lib/Components/loading_common.dart +++ b/lib/Components/loading_common.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/app_context.dart'; import 'package:mymuseum_visitapp/constants.dart'; diff --git a/lib/Helpers/DatabaseHelper.dart b/lib/Helpers/DatabaseHelper.dart index 46c518e..24f15ee 100644 --- a/lib/Helpers/DatabaseHelper.dart +++ b/lib/Helpers/DatabaseHelper.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/articleRead.dart'; import 'package:mymuseum_visitapp/Models/beaconSection.dart'; import 'package:mymuseum_visitapp/Models/resourceModel.dart'; diff --git a/lib/Helpers/modelsHelper.dart b/lib/Helpers/modelsHelper.dart index 28e96b3..20335f6 100644 --- a/lib/Helpers/modelsHelper.dart +++ b/lib/Helpers/modelsHelper.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/beaconSection.dart'; class ModelsHelper { diff --git a/lib/Helpers/translationHelper.dart b/lib/Helpers/translationHelper.dart index 91d3a1a..4672655 100644 --- a/lib/Helpers/translationHelper.dart +++ b/lib/Helpers/translationHelper.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/translations.dart'; diff --git a/lib/Models/ResponseSubDTO.dart b/lib/Models/ResponseSubDTO.dart index 2c7fce0..6da3844 100644 --- a/lib/Models/ResponseSubDTO.dart +++ b/lib/Models/ResponseSubDTO.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class ResponseSubDTO { List? label; diff --git a/lib/Models/articleRead.dart b/lib/Models/articleRead.dart index 3bcd71b..af1d69f 100644 --- a/lib/Models/articleRead.dart +++ b/lib/Models/articleRead.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class SectionRead { String id = ""; diff --git a/lib/Models/beaconSection.dart b/lib/Models/beaconSection.dart index aac1daa..6f315dd 100644 --- a/lib/Models/beaconSection.dart +++ b/lib/Models/beaconSection.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class BeaconSection { int? minorBeaconId; diff --git a/lib/Models/resourceModel.dart b/lib/Models/resourceModel.dart index 6342b2a..24459b2 100644 --- a/lib/Models/resourceModel.dart +++ b/lib/Models/resourceModel.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class ResourceModel { String? id = ""; diff --git a/lib/Models/translation.dart b/lib/Models/translation.dart index b049c5f..506b190 100644 --- a/lib/Models/translation.dart +++ b/lib/Models/translation.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class Translation { String? language = ""; diff --git a/lib/Models/visitContext.dart b/lib/Models/visitContext.dart index ebe1bc7..1912256 100644 --- a/lib/Models/visitContext.dart +++ b/lib/Models/visitContext.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Models/articleRead.dart'; import 'package:mymuseum_visitapp/Models/beaconSection.dart'; import 'package:mymuseum_visitapp/Models/resourceModel.dart'; @@ -10,7 +10,7 @@ class VisitAppContext with ChangeNotifier { String? id = ""; String? language = ""; - String? instanceId = "633ee379d9405f32f166f047"; // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- Fort de Saint-Héribert Mymuseum instance id : 633ee379d9405f32f166f047 // 63514fd67ed8c735aaa4b8f1 Mymuseum test // MDLF instance 65ccc67265373befd15be511 + String? instanceId = "63514fd67ed8c735aaa4b8f2"; // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- Fort de Saint-Héribert Mymuseum instance id : 633ee379d9405f32f166f047 // 63514fd67ed8c735aaa4b8f1 Mymuseum test // MDLF instance 65ccc67265373befd15be511 List? configurations; ConfigurationDTO? configuration; diff --git a/lib/Screens/Article/article_page.dart b/lib/Screens/Article/article_page.dart index 7a492dc..aa0cd87 100644 --- a/lib/Screens/Article/article_page.dart +++ b/lib/Screens/Article/article_page.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Components/SliderImages.dart'; @@ -24,9 +24,9 @@ import 'package:path_provider/path_provider.dart'; import 'audio_player_floating.dart'; class ArticlePage extends StatefulWidget { - const ArticlePage({Key? key, required this.visitAppContextIn, required this.articleId}) : super(key: key); + const ArticlePage({Key? key, required this.visitAppContextIn, required this.articleDTO}) : super(key: key); - final String articleId; + final ArticleDTO articleDTO; final VisitAppContext visitAppContextIn; @override @@ -70,7 +70,7 @@ class _ArticlePageState extends State { isTextSizeButton: true, ), body: FutureBuilder( - future: getArticle(appContext, visitAppContext.clientAPI, widget.articleId, false), + future: getArticle(appContext, visitAppContext.clientAPI, widget.articleDTO.id, false), builder: (context, AsyncSnapshot snapshot) { if(articleDTO != null && sectionDTO != null) { if(size.height > size.width) { @@ -387,7 +387,7 @@ class _ArticlePageState extends State { // Not needed as it's in display logic //ResourceModel? resourceImageOnline = await ApiService.downloadImage(client, image); //if(resourceImageOnline != null) { - resourcesModel.add(ResourceModel(id: image.resourceId, source: image.resourceUrl, type: ResourceType.Image)); + resourcesModel.add(ResourceModel(id: image.resourceId, source: image.resource?.url, type: ResourceType.Image)); /*} else { print("EMPTY resourcesModel online - audio"); }*/ diff --git a/lib/Screens/Home/configurations_list.dart b/lib/Screens/Home/configurations_list.dart index b359772..6534e0a 100644 --- a/lib/Screens/Home/configurations_list.dart +++ b/lib/Screens/Home/configurations_list.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/LanguageSelection.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; diff --git a/lib/Screens/Home/home.dart b/lib/Screens/Home/home.dart index 3e8a4d5..7f1ee2c 100644 --- a/lib/Screens/Home/home.dart +++ b/lib/Screens/Home/home.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/services.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; @@ -14,7 +14,6 @@ import 'package:mymuseum_visitapp/Helpers/requirement_state_controller.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; import 'package:mymuseum_visitapp/Models/beaconSection.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; -import 'package:mymuseum_visitapp/Screens/Visit/visit.dart'; import 'package:mymuseum_visitapp/Services/apiService.dart'; import 'package:mymuseum_visitapp/Services/downloadConfiguration.dart'; import 'package:mymuseum_visitapp/app_context.dart'; @@ -22,6 +21,7 @@ import 'package:mymuseum_visitapp/client.dart'; import 'package:mymuseum_visitapp/constants.dart'; import 'package:provider/provider.dart'; +import '../Tests/TestAR.dart'; import 'configurations_list.dart'; class HomePage extends StatefulWidget { @@ -50,40 +50,63 @@ class _HomePageState extends State with WidgetsBindingObserver { isHomeButton: false, ), body: SingleChildScrollView( - child: SizedBox( - width: size.width, - height: size.height, - child: FutureBuilder( - future: getConfigurationsCall(visitAppContext.clientAPI, appContext), - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.done) { - configurations = List.from(snapshot.data).where((configuration) => configuration.isMobile!).toList(); - return RefreshIndicator ( - onRefresh: () { - setState(() {}); - return Future(() => null); - }, - color: kSecondColor, - child: ConfigurationsList( - alreadyDownloaded: alreadyDownloaded, - configurations: configurations, - requestRefresh: () { - setState(() {}); // For refresh + child: Column( + children: [ + SizedBox( + width: size.width, + height: size.height, + child: FutureBuilder( + future: getConfigurationsCall(visitAppContext.clientAPI, appContext), + builder: (context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + configurations = List.from(snapshot.data).where((configuration) => configuration.isMobile!).toList(); + return RefreshIndicator ( + onRefresh: () { + setState(() {}); + return Future(() => null); }, - ), - ); - } else if (snapshot.connectionState == ConnectionState.none) { - return Text(TranslationHelper.getFromLocale("noData", appContext.getContext())); - } else { - return Center( - child: Container( - height: size.height * 0.15, - child: LoadingCommon() - ) - ); - } - } - ), + color: kSecondColor, + child: ConfigurationsList( + alreadyDownloaded: alreadyDownloaded, + configurations: configurations, + requestRefresh: () { + setState(() {}); // For refresh + }, + ), + ); + } else if (snapshot.connectionState == ConnectionState.none) { + return Text(TranslationHelper.getFromLocale("noData", appContext.getContext())); + } else { + return Center( + child: Container( + height: size.height * 0.15, + child: LoadingCommon() + ) + ); + } + } + ), + ), + /*InkWell( + onTap: () { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) { + return TestAR(); + //return XRWithQRScannerPage(); + }, + ), + ); + + }, + child: const SizedBox( + height: 50, + width: 10, + child: Text('TEST XR'), + ), + ),*/ + ], ) ), //floatingActionButton: ScannerBouton(appContext: appContext), diff --git a/lib/Screens/Quizz/quizz_page.dart b/lib/Screens/Quizz/quizz_page.dart index 2a36c07..8f80b3f 100644 --- a/lib/Screens/Quizz/quizz_page.dart +++ b/lib/Screens/Quizz/quizz_page.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; //import 'package:confetti/confetti.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; import 'package:mymuseum_visitapp/Components/Loading.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; @@ -41,7 +41,7 @@ class _QuizzPageState extends State { late Uint8List audiobytes; late VisitAppContext visitAppContext; - QuizzDTO? quizzDTO; + QuizDTO? quizDTO; List _questionsSubDTO = []; //ConfettiController? _controllerCenter; int currentIndex = 1; @@ -66,9 +66,9 @@ class _QuizzPageState extends State { visitAppContext.isContentCurrentlyShown = false; currentIndex = 1; //_controllerCenter!.dispose(); - if(quizzDTO != null) { - if(quizzDTO!.questions != null) { - _questionsSubDTO = QuestionSubDTO().fromJSON(quizzDTO!.questions!); + if(quizDTO != null) { + if(quizDTO!.questions != null) { + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); } } @@ -84,7 +84,7 @@ class _QuizzPageState extends State { return Scaffold( key: _scaffoldKey, appBar: CustomAppBar( - title: sectionDTO != null ? TranslationHelper.get(sectionDTO!.title, visitAppContext!) : "", + title: sectionDTO != null ? TranslationHelper.get(sectionDTO!.title, visitAppContext) : "", isHomeButton: false, ), body: OrientationBuilder( @@ -92,7 +92,7 @@ class _QuizzPageState extends State { return FutureBuilder( future: getQuizz(appContext, visitAppContext.clientAPI, widget.sectionId), // MAYBE MOVE THAT TO PARENT .. builder: (context, AsyncSnapshot snapshot) { - if(quizzDTO != null && sectionDTO != null) { + if(quizDTO != null && sectionDTO != null) { if(showResult) { var goodResponses = 0; @@ -102,20 +102,20 @@ class _QuizzPageState extends State { } } log("goodResponses =" + goodResponses.toString()); - LevelDTO levelToShow = LevelDTO(); - var test = goodResponses/quizzDTO!.questions!.length; + List levelToShow = []; + var test = goodResponses/quizDTO!.questions!.length; - if((0 == test || test < 0.25) && quizzDTO!.badLevel != null) { - levelToShow = quizzDTO!.badLevel!; + if((0 == test || test < 0.25) && quizDTO!.badLevel != null) { + levelToShow = quizDTO!.badLevel!; } - if((test>=0.25 && test < 0.5) && quizzDTO!.mediumLevel != null) { - levelToShow = quizzDTO!.mediumLevel!; + if((test>=0.25 && test < 0.5) && quizDTO!.mediumLevel != null) { + levelToShow = quizDTO!.mediumLevel!; } - if((test>=0.5 && test < 0.75) && quizzDTO!.goodLevel != null) { - levelToShow = quizzDTO!.goodLevel!; + if((test>=0.5 && test < 0.75) && quizDTO!.goodLevel != null) { + levelToShow = quizDTO!.goodLevel!; } - if((test>=0.75 && test <= 1) && quizzDTO!.greatLevel != null) { - levelToShow = quizzDTO!.greatLevel!; + if((test>=0.75 && test <= 1) && quizDTO!.greatLevel != null) { + levelToShow = quizDTO!.greatLevel!; } return SizedBox( @@ -148,11 +148,11 @@ class _QuizzPageState extends State { if (orientation == Orientation.portrait) Column( children: [ - if (!showResponses && levelToShow.label!.firstWhere((label) => label.language == visitAppContext!.language).resourceUrl != null) // TODO SUPPORT OTHER THAN IMAGES - resultImage(visitAppContext!, size, levelToShow, orientation), + if (!showResponses && levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource?.url != null) // TODO SUPPORT OTHER THAN IMAGES + resultImage(visitAppContext, size, levelToShow, orientation), if(!showResponses) // TEXT BOX WITH MAIN SCORE - Text('$goodResponses/${quizzDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), + Text('$goodResponses/${quizDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), ], ), @@ -163,9 +163,9 @@ class _QuizzPageState extends State { children: [ if(!showResponses) // TEXT BOX WITH MAIN SCORE - Text('$goodResponses/${quizzDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), - if (!showResponses && levelToShow.label!.firstWhere((label) => label.language == visitAppContext!.language).resourceUrl != null) - resultImage(visitAppContext!, size, levelToShow, orientation), + Text('$goodResponses/${quizDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), + if (!showResponses && levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource?.url != null) + resultImage(visitAppContext, size, levelToShow, orientation), ], ), @@ -225,7 +225,7 @@ class _QuizzPageState extends State { showResult = false; showResponses = false; currentIndex = 1; - _questionsSubDTO = QuestionSubDTO().fromJSON(quizzDTO!.questions!); + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); }); }, backgroundColor: kBackgroundSecondGrey, @@ -235,9 +235,9 @@ class _QuizzPageState extends State { ); } - Future getQuizz(AppContext appContext, Client client, String sectionId) async { + Future getQuizz(AppContext appContext, Client client, String sectionId) async { try { - if(sectionDTO == null || quizzDTO == null) { + if(sectionDTO == null || quizDTO == null) { bool isConfigOffline = (appContext.getContext() as VisitAppContext).configuration!.isOffline!; if(isConfigOffline) { @@ -248,9 +248,9 @@ class _QuizzPageState extends State { try { SectionRead sectionRead = SectionRead(id: sectionDTO!.id!, readTime: DateTime.now().millisecondsSinceEpoch); await DatabaseHelper.instance.insert(DatabaseTableType.articleRead, sectionRead.toMap()); - visitAppContext!.readSections.add(sectionRead); + visitAppContext.readSections.add(sectionRead); - appContext.setContext(visitAppContext!); + appContext.setContext(visitAppContext); } catch (e) { print("DATABASE ERROR SECTIONREAD"); print(e); @@ -269,15 +269,15 @@ class _QuizzPageState extends State { } } - if(sectionDTO!.type == SectionType.Quizz) { - quizzDTO = QuizzDTO.fromJson(jsonDecode(sectionDTO!.data!)); + if(sectionDTO!.type == SectionType.Quiz) { + quizDTO = QuizDTO.fromJson(jsonDecode(sectionDTO!.data!)); } - if(quizzDTO != null) { - quizzDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); - _questionsSubDTO = QuestionSubDTO().fromJSON(quizzDTO!.questions!); - if(quizzDTO!.questions != null && quizzDTO!.questions!.isNotEmpty) { - quizzDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); - for (var question in quizzDTO!.questions!) { + if(quizDTO != null) { + quizDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); + if(quizDTO!.questions != null && quizDTO!.questions!.isNotEmpty) { + quizDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); + for (var question in quizDTO!.questions!) { if(isConfigOffline) { // OFFLINE @@ -314,7 +314,7 @@ class _QuizzPageState extends State { } } - resultImage(VisitAppContext visitAppContext, Size size, LevelDTO levelToShow, Orientation orientation) { + resultImage(VisitAppContext visitAppContext, Size size, List levelToShow, Orientation orientation) { return Container( //height: size.height * 0.2, //width: size.width * 0.25, @@ -324,11 +324,11 @@ class _QuizzPageState extends State { ), alignment: Alignment.center, decoration: BoxDecoration( - image: levelToShow.label!.where((label) => label.language == visitAppContext.language).isNotEmpty ? DecorationImage( + image: levelToShow.where((label) => label.language == visitAppContext.language).isNotEmpty ? DecorationImage( fit: BoxFit.contain, opacity: 0.85, image: NetworkImage( - levelToShow.label!.firstWhere((label) => label.language == visitAppContext.language).resourceUrl!, + levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource!.url!, ), ): null, borderRadius: const BorderRadius.all( Radius.circular(50.0)), @@ -343,7 +343,7 @@ class _QuizzPageState extends State { color: const Color(0xff7c94b6), image: DecorationImage( image: NetworkImage( - levelToShow.label!.firstWhere((label) => label.language == visitAppContext.language).resourceUrl!, // TODO REDUNDANCY here?? + levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource!.url!, // TODO REDUNDANCY here?? ), fit: BoxFit.cover, ), @@ -357,7 +357,7 @@ class _QuizzPageState extends State { ); } - resultText(Size size, LevelDTO levelToShow, AppContext appContext) { + resultText(Size size, List levelToShow, AppContext appContext) { return Padding( padding: const EdgeInsets.only(bottom: 10), child: Container( @@ -382,7 +382,7 @@ class _QuizzPageState extends State { child: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(15.0), - child: Text(TranslationHelper.getWithResource(levelToShow.label, appContext.getContext() as VisitAppContext), textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kDescriptionSize : kDescriptionSize)), + child: Text(TranslationHelper.getWithResource(levelToShow, appContext.getContext() as VisitAppContext), textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kDescriptionSize : kDescriptionSize)), ), ), ), @@ -408,7 +408,7 @@ class _QuizzPageState extends State { showResult = false; showResponses = false; currentIndex = 1; - _questionsSubDTO = QuestionSubDTO().fromJSON(quizzDTO!.questions!); + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); }); }, fontSize: 18, diff --git a/lib/Screens/Tests/DebugOptionsWidget.dart b/lib/Screens/Tests/DebugOptionsWidget.dart new file mode 100644 index 0000000..6906476 --- /dev/null +++ b/lib/Screens/Tests/DebugOptionsWidget.dart @@ -0,0 +1,117 @@ +import 'package:ar_flutter_plugin/managers/ar_location_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_session_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_object_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_anchor_manager.dart'; +import 'package:flutter/material.dart'; +import 'package:ar_flutter_plugin/ar_flutter_plugin.dart'; +import 'package:ar_flutter_plugin/datatypes/config_planedetection.dart'; + +class DebugOptionsWidget extends StatefulWidget { + DebugOptionsWidget({Key? key}) : super(key: key); + @override + _DebugOptionsWidgetState createState() => _DebugOptionsWidgetState(); +} + +class _DebugOptionsWidgetState extends State { + ARSessionManager? arSessionManager; + ARObjectManager? arObjectManager; + bool _showFeaturePoints = false; + bool _showPlanes = false; + bool _showWorldOrigin = false; + bool _showAnimatedGuide = true; + String _planeTexturePath = "Images/triangle.png"; + bool _handleTaps = false; + + @override + void dispose() { + super.dispose(); + arSessionManager!.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Debug Options'), + ), + body: Container( + child: Stack(children: [ + ARView( + onARViewCreated: onARViewCreated, + planeDetectionConfig: PlaneDetectionConfig.horizontalAndVertical, + showPlatformType: true, + ), + Align( + alignment: FractionalOffset.bottomRight, + child: Container( + width: MediaQuery.of(context).size.width * 0.5, + color: Color(0xFFFFFFF).withOpacity(0.5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.min, + children: [ + SwitchListTile( + title: const Text('Feature Points'), + value: _showFeaturePoints, + onChanged: (bool value) { + setState(() { + _showFeaturePoints = value; + updateSessionSettings(); + }); + }, + ), + SwitchListTile( + title: const Text('Planes'), + value: _showPlanes, + onChanged: (bool value) { + setState(() { + _showPlanes = value; + updateSessionSettings(); + }); + }, + ), + SwitchListTile( + title: const Text('World Origin'), + value: _showWorldOrigin, + onChanged: (bool value) { + setState(() { + _showWorldOrigin = value; + updateSessionSettings(); + }); + }, + ), + ], + ), + ), + ), + ]))); + } + + void onARViewCreated( + ARSessionManager arSessionManager, + ARObjectManager arObjectManager, + ARAnchorManager arAnchorManager, + ARLocationManager arLocationManager) { + this.arSessionManager = arSessionManager; + this.arObjectManager = arObjectManager; + + this.arSessionManager!.onInitialize( + showFeaturePoints: _showFeaturePoints, + showPlanes: _showPlanes, + customPlaneTexturePath: _planeTexturePath, + showWorldOrigin: _showWorldOrigin, + showAnimatedGuide: _showAnimatedGuide, + handleTaps: _handleTaps, + ); + this.arObjectManager!.onInitialize(); + } + + void updateSessionSettings() { + this.arSessionManager!.onInitialize( + showFeaturePoints: _showFeaturePoints, + showPlanes: _showPlanes, + customPlaneTexturePath: _planeTexturePath, + showWorldOrigin: _showWorldOrigin, + ); + } +} \ No newline at end of file diff --git a/lib/Screens/Tests/TestAR.dart b/lib/Screens/Tests/TestAR.dart new file mode 100644 index 0000000..28e0c34 --- /dev/null +++ b/lib/Screens/Tests/TestAR.dart @@ -0,0 +1,144 @@ +import 'package:flutter/material.dart'; +import 'dart:async'; +import 'package:flutter/services.dart'; +import 'package:ar_flutter_plugin/ar_flutter_plugin.dart'; +import 'package:mymuseum_visitapp/Screens/Tests/DebugOptionsWidget.dart'; +import 'package:mymuseum_visitapp/Screens/Tests/cloudtest.dart'; +import 'package:mymuseum_visitapp/Screens/Tests/testother.dart'; +import 'localtest.dart'; + +class TestAR extends StatefulWidget { + @override + _MyAppState createState() => _MyAppState(); +} + +class _MyAppState extends State { + String _platformVersion = 'Unknown'; + static const String _title = 'AR Plugin Demo'; + + @override + void initState() { + super.initState(); + initPlatformState(); + } + + // Platform messages are asynchronous, so we initialize in an async method. + Future initPlatformState() async { + String platformVersion; + // Platform messages may fail, so we use a try/catch PlatformException. + try { + platformVersion = await ArFlutterPlugin.platformVersion; + } on PlatformException { + platformVersion = 'Failed to get platform version.'; + } + + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + + setState(() { + _platformVersion = platformVersion; + }); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text(_title), + ), + body: Column(children: [ + Text('Running on: $_platformVersion\n'), + Expanded( + child: ExampleList(), + ), + ]), + ), + ); + } +} + +class ExampleList extends StatelessWidget { + ExampleList({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final examples = [ + Example( + 'Debug Options', + 'Visualize feature points, planes and world coordinate system', + () => Navigator.push(context, + MaterialPageRoute(builder: (context) => DebugOptionsWidget()))), + /*Example( + 'Local & Online Objects', + 'Place 3D objects from Flutter assets and the web into the scene', + () => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => LocalAndWebObjectsWidget()))),*/ + Example( + 'Anchors & Objects on Planes', + 'Place 3D objects on detected planes using anchors', + () => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ObjectsOnPlanesWidget()))), + Example( + 'Object Transformation Gestures', + 'Rotate and Pan Objects', + () => Navigator.push(context, + MaterialPageRoute(builder: (context) => ObjectGesturesWidget()))), + Example( + 'Screenshots', + 'Place 3D objects on planes and take screenshots', + () => Navigator.push(context, + MaterialPageRoute(builder: (context) => ScreenshotWidget()))), + /*Example( + 'Cloud Anchors', + 'Place and retrieve 3D objects using the Google Cloud Anchor API', + () => Navigator.push(context, + MaterialPageRoute(builder: (context) => CloudAnchorWidget()))), + Example( + 'External Model Management', + 'Similar to Cloud Anchors example, but uses external database to choose from available 3D models', + () => Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ExternalModelManagementWidget())))*/ + ]; + return ListView( + children: + examples.map((example) => ExampleCard(example: example)).toList(), + ); + } +} + +class ExampleCard extends StatelessWidget { + ExampleCard({Key? key, required this.example}) : super(key: key); + final Example example; + + @override + build(BuildContext context) { + return Card( + child: InkWell( + splashColor: Colors.blue.withAlpha(30), + onTap: () { + example.onTap(); + }, + child: ListTile( + title: Text(example.name), + subtitle: Text(example.description), + ), + ), + ); + } +} + +class Example { + const Example(this.name, this.description, this.onTap); + final String name; + final String description; + final Function onTap; +} \ No newline at end of file diff --git a/lib/Screens/Tests/XRTest.dart b/lib/Screens/Tests/XRTest.dart new file mode 100644 index 0000000..01231ad --- /dev/null +++ b/lib/Screens/Tests/XRTest.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:qr_code_scanner/qr_code_scanner.dart'; +import 'package:webview_flutter/webview_flutter.dart'; + +class XRWithQRScannerPage extends StatefulWidget { + @override + _XRWithQRScannerPageState createState() => _XRWithQRScannerPageState(); +} + +class _XRWithQRScannerPageState extends State { + String qrCode = ""; + late final WebViewController _webViewController; + final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); + + @override + void initState() { + super.initState(); + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..loadRequest(Uri.parse("https://immersive-web.github.io/webxr-samples/immersive-ar-session.html")) + ; + //..loadFlutterAsset('assets/files/xr_environment.html'); // Charge le fichier local + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("XR avec Scanner QR Code")), + body: Stack( + children: [ + // La couche QR code scanner (superposée au-dessus de l'XR) + Positioned.fill( + child: QRView( + onQRViewCreated: (controller) { + controller.scannedDataStream.listen((scanData) { + setState(() { + qrCode = scanData.code!; + print('QR Code détecté : $qrCode'); + fetchData(qrCode); + }); + }); + }, key: qrKey, + ), + ), + // La couche XR (WebXR avec Three.js ou autre moteur) + WebViewWidget( + controller: _webViewController + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor(Color(0x00000000)) + ..addJavaScriptChannel( + 'WebViewChannel', + onMessageReceived: (message) { + // Message reçu de JavaScript + print(message.message); + showDialog( + context: context, + builder: (context) => AlertDialog( + content: Text(message.message), + ), + ); + }, + ), + ), + ], + ), + ); + } + + Future fetchData(String? qrCode) async { + print('Fetching data for QR Code: $qrCode'); + } +} diff --git a/lib/Screens/Tests/cloudtest.dart b/lib/Screens/Tests/cloudtest.dart new file mode 100644 index 0000000..1968b72 --- /dev/null +++ b/lib/Screens/Tests/cloudtest.dart @@ -0,0 +1,170 @@ +import 'package:ar_flutter_plugin/managers/ar_location_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_session_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_object_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_anchor_manager.dart'; +import 'package:ar_flutter_plugin/models/ar_anchor.dart'; +import 'package:flutter/material.dart'; +import 'package:ar_flutter_plugin/ar_flutter_plugin.dart'; +import 'package:ar_flutter_plugin/datatypes/config_planedetection.dart'; +import 'package:ar_flutter_plugin/datatypes/node_types.dart'; +import 'package:ar_flutter_plugin/datatypes/hittest_result_types.dart'; +import 'package:ar_flutter_plugin/models/ar_node.dart'; +import 'package:ar_flutter_plugin/models/ar_hittest_result.dart'; +import 'package:flutter/services.dart'; +import 'package:vector_math/vector_math_64.dart'; +import 'dart:math'; + +class ObjectGesturesWidget extends StatefulWidget { + ObjectGesturesWidget({Key? key}) : super(key: key); + @override + _ObjectGesturesWidgetState createState() => _ObjectGesturesWidgetState(); +} + +class _ObjectGesturesWidgetState extends State { + ARSessionManager? arSessionManager; + ARObjectManager? arObjectManager; + ARAnchorManager? arAnchorManager; + + List nodes = []; + List anchors = []; + + @override + void dispose() { + super.dispose(); + arSessionManager!.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Object Transformation Gestures'), + ), + body: Container( + child: Stack(children: [ + ARView( + onARViewCreated: onARViewCreated, + planeDetectionConfig: PlaneDetectionConfig.horizontalAndVertical, + ), + Align( + alignment: FractionalOffset.bottomCenter, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton( + onPressed: onRemoveEverything, + child: Text("Remove Everything")), + ]), + ) + ]))); + } + + void onARViewCreated( + ARSessionManager arSessionManager, + ARObjectManager arObjectManager, + ARAnchorManager arAnchorManager, + ARLocationManager arLocationManager) { + this.arSessionManager = arSessionManager; + this.arObjectManager = arObjectManager; + this.arAnchorManager = arAnchorManager; + + this.arSessionManager!.onInitialize( + showFeaturePoints: false, + showPlanes: true, + customPlaneTexturePath: "Images/triangle.png", + showWorldOrigin: true, + handlePans: true, + handleRotation: true, + ); + this.arObjectManager!.onInitialize(); + + this.arSessionManager!.onPlaneOrPointTap = onPlaneOrPointTapped; + this.arObjectManager!.onPanStart = onPanStarted; + this.arObjectManager!.onPanChange = onPanChanged; + this.arObjectManager!.onPanEnd = onPanEnded; + this.arObjectManager!.onRotationStart = onRotationStarted; + this.arObjectManager!.onRotationChange = onRotationChanged; + this.arObjectManager!.onRotationEnd = onRotationEnded; + } + + Future onRemoveEverything() async { + /*nodes.forEach((node) { + this.arObjectManager.removeNode(node); + });*/ + anchors.forEach((anchor) { + this.arAnchorManager!.removeAnchor(anchor); + }); + anchors = []; + } + + Future onPlaneOrPointTapped( + List hitTestResults) async { + var singleHitTestResult = hitTestResults.firstWhere( + (hitTestResult) => hitTestResult.type == ARHitTestResultType.plane); + if (singleHitTestResult != null) { + var newAnchor = + ARPlaneAnchor(transformation: singleHitTestResult.worldTransform); + bool? didAddAnchor = await this.arAnchorManager!.addAnchor(newAnchor); + if (didAddAnchor!) { + this.anchors.add(newAnchor); + // Add note to anchor + var newNode = ARNode( + type: NodeType.webGLB, + uri: + "assets/files/Duck.glb", + scale: Vector3(0.2, 0.2, 0.2), + position: Vector3(0.0, 0.0, 0.0), + rotation: Vector4(1.0, 0.0, 0.0, 0.0)); + bool? didAddNodeToAnchor = + await this.arObjectManager!.addNode(newNode, planeAnchor: newAnchor); + if (didAddNodeToAnchor!) { + this.nodes.add(newNode); + } else { + this.arSessionManager!.onError("Adding Node to Anchor failed"); + } + } else { + this.arSessionManager!.onError("Adding Anchor failed"); + } + } + } + + onPanStarted(String nodeName) { + print("Started panning node " + nodeName); + } + + onPanChanged(String nodeName) { + print("Continued panning node " + nodeName); + } + + onPanEnded(String nodeName, Matrix4 newTransform) { + print("Ended panning node " + nodeName); + final pannedNode = + this.nodes.firstWhere((element) => element.name == nodeName); + + /* + * Uncomment the following command if you want to keep the transformations of the Flutter representations of the nodes up to date + * (e.g. if you intend to share the nodes through the cloud) + */ + //pannedNode.transform = newTransform; + } + + onRotationStarted(String nodeName) { + print("Started rotating node " + nodeName); + } + + onRotationChanged(String nodeName) { + print("Continued rotating node " + nodeName); + } + + onRotationEnded(String nodeName, Matrix4 newTransform) { + print("Ended rotating node " + nodeName); + final rotatedNode = + this.nodes.firstWhere((element) => element.name == nodeName); + + /* + * Uncomment the following command if you want to keep the transformations of the Flutter representations of the nodes up to date + * (e.g. if you intend to share the nodes through the cloud) + */ + //rotatedNode.transform = newTransform; + } +} \ No newline at end of file diff --git a/lib/Screens/Tests/localtest.dart b/lib/Screens/Tests/localtest.dart new file mode 100644 index 0000000..533d004 --- /dev/null +++ b/lib/Screens/Tests/localtest.dart @@ -0,0 +1,157 @@ +import 'package:ar_flutter_plugin/managers/ar_location_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_session_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_object_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_anchor_manager.dart'; +import 'package:ar_flutter_plugin/models/ar_anchor.dart'; +import 'package:flutter/material.dart'; +import 'package:ar_flutter_plugin/ar_flutter_plugin.dart'; +import 'package:ar_flutter_plugin/datatypes/config_planedetection.dart'; +import 'package:ar_flutter_plugin/datatypes/node_types.dart'; +import 'package:ar_flutter_plugin/datatypes/hittest_result_types.dart'; +import 'package:ar_flutter_plugin/models/ar_node.dart'; +import 'package:ar_flutter_plugin/models/ar_hittest_result.dart'; +import 'package:vector_math/vector_math_64.dart'; + +class ScreenshotWidget extends StatefulWidget { + const ScreenshotWidget({Key? key}) : super(key: key); + @override + _ScreenshotWidgetState createState() => _ScreenshotWidgetState(); +} + +class _ScreenshotWidgetState extends State { + ARSessionManager? arSessionManager; + ARObjectManager? arObjectManager; + ARAnchorManager? arAnchorManager; + + List nodes = []; + List anchors = []; + + @override + void dispose() { + super.dispose(); + arSessionManager!.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Screenshots'), + ), + body: + Container( + child: + Stack(children: [ + ARView( + onARViewCreated: onARViewCreated, + planeDetectionConfig: PlaneDetectionConfig.horizontalAndVertical, + ), + Align( + alignment: FractionalOffset.bottomCenter, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton( + onPressed: onRemoveEverything, + child: const Text("Remove Everything")), + ElevatedButton( + onPressed: onTakeScreenshot, + child: const Text("Take Screenshot")), + ]), + ) + ]))); + } + + void onARViewCreated( + ARSessionManager arSessionManager, + ARObjectManager arObjectManager, + ARAnchorManager arAnchorManager, + ARLocationManager arLocationManager) { + this.arSessionManager = arSessionManager; + this.arObjectManager = arObjectManager; + this.arAnchorManager = arAnchorManager; + + this.arSessionManager!.onInitialize( + showFeaturePoints: false, + showPlanes: true, + customPlaneTexturePath: "Images/triangle.png", + showWorldOrigin: true, + ); + this.arObjectManager!.onInitialize(); + + this.arSessionManager!.onPlaneOrPointTap = onPlaneOrPointTapped; + this.arObjectManager!.onNodeTap = onNodeTapped; + } + + Future onRemoveEverything() async { + /*nodes.forEach((node) { + this.arObjectManager.removeNode(node); + });*/ + // anchors.forEach((anchor) + for (var anchor in anchors) + { + arAnchorManager!.removeAnchor(anchor); + }; + anchors = []; + } + + Future onTakeScreenshot() async { + var image = await arSessionManager!.snapshot(); + await showDialog( + context: context, + builder: (_) => Dialog( + child: Container( + decoration: BoxDecoration( + image: DecorationImage(image: image, fit: BoxFit.cover)), + ), + )); + } + + Future onNodeTapped(List nodes) async { + var number = nodes.length; + arSessionManager!.onError("Tapped $number node(s)"); + } + + Future onPlaneOrPointTapped( + List hitTestResults) async { + var singleHitTestResult = hitTestResults.firstWhere( + (hitTestResult) => hitTestResult.type == ARHitTestResultType.plane); + if (singleHitTestResult != null) { + var newAnchor = + ARPlaneAnchor(transformation: singleHitTestResult.worldTransform); + bool? didAddAnchor = await arAnchorManager!.addAnchor(newAnchor); + if (didAddAnchor != null && didAddAnchor) { + anchors.add(newAnchor); + // Add note to anchor + var newNode = ARNode( + type: NodeType.webGLB, + uri: + "https://github.com/KhronosGroup/glTF-Sample-Models/blob/main/2.0/Duck/glTF-Binary/Duck.glb", + scale: Vector3(0.2, 0.2, 0.2), + position: Vector3(0.0, 0.0, 0.0), + rotation: Vector4(1.0, 0.0, 0.0, 0.0)); + bool? didAddNodeToAnchor = + await arObjectManager!.addNode(newNode, planeAnchor: newAnchor); + + if (didAddNodeToAnchor != null && didAddNodeToAnchor) { + nodes.add(newNode); + } else { + arSessionManager!.onError("Adding Node to Anchor failed"); + } + } else { + arSessionManager!.onError("Adding Anchor failed"); + } + /* + // To add a node to the tapped position without creating an anchor, use the following code (Please mind: the function onRemoveEverything has to be adapted accordingly!): + var newNode = ARNode( + type: NodeType.localGLTF2, + uri: "Models/Chicken_01/Chicken_01.gltf", + scale: Vector3(0.2, 0.2, 0.2), + transformation: singleHitTestResult.worldTransform); + bool didAddWebNode = await this.arObjectManager.addNode(newNode); + if (didAddWebNode) { + this.nodes.add(newNode); + }*/ + } + } +} \ No newline at end of file diff --git a/lib/Screens/Tests/testother.dart b/lib/Screens/Tests/testother.dart new file mode 100644 index 0000000..0856e3b --- /dev/null +++ b/lib/Screens/Tests/testother.dart @@ -0,0 +1,139 @@ +import 'package:ar_flutter_plugin/managers/ar_location_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_session_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_object_manager.dart'; +import 'package:ar_flutter_plugin/managers/ar_anchor_manager.dart'; +import 'package:ar_flutter_plugin/models/ar_anchor.dart'; +import 'package:flutter/material.dart'; +import 'package:ar_flutter_plugin/ar_flutter_plugin.dart'; +import 'package:ar_flutter_plugin/datatypes/config_planedetection.dart'; +import 'package:ar_flutter_plugin/datatypes/node_types.dart'; +import 'package:ar_flutter_plugin/datatypes/hittest_result_types.dart'; +import 'package:ar_flutter_plugin/models/ar_node.dart'; +import 'package:ar_flutter_plugin/models/ar_hittest_result.dart'; +import 'package:flutter/services.dart'; +import 'package:vector_math/vector_math_64.dart'; +import 'dart:math'; + +class ObjectsOnPlanesWidget extends StatefulWidget { + ObjectsOnPlanesWidget({Key? key}) : super(key: key); + @override + _ObjectsOnPlanesWidgetState createState() => _ObjectsOnPlanesWidgetState(); +} + +class _ObjectsOnPlanesWidgetState extends State { + ARSessionManager? arSessionManager; + ARObjectManager? arObjectManager; + ARAnchorManager? arAnchorManager; + + List nodes = []; + List anchors = []; + + @override + void dispose() { + super.dispose(); + arSessionManager!.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Anchors & Objects on Planes'), + ), + body: Container( + child: Stack(children: [ + ARView( + onARViewCreated: onARViewCreated, + planeDetectionConfig: PlaneDetectionConfig.horizontalAndVertical, + ), + Align( + alignment: FractionalOffset.bottomCenter, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton( + onPressed: onRemoveEverything, + child: Text("Remove Everything")), + ]), + ) + ]))); + } + + void onARViewCreated( + ARSessionManager arSessionManager, + ARObjectManager arObjectManager, + ARAnchorManager arAnchorManager, + ARLocationManager arLocationManager) { + this.arSessionManager = arSessionManager; + this.arObjectManager = arObjectManager; + this.arAnchorManager = arAnchorManager; + + this.arSessionManager!.onInitialize( + showFeaturePoints: false, + showPlanes: true, + customPlaneTexturePath: "Images/triangle.png", + showWorldOrigin: true, + ); + this.arObjectManager!.onInitialize(); + + this.arSessionManager!.onPlaneOrPointTap = onPlaneOrPointTapped; + this.arObjectManager!.onNodeTap = onNodeTapped; + } + + Future onRemoveEverything() async { + /*nodes.forEach((node) { + this.arObjectManager.removeNode(node); + });*/ + anchors.forEach((anchor) { + this.arAnchorManager!.removeAnchor(anchor); + }); + anchors = []; + } + + Future onNodeTapped(List nodes) async { + var number = nodes.length; + this.arSessionManager!.onError("Tapped $number node(s)"); + } + + Future onPlaneOrPointTapped( + List hitTestResults) async { + var singleHitTestResult = hitTestResults.firstWhere( + (hitTestResult) => hitTestResult.type == ARHitTestResultType.plane); + if (singleHitTestResult != null) { + var newAnchor = + ARPlaneAnchor(transformation: singleHitTestResult.worldTransform); + bool? didAddAnchor = await this.arAnchorManager!.addAnchor(newAnchor); + if (didAddAnchor!) { + this.anchors.add(newAnchor); + // Add note to anchor + var newNode = ARNode( + type: NodeType.webGLB, + uri: + "https://github.com/KhronosGroup/glTF-Sample-Models/blob/main/2.0/Duck/glTF-Binary/Duck.glb", + scale: Vector3(0.2, 0.2, 0.2), + position: Vector3(0.0, 0.0, 0.0), + rotation: Vector4(1.0, 0.0, 0.0, 0.0)); + bool? didAddNodeToAnchor = + await this.arObjectManager!.addNode(newNode, planeAnchor: newAnchor); + if (didAddNodeToAnchor!) { + this.nodes.add(newNode); + } else { + this.arSessionManager!.onError("Adding Node to Anchor failed"); + } + } else { + this.arSessionManager!.onError("Adding Anchor failed"); + } + /* + // To add a node to the tapped position without creating an anchor, use the following code (Please mind: the function onRemoveEverything has to be adapted accordingly!): + var newNode = ARNode( + type: NodeType.localGLTF2, + uri: "Models/Chicken_01/Chicken_01.gltf", + scale: Vector3(0.2, 0.2, 0.2), + transformation: singleHitTestResult.worldTransform); + bool didAddWebNode = await this.arObjectManager.addNode(newNode); + if (didAddWebNode) { + this.nodes.add(newNode); + }*/ + } + } +} \ No newline at end of file diff --git a/lib/Screens/Visit/beaconArticleFound.dart b/lib/Screens/Visit/beaconArticleFound.dart index b50e715..cac1803 100644 --- a/lib/Screens/Visit/beaconArticleFound.dart +++ b/lib/Screens/Visit/beaconArticleFound.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/Loading.dart'; import 'package:mymuseum_visitapp/Components/SearchBox.dart'; import 'package:mymuseum_visitapp/Components/SearchNumberBox.dart'; diff --git a/lib/Screens/Visit/components/body.dart b/lib/Screens/Visit/components/body.dart index 20e295d..1554b89 100644 --- a/lib/Screens/Visit/components/body.dart +++ b/lib/Screens/Visit/components/body.dart @@ -1,6 +1,6 @@ import 'package:diacritic/diacritic.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Components/SearchBox.dart'; import 'package:mymuseum_visitapp/Components/SearchNumberBox.dart'; @@ -113,7 +113,7 @@ class _BodyState extends State { ), ); break; - case SectionType.Quizz: + case SectionType.Quiz: Navigator.push( context, MaterialPageRoute( @@ -166,7 +166,7 @@ class _BodyState extends State { List? sectionsDownloaded = await ApiService.getAllSections(visitAppContext.clientAPI, visitAppContext.configuration!.id!); //print(sectionsDownloaded); if(sectionsDownloaded!.isNotEmpty) { - sections = sectionsDownloaded.where((s) => s.type == SectionType.Article || s.type == SectionType.Quizz).toList(); // TODO Support more than Article and Quizz section type + sections = sectionsDownloaded.where((s) => s.type == SectionType.Article || s.type == SectionType.Quiz).toList(); // TODO Support more than Article and Quizz section type //print(sections); } } diff --git a/lib/Screens/Visit/components/section_card.dart b/lib/Screens/Visit/components/section_card.dart index b6054a1..7c43b03 100644 --- a/lib/Screens/Visit/components/section_card.dart +++ b/lib/Screens/Visit/components/section_card.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; diff --git a/lib/Screens/Visit/visit.dart b/lib/Screens/Visit/visit.dart index ecab74c..1e1d712 100644 --- a/lib/Screens/Visit/visit.dart +++ b/lib/Screens/Visit/visit.dart @@ -6,7 +6,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_beacon/flutter_beacon.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; import 'package:mymuseum_visitapp/Components/ScannerBouton.dart'; import 'package:mymuseum_visitapp/Helpers/requirement_state_controller.dart'; @@ -299,7 +299,7 @@ class _VisitPageState extends State with WidgetsBindingObserver { ), ); break; - case SectionType.Quizz: + case SectionType.Quiz: Navigator.push( context, MaterialPageRoute( diff --git a/lib/Screens/section_page.dart b/lib/Screens/section_page.dart new file mode 100644 index 0000000..e957ec6 --- /dev/null +++ b/lib/Screens/section_page.dart @@ -0,0 +1,423 @@ +import 'dart:convert'; +import 'dart:developer'; +import 'dart:typed_data'; + +//import 'package:confetti/confetti.dart'; +import 'package:flutter/material.dart'; +import 'package:manager_api_new/api.dart'; +import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; +import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; +import 'package:mymuseum_visitapp/Components/rounded_button.dart'; +import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; +import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; +import 'package:mymuseum_visitapp/Models/ResponseSubDTO.dart'; +import 'package:mymuseum_visitapp/Models/articleRead.dart'; +import 'package:mymuseum_visitapp/Models/resourceModel.dart'; +import 'package:mymuseum_visitapp/Models/visitContext.dart'; +//import 'package:mymuseum_visitapp/Screens/Quizz/drawPath.dart'; +import 'package:mymuseum_visitapp/Screens/Quizz/questions_list.dart'; +//import 'package:mymuseum_visitapp/Screens/Quizz/showResponses.dart'; +import 'package:mymuseum_visitapp/app_context.dart'; +import 'package:mymuseum_visitapp/client.dart'; +import 'package:mymuseum_visitapp/constants.dart'; +import 'package:provider/provider.dart'; + +class SectionPage extends StatefulWidget { + const SectionPage({Key? key, required this.visitAppContextIn, required this.sectionId}) : super(key: key); + + final String sectionId; + final VisitAppContext visitAppContextIn; + + @override + State createState() => _SectionPageState(); +} + +class _SectionPageState extends State { + final GlobalKey _scaffoldKey = GlobalKey(); + SectionDTO? sectionDTO; + late VisitAppContext visitAppContext; + late dynamic rawSectionData; + + @override + void initState() { + widget.visitAppContextIn.isContentCurrentlyShown = true; + + //_controllerCenter = ConfettiController(duration: const Duration(seconds: 10)); + //_controllerCenter!.play(); + + super.initState(); + } + + @override + void dispose() { + visitAppContext.isContentCurrentlyShown = false; + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final appContext = Provider.of(context); + Size size = MediaQuery.of(context).size; + visitAppContext = appContext.getContext(); + + return Scaffold( + key: _scaffoldKey, + appBar: CustomAppBar( + title: sectionDTO != null ? TranslationHelper.get(sectionDTO!.title, visitAppContext) : "", + isHomeButton: false, + ), + body: OrientationBuilder( + builder: (context, orientation) { + return FutureBuilder( + future: getSectionDetail(appContext, visitAppContext.clientAPI, widget.sectionId), // MAYBE MOVE THAT TO PARENT .. + builder: (context, AsyncSnapshot snapshot) { + if(quizDTO != null && sectionDTO != null) { + + if(showResult) { + var goodResponses = 0; + for (var question in _questionsSubDTO) { + if(question.chosen == question.responsesSubDTO!.indexWhere((response) => response.isGood!)) { + goodResponses +=1; + } + } + log("goodResponses =" + goodResponses.toString()); + List levelToShow = []; + var test = goodResponses/quizDTO!.questions!.length; + + if((0 == test || test < 0.25) && quizDTO!.badLevel != null) { + levelToShow = quizDTO!.badLevel!; + } + if((test>=0.25 && test < 0.5) && quizDTO!.mediumLevel != null) { + levelToShow = quizDTO!.mediumLevel!; + } + if((test>=0.5 && test < 0.75) && quizDTO!.goodLevel != null) { + levelToShow = quizDTO!.goodLevel!; + } + if((test>=0.75 && test <= 1) && quizDTO!.greatLevel != null) { + levelToShow = quizDTO!.greatLevel!; + } + + return SizedBox( + width: double.infinity, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + /*Center( + child: SizedBox( + width: 5, + height: 5, + child: ConfettiWidget( + confettiController: _controllerCenter!, + blastDirectionality: BlastDirectionality.explosive, + shouldLoop: false, // start again as soon as the animation is finished + colors: const [ + kMainColor, + kSecondColor, + kConfigurationColor, + kMainColor1 + //Colors.pink, + //Colors.orange, + //Colors.purple + ], // manually specify the colors to be used + createParticlePath: drawPath, // define a custom shape/path. + ), + ), + ),*/ + if (orientation == Orientation.portrait) + Column( + children: [ + if (!showResponses && levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource?.url != null) // TODO SUPPORT OTHER THAN IMAGES + resultImage(visitAppContext, size, levelToShow, orientation), + if(!showResponses) + // TEXT BOX WITH MAIN SCORE + Text('$goodResponses/${quizDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), + ], + ), + + if (orientation == Orientation.landscape) + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + if(!showResponses) + // TEXT BOX WITH MAIN SCORE + Text('$goodResponses/${quizDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), + if (!showResponses && levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource?.url != null) + resultImage(visitAppContext, size, levelToShow, orientation), + ], + ), + + if(!showResponses) + // TEXT BOX WITH LEVEL TEXT RESULT + resultText(size, levelToShow, appContext), + if(showResponses) + QuestionsListWidget( + questionsSubDTO: _questionsSubDTO, + isShowResponse: true, + onShowResponse: () {}, + orientation: orientation, + ), + // RESPONSE BOX + //ShowReponsesWidget(questionsSubDTO: _questionsSubDTO), + + if(orientation == Orientation.portrait && !showResponses) + // Buttons + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: resultButtons(size, orientation, visitAppContext!), + ), + if(orientation == Orientation.landscape && !showResponses) + // Buttons + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: resultButtons(size, orientation, visitAppContext!), + ), + ], + ), + ); + + } else { + return QuestionsListWidget( + isShowResponse: false, + questionsSubDTO: _questionsSubDTO, + onShowResponse: () { + setState(() { + showResult = true; + }); + }, + orientation: orientation, + ); + } + } else { + return const LoadingCommon(); + } + } + ); + } + ), + floatingActionButton: showResponses ? FloatingActionButton( + onPressed: () { + setState(() { + showResult = false; + showResponses = false; + currentIndex = 1; + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); + }); + }, + backgroundColor: kBackgroundSecondGrey, + child: const Icon(Icons.undo), + ) : null, + floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat, + ); + } + + Future getSectionDetail(AppContext appContext, Client client, String sectionId) async { + try { + if(sectionDTO == null) { + bool isConfigOffline = (appContext.getContext() as VisitAppContext).configuration!.isOffline!; + if(isConfigOffline) + { + // OFFLINE + List> sectionTest = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.sections, sectionId); + if(sectionTest.isNotEmpty) { + sectionDTO = DatabaseHelper.instance.getSectionFromDB(sectionTest.first); + try { + SectionRead sectionRead = SectionRead(id: sectionDTO!.id!, readTime: DateTime.now().millisecondsSinceEpoch); + await DatabaseHelper.instance.insert(DatabaseTableType.articleRead, sectionRead.toMap()); + visitAppContext.readSections.add(sectionRead); + + appContext.setContext(visitAppContext); + } catch (e) { + print("DATABASE ERROR SECTIONREAD"); + print(e); + } + } else { + print("EMPTY SECTION"); + } + } else + { + // ONLINE + SectionDTO? sectionOnline = await client.sectionApi!.sectionGetDetail(sectionId); + if(sectionOnline != null) { + sectionDTO = sectionOnline; + } else { + print("EMPTY SECTION"); + } + } + + if(sectionDTO!.type == SectionType.Quiz) { + quizDTO = QuizDTO.fromJson(jsonDecode(sectionDTO!.data!)); + } + if(quizDTO != null) { + quizDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); + if(quizDTO!.questions != null && quizDTO!.questions!.isNotEmpty) { + quizDTO!.questions!.sort((a, b) => a.order!.compareTo(b.order!)); + for (var question in quizDTO!.questions!) { + if(isConfigOffline) + { + // OFFLINE + if(question.imageBackgroundResourceId != null) { + List> ressourceQuizz = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, question.imageBackgroundResourceId!); + if(ressourceQuizz.isNotEmpty) { + resourcesModel.add(DatabaseHelper.instance.getResourceFromDB(ressourceQuizz.first)); + } else { + print("EMPTY resourcesModel - second"); + } + } + } + else + { + // ONLINE + if(question.imageBackgroundResourceId != null) { + resourcesModel.add(ResourceModel(id: question.imageBackgroundResourceId, source: question.imageBackgroundResourceUrl, type: ResourceType.Image)); + } + } + } + } + } + + setState(() { + //print(sectionDTO!.title); + }); + } else { + return null; // TODO return local list.. + } + } catch (e) { + print(e); + print("IN CATCH"); + return null; + } + } + + resultImage(VisitAppContext visitAppContext, Size size, List levelToShow, Orientation orientation) { + return Container( + //height: size.height * 0.2, + //width: size.width * 0.25, + constraints: BoxConstraints( + maxHeight: size.height * 0.25, + maxWidth: kIsWeb ? size.width * 0.20 : orientation == Orientation.portrait ? size.width * 0.85 : size.width * 0.4, + ), + alignment: Alignment.center, + decoration: BoxDecoration( + image: levelToShow.where((label) => label.language == visitAppContext.language).isNotEmpty ? DecorationImage( + fit: BoxFit.contain, + opacity: 0.85, + image: NetworkImage( + levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource!.url!, + ), + ): null, + borderRadius: const BorderRadius.all( Radius.circular(50.0)), + border: Border.all( + color: kBackgroundGrey, + width: 1.0, + ), + ), + child: Container( + //borderRadius: BorderRadius.all(Radius.circular(25.0)), + decoration: BoxDecoration( + color: const Color(0xff7c94b6), + image: DecorationImage( + image: NetworkImage( + levelToShow.firstWhere((label) => label.language == visitAppContext.language).resource!.url!, // TODO REDUNDANCY here?? + ), + fit: BoxFit.cover, + ), + borderRadius: const BorderRadius.all( Radius.circular(50.0)), + border: Border.all( + color: kBackgroundGrey, + width: 1.0, + ), + ), + ), + ); + } + + resultText(Size size, List levelToShow, AppContext appContext) { + return Padding( + padding: const EdgeInsets.only(bottom: 10), + child: Container( + width: size.width *0.75, + height: kIsWeb ? (showResponses ? size.height *0.10 : size.height *0.20) : size.height *0.25, + decoration: BoxDecoration( + color: kBackgroundLight, //kBackgroundLight + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(10.0), + boxShadow: const [ + BoxShadow( + color: kBackgroundSecondGrey, + spreadRadius: 0.3, + blurRadius: 4, + offset: Offset(0, 2), // changes position of shadow + ), + ], + ), + child: Center( + child: SizedBox( + width: double.infinity, + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Text(TranslationHelper.getWithResource(levelToShow, appContext.getContext() as VisitAppContext), textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kDescriptionSize : kDescriptionSize)), + ), + ), + ), + ), + ), + ); + } + + resultButtons(Size size, Orientation orientation, VisitAppContext visitAppContext) { + return [ + Padding( + padding: const EdgeInsets.all(4), + child: SizedBox( + height: kIsWeb ? 50 : 40, + width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.35, + child: RoundedButton( + text: TranslationHelper.getFromLocale("restart", visitAppContext), + color: kBackgroundSecondGrey, + textColor: kBackgroundLight, + icon: Icons.undo, + press: () { + setState(() { + showResult = false; + showResponses = false; + currentIndex = 1; + _questionsSubDTO = QuestionSubDTO().fromJSON(quizDTO!.questions!); + }); + }, + fontSize: 18, + horizontal: 20, + vertical: 5 + ), + ), + ), + Padding( + padding: const EdgeInsets.all(4.0), + child: SizedBox( + height: kIsWeb ? 50 : 40, + width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.35, + child: RoundedButton( + text: TranslationHelper.getFromLocale("responses", visitAppContext), + color: kBackgroundSecondGrey, + textColor: kBackgroundLight, + icon: Icons.assignment_turned_in, + press: () { + setState(() { + showResponses = true; + }); + }, + fontSize: 18, + horizontal: 20, + vertical: 5 + ), + ), + ) + ]; + } +} diff --git a/lib/Services/apiService.dart b/lib/Services/apiService.dart index c6bdf1b..17726ab 100644 --- a/lib/Services/apiService.dart +++ b/lib/Services/apiService.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/networkCheck.dart'; import 'package:mymuseum_visitapp/Models/resourceModel.dart'; @@ -22,7 +22,7 @@ class ApiService { if(configurations.isNotEmpty) { for(var configuration in configurations) { if(configuration.imageId != null) { - await downloadAndPushLocalImage(client, ContentDTO(resourceUrl: configuration.imageSource, resourceId: configuration.imageId)); + await downloadAndPushLocalImage(client, ContentDTO(resource: ResourceDTO(url: configuration.imageSource, id: configuration.imageId))); } } } @@ -98,13 +98,13 @@ class ApiService { } } - static Future downloadImage(Client client, ContentDTO contentDTO) async { - var source = contentDTO.resourceUrl; + static Future downloadImage(Client client, ContentDTO contentDTO) async { // TODO CHECK wtf mymuseum + var source = contentDTO.resource!.url; //print("SOURCE getAndDownloadImage"); - if(contentDTO.resourceUrl != null) { - if(contentDTO.resourceUrl!.contains("localhost:5000")){ + if(contentDTO.resource!.url != null) { + if(contentDTO.resource!.url!.contains("localhost:5000")){ print("Contains localhost:5000"); - source = contentDTO.resourceUrl!.replaceAll("http://localhost:5000", client.apiApi!.basePath); + source = contentDTO.resource!.url!.replaceAll("http://localhost:5000", client.apiApi!.basePath); } } else { source = "https://api.mymuseum.be/api/Resource/"+contentDTO.resourceId!; // TODO UPDATE ROUTE @@ -118,7 +118,7 @@ class ApiService { await for(dynamic d in response) { _downloadData.addAll(d); } //print("AFTER"); final base64Str = base64.encode(_downloadData); - ResourceModel resourceModel = ResourceModel(id: contentDTO.resourceId, source: contentDTO.resourceUrl, path: base64Str, type: ResourceType.Image); + ResourceModel resourceModel = ResourceModel(id: contentDTO.resourceId, source: contentDTO.resource!.url, path: base64Str, type: ResourceType.Image); return resourceModel; } @@ -192,8 +192,7 @@ class ApiService { try { bool isOnline = await hasNetwork(); if(isOnline) { - ExportConfigurationDTO? exportConfiguration = await client.configurationApi!.configurationExport(configurationId, language); - + ExportConfigurationDTO? exportConfiguration = await client.configurationApi!.configurationExport(configurationId, language: language); return exportConfiguration; } else { return null; // TODO return local list.. diff --git a/lib/Services/downloadConfiguration.dart b/lib/Services/downloadConfiguration.dart index bd0c189..0dc534c 100644 --- a/lib/Services/downloadConfiguration.dart +++ b/lib/Services/downloadConfiguration.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/modelsHelper.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; @@ -61,7 +61,7 @@ class _DownloadConfigurationWidgetState extends State sectionsInDB = await DatabaseHelper.instance.queryWithConfigurationId(DatabaseTableType.sections, widget.configuration.id!); - List sectionsToKeep = sections.where((s) => s.type == SectionType.Article || s.type == SectionType.Quizz).toList(); // TODO handle other type of section (for now, Article and Quizz) + List sectionsToKeep = sections.where((s) => s.type == SectionType.Article || s.type == SectionType.Quiz).toList(); // TODO handle other type of section (for now, Article and Quizz) sectionsToKeep.sort((a,b) => a.order!.compareTo(b.order!)); int newOrder = 0; diff --git a/lib/api/openApiTest.dart b/lib/api/openApiTest.dart index 7f98cd3..cf54230 100644 --- a/lib/api/openApiTest.dart +++ b/lib/api/openApiTest.dart @@ -1,12 +1,12 @@ +// Openapi Generator last run: : 2025-05-27T14:44:29.936214 import 'package:openapi_generator_annotations/openapi_generator_annotations.dart'; @Openapi( additionalProperties: - AdditionalProperties(pubName: 'manager_api', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), - inputSpecFile: 'lib/api/swagger.yaml', + AdditionalProperties(pubName: 'manager_api_new', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), + inputSpec: InputSpec(path: 'lib/api/swagger.yaml'), generatorName: Generator.dart, - alwaysRun: true, - outputDirectory: 'manager_api') + outputDirectory: 'manager_api_new') class Example extends OpenapiGeneratorConfig {} /* diff --git a/lib/client.dart b/lib/client.dart index 8ccfd94..886f6d4 100644 --- a/lib/client.dart +++ b/lib/client.dart @@ -1,7 +1,7 @@ //import 'package:managerapi/api.dart'; //import 'package:openapi_dart_common/openapi.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class Client { ApiClient? _apiClient; diff --git a/lib/main.dart b/lib/main.dart index 427b62a..bbcf2d0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -32,7 +32,7 @@ void main() async { List articleReadTest = List.from(await DatabaseHelper.instance.getData(DatabaseTableType.articleRead)); localContext.readSections = articleReadTest; } else { - localContext = VisitAppContext(language: "FR", id: "UserId_Init", instanceId: "633ee379d9405f32f166f047", isAdmin: false, isAllLanguages: false); // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- 633ee379d9405f32f166f047 MyMuseum Fort Saint-Héribert - MyMuseum instance 63514fd67ed8c735aaa4b8f1 // MDLF instance 65ccc67265373befd15be511 + localContext = VisitAppContext(language: "FR", id: "UserId_Init", instanceId: "63514fd67ed8c735aaa4b8f2", isAdmin: false, isAllLanguages: false); // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- 633ee379d9405f32f166f047 MyMuseum Fort Saint-Héribert - MyMuseum instance 63514fd67ed8c735aaa4b8f1 // MDLF instance 65ccc67265373befd15be511 DatabaseHelper.instance.insert(DatabaseTableType.main, localContext.toMap()); List articleReadTest = List.from(await DatabaseHelper.instance.getData(DatabaseTableType.articleRead)); diff --git a/manager_api/.openapi-generator/VERSION b/manager_api/.openapi-generator/VERSION deleted file mode 100644 index 717311e..0000000 --- a/manager_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -unset \ No newline at end of file diff --git a/manager_api/README.md b/manager_api/README.md deleted file mode 100644 index 7a47de3..0000000 --- a/manager_api/README.md +++ /dev/null @@ -1,192 +0,0 @@ -# manager_api -API Manager Service - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: Version Alpha -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 2.12 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, add the following dependency to your pubspec.yaml -``` -dependencies: - manager_api: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -### Local -To use the package in your local drive, add the following dependency to your pubspec.yaml -``` -dependencies: - manager_api: - path: /path/to/manager_api -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:manager_api/api.dart'; - -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = AuthenticationApi(); -final grantType = grantType_example; // String | -final username = username_example; // String | -final password = password_example; // String | -final clientId = clientId_example; // String | -final clientSecret = clientSecret_example; // String | - -try { - final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret); - print(result); -} catch (e) { - print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n'); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.myinfomate.be* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | -*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | -*ConfigurationApi* | [**configurationCreate**](doc\/ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration | -*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} | -*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export | -*ConfigurationApi* | [**configurationGet**](doc\/ConfigurationApi.md#configurationget) | **GET** /api/Configuration | -*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc\/ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin | -*ConfigurationApi* | [**configurationGetDetail**](doc\/ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} | -*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import | -*ConfigurationApi* | [**configurationUpdate**](doc\/ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration | -*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/Device | -*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} | -*DeviceApi* | [**deviceGet**](doc\/DeviceApi.md#deviceget) | **GET** /api/Device | -*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail | -*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device | -*DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos | -*InstanceApi* | [**instanceCreateInstance**](doc\/InstanceApi.md#instancecreateinstance) | **POST** /api/Instance | -*InstanceApi* | [**instanceDeleteInstance**](doc\/InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} | -*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance | -*InstanceApi* | [**instanceGetDetail**](doc\/InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} | -*InstanceApi* | [**instanceGetInstanceByPinCode**](doc\/InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin | -*InstanceApi* | [**instanceUpdateinstance**](doc\/InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance | -*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource | -*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} | -*ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource | -*ResourceApi* | [**resourceGetDetail**](doc\/ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail | -*ResourceApi* | [**resourceShow**](doc\/ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} | -*ResourceApi* | [**resourceUpdate**](doc\/ResourceApi.md#resourceupdate) | **PUT** /api/Resource | -*ResourceApi* | [**resourceUpload**](doc\/ResourceApi.md#resourceupload) | **POST** /api/Resource/upload | -*SectionApi* | [**sectionCreate**](doc\/SectionApi.md#sectioncreate) | **POST** /api/Section | -*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} | -*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | -*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section | -*SectionApi* | [**sectionGetAgendaDTO**](doc\/SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO | -*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} | -*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | -*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | -*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | -*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | -*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | -*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | -*SectionApi* | [**sectionGetPdfDTO**](doc\/SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | -*SectionApi* | [**sectionGetPuzzleDTO**](doc\/SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | -*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO | -*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | -*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | -*SectionApi* | [**sectionGetWeatherDTO**](doc\/SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | -*SectionApi* | [**sectionGetWebDTO**](doc\/SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO | -*SectionApi* | [**sectionPlayerMessageDTO**](doc\/SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO | -*SectionApi* | [**sectionUpdate**](doc\/SectionApi.md#sectionupdate) | **PUT** /api/Section | -*SectionApi* | [**sectionUpdateOrder**](doc\/SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order | -*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/User | -*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} | -*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/User | -*UserApi* | [**userGetDetail**](doc\/UserApi.md#usergetdetail) | **GET** /api/User/{id} | -*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/User | - - -## Documentation For Models - - - [AgendaDTO](doc\/AgendaDTO.md) - - [ArticleDTO](doc\/ArticleDTO.md) - - [CategorieDTO](doc\/CategorieDTO.md) - - [ConfigurationDTO](doc\/ConfigurationDTO.md) - - [ContentDTO](doc\/ContentDTO.md) - - [ContentGeoPoint](doc\/ContentGeoPoint.md) - - [DeviceDTO](doc\/DeviceDTO.md) - - [DeviceDetailDTO](doc\/DeviceDetailDTO.md) - - [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md) - - [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md) - - [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md) - - [GeoPointDTO](doc\/GeoPointDTO.md) - - [GeoPointDTOCategorie](doc\/GeoPointDTOCategorie.md) - - [Instance](doc\/Instance.md) - - [InstanceDTO](doc\/InstanceDTO.md) - - [LevelDTO](doc\/LevelDTO.md) - - [LoginDTO](doc\/LoginDTO.md) - - [MapDTO](doc\/MapDTO.md) - - [MapDTOMapProvider](doc\/MapDTOMapProvider.md) - - [MapDTOMapType](doc\/MapDTOMapType.md) - - [MapDTOMapTypeMapbox](doc\/MapDTOMapTypeMapbox.md) - - [MapProvider](doc\/MapProvider.md) - - [MapTypeApp](doc\/MapTypeApp.md) - - [MapTypeMapBox](doc\/MapTypeMapBox.md) - - [MenuDTO](doc\/MenuDTO.md) - - [PDFFileDTO](doc\/PDFFileDTO.md) - - [PdfDTO](doc\/PdfDTO.md) - - [PlayerMessageDTO](doc\/PlayerMessageDTO.md) - - [PuzzleDTO](doc\/PuzzleDTO.md) - - [PuzzleDTOImage](doc\/PuzzleDTOImage.md) - - [QuestionDTO](doc\/QuestionDTO.md) - - [QuizzDTO](doc\/QuizzDTO.md) - - [QuizzDTOBadLevel](doc\/QuizzDTOBadLevel.md) - - [ResourceDTO](doc\/ResourceDTO.md) - - [ResourceType](doc\/ResourceType.md) - - [ResponseDTO](doc\/ResponseDTO.md) - - [SectionDTO](doc\/SectionDTO.md) - - [SectionType](doc\/SectionType.md) - - [SliderDTO](doc\/SliderDTO.md) - - [TokenDTO](doc\/TokenDTO.md) - - [TranslationAndResourceDTO](doc\/TranslationAndResourceDTO.md) - - [TranslationDTO](doc\/TranslationDTO.md) - - [User](doc\/User.md) - - [UserDetailDTO](doc\/UserDetailDTO.md) - - [VideoDTO](doc\/VideoDTO.md) - - [WeatherDTO](doc\/WeatherDTO.md) - - [WebDTO](doc\/WebDTO.md) - - -## Documentation For Authorization - - -Authentication schemes defined for the API: -### bearer - -- **Type**: OAuth -- **Flow**: password -- **Authorization URL**: /authentication/Token -- **Scopes**: - - **Manager-api**: Manager WebAPI - - -## Author - - - diff --git a/manager_api/doc/ArticleDTO.md b/manager_api/doc/ArticleDTO.md deleted file mode 100644 index b8e31fb..0000000 --- a/manager_api/doc/ArticleDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# manager_api.model.ArticleDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**isContentTop** | **bool** | | [optional] -**audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**isReadAudioAuto** | **bool** | | [optional] -**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/MapDTO.md b/manager_api/doc/MapDTO.md deleted file mode 100644 index ffcad9b..0000000 --- a/manager_api/doc/MapDTO.md +++ /dev/null @@ -1,24 +0,0 @@ -# manager_api.model.MapDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zoom** | **int** | | [optional] -**mapType** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional] -**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] -**points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] -**iconResourceId** | **String** | | [optional] -**iconSource** | **String** | | [optional] -**categories** | [**List**](CategorieDTO.md) | | [optional] [default to const []] -**latitude** | **String** | | [optional] -**longitude** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/PuzzleDTO.md b/manager_api/doc/PuzzleDTO.md deleted file mode 100644 index a6655c1..0000000 --- a/manager_api/doc/PuzzleDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# manager_api.model.PuzzleDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageDebut** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] -**messageFin** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] -**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional] -**rows** | **int** | | [optional] -**cols** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/SliderDTO.md b/manager_api/doc/SliderDTO.md deleted file mode 100644 index 31d6839..0000000 --- a/manager_api/doc/SliderDTO.md +++ /dev/null @@ -1,15 +0,0 @@ -# manager_api.model.SliderDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/WeatherDTO.md b/manager_api/doc/WeatherDTO.md deleted file mode 100644 index fedb7d7..0000000 --- a/manager_api/doc/WeatherDTO.md +++ /dev/null @@ -1,17 +0,0 @@ -# manager_api.model.WeatherDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**city** | **String** | | [optional] -**updatedDate** | [**DateTime**](DateTime.md) | | [optional] -**result** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/lib/model/agenda_dto.dart b/manager_api/lib/model/agenda_dto.dart deleted file mode 100644 index 27e2e1b..0000000 --- a/manager_api/lib/model/agenda_dto.dart +++ /dev/null @@ -1,123 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AgendaDTO { - /// Returns a new [AgendaDTO] instance. - AgendaDTO({ - this.resourceIds = const [], - this.mapProvider, - }); - - List? resourceIds; - - MapProvider? mapProvider; - - @override - bool operator ==(Object other) => identical(this, other) || other is AgendaDTO && - other.resourceIds == resourceIds && - other.mapProvider == mapProvider; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (resourceIds == null ? 0 : resourceIds!.hashCode) + - (mapProvider == null ? 0 : mapProvider!.hashCode); - - @override - String toString() => 'AgendaDTO[resourceIds=$resourceIds, mapProvider=$mapProvider]'; - - Map toJson() { - final json = {}; - if (this.resourceIds != null) { - json[r'resourceIds'] = this.resourceIds; - } else { - json[r'resourceIds'] = null; - } - if (this.mapProvider != null) { - json[r'mapProvider'] = this.mapProvider; - } else { - json[r'mapProvider'] = null; - } - return json; - } - - /// Returns a new [AgendaDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AgendaDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "AgendaDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "AgendaDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return AgendaDTO( - resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']), - mapProvider: MapProvider.fromJson(json[r'mapProvider']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AgendaDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AgendaDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AgendaDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AgendaDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart deleted file mode 100644 index 2221429..0000000 --- a/manager_api/lib/model/article_dto.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ArticleDTO { - /// Returns a new [ArticleDTO] instance. - ArticleDTO({ - this.content = const [], - this.isContentTop, - this.audioIds = const [], - this.isReadAudioAuto, - this.contents = const [], - }); - - List? content; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isContentTop; - - List? audioIds; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isReadAudioAuto; - - List? contents; - - @override - bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && - other.content == content && - other.isContentTop == isContentTop && - other.audioIds == audioIds && - other.isReadAudioAuto == isReadAudioAuto && - other.contents == contents; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (content == null ? 0 : content!.hashCode) + - (isContentTop == null ? 0 : isContentTop!.hashCode) + - (audioIds == null ? 0 : audioIds!.hashCode) + - (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + - (contents == null ? 0 : contents!.hashCode); - - @override - String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; - - Map toJson() { - final json = {}; - if (this.content != null) { - json[r'content'] = this.content; - } else { - json[r'content'] = null; - } - if (this.isContentTop != null) { - json[r'isContentTop'] = this.isContentTop; - } else { - json[r'isContentTop'] = null; - } - if (this.audioIds != null) { - json[r'audioIds'] = this.audioIds; - } else { - json[r'audioIds'] = null; - } - if (this.isReadAudioAuto != null) { - json[r'isReadAudioAuto'] = this.isReadAudioAuto; - } else { - json[r'isReadAudioAuto'] = null; - } - if (this.contents != null) { - json[r'contents'] = this.contents; - } else { - json[r'contents'] = null; - } - return json; - } - - /// Returns a new [ArticleDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ArticleDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ArticleDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ArticleDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return ArticleDTO( - content: TranslationDTO.listFromJson(json[r'content']), - isContentTop: mapValueOfType(json, r'isContentTop'), - audioIds: TranslationDTO.listFromJson(json[r'audioIds']), - isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), - contents: ContentDTO.listFromJson(json[r'contents']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ArticleDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ArticleDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ArticleDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ArticleDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/map_dto.dart b/manager_api/lib/model/map_dto.dart deleted file mode 100644 index 0f97a93..0000000 --- a/manager_api/lib/model/map_dto.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapDTO { - /// Returns a new [MapDTO] instance. - MapDTO({ - this.zoom, - this.mapType, - this.mapTypeMapbox, - this.mapProvider, - this.points = const [], - this.iconResourceId, - this.iconSource, - this.categories = const [], - this.latitude, - this.longitude, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? zoom; - - MapTypeApp? mapType; - - MapTypeMapBox? mapTypeMapbox; - - MapProvider? mapProvider; - - List? points; - - String? iconResourceId; - - String? iconSource; - - List? categories; - - String? latitude; - - String? longitude; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapDTO && - other.zoom == zoom && - other.mapType == mapType && - other.mapTypeMapbox == mapTypeMapbox && - other.mapProvider == mapProvider && - other.points == points && - other.iconResourceId == iconResourceId && - other.iconSource == iconSource && - other.categories == categories && - other.latitude == latitude && - other.longitude == longitude; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (zoom == null ? 0 : zoom!.hashCode) + - (mapType == null ? 0 : mapType!.hashCode) + - (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + - (mapProvider == null ? 0 : mapProvider!.hashCode) + - (points == null ? 0 : points!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconSource == null ? 0 : iconSource!.hashCode) + - (categories == null ? 0 : categories!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode); - - @override - String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, latitude=$latitude, longitude=$longitude]'; - - Map toJson() { - final json = {}; - if (this.zoom != null) { - json[r'zoom'] = this.zoom; - } else { - json[r'zoom'] = null; - } - if (this.mapType != null) { - json[r'mapType'] = this.mapType; - } else { - json[r'mapType'] = null; - } - if (this.mapTypeMapbox != null) { - json[r'mapTypeMapbox'] = this.mapTypeMapbox; - } else { - json[r'mapTypeMapbox'] = null; - } - if (this.mapProvider != null) { - json[r'mapProvider'] = this.mapProvider; - } else { - json[r'mapProvider'] = null; - } - if (this.points != null) { - json[r'points'] = this.points; - } else { - json[r'points'] = null; - } - if (this.iconResourceId != null) { - json[r'iconResourceId'] = this.iconResourceId; - } else { - json[r'iconResourceId'] = null; - } - if (this.iconSource != null) { - json[r'iconSource'] = this.iconSource; - } else { - json[r'iconSource'] = null; - } - if (this.categories != null) { - json[r'categories'] = this.categories; - } else { - json[r'categories'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - json[r'latitude'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - json[r'longitude'] = null; - } - return json; - } - - /// Returns a new [MapDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return MapDTO( - zoom: mapValueOfType(json, r'zoom'), - mapType: MapTypeApp.fromJson(json[r'mapType']), - mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']), - mapProvider: MapProvider.fromJson(json[r'mapProvider']), - points: GeoPointDTO.listFromJson(json[r'points']), - iconResourceId: mapValueOfType(json, r'iconResourceId'), - iconSource: mapValueOfType(json, r'iconSource'), - categories: CategorieDTO.listFromJson(json[r'categories']), - latitude: mapValueOfType(json, r'latitude'), - longitude: mapValueOfType(json, r'longitude'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/puzzle_dto.dart b/manager_api/lib/model/puzzle_dto.dart deleted file mode 100644 index 14654e5..0000000 --- a/manager_api/lib/model/puzzle_dto.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PuzzleDTO { - /// Returns a new [PuzzleDTO] instance. - PuzzleDTO({ - this.messageDebut = const [], - this.messageFin = const [], - this.image, - this.rows, - this.cols, - }); - - List? messageDebut; - - List? messageFin; - - PuzzleDTOImage? image; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? rows; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? cols; - - @override - bool operator ==(Object other) => identical(this, other) || other is PuzzleDTO && - other.messageDebut == messageDebut && - other.messageFin == messageFin && - other.image == image && - other.rows == rows && - other.cols == cols; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (messageDebut == null ? 0 : messageDebut!.hashCode) + - (messageFin == null ? 0 : messageFin!.hashCode) + - (image == null ? 0 : image!.hashCode) + - (rows == null ? 0 : rows!.hashCode) + - (cols == null ? 0 : cols!.hashCode); - - @override - String toString() => 'PuzzleDTO[messageDebut=$messageDebut, messageFin=$messageFin, image=$image, rows=$rows, cols=$cols]'; - - Map toJson() { - final json = {}; - if (this.messageDebut != null) { - json[r'messageDebut'] = this.messageDebut; - } else { - json[r'messageDebut'] = null; - } - if (this.messageFin != null) { - json[r'messageFin'] = this.messageFin; - } else { - json[r'messageFin'] = null; - } - if (this.image != null) { - json[r'image'] = this.image; - } else { - json[r'image'] = null; - } - if (this.rows != null) { - json[r'rows'] = this.rows; - } else { - json[r'rows'] = null; - } - if (this.cols != null) { - json[r'cols'] = this.cols; - } else { - json[r'cols'] = null; - } - return json; - } - - /// Returns a new [PuzzleDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PuzzleDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PuzzleDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PuzzleDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return PuzzleDTO( - messageDebut: TranslationAndResourceDTO.listFromJson(json[r'messageDebut']), - messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']), - image: PuzzleDTOImage.fromJson(json[r'image']), - rows: mapValueOfType(json, r'rows'), - cols: mapValueOfType(json, r'cols'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PuzzleDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PuzzleDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PuzzleDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PuzzleDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/weather_dto.dart b/manager_api/lib/model/weather_dto.dart deleted file mode 100644 index e2447d0..0000000 --- a/manager_api/lib/model/weather_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WeatherDTO { - /// Returns a new [WeatherDTO] instance. - WeatherDTO({ - this.city, - this.updatedDate, - this.result, - }); - - String? city; - - DateTime? updatedDate; - - String? result; - - @override - bool operator ==(Object other) => identical(this, other) || other is WeatherDTO && - other.city == city && - other.updatedDate == updatedDate && - other.result == result; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (updatedDate == null ? 0 : updatedDate!.hashCode) + - (result == null ? 0 : result!.hashCode); - - @override - String toString() => 'WeatherDTO[city=$city, updatedDate=$updatedDate, result=$result]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.updatedDate != null) { - json[r'updatedDate'] = this.updatedDate!.toUtc().toIso8601String(); - } else { - json[r'updatedDate'] = null; - } - if (this.result != null) { - json[r'result'] = this.result; - } else { - json[r'result'] = null; - } - return json; - } - - /// Returns a new [WeatherDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WeatherDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "WeatherDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "WeatherDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return WeatherDTO( - city: mapValueOfType(json, r'city'), - updatedDate: mapDateTime(json, r'updatedDate', ''), - result: mapValueOfType(json, r'result'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WeatherDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WeatherDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WeatherDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WeatherDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/pubspec.lock b/manager_api/pubspec.lock deleted file mode 100644 index be75c19..0000000 --- a/manager_api/pubspec.lock +++ /dev/null @@ -1,413 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43" - url: "https://pub.dev" - source: hosted - version: "31.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03" - url: "https://pub.dev" - source: hosted - version: "2.8.0" - args: - dependency: transitive - description: - name: args - sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - async: - dependency: transitive - description: - name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 - url: "https://pub.dev" - source: hosted - version: "2.10.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" - url: "https://pub.dev" - source: hosted - version: "0.3.5" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 - url: "https://pub.dev" - source: hosted - version: "1.17.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - coverage: - dependency: transitive - description: - name: coverage - sha256: ad538fa2e8f6b828d54c04a438af816ce814de404690136d3b9dfb3a436cd01c - url: "https://pub.dev" - source: hosted - version: "1.0.3" - crypto: - dependency: transitive - description: - name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 - url: "https://pub.dev" - source: hosted - version: "3.0.2" - file: - dependency: transitive - description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://pub.dev" - source: hosted - version: "6.1.4" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - glob: - dependency: transitive - description: - name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - http: - dependency: "direct main" - description: - name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - intl: - dependency: "direct main" - description: - name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" - source: hosted - version: "0.19.0" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: "323b7c70073cccf6b9b8d8b334be418a3293cfb612a560dc2737160a37bf61bd" - url: "https://pub.dev" - source: hosted - version: "0.6.6" - logging: - dependency: transitive - description: - name: logging - sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 - url: "https://pub.dev" - source: hosted - version: "1.1.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "2e2c34e631f93410daa3ee3410250eadc77ac6befc02a040eda8a123f34e6f5a" - url: "https://pub.dev" - source: hosted - version: "0.12.11" - meta: - dependency: "direct main" - description: - name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" - url: "https://pub.dev" - source: hosted - version: "1.8.0" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e - url: "https://pub.dev" - source: hosted - version: "1.0.4" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - shelf: - dependency: transitive - description: - name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c - url: "https://pub.dev" - source: hosted - version: "1.4.0" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 - url: "https://pub.dev" - source: hosted - version: "3.0.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c - url: "https://pub.dev" - source: hosted - version: "1.1.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 - url: "https://pub.dev" - source: hosted - version: "1.0.3" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "490098075234dcedb83c5d949b4c93dad5e6b7702748de000be2b57b8e6b2427" - url: "https://pub.dev" - source: hosted - version: "0.10.11" - source_span: - dependency: transitive - description: - name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 - url: "https://pub.dev" - source: hosted - version: "1.9.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test: - dependency: "direct dev" - description: - name: test - sha256: d8df85e0659006d6dd09dd5d1d4bf81848d34fbe5b1fdd2b2a90e690aaa8195e - url: "https://pub.dev" - source: hosted - version: "1.17.12" - test_api: - dependency: transitive - description: - name: test_api - sha256: "3c3c3eb64242eec8aeb7a7e530cd541737a84bb01fc08b363b429aaa4a91060d" - url: "https://pub.dev" - source: hosted - version: "0.4.3" - test_core: - dependency: transitive - description: - name: test_core - sha256: f269e59fdd3abd14d6d92d3da9a03f69e931e9dd9140d6f06f94fc2204584741 - url: "https://pub.dev" - source: hosted - version: "0.4.2" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "35ef1bbae978d7158e09c98dcdfe8673b58a30eb53e82833cc027e0aab2d5213" - url: "https://pub.dev" - source: hosted - version: "7.5.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b - url: "https://pub.dev" - source: hosted - version: "2.3.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" - url: "https://pub.dev" - source: hosted - version: "3.1.1" -sdks: - dart: ">=3.3.0 <4.0.0" diff --git a/manager_api/pubspec.yaml b/manager_api/pubspec.yaml deleted file mode 100644 index 9ad30da..0000000 --- a/manager_api/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'manager_api' -version: '1.0.0' -description: 'OpenAPI API client' -homepage: 'homepage' -environment: - sdk: ">=3.1.0 <4.0.0" -dependencies: - http: '^1.1.0' - intl: '^0.19.0' - meta: '^1.1.8' -dev_dependencies: - test: '>=1.16.0 <1.18.0' diff --git a/manager_api/.gitignore b/manager_api_new/.gitignore similarity index 75% rename from manager_api/.gitignore rename to manager_api_new/.gitignore index 1be28ce..0f74d29 100644 --- a/manager_api/.gitignore +++ b/manager_api_new/.gitignore @@ -3,7 +3,9 @@ .dart_tool/ .packages build/ -pubspec.lock # Except for application packages + +# Except for application packages +pubspec.lock doc/api/ diff --git a/manager_api/.openapi-generator-ignore b/manager_api_new/.openapi-generator-ignore similarity index 100% rename from manager_api/.openapi-generator-ignore rename to manager_api_new/.openapi-generator-ignore diff --git a/manager_api/.openapi-generator/FILES b/manager_api_new/.openapi-generator/FILES similarity index 62% rename from manager_api/.openapi-generator/FILES rename to manager_api_new/.openapi-generator/FILES index 7849567..8f248e2 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api_new/.openapi-generator/FILES @@ -3,48 +3,56 @@ README.md analysis_options.yaml doc/AgendaDTO.md +doc/AgendaDTOAllOfAgendaMapProvider.md doc/ArticleDTO.md doc/AuthenticationApi.md doc/CategorieDTO.md doc/ConfigurationApi.md doc/ConfigurationDTO.md doc/ContentDTO.md -doc/ContentGeoPoint.md +doc/ContentDTOResource.md doc/DeviceApi.md doc/DeviceDTO.md doc/DeviceDetailDTO.md -doc/DeviceDetailDTOAllOf.md doc/ExportConfigurationDTO.md -doc/ExportConfigurationDTOAllOf.md +doc/GeoPoint.md doc/GeoPointDTO.md -doc/GeoPointDTOCategorie.md +doc/GeoPointSectionMap.md doc/Instance.md doc/InstanceApi.md doc/InstanceDTO.md -doc/LevelDTO.md doc/LoginDTO.md doc/MapDTO.md -doc/MapDTOMapProvider.md -doc/MapDTOMapType.md -doc/MapDTOMapTypeMapbox.md +doc/MapDTOAllOfMapProvider.md +doc/MapDTOAllOfMapType.md +doc/MapDTOAllOfMapTypeMapbox.md doc/MapProvider.md doc/MapTypeApp.md doc/MapTypeMapBox.md doc/MenuDTO.md -doc/PDFFileDTO.md +doc/OrderedTranslationAndResourceDTO.md doc/PdfDTO.md doc/PlayerMessageDTO.md doc/PuzzleDTO.md -doc/PuzzleDTOImage.md +doc/PuzzleDTOAllOfPuzzleImage.md doc/QuestionDTO.md -doc/QuizzDTO.md -doc/QuizzDTOBadLevel.md +doc/QuestionDTOImageBackgroundResourceType.md +doc/QuizDTO.md +doc/Resource.md doc/ResourceApi.md doc/ResourceDTO.md doc/ResourceType.md doc/ResponseDTO.md +doc/Section.md doc/SectionApi.md doc/SectionDTO.md +doc/SectionMap.md +doc/SectionMapAllOfMapMapProvider.md +doc/SectionMapAllOfMapMapType.md +doc/SectionMapAllOfMapResource.md +doc/SectionMapAllOfMapTypeMapbox.md +doc/SectionMapApi.md +doc/SectionQuizApi.md doc/SectionType.md doc/SliderDTO.md doc/TokenDTO.md @@ -64,6 +72,8 @@ lib/api/device_api.dart lib/api/instance_api.dart lib/api/resource_api.dart lib/api/section_api.dart +lib/api/section_map_api.dart +lib/api/section_quiz_api.dart lib/api/user_api.dart lib/api_client.dart lib/api_exception.dart @@ -74,42 +84,48 @@ lib/auth/http_basic_auth.dart lib/auth/http_bearer_auth.dart lib/auth/oauth.dart lib/model/agenda_dto.dart +lib/model/agenda_dto_all_of_agenda_map_provider.dart lib/model/article_dto.dart lib/model/categorie_dto.dart lib/model/configuration_dto.dart lib/model/content_dto.dart -lib/model/content_geo_point.dart +lib/model/content_dto_resource.dart lib/model/device_detail_dto.dart -lib/model/device_detail_dto_all_of.dart lib/model/device_dto.dart lib/model/export_configuration_dto.dart -lib/model/export_configuration_dto_all_of.dart +lib/model/geo_point.dart lib/model/geo_point_dto.dart -lib/model/geo_point_dto_categorie.dart +lib/model/geo_point_section_map.dart lib/model/instance.dart lib/model/instance_dto.dart -lib/model/level_dto.dart lib/model/login_dto.dart lib/model/map_dto.dart -lib/model/map_dto_map_provider.dart -lib/model/map_dto_map_type.dart -lib/model/map_dto_map_type_mapbox.dart +lib/model/map_dto_all_of_map_provider.dart +lib/model/map_dto_all_of_map_type.dart +lib/model/map_dto_all_of_map_type_mapbox.dart lib/model/map_provider.dart lib/model/map_type_app.dart lib/model/map_type_map_box.dart lib/model/menu_dto.dart +lib/model/ordered_translation_and_resource_dto.dart lib/model/pdf_dto.dart -lib/model/pdf_file_dto.dart lib/model/player_message_dto.dart lib/model/puzzle_dto.dart -lib/model/puzzle_dto_image.dart +lib/model/puzzle_dto_all_of_puzzle_image.dart lib/model/question_dto.dart -lib/model/quizz_dto.dart -lib/model/quizz_dto_bad_level.dart +lib/model/question_dto_image_background_resource_type.dart +lib/model/quiz_dto.dart +lib/model/resource.dart lib/model/resource_dto.dart lib/model/resource_type.dart lib/model/response_dto.dart +lib/model/section.dart lib/model/section_dto.dart +lib/model/section_map.dart +lib/model/section_map_all_of_map_map_provider.dart +lib/model/section_map_all_of_map_map_type.dart +lib/model/section_map_all_of_map_resource.dart +lib/model/section_map_all_of_map_type_mapbox.dart lib/model/section_type.dart lib/model/slider_dto.dart lib/model/token_dto.dart @@ -121,5 +137,3 @@ lib/model/video_dto.dart lib/model/weather_dto.dart lib/model/web_dto.dart pubspec.yaml -test/pdf_file_dto_test.dart -test/weather_dto_test.dart diff --git a/manager_api_new/.openapi-generator/VERSION b/manager_api_new/.openapi-generator/VERSION new file mode 100644 index 0000000..4bc5d61 --- /dev/null +++ b/manager_api_new/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.9.0 diff --git a/manager_api/.travis.yml b/manager_api_new/.travis.yml similarity index 100% rename from manager_api/.travis.yml rename to manager_api_new/.travis.yml diff --git a/manager_api_new/README.md b/manager_api_new/README.md new file mode 100644 index 0000000..ca87372 --- /dev/null +++ b/manager_api_new/README.md @@ -0,0 +1,208 @@ +# manager_api_new +API Manager Service + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: Version Alpha 3 +- Generator version: 7.9.0 +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 2.12 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, add the following dependency to your pubspec.yaml +``` +dependencies: + manager_api_new: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` + +### Local +To use the package in your local drive, add the following dependency to your pubspec.yaml +``` +dependencies: + manager_api_new: + path: /path/to/manager_api_new +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:manager_api_new/api.dart'; + +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = AuthenticationApi(); +final grantType = grantType_example; // String | +final username = username_example; // String | +final password = password_example; // String | +final clientId = clientId_example; // String | +final clientSecret = clientSecret_example; // String | + +try { + final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret); + print(result); +} catch (e) { + print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n'); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost:5001* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc//AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | +*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc//AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | +*ConfigurationApi* | [**configurationCreate**](doc//ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration | +*ConfigurationApi* | [**configurationDelete**](doc//ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} | +*ConfigurationApi* | [**configurationExport**](doc//ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export | +*ConfigurationApi* | [**configurationGet**](doc//ConfigurationApi.md#configurationget) | **GET** /api/Configuration | +*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc//ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin | +*ConfigurationApi* | [**configurationGetDetail**](doc//ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} | +*ConfigurationApi* | [**configurationImport**](doc//ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import | +*ConfigurationApi* | [**configurationUpdate**](doc//ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration | +*DeviceApi* | [**deviceCreate**](doc//DeviceApi.md#devicecreate) | **POST** /api/Device | +*DeviceApi* | [**deviceDelete**](doc//DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} | +*DeviceApi* | [**deviceGet**](doc//DeviceApi.md#deviceget) | **GET** /api/Device | +*DeviceApi* | [**deviceGetDetail**](doc//DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail | +*DeviceApi* | [**deviceUpdate**](doc//DeviceApi.md#deviceupdate) | **PUT** /api/Device | +*DeviceApi* | [**deviceUpdateMainInfos**](doc//DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos | +*InstanceApi* | [**instanceCreateInstance**](doc//InstanceApi.md#instancecreateinstance) | **POST** /api/Instance | +*InstanceApi* | [**instanceDeleteInstance**](doc//InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} | +*InstanceApi* | [**instanceGet**](doc//InstanceApi.md#instanceget) | **GET** /api/Instance | +*InstanceApi* | [**instanceGetDetail**](doc//InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} | +*InstanceApi* | [**instanceGetInstanceByPinCode**](doc//InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin | +*InstanceApi* | [**instanceUpdateinstance**](doc//InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance | +*ResourceApi* | [**resourceCreate**](doc//ResourceApi.md#resourcecreate) | **POST** /api/Resource | +*ResourceApi* | [**resourceDelete**](doc//ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} | +*ResourceApi* | [**resourceGet**](doc//ResourceApi.md#resourceget) | **GET** /api/Resource | +*ResourceApi* | [**resourceGetDetail**](doc//ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail | +*ResourceApi* | [**resourceShow**](doc//ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} | +*ResourceApi* | [**resourceUpdate**](doc//ResourceApi.md#resourceupdate) | **PUT** /api/Resource | +*ResourceApi* | [**resourceUpload**](doc//ResourceApi.md#resourceupload) | **POST** /api/Resource/upload | +*SectionApi* | [**sectionCreate**](doc//SectionApi.md#sectioncreate) | **POST** /api/Section | +*SectionApi* | [**sectionDelete**](doc//SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} | +*SectionApi* | [**sectionDeleteAllForConfiguration**](doc//SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | +*SectionApi* | [**sectionGet**](doc//SectionApi.md#sectionget) | **GET** /api/Section | +*SectionApi* | [**sectionGetAgendaDTO**](doc//SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO | +*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc//SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} | +*SectionApi* | [**sectionGetAllSectionSubSections**](doc//SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | +*SectionApi* | [**sectionGetArticleDTO**](doc//SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | +*SectionApi* | [**sectionGetDetail**](doc//SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | +*SectionApi* | [**sectionGetFromConfiguration**](doc//SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | +*SectionApi* | [**sectionGetFromConfigurationDetail**](doc//SectionApi.md#sectiongetfromconfigurationdetail) | **GET** /api/Section/configuration/{id}/detail | +*SectionApi* | [**sectionGetMapDTO**](doc//SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | +*SectionApi* | [**sectionGetMenuDTO**](doc//SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | +*SectionApi* | [**sectionGetPdfDTO**](doc//SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | +*SectionApi* | [**sectionGetPuzzleDTO**](doc//SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | +*SectionApi* | [**sectionGetQuizDTO**](doc//SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO | +*SectionApi* | [**sectionGetSliderDTO**](doc//SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | +*SectionApi* | [**sectionGetVideoDTO**](doc//SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | +*SectionApi* | [**sectionGetWeatherDTO**](doc//SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | +*SectionApi* | [**sectionGetWebDTO**](doc//SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO | +*SectionApi* | [**sectionPlayerMessageDTO**](doc//SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO | +*SectionApi* | [**sectionUpdate**](doc//SectionApi.md#sectionupdate) | **PUT** /api/Section | +*SectionApi* | [**sectionUpdateOrder**](doc//SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order | +*SectionMapApi* | [**sectionMapCreate**](doc//SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points | +*SectionMapApi* | [**sectionMapDelete**](doc//SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} | +*SectionMapApi* | [**sectionMapGetAllGeoPointsFromSection**](doc//SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points | +*SectionMapApi* | [**sectionMapUpdate**](doc//SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap | +*SectionQuizApi* | [**sectionQuizCreate**](doc//SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions | +*SectionQuizApi* | [**sectionQuizDelete**](doc//SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} | +*SectionQuizApi* | [**sectionQuizGetAllQuizQuestionFromSection**](doc//SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions | +*SectionQuizApi* | [**sectionQuizUpdate**](doc//SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz | +*UserApi* | [**userCreateUser**](doc//UserApi.md#usercreateuser) | **POST** /api/User | +*UserApi* | [**userDeleteUser**](doc//UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} | +*UserApi* | [**userGet**](doc//UserApi.md#userget) | **GET** /api/User | +*UserApi* | [**userGetDetail**](doc//UserApi.md#usergetdetail) | **GET** /api/User/{id} | +*UserApi* | [**userUpdateUser**](doc//UserApi.md#userupdateuser) | **PUT** /api/User | + + +## Documentation For Models + + - [AgendaDTO](doc//AgendaDTO.md) + - [AgendaDTOAllOfAgendaMapProvider](doc//AgendaDTOAllOfAgendaMapProvider.md) + - [ArticleDTO](doc//ArticleDTO.md) + - [CategorieDTO](doc//CategorieDTO.md) + - [ConfigurationDTO](doc//ConfigurationDTO.md) + - [ContentDTO](doc//ContentDTO.md) + - [ContentDTOResource](doc//ContentDTOResource.md) + - [DeviceDTO](doc//DeviceDTO.md) + - [DeviceDetailDTO](doc//DeviceDetailDTO.md) + - [ExportConfigurationDTO](doc//ExportConfigurationDTO.md) + - [GeoPoint](doc//GeoPoint.md) + - [GeoPointDTO](doc//GeoPointDTO.md) + - [GeoPointSectionMap](doc//GeoPointSectionMap.md) + - [Instance](doc//Instance.md) + - [InstanceDTO](doc//InstanceDTO.md) + - [LoginDTO](doc//LoginDTO.md) + - [MapDTO](doc//MapDTO.md) + - [MapDTOAllOfMapProvider](doc//MapDTOAllOfMapProvider.md) + - [MapDTOAllOfMapType](doc//MapDTOAllOfMapType.md) + - [MapDTOAllOfMapTypeMapbox](doc//MapDTOAllOfMapTypeMapbox.md) + - [MapProvider](doc//MapProvider.md) + - [MapTypeApp](doc//MapTypeApp.md) + - [MapTypeMapBox](doc//MapTypeMapBox.md) + - [MenuDTO](doc//MenuDTO.md) + - [OrderedTranslationAndResourceDTO](doc//OrderedTranslationAndResourceDTO.md) + - [PdfDTO](doc//PdfDTO.md) + - [PlayerMessageDTO](doc//PlayerMessageDTO.md) + - [PuzzleDTO](doc//PuzzleDTO.md) + - [PuzzleDTOAllOfPuzzleImage](doc//PuzzleDTOAllOfPuzzleImage.md) + - [QuestionDTO](doc//QuestionDTO.md) + - [QuestionDTOImageBackgroundResourceType](doc//QuestionDTOImageBackgroundResourceType.md) + - [QuizDTO](doc//QuizDTO.md) + - [Resource](doc//Resource.md) + - [ResourceDTO](doc//ResourceDTO.md) + - [ResourceType](doc//ResourceType.md) + - [ResponseDTO](doc//ResponseDTO.md) + - [Section](doc//Section.md) + - [SectionDTO](doc//SectionDTO.md) + - [SectionMap](doc//SectionMap.md) + - [SectionMapAllOfMapMapProvider](doc//SectionMapAllOfMapMapProvider.md) + - [SectionMapAllOfMapMapType](doc//SectionMapAllOfMapMapType.md) + - [SectionMapAllOfMapResource](doc//SectionMapAllOfMapResource.md) + - [SectionMapAllOfMapTypeMapbox](doc//SectionMapAllOfMapTypeMapbox.md) + - [SectionType](doc//SectionType.md) + - [SliderDTO](doc//SliderDTO.md) + - [TokenDTO](doc//TokenDTO.md) + - [TranslationAndResourceDTO](doc//TranslationAndResourceDTO.md) + - [TranslationDTO](doc//TranslationDTO.md) + - [User](doc//User.md) + - [UserDetailDTO](doc//UserDetailDTO.md) + - [VideoDTO](doc//VideoDTO.md) + - [WeatherDTO](doc//WeatherDTO.md) + - [WebDTO](doc//WebDTO.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### bearer + +- **Type**: OAuth +- **Flow**: password +- **Authorization URL**: /authentication/Token +- **Scopes**: + - **Manager-api**: Manager WebAPI + + +## Author + + + diff --git a/manager_api/analysis_options.yaml b/manager_api_new/analysis_options.yaml similarity index 100% rename from manager_api/analysis_options.yaml rename to manager_api_new/analysis_options.yaml diff --git a/manager_api_new/doc/AgendaDTO.md b/manager_api_new/doc/AgendaDTO.md new file mode 100644 index 0000000..39f1981 --- /dev/null +++ b/manager_api_new/doc/AgendaDTO.md @@ -0,0 +1,34 @@ +# manager_api_new.model.AgendaDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**resourceIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**agendaMapProvider** | [**AgendaDTOAllOfAgendaMapProvider**](AgendaDTOAllOfAgendaMapProvider.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/WebDTO.md b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md similarity index 74% rename from manager_api/doc/WebDTO.md rename to manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md index a6ac523..46aabe9 100644 --- a/manager_api/doc/WebDTO.md +++ b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md @@ -1,14 +1,13 @@ -# manager_api.model.WebDTO +# manager_api_new.model.AgendaDTOAllOfAgendaMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api_new/doc/ArticleDTO.md b/manager_api_new/doc/ArticleDTO.md new file mode 100644 index 0000000..b23a827 --- /dev/null +++ b/manager_api_new/doc/ArticleDTO.md @@ -0,0 +1,37 @@ +# manager_api_new.model.ArticleDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**content** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**isContentTop** | **bool** | | [optional] +**audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**isReadAudioAuto** | **bool** | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api_new/doc/AuthenticationApi.md similarity index 93% rename from manager_api/doc/AuthenticationApi.md rename to manager_api_new/doc/AuthenticationApi.md index 71112c8..9ef127e 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api_new/doc/AuthenticationApi.md @@ -1,11 +1,11 @@ -# manager_api.api.AuthenticationApi +# manager_api_new.api.AuthenticationApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -20,7 +20,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -71,7 +71,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/CategorieDTO.md b/manager_api_new/doc/CategorieDTO.md similarity index 76% rename from manager_api/doc/CategorieDTO.md rename to manager_api_new/doc/CategorieDTO.md index e346999..688a61d 100644 --- a/manager_api/doc/CategorieDTO.md +++ b/manager_api_new/doc/CategorieDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.CategorieDTO +# manager_api_new.model.CategorieDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **icon** | **String** | | [optional] -**iconResourceId** | **String** | | [optional] -**iconUrl** | **String** | | [optional] +**resourceDTO** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] **order** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api_new/doc/ConfigurationApi.md similarity index 94% rename from manager_api/doc/ConfigurationApi.md rename to manager_api_new/doc/ConfigurationApi.md index 7ef7c1c..8e88412 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api_new/doc/ConfigurationApi.md @@ -1,11 +1,11 @@ -# manager_api.api.ConfigurationApi +# manager_api_new.api.ConfigurationApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,7 +26,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -69,7 +69,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -157,7 +157,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -200,12 +200,12 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ConfigurationApi(); -final pinCode = 56; // int | +final pinCode = pinCode_example; // String | try { final result = api_instance.configurationGetConfigurationsByPinCode(pinCode); @@ -219,7 +219,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pinCode** | **int**| | [optional] + **pinCode** | **String**| | [optional] ### Return type @@ -243,7 +243,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -286,7 +286,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -329,7 +329,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api_new/doc/ConfigurationDTO.md similarity index 83% rename from manager_api/doc/ConfigurationDTO.md rename to manager_api_new/doc/ConfigurationDTO.md index edf6380..3f099f6 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api_new/doc/ConfigurationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ConfigurationDTO +# manager_api_new.model.ConfigurationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -24,10 +24,6 @@ Name | Type | Description | Notes **sectionIds** | **List** | | [optional] [default to const []] **loaderImageId** | **String** | | [optional] **loaderImageUrl** | **String** | | [optional] -**weatherCity** | **String** | | [optional] -**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional] -**weatherResult** | **String** | | [optional] -**isWeather** | **bool** | | [optional] **isDate** | **bool** | | [optional] **isHour** | **bool** | | [optional] **isSectionImageBackground** | **bool** | | [optional] diff --git a/manager_api/doc/ContentDTO.md b/manager_api_new/doc/ContentDTO.md similarity index 75% rename from manager_api/doc/ContentDTO.md rename to manager_api_new/doc/ContentDTO.md index 47fe015..eccf209 100644 --- a/manager_api/doc/ContentDTO.md +++ b/manager_api_new/doc/ContentDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ContentDTO +# manager_api_new.model.ContentDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -10,10 +10,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**resourceId** | **String** | | [optional] -**resourceUrl** | **String** | | [optional] **order** | **int** | | [optional] -**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**resourceId** | **String** | | [optional] +**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/User.md b/manager_api_new/doc/ContentDTOResource.md similarity index 62% rename from manager_api/doc/User.md rename to manager_api_new/doc/ContentDTOResource.md index b51b3d3..2315aec 100644 --- a/manager_api/doc/User.md +++ b/manager_api_new/doc/ContentDTOResource.md @@ -1,19 +1,17 @@ -# manager_api.model.User +# manager_api_new.model.ContentDTOResource ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**token** | **String** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] +**label** | **String** | | [optional] +**url** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api/doc/ContentGeoPoint.md b/manager_api_new/doc/ContentGeoPoint.md similarity index 86% rename from manager_api/doc/ContentGeoPoint.md rename to manager_api_new/doc/ContentGeoPoint.md index adb2867..682228e 100644 --- a/manager_api/doc/ContentGeoPoint.md +++ b/manager_api_new/doc/ContentGeoPoint.md @@ -1,8 +1,8 @@ -# manager_api.model.ContentGeoPoint +# manager_api_new.model.ContentGeoPoint ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceApi.md b/manager_api_new/doc/DeviceApi.md similarity index 94% rename from manager_api/doc/DeviceApi.md rename to manager_api_new/doc/DeviceApi.md index aef8698..1173900 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api_new/doc/DeviceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.DeviceApi +# manager_api_new.api.DeviceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,7 +24,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -110,7 +110,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -153,7 +153,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -196,7 +196,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -239,7 +239,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/DeviceDTO.md b/manager_api_new/doc/DeviceDTO.md similarity index 91% rename from manager_api/doc/DeviceDTO.md rename to manager_api_new/doc/DeviceDTO.md index 0f99dac..d2c0be2 100644 --- a/manager_api/doc/DeviceDTO.md +++ b/manager_api_new/doc/DeviceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDTO +# manager_api_new.model.DeviceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceDetailDTO.md b/manager_api_new/doc/DeviceDetailDTO.md similarity index 92% rename from manager_api/doc/DeviceDetailDTO.md rename to manager_api_new/doc/DeviceDetailDTO.md index 2d9ed26..2899936 100644 --- a/manager_api/doc/DeviceDetailDTO.md +++ b/manager_api_new/doc/DeviceDetailDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDetailDTO +# manager_api_new.model.DeviceDetailDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceDetailDTOAllOf.md b/manager_api_new/doc/DeviceDetailDTOAllOf.md similarity index 86% rename from manager_api/doc/DeviceDetailDTOAllOf.md rename to manager_api_new/doc/DeviceDetailDTOAllOf.md index 8d701aa..0b6c098 100644 --- a/manager_api/doc/DeviceDetailDTOAllOf.md +++ b/manager_api_new/doc/DeviceDetailDTOAllOf.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDetailDTOAllOf +# manager_api_new.model.DeviceDetailDTOAllOf ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ExportConfigurationDTO.md b/manager_api_new/doc/ExportConfigurationDTO.md similarity index 84% rename from manager_api/doc/ExportConfigurationDTO.md rename to manager_api_new/doc/ExportConfigurationDTO.md index 3c88c48..e2abee5 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api_new/doc/ExportConfigurationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ExportConfigurationDTO +# manager_api_new.model.ExportConfigurationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -24,10 +24,6 @@ Name | Type | Description | Notes **sectionIds** | **List** | | [optional] [default to const []] **loaderImageId** | **String** | | [optional] **loaderImageUrl** | **String** | | [optional] -**weatherCity** | **String** | | [optional] -**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional] -**weatherResult** | **String** | | [optional] -**isWeather** | **bool** | | [optional] **isDate** | **bool** | | [optional] **isHour** | **bool** | | [optional] **isSectionImageBackground** | **bool** | | [optional] diff --git a/manager_api/doc/ExportConfigurationDTOAllOf.md b/manager_api_new/doc/ExportConfigurationDTOAllOf.md similarity index 84% rename from manager_api/doc/ExportConfigurationDTOAllOf.md rename to manager_api_new/doc/ExportConfigurationDTOAllOf.md index 21322a8..6e8eeff 100644 --- a/manager_api/doc/ExportConfigurationDTOAllOf.md +++ b/manager_api_new/doc/ExportConfigurationDTOAllOf.md @@ -1,8 +1,8 @@ -# manager_api.model.ExportConfigurationDTOAllOf +# manager_api_new.model.ExportConfigurationDTOAllOf ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/GeoPoint.md b/manager_api_new/doc/GeoPoint.md new file mode 100644 index 0000000..60f5aa0 --- /dev/null +++ b/manager_api_new/doc/GeoPoint.md @@ -0,0 +1,30 @@ +# manager_api_new.model.GeoPoint + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [default to const []] +**contents** | [**List**](ContentDTO.md) | | [default to const []] +**schedules** | [**List**](TranslationDTO.md) | | [default to const []] +**prices** | [**List**](TranslationDTO.md) | | [default to const []] +**phone** | [**List**](TranslationDTO.md) | | [default to const []] +**email** | [**List**](TranslationDTO.md) | | [default to const []] +**site** | [**List**](TranslationDTO.md) | | [default to const []] +**categorieId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**imageResourceId** | **String** | | [optional] +**imageUrl** | **String** | | [optional] +**sectionMapId** | **String** | | [optional] +**sectionMap** | [**GeoPointSectionMap**](GeoPointSectionMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/GeoPointDTO.md b/manager_api_new/doc/GeoPointDTO.md similarity index 82% rename from manager_api/doc/GeoPointDTO.md rename to manager_api_new/doc/GeoPointDTO.md index a3412ff..2ec2498 100644 --- a/manager_api/doc/GeoPointDTO.md +++ b/manager_api_new/doc/GeoPointDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.GeoPointDTO +# manager_api_new.model.GeoPointDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**contents** | [**List**](ContentGeoPoint.md) | | [optional] [default to const []] -**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] **categorieId** | **int** | | [optional] **latitude** | **String** | | [optional] **longitude** | **String** | | [optional] diff --git a/manager_api/doc/GeoPointDTOCategorie.md b/manager_api_new/doc/GeoPointDTOCategorie.md similarity index 87% rename from manager_api/doc/GeoPointDTOCategorie.md rename to manager_api_new/doc/GeoPointDTOCategorie.md index 6765935..eeefaed 100644 --- a/manager_api/doc/GeoPointDTOCategorie.md +++ b/manager_api_new/doc/GeoPointDTOCategorie.md @@ -1,8 +1,8 @@ -# manager_api.model.GeoPointDTOCategorie +# manager_api_new.model.GeoPointDTOCategorie ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/GeoPointSectionMap.md b/manager_api_new/doc/GeoPointSectionMap.md new file mode 100644 index 0000000..1eb7bb9 --- /dev/null +++ b/manager_api_new/doc/GeoPointSectionMap.md @@ -0,0 +1,42 @@ +# manager_api_new.model.GeoPointSectionMap + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**mapCategories** | [**List**](CategorieDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**mapZoom** | **int** | | [optional] +**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional] +**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional] +**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional] +**mapPoints** | [**List**](GeoPoint.md) | | [optional] [default to const []] +**mapResourceId** | **String** | | [optional] +**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**mapCenterLatitude** | **String** | | [optional] +**mapCenterLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/ImageDTO.md b/manager_api_new/doc/ImageDTO.md similarity index 81% rename from manager_api/doc/ImageDTO.md rename to manager_api_new/doc/ImageDTO.md index 9844084..20db40a 100644 --- a/manager_api/doc/ImageDTO.md +++ b/manager_api_new/doc/ImageDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ImageDTO +# manager_api_new.model.ImageDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -13,6 +13,7 @@ Name | Type | Description | Notes **resourceId** | **String** | | [optional] **source_** | **String** | | [optional] **order** | **int** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/ImageGeoPoint.md b/manager_api_new/doc/ImageGeoPoint.md similarity index 83% rename from manager_api/doc/ImageGeoPoint.md rename to manager_api_new/doc/ImageGeoPoint.md index 73dd52f..7460899 100644 --- a/manager_api/doc/ImageGeoPoint.md +++ b/manager_api_new/doc/ImageGeoPoint.md @@ -1,8 +1,8 @@ -# manager_api.model.ImageGeoPoint +# manager_api_new.model.ImageGeoPoint ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/Instance.md b/manager_api_new/doc/Instance.md similarity index 67% rename from manager_api/doc/Instance.md rename to manager_api_new/doc/Instance.md index 1fd6ac6..4fa498d 100644 --- a/manager_api/doc/Instance.md +++ b/manager_api_new/doc/Instance.md @@ -1,17 +1,17 @@ -# manager_api.model.Instance +# manager_api_new.model.Instance ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**name** | **String** | | [optional] +**id** | **String** | | +**name** | **String** | | **dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/InstanceApi.md b/manager_api_new/doc/InstanceApi.md similarity index 87% rename from manager_api/doc/InstanceApi.md rename to manager_api_new/doc/InstanceApi.md index a0aaa08..5d8e006 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api_new/doc/InstanceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.InstanceApi +# manager_api_new.api.InstanceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -18,21 +18,21 @@ Method | HTTP request | Description # **instanceCreateInstance** -> InstanceDTO instanceCreateInstance(instance) +> InstanceDTO instanceCreateInstance(instanceDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final instance = Instance(); // Instance | +final instanceDTO = InstanceDTO(); // InstanceDTO | try { - final result = api_instance.instanceCreateInstance(instance); + final result = api_instance.instanceCreateInstance(instanceDTO); print(result); } catch (e) { print('Exception when calling InstanceApi->instanceCreateInstance: $e\n'); @@ -43,7 +43,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **instance** | [**Instance**](Instance.md)| | + **instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| | ### Return type @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -110,7 +110,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -149,7 +149,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -192,12 +192,12 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final pinCode = 56; // int | +final pinCode = pinCode_example; // String | try { final result = api_instance.instanceGetInstanceByPinCode(pinCode); @@ -211,7 +211,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pinCode** | **int**| | [optional] + **pinCode** | **String**| | [optional] ### Return type @@ -229,21 +229,21 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **instanceUpdateinstance** -> InstanceDTO instanceUpdateinstance(instance) +> InstanceDTO instanceUpdateinstance(instanceDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final instance = Instance(); // Instance | +final instanceDTO = InstanceDTO(); // InstanceDTO | try { - final result = api_instance.instanceUpdateinstance(instance); + final result = api_instance.instanceUpdateinstance(instanceDTO); print(result); } catch (e) { print('Exception when calling InstanceApi->instanceUpdateinstance: $e\n'); @@ -254,7 +254,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **instance** | [**Instance**](Instance.md)| | + **instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| | ### Return type diff --git a/manager_api/doc/InstanceDTO.md b/manager_api_new/doc/InstanceDTO.md similarity index 78% rename from manager_api/doc/InstanceDTO.md rename to manager_api_new/doc/InstanceDTO.md index ec1d952..9bc7fab 100644 --- a/manager_api/doc/InstanceDTO.md +++ b/manager_api_new/doc/InstanceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.InstanceDTO +# manager_api_new.model.InstanceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **name** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/LevelDTO.md b/manager_api_new/doc/LevelDTO.md similarity index 85% rename from manager_api/doc/LevelDTO.md rename to manager_api_new/doc/LevelDTO.md index d87fee3..5627672 100644 --- a/manager_api/doc/LevelDTO.md +++ b/manager_api_new/doc/LevelDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.LevelDTO +# manager_api_new.model.LevelDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/LoginDTO.md b/manager_api_new/doc/LoginDTO.md similarity index 83% rename from manager_api/doc/LoginDTO.md rename to manager_api_new/doc/LoginDTO.md index fa86966..a07728f 100644 --- a/manager_api/doc/LoginDTO.md +++ b/manager_api_new/doc/LoginDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.LoginDTO +# manager_api_new.model.LoginDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/MapDTO.md b/manager_api_new/doc/MapDTO.md new file mode 100644 index 0000000..84aa572 --- /dev/null +++ b/manager_api_new/doc/MapDTO.md @@ -0,0 +1,42 @@ +# manager_api_new.model.MapDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**zoom** | **int** | | [optional] +**mapType** | [**MapDTOAllOfMapType**](MapDTOAllOfMapType.md) | | [optional] +**mapTypeMapbox** | [**MapDTOAllOfMapTypeMapbox**](MapDTOAllOfMapTypeMapbox.md) | | [optional] +**mapProvider** | [**MapDTOAllOfMapProvider**](MapDTOAllOfMapProvider.md) | | [optional] +**points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] +**iconResourceId** | **String** | | [optional] +**iconSource** | **String** | | [optional] +**categories** | [**List**](CategorieDTO.md) | | [optional] [default to const []] +**centerLatitude** | **String** | | [optional] +**centerLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/VideoDTO.md b/manager_api_new/doc/MapDTOAllOfMapProvider.md similarity index 74% rename from manager_api/doc/VideoDTO.md rename to manager_api_new/doc/MapDTOAllOfMapProvider.md index a13142e..0a1a2ea 100644 --- a/manager_api/doc/VideoDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapProvider.md @@ -1,14 +1,13 @@ -# manager_api.model.VideoDTO +# manager_api_new.model.MapDTOAllOfMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/PdfDTO.md b/manager_api_new/doc/MapDTOAllOfMapType.md similarity index 67% rename from manager_api/doc/PdfDTO.md rename to manager_api_new/doc/MapDTOAllOfMapType.md index 1caaab8..2ad023c 100644 --- a/manager_api/doc/PdfDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapType.md @@ -1,14 +1,13 @@ -# manager_api.model.PdfDTO +# manager_api_new.model.MapDTOAllOfMapType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pdfs** | [**List**](PDFFileDTO.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/MenuDTO.md b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md similarity index 66% rename from manager_api/doc/MenuDTO.md rename to manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md index cdbc1db..90894c3 100644 --- a/manager_api/doc/MenuDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md @@ -1,14 +1,13 @@ -# manager_api.model.MenuDTO +# manager_api_new.model.MapDTOAllOfMapTypeMapbox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/MapDTOMapProvider.md b/manager_api_new/doc/MapDTOMapProvider.md similarity index 78% rename from manager_api/doc/MapDTOMapProvider.md rename to manager_api_new/doc/MapDTOMapProvider.md index 882195a..ab01794 100644 --- a/manager_api/doc/MapDTOMapProvider.md +++ b/manager_api_new/doc/MapDTOMapProvider.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapProvider +# manager_api_new.model.MapDTOMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapDTOMapType.md b/manager_api_new/doc/MapDTOMapType.md similarity index 79% rename from manager_api/doc/MapDTOMapType.md rename to manager_api_new/doc/MapDTOMapType.md index 118e848..514d3b3 100644 --- a/manager_api/doc/MapDTOMapType.md +++ b/manager_api_new/doc/MapDTOMapType.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapType +# manager_api_new.model.MapDTOMapType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapDTOMapTypeMapbox.md b/manager_api_new/doc/MapDTOMapTypeMapbox.md similarity index 78% rename from manager_api/doc/MapDTOMapTypeMapbox.md rename to manager_api_new/doc/MapDTOMapTypeMapbox.md index d3937ca..9014978 100644 --- a/manager_api/doc/MapDTOMapTypeMapbox.md +++ b/manager_api_new/doc/MapDTOMapTypeMapbox.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapTypeMapbox +# manager_api_new.model.MapDTOMapTypeMapbox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapProvider.md b/manager_api_new/doc/MapProvider.md similarity index 79% rename from manager_api/doc/MapProvider.md rename to manager_api_new/doc/MapProvider.md index f600a20..21714af 100644 --- a/manager_api/doc/MapProvider.md +++ b/manager_api_new/doc/MapProvider.md @@ -1,8 +1,8 @@ -# manager_api.model.MapProvider +# manager_api_new.model.MapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapTypeApp.md b/manager_api_new/doc/MapTypeApp.md similarity index 80% rename from manager_api/doc/MapTypeApp.md rename to manager_api_new/doc/MapTypeApp.md index b8ef959..4aaf681 100644 --- a/manager_api/doc/MapTypeApp.md +++ b/manager_api_new/doc/MapTypeApp.md @@ -1,8 +1,8 @@ -# manager_api.model.MapTypeApp +# manager_api_new.model.MapTypeApp ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapTypeMapBox.md b/manager_api_new/doc/MapTypeMapBox.md similarity index 79% rename from manager_api/doc/MapTypeMapBox.md rename to manager_api_new/doc/MapTypeMapBox.md index 99b9232..561b3a4 100644 --- a/manager_api/doc/MapTypeMapBox.md +++ b/manager_api_new/doc/MapTypeMapBox.md @@ -1,8 +1,8 @@ -# manager_api.model.MapTypeMapBox +# manager_api_new.model.MapTypeMapBox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/MenuDTO.md b/manager_api_new/doc/MenuDTO.md new file mode 100644 index 0000000..991ec03 --- /dev/null +++ b/manager_api_new/doc/MenuDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.MenuDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**sections** | [**List**](Object.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/AgendaDTO.md b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md similarity index 53% rename from manager_api/doc/AgendaDTO.md rename to manager_api_new/doc/OrderedTranslationAndResourceDTO.md index b341661..aa8231e 100644 --- a/manager_api/doc/AgendaDTO.md +++ b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md @@ -1,15 +1,15 @@ -# manager_api.model.AgendaDTO +# manager_api_new.model.OrderedTranslationAndResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**resourceIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] +**translationAndResourceDTOs** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/PDFFileDTO.md b/manager_api_new/doc/PDFFileDTO.md similarity index 86% rename from manager_api/doc/PDFFileDTO.md rename to manager_api_new/doc/PDFFileDTO.md index 4d2432a..f70fea4 100644 --- a/manager_api/doc/PDFFileDTO.md +++ b/manager_api_new/doc/PDFFileDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.PDFFileDTO +# manager_api_new.model.PDFFileDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/PdfDTO.md b/manager_api_new/doc/PdfDTO.md new file mode 100644 index 0000000..b50f735 --- /dev/null +++ b/manager_api_new/doc/PdfDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.PdfDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**pdfs** | [**List**](OrderedTranslationAndResourceDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/PlayerMessageDTO.md b/manager_api_new/doc/PlayerMessageDTO.md similarity index 82% rename from manager_api/doc/PlayerMessageDTO.md rename to manager_api_new/doc/PlayerMessageDTO.md index b5a97b7..4e6ac89 100644 --- a/manager_api/doc/PlayerMessageDTO.md +++ b/manager_api_new/doc/PlayerMessageDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.PlayerMessageDTO +# manager_api_new.model.PlayerMessageDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/PuzzleDTO.md b/manager_api_new/doc/PuzzleDTO.md new file mode 100644 index 0000000..2c55b8d --- /dev/null +++ b/manager_api_new/doc/PuzzleDTO.md @@ -0,0 +1,38 @@ +# manager_api_new.model.PuzzleDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**messageDebut** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**messageFin** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**puzzleImage** | [**PuzzleDTOAllOfPuzzleImage**](PuzzleDTOAllOfPuzzleImage.md) | | [optional] +**puzzleImageId** | **String** | | [optional] +**rows** | **int** | | [optional] +**cols** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md b/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md new file mode 100644 index 0000000..926dfa7 --- /dev/null +++ b/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md @@ -0,0 +1,20 @@ +# manager_api_new.model.PuzzleDTOAllOfPuzzleImage + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] +**label** | **String** | | [optional] +**url** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**instanceId** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/PuzzleDTOImage.md b/manager_api_new/doc/PuzzleDTOImage.md similarity index 89% rename from manager_api/doc/PuzzleDTOImage.md rename to manager_api_new/doc/PuzzleDTOImage.md index cc2e07a..9777e5f 100644 --- a/manager_api/doc/PuzzleDTOImage.md +++ b/manager_api_new/doc/PuzzleDTOImage.md @@ -1,8 +1,8 @@ -# manager_api.model.PuzzleDTOImage +# manager_api_new.model.PuzzleDTOImage ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/QuestionDTO.md b/manager_api_new/doc/QuestionDTO.md similarity index 73% rename from manager_api/doc/QuestionDTO.md rename to manager_api_new/doc/QuestionDTO.md index 24020cc..ad9d7c4 100644 --- a/manager_api/doc/QuestionDTO.md +++ b/manager_api_new/doc/QuestionDTO.md @@ -1,17 +1,18 @@ -# manager_api.model.QuestionDTO +# manager_api_new.model.QuestionDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] **label** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] **responses** | [**List**](ResponseDTO.md) | | [optional] [default to const []] **imageBackgroundResourceId** | **String** | | [optional] -**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**imageBackgroundResourceType** | [**QuestionDTOImageBackgroundResourceType**](QuestionDTOImageBackgroundResourceType.md) | | [optional] **imageBackgroundResourceUrl** | **String** | | [optional] **order** | **int** | | [optional] diff --git a/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md b/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md new file mode 100644 index 0000000..fd5da45 --- /dev/null +++ b/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md @@ -0,0 +1,14 @@ +# manager_api_new.model.QuestionDTOImageBackgroundResourceType + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizDTO.md b/manager_api_new/doc/QuizDTO.md new file mode 100644 index 0000000..dace0c8 --- /dev/null +++ b/manager_api_new/doc/QuizDTO.md @@ -0,0 +1,37 @@ +# manager_api_new.model.QuizDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**questions** | [**List**](QuestionDTO.md) | | [optional] [default to const []] +**badLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**mediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**goodLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**greatLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestion.md b/manager_api_new/doc/QuizQuestion.md new file mode 100644 index 0000000..f8dd67a --- /dev/null +++ b/manager_api_new/doc/QuizQuestion.md @@ -0,0 +1,22 @@ +# manager_api_new.model.QuizQuestion + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**label** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**responses** | [**List**](ResponseDTO.md) | | [default to const []] +**resourceId** | **String** | | [optional] +**resource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**order** | **int** | | [optional] +**sectionQuizId** | **String** | | [optional] +**sectionQuiz** | [**QuizQuestionSectionQuiz**](QuizQuestionSectionQuiz.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestionResource.md b/manager_api_new/doc/QuizQuestionResource.md new file mode 100644 index 0000000..88ce9ce --- /dev/null +++ b/manager_api_new/doc/QuizQuestionResource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.QuizQuestionResource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestionSectionQuiz.md b/manager_api_new/doc/QuizQuestionSectionQuiz.md new file mode 100644 index 0000000..8979911 --- /dev/null +++ b/manager_api_new/doc/QuizQuestionSectionQuiz.md @@ -0,0 +1,37 @@ +# manager_api_new.model.QuizQuestionSectionQuiz + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**quizQuestions** | [**List**](QuizQuestion.md) | | [default to const []] +**quizBadLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizMediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGoodLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGreatLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/QuizzDTO.md b/manager_api_new/doc/QuizzDTO.md similarity index 90% rename from manager_api/doc/QuizzDTO.md rename to manager_api_new/doc/QuizzDTO.md index 11c9d89..c359720 100644 --- a/manager_api/doc/QuizzDTO.md +++ b/manager_api_new/doc/QuizzDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.QuizzDTO +# manager_api_new.model.QuizzDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/QuizzDTOBadLevel.md b/manager_api_new/doc/QuizzDTOBadLevel.md similarity index 83% rename from manager_api/doc/QuizzDTOBadLevel.md rename to manager_api_new/doc/QuizzDTOBadLevel.md index fd4ad3a..c89cf1c 100644 --- a/manager_api/doc/QuizzDTOBadLevel.md +++ b/manager_api_new/doc/QuizzDTOBadLevel.md @@ -1,8 +1,8 @@ -# manager_api.model.QuizzDTOBadLevel +# manager_api_new.model.QuizzDTOBadLevel ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/Resource.md b/manager_api_new/doc/Resource.md new file mode 100644 index 0000000..8d5a870 --- /dev/null +++ b/manager_api_new/doc/Resource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.Resource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/ResourceApi.md b/manager_api_new/doc/ResourceApi.md similarity index 95% rename from manager_api/doc/ResourceApi.md rename to manager_api_new/doc/ResourceApi.md index 22722f9..ff8f425 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api_new/doc/ResourceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.ResourceApi +# manager_api_new.api.ResourceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,7 +25,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -68,7 +68,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -111,7 +111,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -199,7 +199,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -242,7 +242,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -285,7 +285,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/ResourceDTO.md b/manager_api_new/doc/ResourceDTO.md similarity index 88% rename from manager_api/doc/ResourceDTO.md rename to manager_api_new/doc/ResourceDTO.md index 8f3ef86..883e620 100644 --- a/manager_api/doc/ResourceDTO.md +++ b/manager_api_new/doc/ResourceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ResourceDTO +# manager_api_new.model.ResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ResourceType.md b/manager_api_new/doc/ResourceType.md similarity index 79% rename from manager_api/doc/ResourceType.md rename to manager_api_new/doc/ResourceType.md index afd3f6e..ef72cc8 100644 --- a/manager_api/doc/ResourceType.md +++ b/manager_api_new/doc/ResourceType.md @@ -1,8 +1,8 @@ -# manager_api.model.ResourceType +# manager_api_new.model.ResourceType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ResponseDTO.md b/manager_api_new/doc/ResponseDTO.md similarity index 86% rename from manager_api/doc/ResponseDTO.md rename to manager_api_new/doc/ResponseDTO.md index c40e9a8..71c91bd 100644 --- a/manager_api/doc/ResponseDTO.md +++ b/manager_api_new/doc/ResponseDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ResponseDTO +# manager_api_new.model.ResponseDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/Section.md b/manager_api_new/doc/Section.md new file mode 100644 index 0000000..165ef46 --- /dev/null +++ b/manager_api_new/doc/Section.md @@ -0,0 +1,32 @@ +# manager_api_new.model.Section + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/SectionApi.md b/manager_api_new/doc/SectionApi.md similarity index 88% rename from manager_api/doc/SectionApi.md rename to manager_api_new/doc/SectionApi.md index 5dba346..2f7236f 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api_new/doc/SectionApi.md @@ -1,11 +1,11 @@ -# manager_api.api.SectionApi +# manager_api_new.api.SectionApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,11 +19,12 @@ Method | HTTP request | Description [**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | [**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | [**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | +[**sectionGetFromConfigurationDetail**](SectionApi.md#sectiongetfromconfigurationdetail) | **GET** /api/Section/configuration/{id}/detail | [**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | [**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | [**sectionGetPdfDTO**](SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | [**sectionGetPuzzleDTO**](SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | -[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO | +[**sectionGetQuizDTO**](SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO | [**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | [**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | [**sectionGetWeatherDTO**](SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | @@ -40,7 +41,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -83,7 +84,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -126,7 +127,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -169,7 +170,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -212,7 +213,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -251,7 +252,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -294,7 +295,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -337,7 +338,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -370,13 +371,13 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sectionGetDetail** -> SectionDTO sectionGetDetail(id) +> Object sectionGetDetail(id) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -399,7 +400,7 @@ Name | Type | Description | Notes ### Return type -[**SectionDTO**](SectionDTO.md) +[**Object**](Object.md) ### Authorization @@ -419,7 +420,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -455,6 +456,49 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **sectionGetFromConfigurationDetail** +> List sectionGetFromConfigurationDetail(id) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); +final id = id_example; // String | + +try { + final result = api_instance.sectionGetFromConfigurationDetail(id); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetFromConfigurationDetail: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**List**](Object.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **sectionGetMapDTO** > MapDTO sectionGetMapDTO() @@ -462,7 +506,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -501,7 +545,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -540,7 +584,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -579,7 +623,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -611,24 +655,24 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **sectionGetQuizzDTO** -> QuizzDTO sectionGetQuizzDTO() +# **sectionGetQuizDTO** +> QuizDTO sectionGetQuizDTO() ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = SectionApi(); try { - final result = api_instance.sectionGetQuizzDTO(); + final result = api_instance.sectionGetQuizDTO(); print(result); } catch (e) { - print('Exception when calling SectionApi->sectionGetQuizzDTO: $e\n'); + print('Exception when calling SectionApi->sectionGetQuizDTO: $e\n'); } ``` @@ -637,7 +681,7 @@ This endpoint does not need any parameter. ### Return type -[**QuizzDTO**](QuizzDTO.md) +[**QuizDTO**](QuizDTO.md) ### Authorization @@ -657,7 +701,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -696,7 +740,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -735,7 +779,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -774,7 +818,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -813,7 +857,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -846,21 +890,21 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sectionUpdate** -> SectionDTO sectionUpdate(sectionDTO) +> Object sectionUpdate(body) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = SectionApi(); -final sectionDTO = SectionDTO(); // SectionDTO | +final body = Object(); // Object | try { - final result = api_instance.sectionUpdate(sectionDTO); + final result = api_instance.sectionUpdate(body); print(result); } catch (e) { print('Exception when calling SectionApi->sectionUpdate: $e\n'); @@ -871,11 +915,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sectionDTO** | [**SectionDTO**](SectionDTO.md)| | + **body** | **Object**| | ### Return type -[**SectionDTO**](SectionDTO.md) +[**Object**](Object.md) ### Authorization @@ -895,7 +939,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/SectionDTO.md b/manager_api_new/doc/SectionDTO.md similarity index 91% rename from manager_api/doc/SectionDTO.md rename to manager_api_new/doc/SectionDTO.md index 484d474..d5d8fc0 100644 --- a/manager_api/doc/SectionDTO.md +++ b/manager_api_new/doc/SectionDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.SectionDTO +# manager_api_new.model.SectionDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -18,7 +18,6 @@ Name | Type | Description | Notes **isSubSection** | **bool** | | [optional] **parentId** | **String** | | [optional] **type** | [**SectionType**](SectionType.md) | | [optional] -**data** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **order** | **int** | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api_new/doc/SectionMap.md b/manager_api_new/doc/SectionMap.md new file mode 100644 index 0000000..e875189 --- /dev/null +++ b/manager_api_new/doc/SectionMap.md @@ -0,0 +1,42 @@ +# manager_api_new.model.SectionMap + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**mapCategories** | [**List**](CategorieDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**mapZoom** | **int** | | [optional] +**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional] +**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional] +**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional] +**mapPoints** | [**List**](GeoPoint.md) | | [optional] [default to const []] +**mapResourceId** | **String** | | [optional] +**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**mapCenterLatitude** | **String** | | [optional] +**mapCenterLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapMapProvider.md b/manager_api_new/doc/SectionMapAllOfMapMapProvider.md new file mode 100644 index 0000000..bc9de49 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapMapProvider.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapMapProvider + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapMapType.md b/manager_api_new/doc/SectionMapAllOfMapMapType.md new file mode 100644 index 0000000..2594134 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapMapType.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapMapType + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapResource.md b/manager_api_new/doc/SectionMapAllOfMapResource.md new file mode 100644 index 0000000..4d70802 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapResource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.SectionMapAllOfMapResource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md b/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md new file mode 100644 index 0000000..1998288 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapTypeMapbox + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapApi.md b/manager_api_new/doc/SectionMapApi.md new file mode 100644 index 0000000..5cb26c5 --- /dev/null +++ b/manager_api_new/doc/SectionMapApi.md @@ -0,0 +1,191 @@ +# manager_api_new.api.SectionMapApi + +## Load the API package +```dart +import 'package:manager_api_new/api.dart'; +``` + +All URIs are relative to *https://localhost:5001* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sectionMapCreate**](SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points | +[**sectionMapDelete**](SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} | +[**sectionMapGetAllGeoPointsFromSection**](SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points | +[**sectionMapUpdate**](SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap | + + +# **sectionMapCreate** +> GeoPointDTO sectionMapCreate(sectionId, geoPointDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final sectionId = sectionId_example; // String | +final geoPointDTO = GeoPointDTO(); // GeoPointDTO | + +try { + final result = api_instance.sectionMapCreate(sectionId, geoPointDTO); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapCreate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + **geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| | + +### Return type + +[**GeoPointDTO**](GeoPointDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapDelete** +> String sectionMapDelete(geoPointId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final geoPointId = 56; // int | + +try { + final result = api_instance.sectionMapDelete(geoPointId); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapDelete: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **geoPointId** | **int**| | + +### Return type + +**String** + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapGetAllGeoPointsFromSection** +> List sectionMapGetAllGeoPointsFromSection(sectionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final sectionId = sectionId_example; // String | + +try { + final result = api_instance.sectionMapGetAllGeoPointsFromSection(sectionId); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapGetAllGeoPointsFromSection: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + +### Return type + +[**List**](GeoPointDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapUpdate** +> GeoPoint sectionMapUpdate(geoPointDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final geoPointDTO = GeoPointDTO(); // GeoPointDTO | + +try { + final result = api_instance.sectionMapUpdate(geoPointDTO); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapUpdate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| | + +### Return type + +[**GeoPoint**](GeoPoint.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/manager_api_new/doc/SectionQuiz.md b/manager_api_new/doc/SectionQuiz.md new file mode 100644 index 0000000..0a9e9f6 --- /dev/null +++ b/manager_api_new/doc/SectionQuiz.md @@ -0,0 +1,37 @@ +# manager_api_new.model.SectionQuiz + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**quizQuestions** | [**List**](QuizQuestion.md) | | [default to const []] +**quizBadLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizMediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGoodLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGreatLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionQuizApi.md b/manager_api_new/doc/SectionQuizApi.md new file mode 100644 index 0000000..6d35ebf --- /dev/null +++ b/manager_api_new/doc/SectionQuizApi.md @@ -0,0 +1,191 @@ +# manager_api_new.api.SectionQuizApi + +## Load the API package +```dart +import 'package:manager_api_new/api.dart'; +``` + +All URIs are relative to *https://localhost:5001* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sectionQuizCreate**](SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions | +[**sectionQuizDelete**](SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} | +[**sectionQuizGetAllQuizQuestionFromSection**](SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions | +[**sectionQuizUpdate**](SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz | + + +# **sectionQuizCreate** +> QuestionDTO sectionQuizCreate(sectionId, questionDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final sectionId = sectionId_example; // String | +final questionDTO = QuestionDTO(); // QuestionDTO | + +try { + final result = api_instance.sectionQuizCreate(sectionId, questionDTO); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizCreate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + **questionDTO** | [**QuestionDTO**](QuestionDTO.md)| | + +### Return type + +[**QuestionDTO**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizDelete** +> String sectionQuizDelete(quizQuestionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final quizQuestionId = 56; // int | + +try { + final result = api_instance.sectionQuizDelete(quizQuestionId); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizDelete: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quizQuestionId** | **int**| | + +### Return type + +**String** + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizGetAllQuizQuestionFromSection** +> List sectionQuizGetAllQuizQuestionFromSection(sectionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final sectionId = sectionId_example; // String | + +try { + final result = api_instance.sectionQuizGetAllQuizQuestionFromSection(sectionId); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizGetAllQuizQuestionFromSection: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + +### Return type + +[**List**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizUpdate** +> QuestionDTO sectionQuizUpdate(questionDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final questionDTO = QuestionDTO(); // QuestionDTO | + +try { + final result = api_instance.sectionQuizUpdate(questionDTO); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizUpdate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **questionDTO** | [**QuestionDTO**](QuestionDTO.md)| | + +### Return type + +[**QuestionDTO**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/manager_api/doc/SectionType.md b/manager_api_new/doc/SectionType.md similarity index 79% rename from manager_api/doc/SectionType.md rename to manager_api_new/doc/SectionType.md index 8374ab6..586ae2d 100644 --- a/manager_api/doc/SectionType.md +++ b/manager_api_new/doc/SectionType.md @@ -1,8 +1,8 @@ -# manager_api.model.SectionType +# manager_api_new.model.SectionType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/SliderDTO.md b/manager_api_new/doc/SliderDTO.md new file mode 100644 index 0000000..675c4b3 --- /dev/null +++ b/manager_api_new/doc/SliderDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.SliderDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/TokenDTO.md b/manager_api_new/doc/TokenDTO.md similarity index 84% rename from manager_api/doc/TokenDTO.md rename to manager_api_new/doc/TokenDTO.md index 843486c..975c521 100644 --- a/manager_api/doc/TokenDTO.md +++ b/manager_api_new/doc/TokenDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TokenDTO +# manager_api_new.model.TokenDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -15,7 +15,7 @@ Name | Type | Description | Notes **expiresIn** | **int** | | [optional] **expiration** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/TranslationAndResourceDTO.md b/manager_api_new/doc/TranslationAndResourceDTO.md similarity index 68% rename from manager_api/doc/TranslationAndResourceDTO.md rename to manager_api_new/doc/TranslationAndResourceDTO.md index 5f6f567..7d6868c 100644 --- a/manager_api/doc/TranslationAndResourceDTO.md +++ b/manager_api_new/doc/TranslationAndResourceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TranslationAndResourceDTO +# manager_api_new.model.TranslationAndResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **language** | **String** | | [optional] **value** | **String** | | [optional] **resourceId** | **String** | | [optional] -**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] -**resourceUrl** | **String** | | [optional] +**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/TranslationDTO.md b/manager_api_new/doc/TranslationDTO.md similarity index 82% rename from manager_api/doc/TranslationDTO.md rename to manager_api_new/doc/TranslationDTO.md index 45938ec..c9e67be 100644 --- a/manager_api/doc/TranslationDTO.md +++ b/manager_api_new/doc/TranslationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TranslationDTO +# manager_api_new.model.TranslationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/User.md b/manager_api_new/doc/User.md new file mode 100644 index 0000000..1edb33a --- /dev/null +++ b/manager_api_new/doc/User.md @@ -0,0 +1,22 @@ +# manager_api_new.model.User + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**email** | **String** | | +**password** | **String** | | +**lastName** | **String** | | +**token** | **String** | | +**instanceId** | **String** | | +**firstName** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/UserApi.md b/manager_api_new/doc/UserApi.md similarity index 85% rename from manager_api/doc/UserApi.md rename to manager_api_new/doc/UserApi.md index 644770e..c46e856 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api_new/doc/UserApi.md @@ -1,11 +1,11 @@ -# manager_api.api.UserApi +# manager_api_new.api.UserApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -17,21 +17,21 @@ Method | HTTP request | Description # **userCreateUser** -> UserDetailDTO userCreateUser(user) +> UserDetailDTO userCreateUser(userDetailDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final user = User(); // User | +final userDetailDTO = UserDetailDTO(); // UserDetailDTO | try { - final result = api_instance.userCreateUser(user); + final result = api_instance.userCreateUser(userDetailDTO); print(result); } catch (e) { print('Exception when calling UserApi->userCreateUser: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| | + **userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| | ### Return type @@ -66,7 +66,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -109,7 +109,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -148,7 +148,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -185,21 +185,21 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **userUpdateUser** -> UserDetailDTO userUpdateUser(user) +> UserDetailDTO userUpdateUser(userDetailDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final user = User(); // User | +final userDetailDTO = UserDetailDTO(); // UserDetailDTO | try { - final result = api_instance.userUpdateUser(user); + final result = api_instance.userUpdateUser(userDetailDTO); print(result); } catch (e) { print('Exception when calling UserApi->userUpdateUser: $e\n'); @@ -210,7 +210,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| | + **userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| | ### Return type diff --git a/manager_api/doc/UserDetailDTO.md b/manager_api_new/doc/UserDetailDTO.md similarity index 79% rename from manager_api/doc/UserDetailDTO.md rename to manager_api_new/doc/UserDetailDTO.md index 27a3126..5c4a0ea 100644 --- a/manager_api/doc/UserDetailDTO.md +++ b/manager_api_new/doc/UserDetailDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.UserDetailDTO +# manager_api_new.model.UserDetailDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -12,6 +12,7 @@ Name | Type | Description | Notes **email** | **String** | | [optional] **firstName** | **String** | | [optional] **lastName** | **String** | | [optional] +**instanceId** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api_new/doc/VideoDTO.md b/manager_api_new/doc/VideoDTO.md new file mode 100644 index 0000000..511ab32 --- /dev/null +++ b/manager_api_new/doc/VideoDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.VideoDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**source_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/WeatherDTO.md b/manager_api_new/doc/WeatherDTO.md new file mode 100644 index 0000000..b6d019f --- /dev/null +++ b/manager_api_new/doc/WeatherDTO.md @@ -0,0 +1,35 @@ +# manager_api_new.model.WeatherDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**city** | **String** | | [optional] +**updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**result** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/WebDTO.md b/manager_api_new/doc/WebDTO.md new file mode 100644 index 0000000..3e585b6 --- /dev/null +++ b/manager_api_new/doc/WebDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.WebDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**source_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/git_push.sh b/manager_api_new/git_push.sh similarity index 100% rename from manager_api/git_push.sh rename to manager_api_new/git_push.sh diff --git a/manager_api/lib/api.dart b/manager_api_new/lib/api.dart similarity index 65% rename from manager_api/lib/api.dart rename to manager_api_new/lib/api.dart index 078b45c..142059a 100644 --- a/manager_api/lib/api.dart +++ b/manager_api_new/lib/api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -14,6 +14,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:http/http.dart'; import 'package:intl/intl.dart'; import 'package:meta/meta.dart'; @@ -33,45 +34,53 @@ part 'api/device_api.dart'; part 'api/instance_api.dart'; part 'api/resource_api.dart'; part 'api/section_api.dart'; +part 'api/section_map_api.dart'; +part 'api/section_quiz_api.dart'; part 'api/user_api.dart'; part 'model/agenda_dto.dart'; +part 'model/agenda_dto_all_of_agenda_map_provider.dart'; part 'model/article_dto.dart'; part 'model/categorie_dto.dart'; part 'model/configuration_dto.dart'; part 'model/content_dto.dart'; -part 'model/content_geo_point.dart'; +part 'model/content_dto_resource.dart'; part 'model/device_dto.dart'; part 'model/device_detail_dto.dart'; -part 'model/device_detail_dto_all_of.dart'; part 'model/export_configuration_dto.dart'; -part 'model/export_configuration_dto_all_of.dart'; +part 'model/geo_point.dart'; part 'model/geo_point_dto.dart'; -part 'model/geo_point_dto_categorie.dart'; +part 'model/geo_point_section_map.dart'; part 'model/instance.dart'; part 'model/instance_dto.dart'; -part 'model/level_dto.dart'; part 'model/login_dto.dart'; part 'model/map_dto.dart'; -part 'model/map_dto_map_provider.dart'; -part 'model/map_dto_map_type.dart'; -part 'model/map_dto_map_type_mapbox.dart'; +part 'model/map_dto_all_of_map_provider.dart'; +part 'model/map_dto_all_of_map_type.dart'; +part 'model/map_dto_all_of_map_type_mapbox.dart'; part 'model/map_provider.dart'; part 'model/map_type_app.dart'; part 'model/map_type_map_box.dart'; part 'model/menu_dto.dart'; -part 'model/pdf_file_dto.dart'; +part 'model/ordered_translation_and_resource_dto.dart'; part 'model/pdf_dto.dart'; part 'model/player_message_dto.dart'; part 'model/puzzle_dto.dart'; -part 'model/puzzle_dto_image.dart'; +part 'model/puzzle_dto_all_of_puzzle_image.dart'; part 'model/question_dto.dart'; -part 'model/quizz_dto.dart'; -part 'model/quizz_dto_bad_level.dart'; +part 'model/question_dto_image_background_resource_type.dart'; +part 'model/quiz_dto.dart'; +part 'model/resource.dart'; part 'model/resource_dto.dart'; part 'model/resource_type.dart'; part 'model/response_dto.dart'; +part 'model/section.dart'; part 'model/section_dto.dart'; +part 'model/section_map.dart'; +part 'model/section_map_all_of_map_map_provider.dart'; +part 'model/section_map_all_of_map_map_type.dart'; +part 'model/section_map_all_of_map_resource.dart'; +part 'model/section_map_all_of_map_type_mapbox.dart'; part 'model/section_type.dart'; part 'model/slider_dto.dart'; part 'model/token_dto.dart'; @@ -83,12 +92,17 @@ part 'model/video_dto.dart'; part 'model/weather_dto.dart'; part 'model/web_dto.dart'; +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); -ApiClient defaultApiClient = ApiClient(); +bool _isEpochMarker(String? pattern) => + pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/manager_api/lib/api/authentication_api.dart b/manager_api_new/lib/api/authentication_api.dart similarity index 76% rename from manager_api/lib/api/authentication_api.dart rename to manager_api_new/lib/api/authentication_api.dart index e8647e9..c136358 100644 --- a/manager_api/lib/api/authentication_api.dart +++ b/manager_api_new/lib/api/authentication_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class AuthenticationApi { - AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + AuthenticationApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -28,7 +28,13 @@ class AuthenticationApi { /// * [String] clientId: /// /// * [String] clientSecret: - Future authenticationAuthenticateWithFormWithHttpInfo({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async { + Future authenticationAuthenticateWithFormWithHttpInfo({ + String? grantType, + String? username, + String? password, + String? clientId, + String? clientSecret, + }) async { // ignore: prefer_const_declarations final path = r'/api/Authentication/Token'; @@ -89,17 +95,32 @@ class AuthenticationApi { /// * [String] clientId: /// /// * [String] clientSecret: - Future authenticationAuthenticateWithForm({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async { - final response = await authenticationAuthenticateWithFormWithHttpInfo( grantType: grantType, username: username, password: password, clientId: clientId, clientSecret: clientSecret, ); + Future authenticationAuthenticateWithForm({ + String? grantType, + String? username, + String? password, + String? clientId, + String? clientSecret, + }) async { + final response = await authenticationAuthenticateWithFormWithHttpInfo( + grantType: grantType, + username: username, + password: password, + clientId: clientId, + clientSecret: clientSecret, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'TokenDTO', + ) as TokenDTO; } return null; } @@ -108,7 +129,9 @@ class AuthenticationApi { /// Parameters: /// /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO,) async { + Future authenticationAuthenticateWithJsonWithHttpInfo( + LoginDTO loginDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Authentication/Authenticate'; @@ -121,7 +144,6 @@ class AuthenticationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -136,17 +158,24 @@ class AuthenticationApi { /// Parameters: /// /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJson(LoginDTO loginDTO,) async { - final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO,); + Future authenticationAuthenticateWithJson( + LoginDTO loginDTO, + ) async { + final response = await authenticationAuthenticateWithJsonWithHttpInfo( + loginDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'TokenDTO', + ) as TokenDTO; } return null; } diff --git a/manager_api/lib/api/configuration_api.dart b/manager_api_new/lib/api/configuration_api.dart similarity index 71% rename from manager_api/lib/api/configuration_api.dart rename to manager_api_new/lib/api/configuration_api.dart index 8eacded..ca73489 100644 --- a/manager_api/lib/api/configuration_api.dart +++ b/manager_api_new/lib/api/configuration_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class ConfigurationApi { - ConfigurationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + ConfigurationApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + Future configurationCreateWithHttpInfo( + ConfigurationDTO configurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -33,7 +35,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreate(ConfigurationDTO configurationDTO,) async { - final response = await configurationCreateWithHttpInfo(configurationDTO,); + Future configurationCreate( + ConfigurationDTO configurationDTO, + ) async { + final response = await configurationCreateWithHttpInfo( + configurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } @@ -67,10 +75,11 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationDeleteWithHttpInfo(String id,) async { + Future configurationDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationDelete(String id,) async { - final response = await configurationDeleteWithHttpInfo(id,); + Future configurationDelete( + String id, + ) async { + final response = await configurationDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -117,10 +132,12 @@ class ConfigurationApi { /// * [String] id (required): /// /// * [String] language: - Future configurationExportWithHttpInfo(String id, { String? language, }) async { + Future configurationExportWithHttpInfo( + String id, { + String? language, + }) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}/export' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}/export'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -135,7 +152,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -152,8 +168,14 @@ class ConfigurationApi { /// * [String] id (required): /// /// * [String] language: - Future configurationExport(String id, String? language) async { - final response = await configurationExportWithHttpInfo(id, language: language); + Future configurationExport( + String id, { + String? language, + }) async { + final response = await configurationExportWithHttpInfo( + id, + language: language, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -162,7 +184,7 @@ class ConfigurationApi { // FormatException when trying to decode an empty string. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ExportConfigurationDTO',) as ExportConfigurationDTO; - + } return Future.value(null); } @@ -171,7 +193,9 @@ class ConfigurationApi { /// Parameters: /// /// * [String] instanceId: - Future configurationGetWithHttpInfo({ String? instanceId, }) async { + Future configurationGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -188,7 +212,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -203,20 +226,25 @@ class ConfigurationApi { /// Parameters: /// /// * [String] instanceId: - Future?> configurationGet({ String? instanceId, }) async { - final response = await configurationGetWithHttpInfo( instanceId: instanceId, ); + Future?> configurationGet({ + String? instanceId, + }) async { + final response = await configurationGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -224,8 +252,10 @@ class ConfigurationApi { /// Performs an HTTP 'GET /api/Configuration/byPin' operation and returns the [Response]. /// Parameters: /// - /// * [int] pinCode: - Future configurationGetConfigurationsByPinCodeWithHttpInfo({ int? pinCode, }) async { + /// * [String] pinCode: + Future configurationGetConfigurationsByPinCodeWithHttpInfo({ + String? pinCode, + }) async { // ignore: prefer_const_declarations final path = r'/api/Configuration/byPin'; @@ -242,7 +272,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -256,21 +285,26 @@ class ConfigurationApi { /// Parameters: /// - /// * [int] pinCode: - Future?> configurationGetConfigurationsByPinCode({ int? pinCode, }) async { - final response = await configurationGetConfigurationsByPinCodeWithHttpInfo( pinCode: pinCode, ); + /// * [String] pinCode: + Future?> configurationGetConfigurationsByPinCode({ + String? pinCode, + }) async { + final response = await configurationGetConfigurationsByPinCodeWithHttpInfo( + pinCode: pinCode, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -279,10 +313,11 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationGetDetailWithHttpInfo(String id,) async { + Future configurationGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -293,7 +328,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -308,17 +342,24 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationGetDetail(String id,) async { - final response = await configurationGetDetailWithHttpInfo(id,); + Future configurationGetDetail( + String id, + ) async { + final response = await configurationGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } @@ -327,7 +368,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO,) async { + Future configurationImportWithHttpInfo( + ExportConfigurationDTO exportConfigurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration/import'; @@ -340,7 +383,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -355,17 +397,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImport(ExportConfigurationDTO exportConfigurationDTO,) async { - final response = await configurationImportWithHttpInfo(exportConfigurationDTO,); + Future configurationImport( + ExportConfigurationDTO exportConfigurationDTO, + ) async { + final response = await configurationImportWithHttpInfo( + exportConfigurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -374,7 +423,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + Future configurationUpdateWithHttpInfo( + ConfigurationDTO configurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -387,7 +438,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -402,17 +452,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdate(ConfigurationDTO configurationDTO,) async { - final response = await configurationUpdateWithHttpInfo(configurationDTO,); + Future configurationUpdate( + ConfigurationDTO configurationDTO, + ) async { + final response = await configurationUpdateWithHttpInfo( + configurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } diff --git a/manager_api/lib/api/device_api.dart b/manager_api_new/lib/api/device_api.dart similarity index 71% rename from manager_api/lib/api/device_api.dart rename to manager_api_new/lib/api/device_api.dart index 7bb84ed..8d6b451 100644 --- a/manager_api/lib/api/device_api.dart +++ b/manager_api_new/lib/api/device_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,6 @@ part of openapi.api; - class DeviceApi { DeviceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; @@ -20,7 +19,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + Future deviceCreateWithHttpInfo( + DeviceDetailDTO deviceDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -33,7 +34,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +48,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreate(DeviceDetailDTO deviceDetailDTO,) async { - final response = await deviceCreateWithHttpInfo(deviceDetailDTO,); + Future deviceCreate( + DeviceDetailDTO deviceDetailDTO, + ) async { + final response = await deviceCreateWithHttpInfo( + deviceDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -67,10 +74,11 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceDeleteWithHttpInfo(String id,) async { + Future deviceDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Device/{id}' - .replaceAll('{id}', id); + final path = r'/api/Device/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +89,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +103,24 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceDelete(String id,) async { - final response = await deviceDeleteWithHttpInfo(id,); + Future deviceDelete( + String id, + ) async { + final response = await deviceDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -115,7 +129,9 @@ class DeviceApi { /// Parameters: /// /// * [String] instanceId: - Future deviceGetWithHttpInfo({ String? instanceId, }) async { + Future deviceGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -132,7 +148,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -147,20 +162,25 @@ class DeviceApi { /// Parameters: /// /// * [String] instanceId: - Future?> deviceGet({ String? instanceId, }) async { - final response = await deviceGetWithHttpInfo( instanceId: instanceId, ); + Future?> deviceGet({ + String? instanceId, + }) async { + final response = await deviceGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -169,10 +189,11 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceGetDetailWithHttpInfo(String id,) async { + Future deviceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Device/{id}/detail' - .replaceAll('{id}', id); + final path = r'/api/Device/{id}/detail'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -183,7 +204,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -198,17 +218,24 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceGetDetail(String id,) async { - final response = await deviceGetDetailWithHttpInfo(id,); + Future deviceGetDetail( + String id, + ) async { + final response = await deviceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -217,7 +244,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + Future deviceUpdateWithHttpInfo( + DeviceDetailDTO deviceDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -230,7 +259,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -245,17 +273,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdate(DeviceDetailDTO deviceDetailDTO,) async { - final response = await deviceUpdateWithHttpInfo(deviceDetailDTO,); + Future deviceUpdate( + DeviceDetailDTO deviceDetailDTO, + ) async { + final response = await deviceUpdateWithHttpInfo( + deviceDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -264,7 +299,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO,) async { + Future deviceUpdateMainInfosWithHttpInfo( + DeviceDTO deviceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device/mainInfos'; @@ -277,7 +314,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -292,17 +328,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfos(DeviceDTO deviceDTO,) async { - final response = await deviceUpdateMainInfosWithHttpInfo(deviceDTO,); + Future deviceUpdateMainInfos( + DeviceDTO deviceDTO, + ) async { + final response = await deviceUpdateMainInfosWithHttpInfo( + deviceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDTO',) as DeviceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDTO', + ) as DeviceDTO; } return null; } diff --git a/manager_api/lib/api/instance_api.dart b/manager_api_new/lib/api/instance_api.dart similarity index 69% rename from manager_api/lib/api/instance_api.dart rename to manager_api_new/lib/api/instance_api.dart index 2e120d1..45b2163 100644 --- a/manager_api/lib/api/instance_api.dart +++ b/manager_api_new/lib/api/instance_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,22 +10,24 @@ part of openapi.api; - class InstanceApi { - InstanceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + InstanceApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; /// Performs an HTTP 'POST /api/Instance' operation and returns the [Response]. /// Parameters: /// - /// * [Instance] instance (required): - Future instanceCreateInstanceWithHttpInfo(Instance instance,) async { + /// * [InstanceDTO] instanceDTO (required): + Future instanceCreateInstanceWithHttpInfo( + InstanceDTO instanceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Instance'; // ignore: prefer_final_locals - Object? postBody = instance; + Object? postBody = instanceDTO; final queryParams = []; final headerParams = {}; @@ -33,7 +35,6 @@ class InstanceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -47,18 +48,25 @@ class InstanceApi { /// Parameters: /// - /// * [Instance] instance (required): - Future instanceCreateInstance(Instance instance,) async { - final response = await instanceCreateInstanceWithHttpInfo(instance,); + /// * [InstanceDTO] instanceDTO (required): + Future instanceCreateInstance( + InstanceDTO instanceDTO, + ) async { + final response = await instanceCreateInstanceWithHttpInfo( + instanceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -67,10 +75,11 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceDeleteInstanceWithHttpInfo(String id,) async { + Future instanceDeleteInstanceWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Instance/{id}' - .replaceAll('{id}', id); + final path = r'/api/Instance/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceDeleteInstance(String id,) async { - final response = await instanceDeleteInstanceWithHttpInfo(id,); + Future instanceDeleteInstance( + String id, + ) async { + final response = await instanceDeleteInstanceWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -125,7 +140,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -145,12 +159,13 @@ class InstanceApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -159,10 +174,11 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceGetDetailWithHttpInfo(String id,) async { + Future instanceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Instance/{id}' - .replaceAll('{id}', id); + final path = r'/api/Instance/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -173,7 +189,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -188,17 +203,24 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceGetDetail(String id,) async { - final response = await instanceGetDetailWithHttpInfo(id,); + Future instanceGetDetail( + String id, + ) async { + final response = await instanceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -206,8 +228,10 @@ class InstanceApi { /// Performs an HTTP 'GET /api/Instance/byPin' operation and returns the [Response]. /// Parameters: /// - /// * [int] pinCode: - Future instanceGetInstanceByPinCodeWithHttpInfo({ int? pinCode, }) async { + /// * [String] pinCode: + Future instanceGetInstanceByPinCodeWithHttpInfo({ + String? pinCode, + }) async { // ignore: prefer_const_declarations final path = r'/api/Instance/byPin'; @@ -224,7 +248,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -238,18 +261,25 @@ class InstanceApi { /// Parameters: /// - /// * [int] pinCode: - Future instanceGetInstanceByPinCode({ int? pinCode, }) async { - final response = await instanceGetInstanceByPinCodeWithHttpInfo( pinCode: pinCode, ); + /// * [String] pinCode: + Future instanceGetInstanceByPinCode({ + String? pinCode, + }) async { + final response = await instanceGetInstanceByPinCodeWithHttpInfo( + pinCode: pinCode, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -257,13 +287,15 @@ class InstanceApi { /// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response]. /// Parameters: /// - /// * [Instance] instance (required): - Future instanceUpdateinstanceWithHttpInfo(Instance instance,) async { + /// * [InstanceDTO] instanceDTO (required): + Future instanceUpdateinstanceWithHttpInfo( + InstanceDTO instanceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Instance'; // ignore: prefer_final_locals - Object? postBody = instance; + Object? postBody = instanceDTO; final queryParams = []; final headerParams = {}; @@ -271,7 +303,6 @@ class InstanceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -285,18 +316,25 @@ class InstanceApi { /// Parameters: /// - /// * [Instance] instance (required): - Future instanceUpdateinstance(Instance instance,) async { - final response = await instanceUpdateinstanceWithHttpInfo(instance,); + /// * [InstanceDTO] instanceDTO (required): + Future instanceUpdateinstance( + InstanceDTO instanceDTO, + ) async { + final response = await instanceUpdateinstanceWithHttpInfo( + instanceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } diff --git a/manager_api/lib/api/resource_api.dart b/manager_api_new/lib/api/resource_api.dart similarity index 70% rename from manager_api/lib/api/resource_api.dart rename to manager_api_new/lib/api/resource_api.dart index bb0ea9d..7980569 100644 --- a/manager_api/lib/api/resource_api.dart +++ b/manager_api_new/lib/api/resource_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class ResourceApi { - ResourceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + ResourceApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceCreateWithHttpInfo(ResourceDTO resourceDTO,) async { + Future resourceCreateWithHttpInfo( + ResourceDTO resourceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -33,7 +35,6 @@ class ResourceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceCreate(ResourceDTO resourceDTO,) async { - final response = await resourceCreateWithHttpInfo(resourceDTO,); + Future resourceCreate( + ResourceDTO resourceDTO, + ) async { + final response = await resourceCreateWithHttpInfo( + resourceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -67,10 +75,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceDeleteWithHttpInfo(String id,) async { + Future resourceDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceDelete(String id,) async { - final response = await resourceDeleteWithHttpInfo(id,); + Future resourceDelete( + String id, + ) async { + final response = await resourceDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -117,7 +132,10 @@ class ResourceApi { /// * [String] instanceId: /// /// * [List] types: - Future resourceGetWithHttpInfo({ String? instanceId, List? types, }) async { + Future resourceGetWithHttpInfo({ + String? instanceId, + List? types, + }) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -137,7 +155,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -154,20 +171,27 @@ class ResourceApi { /// * [String] instanceId: /// /// * [List] types: - Future?> resourceGet({ String? instanceId, List? types, }) async { - final response = await resourceGetWithHttpInfo( instanceId: instanceId, types: types, ); + Future?> resourceGet({ + String? instanceId, + List? types, + }) async { + final response = await resourceGetWithHttpInfo( + instanceId: instanceId, + types: types, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -176,10 +200,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceGetDetailWithHttpInfo(String id,) async { + Future resourceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}/detail' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}/detail'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -190,7 +215,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -205,17 +229,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceGetDetail(String id,) async { - final response = await resourceGetDetailWithHttpInfo(id,); + Future resourceGetDetail( + String id, + ) async { + final response = await resourceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -224,10 +255,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceShowWithHttpInfo(String id,) async { + Future resourceShowWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -238,7 +270,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -253,17 +284,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceShow(String id,) async { - final response = await resourceShowWithHttpInfo(id,); + Future resourceShow( + String id, + ) async { + final response = await resourceShowWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'MultipartFile', + ) as MultipartFile; } return null; } @@ -272,7 +310,9 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdateWithHttpInfo(ResourceDTO resourceDTO,) async { + Future resourceUpdateWithHttpInfo( + ResourceDTO resourceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -285,7 +325,6 @@ class ResourceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -300,17 +339,24 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdate(ResourceDTO resourceDTO,) async { - final response = await resourceUpdateWithHttpInfo(resourceDTO,); + Future resourceUpdate( + ResourceDTO resourceDTO, + ) async { + final response = await resourceUpdateWithHttpInfo( + resourceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -323,7 +369,11 @@ class ResourceApi { /// * [String] type: /// /// * [String] instanceId: - Future resourceUploadWithHttpInfo({ String? label, String? type, String? instanceId, }) async { + Future resourceUploadWithHttpInfo({ + String? label, + String? type, + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Resource/upload'; @@ -372,17 +422,28 @@ class ResourceApi { /// * [String] type: /// /// * [String] instanceId: - Future resourceUpload({ String? label, String? type, String? instanceId, }) async { - final response = await resourceUploadWithHttpInfo( label: label, type: type, instanceId: instanceId, ); + Future resourceUpload({ + String? label, + String? type, + String? instanceId, + }) async { + final response = await resourceUploadWithHttpInfo( + label: label, + type: type, + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } diff --git a/manager_api/lib/api/section_api.dart b/manager_api_new/lib/api/section_api.dart similarity index 72% rename from manager_api/lib/api/section_api.dart rename to manager_api_new/lib/api/section_api.dart index 5dfcc5d..47e8877 100644 --- a/manager_api/lib/api/section_api.dart +++ b/manager_api_new/lib/api/section_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class SectionApi { - SectionApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + SectionApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class SectionApi { /// Parameters: /// /// * [SectionDTO] sectionDTO (required): - Future sectionCreateWithHttpInfo(SectionDTO sectionDTO,) async { + Future sectionCreateWithHttpInfo( + SectionDTO sectionDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section'; @@ -33,7 +35,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class SectionApi { /// Parameters: /// /// * [SectionDTO] sectionDTO (required): - Future sectionCreate(SectionDTO sectionDTO,) async { - final response = await sectionCreateWithHttpInfo(sectionDTO,); + Future sectionCreate( + SectionDTO sectionDTO, + ) async { + final response = await sectionCreateWithHttpInfo( + sectionDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SectionDTO', + ) as SectionDTO; } return null; } @@ -67,10 +75,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteWithHttpInfo(String id,) async { + Future sectionDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDelete(String id,) async { - final response = await sectionDeleteWithHttpInfo(id,); + Future sectionDelete( + String id, + ) async { + final response = await sectionDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -115,10 +130,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteAllForConfigurationWithHttpInfo(String id,) async { + Future sectionDeleteAllForConfigurationWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -129,7 +145,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -144,17 +159,24 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteAllForConfiguration(String id,) async { - final response = await sectionDeleteAllForConfigurationWithHttpInfo(id,); + Future sectionDeleteAllForConfiguration( + String id, + ) async { + final response = await sectionDeleteAllForConfigurationWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -163,7 +185,9 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId: - Future sectionGetWithHttpInfo({ String? instanceId, }) async { + Future sectionGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Section'; @@ -180,7 +204,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -195,20 +218,25 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId: - Future?> sectionGet({ String? instanceId, }) async { - final response = await sectionGetWithHttpInfo( instanceId: instanceId, ); + Future?> sectionGet({ + String? instanceId, + }) async { + final response = await sectionGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -227,7 +255,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -247,9 +274,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AgendaDTO',) as AgendaDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'AgendaDTO', + ) as AgendaDTO; } return null; } @@ -258,10 +288,12 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId (required): - Future sectionGetAllBeaconsForInstanceWithHttpInfo(String instanceId,) async { + Future sectionGetAllBeaconsForInstanceWithHttpInfo( + String instanceId, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section/beacons/{instanceId}' - .replaceAll('{instanceId}', instanceId); + .replaceAll('{instanceId}', instanceId); // ignore: prefer_final_locals Object? postBody; @@ -272,7 +304,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -287,20 +318,25 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId (required): - Future?> sectionGetAllBeaconsForInstance(String instanceId,) async { - final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(instanceId,); + Future?> sectionGetAllBeaconsForInstance( + String instanceId, + ) async { + final response = await sectionGetAllBeaconsForInstanceWithHttpInfo( + instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -309,10 +345,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetAllSectionSubSectionsWithHttpInfo(String id,) async { + Future sectionGetAllSectionSubSectionsWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}/subsections' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}/subsections'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -323,7 +360,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -338,20 +374,27 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future?> sectionGetAllSectionSubSections(String id,) async { - final response = await sectionGetAllSectionSubSectionsWithHttpInfo(id,); + Future sectionGetAllSectionSubSections( + String id, + ) async { + final response = await sectionGetAllSectionSubSectionsWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + /*final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false);*/ + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; } return null; } @@ -370,7 +413,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -390,9 +432,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ArticleDTO',) as ArticleDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ArticleDTO', + ) as ArticleDTO; } return null; } @@ -401,10 +446,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetDetailWithHttpInfo(String id,) async { + Future sectionGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -415,7 +461,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -430,17 +475,27 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetDetail(String id,) async { - final response = await sectionGetDetailWithHttpInfo(id,); + Future sectionGetDetail( + String id, + ) async { + final response = await sectionGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + /*return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'Object', + ) as Object;*/ + + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; // <- Ce sera un Map ou une List selon le JSON } return null; } @@ -449,10 +504,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetFromConfigurationWithHttpInfo(String id,) async { + Future sectionGetFromConfigurationWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -463,7 +519,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -478,20 +533,82 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future?> sectionGetFromConfiguration(String id,) async { - final response = await sectionGetFromConfigurationWithHttpInfo(id,); + Future?> sectionGetFromConfiguration( + String id, + ) async { + final response = await sectionGetFromConfigurationWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); + } + return null; + } + /// Performs an HTTP 'GET /api/Section/configuration/{id}/detail' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetFromConfigurationDetailWithHttpInfo( + String id, + ) async { + // ignore: prefer_const_declarations + final path = + r'/api/Section/configuration/{id}/detail'.replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] id (required): + Future?> sectionGetFromConfigurationDetail( + String id, + ) async { + final response = await sectionGetFromConfigurationDetailWithHttpInfo( + id, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -510,7 +627,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -530,9 +646,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MapDTO',) as MapDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'MapDTO', + ) as MapDTO; } return null; } @@ -551,7 +670,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -571,9 +689,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MenuDTO',) as MenuDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'MenuDTO', + ) as MenuDTO; } return null; } @@ -592,7 +713,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -612,9 +732,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PdfDTO',) as PdfDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'PdfDTO', + ) as PdfDTO; } return null; } @@ -633,7 +756,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -653,17 +775,20 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PuzzleDTO',) as PuzzleDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'PuzzleDTO', + ) as PuzzleDTO; } return null; } - /// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response]. - Future sectionGetQuizzDTOWithHttpInfo() async { + /// Performs an HTTP 'GET /api/Section/QuizDTO' operation and returns the [Response]. + Future sectionGetQuizDTOWithHttpInfo() async { // ignore: prefer_const_declarations - final path = r'/api/Section/QuizzDTO'; + final path = r'/api/Section/QuizDTO'; // ignore: prefer_final_locals Object? postBody; @@ -674,7 +799,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -686,17 +810,20 @@ class SectionApi { ); } - Future sectionGetQuizzDTO() async { - final response = await sectionGetQuizzDTOWithHttpInfo(); + Future sectionGetQuizDTO() async { + final response = await sectionGetQuizDTOWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QuizzDTO',) as QuizzDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'QuizDTO', + ) as QuizDTO; } return null; } @@ -715,7 +842,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -735,9 +861,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SliderDTO',) as SliderDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SliderDTO', + ) as SliderDTO; } return null; } @@ -756,7 +885,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -776,9 +904,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VideoDTO',) as VideoDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'VideoDTO', + ) as VideoDTO; } return null; } @@ -797,7 +928,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -817,9 +947,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeatherDTO',) as WeatherDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'WeatherDTO', + ) as WeatherDTO; } return null; } @@ -838,7 +971,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -858,9 +990,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WebDTO',) as WebDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'WebDTO', + ) as WebDTO; } return null; } @@ -879,7 +1014,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -899,9 +1033,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PlayerMessageDTO',) as PlayerMessageDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'PlayerMessageDTO', + ) as PlayerMessageDTO; } return null; } @@ -909,13 +1046,15 @@ class SectionApi { /// Performs an HTTP 'PUT /api/Section' operation and returns the [Response]. /// Parameters: /// - /// * [SectionDTO] sectionDTO (required): - Future sectionUpdateWithHttpInfo(SectionDTO sectionDTO,) async { + /// * [Object] body (required): + Future sectionUpdateWithHttpInfo( + Object body, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section'; // ignore: prefer_final_locals - Object? postBody = sectionDTO; + Object? postBody = body; final queryParams = []; final headerParams = {}; @@ -923,7 +1062,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -937,18 +1075,27 @@ class SectionApi { /// Parameters: /// - /// * [SectionDTO] sectionDTO (required): - Future sectionUpdate(SectionDTO sectionDTO,) async { - final response = await sectionUpdateWithHttpInfo(sectionDTO,); + /// * [Object] body (required): + Future sectionUpdate( + Object body, + ) async { + final response = await sectionUpdateWithHttpInfo( + body, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; + /*return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SectionDTO', + ) as SectionDTO*/; } return null; } @@ -957,7 +1104,9 @@ class SectionApi { /// Parameters: /// /// * [List] sectionDTO (required): - Future sectionUpdateOrderWithHttpInfo(List sectionDTO,) async { + Future sectionUpdateOrderWithHttpInfo( + List sectionDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section/order'; @@ -970,7 +1119,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -985,17 +1133,24 @@ class SectionApi { /// Parameters: /// /// * [List] sectionDTO (required): - Future sectionUpdateOrder(List sectionDTO,) async { - final response = await sectionUpdateOrderWithHttpInfo(sectionDTO,); + Future sectionUpdateOrder( + List sectionDTO, + ) async { + final response = await sectionUpdateOrderWithHttpInfo( + sectionDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } diff --git a/manager_api_new/lib/api/section_map_api.dart b/manager_api_new/lib/api/section_map_api.dart new file mode 100644 index 0000000..2fd0f88 --- /dev/null +++ b/manager_api_new/lib/api/section_map_api.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapApi { + SectionMapApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/SectionMap/{sectionId}/points' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapCreateWithHttpInfo( + String sectionId, + GeoPointDTO geoPointDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/{sectionId}/points' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody = geoPointDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapCreate( + String sectionId, + GeoPointDTO geoPointDTO, + ) async { + final response = await sectionMapCreateWithHttpInfo( + sectionId, + geoPointDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'GeoPointDTO', + ) as GeoPointDTO; + } + return null; + } + + /// Performs an HTTP 'DELETE /api/SectionMap/points/delete/{geoPointId}' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] geoPointId (required): + Future sectionMapDeleteWithHttpInfo( + int geoPointId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/points/delete/{geoPointId}' + .replaceAll('{geoPointId}', geoPointId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] geoPointId (required): + Future sectionMapDelete( + int geoPointId, + ) async { + final response = await sectionMapDeleteWithHttpInfo( + geoPointId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; + } + return null; + } + + /// Performs an HTTP 'GET /api/SectionMap/{sectionId}/points' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + Future sectionMapGetAllGeoPointsFromSectionWithHttpInfo( + String sectionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/{sectionId}/points' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + Future?> sectionMapGetAllGeoPointsFromSection( + String sectionId, + ) async { + final response = await sectionMapGetAllGeoPointsFromSectionWithHttpInfo( + sectionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); + } + return null; + } + + /// Performs an HTTP 'PUT /api/SectionMap' operation and returns the [Response]. + /// Parameters: + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapUpdateWithHttpInfo( + GeoPointDTO geoPointDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap'; + + // ignore: prefer_final_locals + Object? postBody = geoPointDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapUpdate( + GeoPointDTO geoPointDTO, + ) async { + final response = await sectionMapUpdateWithHttpInfo( + geoPointDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'GeoPoint', + ) as GeoPoint; + } + return null; + } +} diff --git a/manager_api_new/lib/api/section_quiz_api.dart b/manager_api_new/lib/api/section_quiz_api.dart new file mode 100644 index 0000000..4bddda1 --- /dev/null +++ b/manager_api_new/lib/api/section_quiz_api.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionQuizApi { + SectionQuizApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizCreateWithHttpInfo( + String sectionId, + QuestionDTO questionDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/{sectionId}/questions' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody = questionDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizCreate( + String sectionId, + QuestionDTO questionDTO, + ) async { + final response = await sectionQuizCreateWithHttpInfo( + sectionId, + questionDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'QuestionDTO', + ) as QuestionDTO; + } + return null; + } + + /// Performs an HTTP 'DELETE /api/SectionQuiz/questions/delete/{quizQuestionId}' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] quizQuestionId (required): + Future sectionQuizDeleteWithHttpInfo( + int quizQuestionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/questions/delete/{quizQuestionId}' + .replaceAll('{quizQuestionId}', quizQuestionId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] quizQuestionId (required): + Future sectionQuizDelete( + int quizQuestionId, + ) async { + final response = await sectionQuizDeleteWithHttpInfo( + quizQuestionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; + } + return null; + } + + /// Performs an HTTP 'GET /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + Future sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo( + String sectionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/{sectionId}/questions' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + Future?> sectionQuizGetAllQuizQuestionFromSection( + String sectionId, + ) async { + final response = await sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo( + sectionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); + } + return null; + } + + /// Performs an HTTP 'PUT /api/SectionQuiz' operation and returns the [Response]. + /// Parameters: + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizUpdateWithHttpInfo( + QuestionDTO questionDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz'; + + // ignore: prefer_final_locals + Object? postBody = questionDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizUpdate( + QuestionDTO questionDTO, + ) async { + final response = await sectionQuizUpdateWithHttpInfo( + questionDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'QuestionDTO', + ) as QuestionDTO; + } + return null; + } +} diff --git a/manager_api/lib/api/user_api.dart b/manager_api_new/lib/api/user_api.dart similarity index 70% rename from manager_api/lib/api/user_api.dart rename to manager_api_new/lib/api/user_api.dart index 989b146..786a2da 100644 --- a/manager_api/lib/api/user_api.dart +++ b/manager_api_new/lib/api/user_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,6 @@ part of openapi.api; - class UserApi { UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; @@ -19,13 +18,15 @@ class UserApi { /// Performs an HTTP 'POST /api/User' operation and returns the [Response]. /// Parameters: /// - /// * [User] user (required): - Future userCreateUserWithHttpInfo(User user,) async { + /// * [UserDetailDTO] userDetailDTO (required): + Future userCreateUserWithHttpInfo( + UserDetailDTO userDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/User'; // ignore: prefer_final_locals - Object? postBody = user; + Object? postBody = userDetailDTO; final queryParams = []; final headerParams = {}; @@ -33,7 +34,6 @@ class UserApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -47,18 +47,25 @@ class UserApi { /// Parameters: /// - /// * [User] user (required): - Future userCreateUser(User user,) async { - final response = await userCreateUserWithHttpInfo(user,); + /// * [UserDetailDTO] userDetailDTO (required): + Future userCreateUser( + UserDetailDTO userDetailDTO, + ) async { + final response = await userCreateUserWithHttpInfo( + userDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } @@ -67,10 +74,11 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userDeleteUserWithHttpInfo(String id,) async { + Future userDeleteUserWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/User/{id}' - .replaceAll('{id}', id); + final path = r'/api/User/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +89,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +103,24 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userDeleteUser(String id,) async { - final response = await userDeleteUserWithHttpInfo(id,); + Future userDeleteUser( + String id, + ) async { + final response = await userDeleteUserWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -125,7 +139,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -145,12 +158,13 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -159,10 +173,11 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userGetDetailWithHttpInfo(String id,) async { + Future userGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/User/{id}' - .replaceAll('{id}', id); + final path = r'/api/User/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -173,7 +188,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -188,17 +202,24 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userGetDetail(String id,) async { - final response = await userGetDetailWithHttpInfo(id,); + Future userGetDetail( + String id, + ) async { + final response = await userGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } @@ -206,13 +227,15 @@ class UserApi { /// Performs an HTTP 'PUT /api/User' operation and returns the [Response]. /// Parameters: /// - /// * [User] user (required): - Future userUpdateUserWithHttpInfo(User user,) async { + /// * [UserDetailDTO] userDetailDTO (required): + Future userUpdateUserWithHttpInfo( + UserDetailDTO userDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/User'; // ignore: prefer_final_locals - Object? postBody = user; + Object? postBody = userDetailDTO; final queryParams = []; final headerParams = {}; @@ -220,7 +243,6 @@ class UserApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -234,18 +256,25 @@ class UserApi { /// Parameters: /// - /// * [User] user (required): - Future userUpdateUser(User user,) async { - final response = await userUpdateUserWithHttpInfo(user,); + /// * [UserDetailDTO] userDetailDTO (required): + Future userUpdateUser( + UserDetailDTO userDetailDTO, + ) async { + final response = await userUpdateUserWithHttpInfo( + userDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } diff --git a/manager_api/lib/api_client.dart b/manager_api_new/lib/api_client.dart similarity index 57% rename from manager_api/lib/api_client.dart rename to manager_api_new/lib/api_client.dart index 2fb099d..a1dca31 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api_new/lib/api_client.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,7 +11,10 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'https://api.myinfomate.be', this.authentication,}); + ApiClient({ + this.basePath = 'https://localhost:5001', + this.authentication, + }); final String basePath; final Authentication? authentication; @@ -32,7 +35,7 @@ class ApiClient { Map get defaultHeaderMap => _defaultHeaderMap; void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; + _defaultHeaderMap[key] = value; } // We don't use a Map for queryParams. @@ -54,25 +57,26 @@ class ApiClient { } final urlEncodedQueryParams = queryParams.map((param) => '$param'); - final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; + final queryString = urlEncodedQueryParams.isNotEmpty + ? '?${urlEncodedQueryParams.join('&')}' + : ''; final uri = Uri.parse('$basePath$path$queryString'); try { // Special case for uploading a single file which isn't a 'multipart/form-data'. - if ( - body is MultipartFile && (contentType == null || - !contentType.toLowerCase().startsWith('multipart/form-data')) - ) { + if (body is MultipartFile && + (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data'))) { final request = StreamedRequest(method, uri); request.headers.addAll(headerParams); request.contentLength = body.length; body.finalize().listen( - request.sink.add, - onDone: request.sink.close, - // ignore: avoid_types_on_closure_parameters - onError: (Object error, StackTrace trace) => request.sink.close(), - cancelOnError: true, - ); + request.sink.add, + onDone: request.sink.close, + // ignore: avoid_types_on_closure_parameters + onError: (Object error, StackTrace trace) => request.sink.close(), + cancelOnError: true, + ); final response = await _client.send(request); return Response.fromStream(response); } @@ -88,17 +92,45 @@ class ApiClient { } final msgBody = contentType == 'application/x-www-form-urlencoded' - ? formParams - : await serializeAsync(body); + ? formParams + : await serializeAsync(body); final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; - switch(method) { - case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,); - case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,); - case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,); - case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,); - case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); - case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); + switch (method) { + case 'POST': + return await _client.post( + uri, + headers: nullableHeaderParams, + body: msgBody, + ); + case 'PUT': + return await _client.put( + uri, + headers: nullableHeaderParams, + body: msgBody, + ); + case 'DELETE': + return await _client.delete( + uri, + headers: nullableHeaderParams, + body: msgBody, + ); + case 'PATCH': + return await _client.patch( + uri, + headers: nullableHeaderParams, + body: msgBody, + ); + case 'HEAD': + return await _client.head( + uri, + headers: nullableHeaderParams, + ); + case 'GET': + return await _client.get( + uri, + headers: nullableHeaderParams, + ); } } on SocketException catch (error, trace) { throw ApiException.withInner( @@ -143,28 +175,44 @@ class ApiClient { ); } - Future deserializeAsync(String json, String targetType, {bool growable = false,}) async => - // ignore: deprecated_member_use_from_same_package - deserialize(json, targetType, growable: growable); + Future deserializeAsync( + String value, + String targetType, { + bool growable = false, + }) async => + // ignore: deprecated_member_use_from_same_package + deserialize(value, targetType, growable: growable); - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - dynamic deserialize(String json, String targetType, {bool growable = false,}) { + @Deprecated( + 'Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') + dynamic deserialize( + String value, + String targetType, { + bool growable = false, + }) { // Remove all spaces. Necessary for regular expressions as well. - targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments + targetType = + targetType.replaceAll(' ', ''); // ignore: parameter_assignments // If the expected target type is String, nothing to do... return targetType == 'String' - ? json - : _deserialize(jsonDecode(json), targetType, growable: growable); + ? value + : fromJson(json.decode(value), targetType, growable: growable); } // ignore: deprecated_member_use_from_same_package Future serializeAsync(Object? value) async => serialize(value); - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') + @Deprecated( + 'Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') String serialize(Object? value) => value == null ? '' : json.encode(value); - static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { + /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. + static dynamic fromJson( + dynamic value, + String targetType, { + bool growable = false, + }) { try { switch (targetType) { case 'String': @@ -183,6 +231,8 @@ class ApiClient { return value is DateTime ? value : DateTime.tryParse(value); case 'AgendaDTO': return AgendaDTO.fromJson(value); + case 'AgendaDTOAllOfAgendaMapProvider': + return AgendaDTOAllOfAgendaMapProvider.fromJson(value); case 'ArticleDTO': return ArticleDTO.fromJson(value); case 'CategorieDTO': @@ -191,38 +241,34 @@ class ApiClient { return ConfigurationDTO.fromJson(value); case 'ContentDTO': return ContentDTO.fromJson(value); - case 'ContentGeoPoint': - return ContentGeoPoint.fromJson(value); + case 'ContentDTOResource': + return ContentDTOResource.fromJson(value); case 'DeviceDTO': return DeviceDTO.fromJson(value); case 'DeviceDetailDTO': return DeviceDetailDTO.fromJson(value); - case 'DeviceDetailDTOAllOf': - return DeviceDetailDTOAllOf.fromJson(value); case 'ExportConfigurationDTO': return ExportConfigurationDTO.fromJson(value); - case 'ExportConfigurationDTOAllOf': - return ExportConfigurationDTOAllOf.fromJson(value); + case 'GeoPoint': + return GeoPoint.fromJson(value); case 'GeoPointDTO': return GeoPointDTO.fromJson(value); - case 'GeoPointDTOCategorie': - return GeoPointDTOCategorie.fromJson(value); + case 'GeoPointSectionMap': + return GeoPointSectionMap.fromJson(value); case 'Instance': return Instance.fromJson(value); case 'InstanceDTO': return InstanceDTO.fromJson(value); - case 'LevelDTO': - return LevelDTO.fromJson(value); case 'LoginDTO': return LoginDTO.fromJson(value); case 'MapDTO': return MapDTO.fromJson(value); - case 'MapDTOMapProvider': - return MapDTOMapProvider.fromJson(value); - case 'MapDTOMapType': - return MapDTOMapType.fromJson(value); - case 'MapDTOMapTypeMapbox': - return MapDTOMapTypeMapbox.fromJson(value); + case 'MapDTOAllOfMapProvider': + return MapDTOAllOfMapProvider.fromJson(value); + case 'MapDTOAllOfMapType': + return MapDTOAllOfMapType.fromJson(value); + case 'MapDTOAllOfMapTypeMapbox': + return MapDTOAllOfMapTypeMapbox.fromJson(value); case 'MapProvider': return MapProviderTypeTransformer().decode(value); case 'MapTypeApp': @@ -231,30 +277,44 @@ class ApiClient { return MapTypeMapBoxTypeTransformer().decode(value); case 'MenuDTO': return MenuDTO.fromJson(value); - case 'PDFFileDTO': - return PDFFileDTO.fromJson(value); + case 'OrderedTranslationAndResourceDTO': + return OrderedTranslationAndResourceDTO.fromJson(value); case 'PdfDTO': return PdfDTO.fromJson(value); case 'PlayerMessageDTO': return PlayerMessageDTO.fromJson(value); case 'PuzzleDTO': return PuzzleDTO.fromJson(value); - case 'PuzzleDTOImage': - return PuzzleDTOImage.fromJson(value); + case 'PuzzleDTOAllOfPuzzleImage': + return PuzzleDTOAllOfPuzzleImage.fromJson(value); case 'QuestionDTO': return QuestionDTO.fromJson(value); - case 'QuizzDTO': - return QuizzDTO.fromJson(value); - case 'QuizzDTOBadLevel': - return QuizzDTOBadLevel.fromJson(value); + case 'QuestionDTOImageBackgroundResourceType': + return QuestionDTOImageBackgroundResourceType.fromJson(value); + case 'QuizDTO': + return QuizDTO.fromJson(value); + case 'Resource': + return Resource.fromJson(value); case 'ResourceDTO': return ResourceDTO.fromJson(value); case 'ResourceType': return ResourceTypeTypeTransformer().decode(value); case 'ResponseDTO': return ResponseDTO.fromJson(value); + case 'Section': + return Section.fromJson(value); case 'SectionDTO': return SectionDTO.fromJson(value); + case 'SectionMap': + return SectionMap.fromJson(value); + case 'SectionMapAllOfMapMapProvider': + return SectionMapAllOfMapMapProvider.fromJson(value); + case 'SectionMapAllOfMapMapType': + return SectionMapAllOfMapMapType.fromJson(value); + case 'SectionMapAllOfMapResource': + return SectionMapAllOfMapResource.fromJson(value); + case 'SectionMapAllOfMapTypeMapbox': + return SectionMapAllOfMapTypeMapbox.fromJson(value); case 'SectionType': return SectionTypeTypeTransformer().decode(value); case 'SliderDTO': @@ -277,27 +337,50 @@ class ApiClient { return WebDTO.fromJson(value); default: dynamic match; - if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { + if (value is List && + (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, match, growable: growable,)) - .toList(growable: growable); + .map((dynamic v) => fromJson( + v, + match, + growable: growable, + )) + .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { + if (value is Set && + (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, match, growable: growable,)) - .toSet(); + .map((dynamic v) => fromJson( + v, + match, + growable: growable, + )) + .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { + if (value is Map && + (match = _regMap.firstMatch(targetType)?.group(1)) != null) { return Map.fromIterables( value.keys.cast(), - value.values.map((dynamic v) => _deserialize(v, match, growable: growable,)), + value.values.map((dynamic v) => fromJson( + v, + match, + growable: growable, + )), ); } } } on Exception catch (error, trace) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); + throw ApiException.withInner( + HttpStatus.internalServerError, + 'Exception during deserialization.', + error, + trace, + ); } - throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); + throw ApiException( + HttpStatus.internalServerError, + 'Could not find a suitable class for deserialization', + ); } } @@ -319,6 +402,15 @@ class DeserializationMessage { final bool growable; } +/// Primarily intended for use in an isolate. +Future decodeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' ? message.json : json.decode(message.json); +} + /// Primarily intended for use in an isolate. Future deserializeAsync(DeserializationMessage message) async { // Remove all spaces. Necessary for regular expressions as well. @@ -326,13 +418,14 @@ Future deserializeAsync(DeserializationMessage message) async { // If the expected target type is String, nothing to do... return targetType == 'String' - ? message.json - : ApiClient._deserialize( - jsonDecode(message.json), - targetType, - growable: message.growable, - ); + ? message.json + : ApiClient.fromJson( + json.decode(message.json), + targetType, + growable: message.growable, + ); } /// Primarily intended for use in an isolate. -Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); +Future serializeAsync(Object? value) async => + value == null ? '' : json.encode(value); diff --git a/manager_api/lib/api_exception.dart b/manager_api_new/lib/api_exception.dart similarity index 86% rename from manager_api/lib/api_exception.dart rename to manager_api_new/lib/api_exception.dart index 796f7f7..d20b872 100644 --- a/manager_api/lib/api_exception.dart +++ b/manager_api_new/lib/api_exception.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,8 @@ part of openapi.api; class ApiException implements Exception { ApiException(this.code, this.message); - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + ApiException.withInner( + this.code, this.message, this.innerException, this.stackTrace); int code = 0; String? message; diff --git a/manager_api/lib/api_helper.dart b/manager_api_new/lib/api_helper.dart similarity index 81% rename from manager_api/lib/api_helper.dart rename to manager_api_new/lib/api_helper.dart index d13d9d7..5a0d454 100644 --- a/manager_api/lib/api_helper.dart +++ b/manager_api_new/lib/api_helper.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,11 +17,16 @@ class QueryParam { final String value; @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; + String toString() => + '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; } // Ported from the Java version. -Iterable _queryParams(String collectionFormat, String name, dynamic value,) { +Iterable _queryParams( + String collectionFormat, + String name, + dynamic value, +) { // Assertions to run in debug mode only. assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); @@ -29,7 +34,9 @@ Iterable _queryParams(String collectionFormat, String name, dynamic if (value is List) { if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + return value.map( + (dynamic v) => QueryParam(name, parameterToString(v)), + ); } // Default collection format is 'csv'. @@ -39,7 +46,10 @@ Iterable _queryParams(String collectionFormat, String name, dynamic final delimiter = _delimiters[collectionFormat] ?? ','; - params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + params.add(QueryParam( + name, + value.map(parameterToString).join(delimiter), + )); } else if (value != null) { params.add(QueryParam(name, parameterToString(value))); } @@ -77,9 +87,12 @@ String parameterToString(dynamic value) { /// content type. Otherwise, returns the decoded body as decoded by dart:http package. Future _decodeBodyBytes(Response response) async { final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) - : response.body; + return contentType != null && + contentType.toLowerCase().startsWith('application/json') + ? response.bodyBytes.isEmpty + ? '' + : utf8.decode(response.bodyBytes) + : response.body; } /// Returns a valid [T] value found at the specified Map [key], null otherwise. @@ -102,7 +115,7 @@ DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { if (value is int) { millis = value; } else if (value is String) { - if (pattern == _dateEpochMarker) { + if (_isEpochMarker(pattern)) { millis = int.tryParse(value); } else { return DateTime.tryParse(value); diff --git a/manager_api/lib/auth/api_key_auth.dart b/manager_api_new/lib/auth/api_key_auth.dart similarity index 88% rename from manager_api/lib/auth/api_key_auth.dart rename to manager_api_new/lib/auth/api_key_auth.dart index 84dc295..00105ec 100644 --- a/manager_api/lib/auth/api_key_auth.dart +++ b/manager_api_new/lib/auth/api_key_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -20,7 +20,10 @@ class ApiKeyAuth implements Authentication { String apiKey = ''; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; if (paramValue.isNotEmpty) { diff --git a/manager_api/lib/auth/authentication.dart b/manager_api_new/lib/auth/authentication.dart similarity index 77% rename from manager_api/lib/auth/authentication.dart rename to manager_api_new/lib/auth/authentication.dart index 1b1b8ae..3d8cb17 100644 --- a/manager_api/lib/auth/authentication.dart +++ b/manager_api_new/lib/auth/authentication.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,5 +13,6 @@ part of openapi.api; // ignore: one_member_abstracts abstract class Authentication { /// Apply authentication settings to header and query params. - Future applyToParams(List queryParams, Map headerParams); + Future applyToParams( + List queryParams, Map headerParams); } diff --git a/manager_api/lib/auth/http_basic_auth.dart b/manager_api_new/lib/auth/http_basic_auth.dart similarity index 70% rename from manager_api/lib/auth/http_basic_auth.dart rename to manager_api_new/lib/auth/http_basic_auth.dart index dfedaa5..cf02eb3 100644 --- a/manager_api/lib/auth/http_basic_auth.dart +++ b/manager_api_new/lib/auth/http_basic_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,10 +17,14 @@ class HttpBasicAuth implements Authentication { String password; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (username.isNotEmpty && password.isNotEmpty) { final credentials = '$username:$password'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + headerParams['Authorization'] = + 'Basic ${base64.encode(utf8.encode(credentials))}'; } } } diff --git a/manager_api/lib/auth/http_bearer_auth.dart b/manager_api_new/lib/auth/http_bearer_auth.dart similarity index 81% rename from manager_api/lib/auth/http_bearer_auth.dart rename to manager_api_new/lib/auth/http_bearer_auth.dart index eddf3a5..61b6a23 100644 --- a/manager_api/lib/auth/http_bearer_auth.dart +++ b/manager_api_new/lib/auth/http_bearer_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,13 +21,17 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('accessToken value must be either a String or a String Function().'); + throw ArgumentError( + 'accessToken value must be either a String or a String Function().'); } _accessToken = accessToken; } @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (_accessToken == null) { return; } diff --git a/manager_api/lib/auth/oauth.dart b/manager_api_new/lib/auth/oauth.dart similarity index 79% rename from manager_api/lib/auth/oauth.dart rename to manager_api_new/lib/auth/oauth.dart index e9e7d78..c7de2bf 100644 --- a/manager_api/lib/auth/oauth.dart +++ b/manager_api_new/lib/auth/oauth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,10 @@ class OAuth implements Authentication { String accessToken; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/manager_api_new/lib/model/agenda_dto.dart b/manager_api_new/lib/model/agenda_dto.dart new file mode 100644 index 0000000..c59c63d --- /dev/null +++ b/manager_api_new/lib/model/agenda_dto.dart @@ -0,0 +1,357 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AgendaDTO { + /// Returns a new [AgendaDTO] instance. + AgendaDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.resourceIds = const [], + this.agendaMapProvider, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? resourceIds; + + MapProvider? agendaMapProvider; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AgendaDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.resourceIds, resourceIds) && + other.agendaMapProvider == agendaMapProvider; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (resourceIds == null ? 0 : resourceIds!.hashCode) + + (agendaMapProvider == null ? 0 : agendaMapProvider!.hashCode); + + @override + String toString() => + 'AgendaDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, resourceIds=$resourceIds, agendaMapProvider=$agendaMapProvider]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.resourceIds != null) { + json[r'resourceIds'] = this.resourceIds; + } else { + json[r'resourceIds'] = null; + } + if (this.agendaMapProvider != null) { + json[r'agendaMapProvider'] = this.agendaMapProvider; + } else { + json[r'agendaMapProvider'] = null; + } + return json; + } + + /// Returns a new [AgendaDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AgendaDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "AgendaDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "AgendaDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AgendaDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']), + agendaMapProvider: MapProvider.fromJson(json[r'agendaMapProvider']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AgendaDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AgendaDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AgendaDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AgendaDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart b/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart new file mode 100644 index 0000000..d2d6aa0 --- /dev/null +++ b/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AgendaDTOAllOfAgendaMapProvider { + /// Returns a new [AgendaDTOAllOfAgendaMapProvider] instance. + AgendaDTOAllOfAgendaMapProvider(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is AgendaDTOAllOfAgendaMapProvider && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'AgendaDTOAllOfAgendaMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [AgendaDTOAllOfAgendaMapProvider] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AgendaDTOAllOfAgendaMapProvider? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AgendaDTOAllOfAgendaMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AgendaDTOAllOfAgendaMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AgendaDTOAllOfAgendaMapProvider( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AgendaDTOAllOfAgendaMapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AgendaDTOAllOfAgendaMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AgendaDTOAllOfAgendaMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AgendaDTOAllOfAgendaMapProvider.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/article_dto.dart b/manager_api_new/lib/model/article_dto.dart new file mode 100644 index 0000000..67ac908 --- /dev/null +++ b/manager_api_new/lib/model/article_dto.dart @@ -0,0 +1,402 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ArticleDTO { + /// Returns a new [ArticleDTO] instance. + ArticleDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.content = const [], + this.isContentTop, + this.audioIds = const [], + this.isReadAudioAuto, + this.contents = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? content; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isContentTop; + + List? audioIds; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isReadAudioAuto; + + List? contents; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ArticleDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.content, content) && + other.isContentTop == isContentTop && + _deepEquality.equals(other.audioIds, audioIds) && + other.isReadAudioAuto == isReadAudioAuto && + _deepEquality.equals(other.contents, contents); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (content == null ? 0 : content!.hashCode) + + (isContentTop == null ? 0 : isContentTop!.hashCode) + + (audioIds == null ? 0 : audioIds!.hashCode) + + (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + + (contents == null ? 0 : contents!.hashCode); + + @override + String toString() => + 'ArticleDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.content != null) { + json[r'content'] = this.content; + } else { + json[r'content'] = null; + } + if (this.isContentTop != null) { + json[r'isContentTop'] = this.isContentTop; + } else { + json[r'isContentTop'] = null; + } + if (this.audioIds != null) { + json[r'audioIds'] = this.audioIds; + } else { + json[r'audioIds'] = null; + } + if (this.isReadAudioAuto != null) { + json[r'isReadAudioAuto'] = this.isReadAudioAuto; + } else { + json[r'isReadAudioAuto'] = null; + } + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; + } + return json; + } + + /// Returns a new [ArticleDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ArticleDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "ArticleDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ArticleDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ArticleDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + content: TranslationDTO.listFromJson(json[r'content']), + isContentTop: mapValueOfType(json, r'isContentTop'), + audioIds: TranslationDTO.listFromJson(json[r'audioIds']), + isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), + contents: ContentDTO.listFromJson(json[r'contents']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArticleDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArticleDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ArticleDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ArticleDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/categorie_dto.dart b/manager_api_new/lib/model/categorie_dto.dart similarity index 62% rename from manager_api/lib/model/categorie_dto.dart rename to manager_api_new/lib/model/categorie_dto.dart index 33dc8da..eda272d 100644 --- a/manager_api/lib/model/categorie_dto.dart +++ b/manager_api_new/lib/model/categorie_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,44 +16,48 @@ class CategorieDTO { this.id, this.label = const [], this.icon, - this.iconResourceId, - this.iconUrl, + this.resourceDTO, this.order, }); + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// int? id; List? label; String? icon; - String? iconResourceId; - - String? iconUrl; + ResourceDTO? resourceDTO; int? order; @override - bool operator ==(Object other) => identical(this, other) || other is CategorieDTO && - other.id == id && - other.label == label && - other.icon == icon && - other.iconResourceId == iconResourceId && - other.iconUrl == iconUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is CategorieDTO && + other.id == id && + _deepEquality.equals(other.label, label) && + other.icon == icon && + other.resourceDTO == resourceDTO && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (icon == null ? 0 : icon!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconUrl == null ? 0 : iconUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (resourceDTO == null ? 0 : resourceDTO!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'CategorieDTO[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + String toString() => + 'CategorieDTO[id=$id, label=$label, icon=$icon, resourceDTO=$resourceDTO, order=$order]'; Map toJson() { final json = {}; @@ -72,15 +76,10 @@ class CategorieDTO { } else { json[r'icon'] = null; } - if (this.iconResourceId != null) { - json[r'iconResourceId'] = this.iconResourceId; + if (this.resourceDTO != null) { + json[r'resourceDTO'] = this.resourceDTO; } else { - json[r'iconResourceId'] = null; - } - if (this.iconUrl != null) { - json[r'iconUrl'] = this.iconUrl; - } else { - json[r'iconUrl'] = null; + json[r'resourceDTO'] = null; } if (this.order != null) { json[r'order'] = this.order; @@ -102,8 +101,10 @@ class CategorieDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "CategorieDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "CategorieDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "CategorieDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "CategorieDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -112,15 +113,17 @@ class CategorieDTO { id: mapValueOfType(json, r'id'), label: TranslationDTO.listFromJson(json[r'label']), icon: mapValueOfType(json, r'icon'), - iconResourceId: mapValueOfType(json, r'iconResourceId'), - iconUrl: mapValueOfType(json, r'iconUrl'), + resourceDTO: ResourceDTO.fromJson(json[r'resourceDTO']), order: mapValueOfType(json, r'order'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -148,20 +151,24 @@ class CategorieDTO { } // maps a json object with a list of CategorieDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = CategorieDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = CategorieDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api_new/lib/model/configuration_dto.dart similarity index 62% rename from manager_api/lib/model/configuration_dto.dart rename to manager_api_new/lib/model/configuration_dto.dart index 3d642fc..921b4f5 100644 --- a/manager_api/lib/model/configuration_dto.dart +++ b/manager_api_new/lib/model/configuration_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -29,10 +29,6 @@ class ConfigurationDTO { this.sectionIds = const [], this.loaderImageId, this.loaderImageUrl, - this.weatherCity, - this.weatherUpdatedDate, - this.weatherResult, - this.isWeather, this.isDate, this.isHour, this.isSectionImageBackground, @@ -96,20 +92,6 @@ class ConfigurationDTO { String? loaderImageUrl; - String? weatherCity; - - DateTime? weatherUpdatedDate; - - String? weatherResult; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isWeather; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -139,64 +121,64 @@ class ConfigurationDTO { int? screenPercentageSectionsMainPage; @override - bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && - other.id == id && - other.label == label && - other.title == title && - other.imageId == imageId && - other.imageSource == imageSource && - other.primaryColor == primaryColor && - other.secondaryColor == secondaryColor && - other.languages == languages && - other.dateCreation == dateCreation && - other.isMobile == isMobile && - other.isTablet == isTablet && - other.isOffline == isOffline && - other.instanceId == instanceId && - other.sectionIds == sectionIds && - other.loaderImageId == loaderImageId && - other.loaderImageUrl == loaderImageUrl && - other.weatherCity == weatherCity && - other.weatherUpdatedDate == weatherUpdatedDate && - other.weatherResult == weatherResult && - other.isWeather == isWeather && - other.isDate == isDate && - other.isHour == isHour && - other.isSectionImageBackground == isSectionImageBackground && - other.roundedValue == roundedValue && - other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage; + bool operator ==(Object other) => + identical(this, other) || + other is ConfigurationDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.imageId == imageId && + other.imageSource == imageSource && + other.primaryColor == primaryColor && + other.secondaryColor == secondaryColor && + _deepEquality.equals(other.languages, languages) && + other.dateCreation == dateCreation && + other.isMobile == isMobile && + other.isTablet == isTablet && + other.isOffline == isOffline && + other.instanceId == instanceId && + _deepEquality.equals(other.sectionIds, sectionIds) && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == + screenPercentageSectionsMainPage; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (primaryColor == null ? 0 : primaryColor!.hashCode) + - (secondaryColor == null ? 0 : secondaryColor!.hashCode) + - (languages == null ? 0 : languages!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (isMobile == null ? 0 : isMobile!.hashCode) + - (isTablet == null ? 0 : isTablet!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (sectionIds == null ? 0 : sectionIds!.hashCode) + - (loaderImageId == null ? 0 : loaderImageId!.hashCode) + - (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + - (weatherCity == null ? 0 : weatherCity!.hashCode) + - (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + - (weatherResult == null ? 0 : weatherResult!.hashCode) + - (isWeather == null ? 0 : isWeather!.hashCode) + - (isDate == null ? 0 : isDate!.hashCode) + - (isHour == null ? 0 : isHour!.hashCode) + - (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + - (roundedValue == null ? 0 : roundedValue!.hashCode) + - (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (primaryColor == null ? 0 : primaryColor!.hashCode) + + (secondaryColor == null ? 0 : secondaryColor!.hashCode) + + (languages == null ? 0 : languages!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isMobile == null ? 0 : isMobile!.hashCode) + + (isTablet == null ? 0 : isTablet!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null + ? 0 + : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null + ? 0 + : screenPercentageSectionsMainPage!.hashCode); @override - String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage]'; + String toString() => + 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage]'; Map toJson() { final json = {}; @@ -280,26 +262,6 @@ class ConfigurationDTO { } else { json[r'loaderImageUrl'] = null; } - if (this.weatherCity != null) { - json[r'weatherCity'] = this.weatherCity; - } else { - json[r'weatherCity'] = null; - } - if (this.weatherUpdatedDate != null) { - json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); - } else { - json[r'weatherUpdatedDate'] = null; - } - if (this.weatherResult != null) { - json[r'weatherResult'] = this.weatherResult; - } else { - json[r'weatherResult'] = null; - } - if (this.isWeather != null) { - json[r'isWeather'] = this.isWeather; - } else { - json[r'isWeather'] = null; - } if (this.isDate != null) { json[r'isDate'] = this.isDate; } else { @@ -321,7 +283,8 @@ class ConfigurationDTO { json[r'roundedValue'] = null; } if (this.screenPercentageSectionsMainPage != null) { - json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + json[r'screenPercentageSectionsMainPage'] = + this.screenPercentageSectionsMainPage; } else { json[r'screenPercentageSectionsMainPage'] = null; } @@ -340,8 +303,10 @@ class ConfigurationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ConfigurationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ConfigurationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ConfigurationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -354,34 +319,39 @@ class ConfigurationDTO { imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), secondaryColor: mapValueOfType(json, r'secondaryColor'), - languages: json[r'languages'] is List - ? (json[r'languages'] as List).cast() + languages: json[r'languages'] is Iterable + ? (json[r'languages'] as Iterable) + .cast() + .toList(growable: false) : const [], - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), isMobile: mapValueOfType(json, r'isMobile'), isTablet: mapValueOfType(json, r'isTablet'), isOffline: mapValueOfType(json, r'isOffline'), instanceId: mapValueOfType(json, r'instanceId'), - sectionIds: json[r'sectionIds'] is List - ? (json[r'sectionIds'] as List).cast() + sectionIds: json[r'sectionIds'] is Iterable + ? (json[r'sectionIds'] as Iterable) + .cast() + .toList(growable: false) : const [], loaderImageId: mapValueOfType(json, r'loaderImageId'), loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), - weatherCity: mapValueOfType(json, r'weatherCity'), - weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), - weatherResult: mapValueOfType(json, r'weatherResult'), - isWeather: mapValueOfType(json, r'isWeather'), isDate: mapValueOfType(json, r'isDate'), isHour: mapValueOfType(json, r'isHour'), - isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + isSectionImageBackground: + mapValueOfType(json, r'isSectionImageBackground'), roundedValue: mapValueOfType(json, r'roundedValue'), - screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), + screenPercentageSectionsMainPage: + mapValueOfType(json, r'screenPercentageSectionsMainPage'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -409,20 +379,24 @@ class ConfigurationDTO { } // maps a json object with a list of ConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ConfigurationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ConfigurationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/content_dto.dart b/manager_api_new/lib/model/content_dto.dart similarity index 62% rename from manager_api/lib/model/content_dto.dart rename to manager_api_new/lib/model/content_dto.dart index 32512da..2ed3ee5 100644 --- a/manager_api/lib/model/content_dto.dart +++ b/manager_api_new/lib/model/content_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -15,20 +15,15 @@ class ContentDTO { ContentDTO({ this.title = const [], this.description = const [], - this.resourceId, - this.resourceUrl, this.order, - this.resourceType, + this.resourceId, + this.resource, }); List? title; List? description; - String? resourceId; - - String? resourceUrl; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -37,35 +32,32 @@ class ContentDTO { /// int? order; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - ResourceType? resourceType; + String? resourceId; + + ResourceDTO? resource; @override - bool operator ==(Object other) => identical(this, other) || other is ContentDTO && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.resourceUrl == resourceUrl && - other.order == order && - other.resourceType == resourceType; + bool operator ==(Object other) => + identical(this, other) || + other is ContentDTO && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.resourceId == resourceId && + other.resource == resource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode); @override - String toString() => 'ContentDTO[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + String toString() => + 'ContentDTO[title=$title, description=$description, order=$order, resourceId=$resourceId, resource=$resource]'; Map toJson() { final json = {}; @@ -79,25 +71,20 @@ class ContentDTO { } else { json[r'description'] = null; } - if (this.resourceId != null) { - json[r'resourceId'] = this.resourceId; - } else { - json[r'resourceId'] = null; - } - if (this.resourceUrl != null) { - json[r'resourceUrl'] = this.resourceUrl; - } else { - json[r'resourceUrl'] = null; - } if (this.order != null) { json[r'order'] = this.order; } else { json[r'order'] = null; } - if (this.resourceType != null) { - json[r'resourceType'] = this.resourceType; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; } else { - json[r'resourceType'] = null; + json[r'resourceId'] = null; + } + if (this.resource != null) { + json[r'resource'] = this.resource; + } else { + json[r'resource'] = null; } return json; } @@ -114,8 +101,10 @@ class ContentDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ContentDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ContentDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ContentDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -123,16 +112,18 @@ class ContentDTO { return ContentDTO( title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), - resourceId: mapValueOfType(json, r'resourceId'), - resourceUrl: mapValueOfType(json, r'resourceUrl'), order: mapValueOfType(json, r'order'), - resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceId: mapValueOfType(json, r'resourceId'), + resource: ResourceDTO.fromJson(json[r'resource']), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +151,24 @@ class ContentDTO { } // maps a json object with a list of ContentDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ContentDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ContentDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/content_dto_resource.dart b/manager_api_new/lib/model/content_dto_resource.dart new file mode 100644 index 0000000..521be98 --- /dev/null +++ b/manager_api_new/lib/model/content_dto_resource.dart @@ -0,0 +1,191 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ContentDTOResource { + /// Returns a new [ContentDTOResource] instance. + ContentDTOResource({ + this.id, + this.type, + this.label, + this.url, + this.dateCreation, + this.instanceId, + }); + + String? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? type; + + String? label; + + String? url; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? instanceId; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ContentDTOResource && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); + + @override + String toString() => + 'ContentDTOResource[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + return json; + } + + /// Returns a new [ContentDTOResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentDTOResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "ContentDTOResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentDTOResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentDTOResource( + id: mapValueOfType(json, r'id'), + type: ResourceType.fromJson(json[r'type']), + label: mapValueOfType(json, r'label'), + url: mapValueOfType(json, r'url'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + instanceId: mapValueOfType(json, r'instanceId'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentDTOResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentDTOResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentDTOResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentDTOResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/content_geo_point.dart b/manager_api_new/lib/model/content_geo_point.dart similarity index 73% rename from manager_api/lib/model/content_geo_point.dart rename to manager_api_new/lib/model/content_geo_point.dart index d299f8a..9bd9ce8 100644 --- a/manager_api/lib/model/content_geo_point.dart +++ b/manager_api_new/lib/model/content_geo_point.dart @@ -34,22 +34,25 @@ class ContentGeoPoint { String? resourceName; @override - bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint && - other.resourceId == resourceId && - other.resourceType == resourceType && - other.resourceUrl == resourceUrl && - other.resourceName == resourceName; + bool operator ==(Object other) => + identical(this, other) || + other is ContentGeoPoint && + other.resourceId == resourceId && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl && + other.resourceName == resourceName; @override int get hashCode => - // ignore: unnecessary_parenthesis - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (resourceName == null ? 0 : resourceName!.hashCode); + // ignore: unnecessary_parenthesis + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (resourceName == null ? 0 : resourceName!.hashCode); @override - String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]'; + String toString() => + 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]'; Map toJson() { final json = {}; @@ -88,8 +91,10 @@ class ContentGeoPoint { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ContentGeoPoint[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ContentGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); }); return true; }()); @@ -104,7 +109,10 @@ class ContentGeoPoint { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,20 +140,24 @@ class ContentGeoPoint { } // maps a json object with a list of ContentGeoPoint-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ContentGeoPoint.listFromJson(entry.value, growable: growable,); + map[entry.key] = ContentGeoPoint.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_detail_dto.dart b/manager_api_new/lib/model/device_detail_dto.dart similarity index 65% rename from manager_api/lib/model/device_detail_dto.dart rename to manager_api_new/lib/model/device_detail_dto.dart index 8c645d6..7b434d7 100644 --- a/manager_api/lib/model/device_detail_dto.dart +++ b/manager_api_new/lib/model/device_detail_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -52,20 +52,8 @@ class DeviceDetailDTO { /// bool? connected; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateUpdate; String? instanceId; @@ -91,44 +79,47 @@ class DeviceDetailDTO { DateTime? lastBatteryLevel; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO && - other.id == id && - other.identifier == identifier && - other.name == name && - other.ipAddressWLAN == ipAddressWLAN && - other.ipAddressETH == ipAddressETH && - other.configurationId == configurationId && - other.configuration == configuration && - other.connected == connected && - other.dateCreation == dateCreation && - other.dateUpdate == dateUpdate && - other.instanceId == instanceId && - other.connectionLevel == connectionLevel && - other.lastConnectionLevel == lastConnectionLevel && - other.batteryLevel == batteryLevel && - other.lastBatteryLevel == lastBatteryLevel; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDetailDTO && + other.id == id && + other.identifier == identifier && + other.name == name && + other.ipAddressWLAN == ipAddressWLAN && + other.ipAddressETH == ipAddressETH && + other.configurationId == configurationId && + other.configuration == configuration && + other.connected == connected && + other.dateCreation == dateCreation && + other.dateUpdate == dateUpdate && + other.instanceId == instanceId && + other.connectionLevel == connectionLevel && + other.lastConnectionLevel == lastConnectionLevel && + other.batteryLevel == batteryLevel && + other.lastBatteryLevel == lastBatteryLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (identifier == null ? 0 : identifier!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + - (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (configuration == null ? 0 : configuration!.hashCode) + - (connected == null ? 0 : connected!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (dateUpdate == null ? 0 : dateUpdate!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (connectionLevel == null ? 0 : connectionLevel!.hashCode) + - (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + - (batteryLevel == null ? 0 : batteryLevel!.hashCode) + - (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + + (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (configuration == null ? 0 : configuration!.hashCode) + + (connected == null ? 0 : connected!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (dateUpdate == null ? 0 : dateUpdate!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (connectionLevel == null ? 0 : connectionLevel!.hashCode) + + (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + + (batteryLevel == null ? 0 : batteryLevel!.hashCode) + + (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); @override - String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; + String toString() => + 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { final json = {}; @@ -193,7 +184,8 @@ class DeviceDetailDTO { json[r'connectionLevel'] = null; } if (this.lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + json[r'lastConnectionLevel'] = + this.lastConnectionLevel!.toUtc().toIso8601String(); } else { json[r'lastConnectionLevel'] = null; } @@ -203,7 +195,8 @@ class DeviceDetailDTO { json[r'batteryLevel'] = null; } if (this.lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + json[r'lastBatteryLevel'] = + this.lastBatteryLevel!.toUtc().toIso8601String(); } else { json[r'lastBatteryLevel'] = null; } @@ -222,8 +215,10 @@ class DeviceDetailDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDetailDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDetailDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDetailDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -237,19 +232,22 @@ class DeviceDetailDTO { configurationId: mapValueOfType(json, r'configurationId'), configuration: mapValueOfType(json, r'configuration'), connected: mapValueOfType(json, r'connected'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - dateUpdate: mapDateTime(json, r'dateUpdate', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), + dateUpdate: mapDateTime(json, r'dateUpdate', r''), instanceId: mapValueOfType(json, r'instanceId'), connectionLevel: mapValueOfType(json, r'connectionLevel'), - lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''), + lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', r''), batteryLevel: mapValueOfType(json, r'batteryLevel'), - lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', ''), + lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', r''), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -277,20 +275,24 @@ class DeviceDetailDTO { } // maps a json object with a list of DeviceDetailDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDetailDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDetailDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_detail_dto_all_of.dart b/manager_api_new/lib/model/device_detail_dto_all_of.dart similarity index 72% rename from manager_api/lib/model/device_detail_dto_all_of.dart rename to manager_api_new/lib/model/device_detail_dto_all_of.dart index 2e990db..729d201 100644 --- a/manager_api/lib/model/device_detail_dto_all_of.dart +++ b/manager_api_new/lib/model/device_detail_dto_all_of.dart @@ -40,22 +40,25 @@ class DeviceDetailDTOAllOf { DateTime? lastBatteryLevel; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTOAllOf && - other.connectionLevel == connectionLevel && - other.lastConnectionLevel == lastConnectionLevel && - other.batteryLevel == batteryLevel && - other.lastBatteryLevel == lastBatteryLevel; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDetailDTOAllOf && + other.connectionLevel == connectionLevel && + other.lastConnectionLevel == lastConnectionLevel && + other.batteryLevel == batteryLevel && + other.lastBatteryLevel == lastBatteryLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (connectionLevel == null ? 0 : connectionLevel!.hashCode) + - (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + - (batteryLevel == null ? 0 : batteryLevel!.hashCode) + - (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); + // ignore: unnecessary_parenthesis + (connectionLevel == null ? 0 : connectionLevel!.hashCode) + + (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + + (batteryLevel == null ? 0 : batteryLevel!.hashCode) + + (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); @override - String toString() => 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; + String toString() => + 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { final json = {}; @@ -65,7 +68,8 @@ class DeviceDetailDTOAllOf { json[r'connectionLevel'] = null; } if (this.lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + json[r'lastConnectionLevel'] = + this.lastConnectionLevel!.toUtc().toIso8601String(); } else { json[r'lastConnectionLevel'] = null; } @@ -75,7 +79,8 @@ class DeviceDetailDTOAllOf { json[r'batteryLevel'] = null; } if (this.lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + json[r'lastBatteryLevel'] = + this.lastBatteryLevel!.toUtc().toIso8601String(); } else { json[r'lastBatteryLevel'] = null; } @@ -94,8 +99,10 @@ class DeviceDetailDTOAllOf { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDetailDTOAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDetailDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.'); }); return true; }()); @@ -110,7 +117,10 @@ class DeviceDetailDTOAllOf { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -138,20 +148,24 @@ class DeviceDetailDTOAllOf { } // maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDetailDTOAllOf.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDetailDTOAllOf.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_dto.dart b/manager_api_new/lib/model/device_dto.dart similarity index 65% rename from manager_api/lib/model/device_dto.dart rename to manager_api_new/lib/model/device_dto.dart index 7d8ea3a..879f3a8 100644 --- a/manager_api/lib/model/device_dto.dart +++ b/manager_api_new/lib/model/device_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -48,55 +48,46 @@ class DeviceDTO { /// bool? connected; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateUpdate; String? instanceId; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDTO && - other.id == id && - other.identifier == identifier && - other.name == name && - other.ipAddressWLAN == ipAddressWLAN && - other.ipAddressETH == ipAddressETH && - other.configurationId == configurationId && - other.configuration == configuration && - other.connected == connected && - other.dateCreation == dateCreation && - other.dateUpdate == dateUpdate && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDTO && + other.id == id && + other.identifier == identifier && + other.name == name && + other.ipAddressWLAN == ipAddressWLAN && + other.ipAddressETH == ipAddressETH && + other.configurationId == configurationId && + other.configuration == configuration && + other.connected == connected && + other.dateCreation == dateCreation && + other.dateUpdate == dateUpdate && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (identifier == null ? 0 : identifier!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + - (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (configuration == null ? 0 : configuration!.hashCode) + - (connected == null ? 0 : connected!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (dateUpdate == null ? 0 : dateUpdate!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + + (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (configuration == null ? 0 : configuration!.hashCode) + + (connected == null ? 0 : connected!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (dateUpdate == null ? 0 : dateUpdate!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]'; + String toString() => + 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -170,8 +161,10 @@ class DeviceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -185,15 +178,18 @@ class DeviceDTO { configurationId: mapValueOfType(json, r'configurationId'), configuration: mapValueOfType(json, r'configuration'), connected: mapValueOfType(json, r'connected'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - dateUpdate: mapDateTime(json, r'dateUpdate', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), + dateUpdate: mapDateTime(json, r'dateUpdate', r''), instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -221,20 +217,24 @@ class DeviceDTO { } // maps a json object with a list of DeviceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api_new/lib/model/export_configuration_dto.dart similarity index 63% rename from manager_api/lib/model/export_configuration_dto.dart rename to manager_api_new/lib/model/export_configuration_dto.dart index e1f7cad..bdc808c 100644 --- a/manager_api/lib/model/export_configuration_dto.dart +++ b/manager_api_new/lib/model/export_configuration_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -29,10 +29,6 @@ class ExportConfigurationDTO { this.sectionIds = const [], this.loaderImageId, this.loaderImageUrl, - this.weatherCity, - this.weatherUpdatedDate, - this.weatherResult, - this.isWeather, this.isDate, this.isHour, this.isSectionImageBackground, @@ -98,20 +94,6 @@ class ExportConfigurationDTO { String? loaderImageUrl; - String? weatherCity; - - DateTime? weatherUpdatedDate; - - String? weatherResult; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isWeather; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -145,68 +127,68 @@ class ExportConfigurationDTO { List? resources; @override - bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTO && - other.id == id && - other.label == label && - other.title == title && - other.imageId == imageId && - other.imageSource == imageSource && - other.primaryColor == primaryColor && - other.secondaryColor == secondaryColor && - other.languages == languages && - other.dateCreation == dateCreation && - other.isMobile == isMobile && - other.isTablet == isTablet && - other.isOffline == isOffline && - other.instanceId == instanceId && - other.sectionIds == sectionIds && - other.loaderImageId == loaderImageId && - other.loaderImageUrl == loaderImageUrl && - other.weatherCity == weatherCity && - other.weatherUpdatedDate == weatherUpdatedDate && - other.weatherResult == weatherResult && - other.isWeather == isWeather && - other.isDate == isDate && - other.isHour == isHour && - other.isSectionImageBackground == isSectionImageBackground && - other.roundedValue == roundedValue && - other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage && - other.sections == sections && - other.resources == resources; + bool operator ==(Object other) => + identical(this, other) || + other is ExportConfigurationDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.imageId == imageId && + other.imageSource == imageSource && + other.primaryColor == primaryColor && + other.secondaryColor == secondaryColor && + _deepEquality.equals(other.languages, languages) && + other.dateCreation == dateCreation && + other.isMobile == isMobile && + other.isTablet == isTablet && + other.isOffline == isOffline && + other.instanceId == instanceId && + _deepEquality.equals(other.sectionIds, sectionIds) && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == + screenPercentageSectionsMainPage && + _deepEquality.equals(other.sections, sections) && + _deepEquality.equals(other.resources, resources); @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (primaryColor == null ? 0 : primaryColor!.hashCode) + - (secondaryColor == null ? 0 : secondaryColor!.hashCode) + - (languages == null ? 0 : languages!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (isMobile == null ? 0 : isMobile!.hashCode) + - (isTablet == null ? 0 : isTablet!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (sectionIds == null ? 0 : sectionIds!.hashCode) + - (loaderImageId == null ? 0 : loaderImageId!.hashCode) + - (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + - (weatherCity == null ? 0 : weatherCity!.hashCode) + - (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + - (weatherResult == null ? 0 : weatherResult!.hashCode) + - (isWeather == null ? 0 : isWeather!.hashCode) + - (isDate == null ? 0 : isDate!.hashCode) + - (isHour == null ? 0 : isHour!.hashCode) + - (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + - (roundedValue == null ? 0 : roundedValue!.hashCode) + - (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode) + - (sections == null ? 0 : sections!.hashCode) + - (resources == null ? 0 : resources!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (primaryColor == null ? 0 : primaryColor!.hashCode) + + (secondaryColor == null ? 0 : secondaryColor!.hashCode) + + (languages == null ? 0 : languages!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isMobile == null ? 0 : isMobile!.hashCode) + + (isTablet == null ? 0 : isTablet!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null + ? 0 + : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null + ? 0 + : screenPercentageSectionsMainPage!.hashCode) + + (sections == null ? 0 : sections!.hashCode) + + (resources == null ? 0 : resources!.hashCode); @override - String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, sections=$sections, resources=$resources]'; + String toString() => + 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, sections=$sections, resources=$resources]'; Map toJson() { final json = {}; @@ -290,26 +272,6 @@ class ExportConfigurationDTO { } else { json[r'loaderImageUrl'] = null; } - if (this.weatherCity != null) { - json[r'weatherCity'] = this.weatherCity; - } else { - json[r'weatherCity'] = null; - } - if (this.weatherUpdatedDate != null) { - json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); - } else { - json[r'weatherUpdatedDate'] = null; - } - if (this.weatherResult != null) { - json[r'weatherResult'] = this.weatherResult; - } else { - json[r'weatherResult'] = null; - } - if (this.isWeather != null) { - json[r'isWeather'] = this.isWeather; - } else { - json[r'isWeather'] = null; - } if (this.isDate != null) { json[r'isDate'] = this.isDate; } else { @@ -331,7 +293,8 @@ class ExportConfigurationDTO { json[r'roundedValue'] = null; } if (this.screenPercentageSectionsMainPage != null) { - json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + json[r'screenPercentageSectionsMainPage'] = + this.screenPercentageSectionsMainPage; } else { json[r'screenPercentageSectionsMainPage'] = null; } @@ -360,8 +323,10 @@ class ExportConfigurationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ExportConfigurationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ExportConfigurationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ExportConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ExportConfigurationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -374,28 +339,30 @@ class ExportConfigurationDTO { imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), secondaryColor: mapValueOfType(json, r'secondaryColor'), - languages: json[r'languages'] is List - ? (json[r'languages'] as List).cast() + languages: json[r'languages'] is Iterable + ? (json[r'languages'] as Iterable) + .cast() + .toList(growable: false) : const [], - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), isMobile: mapValueOfType(json, r'isMobile'), isTablet: mapValueOfType(json, r'isTablet'), isOffline: mapValueOfType(json, r'isOffline'), instanceId: mapValueOfType(json, r'instanceId'), - sectionIds: json[r'sectionIds'] is List - ? (json[r'sectionIds'] as List).cast() + sectionIds: json[r'sectionIds'] is Iterable + ? (json[r'sectionIds'] as Iterable) + .cast() + .toList(growable: false) : const [], loaderImageId: mapValueOfType(json, r'loaderImageId'), loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), - weatherCity: mapValueOfType(json, r'weatherCity'), - weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), - weatherResult: mapValueOfType(json, r'weatherResult'), - isWeather: mapValueOfType(json, r'isWeather'), isDate: mapValueOfType(json, r'isDate'), isHour: mapValueOfType(json, r'isHour'), - isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + isSectionImageBackground: + mapValueOfType(json, r'isSectionImageBackground'), roundedValue: mapValueOfType(json, r'roundedValue'), - screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), + screenPercentageSectionsMainPage: + mapValueOfType(json, r'screenPercentageSectionsMainPage'), sections: SectionDTO.listFromJson(json[r'sections']), resources: ResourceDTO.listFromJson(json[r'resources']), ); @@ -403,7 +370,10 @@ class ExportConfigurationDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -431,20 +401,24 @@ class ExportConfigurationDTO { } // maps a json object with a list of ExportConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ExportConfigurationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ExportConfigurationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/export_configuration_dto_all_of.dart b/manager_api_new/lib/model/export_configuration_dto_all_of.dart similarity index 76% rename from manager_api/lib/model/export_configuration_dto_all_of.dart rename to manager_api_new/lib/model/export_configuration_dto_all_of.dart index 89650d1..02e3aec 100644 --- a/manager_api/lib/model/export_configuration_dto_all_of.dart +++ b/manager_api_new/lib/model/export_configuration_dto_all_of.dart @@ -22,18 +22,21 @@ class ExportConfigurationDTOAllOf { List? resources; @override - bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTOAllOf && - other.sections == sections && - other.resources == resources; + bool operator ==(Object other) => + identical(this, other) || + other is ExportConfigurationDTOAllOf && + other.sections == sections && + other.resources == resources; @override int get hashCode => - // ignore: unnecessary_parenthesis - (sections == null ? 0 : sections!.hashCode) + - (resources == null ? 0 : resources!.hashCode); + // ignore: unnecessary_parenthesis + (sections == null ? 0 : sections!.hashCode) + + (resources == null ? 0 : resources!.hashCode); @override - String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; + String toString() => + 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; Map toJson() { final json = {}; @@ -62,8 +65,10 @@ class ExportConfigurationDTOAllOf { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ExportConfigurationDTOAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ExportConfigurationDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +81,10 @@ class ExportConfigurationDTOAllOf { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +112,24 @@ class ExportConfigurationDTOAllOf { } // maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ExportConfigurationDTOAllOf.listFromJson(entry.value, growable: growable,); + map[entry.key] = ExportConfigurationDTOAllOf.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/geo_point.dart b/manager_api_new/lib/model/geo_point.dart new file mode 100644 index 0000000..955c841 --- /dev/null +++ b/manager_api_new/lib/model/geo_point.dart @@ -0,0 +1,263 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GeoPoint { + /// Returns a new [GeoPoint] instance. + GeoPoint({ + required this.id, + this.title = const [], + this.description = const [], + this.contents = const [], + this.schedules = const [], + this.prices = const [], + this.phone = const [], + this.email = const [], + this.site = const [], + this.categorieId, + this.latitude, + this.longitude, + this.imageResourceId, + this.imageUrl, + this.sectionMapId, + this.sectionMap, + }); + + int id; + + List title; + + List description; + + List contents; + + List schedules; + + List prices; + + List phone; + + List email; + + List site; + + int? categorieId; + + String? latitude; + + String? longitude; + + String? imageResourceId; + + String? imageUrl; + + String? sectionMapId; + + GeoPointSectionMap? sectionMap; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GeoPoint && + other.id == id && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + _deepEquality.equals(other.contents, contents) && + _deepEquality.equals(other.schedules, schedules) && + _deepEquality.equals(other.prices, prices) && + _deepEquality.equals(other.phone, phone) && + _deepEquality.equals(other.email, email) && + _deepEquality.equals(other.site, site) && + other.categorieId == categorieId && + other.latitude == latitude && + other.longitude == longitude && + other.imageResourceId == imageResourceId && + other.imageUrl == imageUrl && + other.sectionMapId == sectionMapId && + other.sectionMap == sectionMap; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (title.hashCode) + + (description.hashCode) + + (contents.hashCode) + + (schedules.hashCode) + + (prices.hashCode) + + (phone.hashCode) + + (email.hashCode) + + (site.hashCode) + + (categorieId == null ? 0 : categorieId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageUrl == null ? 0 : imageUrl!.hashCode) + + (sectionMapId == null ? 0 : sectionMapId!.hashCode) + + (sectionMap == null ? 0 : sectionMap!.hashCode); + + @override + String toString() => + 'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'title'] = this.title; + json[r'description'] = this.description; + json[r'contents'] = this.contents; + json[r'schedules'] = this.schedules; + json[r'prices'] = this.prices; + json[r'phone'] = this.phone; + json[r'email'] = this.email; + json[r'site'] = this.site; + if (this.categorieId != null) { + json[r'categorieId'] = this.categorieId; + } else { + json[r'categorieId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.imageResourceId != null) { + json[r'imageResourceId'] = this.imageResourceId; + } else { + json[r'imageResourceId'] = null; + } + if (this.imageUrl != null) { + json[r'imageUrl'] = this.imageUrl; + } else { + json[r'imageUrl'] = null; + } + if (this.sectionMapId != null) { + json[r'sectionMapId'] = this.sectionMapId; + } else { + json[r'sectionMapId'] = null; + } + if (this.sectionMap != null) { + json[r'sectionMap'] = this.sectionMap; + } else { + json[r'sectionMap'] = null; + } + return json; + } + + /// Returns a new [GeoPoint] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPoint? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "GeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPoint[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPoint( + id: mapValueOfType(json, r'id')!, + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + contents: ContentDTO.listFromJson(json[r'contents']), + schedules: TranslationDTO.listFromJson(json[r'schedules']), + prices: TranslationDTO.listFromJson(json[r'prices']), + phone: TranslationDTO.listFromJson(json[r'phone']), + email: TranslationDTO.listFromJson(json[r'email']), + site: TranslationDTO.listFromJson(json[r'site']), + categorieId: mapValueOfType(json, r'categorieId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + imageResourceId: mapValueOfType(json, r'imageResourceId'), + imageUrl: mapValueOfType(json, r'imageUrl'), + sectionMapId: mapValueOfType(json, r'sectionMapId'), + sectionMap: GeoPointSectionMap.fromJson(json[r'sectionMap']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPoint.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPoint.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPoint-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPoint.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'title', + 'description', + 'contents', + 'schedules', + 'prices', + 'phone', + 'email', + 'site', + }; +} diff --git a/manager_api/lib/model/geo_point_dto.dart b/manager_api_new/lib/model/geo_point_dto.dart similarity index 68% rename from manager_api/lib/model/geo_point_dto.dart rename to manager_api_new/lib/model/geo_point_dto.dart index a9acae5..e901072 100644 --- a/manager_api/lib/model/geo_point_dto.dart +++ b/manager_api_new/lib/model/geo_point_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,6 @@ class GeoPointDTO { this.title = const [], this.description = const [], this.contents = const [], - this.categorie, this.categorieId, this.latitude, this.longitude, @@ -36,9 +35,7 @@ class GeoPointDTO { List? description; - List? contents; - - GeoPointDTOCategorie? categorie; + List? contents; int? categorieId; @@ -61,44 +58,45 @@ class GeoPointDTO { List? site; @override - bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO && - other.id == id && - other.title == title && - other.description == description && - other.contents == contents && - other.categorie == categorie && - other.categorieId == categorieId && - other.latitude == latitude && - other.longitude == longitude && - other.imageResourceId == imageResourceId && - other.imageUrl == imageUrl && - other.schedules == schedules && - other.prices == prices && - other.phone == phone && - other.email == email && - other.site == site; + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointDTO && + other.id == id && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + _deepEquality.equals(other.contents, contents) && + other.categorieId == categorieId && + other.latitude == latitude && + other.longitude == longitude && + other.imageResourceId == imageResourceId && + other.imageUrl == imageUrl && + _deepEquality.equals(other.schedules, schedules) && + _deepEquality.equals(other.prices, prices) && + _deepEquality.equals(other.phone, phone) && + _deepEquality.equals(other.email, email) && + _deepEquality.equals(other.site, site); @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (contents == null ? 0 : contents!.hashCode) + - (categorie == null ? 0 : categorie!.hashCode) + - (categorieId == null ? 0 : categorieId!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (imageResourceId == null ? 0 : imageResourceId!.hashCode) + - (imageUrl == null ? 0 : imageUrl!.hashCode) + - (schedules == null ? 0 : schedules!.hashCode) + - (prices == null ? 0 : prices!.hashCode) + - (phone == null ? 0 : phone!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (site == null ? 0 : site!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (contents == null ? 0 : contents!.hashCode) + + (categorieId == null ? 0 : categorieId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageUrl == null ? 0 : imageUrl!.hashCode) + + (schedules == null ? 0 : schedules!.hashCode) + + (prices == null ? 0 : prices!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (site == null ? 0 : site!.hashCode); @override - String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; + String toString() => + 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; Map toJson() { final json = {}; @@ -122,11 +120,6 @@ class GeoPointDTO { } else { json[r'contents'] = null; } - if (this.categorie != null) { - json[r'categorie'] = this.categorie; - } else { - json[r'categorie'] = null; - } if (this.categorieId != null) { json[r'categorieId'] = this.categorieId; } else { @@ -192,8 +185,10 @@ class GeoPointDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "GeoPointDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "GeoPointDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "GeoPointDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -202,8 +197,7 @@ class GeoPointDTO { id: mapValueOfType(json, r'id'), title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), - contents: ContentGeoPoint.listFromJson(json[r'contents']), - categorie: GeoPointDTOCategorie.fromJson(json[r'categorie']), + contents: ContentDTO.listFromJson(json[r'contents']), categorieId: mapValueOfType(json, r'categorieId'), latitude: mapValueOfType(json, r'latitude'), longitude: mapValueOfType(json, r'longitude'), @@ -219,7 +213,10 @@ class GeoPointDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -247,20 +244,24 @@ class GeoPointDTO { } // maps a json object with a list of GeoPointDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = GeoPointDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = GeoPointDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/geo_point_dto_categorie.dart b/manager_api_new/lib/model/geo_point_dto_categorie.dart similarity index 73% rename from manager_api/lib/model/geo_point_dto_categorie.dart rename to manager_api_new/lib/model/geo_point_dto_categorie.dart index 5c06018..5df6384 100644 --- a/manager_api/lib/model/geo_point_dto_categorie.dart +++ b/manager_api_new/lib/model/geo_point_dto_categorie.dart @@ -34,26 +34,29 @@ class GeoPointDTOCategorie { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie && - other.id == id && - other.label == label && - other.icon == icon && - other.iconResourceId == iconResourceId && - other.iconUrl == iconUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointDTOCategorie && + other.id == id && + other.label == label && + other.icon == icon && + other.iconResourceId == iconResourceId && + other.iconUrl == iconUrl && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (icon == null ? 0 : icon!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconUrl == null ? 0 : iconUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconUrl == null ? 0 : iconUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + String toString() => + 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; Map toJson() { final json = {}; @@ -102,8 +105,10 @@ class GeoPointDTOCategorie { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); }); return true; }()); @@ -120,7 +125,10 @@ class GeoPointDTOCategorie { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -148,20 +156,24 @@ class GeoPointDTOCategorie { } // maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = GeoPointDTOCategorie.listFromJson(entry.value, growable: growable,); + map[entry.key] = GeoPointDTOCategorie.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/geo_point_section_map.dart b/manager_api_new/lib/model/geo_point_section_map.dart new file mode 100644 index 0000000..c9a7653 --- /dev/null +++ b/manager_api_new/lib/model/geo_point_section_map.dart @@ -0,0 +1,424 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GeoPointSectionMap { + /// Returns a new [GeoPointSectionMap] instance. + GeoPointSectionMap({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.mapCategories = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.mapZoom, + this.mapMapType, + this.mapTypeMapbox, + this.mapMapProvider, + this.mapPoints = const [], + this.mapResourceId, + this.mapResource, + this.mapCenterLatitude, + this.mapCenterLongitude, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List mapCategories; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? mapZoom; + + SectionMapAllOfMapMapType? mapMapType; + + SectionMapAllOfMapTypeMapbox? mapTypeMapbox; + + SectionMapAllOfMapMapProvider? mapMapProvider; + + List? mapPoints; + + String? mapResourceId; + + SectionMapAllOfMapResource? mapResource; + + String? mapCenterLatitude; + + String? mapCenterLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointSectionMap && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.mapCategories, mapCategories) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.mapZoom == mapZoom && + other.mapMapType == mapMapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapMapProvider == mapMapProvider && + _deepEquality.equals(other.mapPoints, mapPoints) && + other.mapResourceId == mapResourceId && + other.mapResource == mapResource && + other.mapCenterLatitude == mapCenterLatitude && + other.mapCenterLongitude == mapCenterLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (mapCategories.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (mapZoom == null ? 0 : mapZoom!.hashCode) + + (mapMapType == null ? 0 : mapMapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapMapProvider == null ? 0 : mapMapProvider!.hashCode) + + (mapPoints == null ? 0 : mapPoints!.hashCode) + + (mapResourceId == null ? 0 : mapResourceId!.hashCode) + + (mapResource == null ? 0 : mapResource!.hashCode) + + (mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) + + (mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode); + + @override + String toString() => + 'GeoPointSectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'mapCategories'] = this.mapCategories; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.mapZoom != null) { + json[r'mapZoom'] = this.mapZoom; + } else { + json[r'mapZoom'] = null; + } + if (this.mapMapType != null) { + json[r'mapMapType'] = this.mapMapType; + } else { + json[r'mapMapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapMapProvider != null) { + json[r'mapMapProvider'] = this.mapMapProvider; + } else { + json[r'mapMapProvider'] = null; + } + if (this.mapPoints != null) { + json[r'mapPoints'] = this.mapPoints; + } else { + json[r'mapPoints'] = null; + } + if (this.mapResourceId != null) { + json[r'mapResourceId'] = this.mapResourceId; + } else { + json[r'mapResourceId'] = null; + } + if (this.mapResource != null) { + json[r'mapResource'] = this.mapResource; + } else { + json[r'mapResource'] = null; + } + if (this.mapCenterLatitude != null) { + json[r'mapCenterLatitude'] = this.mapCenterLatitude; + } else { + json[r'mapCenterLatitude'] = null; + } + if (this.mapCenterLongitude != null) { + json[r'mapCenterLongitude'] = this.mapCenterLongitude; + } else { + json[r'mapCenterLongitude'] = null; + } + return json; + } + + /// Returns a new [GeoPointSectionMap] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPointSectionMap? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "GeoPointSectionMap[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointSectionMap[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPointSectionMap( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + mapZoom: mapValueOfType(json, r'mapZoom'), + mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']), + mapTypeMapbox: + SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']), + mapMapProvider: + SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']), + mapPoints: GeoPoint.listFromJson(json[r'mapPoints']), + mapResourceId: mapValueOfType(json, r'mapResourceId'), + mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']), + mapCenterLatitude: mapValueOfType(json, r'mapCenterLatitude'), + mapCenterLongitude: mapValueOfType(json, r'mapCenterLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPointSectionMap.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPointSectionMap.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPointSectionMap-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPointSectionMap.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'mapCategories', + }; +} diff --git a/manager_api/lib/model/image_dto.dart b/manager_api_new/lib/model/image_dto.dart similarity index 74% rename from manager_api/lib/model/image_dto.dart rename to manager_api_new/lib/model/image_dto.dart index 0a55eed..c0120e3 100644 --- a/manager_api/lib/model/image_dto.dart +++ b/manager_api_new/lib/model/image_dto.dart @@ -37,24 +37,27 @@ class ImageDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is ImageDTO && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.source_ == source_ && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is ImageDTO && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.source_ == source_ && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; + String toString() => + 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; Map toJson() { final json = {}; @@ -98,8 +101,10 @@ class ImageDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ImageDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ImageDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ImageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ImageDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -115,7 +120,10 @@ class ImageDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -143,20 +151,24 @@ class ImageDTO { } // maps a json object with a list of ImageDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ImageDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ImageDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/image_geo_point.dart b/manager_api_new/lib/model/image_geo_point.dart similarity index 72% rename from manager_api/lib/model/image_geo_point.dart rename to manager_api_new/lib/model/image_geo_point.dart index 4ecb68c..e92d32b 100644 --- a/manager_api/lib/model/image_geo_point.dart +++ b/manager_api_new/lib/model/image_geo_point.dart @@ -22,18 +22,21 @@ class ImageGeoPoint { String? imageSource; @override - bool operator ==(Object other) => identical(this, other) || other is ImageGeoPoint && - other.imageResourceId == imageResourceId && - other.imageSource == imageSource; + bool operator ==(Object other) => + identical(this, other) || + other is ImageGeoPoint && + other.imageResourceId == imageResourceId && + other.imageSource == imageSource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (imageResourceId == null ? 0 : imageResourceId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode); + // ignore: unnecessary_parenthesis + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode); @override - String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; + String toString() => + 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; Map toJson() { final json = {}; @@ -62,8 +65,10 @@ class ImageGeoPoint { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ImageGeoPoint[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ImageGeoPoint[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ImageGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ImageGeoPoint[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +81,10 @@ class ImageGeoPoint { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +112,24 @@ class ImageGeoPoint { } // maps a json object with a list of ImageGeoPoint-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ImageGeoPoint.listFromJson(entry.value, growable: growable,); + map[entry.key] = ImageGeoPoint.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/instance.dart b/manager_api_new/lib/model/instance.dart similarity index 66% rename from manager_api/lib/model/instance.dart rename to manager_api_new/lib/model/instance.dart index 62800f6..84aed0c 100644 --- a/manager_api/lib/model/instance.dart +++ b/manager_api_new/lib/model/instance.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,15 +13,15 @@ part of openapi.api; class Instance { /// Returns a new [Instance] instance. Instance({ - this.id, - this.name, + required this.id, + required this.name, this.dateCreation, this.pinCode, }); - String? id; + String id; - String? name; + String name; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -31,38 +31,33 @@ class Instance { /// DateTime? dateCreation; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is Instance && - other.id == id && - other.name == name && - other.dateCreation == dateCreation && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is Instance && + other.id == id && + other.name == name && + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; + String toString() => + 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { final json = {}; - if (this.id != null) { - json[r'id'] = this.id; - } else { - json[r'id'] = null; - } - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } + json[r'id'] = this.id; + json[r'name'] = this.name; if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { @@ -88,23 +83,28 @@ class Instance { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "Instance[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "Instance[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "Instance[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Instance[$key]" has a null value in JSON.'); }); return true; }()); return Instance( - id: mapValueOfType(json, r'id'), - name: mapValueOfType(json, r'name'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - pinCode: mapValueOfType(json, r'pinCode'), + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,13 +132,19 @@ class Instance { } // maps a json object with a list of Instance-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = Instance.listFromJson(entry.value, growable: growable,); + map[entry.key] = Instance.listFromJson( + entry.value, + growable: growable, + ); } } return map; @@ -146,6 +152,7 @@ class Instance { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'id', + 'name', }; } - diff --git a/manager_api/lib/model/instance_dto.dart b/manager_api_new/lib/model/instance_dto.dart similarity index 66% rename from manager_api/lib/model/instance_dto.dart rename to manager_api_new/lib/model/instance_dto.dart index 5f4399d..3dff3e1 100644 --- a/manager_api/lib/model/instance_dto.dart +++ b/manager_api_new/lib/model/instance_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,33 +23,30 @@ class InstanceDTO { String? name; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is InstanceDTO && - other.id == id && - other.name == name && - other.dateCreation == dateCreation && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is InstanceDTO && + other.id == id && + other.name == name && + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; + String toString() => + 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { final json = {}; @@ -88,8 +85,10 @@ class InstanceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "InstanceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "InstanceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "InstanceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "InstanceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -97,14 +96,17 @@ class InstanceDTO { return InstanceDTO( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - pinCode: mapValueOfType(json, r'pinCode'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,20 +134,24 @@ class InstanceDTO { } // maps a json object with a list of InstanceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = InstanceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = InstanceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/level_dto.dart b/manager_api_new/lib/model/level_dto.dart similarity index 76% rename from manager_api/lib/model/level_dto.dart rename to manager_api_new/lib/model/level_dto.dart index 79e8ea1..3cdc4bc 100644 --- a/manager_api/lib/model/level_dto.dart +++ b/manager_api_new/lib/model/level_dto.dart @@ -19,13 +19,13 @@ class LevelDTO { List? label; @override - bool operator ==(Object other) => identical(this, other) || other is LevelDTO && - other.label == label; + bool operator ==(Object other) => + identical(this, other) || other is LevelDTO && other.label == label; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode); @override String toString() => 'LevelDTO[label=$label]'; @@ -52,8 +52,10 @@ class LevelDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "LevelDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "LevelDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "LevelDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "LevelDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -65,7 +67,10 @@ class LevelDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +98,24 @@ class LevelDTO { } // maps a json object with a list of LevelDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = LevelDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = LevelDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/login_dto.dart b/manager_api_new/lib/model/login_dto.dart similarity index 75% rename from manager_api/lib/model/login_dto.dart rename to manager_api_new/lib/model/login_dto.dart index a8e6b90..6e0e230 100644 --- a/manager_api/lib/model/login_dto.dart +++ b/manager_api_new/lib/model/login_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -22,15 +22,15 @@ class LoginDTO { String? password; @override - bool operator ==(Object other) => identical(this, other) || other is LoginDTO && - other.email == email && - other.password == password; + bool operator ==(Object other) => + identical(this, other) || + other is LoginDTO && other.email == email && other.password == password; @override int get hashCode => - // ignore: unnecessary_parenthesis - (email == null ? 0 : email!.hashCode) + - (password == null ? 0 : password!.hashCode); + // ignore: unnecessary_parenthesis + (email == null ? 0 : email!.hashCode) + + (password == null ? 0 : password!.hashCode); @override String toString() => 'LoginDTO[email=$email, password=$password]'; @@ -62,8 +62,10 @@ class LoginDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "LoginDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "LoginDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "LoginDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "LoginDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +78,10 @@ class LoginDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +109,24 @@ class LoginDTO { } // maps a json object with a list of LoginDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = LoginDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = LoginDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/map_dto.dart b/manager_api_new/lib/model/map_dto.dart new file mode 100644 index 0000000..e3671f9 --- /dev/null +++ b/manager_api_new/lib/model/map_dto.dart @@ -0,0 +1,451 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MapDTO { + /// Returns a new [MapDTO] instance. + MapDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.zoom, + this.mapType, + this.mapTypeMapbox, + this.mapProvider, + this.points = const [], + this.iconResourceId, + this.iconSource, + this.categories = const [], + this.centerLatitude, + this.centerLongitude, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? zoom; + + MapTypeApp? mapType; + + MapTypeMapBox? mapTypeMapbox; + + MapProvider? mapProvider; + + List? points; + + String? iconResourceId; + + String? iconSource; + + List? categories; + + String? centerLatitude; + + String? centerLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MapDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.zoom == zoom && + other.mapType == mapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapProvider == mapProvider && + _deepEquality.equals(other.points, points) && + other.iconResourceId == iconResourceId && + other.iconSource == iconSource && + _deepEquality.equals(other.categories, categories) && + other.centerLatitude == centerLatitude && + other.centerLongitude == centerLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (zoom == null ? 0 : zoom!.hashCode) + + (mapType == null ? 0 : mapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapProvider == null ? 0 : mapProvider!.hashCode) + + (points == null ? 0 : points!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconSource == null ? 0 : iconSource!.hashCode) + + (categories == null ? 0 : categories!.hashCode) + + (centerLatitude == null ? 0 : centerLatitude!.hashCode) + + (centerLongitude == null ? 0 : centerLongitude!.hashCode); + + @override + String toString() => + 'MapDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, centerLatitude=$centerLatitude, centerLongitude=$centerLongitude]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.zoom != null) { + json[r'zoom'] = this.zoom; + } else { + json[r'zoom'] = null; + } + if (this.mapType != null) { + json[r'mapType'] = this.mapType; + } else { + json[r'mapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapProvider != null) { + json[r'mapProvider'] = this.mapProvider; + } else { + json[r'mapProvider'] = null; + } + if (this.points != null) { + json[r'points'] = this.points; + } else { + json[r'points'] = null; + } + if (this.iconResourceId != null) { + json[r'iconResourceId'] = this.iconResourceId; + } else { + json[r'iconResourceId'] = null; + } + if (this.iconSource != null) { + json[r'iconSource'] = this.iconSource; + } else { + json[r'iconSource'] = null; + } + if (this.categories != null) { + json[r'categories'] = this.categories; + } else { + json[r'categories'] = null; + } + if (this.centerLatitude != null) { + json[r'centerLatitude'] = this.centerLatitude; + } else { + json[r'centerLatitude'] = null; + } + if (this.centerLongitude != null) { + json[r'centerLongitude'] = this.centerLongitude; + } else { + json[r'centerLongitude'] = null; + } + return json; + } + + /// Returns a new [MapDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "MapDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + zoom: mapValueOfType(json, r'zoom'), + mapType: MapTypeApp.fromJson(json[r'mapType']), + mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']), + mapProvider: MapProvider.fromJson(json[r'mapProvider']), + points: GeoPointDTO.listFromJson(json[r'points']), + iconResourceId: mapValueOfType(json, r'iconResourceId'), + iconSource: mapValueOfType(json, r'iconSource'), + categories: CategorieDTO.listFromJson(json[r'categories']), + centerLatitude: mapValueOfType(json, r'centerLatitude'), + centerLongitude: mapValueOfType(json, r'centerLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/pdf_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_provider.dart similarity index 57% rename from manager_api/lib/model/pdf_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_provider.dart index 53cb445..27aa47a 100644 --- a/manager_api/lib/model/pdf_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_provider.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class PdfDTO { - /// Returns a new [PdfDTO] instance. - PdfDTO({ - this.pdfs = const [], - }); +class MapDTOAllOfMapProvider { + /// Returns a new [MapDTOAllOfMapProvider] instance. + MapDTOAllOfMapProvider(); - List? pdfs; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapProvider && @override - bool operator ==(Object other) => identical(this, other) || other is PdfDTO && - other.pdfs == pdfs; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (pdfs == null ? 0 : pdfs!.hashCode); @override - String toString() => 'PdfDTO[pdfs=$pdfs]'; + String toString() => 'MapDTOAllOfMapProvider[]'; Map toJson() { final json = {}; - if (this.pdfs != null) { - json[r'pdfs'] = this.pdfs; - } else { - json[r'pdfs'] = null; - } return json; } - /// Returns a new [PdfDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapProvider] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static PdfDTO? fromJson(dynamic value) { + static MapDTOAllOfMapProvider? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class PdfDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PdfDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PdfDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapProvider[$key]" has a null value in JSON.'); }); return true; }()); - return PdfDTO( - pdfs: PDFFileDTO.listFromJson(json[r'pdfs']), + return MapDTOAllOfMapProvider( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = PdfDTO.fromJson(row); + final value = MapDTOAllOfMapProvider.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class PdfDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = PdfDTO.fromJson(entry.value); + final value = MapDTOAllOfMapProvider.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class PdfDTO { return map; } - // maps a json object with a list of PdfDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PdfDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapProvider.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/web_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_type.dart similarity index 56% rename from manager_api/lib/model/web_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_type.dart index 98d5c31..1aab427 100644 --- a/manager_api/lib/model/web_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class WebDTO { - /// Returns a new [WebDTO] instance. - WebDTO({ - this.source_, - }); +class MapDTOAllOfMapType { + /// Returns a new [MapDTOAllOfMapType] instance. + MapDTOAllOfMapType(); - String? source_; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapType && @override - bool operator ==(Object other) => identical(this, other) || other is WebDTO && - other.source_ == source_; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); @override - String toString() => 'WebDTO[source_=$source_]'; + String toString() => 'MapDTOAllOfMapType[]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; - } else { - json[r'source'] = null; - } return json; } - /// Returns a new [WebDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapType] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static WebDTO? fromJson(dynamic value) { + static MapDTOAllOfMapType? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class WebDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "WebDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "WebDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapType[$key]" has a null value in JSON.'); }); return true; }()); - return WebDTO( - source_: mapValueOfType(json, r'source'), + return MapDTOAllOfMapType( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = WebDTO.fromJson(row); + final value = MapDTOAllOfMapType.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class WebDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = WebDTO.fromJson(entry.value); + final value = MapDTOAllOfMapType.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class WebDTO { return map; } - // maps a json object with a list of WebDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = WebDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapType.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/video_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart similarity index 56% rename from manager_api/lib/model/video_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart index 01540ef..e98d8e7 100644 --- a/manager_api/lib/model/video_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class VideoDTO { - /// Returns a new [VideoDTO] instance. - VideoDTO({ - this.source_, - }); +class MapDTOAllOfMapTypeMapbox { + /// Returns a new [MapDTOAllOfMapTypeMapbox] instance. + MapDTOAllOfMapTypeMapbox(); - String? source_; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapTypeMapbox && @override - bool operator ==(Object other) => identical(this, other) || other is VideoDTO && - other.source_ == source_; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); @override - String toString() => 'VideoDTO[source_=$source_]'; + String toString() => 'MapDTOAllOfMapTypeMapbox[]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; - } else { - json[r'source'] = null; - } return json; } - /// Returns a new [VideoDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapTypeMapbox] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static VideoDTO? fromJson(dynamic value) { + static MapDTOAllOfMapTypeMapbox? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class VideoDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "VideoDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "VideoDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return VideoDTO( - source_: mapValueOfType(json, r'source'), + return MapDTOAllOfMapTypeMapbox( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = VideoDTO.fromJson(row); + final value = MapDTOAllOfMapTypeMapbox.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class VideoDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = VideoDTO.fromJson(entry.value); + final value = MapDTOAllOfMapTypeMapbox.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class VideoDTO { return map; } - // maps a json object with a list of VideoDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapTypeMapbox-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = VideoDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapTypeMapbox.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/map_dto_map_provider.dart b/manager_api_new/lib/model/map_dto_map_provider.dart similarity index 75% rename from manager_api/lib/model/map_dto_map_provider.dart rename to manager_api_new/lib/model/map_dto_map_provider.dart index 2ab6869..df0842a 100644 --- a/manager_api/lib/model/map_dto_map_provider.dart +++ b/manager_api_new/lib/model/map_dto_map_provider.dart @@ -15,7 +15,8 @@ class MapDTOMapProvider { MapDTOMapProvider(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapProvider; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapProvider; @override String toString() => 'MapDTOMapProvider[]'; @@ -37,19 +38,23 @@ class MapDTOMapProvider { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapProvider[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapProvider( - ); + return MapDTOMapProvider(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapProvider { } // maps a json object with a list of MapDTOMapProvider-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapProvider.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapProvider.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_dto_map_type.dart b/manager_api_new/lib/model/map_dto_map_type.dart similarity index 76% rename from manager_api/lib/model/map_dto_map_type.dart rename to manager_api_new/lib/model/map_dto_map_type.dart index 8b78f37..97f1df5 100644 --- a/manager_api/lib/model/map_dto_map_type.dart +++ b/manager_api_new/lib/model/map_dto_map_type.dart @@ -15,7 +15,8 @@ class MapDTOMapType { MapDTOMapType(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapType; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapType; @override String toString() => 'MapDTOMapType[]'; @@ -37,19 +38,23 @@ class MapDTOMapType { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapType[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapType[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapType[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapType[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapType( - ); + return MapDTOMapType(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapType { } // maps a json object with a list of MapDTOMapType-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapType.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapType.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_dto_map_type_mapbox.dart b/manager_api_new/lib/model/map_dto_map_type_mapbox.dart similarity index 77% rename from manager_api/lib/model/map_dto_map_type_mapbox.dart rename to manager_api_new/lib/model/map_dto_map_type_mapbox.dart index 2c164f5..32bf26d 100644 --- a/manager_api/lib/model/map_dto_map_type_mapbox.dart +++ b/manager_api_new/lib/model/map_dto_map_type_mapbox.dart @@ -15,7 +15,8 @@ class MapDTOMapTypeMapbox { MapDTOMapTypeMapbox(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapTypeMapbox; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapTypeMapbox; @override String toString() => 'MapDTOMapTypeMapbox[]'; @@ -37,19 +38,23 @@ class MapDTOMapTypeMapbox { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapTypeMapbox( - ); + return MapDTOMapTypeMapbox(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapTypeMapbox { } // maps a json object with a list of MapDTOMapTypeMapbox-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapTypeMapbox.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapTypeMapbox.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_provider.dart b/manager_api_new/lib/model/map_provider.dart similarity index 99% rename from manager_api/lib/model/map_provider.dart rename to manager_api_new/lib/model/map_provider.dart index c017c9b..d6de9a6 100644 --- a/manager_api/lib/model/map_provider.dart +++ b/manager_api_new/lib/model/map_provider.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/manager_api/lib/model/map_type_app.dart b/manager_api_new/lib/model/map_type_app.dart similarity index 53% rename from manager_api/lib/model/map_type_app.dart rename to manager_api_new/lib/model/map_type_app.dart index 174ce99..dd78f67 100644 --- a/manager_api/lib/model/map_type_app.dart +++ b/manager_api_new/lib/model/map_type_app.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,24 +23,28 @@ class MapTypeApp { int toJson() => value; - static const none = MapTypeApp._(0); - static const normal = MapTypeApp._(1); - static const satellite = MapTypeApp._(2); - static const terrain = MapTypeApp._(3); - static const hybrid = MapTypeApp._(4); + static const number0 = MapTypeApp._(0); + static const number1 = MapTypeApp._(1); + static const number2 = MapTypeApp._(2); + static const number3 = MapTypeApp._(3); + static const number4 = MapTypeApp._(4); /// List of all possible values in this [enum][MapTypeApp]. static const values = [ - none, - normal, - satellite, - terrain, - hybrid, + number0, + number1, + number2, + number3, + number4, ]; - static MapTypeApp? fromJson(dynamic value) => MapTypeAppTypeTransformer().decode(value); + static MapTypeApp? fromJson(dynamic value) => + MapTypeAppTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -57,7 +61,8 @@ class MapTypeApp { /// Transformation class that can [encode] an instance of [MapTypeApp] to int, /// and [decode] dynamic data back to [MapTypeApp]. class MapTypeAppTypeTransformer { - factory MapTypeAppTypeTransformer() => _instance ??= const MapTypeAppTypeTransformer._(); + factory MapTypeAppTypeTransformer() => + _instance ??= const MapTypeAppTypeTransformer._(); const MapTypeAppTypeTransformer._(); @@ -72,47 +77,23 @@ class MapTypeAppTypeTransformer { /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. MapTypeApp? decode(dynamic data, {bool allowNull = true}) { - /*if (data != null) { - switch (data.toString()) { - case r'None': return MapTypeApp.none; - case r'Normal': return MapTypeApp.normal; - case r'Satellite': return MapTypeApp.satellite; - case r'Terrain': return MapTypeApp.terrain; - case r'Hybrid': return MapTypeApp.hybrid; + if (data != null) { + switch (data) { + case 0: + return MapTypeApp.number0; + case 1: + return MapTypeApp.number1; + case 2: + return MapTypeApp.number2; + case 3: + return MapTypeApp.number3; + case 4: + return MapTypeApp.number4; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } - }*/ - if (data != null) { - if(data.runtimeType == String) { - switch (data.toString()) { - case r'None': return MapTypeApp.none; - case r'Normal': return MapTypeApp.normal; - case r'Satellite': return MapTypeApp.satellite; - case r'Terrain': return MapTypeApp.terrain; - case r'Hybrid': return MapTypeApp.hybrid; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } else { - if(data.runtimeType == int) { - switch (data) { - case 0: return MapTypeApp.none; - case 1: return MapTypeApp.normal; - case 2: return MapTypeApp.satellite; - case 3: return MapTypeApp.terrain; - case 4: return MapTypeApp.hybrid; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - } } return null; } @@ -120,4 +101,3 @@ class MapTypeAppTypeTransformer { /// Singleton [MapTypeAppTypeTransformer] instance. static MapTypeAppTypeTransformer? _instance; } - diff --git a/manager_api/lib/model/map_type_map_box.dart b/manager_api_new/lib/model/map_type_map_box.dart similarity index 99% rename from manager_api/lib/model/map_type_map_box.dart rename to manager_api_new/lib/model/map_type_map_box.dart index 7aaad20..3f64cd0 100644 --- a/manager_api/lib/model/map_type_map_box.dart +++ b/manager_api_new/lib/model/map_type_map_box.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -115,5 +115,4 @@ class MapTypeMapBoxTypeTransformer { /// Singleton [MapTypeMapBoxTypeTransformer] instance. static MapTypeMapBoxTypeTransformer? _instance; -} - +} \ No newline at end of file diff --git a/manager_api_new/lib/model/menu_dto.dart b/manager_api_new/lib/model/menu_dto.dart new file mode 100644 index 0000000..298fba9 --- /dev/null +++ b/manager_api_new/lib/model/menu_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MenuDTO { + /// Returns a new [MenuDTO] instance. + MenuDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.sections = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + dynamic? sections; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MenuDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.sections, sections); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (sections == null ? 0 : sections!.hashCode); + + @override + String toString() => + 'MenuDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, sections=$sections]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.sections != null) { + json[r'sections'] = this.sections; + } else { + json[r'sections'] = null; + } + return json; + } + + /// Returns a new [MenuDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MenuDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "MenuDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MenuDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MenuDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + sections: json[r'sections'], + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MenuDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MenuDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MenuDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MenuDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart b/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart new file mode 100644 index 0000000..1d72d6e --- /dev/null +++ b/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart @@ -0,0 +1,146 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OrderedTranslationAndResourceDTO { + /// Returns a new [OrderedTranslationAndResourceDTO] instance. + OrderedTranslationAndResourceDTO({ + this.translationAndResourceDTOs = const [], + this.order, + }); + + List? translationAndResourceDTOs; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OrderedTranslationAndResourceDTO && + _deepEquality.equals( + other.translationAndResourceDTOs, translationAndResourceDTOs) && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (translationAndResourceDTOs == null + ? 0 + : translationAndResourceDTOs!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => + 'OrderedTranslationAndResourceDTO[translationAndResourceDTOs=$translationAndResourceDTOs, order=$order]'; + + Map toJson() { + final json = {}; + if (this.translationAndResourceDTOs != null) { + json[r'translationAndResourceDTOs'] = this.translationAndResourceDTOs; + } else { + json[r'translationAndResourceDTOs'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; + } + + /// Returns a new [OrderedTranslationAndResourceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OrderedTranslationAndResourceDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "OrderedTranslationAndResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "OrderedTranslationAndResourceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OrderedTranslationAndResourceDTO( + translationAndResourceDTOs: TranslationAndResourceDTO.listFromJson( + json[r'translationAndResourceDTOs']), + order: mapValueOfType(json, r'order'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OrderedTranslationAndResourceDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson( + dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OrderedTranslationAndResourceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OrderedTranslationAndResourceDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OrderedTranslationAndResourceDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/pdf_dto.dart b/manager_api_new/lib/model/pdf_dto.dart new file mode 100644 index 0000000..9782365 --- /dev/null +++ b/manager_api_new/lib/model/pdf_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PdfDTO { + /// Returns a new [PdfDTO] instance. + PdfDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.pdfs = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? pdfs; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PdfDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.pdfs, pdfs); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (pdfs == null ? 0 : pdfs!.hashCode); + + @override + String toString() => + 'PdfDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, pdfs=$pdfs]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.pdfs != null) { + json[r'pdfs'] = this.pdfs; + } else { + json[r'pdfs'] = null; + } + return json; + } + + /// Returns a new [PdfDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PdfDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PdfDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PdfDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PdfDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + pdfs: OrderedTranslationAndResourceDTO.listFromJson(json[r'pdfs']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PdfDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PdfDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PdfDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PdfDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/pdf_file_dto.dart b/manager_api_new/lib/model/pdf_file_dto.dart similarity index 70% rename from manager_api/lib/model/pdf_file_dto.dart rename to manager_api_new/lib/model/pdf_file_dto.dart index fbe682e..dc4cfa3 100644 --- a/manager_api/lib/model/pdf_file_dto.dart +++ b/manager_api_new/lib/model/pdf_file_dto.dart @@ -22,18 +22,21 @@ class PDFFileDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is PDFFileDTO && - other.pdfFilesAndTitles == pdfFilesAndTitles && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is PDFFileDTO && + other.pdfFilesAndTitles == pdfFilesAndTitles && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]'; + String toString() => + 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]'; Map toJson() { final json = {}; @@ -62,21 +65,27 @@ class PDFFileDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PDFFileDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PDFFileDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PDFFileDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PDFFileDTO[$key]" has a null value in JSON.'); }); return true; }()); return PDFFileDTO( - pdfFilesAndTitles: TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']), + pdfFilesAndTitles: + TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']), order: mapValueOfType(json, r'order'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +113,24 @@ class PDFFileDTO { } // maps a json object with a list of PDFFileDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PDFFileDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = PDFFileDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/player_message_dto.dart b/manager_api_new/lib/model/player_message_dto.dart similarity index 76% rename from manager_api/lib/model/player_message_dto.dart rename to manager_api_new/lib/model/player_message_dto.dart index 9e67106..a3fde1b 100644 --- a/manager_api/lib/model/player_message_dto.dart +++ b/manager_api_new/lib/model/player_message_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -34,18 +34,21 @@ class PlayerMessageDTO { bool? isDeleted; @override - bool operator ==(Object other) => identical(this, other) || other is PlayerMessageDTO && - other.configChanged == configChanged && - other.isDeleted == isDeleted; + bool operator ==(Object other) => + identical(this, other) || + other is PlayerMessageDTO && + other.configChanged == configChanged && + other.isDeleted == isDeleted; @override int get hashCode => - // ignore: unnecessary_parenthesis - (configChanged == null ? 0 : configChanged!.hashCode) + - (isDeleted == null ? 0 : isDeleted!.hashCode); + // ignore: unnecessary_parenthesis + (configChanged == null ? 0 : configChanged!.hashCode) + + (isDeleted == null ? 0 : isDeleted!.hashCode); @override - String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; + String toString() => + 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; Map toJson() { final json = {}; @@ -74,8 +77,10 @@ class PlayerMessageDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PlayerMessageDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PlayerMessageDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PlayerMessageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PlayerMessageDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -88,7 +93,10 @@ class PlayerMessageDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -116,20 +124,24 @@ class PlayerMessageDTO { } // maps a json object with a list of PlayerMessageDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PlayerMessageDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = PlayerMessageDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/puzzle_dto.dart b/manager_api_new/lib/model/puzzle_dto.dart new file mode 100644 index 0000000..de71bc4 --- /dev/null +++ b/manager_api_new/lib/model/puzzle_dto.dart @@ -0,0 +1,414 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PuzzleDTO { + /// Returns a new [PuzzleDTO] instance. + PuzzleDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.messageDebut = const [], + this.messageFin = const [], + this.puzzleImage, + this.puzzleImageId, + this.rows, + this.cols, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? messageDebut; + + List? messageFin; + + ResourceDTO? puzzleImage; + + String? puzzleImageId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? rows; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? cols; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.messageDebut, messageDebut) && + _deepEquality.equals(other.messageFin, messageFin) && + other.puzzleImage == puzzleImage && + other.puzzleImageId == puzzleImageId && + other.rows == rows && + other.cols == cols; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (messageDebut == null ? 0 : messageDebut!.hashCode) + + (messageFin == null ? 0 : messageFin!.hashCode) + + (puzzleImage == null ? 0 : puzzleImage!.hashCode) + + (puzzleImageId == null ? 0 : puzzleImageId!.hashCode) + + (rows == null ? 0 : rows!.hashCode) + + (cols == null ? 0 : cols!.hashCode); + + @override + String toString() => + 'PuzzleDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.messageDebut != null) { + json[r'messageDebut'] = this.messageDebut; + } else { + json[r'messageDebut'] = null; + } + if (this.messageFin != null) { + json[r'messageFin'] = this.messageFin; + } else { + json[r'messageFin'] = null; + } + if (this.puzzleImage != null) { + json[r'puzzleImage'] = this.puzzleImage; + } else { + json[r'puzzleImage'] = null; + } + if (this.puzzleImageId != null) { + json[r'puzzleImageId'] = this.puzzleImageId; + } else { + json[r'puzzleImageId'] = null; + } + if (this.rows != null) { + json[r'rows'] = this.rows; + } else { + json[r'rows'] = null; + } + if (this.cols != null) { + json[r'cols'] = this.cols; + } else { + json[r'cols'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PuzzleDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + messageDebut: + TranslationAndResourceDTO.listFromJson(json[r'messageDebut']), + messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']), + puzzleImage: ResourceDTO.fromJson(json[r'puzzleImage']), + puzzleImageId: mapValueOfType(json, r'puzzleImageId'), + rows: mapValueOfType(json, r'rows'), + cols: mapValueOfType(json, r'cols'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart b/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart new file mode 100644 index 0000000..adfdb2d --- /dev/null +++ b/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart @@ -0,0 +1,191 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PuzzleDTOAllOfPuzzleImage { + /// Returns a new [PuzzleDTOAllOfPuzzleImage] instance. + PuzzleDTOAllOfPuzzleImage({ + this.id, + this.type, + this.label, + this.url, + this.dateCreation, + this.instanceId, + }); + + String? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? type; + + String? label; + + String? url; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? instanceId; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTOAllOfPuzzleImage && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); + + @override + String toString() => + 'PuzzleDTOAllOfPuzzleImage[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTOAllOfPuzzleImage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTOAllOfPuzzleImage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PuzzleDTOAllOfPuzzleImage[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTOAllOfPuzzleImage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTOAllOfPuzzleImage( + id: mapValueOfType(json, r'id'), + type: ResourceType.fromJson(json[r'type']), + label: mapValueOfType(json, r'label'), + url: mapValueOfType(json, r'url'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + instanceId: mapValueOfType(json, r'instanceId'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTOAllOfPuzzleImage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTOAllOfPuzzleImage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTOAllOfPuzzleImage-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTOAllOfPuzzleImage.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/puzzle_dto_image.dart b/manager_api_new/lib/model/puzzle_dto_image.dart similarity index 75% rename from manager_api/lib/model/puzzle_dto_image.dart rename to manager_api_new/lib/model/puzzle_dto_image.dart index 1cd92ce..d47344f 100644 --- a/manager_api/lib/model/puzzle_dto_image.dart +++ b/manager_api_new/lib/model/puzzle_dto_image.dart @@ -46,26 +46,29 @@ class PuzzleDTOImage { ResourceType? resourceType; @override - bool operator ==(Object other) => identical(this, other) || other is PuzzleDTOImage && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.resourceUrl == resourceUrl && - other.order == order && - other.resourceType == resourceType; + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTOImage && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); @override - String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + String toString() => + 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; Map toJson() { final json = {}; @@ -114,8 +117,10 @@ class PuzzleDTOImage { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PuzzleDTOImage[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PuzzleDTOImage[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.'); }); return true; }()); @@ -132,7 +137,10 @@ class PuzzleDTOImage { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +168,24 @@ class PuzzleDTOImage { } // maps a json object with a list of PuzzleDTOImage-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PuzzleDTOImage.listFromJson(entry.value, growable: growable,); + map[entry.key] = PuzzleDTOImage.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/question_dto.dart b/manager_api_new/lib/model/question_dto.dart similarity index 69% rename from manager_api/lib/model/question_dto.dart rename to manager_api_new/lib/model/question_dto.dart index 4eb1254..686d4f4 100644 --- a/manager_api/lib/model/question_dto.dart +++ b/manager_api_new/lib/model/question_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,6 +13,7 @@ part of openapi.api; class QuestionDTO { /// Returns a new [QuestionDTO] instance. QuestionDTO({ + this.id, this.label = const [], this.responses = const [], this.imageBackgroundResourceId, @@ -21,18 +22,20 @@ class QuestionDTO { this.order, }); - List? label; - - List? responses; - - String? imageBackgroundResourceId; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// + int? id; + + List? label; + + List? responses; + + String? imageBackgroundResourceId; + ResourceType? imageBackgroundResourceType; String? imageBackgroundResourceUrl; @@ -46,29 +49,45 @@ class QuestionDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is QuestionDTO && - other.label == label && - other.responses == responses && - other.imageBackgroundResourceId == imageBackgroundResourceId && - other.imageBackgroundResourceType == imageBackgroundResourceType && - other.imageBackgroundResourceUrl == imageBackgroundResourceUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is QuestionDTO && + other.id == id && + _deepEquality.equals(other.label, label) && + _deepEquality.equals(other.responses, responses) && + other.imageBackgroundResourceId == imageBackgroundResourceId && + other.imageBackgroundResourceType == imageBackgroundResourceType && + other.imageBackgroundResourceUrl == imageBackgroundResourceUrl && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (responses == null ? 0 : responses!.hashCode) + - (imageBackgroundResourceId == null ? 0 : imageBackgroundResourceId!.hashCode) + - (imageBackgroundResourceType == null ? 0 : imageBackgroundResourceType!.hashCode) + - (imageBackgroundResourceUrl == null ? 0 : imageBackgroundResourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (responses == null ? 0 : responses!.hashCode) + + (imageBackgroundResourceId == null + ? 0 + : imageBackgroundResourceId!.hashCode) + + (imageBackgroundResourceType == null + ? 0 + : imageBackgroundResourceType!.hashCode) + + (imageBackgroundResourceUrl == null + ? 0 + : imageBackgroundResourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'QuestionDTO[label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]'; + String toString() => + 'QuestionDTO[id=$id, label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]'; Map toJson() { final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } if (this.label != null) { json[r'label'] = this.label; } else { @@ -114,13 +133,16 @@ class QuestionDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuestionDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuestionDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuestionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuestionDTO[$key]" has a null value in JSON.'); }); return true; }()); return QuestionDTO( + id: mapValueOfType(json, r'id'), label: TranslationAndResourceDTO.listFromJson(json[r'label']), responses: ResponseDTO.listFromJson(json[r'responses']), imageBackgroundResourceId: mapValueOfType(json, r'imageBackgroundResourceId'), @@ -132,7 +154,10 @@ class QuestionDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +185,24 @@ class QuestionDTO { } // maps a json object with a list of QuestionDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuestionDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuestionDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/question_dto_image_background_resource_type.dart b/manager_api_new/lib/model/question_dto_image_background_resource_type.dart new file mode 100644 index 0000000..fae2816 --- /dev/null +++ b/manager_api_new/lib/model/question_dto_image_background_resource_type.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuestionDTOImageBackgroundResourceType { + /// Returns a new [QuestionDTOImageBackgroundResourceType] instance. + QuestionDTOImageBackgroundResourceType(); + + /* @override + bool operator ==(Object other) => identical(this, other) || other is QuestionDTOImageBackgroundResourceType && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'QuestionDTOImageBackgroundResourceType[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [QuestionDTOImageBackgroundResourceType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuestionDTOImageBackgroundResourceType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QuestionDTOImageBackgroundResourceType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QuestionDTOImageBackgroundResourceType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuestionDTOImageBackgroundResourceType( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuestionDTOImageBackgroundResourceType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuestionDTOImageBackgroundResourceType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuestionDTOImageBackgroundResourceType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuestionDTOImageBackgroundResourceType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/quiz_dto.dart b/manager_api_new/lib/model/quiz_dto.dart new file mode 100644 index 0000000..62ba692 --- /dev/null +++ b/manager_api_new/lib/model/quiz_dto.dart @@ -0,0 +1,392 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizDTO { + /// Returns a new [QuizDTO] instance. + QuizDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.questions = const [], + this.badLevel = const [], + this.mediumLevel = const [], + this.goodLevel = const [], + this.greatLevel = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? questions; + + List? badLevel; + + List? mediumLevel; + + List? goodLevel; + + List? greatLevel; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.questions, questions) && + _deepEquality.equals(other.badLevel, badLevel) && + _deepEquality.equals(other.mediumLevel, mediumLevel) && + _deepEquality.equals(other.goodLevel, goodLevel) && + _deepEquality.equals(other.greatLevel, greatLevel); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (questions == null ? 0 : questions!.hashCode) + + (badLevel == null ? 0 : badLevel!.hashCode) + + (mediumLevel == null ? 0 : mediumLevel!.hashCode) + + (goodLevel == null ? 0 : goodLevel!.hashCode) + + (greatLevel == null ? 0 : greatLevel!.hashCode); + + @override + String toString() => + 'QuizDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.questions != null) { + json[r'questions'] = this.questions; + } else { + json[r'questions'] = null; + } + if (this.badLevel != null) { + json[r'bad_level'] = this.badLevel; + } else { + json[r'bad_level'] = null; + } + if (this.mediumLevel != null) { + json[r'medium_level'] = this.mediumLevel; + } else { + json[r'medium_level'] = null; + } + if (this.goodLevel != null) { + json[r'good_level'] = this.goodLevel; + } else { + json[r'good_level'] = null; + } + if (this.greatLevel != null) { + json[r'great_level'] = this.greatLevel; + } else { + json[r'great_level'] = null; + } + return json; + } + + /// Returns a new [QuizDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + questions: QuestionDTO.listFromJson(json[r'questions']), + badLevel: TranslationAndResourceDTO.listFromJson(json[r'bad_level']), + mediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'medium_level']), + goodLevel: TranslationAndResourceDTO.listFromJson(json[r'good_level']), + greatLevel: + TranslationAndResourceDTO.listFromJson(json[r'great_level']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/quiz_question.dart b/manager_api_new/lib/model/quiz_question.dart new file mode 100644 index 0000000..5a34217 --- /dev/null +++ b/manager_api_new/lib/model/quiz_question.dart @@ -0,0 +1,199 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestion { + /// Returns a new [QuizQuestion] instance. + QuizQuestion({ + required this.id, + this.label = const [], + this.responses = const [], + this.resourceId, + this.resource, + this.order, + this.sectionQuizId, + this.sectionQuiz, + }); + + int id; + + List label; + + List responses; + + String? resourceId; + + Resource? resource; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? sectionQuizId; + + QuizQuestionSectionQuiz? sectionQuiz; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestion && + other.id == id && + _deepEquality.equals(other.label, label) && + _deepEquality.equals(other.responses, responses) && + other.resourceId == resourceId && + other.resource == resource && + other.order == order && + other.sectionQuizId == sectionQuizId && + other.sectionQuiz == sectionQuiz; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (responses.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (sectionQuizId == null ? 0 : sectionQuizId!.hashCode) + + (sectionQuiz == null ? 0 : sectionQuiz!.hashCode); + + @override + String toString() => + 'QuizQuestion[id=$id, label=$label, responses=$responses, resourceId=$resourceId, resource=$resource, order=$order, sectionQuizId=$sectionQuizId, sectionQuiz=$sectionQuiz]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'responses'] = this.responses; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resource != null) { + json[r'resource'] = this.resource; + } else { + json[r'resource'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.sectionQuizId != null) { + json[r'sectionQuizId'] = this.sectionQuizId; + } else { + json[r'sectionQuizId'] = null; + } + if (this.sectionQuiz != null) { + json[r'sectionQuiz'] = this.sectionQuiz; + } else { + json[r'sectionQuiz'] = null; + } + return json; + } + + /// Returns a new [QuizQuestion] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestion? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestion[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestion[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestion( + id: mapValueOfType(json, r'id')!, + label: TranslationAndResourceDTO.listFromJson(json[r'label']), + responses: ResponseDTO.listFromJson(json[r'responses']), + resourceId: mapValueOfType(json, r'resourceId'), + resource: Resource.fromJson(json[r'resource']), + order: mapValueOfType(json, r'order'), + sectionQuizId: mapValueOfType(json, r'sectionQuizId'), + sectionQuiz: QuizQuestionSectionQuiz.fromJson(json[r'sectionQuiz']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestion.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestion.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestion-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestion.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'responses', + }; +} diff --git a/manager_api_new/lib/model/quiz_question_resource.dart b/manager_api_new/lib/model/quiz_question_resource.dart new file mode 100644 index 0000000..84171ba --- /dev/null +++ b/manager_api_new/lib/model/quiz_question_resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestionResource { + /// Returns a new [QuizQuestionResource] instance. + QuizQuestionResource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestionResource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'QuizQuestionResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [QuizQuestionResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestionResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestionResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestionResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestionResource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestionResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestionResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestionResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestionResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api_new/lib/model/quiz_question_section_quiz.dart b/manager_api_new/lib/model/quiz_question_section_quiz.dart new file mode 100644 index 0000000..44c9be4 --- /dev/null +++ b/manager_api_new/lib/model/quiz_question_section_quiz.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestionSectionQuiz { + /// Returns a new [QuizQuestionSectionQuiz] instance. + QuizQuestionSectionQuiz({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.quizQuestions = const [], + this.quizBadLevel = const [], + this.quizMediumLevel = const [], + this.quizGoodLevel = const [], + this.quizGreatLevel = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List quizQuestions; + + List quizBadLevel; + + List quizMediumLevel; + + List quizGoodLevel; + + List quizGreatLevel; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestionSectionQuiz && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.quizQuestions, quizQuestions) && + _deepEquality.equals(other.quizBadLevel, quizBadLevel) && + _deepEquality.equals(other.quizMediumLevel, quizMediumLevel) && + _deepEquality.equals(other.quizGoodLevel, quizGoodLevel) && + _deepEquality.equals(other.quizGreatLevel, quizGreatLevel) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (quizQuestions.hashCode) + + (quizBadLevel.hashCode) + + (quizMediumLevel.hashCode) + + (quizGoodLevel.hashCode) + + (quizGreatLevel.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'QuizQuestionSectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'quizQuestions'] = this.quizQuestions; + json[r'quizBadLevel'] = this.quizBadLevel; + json[r'quizMediumLevel'] = this.quizMediumLevel; + json[r'quizGoodLevel'] = this.quizGoodLevel; + json[r'quizGreatLevel'] = this.quizGreatLevel; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [QuizQuestionSectionQuiz] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestionSectionQuiz? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestionSectionQuiz[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestionSectionQuiz[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestionSectionQuiz( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), + quizBadLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']), + quizMediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']), + quizGoodLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']), + quizGreatLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestionSectionQuiz.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestionSectionQuiz.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestionSectionQuiz-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestionSectionQuiz.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'quizQuestions', + 'quizBadLevel', + 'quizMediumLevel', + 'quizGoodLevel', + 'quizGreatLevel', + }; +} diff --git a/manager_api/lib/model/quizz_dto.dart b/manager_api_new/lib/model/quizz_dto.dart similarity index 70% rename from manager_api/lib/model/quizz_dto.dart rename to manager_api_new/lib/model/quizz_dto.dart index 0a3b921..6daa28d 100644 --- a/manager_api/lib/model/quizz_dto.dart +++ b/manager_api_new/lib/model/quizz_dto.dart @@ -31,24 +31,27 @@ class QuizzDTO { LevelDTO? greatLevel; @override - bool operator ==(Object other) => identical(this, other) || other is QuizzDTO && - other.questions == questions && - other.badLevel == badLevel && - other.mediumLevel == mediumLevel && - other.goodLevel == goodLevel && - other.greatLevel == greatLevel; + bool operator ==(Object other) => + identical(this, other) || + other is QuizzDTO && + other.questions == questions && + other.badLevel == badLevel && + other.mediumLevel == mediumLevel && + other.goodLevel == goodLevel && + other.greatLevel == greatLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (questions == null ? 0 : questions!.hashCode) + - (badLevel == null ? 0 : badLevel!.hashCode) + - (mediumLevel == null ? 0 : mediumLevel!.hashCode) + - (goodLevel == null ? 0 : goodLevel!.hashCode) + - (greatLevel == null ? 0 : greatLevel!.hashCode); + // ignore: unnecessary_parenthesis + (questions == null ? 0 : questions!.hashCode) + + (badLevel == null ? 0 : badLevel!.hashCode) + + (mediumLevel == null ? 0 : mediumLevel!.hashCode) + + (goodLevel == null ? 0 : goodLevel!.hashCode) + + (greatLevel == null ? 0 : greatLevel!.hashCode); @override - String toString() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; + String toString() => + 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; Map toJson() { final json = {}; @@ -92,14 +95,16 @@ class QuizzDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuizzDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuizzDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuizzDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizzDTO[$key]" has a null value in JSON.'); }); return true; }()); return QuizzDTO( - questions: QuestionDTO.listFromJson(json[r'questions']), + questions: QuestionDTO.listFromJson(json[r'questions']) ?? const [], badLevel: LevelDTO.fromJson(json[r'bad_level']), mediumLevel: LevelDTO.fromJson(json[r'medium_level']), goodLevel: LevelDTO.fromJson(json[r'good_level']), @@ -109,7 +114,10 @@ class QuizzDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -137,20 +145,24 @@ class QuizzDTO { } // maps a json object with a list of QuizzDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuizzDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuizzDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/quizz_dto_bad_level.dart b/manager_api_new/lib/model/quizz_dto_bad_level.dart similarity index 76% rename from manager_api/lib/model/quizz_dto_bad_level.dart rename to manager_api_new/lib/model/quizz_dto_bad_level.dart index 3e2fee2..4a44df1 100644 --- a/manager_api/lib/model/quizz_dto_bad_level.dart +++ b/manager_api_new/lib/model/quizz_dto_bad_level.dart @@ -19,13 +19,14 @@ class QuizzDTOBadLevel { List? label; @override - bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel && - other.label == label; + bool operator ==(Object other) => + identical(this, other) || + other is QuizzDTOBadLevel && other.label == label; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode); @override String toString() => 'QuizzDTOBadLevel[label=$label]'; @@ -52,8 +53,10 @@ class QuizzDTOBadLevel { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuizzDTOBadLevel[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuizzDTOBadLevel[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.'); }); return true; }()); @@ -65,7 +68,10 @@ class QuizzDTOBadLevel { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +99,24 @@ class QuizzDTOBadLevel { } // maps a json object with a list of QuizzDTOBadLevel-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuizzDTOBadLevel.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuizzDTOBadLevel.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/resource.dart b/manager_api_new/lib/model/resource.dart new file mode 100644 index 0000000..460c310 --- /dev/null +++ b/manager_api_new/lib/model/resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Resource { + /// Returns a new [Resource] instance. + Resource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Resource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'Resource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [Resource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Resource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "Resource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Resource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Resource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Resource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Resource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Resource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Resource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/resource_dto.dart b/manager_api_new/lib/model/resource_dto.dart similarity index 74% rename from manager_api/lib/model/resource_dto.dart rename to manager_api_new/lib/model/resource_dto.dart index 028b523..3f8386b 100644 --- a/manager_api/lib/model/resource_dto.dart +++ b/manager_api_new/lib/model/resource_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -46,26 +46,29 @@ class ResourceDTO { String? instanceId; @override - bool operator ==(Object other) => identical(this, other) || other is ResourceDTO && - other.id == id && - other.type == type && - other.label == label && - other.url == url && - other.dateCreation == dateCreation && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is ResourceDTO && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (url == null ? 0 : url!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => + 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -114,8 +117,10 @@ class ResourceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ResourceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ResourceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ResourceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -125,14 +130,17 @@ class ResourceDTO { type: ResourceType.fromJson(json[r'type']), label: mapValueOfType(json, r'label'), url: mapValueOfType(json, r'url'), - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +168,24 @@ class ResourceDTO { } // maps a json object with a list of ResourceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ResourceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ResourceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/resource_type.dart b/manager_api_new/lib/model/resource_type.dart similarity index 99% rename from manager_api/lib/model/resource_type.dart rename to manager_api_new/lib/model/resource_type.dart index cfde41e..b42ec0c 100644 --- a/manager_api/lib/model/resource_type.dart +++ b/manager_api_new/lib/model/resource_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/manager_api/lib/model/response_dto.dart b/manager_api_new/lib/model/response_dto.dart similarity index 76% rename from manager_api/lib/model/response_dto.dart rename to manager_api_new/lib/model/response_dto.dart index 6963754..d9e8dc3 100644 --- a/manager_api/lib/model/response_dto.dart +++ b/manager_api_new/lib/model/response_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -37,20 +37,23 @@ class ResponseDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is ResponseDTO && - other.label == label && - other.isGood == isGood && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is ResponseDTO && + _deepEquality.equals(other.label, label) && + other.isGood == isGood && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (isGood == null ? 0 : isGood!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode) + + (isGood == null ? 0 : isGood!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; + String toString() => + 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; Map toJson() { final json = {}; @@ -84,8 +87,10 @@ class ResponseDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ResponseDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ResponseDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ResponseDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ResponseDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -99,7 +104,10 @@ class ResponseDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,20 +135,24 @@ class ResponseDTO { } // maps a json object with a list of ResponseDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ResponseDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ResponseDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/section.dart b/manager_api_new/lib/model/section.dart new file mode 100644 index 0000000..43f6ebe --- /dev/null +++ b/manager_api_new/lib/model/section.dart @@ -0,0 +1,309 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Section { + /// Returns a new [Section] instance. + Section({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Section && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'Section[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [Section] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Section? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "Section[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Section[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Section( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List
listFromJson( + dynamic json, { + bool growable = false, + }) { + final result =
[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Section.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Section.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Section-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Section.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/section_dto.dart b/manager_api_new/lib/model/section_dto.dart similarity index 72% rename from manager_api/lib/model/section_dto.dart rename to manager_api_new/lib/model/section_dto.dart index b3c097e..d03c3c7 100644 --- a/manager_api/lib/model/section_dto.dart +++ b/manager_api_new/lib/model/section_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,7 +23,6 @@ class SectionDTO { this.isSubSection, this.parentId, this.type, - this.data, this.dateCreation, this.order, this.instanceId, @@ -66,8 +65,6 @@ class SectionDTO { /// SectionType? type; - String? data; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -97,52 +94,53 @@ class SectionDTO { int? beaconId; @override - bool operator ==(Object other) => identical(this, other) || other is SectionDTO && - other.id == id && - other.label == label && - other.title == title && - other.description == description && - other.imageId == imageId && - other.imageSource == imageSource && - other.configurationId == configurationId && - other.isSubSection == isSubSection && - other.parentId == parentId && - other.type == type && - other.data == data && - other.dateCreation == dateCreation && - other.order == order && - other.instanceId == instanceId && - other.latitude == latitude && - other.longitude == longitude && - other.meterZoneGPS == meterZoneGPS && - other.isBeacon == isBeacon && - other.beaconId == beaconId; + bool operator ==(Object other) => + identical(this, other) || + other is SectionDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (isSubSection == null ? 0 : isSubSection!.hashCode) + - (parentId == null ? 0 : parentId!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (data == null ? 0 : data!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + - (isBeacon == null ? 0 : isBeacon!.hashCode) + - (beaconId == null ? 0 : beaconId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode); @override - String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]'; + String toString() => + 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]'; Map toJson() { final json = {}; @@ -196,11 +194,6 @@ class SectionDTO { } else { json[r'type'] = null; } - if (this.data != null) { - json[r'data'] = this.data; - } else { - json[r'data'] = null; - } if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { @@ -256,8 +249,10 @@ class SectionDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "SectionDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "SectionDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "SectionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -273,8 +268,7 @@ class SectionDTO { isSubSection: mapValueOfType(json, r'isSubSection'), parentId: mapValueOfType(json, r'parentId'), type: SectionType.fromJson(json[r'type']), - data: mapValueOfType(json, r'data'), - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), order: mapValueOfType(json, r'order'), instanceId: mapValueOfType(json, r'instanceId'), latitude: mapValueOfType(json, r'latitude'), @@ -287,7 +281,10 @@ class SectionDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -315,20 +312,24 @@ class SectionDTO { } // maps a json object with a list of SectionDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = SectionDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/section_map.dart b/manager_api_new/lib/model/section_map.dart new file mode 100644 index 0000000..770b757 --- /dev/null +++ b/manager_api_new/lib/model/section_map.dart @@ -0,0 +1,424 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMap { + /// Returns a new [SectionMap] instance. + SectionMap({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.mapCategories = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.mapZoom, + this.mapMapType, + this.mapTypeMapbox, + this.mapMapProvider, + this.mapPoints = const [], + this.mapResourceId, + this.mapResource, + this.mapCenterLatitude, + this.mapCenterLongitude, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List mapCategories; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? mapZoom; + + SectionMapAllOfMapMapType? mapMapType; + + SectionMapAllOfMapTypeMapbox? mapTypeMapbox; + + SectionMapAllOfMapMapProvider? mapMapProvider; + + List? mapPoints; + + String? mapResourceId; + + SectionMapAllOfMapResource? mapResource; + + String? mapCenterLatitude; + + String? mapCenterLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionMap && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.mapCategories, mapCategories) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.mapZoom == mapZoom && + other.mapMapType == mapMapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapMapProvider == mapMapProvider && + _deepEquality.equals(other.mapPoints, mapPoints) && + other.mapResourceId == mapResourceId && + other.mapResource == mapResource && + other.mapCenterLatitude == mapCenterLatitude && + other.mapCenterLongitude == mapCenterLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (mapCategories.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (mapZoom == null ? 0 : mapZoom!.hashCode) + + (mapMapType == null ? 0 : mapMapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapMapProvider == null ? 0 : mapMapProvider!.hashCode) + + (mapPoints == null ? 0 : mapPoints!.hashCode) + + (mapResourceId == null ? 0 : mapResourceId!.hashCode) + + (mapResource == null ? 0 : mapResource!.hashCode) + + (mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) + + (mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode); + + @override + String toString() => + 'SectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'mapCategories'] = this.mapCategories; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.mapZoom != null) { + json[r'mapZoom'] = this.mapZoom; + } else { + json[r'mapZoom'] = null; + } + if (this.mapMapType != null) { + json[r'mapMapType'] = this.mapMapType; + } else { + json[r'mapMapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapMapProvider != null) { + json[r'mapMapProvider'] = this.mapMapProvider; + } else { + json[r'mapMapProvider'] = null; + } + if (this.mapPoints != null) { + json[r'mapPoints'] = this.mapPoints; + } else { + json[r'mapPoints'] = null; + } + if (this.mapResourceId != null) { + json[r'mapResourceId'] = this.mapResourceId; + } else { + json[r'mapResourceId'] = null; + } + if (this.mapResource != null) { + json[r'mapResource'] = this.mapResource; + } else { + json[r'mapResource'] = null; + } + if (this.mapCenterLatitude != null) { + json[r'mapCenterLatitude'] = this.mapCenterLatitude; + } else { + json[r'mapCenterLatitude'] = null; + } + if (this.mapCenterLongitude != null) { + json[r'mapCenterLongitude'] = this.mapCenterLongitude; + } else { + json[r'mapCenterLongitude'] = null; + } + return json; + } + + /// Returns a new [SectionMap] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMap? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionMap[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionMap[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMap( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + mapZoom: mapValueOfType(json, r'mapZoom'), + mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']), + mapTypeMapbox: + SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']), + mapMapProvider: + SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']), + mapPoints: GeoPoint.listFromJson(json[r'mapPoints']), + mapResourceId: mapValueOfType(json, r'mapResourceId'), + mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']), + mapCenterLatitude: mapValueOfType(json, r'mapCenterLatitude'), + mapCenterLongitude: mapValueOfType(json, r'mapCenterLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMap.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMap.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMap-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMap.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'mapCategories', + }; +} diff --git a/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart b/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart new file mode 100644 index 0000000..1ba2900 --- /dev/null +++ b/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapAllOfMapMapProvider { + /// Returns a new [SectionMapAllOfMapMapProvider] instance. + SectionMapAllOfMapMapProvider(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapProvider && + + @override + int get hashCode => + // ignore: unnecessary_parenthesis +*/ + @override + String toString() => 'SectionMapAllOfMapMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [SectionMapAllOfMapMapProvider] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMapAllOfMapMapProvider? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMapAllOfMapMapProvider( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMapAllOfMapMapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMapAllOfMapMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMapAllOfMapMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMapAllOfMapMapProvider.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/slider_dto.dart b/manager_api_new/lib/model/section_map_all_of_map_map_type.dart similarity index 56% rename from manager_api/lib/model/slider_dto.dart rename to manager_api_new/lib/model/section_map_all_of_map_map_type.dart index 837fb7a..2bf4aeb 100644 --- a/manager_api/lib/model/slider_dto.dart +++ b/manager_api_new/lib/model/section_map_all_of_map_map_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class SliderDTO { - /// Returns a new [SliderDTO] instance. - SliderDTO({ - this.contents = const [], - }); +class SectionMapAllOfMapMapType { + /// Returns a new [SectionMapAllOfMapMapType] instance. + SectionMapAllOfMapMapType(); - List? contents; - - @override - bool operator ==(Object other) => identical(this, other) || other is SliderDTO && - other.contents == contents; + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapType && @override int get hashCode => // ignore: unnecessary_parenthesis - (contents == null ? 0 : contents!.hashCode); - +*/ @override - String toString() => 'SliderDTO[contents=$contents]'; + String toString() => 'SectionMapAllOfMapMapType[]'; Map toJson() { final json = {}; - if (this.contents != null) { - json[r'contents'] = this.contents; - } else { - json[r'contents'] = null; - } return json; } - /// Returns a new [SliderDTO] instance and imports its values from + /// Returns a new [SectionMapAllOfMapMapType] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static SliderDTO? fromJson(dynamic value) { + static SectionMapAllOfMapMapType? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class SliderDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "SliderDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "SliderDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapMapType[$key]" has a null value in JSON.'); }); return true; }()); - return SliderDTO( - contents: ContentDTO.listFromJson(json[r'contents']), + return SectionMapAllOfMapMapType( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = SliderDTO.fromJson(row); + final value = SectionMapAllOfMapMapType.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class SliderDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = SliderDTO.fromJson(entry.value); + final value = SectionMapAllOfMapMapType.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class SliderDTO { return map; } - // maps a json object with a list of SliderDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of SectionMapAllOfMapMapType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = SliderDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionMapAllOfMapMapType.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api_new/lib/model/section_map_all_of_map_resource.dart b/manager_api_new/lib/model/section_map_all_of_map_resource.dart new file mode 100644 index 0000000..3caca1a --- /dev/null +++ b/manager_api_new/lib/model/section_map_all_of_map_resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapAllOfMapResource { + /// Returns a new [SectionMapAllOfMapResource] instance. + SectionMapAllOfMapResource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionMapAllOfMapResource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'SectionMapAllOfMapResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [SectionMapAllOfMapResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMapAllOfMapResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionMapAllOfMapResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionMapAllOfMapResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMapAllOfMapResource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMapAllOfMapResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMapAllOfMapResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMapAllOfMapResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMapAllOfMapResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/menu_dto.dart b/manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart similarity index 54% rename from manager_api/lib/model/menu_dto.dart rename to manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart index 0f47549..7a01593 100644 --- a/manager_api/lib/model/menu_dto.dart +++ b/manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class MenuDTO { - /// Returns a new [MenuDTO] instance. - MenuDTO({ - this.sections = const [], - }); +class SectionMapAllOfMapTypeMapbox { + /// Returns a new [SectionMapAllOfMapTypeMapbox] instance. + SectionMapAllOfMapTypeMapbox(); - List? sections; - - @override - bool operator ==(Object other) => identical(this, other) || other is MenuDTO && - other.sections == sections; + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapTypeMapbox && @override int get hashCode => // ignore: unnecessary_parenthesis - (sections == null ? 0 : sections!.hashCode); - +*/ @override - String toString() => 'MenuDTO[sections=$sections]'; + String toString() => 'SectionMapAllOfMapTypeMapbox[]'; Map toJson() { final json = {}; - if (this.sections != null) { - json[r'sections'] = this.sections; - } else { - json[r'sections'] = null; - } return json; } - /// Returns a new [MenuDTO] instance and imports its values from + /// Returns a new [SectionMapAllOfMapTypeMapbox] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static MenuDTO? fromJson(dynamic value) { + static SectionMapAllOfMapTypeMapbox? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class MenuDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MenuDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MenuDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return MenuDTO( - sections: SectionDTO.listFromJson(json[r'sections']), + return SectionMapAllOfMapTypeMapbox( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = MenuDTO.fromJson(row); + final value = SectionMapAllOfMapTypeMapbox.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class MenuDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = MenuDTO.fromJson(entry.value); + final value = SectionMapAllOfMapTypeMapbox.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class MenuDTO { return map; } - // maps a json object with a list of MenuDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of SectionMapAllOfMapTypeMapbox-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MenuDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionMapAllOfMapTypeMapbox.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api_new/lib/model/section_quiz.dart b/manager_api_new/lib/model/section_quiz.dart new file mode 100644 index 0000000..43861f1 --- /dev/null +++ b/manager_api_new/lib/model/section_quiz.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionQuiz { + /// Returns a new [SectionQuiz] instance. + SectionQuiz({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.quizQuestions = const [], + this.quizBadLevel = const [], + this.quizMediumLevel = const [], + this.quizGoodLevel = const [], + this.quizGreatLevel = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List quizQuestions; + + List quizBadLevel; + + List quizMediumLevel; + + List quizGoodLevel; + + List quizGreatLevel; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionQuiz && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.quizQuestions, quizQuestions) && + _deepEquality.equals(other.quizBadLevel, quizBadLevel) && + _deepEquality.equals(other.quizMediumLevel, quizMediumLevel) && + _deepEquality.equals(other.quizGoodLevel, quizGoodLevel) && + _deepEquality.equals(other.quizGreatLevel, quizGreatLevel) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (quizQuestions.hashCode) + + (quizBadLevel.hashCode) + + (quizMediumLevel.hashCode) + + (quizGoodLevel.hashCode) + + (quizGreatLevel.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'SectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'quizQuestions'] = this.quizQuestions; + json[r'quizBadLevel'] = this.quizBadLevel; + json[r'quizMediumLevel'] = this.quizMediumLevel; + json[r'quizGoodLevel'] = this.quizGoodLevel; + json[r'quizGreatLevel'] = this.quizGreatLevel; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [SectionQuiz] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionQuiz? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionQuiz[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionQuiz[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionQuiz( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), + quizBadLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']), + quizMediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']), + quizGoodLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']), + quizGreatLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionQuiz.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionQuiz.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionQuiz-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionQuiz.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'quizQuestions', + 'quizBadLevel', + 'quizMediumLevel', + 'quizGoodLevel', + 'quizGreatLevel', + }; +} diff --git a/manager_api/lib/model/section_type.dart b/manager_api_new/lib/model/section_type.dart similarity index 93% rename from manager_api/lib/model/section_type.dart rename to manager_api_new/lib/model/section_type.dart index 5a9cebe..ad229bc 100644 --- a/manager_api/lib/model/section_type.dart +++ b/manager_api_new/lib/model/section_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,7 @@ part of openapi.api; -/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quizz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda 10 = Weather +/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quiz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda class SectionType { /// Instantiate a new enum with the provided [value]. const SectionType._(this.value); @@ -28,7 +28,7 @@ class SectionType { static const Video = SectionType._(2); static const Web = SectionType._(3); static const Menu = SectionType._(4); - static const Quizz = SectionType._(5); + static const Quiz = SectionType._(5); static const Article = SectionType._(6); static const Pdf = SectionType._(7); static const Puzzle = SectionType._(8); @@ -42,7 +42,7 @@ class SectionType { Video, Web, Menu, - Quizz, + Quiz, Article, Pdf, Puzzle, @@ -92,7 +92,7 @@ class SectionTypeTypeTransformer { case r'Video': return SectionType.Video; case r'Web': return SectionType.Web; case r'Menu': return SectionType.Menu; - case r'Quizz': return SectionType.Quizz; + case r'Quiz': return SectionType.Quiz; case r'Article': return SectionType.Article; case r'PDF': return SectionType.Pdf; case r'Puzzle': return SectionType.Puzzle; @@ -111,7 +111,7 @@ class SectionTypeTypeTransformer { case 2: return SectionType.Video; case 3: return SectionType.Web; case 4: return SectionType.Menu; - case 5: return SectionType.Quizz; + case 5: return SectionType.Quiz; case 6: return SectionType.Article; case 7: return SectionType.Pdf; case 8: return SectionType.Puzzle; diff --git a/manager_api_new/lib/model/slider_dto.dart b/manager_api_new/lib/model/slider_dto.dart new file mode 100644 index 0000000..87c5f1c --- /dev/null +++ b/manager_api_new/lib/model/slider_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SliderDTO { + /// Returns a new [SliderDTO] instance. + SliderDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.contents = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? contents; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SliderDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.contents, contents); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (contents == null ? 0 : contents!.hashCode); + + @override + String toString() => + 'SliderDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, contents=$contents]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; + } + return json; + } + + /// Returns a new [SliderDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SliderDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SliderDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SliderDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SliderDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + contents: ContentDTO.listFromJson(json[r'contents']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SliderDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SliderDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SliderDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SliderDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/token_dto.dart b/manager_api_new/lib/model/token_dto.dart similarity index 71% rename from manager_api/lib/model/token_dto.dart rename to manager_api_new/lib/model/token_dto.dart index 1c9ceb5..be65209 100644 --- a/manager_api/lib/model/token_dto.dart +++ b/manager_api_new/lib/model/token_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -49,33 +49,36 @@ class TokenDTO { String? instanceId; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is TokenDTO && - other.accessToken == accessToken && - other.refreshToken == refreshToken && - other.scope == scope && - other.tokenType == tokenType && - other.expiresIn == expiresIn && - other.expiration == expiration && - other.instanceId == instanceId && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is TokenDTO && + other.accessToken == accessToken && + other.refreshToken == refreshToken && + other.scope == scope && + other.tokenType == tokenType && + other.expiresIn == expiresIn && + other.expiration == expiration && + other.instanceId == instanceId && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (accessToken == null ? 0 : accessToken!.hashCode) + - (refreshToken == null ? 0 : refreshToken!.hashCode) + - (scope == null ? 0 : scope!.hashCode) + - (tokenType == null ? 0 : tokenType!.hashCode) + - (expiresIn == null ? 0 : expiresIn!.hashCode) + - (expiration == null ? 0 : expiration!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (accessToken == null ? 0 : accessToken!.hashCode) + + (refreshToken == null ? 0 : refreshToken!.hashCode) + + (scope == null ? 0 : scope!.hashCode) + + (tokenType == null ? 0 : tokenType!.hashCode) + + (expiresIn == null ? 0 : expiresIn!.hashCode) + + (expiration == null ? 0 : expiration!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; + String toString() => + 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; Map toJson() { final json = {}; @@ -134,8 +137,10 @@ class TokenDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TokenDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TokenDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TokenDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TokenDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -146,15 +151,18 @@ class TokenDTO { scope: mapValueOfType(json, r'scope'), tokenType: mapValueOfType(json, r'token_type'), expiresIn: mapValueOfType(json, r'expires_in'), - expiration: mapDateTime(json, r'expiration', ''), + expiration: mapDateTime(json, r'expiration', r''), instanceId: mapValueOfType(json, r'instanceId'), - pinCode: mapValueOfType(json, r'pinCode'), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -182,20 +190,24 @@ class TokenDTO { } // maps a json object with a list of TokenDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TokenDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TokenDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/translation_and_resource_dto.dart b/manager_api_new/lib/model/translation_and_resource_dto.dart similarity index 61% rename from manager_api/lib/model/translation_and_resource_dto.dart rename to manager_api_new/lib/model/translation_and_resource_dto.dart index f365b2e..3fa9192 100644 --- a/manager_api/lib/model/translation_and_resource_dto.dart +++ b/manager_api_new/lib/model/translation_and_resource_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,8 +16,7 @@ class TranslationAndResourceDTO { this.language, this.value, this.resourceId, - this.resourceType, - this.resourceUrl, + this.resource, }); String? language; @@ -26,35 +25,28 @@ class TranslationAndResourceDTO { String? resourceId; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - ResourceType? resourceType; - - String? resourceUrl; + ResourceDTO? resource; @override - bool operator ==(Object other) => identical(this, other) || other is TranslationAndResourceDTO && - other.language == language && - other.value == value && - other.resourceId == resourceId && - other.resourceType == resourceType && - other.resourceUrl == resourceUrl; + bool operator ==(Object other) => + identical(this, other) || + other is TranslationAndResourceDTO && + other.language == language && + other.value == value && + other.resourceId == resourceId && + other.resource == resource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (language == null ? 0 : language!.hashCode) + - (value == null ? 0 : value!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode); + // ignore: unnecessary_parenthesis + (language == null ? 0 : language!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode); @override - String toString() => 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]'; + String toString() => + 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resource=$resource]'; Map toJson() { final json = {}; @@ -73,15 +65,10 @@ class TranslationAndResourceDTO { } else { json[r'resourceId'] = null; } - if (this.resourceType != null) { - json[r'resourceType'] = this.resourceType; + if (this.resource != null) { + json[r'resource'] = this.resource; } else { - json[r'resourceType'] = null; - } - if (this.resourceUrl != null) { - json[r'resourceUrl'] = this.resourceUrl; - } else { - json[r'resourceUrl'] = null; + json[r'resource'] = null; } return json; } @@ -98,8 +85,10 @@ class TranslationAndResourceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -108,14 +97,16 @@ class TranslationAndResourceDTO { language: mapValueOfType(json, r'language'), value: mapValueOfType(json, r'value'), resourceId: mapValueOfType(json, r'resourceId'), - resourceType: ResourceType.fromJson(json[r'resourceType']), - resourceUrl: mapValueOfType(json, r'resourceUrl'), + resource: ResourceDTO.fromJson(json[r'resource']), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -143,20 +134,24 @@ class TranslationAndResourceDTO { } // maps a json object with a list of TranslationAndResourceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TranslationAndResourceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TranslationAndResourceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/translation_dto.dart b/manager_api_new/lib/model/translation_dto.dart similarity index 75% rename from manager_api/lib/model/translation_dto.dart rename to manager_api_new/lib/model/translation_dto.dart index 4e324c2..798ab21 100644 --- a/manager_api/lib/model/translation_dto.dart +++ b/manager_api_new/lib/model/translation_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -22,15 +22,17 @@ class TranslationDTO { String? value; @override - bool operator ==(Object other) => identical(this, other) || other is TranslationDTO && - other.language == language && - other.value == value; + bool operator ==(Object other) => + identical(this, other) || + other is TranslationDTO && + other.language == language && + other.value == value; @override int get hashCode => - // ignore: unnecessary_parenthesis - (language == null ? 0 : language!.hashCode) + - (value == null ? 0 : value!.hashCode); + // ignore: unnecessary_parenthesis + (language == null ? 0 : language!.hashCode) + + (value == null ? 0 : value!.hashCode); @override String toString() => 'TranslationDTO[language=$language, value=$value]'; @@ -62,8 +64,10 @@ class TranslationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TranslationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TranslationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TranslationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TranslationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +80,10 @@ class TranslationDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +111,24 @@ class TranslationDTO { } // maps a json object with a list of TranslationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TranslationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TranslationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/user.dart b/manager_api_new/lib/model/user.dart similarity index 52% rename from manager_api/lib/model/user.dart rename to manager_api_new/lib/model/user.dart index c3d7aad..14698a7 100644 --- a/manager_api/lib/model/user.dart +++ b/manager_api_new/lib/model/user.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,28 +13,30 @@ part of openapi.api; class User { /// Returns a new [User] instance. User({ - this.id, - this.email, - this.password, + required this.id, + required this.email, + required this.password, + required this.lastName, + required this.token, + required this.instanceId, this.firstName, - this.lastName, - this.token, this.dateCreation, - this.instanceId, }); - String? id; + String id; - String? email; + String email; - String? password; + String password; + + String lastName; + + String token; + + String instanceId; String? firstName; - String? lastName; - - String? token; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -43,76 +45,53 @@ class User { /// DateTime? dateCreation; - String? instanceId; - @override - bool operator ==(Object other) => identical(this, other) || other is User && - other.id == id && - other.email == email && - other.password == password && - other.firstName == firstName && - other.lastName == lastName && - other.token == token && - other.dateCreation == dateCreation && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is User && + other.id == id && + other.email == email && + other.password == password && + other.lastName == lastName && + other.token == token && + other.instanceId == instanceId && + other.firstName == firstName && + other.dateCreation == dateCreation; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode) + - (token == null ? 0 : token!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id.hashCode) + + (email.hashCode) + + (password.hashCode) + + (lastName.hashCode) + + (token.hashCode) + + (instanceId.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode); @override - String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => + 'User[id=$id, email=$email, password=$password, lastName=$lastName, token=$token, instanceId=$instanceId, firstName=$firstName, dateCreation=$dateCreation]'; Map toJson() { final json = {}; - if (this.id != null) { - json[r'id'] = this.id; - } else { - json[r'id'] = null; - } - if (this.email != null) { - json[r'email'] = this.email; - } else { - json[r'email'] = null; - } - if (this.password != null) { - json[r'password'] = this.password; - } else { - json[r'password'] = null; - } + json[r'id'] = this.id; + json[r'email'] = this.email; + json[r'password'] = this.password; + json[r'lastName'] = this.lastName; + json[r'token'] = this.token; + json[r'instanceId'] = this.instanceId; if (this.firstName != null) { json[r'firstName'] = this.firstName; } else { json[r'firstName'] = null; } - if (this.lastName != null) { - json[r'lastName'] = this.lastName; - } else { - json[r'lastName'] = null; - } - if (this.token != null) { - json[r'token'] = this.token; - } else { - json[r'token'] = null; - } if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { json[r'dateCreation'] = null; } - if (this.instanceId != null) { - json[r'instanceId'] = this.instanceId; - } else { - json[r'instanceId'] = null; - } return json; } @@ -128,27 +107,32 @@ class User { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "User[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "User[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "User[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "User[$key]" has a null value in JSON.'); }); return true; }()); return User( - id: mapValueOfType(json, r'id'), - email: mapValueOfType(json, r'email'), - password: mapValueOfType(json, r'password'), + id: mapValueOfType(json, r'id')!, + email: mapValueOfType(json, r'email')!, + password: mapValueOfType(json, r'password')!, + lastName: mapValueOfType(json, r'lastName')!, + token: mapValueOfType(json, r'token')!, + instanceId: mapValueOfType(json, r'instanceId')!, firstName: mapValueOfType(json, r'firstName'), - lastName: mapValueOfType(json, r'lastName'), - token: mapValueOfType(json, r'token'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - instanceId: mapValueOfType(json, r'instanceId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -176,13 +160,19 @@ class User { } // maps a json object with a list of User-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = User.listFromJson(entry.value, growable: growable,); + map[entry.key] = User.listFromJson( + entry.value, + growable: growable, + ); } } return map; @@ -190,6 +180,11 @@ class User { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'id', + 'email', + 'password', + 'lastName', + 'token', + 'instanceId', }; } - diff --git a/manager_api/lib/model/user_detail_dto.dart b/manager_api_new/lib/model/user_detail_dto.dart similarity index 66% rename from manager_api/lib/model/user_detail_dto.dart rename to manager_api_new/lib/model/user_detail_dto.dart index d0ce9cf..fb48547 100644 --- a/manager_api/lib/model/user_detail_dto.dart +++ b/manager_api_new/lib/model/user_detail_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,6 +17,7 @@ class UserDetailDTO { this.email, this.firstName, this.lastName, + this.instanceId, }); String? id; @@ -27,23 +28,30 @@ class UserDetailDTO { String? lastName; + String? instanceId; + @override - bool operator ==(Object other) => identical(this, other) || other is UserDetailDTO && - other.id == id && - other.email == email && - other.firstName == firstName && - other.lastName == lastName; + bool operator ==(Object other) => + identical(this, other) || + other is UserDetailDTO && + other.id == id && + other.email == email && + other.firstName == firstName && + other.lastName == lastName && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; + String toString() => + 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -67,6 +75,11 @@ class UserDetailDTO { } else { json[r'lastName'] = null; } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } return json; } @@ -82,8 +95,10 @@ class UserDetailDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "UserDetailDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "UserDetailDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "UserDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "UserDetailDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -93,12 +108,16 @@ class UserDetailDTO { email: mapValueOfType(json, r'email'), firstName: mapValueOfType(json, r'firstName'), lastName: mapValueOfType(json, r'lastName'), + instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -126,20 +145,24 @@ class UserDetailDTO { } // maps a json object with a list of UserDetailDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = UserDetailDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = UserDetailDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/video_dto.dart b/manager_api_new/lib/model/video_dto.dart new file mode 100644 index 0000000..8cf9e0c --- /dev/null +++ b/manager_api_new/lib/model/video_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VideoDTO { + /// Returns a new [VideoDTO] instance. + VideoDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.source_, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? source_; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is VideoDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => + 'VideoDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, source_=$source_]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; + } + return json; + } + + /// Returns a new [VideoDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VideoDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "VideoDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "VideoDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VideoDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + source_: mapValueOfType(json, r'source'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VideoDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VideoDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VideoDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VideoDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/weather_dto.dart b/manager_api_new/lib/model/weather_dto.dart new file mode 100644 index 0000000..342a85c --- /dev/null +++ b/manager_api_new/lib/model/weather_dto.dart @@ -0,0 +1,368 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeatherDTO { + /// Returns a new [WeatherDTO] instance. + WeatherDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.city, + this.updatedDate, + this.result, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? city; + + DateTime? updatedDate; + + String? result; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is WeatherDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.city == city && + other.updatedDate == updatedDate && + other.result == result; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (city == null ? 0 : city!.hashCode) + + (updatedDate == null ? 0 : updatedDate!.hashCode) + + (result == null ? 0 : result!.hashCode); + + @override + String toString() => + 'WeatherDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, city=$city, updatedDate=$updatedDate, result=$result]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.city != null) { + json[r'city'] = this.city; + } else { + json[r'city'] = null; + } + if (this.updatedDate != null) { + json[r'updatedDate'] = this.updatedDate!.toUtc().toIso8601String(); + } else { + json[r'updatedDate'] = null; + } + if (this.result != null) { + json[r'result'] = this.result; + } else { + json[r'result'] = null; + } + return json; + } + + /// Returns a new [WeatherDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeatherDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "WeatherDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "WeatherDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeatherDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + city: mapValueOfType(json, r'city'), + updatedDate: mapDateTime(json, r'updatedDate', r''), + result: mapValueOfType(json, r'result'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeatherDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeatherDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeatherDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeatherDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/web_dto.dart b/manager_api_new/lib/model/web_dto.dart new file mode 100644 index 0000000..1189110 --- /dev/null +++ b/manager_api_new/lib/model/web_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WebDTO { + /// Returns a new [WebDTO] instance. + WebDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.source_, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? source_; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is WebDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => + 'WebDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, source_=$source_]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; + } + return json; + } + + /// Returns a new [WebDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WebDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "WebDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "WebDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WebDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + source_: mapValueOfType(json, r'source'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WebDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WebDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WebDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WebDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/pubspec.yaml b/manager_api_new/pubspec.yaml new file mode 100644 index 0000000..1da4fa4 --- /dev/null +++ b/manager_api_new/pubspec.yaml @@ -0,0 +1,17 @@ +# +# AUTO-GENERATED FILE, DO NOT MODIFY! +# + +name: 'manager_api_new' +version: '1.0.0' +description: 'OpenAPI API client' +homepage: 'homepage' +environment: + sdk: '>=2.12.0 <4.0.0' +dependencies: + collection: '>=1.17.0 <2.0.0' + http: '>=0.13.0 <2.0.0' + intl: any + meta: '>=1.1.8 <2.0.0' +dev_dependencies: + test: '>=1.21.6 <1.22.0' diff --git a/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart b/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart new file mode 100644 index 0000000..a37da45 --- /dev/null +++ b/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for AgendaDTOAllOfAgendaMapProvider +void main() { + // final instance = AgendaDTOAllOfAgendaMapProvider(); + + group('test AgendaDTOAllOfAgendaMapProvider', () {}); +} diff --git a/manager_api/test/agenda_dto_test.dart b/manager_api_new/test/agenda_dto_test.dart similarity index 77% rename from manager_api/test/agenda_dto_test.dart rename to manager_api_new/test/agenda_dto_test.dart index 60aa589..21a544e 100644 --- a/manager_api/test/agenda_dto_test.dart +++ b/manager_api_new/test/agenda_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for AgendaDTO @@ -16,12 +16,9 @@ void main() { // final instance = AgendaDTO(); group('test AgendaDTO', () { - // String source_ - test('to test the property `source_`', () async { + // String resourceId + test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/article_dto_test.dart b/manager_api_new/test/article_dto_test.dart similarity index 88% rename from manager_api/test/article_dto_test.dart rename to manager_api_new/test/article_dto_test.dart index 7be3235..a8dcca3 100644 --- a/manager_api/test/article_dto_test.dart +++ b/manager_api_new/test/article_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ArticleDTO @@ -21,6 +21,11 @@ void main() { // TODO }); + // String qrCode + test('to test the property `qrCode`', () async { + // TODO + }); + // bool isContentTop test('to test the property `isContentTop`', () async { // TODO @@ -40,8 +45,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/authentication_api_test.dart b/manager_api_new/test/authentication_api_test.dart similarity index 95% rename from manager_api/test/authentication_api_test.dart rename to manager_api_new/test/authentication_api_test.dart index ef083f1..0d16e2a 100644 --- a/manager_api/test/authentication_api_test.dart +++ b/manager_api_new/test/authentication_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for AuthenticationApi void main() { // final instance = AuthenticationApi(); @@ -26,6 +25,5 @@ void main() { test('test authenticationAuthenticateWithJson', () async { // TODO }); - }); } diff --git a/manager_api/test/categorie_dto_test.dart b/manager_api_new/test/categorie_dto_test.dart similarity index 93% rename from manager_api/test/categorie_dto_test.dart rename to manager_api_new/test/categorie_dto_test.dart index 4c81425..43d8523 100644 --- a/manager_api/test/categorie_dto_test.dart +++ b/manager_api_new/test/categorie_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for CategorieDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/configuration_api_test.dart b/manager_api_new/test/configuration_api_test.dart similarity index 97% rename from manager_api/test/configuration_api_test.dart rename to manager_api_new/test/configuration_api_test.dart index 4844853..0146ce3 100644 --- a/manager_api/test/configuration_api_test.dart +++ b/manager_api_new/test/configuration_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for ConfigurationApi void main() { // final instance = ConfigurationApi(); @@ -51,6 +50,5 @@ void main() { test('test configurationUpdate', () async { // TODO }); - }); } diff --git a/manager_api/test/configuration_dto_test.dart b/manager_api_new/test/configuration_dto_test.dart similarity index 97% rename from manager_api/test/configuration_dto_test.dart rename to manager_api_new/test/configuration_dto_test.dart index 5c4461f..7c2cbe4 100644 --- a/manager_api/test/configuration_dto_test.dart +++ b/manager_api_new/test/configuration_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ConfigurationDTO @@ -80,8 +80,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/content_dto_resource_test.dart b/manager_api_new/test/content_dto_resource_test.dart new file mode 100644 index 0000000..1a1000c --- /dev/null +++ b/manager_api_new/test/content_dto_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for ContentDTOResource +void main() { + // final instance = ContentDTOResource(); + + group('test ContentDTOResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/content_dto_test.dart b/manager_api_new/test/content_dto_test.dart similarity index 96% rename from manager_api/test/content_dto_test.dart rename to manager_api_new/test/content_dto_test.dart index 99e909b..41ccfb6 100644 --- a/manager_api/test/content_dto_test.dart +++ b/manager_api_new/test/content_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ContentDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `resourceType`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/content_geo_point_test.dart b/manager_api_new/test/content_geo_point_test.dart similarity index 95% rename from manager_api/test/content_geo_point_test.dart rename to manager_api_new/test/content_geo_point_test.dart index b24df45..976901c 100644 --- a/manager_api/test/content_geo_point_test.dart +++ b/manager_api_new/test/content_geo_point_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ContentGeoPoint @@ -35,8 +35,5 @@ void main() { test('to test the property `latitude`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_api_test.dart b/manager_api_new/test/device_api_test.dart similarity index 96% rename from manager_api/test/device_api_test.dart rename to manager_api_new/test/device_api_test.dart index acdb174..8cf1066 100644 --- a/manager_api/test/device_api_test.dart +++ b/manager_api_new/test/device_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for DeviceApi void main() { // final instance = DeviceApi(); @@ -46,6 +45,5 @@ void main() { test('test deviceUpdateMainInfos', () async { // TODO }); - }); } diff --git a/manager_api/test/device_detail_dto_all_of_test.dart b/manager_api_new/test/device_detail_dto_all_of_test.dart similarity index 95% rename from manager_api/test/device_detail_dto_all_of_test.dart rename to manager_api_new/test/device_detail_dto_all_of_test.dart index 9839d16..0fb3beb 100644 --- a/manager_api/test/device_detail_dto_all_of_test.dart +++ b/manager_api_new/test/device_detail_dto_all_of_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTOAllOf @@ -35,8 +35,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_detail_dto_test.dart b/manager_api_new/test/device_detail_dto_test.dart similarity index 97% rename from manager_api/test/device_detail_dto_test.dart rename to manager_api_new/test/device_detail_dto_test.dart index 9732639..20ff017 100644 --- a/manager_api/test/device_detail_dto_test.dart +++ b/manager_api_new/test/device_detail_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTO @@ -90,8 +90,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_dto_test.dart b/manager_api_new/test/device_dto_test.dart similarity index 97% rename from manager_api/test/device_dto_test.dart rename to manager_api_new/test/device_dto_test.dart index 7e02aa0..d854620 100644 --- a/manager_api/test/device_dto_test.dart +++ b/manager_api_new/test/device_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDTO @@ -70,8 +70,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/export_configuration_dto_all_of_test.dart b/manager_api_new/test/export_configuration_dto_all_of_test.dart similarity index 94% rename from manager_api/test/export_configuration_dto_all_of_test.dart rename to manager_api_new/test/export_configuration_dto_all_of_test.dart index 5967e3f..f80ca79 100644 --- a/manager_api/test/export_configuration_dto_all_of_test.dart +++ b/manager_api_new/test/export_configuration_dto_all_of_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTOAllOf @@ -25,8 +25,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/export_configuration_dto_test.dart b/manager_api_new/test/export_configuration_dto_test.dart similarity index 98% rename from manager_api/test/export_configuration_dto_test.dart rename to manager_api_new/test/export_configuration_dto_test.dart index 222334d..ce0a09c 100644 --- a/manager_api/test/export_configuration_dto_test.dart +++ b/manager_api_new/test/export_configuration_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTO @@ -90,8 +90,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/geo_point_dto_categorie_test.dart b/manager_api_new/test/geo_point_dto_categorie_test.dart similarity index 93% rename from manager_api/test/geo_point_dto_categorie_test.dart rename to manager_api_new/test/geo_point_dto_categorie_test.dart index 03c380e..a1c9d4b 100644 --- a/manager_api/test/geo_point_dto_categorie_test.dart +++ b/manager_api_new/test/geo_point_dto_categorie_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for GeoPointDTOCategorie @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/geo_point_dto_test.dart b/manager_api_new/test/geo_point_dto_test.dart similarity index 96% rename from manager_api/test/geo_point_dto_test.dart rename to manager_api_new/test/geo_point_dto_test.dart index b04737e..36a4653 100644 --- a/manager_api/test/geo_point_dto_test.dart +++ b/manager_api_new/test/geo_point_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for GeoPointDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `longitude`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/geo_point_section_map_test.dart b/manager_api_new/test/geo_point_section_map_test.dart new file mode 100644 index 0000000..4f80ed1 --- /dev/null +++ b/manager_api_new/test/geo_point_section_map_test.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for GeoPointSectionMap +void main() { + // final instance = GeoPointSectionMap(); + + group('test GeoPointSectionMap', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List mapCategories (default value: const []) + test('to test the property `mapCategories`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // int mapZoom + test('to test the property `mapZoom`', () async { + // TODO + }); + + // SectionMapAllOfMapMapType mapMapType + test('to test the property `mapMapType`', () async { + // TODO + }); + + // SectionMapAllOfMapTypeMapbox mapTypeMapbox + test('to test the property `mapTypeMapbox`', () async { + // TODO + }); + + // SectionMapAllOfMapMapProvider mapMapProvider + test('to test the property `mapMapProvider`', () async { + // TODO + }); + + // List mapPoints (default value: const []) + test('to test the property `mapPoints`', () async { + // TODO + }); + + // String mapResourceId + test('to test the property `mapResourceId`', () async { + // TODO + }); + + // SectionMapAllOfMapResource mapResource + test('to test the property `mapResource`', () async { + // TODO + }); + + // String mapCenterLatitude + test('to test the property `mapCenterLatitude`', () async { + // TODO + }); + + // String mapCenterLongitude + test('to test the property `mapCenterLongitude`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/geo_point_test.dart b/manager_api_new/test/geo_point_test.dart new file mode 100644 index 0000000..27900b9 --- /dev/null +++ b/manager_api_new/test/geo_point_test.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for GeoPoint +void main() { + // final instance = GeoPoint(); + + group('test GeoPoint', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // List contents (default value: const []) + test('to test the property `contents`', () async { + // TODO + }); + + // List schedules (default value: const []) + test('to test the property `schedules`', () async { + // TODO + }); + + // List prices (default value: const []) + test('to test the property `prices`', () async { + // TODO + }); + + // List phone (default value: const []) + test('to test the property `phone`', () async { + // TODO + }); + + // List email (default value: const []) + test('to test the property `email`', () async { + // TODO + }); + + // List site (default value: const []) + test('to test the property `site`', () async { + // TODO + }); + + // int categorieId + test('to test the property `categorieId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // String imageResourceId + test('to test the property `imageResourceId`', () async { + // TODO + }); + + // String imageUrl + test('to test the property `imageUrl`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/image_dto_test.dart b/manager_api_new/test/image_dto_test.dart similarity index 95% rename from manager_api/test/image_dto_test.dart rename to manager_api_new/test/image_dto_test.dart index 01be4eb..b1eb80c 100644 --- a/manager_api/test/image_dto_test.dart +++ b/manager_api_new/test/image_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/image_geo_point_test.dart b/manager_api_new/test/image_geo_point_test.dart similarity index 93% rename from manager_api/test/image_geo_point_test.dart rename to manager_api_new/test/image_geo_point_test.dart index 58988c5..43b3852 100644 --- a/manager_api/test/image_geo_point_test.dart +++ b/manager_api_new/test/image_geo_point_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageGeoPoint @@ -25,8 +25,5 @@ void main() { test('to test the property `imageSource`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/instance_api_test.dart b/manager_api_new/test/instance_api_test.dart similarity index 96% rename from manager_api/test/instance_api_test.dart rename to manager_api_new/test/instance_api_test.dart index d603922..78bdf14 100644 --- a/manager_api/test/instance_api_test.dart +++ b/manager_api_new/test/instance_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for InstanceApi void main() { // final instance = InstanceApi(); @@ -41,6 +40,5 @@ void main() { test('test instanceUpdateinstance', () async { // TODO }); - }); } diff --git a/manager_api/test/instance_dto_test.dart b/manager_api_new/test/instance_dto_test.dart similarity index 94% rename from manager_api/test/instance_dto_test.dart rename to manager_api_new/test/instance_dto_test.dart index e8c6878..745777f 100644 --- a/manager_api/test/instance_dto_test.dart +++ b/manager_api_new/test/instance_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for InstanceDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/instance_test.dart b/manager_api_new/test/instance_test.dart similarity index 94% rename from manager_api/test/instance_test.dart rename to manager_api_new/test/instance_test.dart index 9133f85..8a78243 100644 --- a/manager_api/test/instance_test.dart +++ b/manager_api_new/test/instance_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for Instance @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/level_dto_test.dart b/manager_api_new/test/level_dto_test.dart similarity index 94% rename from manager_api/test/level_dto_test.dart rename to manager_api_new/test/level_dto_test.dart index b75bfe3..bca1bd3 100644 --- a/manager_api/test/level_dto_test.dart +++ b/manager_api_new/test/level_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LevelDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/login_dto_test.dart b/manager_api_new/test/login_dto_test.dart similarity index 93% rename from manager_api/test/login_dto_test.dart rename to manager_api_new/test/login_dto_test.dart index cc59980..5b39eaf 100644 --- a/manager_api/test/login_dto_test.dart +++ b/manager_api_new/test/login_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LoginDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `password`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/map_dto_all_of_map_provider_test.dart b/manager_api_new/test/map_dto_all_of_map_provider_test.dart new file mode 100644 index 0000000..499cd8d --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapProvider +void main() { + // final instance = MapDTOAllOfMapProvider(); + + group('test MapDTOAllOfMapProvider', () {}); +} diff --git a/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart b/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart new file mode 100644 index 0000000..54c03d4 --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapTypeMapbox +void main() { + // final instance = MapDTOAllOfMapTypeMapbox(); + + group('test MapDTOAllOfMapTypeMapbox', () {}); +} diff --git a/manager_api_new/test/map_dto_all_of_map_type_test.dart b/manager_api_new/test/map_dto_all_of_map_type_test.dart new file mode 100644 index 0000000..9384293 --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapType +void main() { + // final instance = MapDTOAllOfMapType(); + + group('test MapDTOAllOfMapType', () {}); +} diff --git a/manager_api/test/map_dto_map_provider_test.dart b/manager_api_new/test/map_dto_map_provider_test.dart similarity index 82% rename from manager_api/test/map_dto_map_provider_test.dart rename to manager_api_new/test/map_dto_map_provider_test.dart index 59fba41..fa2f46d 100644 --- a/manager_api/test/map_dto_map_provider_test.dart +++ b/manager_api_new/test/map_dto_map_provider_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapProvider void main() { // final instance = MapDTOMapProvider(); - group('test MapDTOMapProvider', () { - - }); - + group('test MapDTOMapProvider', () {}); } diff --git a/manager_api/test/map_dto_map_type_mapbox_test.dart b/manager_api_new/test/map_dto_map_type_mapbox_test.dart similarity index 81% rename from manager_api/test/map_dto_map_type_mapbox_test.dart rename to manager_api_new/test/map_dto_map_type_mapbox_test.dart index 163b689..8d50d5d 100644 --- a/manager_api/test/map_dto_map_type_mapbox_test.dart +++ b/manager_api_new/test/map_dto_map_type_mapbox_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapTypeMapbox void main() { // final instance = MapDTOMapTypeMapbox(); - group('test MapDTOMapTypeMapbox', () { - - }); - + group('test MapDTOMapTypeMapbox', () {}); } diff --git a/manager_api/test/map_dto_map_type_test.dart b/manager_api_new/test/map_dto_map_type_test.dart similarity index 82% rename from manager_api/test/map_dto_map_type_test.dart rename to manager_api_new/test/map_dto_map_type_test.dart index 2856e00..f6b4cc3 100644 --- a/manager_api/test/map_dto_map_type_test.dart +++ b/manager_api_new/test/map_dto_map_type_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapType void main() { // final instance = MapDTOMapType(); - group('test MapDTOMapType', () { - - }); - + group('test MapDTOMapType', () {}); } diff --git a/manager_api/test/map_dto_test.dart b/manager_api_new/test/map_dto_test.dart similarity index 95% rename from manager_api/test/map_dto_test.dart rename to manager_api_new/test/map_dto_test.dart index 6045184..46714d5 100644 --- a/manager_api/test/map_dto_test.dart +++ b/manager_api_new/test/map_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `iconSource`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/map_provider_test.dart b/manager_api_new/test/map_provider_test.dart similarity index 80% rename from manager_api/test/map_provider_test.dart rename to manager_api_new/test/map_provider_test.dart index 3dac549..809db34 100644 --- a/manager_api/test/map_provider_test.dart +++ b/manager_api_new/test/map_provider_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapProvider void main() { - - group('test MapProvider', () { - - }); - + group('test MapProvider', () {}); } diff --git a/manager_api/test/map_type_app_test.dart b/manager_api_new/test/map_type_app_test.dart similarity index 80% rename from manager_api/test/map_type_app_test.dart rename to manager_api_new/test/map_type_app_test.dart index 891c231..b3cf91b 100644 --- a/manager_api/test/map_type_app_test.dart +++ b/manager_api_new/test/map_type_app_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapTypeApp void main() { - - group('test MapTypeApp', () { - - }); - + group('test MapTypeApp', () {}); } diff --git a/manager_api/test/map_type_map_box_test.dart b/manager_api_new/test/map_type_map_box_test.dart similarity index 80% rename from manager_api/test/map_type_map_box_test.dart rename to manager_api_new/test/map_type_map_box_test.dart index b2ce7e4..f5e68b5 100644 --- a/manager_api/test/map_type_map_box_test.dart +++ b/manager_api_new/test/map_type_map_box_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapTypeMapBox void main() { - - group('test MapTypeMapBox', () { - - }); - + group('test MapTypeMapBox', () {}); } diff --git a/manager_api/test/menu_dto_test.dart b/manager_api_new/test/menu_dto_test.dart similarity index 92% rename from manager_api/test/menu_dto_test.dart rename to manager_api_new/test/menu_dto_test.dart index a1233e6..d056934 100644 --- a/manager_api/test/menu_dto_test.dart +++ b/manager_api_new/test/menu_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MenuDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `sections`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/ordered_translation_and_resource_dto_test.dart b/manager_api_new/test/ordered_translation_and_resource_dto_test.dart new file mode 100644 index 0000000..e69f718 --- /dev/null +++ b/manager_api_new/test/ordered_translation_and_resource_dto_test.dart @@ -0,0 +1,29 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for OrderedTranslationAndResourceDTO +void main() { + // final instance = OrderedTranslationAndResourceDTO(); + + group('test OrderedTranslationAndResourceDTO', () { + // List translationAndResourceDTOs (default value: const []) + test('to test the property `translationAndResourceDTOs`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/pdf_dto_test.dart b/manager_api_new/test/pdf_dto_test.dart similarity index 77% rename from manager_api/test/pdf_dto_test.dart rename to manager_api_new/test/pdf_dto_test.dart index 4165d35..8bb540e 100644 --- a/manager_api/test/pdf_dto_test.dart +++ b/manager_api_new/test/pdf_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PdfDTO @@ -16,12 +16,9 @@ void main() { // final instance = PdfDTO(); group('test PdfDTO', () { - // String source_ - test('to test the property `source_`', () async { + // String resourceId + test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/pdf_file_dto_test.dart b/manager_api_new/test/pdf_file_dto_test.dart similarity index 81% rename from manager_api/test/pdf_file_dto_test.dart rename to manager_api_new/test/pdf_file_dto_test.dart index 258f2d5..393189a 100644 --- a/manager_api/test/pdf_file_dto_test.dart +++ b/manager_api_new/test/pdf_file_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PDFFileDTO @@ -20,13 +20,5 @@ void main() { test('to test the property `pdfFilesAndTitles`', () async { // TODO }); - - // int order - test('to test the property `order`', () async { - // TODO - }); - - }); - } diff --git a/manager_api/test/player_message_dto_test.dart b/manager_api_new/test/player_message_dto_test.dart similarity index 93% rename from manager_api/test/player_message_dto_test.dart rename to manager_api_new/test/player_message_dto_test.dart index 08639bf..de37e33 100644 --- a/manager_api/test/player_message_dto_test.dart +++ b/manager_api_new/test/player_message_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PlayerMessageDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `isDeleted`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart b/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart new file mode 100644 index 0000000..872049b --- /dev/null +++ b/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for PuzzleDTOAllOfPuzzleImage +void main() { + // final instance = PuzzleDTOAllOfPuzzleImage(); + + group('test PuzzleDTOAllOfPuzzleImage', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/puzzle_dto_image_test.dart b/manager_api_new/test/puzzle_dto_image_test.dart similarity index 87% rename from manager_api/test/puzzle_dto_image_test.dart rename to manager_api_new/test/puzzle_dto_image_test.dart index 5695e08..7aacc6e 100644 --- a/manager_api/test/puzzle_dto_image_test.dart +++ b/manager_api_new/test/puzzle_dto_image_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PuzzleDTOImage @@ -41,7 +41,9 @@ void main() { // TODO }); - + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); }); - } diff --git a/manager_api/test/puzzle_dto_test.dart b/manager_api_new/test/puzzle_dto_test.dart similarity index 94% rename from manager_api/test/puzzle_dto_test.dart rename to manager_api_new/test/puzzle_dto_test.dart index f6a83f9..7a5948d 100644 --- a/manager_api/test/puzzle_dto_test.dart +++ b/manager_api_new/test/puzzle_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PuzzleDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `image`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/question_dto_image_background_resource_type_test.dart b/manager_api_new/test/question_dto_image_background_resource_type_test.dart new file mode 100644 index 0000000..14b7fe0 --- /dev/null +++ b/manager_api_new/test/question_dto_image_background_resource_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuestionDTOImageBackgroundResourceType +void main() { + // final instance = QuestionDTOImageBackgroundResourceType(); + + group('test QuestionDTOImageBackgroundResourceType', () {}); +} diff --git a/manager_api/test/question_dto_test.dart b/manager_api_new/test/question_dto_test.dart similarity index 95% rename from manager_api/test/question_dto_test.dart rename to manager_api_new/test/question_dto_test.dart index 6f46cbd..2c8e074 100644 --- a/manager_api/test/question_dto_test.dart +++ b/manager_api_new/test/question_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuestionDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/quiz_dto_test.dart b/manager_api_new/test/quiz_dto_test.dart new file mode 100644 index 0000000..fcf449e --- /dev/null +++ b/manager_api_new/test/quiz_dto_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizDTO +void main() { + // final instance = QuizDTO(); + + group('test QuizDTO', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // List questions (default value: const []) + test('to test the property `questions`', () async { + // TODO + }); + + // List badLevel (default value: const []) + test('to test the property `badLevel`', () async { + // TODO + }); + + // List mediumLevel (default value: const []) + test('to test the property `mediumLevel`', () async { + // TODO + }); + + // List goodLevel (default value: const []) + test('to test the property `goodLevel`', () async { + // TODO + }); + + // List greatLevel (default value: const []) + test('to test the property `greatLevel`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_resource_test.dart b/manager_api_new/test/quiz_question_resource_test.dart new file mode 100644 index 0000000..daef4a9 --- /dev/null +++ b/manager_api_new/test/quiz_question_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestionResource +void main() { + // final instance = QuizQuestionResource(); + + group('test QuizQuestionResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_section_quiz_test.dart b/manager_api_new/test/quiz_question_section_quiz_test.dart new file mode 100644 index 0000000..5f47a87 --- /dev/null +++ b/manager_api_new/test/quiz_question_section_quiz_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestionSectionQuiz +void main() { + // final instance = QuizQuestionSectionQuiz(); + + group('test QuizQuestionSectionQuiz', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List quizQuestions (default value: const []) + test('to test the property `quizQuestions`', () async { + // TODO + }); + + // List quizBadLevel (default value: const []) + test('to test the property `quizBadLevel`', () async { + // TODO + }); + + // List quizMediumLevel (default value: const []) + test('to test the property `quizMediumLevel`', () async { + // TODO + }); + + // List quizGoodLevel (default value: const []) + test('to test the property `quizGoodLevel`', () async { + // TODO + }); + + // List quizGreatLevel (default value: const []) + test('to test the property `quizGreatLevel`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_test.dart b/manager_api_new/test/quiz_question_test.dart new file mode 100644 index 0000000..df28dd9 --- /dev/null +++ b/manager_api_new/test/quiz_question_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestion +void main() { + // final instance = QuizQuestion(); + + group('test QuizQuestion', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // List label (default value: const []) + test('to test the property `label`', () async { + // TODO + }); + + // List responses (default value: const []) + test('to test the property `responses`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // QuizQuestionResource resource + test('to test the property `resource`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/quizz_dto_bad_level_test.dart b/manager_api_new/test/quizz_dto_bad_level_test.dart similarity index 94% rename from manager_api/test/quizz_dto_bad_level_test.dart rename to manager_api_new/test/quizz_dto_bad_level_test.dart index 9055db6..46b452c 100644 --- a/manager_api/test/quizz_dto_bad_level_test.dart +++ b/manager_api_new/test/quizz_dto_bad_level_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuizzDTOBadLevel @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/quizz_dto_test.dart b/manager_api_new/test/quizz_dto_test.dart similarity index 95% rename from manager_api/test/quizz_dto_test.dart rename to manager_api_new/test/quizz_dto_test.dart index 837e987..765440b 100644 --- a/manager_api/test/quizz_dto_test.dart +++ b/manager_api_new/test/quizz_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuizzDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `greatLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/resource_api_test.dart b/manager_api_new/test/resource_api_test.dart similarity index 97% rename from manager_api/test/resource_api_test.dart rename to manager_api_new/test/resource_api_test.dart index b28bd40..64baaf7 100644 --- a/manager_api/test/resource_api_test.dart +++ b/manager_api_new/test/resource_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for ResourceApi void main() { // final instance = ResourceApi(); @@ -51,6 +50,5 @@ void main() { test('test resourceUpload', () async { // TODO }); - }); } diff --git a/manager_api/test/resource_dto_test.dart b/manager_api_new/test/resource_dto_test.dart similarity index 95% rename from manager_api/test/resource_dto_test.dart rename to manager_api_new/test/resource_dto_test.dart index 5943a30..18ba5df 100644 --- a/manager_api/test/resource_dto_test.dart +++ b/manager_api_new/test/resource_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResourceDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/resource_test.dart b/manager_api_new/test/resource_test.dart new file mode 100644 index 0000000..f85fd02 --- /dev/null +++ b/manager_api_new/test/resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for Resource +void main() { + // final instance = Resource(); + + group('test Resource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/resource_type_test.dart b/manager_api_new/test/resource_type_test.dart similarity index 80% rename from manager_api/test/resource_type_test.dart rename to manager_api_new/test/resource_type_test.dart index 9315f53..db9ec15 100644 --- a/manager_api/test/resource_type_test.dart +++ b/manager_api_new/test/resource_type_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResourceType void main() { - - group('test ResourceType', () { - - }); - + group('test ResourceType', () {}); } diff --git a/manager_api/test/response_dto_test.dart b/manager_api_new/test/response_dto_test.dart similarity index 94% rename from manager_api/test/response_dto_test.dart rename to manager_api_new/test/response_dto_test.dart index bb1b970..3459297 100644 --- a/manager_api/test/response_dto_test.dart +++ b/manager_api_new/test/response_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResponseDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/section_api_test.dart b/manager_api_new/test/section_api_test.dart similarity index 98% rename from manager_api/test/section_api_test.dart rename to manager_api_new/test/section_api_test.dart index 0d98fba..71623d5 100644 --- a/manager_api/test/section_api_test.dart +++ b/manager_api_new/test/section_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for SectionApi void main() { // final instance = SectionApi(); @@ -101,6 +100,5 @@ void main() { test('test sectionUpdateOrder', () async { // TODO }); - }); } diff --git a/manager_api/test/section_dto_test.dart b/manager_api_new/test/section_dto_test.dart similarity index 77% rename from manager_api/test/section_dto_test.dart rename to manager_api_new/test/section_dto_test.dart index 5c6177e..8400519 100644 --- a/manager_api/test/section_dto_test.dart +++ b/manager_api_new/test/section_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionDTO @@ -85,33 +85,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - // String latitude - test('to test the property `latitude`', () async { - // TODO - }); - - // String longitude - test('to test the property `longitude`', () async { - // TODO - }); - - // int meterZoneGPS - test('to test the property `meterZoneGPS`', () async { - // TODO - }); - - // bool isBeacon - test('to test the property `isBeacon`', () async { - // TODO - }); - - // String beaconId - test('to test the property `beaconId`', () async { - // TODO - }); - - }); - } diff --git a/manager_api_new/test/section_map_all_of_map_map_provider_test.dart b/manager_api_new/test/section_map_all_of_map_map_provider_test.dart new file mode 100644 index 0000000..ad07407 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapMapProvider +void main() { + // final instance = SectionMapAllOfMapMapProvider(); + + group('test SectionMapAllOfMapMapProvider', () {}); +} diff --git a/manager_api_new/test/section_map_all_of_map_map_type_test.dart b/manager_api_new/test/section_map_all_of_map_map_type_test.dart new file mode 100644 index 0000000..da26fa4 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_map_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapMapType +void main() { + // final instance = SectionMapAllOfMapMapType(); + + group('test SectionMapAllOfMapMapType', () {}); +} diff --git a/manager_api_new/test/section_map_all_of_map_resource_test.dart b/manager_api_new/test/section_map_all_of_map_resource_test.dart new file mode 100644 index 0000000..20067cb --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapResource +void main() { + // final instance = SectionMapAllOfMapResource(); + + group('test SectionMapAllOfMapResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart b/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart new file mode 100644 index 0000000..f715967 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapTypeMapbox +void main() { + // final instance = SectionMapAllOfMapTypeMapbox(); + + group('test SectionMapAllOfMapTypeMapbox', () {}); +} diff --git a/manager_api_new/test/section_map_api_test.dart b/manager_api_new/test/section_map_api_test.dart new file mode 100644 index 0000000..b7de8ed --- /dev/null +++ b/manager_api_new/test/section_map_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +/// tests for SectionMapApi +void main() { + // final instance = SectionMapApi(); + + group('tests for SectionMapApi', () { + //Future sectionMapCreate(String sectionId, GeoPointDTO geoPointDTO) async + test('test sectionMapCreate', () async { + // TODO + }); + + //Future sectionMapDelete(int geoPointId) async + test('test sectionMapDelete', () async { + // TODO + }); + + //Future> sectionMapGetAllGeoPointsFromSection(String sectionId) async + test('test sectionMapGetAllGeoPointsFromSection', () async { + // TODO + }); + + //Future sectionMapUpdate(GeoPointDTO geoPointDTO) async + test('test sectionMapUpdate', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_map_test.dart b/manager_api_new/test/section_map_test.dart new file mode 100644 index 0000000..72f7812 --- /dev/null +++ b/manager_api_new/test/section_map_test.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMap +void main() { + // final instance = SectionMap(); + + group('test SectionMap', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List mapCategories (default value: const []) + test('to test the property `mapCategories`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // int mapZoom + test('to test the property `mapZoom`', () async { + // TODO + }); + + // SectionMapAllOfMapMapType mapMapType + test('to test the property `mapMapType`', () async { + // TODO + }); + + // SectionMapAllOfMapTypeMapbox mapTypeMapbox + test('to test the property `mapTypeMapbox`', () async { + // TODO + }); + + // SectionMapAllOfMapMapProvider mapMapProvider + test('to test the property `mapMapProvider`', () async { + // TODO + }); + + // List mapPoints (default value: const []) + test('to test the property `mapPoints`', () async { + // TODO + }); + + // String mapResourceId + test('to test the property `mapResourceId`', () async { + // TODO + }); + + // SectionMapAllOfMapResource mapResource + test('to test the property `mapResource`', () async { + // TODO + }); + + // String mapCenterLatitude + test('to test the property `mapCenterLatitude`', () async { + // TODO + }); + + // String mapCenterLongitude + test('to test the property `mapCenterLongitude`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_quiz_api_test.dart b/manager_api_new/test/section_quiz_api_test.dart new file mode 100644 index 0000000..d14cf12 --- /dev/null +++ b/manager_api_new/test/section_quiz_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +/// tests for SectionQuizApi +void main() { + // final instance = SectionQuizApi(); + + group('tests for SectionQuizApi', () { + //Future sectionQuizCreate(String sectionId, QuestionDTO questionDTO) async + test('test sectionQuizCreate', () async { + // TODO + }); + + //Future sectionQuizDelete(int quizQuestionId) async + test('test sectionQuizDelete', () async { + // TODO + }); + + //Future> sectionQuizGetAllQuizQuestionFromSection(String sectionId) async + test('test sectionQuizGetAllQuizQuestionFromSection', () async { + // TODO + }); + + //Future sectionQuizUpdate(QuestionDTO questionDTO) async + test('test sectionQuizUpdate', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_quiz_test.dart b/manager_api_new/test/section_quiz_test.dart new file mode 100644 index 0000000..4712839 --- /dev/null +++ b/manager_api_new/test/section_quiz_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionQuiz +void main() { + // final instance = SectionQuiz(); + + group('test SectionQuiz', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List quizQuestions (default value: const []) + test('to test the property `quizQuestions`', () async { + // TODO + }); + + // List quizBadLevel (default value: const []) + test('to test the property `quizBadLevel`', () async { + // TODO + }); + + // List quizMediumLevel (default value: const []) + test('to test the property `quizMediumLevel`', () async { + // TODO + }); + + // List quizGoodLevel (default value: const []) + test('to test the property `quizGoodLevel`', () async { + // TODO + }); + + // List quizGreatLevel (default value: const []) + test('to test the property `quizGreatLevel`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_test.dart b/manager_api_new/test/section_test.dart new file mode 100644 index 0000000..73d3667 --- /dev/null +++ b/manager_api_new/test/section_test.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for Section +void main() { + // final instance = Section(); + + group('test Section', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/section_type_test.dart b/manager_api_new/test/section_type_test.dart similarity index 80% rename from manager_api/test/section_type_test.dart rename to manager_api_new/test/section_type_test.dart index 0a2e8ee..31c1f85 100644 --- a/manager_api/test/section_type_test.dart +++ b/manager_api_new/test/section_type_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionType void main() { - - group('test SectionType', () { - - }); - + group('test SectionType', () {}); } diff --git a/manager_api/test/slider_dto_test.dart b/manager_api_new/test/slider_dto_test.dart similarity index 92% rename from manager_api/test/slider_dto_test.dart rename to manager_api_new/test/slider_dto_test.dart index 3a67b30..7625d8f 100644 --- a/manager_api/test/slider_dto_test.dart +++ b/manager_api_new/test/slider_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SliderDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/token_dto_test.dart b/manager_api_new/test/token_dto_test.dart similarity index 96% rename from manager_api/test/token_dto_test.dart rename to manager_api_new/test/token_dto_test.dart index 6b83f0b..7c69682 100644 --- a/manager_api/test/token_dto_test.dart +++ b/manager_api_new/test/token_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TokenDTO @@ -50,8 +50,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/translation_and_resource_dto_test.dart b/manager_api_new/test/translation_and_resource_dto_test.dart similarity index 95% rename from manager_api/test/translation_and_resource_dto_test.dart rename to manager_api_new/test/translation_and_resource_dto_test.dart index 9eccea6..58ca673 100644 --- a/manager_api/test/translation_and_resource_dto_test.dart +++ b/manager_api_new/test/translation_and_resource_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TranslationAndResourceDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `resourceUrl`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/translation_dto_test.dart b/manager_api_new/test/translation_dto_test.dart similarity index 93% rename from manager_api/test/translation_dto_test.dart rename to manager_api_new/test/translation_dto_test.dart index 44f45c2..2f54b36 100644 --- a/manager_api/test/translation_dto_test.dart +++ b/manager_api_new/test/translation_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TranslationDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `value`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/user_api_test.dart b/manager_api_new/test/user_api_test.dart similarity index 95% rename from manager_api/test/user_api_test.dart rename to manager_api_new/test/user_api_test.dart index dd6ecc2..4e866ff 100644 --- a/manager_api/test/user_api_test.dart +++ b/manager_api_new/test/user_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for UserApi void main() { // final instance = UserApi(); @@ -41,6 +40,5 @@ void main() { test('test userUpdateUser', () async { // TODO }); - }); } diff --git a/manager_api/test/user_detail_dto_test.dart b/manager_api_new/test/user_detail_dto_test.dart similarity index 94% rename from manager_api/test/user_detail_dto_test.dart rename to manager_api_new/test/user_detail_dto_test.dart index a8b4bd9..56efe08 100644 --- a/manager_api/test/user_detail_dto_test.dart +++ b/manager_api_new/test/user_detail_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for UserDetailDTO @@ -35,8 +35,5 @@ void main() { test('to test the property `lastName`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/user_test.dart b/manager_api_new/test/user_test.dart similarity index 96% rename from manager_api/test/user_test.dart rename to manager_api_new/test/user_test.dart index a80a97d..ce9fb95 100644 --- a/manager_api/test/user_test.dart +++ b/manager_api_new/test/user_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for User @@ -55,8 +55,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/video_dto_test.dart b/manager_api_new/test/video_dto_test.dart similarity index 92% rename from manager_api/test/video_dto_test.dart rename to manager_api_new/test/video_dto_test.dart index 298cf4d..dc86b92 100644 --- a/manager_api/test/video_dto_test.dart +++ b/manager_api_new/test/video_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for VideoDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/weather_dto_test.dart b/manager_api_new/test/weather_dto_test.dart similarity index 94% rename from manager_api/test/weather_dto_test.dart rename to manager_api_new/test/weather_dto_test.dart index dabee61..43cb003 100644 --- a/manager_api/test/weather_dto_test.dart +++ b/manager_api_new/test/weather_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for WeatherDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `result`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/web_dto_test.dart b/manager_api_new/test/web_dto_test.dart similarity index 92% rename from manager_api/test/web_dto_test.dart rename to manager_api_new/test/web_dto_test.dart index d3b4bec..9479441 100644 --- a/manager_api/test/web_dto_test.dart +++ b/manager_api_new/test/web_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for WebDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/pubspec.lock b/pubspec.lock index 8622058..ade4c98 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -17,6 +17,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.4.1" + ar_flutter_plugin: + dependency: "direct main" + description: + name: ar_flutter_plugin + sha256: "52b6b2ccec4b624ca3fb8d7cc68128f11126580b412c3da2da82c41ddfd6d6ae" + url: "https://pub.dev" + source: hosted + version: "0.7.3" args: dependency: transitive description: @@ -417,10 +425,58 @@ packages: dependency: transitive description: name: fwfh_webview - sha256: f67890bc0d6278da98bd197469ae9511c859f7db327e92299fe0ea0cf46c4057 + sha256: "894aa7d98ebdc2d86d79ac2309173043dec7f102575de87bf9626ddb26104e49" url: "https://pub.dev" source: hosted - version: "0.15.2" + version: "0.15.4" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + url: "https://pub.dev" + source: hosted + version: "9.0.2" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: c4ecead17985ede9634f21500072edfcb3dba0ef7b97f8d7bc556d2d722b3ba3 + url: "https://pub.dev" + source: hosted + version: "2.3.9" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "4f4218f122a6978d0ad655fa3541eea74c67417440b09f0657238810d5af6bdc" + url: "https://pub.dev" + source: hosted + version: "0.1.3" get: dependency: "direct main" description: @@ -581,10 +637,10 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - manager_api: + manager_api_new: dependency: "direct main" description: - path: manager_api + path: manager_api_new relative: true source: path version: "1.0.0" @@ -752,50 +808,42 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" + sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5 url: "https://pub.dev" source: hosted - version: "11.3.1" + version: "10.4.5" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 + sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47" url: "https://pub.dev" source: hosted - version: "12.0.7" + version: "10.3.6" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" url: "https://pub.dev" source: hosted - version: "9.4.5" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" - url: "https://pub.dev" - source: hosted - version: "0.1.1" + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "3.12.0" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.1.3" petitparser: dependency: transitive description: @@ -1266,21 +1314,21 @@ packages: source: hosted version: "3.0.0" webview_flutter: - dependency: transitive + dependency: "direct main" description: name: webview_flutter - sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522" + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.10.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: f42447ca49523f11d8f70abea55ea211b3cafe172dd7a0e7ac007bb35dd356dc + sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713" url: "https://pub.dev" source: hosted - version: "3.16.4" + version: "4.3.2" webview_flutter_platform_interface: dependency: transitive description: @@ -1293,10 +1341,10 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "7affdf9d680c015b11587181171d3cad8093e449db1f7d9f0f08f4f33d24f9a0" + sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893 url: "https://pub.dev" source: hosted - version: "3.13.1" + version: "3.18.2" win32: dependency: transitive description: @@ -1330,5 +1378,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 18e8d08..e41f141 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,9 +44,11 @@ dependencies: #audioplayers: ^2.0.0 just_audio: ^0.9.38 get: ^4.6.6 - permission_handler: ^11.3.1 + permission_handler: ^10.4.5 #^11.3.1 diacritic: ^0.1.3 flutter_widget_from_html: ^0.15.2 + webview_flutter: ^4.10.0 + ar_flutter_plugin: ^0.7.3 # Specific mobile qr_code_scanner: ^1.0.1 #not in web @@ -54,8 +56,8 @@ dependencies: just_audio_cache: ^0.1.2 #not in web flutter_beacon: ^0.5.1 #not in web - manager_api: - path: manager_api + manager_api_new: + path: manager_api_new # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 @@ -89,6 +91,7 @@ flutter: - assets/icons/ - assets/images/ - assets/images/old/ + - assets/files/ #- assets/animations/ #- assets/files/ # To add assets to your application, add an assets section, like this: