From 4818a1af52fe2aae49ed4d115e16224ad39460ee Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Tue, 13 May 2025 17:12:04 +0200 Subject: [PATCH] Configuration (create, update, del) + Section (create, update, del) more test to be sure for section but should be ok --- .../dropDown_input_container_categories.dart | 4 +- lib/Components/message_notification.dart | 14 +- ...i_string_input_and_resource_container.dart | 2 +- lib/Components/pdf_file_input_container.dart | 10 +- ...nslation_input_and_resource_container.dart | 9 +- lib/Models/managerContext.dart | 8 +- .../SubSection/Agenda/agenda_config.dart | 10 +- .../SubSection/Article/article_config.dart | 6 +- .../Section/SubSection/Map/category_list.dart | 6 +- .../SubSection/Map/geopoint_image_list.dart | 13 +- .../Map/listView_card_geoPoint_images.dart | 14 +- .../Section/SubSection/Map/map_config.dart | 66 +- .../SubSection/Map/new_update_categorie.dart | 14 +- .../Map/showNewOrUpdateGeoPoint.dart | 10 +- .../Section/SubSection/Menu/menu_config.dart | 4 +- .../SubSection/Menu/showEditSubSection.dart | 9 +- .../Section/SubSection/PDF/PDF_config.dart | 6 +- .../SubSection/PDF/new_update_pdfFile.dart | 16 +- .../Section/SubSection/PDF/pdf_list.dart | 16 +- .../SubSection/Puzzle/puzzle_config.dart | 18 +- .../new_update_score_quizz - deprecated.dart | 16 +- .../SubSection/Quizz/quizz_config.dart | 18 +- .../Slider/listView_card_image.dart | 4 +- .../Slider/new_update_image_slider.dart | 9 +- .../SubSection/Slider/slider_config.dart | 7 +- .../SubSection/Weather/weather_config.dart | 4 +- .../WebOrVideo/web_video_config.dart | 4 +- .../Section/section_detail_screen.dart | 129 +- .../configuration_detail_screen.dart | 12 +- .../Configurations/configurations_screen.dart | 23 +- .../new_configuration_popup.dart | 18 +- .../Configurations/new_section_popup.dart | 11 +- .../Configurations/section_reorderList.dart | 31 +- lib/Screens/Devices/device_element.dart | 2 +- lib/Screens/Main/components/body.dart | 7 + lib/Screens/Main/main_screen.dart | 4 + lib/Screens/login_screen.dart | 20 +- lib/api/openApiTest.dart | 4 +- lib/api/swagger.yaml | 7632 +++++++++++------ lib/main.dart | 8 +- manager_api_new/.gitignore | 4 +- manager_api_new/.openapi-generator/FILES | 71 +- manager_api_new/.openapi-generator/VERSION | 2 +- manager_api_new/README.md | 220 +- manager_api_new/doc/AgendaDTO.md | 20 +- .../doc/AgendaDTOAllOfAgendaMapProvider.md | 14 + manager_api_new/doc/ArticleDTO.md | 18 + manager_api_new/doc/AuthenticationApi.md | 2 +- manager_api_new/doc/CategorieDTO.md | 3 +- manager_api_new/doc/ConfigurationApi.md | 6 +- manager_api_new/doc/ConfigurationDTO.md | 4 - manager_api_new/doc/ContentDTO.md | 5 +- manager_api_new/doc/ContentDTOResource.md | 20 + manager_api_new/doc/DeviceApi.md | 2 +- manager_api_new/doc/ExportConfigurationDTO.md | 4 - manager_api_new/doc/GeoPoint.md | 28 + manager_api_new/doc/GeoPointDTO.md | 3 +- manager_api_new/doc/Instance.md | 6 +- manager_api_new/doc/InstanceApi.md | 22 +- manager_api_new/doc/InstanceDTO.md | 2 +- manager_api_new/doc/MapDTO.md | 28 +- manager_api_new/doc/MapDTOAllOfMapProvider.md | 14 + manager_api_new/doc/MapDTOAllOfMapType.md | 14 + .../doc/MapDTOAllOfMapTypeMapbox.md | 14 + manager_api_new/doc/MenuDTO.md | 18 + .../doc/OrderedTranslationAndResourceDTO.md | 16 + manager_api_new/doc/PdfDTO.md | 20 +- manager_api_new/doc/PuzzleDTO.md | 21 +- .../doc/PuzzleDTOAllOfPuzzleImage.md | 20 + manager_api_new/doc/QuestionDTO.md | 3 +- manager_api_new/doc/QuizDTO.md | 37 + manager_api_new/doc/QuizQuestion.md | 20 + manager_api_new/doc/QuizQuestionResource.md | 20 + manager_api_new/doc/Resource.md | 20 + manager_api_new/doc/ResourceApi.md | 2 +- manager_api_new/doc/SectionApi.md | 26 +- manager_api_new/doc/SectionDTO.md | 1 - manager_api_new/doc/SectionMapApi.md | 191 + manager_api_new/doc/SectionQuizApi.md | 191 + manager_api_new/doc/SliderDTO.md | 18 + manager_api_new/doc/TokenDTO.md | 2 +- .../doc/TranslationAndResourceDTO.md | 3 +- manager_api_new/doc/User.md | 12 +- manager_api_new/doc/UserApi.md | 18 +- manager_api_new/doc/UserDetailDTO.md | 1 + manager_api_new/doc/VideoDTO.md | 18 + manager_api_new/doc/WeatherDTO.md | 18 + manager_api_new/doc/WebDTO.md | 18 + manager_api_new/lib/api.dart | 37 +- .../lib/api/authentication_api.dart | 61 +- .../lib/api/configuration_api.dart | 195 +- manager_api_new/lib/api/device_api.dart | 143 +- manager_api_new/lib/api/instance_api.dart | 150 +- manager_api_new/lib/api/resource_api.dart | 179 +- manager_api_new/lib/api/section_api.dart | 390 +- manager_api_new/lib/api/section_map_api.dart | 249 + manager_api_new/lib/api/section_quiz_api.dart | 249 + manager_api_new/lib/api/user_api.dart | 121 +- manager_api_new/lib/api_client.dart | 231 +- manager_api_new/lib/api_exception.dart | 5 +- manager_api_new/lib/api_helper.dart | 31 +- manager_api_new/lib/auth/api_key_auth.dart | 7 +- manager_api_new/lib/auth/authentication.dart | 5 +- manager_api_new/lib/auth/http_basic_auth.dart | 10 +- .../lib/auth/http_bearer_auth.dart | 10 +- manager_api_new/lib/auth/oauth.dart | 7 +- manager_api_new/lib/model/agenda_dto.dart | 278 +- ...agenda_dto_all_of_agenda_map_provider.dart | 100 + manager_api_new/lib/model/article_dto.dart | 278 +- manager_api_new/lib/model/categorie_dto.dart | 85 +- .../lib/model/configuration_dto.dart | 198 +- manager_api_new/lib/model/content_dto.dart | 103 +- .../lib/model/content_dto_resource.dart | 191 + .../lib/model/content_geo_point.dart | 50 +- .../lib/model/device_detail_dto.dart | 122 +- .../lib/model/device_detail_dto_all_of.dart | 56 +- manager_api_new/lib/model/device_dto.dart | 96 +- .../lib/model/export_configuration_dto.dart | 206 +- .../export_configuration_dto_all_of.dart | 42 +- manager_api_new/lib/model/geo_point.dart | 241 + manager_api_new/lib/model/geo_point_dto.dart | 106 +- .../lib/model/geo_point_dto_categorie.dart | 58 +- manager_api_new/lib/model/image_dto.dart | 44 +- .../lib/model/image_geo_point.dart | 38 +- manager_api_new/lib/model/instance.dart | 81 +- manager_api_new/lib/model/instance_dto.dart | 64 +- manager_api_new/lib/model/level_dto.dart | 33 +- manager_api_new/lib/model/login_dto.dart | 39 +- manager_api_new/lib/model/map_dto.dart | 322 +- .../model/map_dto_all_of_map_provider.dart | 100 + .../lib/model/map_dto_all_of_map_type.dart | 100 + .../model/map_dto_all_of_map_type_mapbox.dart | 100 + .../lib/model/map_dto_map_provider.dart | 31 +- .../lib/model/map_dto_map_type.dart | 31 +- .../lib/model/map_dto_map_type_mapbox.dart | 31 +- manager_api_new/lib/model/map_provider.dart | 2 +- manager_api_new/lib/model/map_type_app.dart | 81 +- .../lib/model/map_type_map_box.dart | 90 +- manager_api_new/lib/model/menu_dto.dart | 262 +- .../ordered_translation_and_resource_dto.dart | 146 + manager_api_new/lib/model/pdf_dto.dart | 266 +- manager_api_new/lib/model/pdf_file_dto.dart | 45 +- .../lib/model/player_message_dto.dart | 44 +- manager_api_new/lib/model/puzzle_dto.dart | 304 +- .../model/puzzle_dto_all_of_puzzle_image.dart | 191 + .../lib/model/puzzle_dto_image.dart | 58 +- manager_api_new/lib/model/question_dto.dart | 89 +- ...on_dto_image_background_resource_type.dart | 100 + manager_api_new/lib/model/quiz_dto.dart | 392 + manager_api_new/lib/model/quiz_question.dart | 177 + .../lib/model/quiz_question_resource.dart | 174 + manager_api_new/lib/model/quizz_dto.dart | 54 +- .../lib/model/quizz_dto_bad_level.dart | 34 +- manager_api_new/lib/model/resource.dart | 174 + manager_api_new/lib/model/resource_dto.dart | 62 +- manager_api_new/lib/model/resource_type.dart | 2 +- manager_api_new/lib/model/response_dto.dart | 48 +- manager_api_new/lib/model/section_dto.dart | 121 +- manager_api_new/lib/model/section_type.dart | 2 +- manager_api_new/lib/model/slider_dto.dart | 262 +- manager_api_new/lib/model/token_dto.dart | 74 +- .../model/translation_and_resource_dto.dart | 81 +- .../lib/model/translation_dto.dart | 41 +- manager_api_new/lib/model/user.dart | 151 +- .../lib/model/user_detail_dto.dart | 63 +- manager_api_new/lib/model/video_dto.dart | 262 +- manager_api_new/lib/model/weather_dto.dart | 272 +- manager_api_new/lib/model/web_dto.dart | 262 +- manager_api_new/pubspec.lock | 40 +- manager_api_new/pubspec.yaml | 11 +- ...a_dto_all_of_agenda_map_provider_test.dart | 19 + manager_api_new/test/agenda_dto_test.dart | 3 - manager_api_new/test/article_dto_test.dart | 3 - .../test/authentication_api_test.dart | 2 - manager_api_new/test/categorie_dto_test.dart | 3 - .../test/configuration_api_test.dart | 2 - .../test/configuration_dto_test.dart | 3 - .../test/content_dto_resource_test.dart | 49 + manager_api_new/test/content_dto_test.dart | 3 - .../test/content_geo_point_test.dart | 3 - manager_api_new/test/device_api_test.dart | 2 - .../test/device_detail_dto_all_of_test.dart | 3 - .../test/device_detail_dto_test.dart | 3 - manager_api_new/test/device_dto_test.dart | 3 - .../export_configuration_dto_all_of_test.dart | 3 - .../test/export_configuration_dto_test.dart | 3 - .../test/geo_point_dto_categorie_test.dart | 3 - manager_api_new/test/geo_point_dto_test.dart | 3 - manager_api_new/test/geo_point_test.dart | 89 + manager_api_new/test/image_dto_test.dart | 3 - .../test/image_geo_point_test.dart | 3 - manager_api_new/test/instance_api_test.dart | 2 - manager_api_new/test/instance_dto_test.dart | 3 - manager_api_new/test/instance_test.dart | 3 - manager_api_new/test/level_dto_test.dart | 3 - manager_api_new/test/login_dto_test.dart | 3 - .../map_dto_all_of_map_provider_test.dart | 19 + .../map_dto_all_of_map_type_mapbox_test.dart | 19 + .../test/map_dto_all_of_map_type_test.dart | 19 + .../test/map_dto_map_provider_test.dart | 5 +- .../test/map_dto_map_type_mapbox_test.dart | 5 +- .../test/map_dto_map_type_test.dart | 5 +- manager_api_new/test/map_dto_test.dart | 3 - manager_api_new/test/map_provider_test.dart | 6 +- manager_api_new/test/map_type_app_test.dart | 6 +- .../test/map_type_map_box_test.dart | 6 +- manager_api_new/test/menu_dto_test.dart | 3 - ...red_translation_and_resource_dto_test.dart | 29 + manager_api_new/test/pdf_dto_test.dart | 3 - manager_api_new/test/pdf_file_dto_test.dart | 3 - .../test/player_message_dto_test.dart | 3 - .../puzzle_dto_all_of_puzzle_image_test.dart | 49 + .../test/puzzle_dto_image_test.dart | 3 - manager_api_new/test/puzzle_dto_test.dart | 3 - ...o_image_background_resource_type_test.dart | 19 + manager_api_new/test/question_dto_test.dart | 3 - manager_api_new/test/quiz_dto_test.dart | 134 + .../test/quiz_question_resource_test.dart | 49 + manager_api_new/test/quiz_question_test.dart | 49 + .../test/quizz_dto_bad_level_test.dart | 3 - manager_api_new/test/quizz_dto_test.dart | 3 - manager_api_new/test/resource_api_test.dart | 2 - manager_api_new/test/resource_dto_test.dart | 3 - manager_api_new/test/resource_test.dart | 49 + manager_api_new/test/resource_type_test.dart | 6 +- manager_api_new/test/response_dto_test.dart | 3 - manager_api_new/test/section_api_test.dart | 2 - manager_api_new/test/section_dto_test.dart | 3 - .../test/section_map_api_test.dart | 39 + .../test/section_quiz_api_test.dart | 39 + manager_api_new/test/section_type_test.dart | 6 +- manager_api_new/test/slider_dto_test.dart | 3 - manager_api_new/test/token_dto_test.dart | 3 - .../translation_and_resource_dto_test.dart | 3 - .../test/translation_dto_test.dart | 3 - manager_api_new/test/user_api_test.dart | 2 - .../test/user_detail_dto_test.dart | 3 - manager_api_new/test/user_test.dart | 3 - manager_api_new/test/video_dto_test.dart | 3 - manager_api_new/test/weather_dto_test.dart | 3 - manager_api_new/test/web_dto_test.dart | 3 - openapi_generator_config.json | 9 + pubspec.lock | 40 +- pubspec.yaml | 4 +- 244 files changed, 14754 insertions(+), 5350 deletions(-) create mode 100644 manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md create mode 100644 manager_api_new/doc/ContentDTOResource.md create mode 100644 manager_api_new/doc/GeoPoint.md create mode 100644 manager_api_new/doc/MapDTOAllOfMapProvider.md create mode 100644 manager_api_new/doc/MapDTOAllOfMapType.md create mode 100644 manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md create mode 100644 manager_api_new/doc/OrderedTranslationAndResourceDTO.md create mode 100644 manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md create mode 100644 manager_api_new/doc/QuizDTO.md create mode 100644 manager_api_new/doc/QuizQuestion.md create mode 100644 manager_api_new/doc/QuizQuestionResource.md create mode 100644 manager_api_new/doc/Resource.md create mode 100644 manager_api_new/doc/SectionMapApi.md create mode 100644 manager_api_new/doc/SectionQuizApi.md create mode 100644 manager_api_new/lib/api/section_map_api.dart create mode 100644 manager_api_new/lib/api/section_quiz_api.dart create mode 100644 manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart create mode 100644 manager_api_new/lib/model/content_dto_resource.dart create mode 100644 manager_api_new/lib/model/geo_point.dart create mode 100644 manager_api_new/lib/model/map_dto_all_of_map_provider.dart create mode 100644 manager_api_new/lib/model/map_dto_all_of_map_type.dart create mode 100644 manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart create mode 100644 manager_api_new/lib/model/ordered_translation_and_resource_dto.dart create mode 100644 manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart create mode 100644 manager_api_new/lib/model/question_dto_image_background_resource_type.dart create mode 100644 manager_api_new/lib/model/quiz_dto.dart create mode 100644 manager_api_new/lib/model/quiz_question.dart create mode 100644 manager_api_new/lib/model/quiz_question_resource.dart create mode 100644 manager_api_new/lib/model/resource.dart create mode 100644 manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart create mode 100644 manager_api_new/test/content_dto_resource_test.dart create mode 100644 manager_api_new/test/geo_point_test.dart create mode 100644 manager_api_new/test/map_dto_all_of_map_provider_test.dart create mode 100644 manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart create mode 100644 manager_api_new/test/map_dto_all_of_map_type_test.dart create mode 100644 manager_api_new/test/ordered_translation_and_resource_dto_test.dart create mode 100644 manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart create mode 100644 manager_api_new/test/question_dto_image_background_resource_type_test.dart create mode 100644 manager_api_new/test/quiz_dto_test.dart create mode 100644 manager_api_new/test/quiz_question_resource_test.dart create mode 100644 manager_api_new/test/quiz_question_test.dart create mode 100644 manager_api_new/test/resource_test.dart create mode 100644 manager_api_new/test/section_map_api_test.dart create mode 100644 manager_api_new/test/section_quiz_api_test.dart create mode 100644 openapi_generator_config.json diff --git a/lib/Components/dropDown_input_container_categories.dart b/lib/Components/dropDown_input_container_categories.dart index 1d0a010..ad03153 100644 --- a/lib/Components/dropDown_input_container_categories.dart +++ b/lib/Components/dropDown_input_container_categories.dart @@ -6,7 +6,7 @@ import 'package:manager_app/constants.dart'; class DropDownInputContainerCategories extends StatefulWidget { final String label; final List categories; - final CategorieDTO? initialValue; + final int? initialValue; final ValueChanged? onChange; const DropDownInputContainerCategories({ Key? key, @@ -27,7 +27,7 @@ class _DropDownInputContainerCategoriesState extends State element.id == widget.initialValue!.id); + selectedCategorieDTO = widget.categories.firstWhere((element) => element.id == widget.initialValue); } List label = []; label.add(TranslationDTO(language: "FR", value: "Aucune catégorie")); diff --git a/lib/Components/message_notification.dart b/lib/Components/message_notification.dart index 476b219..efde63f 100644 --- a/lib/Components/message_notification.dart +++ b/lib/Components/message_notification.dart @@ -1,21 +1,21 @@ -import 'package:another_flushbar/flushbar.dart'; +//import 'package:another_flushbar/flushbar.dart'; import 'package:flutter/material.dart'; showNotification (Color backgroundColor, Color textColor, String text, BuildContext context, int? duration) async { - await Flushbar( + /*await Flushbar( message: text, messageColor: textColor, margin: EdgeInsets.all(8), backgroundColor: backgroundColor, borderRadius: BorderRadius.circular(8), duration: duration == null ? Duration(milliseconds: 1500) : Duration(milliseconds: duration), - ).show(context); + ).show(context);*/ - /*final snackBar = SnackBar( + final snackBar = SnackBar( behavior: SnackBarBehavior.floating, duration: duration == null ? Duration(milliseconds: 1500) : Duration(milliseconds: duration), - width: 320.0, // Width of the SnackBar. + width: 450.0, // Width of the SnackBar. backgroundColor: backgroundColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0), @@ -24,7 +24,7 @@ showNotification (Color backgroundColor, Color textColor, String text, BuildCont horizontal: 10.0, // Inner padding for SnackBar content. ), content: Container( - height: 32.5, + height: 50.5, child: Center( child: Text( text, @@ -34,5 +34,5 @@ showNotification (Color backgroundColor, Color textColor, String text, BuildCont ), ) ); - ScaffoldMessenger.of(context).showSnackBar(snackBar);*/ + ScaffoldMessenger.of(context).showSnackBar(snackBar); } diff --git a/lib/Components/multi_string_input_and_resource_container.dart b/lib/Components/multi_string_input_and_resource_container.dart index 0d23f2e..5424871 100644 --- a/lib/Components/multi_string_input_and_resource_container.dart +++ b/lib/Components/multi_string_input_and_resource_container.dart @@ -65,7 +65,7 @@ class MultiStringInputAndResourceContainer extends StatelessWidget { newValues.add(TranslationAndResourceDTO.fromJson(jsonDecode(jsonEncode(initials.firstWhere((element) => element.language == value)))!)!); } else { // New language - newValues.add(TranslationAndResourceDTO(language: value, value: "", resourceType: null, resourceId: null, resourceUrl: null)); + newValues.add(TranslationAndResourceDTO(language: value, value: "", resource: null)); } }); diff --git a/lib/Components/pdf_file_input_container.dart b/lib/Components/pdf_file_input_container.dart index fc913d4..cd80c55 100644 --- a/lib/Components/pdf_file_input_container.dart +++ b/lib/Components/pdf_file_input_container.dart @@ -9,8 +9,8 @@ import 'package:manager_app/constants.dart'; class PDFFileInputContainer extends StatefulWidget { final Color color; final String label; - List initialValue; - final ValueChanged> onChanged; + List initialValue; + final ValueChanged> onChanged; PDFFileInputContainer({ Key? key, this.color = kSecond, @@ -47,8 +47,8 @@ class _PDFFileInputContainerState extends State { width: size.width *0.15, child: InkWell( onTap: () { - List newValues = []; - List initials = widget.initialValue; + List newValues = []; + List initials = widget.initialValue; showCreateOrUpdatePdfFiles("Fichiers PDF", initials, newValues, (value) { widget.onChanged(value); widget.initialValue = value; @@ -79,7 +79,7 @@ class _PDFFileInputContainerState extends State { } } -showCreateOrUpdatePdfFiles(String modalLabel, List values, List newValues, Function onGetResult, BuildContext context) { +showCreateOrUpdatePdfFiles(String modalLabel, List values, List newValues, Function onGetResult, BuildContext context) { showDialog( builder: (BuildContext context) { Size size = MediaQuery.of(context).size; diff --git a/lib/Components/translation_input_and_resource_container.dart b/lib/Components/translation_input_and_resource_container.dart index 0ea48c1..1b1dd0d 100644 --- a/lib/Components/translation_input_and_resource_container.dart +++ b/lib/Components/translation_input_and_resource_container.dart @@ -184,12 +184,13 @@ class _TranslationInputAndResourceContainerState extends State element.language! == value).first.resourceId = null; - newValues.where((element) => element.language! == value).first.resourceUrl = null; - newValues.where((element) => element.language! == value).first.resourceType = null; + newValues.where((element) => element.language! == value).first.resource?.url = null; + newValues.where((element) => element.language! == value).first.resource?.type = null; } else { newValues.where((element) => element.language! == value).first.resourceId = resource.id; - newValues.where((element) => element.language! == value).first.resourceUrl = resource.url; - newValues.where((element) => element.language! == value).first.resourceType = resource.type; + newValues.where((element) => element.language! == value).first.resource = resource; + /*newValues.where((element) => element.language! == value).first.resourceUrl = resource.url; + newValues.where((element) => element.language! == value).first.resourceType = resource.type;*/ } }); }, diff --git a/lib/Models/managerContext.dart b/lib/Models/managerContext.dart index 8e1307f..6a36ba6 100644 --- a/lib/Models/managerContext.dart +++ b/lib/Models/managerContext.dart @@ -8,18 +8,18 @@ class ManagerAppContext with ChangeNotifier{ String? instanceId; String? host; String? accessToken; - int? pinCode; + String? pinCode; Client? clientAPI; - String? currentRoute; + int? currentPositionMenu; ConfigurationDTO? selectedConfiguration; SectionDTO? selectedSection; bool? isLoading = false; - ManagerAppContext({this.email, this.accessToken, this.currentRoute}); + ManagerAppContext({this.email, this.accessToken, this.currentPositionMenu}); // Implement toString to make it easier to see information about @override String toString() { - return 'ManagerAppContext{email: $email, host: $host, token: $accessToken, instanceId: $instanceId, currentRoute: $currentRoute}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}'; + return 'ManagerAppContext{email: $email, host: $host, token: $accessToken, instanceId: $instanceId, currentPositionMenu: $currentPositionMenu}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}'; } } \ No newline at end of file diff --git a/lib/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart b/lib/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart index d44eb20..390ec5b 100644 --- a/lib/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart @@ -11,7 +11,7 @@ import 'package:manager_app/constants.dart'; class AgendaConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final AgendaDTO initialValue; final ValueChanged onChanged; const AgendaConfig({ Key? key, @@ -30,7 +30,7 @@ class _AgendaConfigState extends State { @override void initState() { - AgendaDTO test = AgendaDTO.fromJson(json.decode(widget.initialValue))!; + AgendaDTO test = widget.initialValue; agendaDTO = test; super.initState(); } @@ -40,7 +40,7 @@ class _AgendaConfigState extends State { Size size = MediaQuery.of(context).size; var mapProviderIn = ""; - switch(agendaDTO.mapProvider) { + switch(agendaDTO.agendaMapProvider) { case MapProvider.Google : mapProviderIn = "Google"; break; @@ -68,10 +68,10 @@ class _AgendaConfigState extends State { onChanged: (String value) { switch(value) { case "Google": - agendaDTO.mapProvider = MapProvider.Google; + agendaDTO.agendaMapProvider = MapProvider.Google; break; case "MapBox": - agendaDTO.mapProvider = MapProvider.MapBox; + agendaDTO.agendaMapProvider = MapProvider.MapBox; break; } widget.onChanged(jsonEncode(agendaDTO).toString()); diff --git a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart index 3d10310..f94375b 100644 --- a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart @@ -14,7 +14,7 @@ import 'package:provider/provider.dart'; class ArticleConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final ArticleDTO initialValue; final ValueChanged onChanged; const ArticleConfig({ Key? key, @@ -34,7 +34,7 @@ class _ArticleConfigState extends State { @override void initState() { super.initState(); - articleDTO = ArticleDTO.fromJson(json.decode(widget.initialValue))!; + articleDTO = widget.initialValue; List test = new List.from(articleDTO.contents!); articleDTO.contents = test; @@ -177,7 +177,7 @@ class _ArticleConfigState extends State { List test = new List.from(images); articleDTO.contents = test; List testToSend = new List.from(images); - testToSend = testToSend.where((element) => element.resourceUrl != null).toList(); + testToSend = testToSend.where((element) => element.resource?.url != null).toList(); var articleToSend = new ArticleDTO(); articleToSend.contents = testToSend; articleToSend.audioIds = articleDTO.audioIds; diff --git a/lib/Screens/Configurations/Section/SubSection/Map/category_list.dart b/lib/Screens/Configurations/Section/SubSection/Map/category_list.dart index 835d185..7cf8ce8 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/category_list.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/category_list.dart @@ -175,7 +175,7 @@ class _CategoryListState extends State { height: 50, child: Row( children: [ - if(category.iconResourceId != null) Container( + if(category.resourceDTO?.id != null) Container( height: 60, width: 60, decoration: imageBoxDecoration(category, appContext), @@ -275,10 +275,10 @@ imageBoxDecoration(CategorieDTO categorieDTO, appContext) { shape: BoxShape.rectangle, border: Border.all(width: 1.5, color: kSecond), borderRadius: BorderRadius.circular(10.0), - image: categorieDTO.iconUrl != null ? new DecorationImage( + image: categorieDTO.resourceDTO?.url != null ? new DecorationImage( fit: BoxFit.cover, image: new NetworkImage( - categorieDTO.iconUrl!, + categorieDTO.resourceDTO!.url!, ), ) : null, ); diff --git a/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart b/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart index 71c2b0d..b88f131 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart @@ -7,8 +7,8 @@ import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class GeoPointContentList extends StatefulWidget { - final List contents; - final ValueChanged> onChanged; + final List contents; + final ValueChanged> onChanged; const GeoPointContentList({ Key? key, required this.contents, @@ -20,12 +20,12 @@ class GeoPointContentList extends StatefulWidget { } class _GeoPointContentListState extends State { - late List contentsGeo; + late List contentsGeo; @override void initState() { super.initState(); - contentsGeo = new List.from(widget.contents); + contentsGeo = new List.from(widget.contents); } void _onReorder(int oldIndex, int newIndex) { @@ -34,7 +34,7 @@ class _GeoPointContentListState extends State { if (newIndex > oldIndex) { newIndex -= 1; } - final ContentGeoPoint item = contentsGeo.removeAt(oldIndex); + final ContentDTO item = contentsGeo.removeAt(oldIndex); contentsGeo.insert(newIndex, item); widget.onChanged(contentsGeo); @@ -99,7 +99,8 @@ class _GeoPointContentListState extends State { ); if (result != null) { setState(() { - ContentGeoPoint newImage = new ContentGeoPoint(resourceId: result.id, resourceUrl: result.url, resourceName: result.label, resourceType: result.type); + print("TODO CHECK !!"); + ContentDTO newImage = new ContentDTO(resourceId: result.id, resource: ResourceDTO(url: result.url, label: result.label, type: result.type)); //print("RESULT IMAGES = "); //print(newImage); contentsGeo.add(newImage); diff --git a/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart b/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart index fe21343..7b89e06 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart @@ -7,9 +7,9 @@ import 'package:provider/provider.dart'; class ListViewCardGeoPointContents extends StatefulWidget { final int index; final Key key; - final List listContents; + final List listContents; final AppContext appContext; - final ValueChanged> onChanged; + final ValueChanged> onChanged; ListViewCardGeoPointContents( this.listContents, @@ -74,16 +74,16 @@ class _ListViewCardGeoPointContentsState extends State onChanged; + final MapDTO initialValue; + final ValueChanged onChanged; const MapConfig({ Key? key, this.color, @@ -50,15 +50,17 @@ class _MapConfigState extends State { @override void initState() { super.initState(); - mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!; + //mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!; + mapDTO = widget.initialValue; pointsToShow = new List.from(mapDTO.points!); mapDTO.points = pointsToShow; pointsToShow.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase())); - selectedCategories = mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList(); + //selectedCategories = mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList(); + selectedCategories = mapDTO.categories!.map((categorie) => categorie.id!.toString()).toList(); pointsToShow.forEach((pts) { - if(pts.categorieId == null && pts.categorie != null && mapDTO.categories!.any((e) => e.order == pts.categorie!.order)) { + /*if(pts.categorieId == null && pts.categorie != null && mapDTO.categories!.any((e) => e.order == pts.categorie!.order)) { print("SET CATEGORIE ID FOR CAT"); print(pts.categorie); var testCat = mapDTO.categories!.where((c) => c.label![0].value == pts.categorie!.label![0].value); @@ -70,7 +72,7 @@ class _MapConfigState extends State { } print(pts.categorieId); - } + }*/ }); print(pointsToShow); @@ -173,7 +175,8 @@ class _MapConfigState extends State { mapDTO.mapProvider = MapProvider.MapBox; break; } - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); } ), GeolocInputContainer( @@ -185,7 +188,8 @@ class _MapConfigState extends State { mapDTO.longitude = localisation.longitude.toString(); mapDTO.latitude = localisation.latitude.toString(); } - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, isSmall: true ), @@ -203,7 +207,8 @@ class _MapConfigState extends State { mapDTO.iconResourceId = resource.id; mapDTO.iconSource = resource.url; } - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, isSmall: true ), @@ -220,7 +225,8 @@ class _MapConfigState extends State { initialValue: mapType, onChange: (String? value) { mapDTO.mapType = MapTypeApp.fromJson(value); - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, ), if(mapDTO.mapProvider == MapProvider.MapBox) @@ -230,7 +236,8 @@ class _MapConfigState extends State { initialValue: mapTypeMapBox, onChange: (String? value) { mapDTO.mapTypeMapbox = MapTypeMapBox.fromJson(value); - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, ), // Zoom @@ -242,7 +249,8 @@ class _MapConfigState extends State { max: 30, onChanged: (double value) { mapDTO.zoom = value.toInt(); - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, ), Container( @@ -265,32 +273,33 @@ class _MapConfigState extends State { { print("DELETE CAT REF"); print(p.categorieId); - print(p.categorie); + //print(p.categorie); // delete cat ref from point p.categorieId = null; - p.categorie = null; + //p.categorie = null; } // update point category - Update if(p.categorieId != null && mapDTO.categories!.map((c) => c.id).any((e) => e != null && e == p.categorieId)) { var categorie = mapDTO.categories!.firstWhere((c) => c.id == p.categorieId); - p.categorie = categorie; + //p.categorie = categorie; print("UPDATE CAT REF"); } print(p); - if(p.categorieId == null && p.categorie != null && p.categorie!.label != null) + /*if(p.categorieId == null && p.categorie != null && p.categorie!.label != null) { // need to update with label var categorie = mapDTO.categories!.firstWhere((c) => c.label![0].value == p.categorie!.label![0].value); //p.categorie = categorie; p.categorieId = categorie.id; - } + }*/ }); } /*print("mapDTO.points"); print(mapDTO.points);*/ - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); } }, ), @@ -353,9 +362,11 @@ class _MapConfigState extends State { setState(() { selectedCategories = tempOutput; if(selectedCategories == null || selectedCategories!.length == 0) { - pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList(); + //pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList(); + pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList(); } else { - pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList(); + //pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList(); + pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorieId == null || point.categorieId == tps)).toList(); } }); }, @@ -395,12 +406,15 @@ class _MapConfigState extends State { mapDTO.points!.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase())); if(selectedCategories == null || selectedCategories!.length == 0) { - pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList(); + //pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList(); + pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList(); } else { - pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList(); + //pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList(); + pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorieId == null || point.categorieId == tps)).toList(); } - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }); }, appContext, @@ -482,7 +496,8 @@ class _MapConfigState extends State { mapDTO.points![mapDTOPointsIndex] = pointToUpdate; mapDTO.points!.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase())); - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }); }, appContext, @@ -506,7 +521,8 @@ class _MapConfigState extends State { pointsToShow.removeAt(index); }); - widget.onChanged(jsonEncode(mapDTO).toString()); + //widget.onChanged(jsonEncode(mapDTO).toString()); + widget.onChanged(mapDTO); }, child: Icon( Icons.delete, diff --git a/lib/Screens/Configurations/Section/SubSection/Map/new_update_categorie.dart b/lib/Screens/Configurations/Section/SubSection/Map/new_update_categorie.dart index 588cdd2..e723f89 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/new_update_categorie.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/new_update_categorie.dart @@ -80,16 +80,18 @@ Future showNewOrUpdateCategory(CategorieDTO? inputCategorieDTO, A constraints: BoxConstraints(minHeight: 50, maxHeight: 80), child: ResourceInputContainer( label: "Icône catégorie :", - initialValue: categorieDTO.iconResourceId, + initialValue: categorieDTO.resourceDTO?.id, color: kPrimaryColor, onChanged: (ResourceDTO resource) { if(resource.id == null) { - categorieDTO.iconResourceId = null; - categorieDTO.iconUrl = null; + categorieDTO.resourceDTO?.id = null; + categorieDTO.resourceDTO?.url = null; + categorieDTO.resourceDTO?.label = null; } else { - categorieDTO.iconResourceId = resource.id; - categorieDTO.iconUrl = resource.url; - print("Icône catégorieIcône catégorie"); + categorieDTO.resourceDTO?.id = resource.id; + categorieDTO.resourceDTO?.url = resource.url; + categorieDTO.resourceDTO?.label = resource.label; + print("Icône catégorie Icône catégorie"); print(categorieDTO); } }, diff --git a/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart b/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart index 1d69bdb..c981bd1 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart @@ -20,7 +20,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct } else { geoPointDTO.title = []; geoPointDTO.description = []; - geoPointDTO.contents = []; + geoPointDTO.contents = []; ManagerAppContext managerAppContext = appContext.getContext(); managerAppContext.selectedConfiguration!.languages!.forEach((element) { @@ -277,14 +277,14 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct child: DropDownInputContainerCategories( label: "Choisir une catégorie:", categories: mapDTO.categories!, - initialValue: geoPointDTO.categorie, + initialValue: geoPointDTO.categorieId, onChange: (CategorieDTO? value) { if(value != null && value.order != -1) { - geoPointDTO.categorie = value; + geoPointDTO.categorieId = value.id; } else { - geoPointDTO.categorie = null; + geoPointDTO.categorieId = null; } }, ), @@ -310,7 +310,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct ), child: GeoPointContentList( contents: geoPointDTO.contents!, - onChanged: (List contentsOutput) { + onChanged: (List contentsOutput) { geoPointDTO.contents = contentsOutput; }, ), diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart b/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart index ad85dc6..0a8932d 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart @@ -14,7 +14,7 @@ import 'package:provider/provider.dart'; class MenuConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final MenuDTO initialValue; final ValueChanged onChanged; const MenuConfig({ Key? key, @@ -35,7 +35,7 @@ class _MenuConfigState extends State { void initState() { super.initState(); - menuDTO = MenuDTO.fromJson(json.decode(widget.initialValue))!; + menuDTO = widget.initialValue; List test = new List.from(menuDTO.sections!); menuDTO.sections = test; } diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart index ee84c71..4062e58 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart @@ -176,15 +176,16 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appContext) { switch(sectionDTO.type) { case SectionType.Map: - return MapConfig( + return Text("TODO"); + /*return MapConfig( initialValue: sectionDTO.data!, onChanged: (String data) { //print("Received info in parent"); //print(data); sectionDTO.data = data; }, - ); - case SectionType.Slider: + );*/ + /*case SectionType.Slider: return Container( width: MediaQuery.of(context).size.width * 0.5, height: MediaQuery.of(context).size.height * 0.5, @@ -251,6 +252,6 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte onChanged: (String data) { sectionDTO.data = data; }, - ); + );*/ } } diff --git a/lib/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart b/lib/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart index 2e05033..6f170c6 100644 --- a/lib/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart @@ -10,7 +10,7 @@ import 'package:manager_app/constants.dart'; class PDFConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final PdfDTO initialValue; final ValueChanged onChanged; const PDFConfig({ Key? key, @@ -29,7 +29,7 @@ class _PDFConfigState extends State { @override void initState() { - PdfDTO test = PdfDTO.fromJson(json.decode(widget.initialValue))!; + PdfDTO test = widget.initialValue; pdfDTO = test; super.initState(); } @@ -44,7 +44,7 @@ class _PDFConfigState extends State { label: "Fichiers PDF :", initialValue: pdfDTO.pdfs != null ? pdfDTO.pdfs! : [], color: kPrimaryColor, - onChanged: (List? value) { + onChanged: (List? value) { if(value != null) { pdfDTO.pdfs = value; widget.onChanged(jsonEncode(pdfDTO).toString()); diff --git a/lib/Screens/Configurations/Section/SubSection/PDF/new_update_pdfFile.dart b/lib/Screens/Configurations/Section/SubSection/PDF/new_update_pdfFile.dart index afd4e24..7b795a0 100644 --- a/lib/Screens/Configurations/Section/SubSection/PDF/new_update_pdfFile.dart +++ b/lib/Screens/Configurations/Section/SubSection/PDF/new_update_pdfFile.dart @@ -10,13 +10,13 @@ import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_api_new/api.dart'; -Future showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext appContext, BuildContext context, String text) async { - PDFFileDTO pdfFileDTO = new PDFFileDTO(); +Future showNewOrUpdatePDFFile(OrderedTranslationAndResourceDTO? inputPdfFile, AppContext appContext, BuildContext context, String text) async { + OrderedTranslationAndResourceDTO pdfFileDTO = new OrderedTranslationAndResourceDTO(); if (inputPdfFile != null) { pdfFileDTO = inputPdfFile; } else { - pdfFileDTO.pdfFilesAndTitles = []; + pdfFileDTO.translationAndResourceDTOs = []; ManagerAppContext managerAppContext = appContext.getContext(); managerAppContext.selectedConfiguration!.languages!.forEach((element) { @@ -25,7 +25,7 @@ Future showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext translationMessageDTO.value = ""; translationMessageDTO.resourceId = null; - pdfFileDTO.pdfFilesAndTitles!.add(translationMessageDTO); + pdfFileDTO.translationAndResourceDTOs!.add(translationMessageDTO); }); } @@ -66,13 +66,13 @@ Future showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext modalLabel: "Fichier et titre pdf", fontSize: 20, color: kPrimaryColor, - initialValue: pdfFileDTO.pdfFilesAndTitles != null ? pdfFileDTO.pdfFilesAndTitles! : [], + initialValue: pdfFileDTO.translationAndResourceDTOs != null ? pdfFileDTO.translationAndResourceDTOs! : [], resourceTypes: [ResourceType.Pdf], onGetResult: (value) { - if (pdfFileDTO.pdfFilesAndTitles != value) { + if (pdfFileDTO.translationAndResourceDTOs != value) { print("get resut hereeee"); print(value); - pdfFileDTO.pdfFilesAndTitles = value; + pdfFileDTO.translationAndResourceDTOs = value; } }, maxLines: 1, @@ -137,7 +137,7 @@ Future showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext color: kPrimaryColor, textColor: kWhite, press: () { - if(pdfFileDTO.pdfFilesAndTitles != null && pdfFileDTO.pdfFilesAndTitles!.isNotEmpty) + if(pdfFileDTO.translationAndResourceDTOs != null && pdfFileDTO.translationAndResourceDTOs!.isNotEmpty) { Navigator.pop(dialogContext, pdfFileDTO); } diff --git a/lib/Screens/Configurations/Section/SubSection/PDF/pdf_list.dart b/lib/Screens/Configurations/Section/SubSection/PDF/pdf_list.dart index 4b817c0..4b578d4 100644 --- a/lib/Screens/Configurations/Section/SubSection/PDF/pdf_list.dart +++ b/lib/Screens/Configurations/Section/SubSection/PDF/pdf_list.dart @@ -9,8 +9,8 @@ import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class PDFList extends StatefulWidget { - final List pdfs; - final ValueChanged> onChanged; + final List pdfs; + final ValueChanged> onChanged; const PDFList({ Key? key, required this.pdfs, @@ -22,12 +22,12 @@ class PDFList extends StatefulWidget { } class _PDFListState extends State { - late List pdfsMiddle; + late List pdfsMiddle; @override void initState() { super.initState(); - pdfsMiddle = new List.from(widget.pdfs); + pdfsMiddle = new List.from(widget.pdfs); pdfsMiddle.sort((a, b) => a.order!.compareTo(b.order!)); } @@ -50,7 +50,7 @@ class _PDFListState extends State { if (newIndex > oldIndex) { newIndex -= 1; } - final PDFFileDTO item = pdfsMiddle.removeAt(oldIndex); + final OrderedTranslationAndResourceDTO item = pdfsMiddle.removeAt(oldIndex); pdfsMiddle.insert(newIndex, item); var i = 0; @@ -93,7 +93,7 @@ class _PDFListState extends State { right: 10, child: InkWell( onTap: () async { - PDFFileDTO newPdfFile = PDFFileDTO(order: null); + OrderedTranslationAndResourceDTO newPdfFile = OrderedTranslationAndResourceDTO(order: null); var result = await showNewOrUpdatePDFFile(newPdfFile, appContext, context, "Création PDF"); if (result != null) @@ -133,7 +133,7 @@ class _PDFListState extends State { ); } - getElement(int index, PDFFileDTO pdfFileDTO, Size size, AppContext appContext) { + getElement(int index, OrderedTranslationAndResourceDTO pdfFileDTO, Size size, AppContext appContext) { return Stack( children: [ Container( @@ -145,7 +145,7 @@ class _PDFListState extends State { child: Padding( padding: const EdgeInsets.all(2.0), child: HtmlWidget( - pdfFileDTO.pdfFilesAndTitles == null ? "" : pdfFileDTO.pdfFilesAndTitles![0].value!, + pdfFileDTO.translationAndResourceDTOs == null ? "" : pdfFileDTO.translationAndResourceDTOs![0].value!, //textAlign: TextAlign.left, textStyle: TextStyle(fontSize: 15) ), diff --git a/lib/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart b/lib/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart index 0c5553e..78d854e 100644 --- a/lib/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart @@ -11,7 +11,7 @@ import 'package:manager_app/constants.dart'; class PuzzleConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final PuzzleDTO initialValue; final ValueChanged onChanged; const PuzzleConfig({ Key? key, @@ -30,9 +30,9 @@ class _PuzzleConfigState extends State { @override void initState() { - PuzzleDTO test = PuzzleDTO.fromJson(json.decode(widget.initialValue))!; - if(test.image == null) { - test.image = PuzzleDTOImage(); + PuzzleDTO test = widget.initialValue; + if(test.puzzleImage == null) { + test.puzzleImage = ResourceDTO(); } puzzleDTO = test; puzzleDTO.rows = puzzleDTO.rows == null ? 3 : puzzleDTO.rows; @@ -52,13 +52,13 @@ class _PuzzleConfigState extends State { children: [ ResourceInputContainer( label: "Image du puzzle :", - initialValue: puzzleDTO.image!.resourceId == null ? '': puzzleDTO.image!.resourceId, + initialValue: puzzleDTO.puzzleImage!.id == null ? '': puzzleDTO.puzzleImage!.id, onChanged: (ResourceDTO resourceDTO) { setState(() { - puzzleDTO.image!.resourceId = resourceDTO.id; - puzzleDTO.image!.resourceType = resourceDTO.type; - puzzleDTO.image!.resourceUrl = resourceDTO.url; - print(puzzleDTO.image); + puzzleDTO.puzzleImage!.id = resourceDTO.id; + puzzleDTO.puzzleImage!.type = resourceDTO.type; + puzzleDTO.puzzleImage!.url = resourceDTO.url; + print(puzzleDTO.puzzleImage); widget.onChanged(jsonEncode(puzzleDTO).toString()); }); } diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz - deprecated.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz - deprecated.dart index a21a77c..34b407b 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz - deprecated.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz - deprecated.dart @@ -10,13 +10,13 @@ import 'package:manager_app/constants.dart'; import 'package:manager_api_new/api.dart'; @deprecated -Future showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext appContext, BuildContext context, String text) async { - LevelDTO levelDTO = new LevelDTO(); +Future?> showNewOrUpdateScoreQuizz(List? inputLevelDTO, AppContext appContext, BuildContext context, String text) async { + List levelDTO = []; if (inputLevelDTO != null) { levelDTO = inputLevelDTO; } else { - levelDTO.label = []; + levelDTO = []; ManagerAppContext managerAppContext = appContext.getContext(); managerAppContext.selectedConfiguration!.languages!.forEach((element) { @@ -24,7 +24,7 @@ Future showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext translationMessageDTO.language = element; translationMessageDTO.value = ""; - levelDTO.label!.add(translationMessageDTO); + levelDTO.add(translationMessageDTO); }); } @@ -45,7 +45,7 @@ Future showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext print("RTESULTYTYT "); print(value); if(value != null && value.isNotEmpty) { - levelDTO.label = value; + levelDTO = value; print("RETURN VALUE"); print(levelDTO); return levelDTO; @@ -78,10 +78,10 @@ Future showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext modalLabel: text, fontSize: 20, color: kPrimaryColor, - initialValue: levelDTO.label != null ? levelDTO.label! : [], + initialValue: levelDTO != null ? levelDTO! : [], onGetResult: (value) { - if (levelDTO.label != value) { - levelDTO.label = value; + if (levelDTO != value) { + levelDTO = value; } }, maxLines: 1, diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart index baf64f6..e6fe042 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart @@ -15,7 +15,7 @@ import 'new_update_question_quizz.dart'; class QuizzConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final QuizDTO initialValue; final ValueChanged onChanged; const QuizzConfig({ Key? key, @@ -30,12 +30,12 @@ class QuizzConfig extends StatefulWidget { } class _QuizzConfigState extends State { - late QuizzDTO quizzDTO; + late QuizDTO quizzDTO; @override void initState() { super.initState(); - quizzDTO = QuizzDTO.fromJson(json.decode(widget.initialValue))!; + quizzDTO = widget.initialValue; List test = new List.from(quizzDTO.questions!); quizzDTO.questions = test; quizzDTO.questions!.sort((a, b) => a.order!.compareTo(b.order!)); @@ -308,13 +308,13 @@ class _QuizzConfigState extends State { ); } - updateScoreQuizMessage(BuildContext context, AppContext appContext, LevelDTO? inLevelDTO, String text, int levelToUpdate) { - LevelDTO levelDTO = new LevelDTO(); + updateScoreQuizMessage(BuildContext context, AppContext appContext, List? inLevelDTO, String text, int levelToUpdate) { + List levelDTO = []; if (inLevelDTO != null) { levelDTO = inLevelDTO; } else { - levelDTO.label = []; + levelDTO = []; ManagerAppContext managerAppContext = appContext.getContext(); managerAppContext.selectedConfiguration!.languages!.forEach((element) { @@ -322,13 +322,13 @@ class _QuizzConfigState extends State { translationMessageDTO.language = element; translationMessageDTO.value = ""; - levelDTO.label!.add(translationMessageDTO); + levelDTO!.add(translationMessageDTO); }); } List newValues = []; - List initials = levelDTO.label!; + List initials = levelDTO!; appContext.getContext().selectedConfiguration!.languages!.forEach((value) { if(initials.map((iv) => iv.language).contains(value)) { @@ -341,7 +341,7 @@ class _QuizzConfigState extends State { showMultiStringInputAndResourceHTML(text, text, true, initials, newValues, (value) { if(value != null && value.isNotEmpty) { - levelDTO.label = value; + levelDTO = value; setState(() { switch(levelToUpdate) { case 0: diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart index a372851..d9d7b34 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart @@ -140,10 +140,10 @@ boxDecoration(ContentDTO contentDTO, appContext) { shape: BoxShape.rectangle, border: Border.all(width: 1.5, color: kSecond), borderRadius: BorderRadius.circular(10.0), - image: contentDTO.title != null && contentDTO.resourceUrl != null && (contentDTO.resourceType == ResourceType.ImageUrl || contentDTO.resourceType == ResourceType.Image) ? new DecorationImage( + image: contentDTO.title != null && contentDTO.resource?.url != null && (contentDTO.resource?.type == ResourceType.ImageUrl || contentDTO.resource?.type == ResourceType.Image) ? new DecorationImage( fit: BoxFit.scaleDown, image: new NetworkImage( - contentDTO.resourceUrl!, + contentDTO.resource!.url!, ), ) : null, boxShadow: [ diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart b/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart index 71f5611..2ea5e83 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart @@ -58,12 +58,13 @@ Future showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, Ap onChanged: (ResourceDTO resource) { if(resource.id == null) { contentDTO.resourceId = null; - contentDTO.resourceUrl = null; - contentDTO.resourceType = null; + contentDTO.resource = null; } else { contentDTO.resourceId = resource.id; - contentDTO.resourceUrl = resource.url; - contentDTO.resourceType = resource.type; + contentDTO.resource = ResourceDTO(); + contentDTO.resource!.url = resource.url; + contentDTO.resource!.type = resource.type; + contentDTO.resource!.label = resource.label; } }, isSmall: true diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart b/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart index e2e4076..6aa8fd8 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart @@ -11,7 +11,7 @@ import 'package:provider/provider.dart'; class SliderConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final SliderDTO initialValue; final ValueChanged onChanged; const SliderConfig({ Key? key, @@ -32,7 +32,8 @@ class _SliderConfigState extends State { void initState() { super.initState(); - sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!; + //sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!; + sliderDTO = widget.initialValue; List test = new List.from(sliderDTO.contents!); sliderDTO.contents = test; sliderDTO.contents!.sort((a, b) => a.order!.compareTo(b.order!)); @@ -84,7 +85,7 @@ class _SliderConfigState extends State { List test = new List.from(images); sliderDTO.contents = test; List testToSend = new List.from(images); - testToSend = testToSend.where((element) => element.resourceUrl != null).toList(); + testToSend = testToSend.where((element) => element.resource != null && element.resource?.url != null).toList(); var sliderToSend = new SliderDTO(); sliderToSend.contents = testToSend; widget.onChanged(jsonEncode(sliderToSend).toString()); diff --git a/lib/Screens/Configurations/Section/SubSection/Weather/weather_config.dart b/lib/Screens/Configurations/Section/SubSection/Weather/weather_config.dart index 7049def..da2d139 100644 --- a/lib/Screens/Configurations/Section/SubSection/Weather/weather_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Weather/weather_config.dart @@ -6,7 +6,7 @@ import 'dart:convert'; class WeatherConfig extends StatefulWidget { final String? color; - final String initialValue; + final WeatherDTO initialValue; final ValueChanged onChanged; // To return video or web url const WeatherConfig({ Key? key, @@ -24,7 +24,7 @@ class _WeatherConfigState extends State { @override void initState() { - WeatherDTO test = WeatherDTO.fromJson(json.decode(widget.initialValue))!; + WeatherDTO test = widget.initialValue; resourceSource = test; super.initState(); } diff --git a/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart b/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart index dd52f11..ecd50db 100644 --- a/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart @@ -7,7 +7,7 @@ import 'dart:convert'; class WebOrVideoConfig extends StatefulWidget { final String? color; final String? label; - final String initialValue; + final WebDTO initialValue; final ValueChanged onChanged; // To return video or web url const WebOrVideoConfig({ Key? key, @@ -26,7 +26,7 @@ class _WebOrVideoConfigState extends State { @override void initState() { - WebDTO test = WebDTO.fromJson(json.decode(widget.initialValue))!; + WebDTO test = widget.initialValue; resourceSource = test; super.initState(); } diff --git a/lib/Screens/Configurations/Section/section_detail_screen.dart b/lib/Screens/Configurations/Section/section_detail_screen.dart index 0299289..d512e13 100644 --- a/lib/Screens/Configurations/Section/section_detail_screen.dart +++ b/lib/Screens/Configurations/Section/section_detail_screen.dart @@ -48,6 +48,7 @@ class SectionDetailScreen extends StatefulWidget { } class _SectionDetailScreenState extends State { + late SectionDTO sectionDTO; @override Widget build(BuildContext context) { @@ -55,23 +56,31 @@ class _SectionDetailScreenState extends State { Size size = MediaQuery.of(context).size; GlobalKey globalKey = new GlobalKey(); + Object? rawSectionData; return FutureBuilder( future: getSection(widget.id, (appContext.getContext() as ManagerAppContext).clientAPI!), builder: (context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done) { - return Stack( - children: [ - bodySection(snapshot.data, size, appContext, context, globalKey), - Align( - alignment: AlignmentDirectional.bottomCenter, - child: Container( - height: 80, - child: getButtons(snapshot.data, appContext), - ), - ) - ], - ); + rawSectionData = snapshot.data; + sectionDTO = SectionDTO.fromJson(rawSectionData)!; // TODO handle null value ! + + if(sectionDTO != null) { + return Stack( + children: [ + bodySection(rawSectionData, size, appContext, context, globalKey), + Align( + alignment: AlignmentDirectional.bottomCenter, + child: Container( + height: 80, + child: getButtons(sectionDTO!, appContext), + ), + ) + ], + ); + } else { + return Center(child: Text("Une erreur est survenue lors de la récupération de la section")); + } } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { @@ -86,8 +95,9 @@ class _SectionDetailScreenState extends State { ); } - Widget bodySection(SectionDTO? sectionDTO, Size size, AppContext appContext, BuildContext context, GlobalKey globalKey) { + Widget bodySection(Object? rawSectionDTO, Size size, AppContext appContext, BuildContext context, GlobalKey globalKey) { ManagerAppContext managerAppContext = appContext.getContext(); + //SectionDTO? sectionDTO = SectionDTO.fromJson(rawSectionDTO); return SingleChildScrollView( child: Column( @@ -204,7 +214,7 @@ class _SectionDetailScreenState extends State { onChanged: (value) { setState(() { sectionDTO.isBeacon = value; - save(true, sectionDTO, appContext); + save(false, sectionDTO, appContext); }); }, ), @@ -305,7 +315,7 @@ class _SectionDetailScreenState extends State { height: size.height * 0.5, child: Padding( padding: const EdgeInsets.all(10.0), - child: sectionDTO != null ? getSpecificData(sectionDTO, appContext) : null, + child: sectionDTO != null ? getSpecificData(sectionDTO, rawSectionDTO, appContext) : null, ), decoration: BoxDecoration( //color: Colors.lightGreen, @@ -370,8 +380,9 @@ class _SectionDetailScreenState extends State { Future cancel(SectionDTO sectionDTO, AppContext appContext) async { ManagerAppContext managerAppContext = appContext.getContext(); - SectionDTO? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionGetDetail(sectionDTO.id!); - managerAppContext.selectedSection = section; + Object? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionGetDetail(sectionDTO.id!); + // TODO parse as SectionDTO + managerAppContext.selectedSection = section as SectionDTO; appContext.setContext(managerAppContext); } @@ -396,89 +407,104 @@ class _SectionDetailScreenState extends State { appContext.setContext(managerAppContext); if (isTraduction) { - showNotification(Colors.green, kWhite, 'Les traductions de la section ont été sauvegardées avec succès', context, null); + showNotification(kSuccess, kWhite, 'Les traductions de la section ont été sauvegardées avec succès', context, null); } else { - showNotification(Colors.green, kWhite, 'La section a été sauvegardée avec succès', context, null); - } + showNotification(kSuccess, kWhite, 'La section a été sauvegardée avec succès', context, null); } + } + + getSpecificData(SectionDTO sectionDTO, Object? rawSectionData, AppContext appContext) { + // TODO handle null value ! - getSpecificData(SectionDTO sectionDTO, AppContext appContext) { switch(sectionDTO.type) { case SectionType.Map: + MapDTO mapDTO = MapDTO.fromJson(rawSectionData)!; return MapConfig( - initialValue: sectionDTO.data!, - onChanged: (String data) { - sectionDTO.data = data; + initialValue: mapDTO, + onChanged: (MapDTO mapDTO) { + // TODO DO something + //sectionDTO.data = data; //save(false, sectionDTO, appContext); }, ); case SectionType.Slider: + SliderDTO sliderDTO = SliderDTO.fromJson(rawSectionData)!; return SliderConfig( - initialValue: sectionDTO.data!, + initialValue: sliderDTO, onChanged: (String data) { - sectionDTO.data = data; - save(false, sectionDTO, appContext); + // TODO DO something + /*sectionDTO.data = data; + save(false, sectionDTO, appContext);*/ }, ); case SectionType.Video: case SectionType.Web: + WebDTO webDTO = WebDTO.fromJson(rawSectionData)!; return WebOrVideoConfig( label: sectionDTO.type == SectionType.Video ? "Url de la vidéo:": "Url du site web:", - initialValue: sectionDTO.data!, + initialValue: webDTO, onChanged: (String data) { - sectionDTO.data = data; + // TODO DO something + //sectionDTO.data = data; }, ); case SectionType.Menu: + MenuDTO menuDTO = MenuDTO.fromJson(rawSectionData)!; return MenuConfig( - initialValue: sectionDTO.data!, + initialValue: menuDTO, onChanged: (String data) { - sectionDTO.data = data; + //sectionDTO.data = data; }, ); case SectionType.Quizz: + QuizDTO quizDTO = QuizDTO.fromJson(rawSectionData)!; return QuizzConfig( - initialValue: sectionDTO.data!, + initialValue: quizDTO, onChanged: (String data) { - sectionDTO.data = data; + //sectionDTO.data = data; }, ); case SectionType.Article: + ArticleDTO articleDTO = ArticleDTO.fromJson(rawSectionData)!; return ArticleConfig( - initialValue: sectionDTO.data!, + initialValue: articleDTO, onChanged: (String data) { - sectionDTO.data = data; - save(false, sectionDTO, appContext); + /*sectionDTO.data = data; + save(false, sectionDTO, appContext);*/ }, ); case SectionType.Pdf: + PdfDTO pdfDTO = PdfDTO.fromJson(rawSectionData)!; return PDFConfig( - initialValue: sectionDTO.data!, + initialValue: pdfDTO, onChanged: (String data) { - sectionDTO.data = data; + //sectionDTO.data = data; //save(false, sectionDTO, appContext); }, ); case SectionType.Puzzle: + PuzzleDTO puzzleDTO = PuzzleDTO.fromJson(rawSectionData)!; return PuzzleConfig( - initialValue: sectionDTO.data!, + initialValue: puzzleDTO, onChanged: (String data) { - sectionDTO.data = data; + //sectionDTO.data = data; }, ); case SectionType.Agenda: + AgendaDTO agendaDTO = AgendaDTO.fromJson(rawSectionData)!; return AgendaConfig( - initialValue: sectionDTO.data!, + initialValue: agendaDTO, onChanged: (String data) { - sectionDTO.data = data; - save(false, sectionDTO, appContext); + /*sectionDTO.data = data; + save(false, sectionDTO, appContext);*/ }, ); case SectionType.Weather: + WeatherDTO weatherDTO = WeatherDTO.fromJson(rawSectionData)!; return WeatherConfig( - initialValue: sectionDTO.data!, + initialValue: weatherDTO, onChanged: (String data) { - sectionDTO.data = data; + //sectionDTO.data = data; //save(false, sectionDTO, appContext); }, ); @@ -486,10 +512,15 @@ class _SectionDetailScreenState extends State { } } -Future getSection(String sectionId, Client client) async { - SectionDTO? section = await client.sectionApi!.sectionGetDetail(sectionId); - //print(section); - return section; +Future getSection(String sectionId, Client client) async { + try{ + Object? section = await client.sectionApi!.sectionGetDetail(sectionId); + return section; + + } catch(e) { + print(e); + return null; + } } Future _captureAndSharePng(GlobalKey globalKey, String sectionId) async { diff --git a/lib/Screens/Configurations/configuration_detail_screen.dart b/lib/Screens/Configurations/configuration_detail_screen.dart index 5819264..710f229 100644 --- a/lib/Screens/Configurations/configuration_detail_screen.dart +++ b/lib/Screens/Configurations/configuration_detail_screen.dart @@ -100,7 +100,7 @@ class _ConfigurationDetailScreenState extends State { anchorElement.click(); } else { File test = await FileHelper().storeConfiguration(export); - showNotification(Colors.green, kWhite, "L'export de la configuration a réussi, le document se trouve à cet endroit : " + test.path, context, 3000); + showNotification(kSuccess, kWhite, "L'export de la configuration a réussi, le document se trouve à cet endroit : " + test.path, context, 3000); } } catch(e) { log(e.toString()); @@ -248,7 +248,7 @@ class _ConfigurationDetailScreenState extends State { configurationDTO.isMobile = value; }, ), - if(configurationDTO.isMobile!) + if(configurationDTO.isMobile != null && configurationDTO.isMobile!) RoundedButton( text: "Télécharger les QRCodes", icon: Icons.qr_code, @@ -507,6 +507,11 @@ class _ConfigurationDetailScreenState extends State { ManagerAppContext managerAppContext = appContext.getContext(); await managerAppContext.clientAPI!.sectionApi!.sectionUpdateOrder(sections!); }, + askReload: () { + setState(() { + // refresh UI + }); + }, ), ), ), @@ -529,6 +534,7 @@ class _ConfigurationDetailScreenState extends State { await managerAppContext.clientAPI!.configurationApi!.configurationDelete(configurationDTO.id!); managerAppContext.selectedConfiguration = null; appContext.setContext(managerAppContext); + showNotification(kSuccess, kWhite, 'La configuration a été supprimée avec succès', context, null); }, context ); @@ -540,7 +546,7 @@ class _ConfigurationDetailScreenState extends State { managerAppContext.selectedConfiguration = configuration; appContext.setContext(managerAppContext); - showNotification(Colors.green, kWhite, 'La configuration a été sauvegardée avec succès', context, null); + showNotification(kSuccess, kWhite, 'La configuration a été sauvegardée avec succès', context, null); } Future getConfiguration(ConfigurationDetailScreen widget, Client client) async { diff --git a/lib/Screens/Configurations/configurations_screen.dart b/lib/Screens/Configurations/configurations_screen.dart index a70ae36..0af484e 100644 --- a/lib/Screens/Configurations/configurations_screen.dart +++ b/lib/Screens/Configurations/configurations_screen.dart @@ -1,6 +1,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/Components/loading_common.dart'; +import 'package:manager_app/Components/message_notification.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/configuration_detail_screen.dart'; import 'package:manager_app/Screens/Configurations/new_configuration_popup.dart'; @@ -68,15 +69,33 @@ class _ConfigurationsScreenState extends State { itemBuilder: (BuildContext context, int index) { return InkWell( - onTap: () { + onTap: () async { if (data[index].id == null) { - showNewConfiguration(appContext, (bool) { + var configurationToCreate = await showNewConfiguration(appContext, (bool) { if (bool) { setState(() { // Thanks future builder for the refresh.. }); } }, context, mainContext); + if(configurationToCreate != null) { + if (configurationToCreate.label != null) { + configurationToCreate.dateCreation = DateTime.now(); + configurationToCreate.isMobile = false; + configurationToCreate.isTablet = false; + configurationToCreate.isOffline = false; + configurationToCreate.isDate = false; + configurationToCreate.isHour = false; + configurationToCreate.isSectionImageBackground = false; + configurationToCreate.instanceId = (appContext.getContext() as ManagerAppContext).instanceId; + await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationToCreate); + ManagerAppContext managerAppContext = appContext.getContext(); + managerAppContext.selectedConfiguration = null; + await appContext.setContext(managerAppContext); + + showNotification(kSuccess, kWhite, 'La configuration a été créée avec succès', context, null); + } + } } else { setState(() { ManagerAppContext managerAppContext = appContext.getContext(); diff --git a/lib/Screens/Configurations/new_configuration_popup.dart b/lib/Screens/Configurations/new_configuration_popup.dart index 8aaebdd..0bb2b26 100644 --- a/lib/Screens/Configurations/new_configuration_popup.dart +++ b/lib/Screens/Configurations/new_configuration_popup.dart @@ -10,12 +10,12 @@ import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_api_new/api.dart'; -void showNewConfiguration(AppContext appContext, ValueChanged isImport, BuildContext context, BuildContext mainContext) { +Future showNewConfiguration(AppContext appContext, ValueChanged isImport, BuildContext context, BuildContext mainContext) { ConfigurationDTO configurationDTO = new ConfigurationDTO(); Size size = MediaQuery.of(mainContext).size; configurationDTO.label = ""; - showDialog( + var configuration = showDialog( builder: (BuildContext context) => AlertDialog( shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(20.0)) @@ -107,7 +107,8 @@ void showNewConfiguration(AppContext appContext, ValueChanged isImport, Bu textColor: kWhite, press: () { if(configurationDTO.label != null && configurationDTO.label!.length > 2) { - create(configurationDTO, appContext, context); + //create(configurationDTO, appContext, context); + Navigator.of(context).pop(configurationDTO); } else { showNotification(Colors.orange, kWhite, 'Veuillez spécifier un nom pour la nouvelle visite', context, null); } @@ -121,6 +122,8 @@ void showNewConfiguration(AppContext appContext, ValueChanged isImport, Bu ], ), context: context ); + + return configuration; } String filePicker() { @@ -141,22 +144,21 @@ String filePicker() { void create(ConfigurationDTO configurationDTO, AppContext appContext, context) async { if (configurationDTO.label != null) { - configurationDTO.dateCreation = DateTime.now(); + /*configurationDTO.dateCreation = DateTime.now(); configurationDTO.isMobile = false; configurationDTO.isTablet = false; configurationDTO.isOffline = false; configurationDTO.isDate = false; configurationDTO.isHour = false; configurationDTO.isSectionImageBackground = false; - configurationDTO.isWeather = false; configurationDTO.instanceId = (appContext.getContext() as ManagerAppContext).instanceId; await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationDTO); ManagerAppContext managerAppContext = appContext.getContext(); managerAppContext.selectedConfiguration = null; - appContext.setContext(managerAppContext); + await appContext.setContext(managerAppContext); - showNotification(Colors.green, kWhite, 'La configuration a été créée avec succès', context, null); + showNotification(Colors.green, kWhite, 'La configuration a été créée avec succès', context, null);*/ - Navigator.of(context).pop(); + Navigator.of(context).pop(configurationDTO); } } \ No newline at end of file diff --git a/lib/Screens/Configurations/new_section_popup.dart b/lib/Screens/Configurations/new_section_popup.dart index bfe46c7..b6f8d9a 100644 --- a/lib/Screens/Configurations/new_section_popup.dart +++ b/lib/Screens/Configurations/new_section_popup.dart @@ -9,7 +9,7 @@ import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_api_new/api.dart'; -void showNewSection(String configurationId, AppContext appContext, BuildContext contextBuild, bool isSubSection, Function? sendSubSection, bool isMobile) { +Future showNewSection(String configurationId, AppContext appContext, BuildContext contextBuild, bool isSubSection, Function? sendSubSection, bool isMobile) { SectionDTO sectionDTO = new SectionDTO(); sectionDTO.label = ""; sectionDTO.configurationId = configurationId; @@ -18,7 +18,7 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext Size size = MediaQuery.of(contextBuild).size; sectionDTO.type = isMobile ? SectionType.Article : SectionType.Map; - showDialog( + var section = showDialog( builder: (BuildContext context) => AlertDialog( shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(20.0)) @@ -102,7 +102,8 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext press: () { if(sectionDTO.label != null && sectionDTO.label!.length > 2) { //onYes(); - create(sectionDTO, appContext, context, isSubSection, sendSubSection); + Navigator.of(context).pop(sectionDTO); + //create(sectionDTO, appContext, context, isSubSection, sendSubSection); } else { showNotification(Colors.orange, kWhite, 'Veuillez spécifier un nom pour la nouvelle section', context, null); } @@ -116,6 +117,8 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext ], ), context: contextBuild ); + + return section; } void create(SectionDTO sectionDTO, AppContext appContext, BuildContext context, bool isSubSection, Function? sendSubSection) async { @@ -132,7 +135,7 @@ void create(SectionDTO sectionDTO, AppContext appContext, BuildContext context, } managerAppContext.selectedConfiguration.sectionIds.add(newSection.id);*/ appContext.setContext(managerAppContext); - showNotification(Colors.green, kWhite, 'La section a été créée avec succès !', context, null); + showNotification(kSuccess, kWhite, 'La section a été créée avec succès !', context, null); } else { sendSubSection!(newSection); } diff --git a/lib/Screens/Configurations/section_reorderList.dart b/lib/Screens/Configurations/section_reorderList.dart index 92ba524..8f6944b 100644 --- a/lib/Screens/Configurations/section_reorderList.dart +++ b/lib/Screens/Configurations/section_reorderList.dart @@ -1,5 +1,6 @@ import 'package:diacritic/diacritic.dart'; import 'package:flutter/material.dart'; +import 'package:manager_app/Components/message_notification.dart'; import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/listView_card_section.dart'; @@ -13,11 +14,13 @@ class SectionReorderList extends StatefulWidget { final String configurationId; final List sectionsIn; final ValueChanged> onChangedOrder; + final Function askReload; const SectionReorderList({ Key? key, required this.configurationId, required this.sectionsIn, required this.onChangedOrder, + required this.askReload, }) : super(key: key); @override @@ -81,12 +84,12 @@ class _SectionReorderListState extends State { Key('$index'), currentConfiguration.isMobile!, appContext, - (section) { - setState(() { - ManagerAppContext managerAppContext = appContext.getContext(); - managerAppContext.selectedSection = section; - appContext.setContext(managerAppContext); - }); + (section) { + setState(() { + ManagerAppContext managerAppContext = appContext.getContext(); + managerAppContext.selectedSection = section; + appContext.setContext(managerAppContext); + }); } ); }, @@ -143,8 +146,20 @@ class _SectionReorderListState extends State { top: 10, right: 10, child: InkWell( - onTap: () { - showNewSection(widget.configurationId, appContext, context, false, null, currentConfiguration.isMobile!); + onTap: () async { + var sectionToCreate = await showNewSection(widget.configurationId, appContext, context, false, null, currentConfiguration.isMobile!); + if(sectionToCreate != null) + { + ManagerAppContext managerAppContext = appContext.getContext(); + sectionToCreate.instanceId = managerAppContext.instanceId; + sectionToCreate.isBeacon = false; + sectionToCreate.dateCreation = DateTime.now(); + SectionDTO? newSection = await managerAppContext.clientAPI!.sectionApi!.sectionCreate(sectionToCreate); + + showNotification(kSuccess, kWhite, 'La section a été créée avec succès !', context, null); + + widget.askReload(); + } }, child: Container( height: MediaQuery.of(context).size.width * 0.04, diff --git a/lib/Screens/Devices/device_element.dart b/lib/Screens/Devices/device_element.dart index 541526b..1c722f7 100644 --- a/lib/Screens/Devices/device_element.dart +++ b/lib/Screens/Devices/device_element.dart @@ -40,7 +40,7 @@ class _DeviceElementState extends State { width: 15, height: 15, decoration: BoxDecoration( - color: deviceDTO.connected! ? Colors.green : Colors.red, + color: deviceDTO.connected! ? Colors.green : kError, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(25.0), boxShadow: [ diff --git a/lib/Screens/Main/components/body.dart b/lib/Screens/Main/components/body.dart index 6a20f3b..82c682c 100644 --- a/lib/Screens/Main/components/body.dart +++ b/lib/Screens/Main/components/body.dart @@ -63,8 +63,13 @@ class _BodyState extends State { menu.sections!.add(configurations); menu.sections!.add(resources); + ManagerAppContext managerAppContext = appContext.getContext(); + + currentPosition = managerAppContext.currentPositionMenu ?? currentPosition; + selectedElement = initElementToShow(currentPosition, menu); + return Background( child: Row( children: [ @@ -110,6 +115,8 @@ class _BodyState extends State { setState(() { currentPosition = section.order; selectedElement = initElementToShow(currentPosition, menu); + managerAppContext.currentPositionMenu = currentPosition; + appContext.setContext(managerAppContext); }) }, child: Container( diff --git a/lib/Screens/Main/main_screen.dart b/lib/Screens/Main/main_screen.dart index 140b659..58c107a 100644 --- a/lib/Screens/Main/main_screen.dart +++ b/lib/Screens/Main/main_screen.dart @@ -18,6 +18,8 @@ class MainScreen extends StatefulWidget { class _MainScreenState extends State { @override Widget build(BuildContext context) { + final GlobalKey<_MainScreenState> key = GlobalKey(); + final appContext = Provider.of(context); ManagerAppContext managerAppContext = appContext.getContext(); @@ -25,10 +27,12 @@ class _MainScreenState extends State { if(!ResponsiveBreakpoints.of(context).equals(TABLET) || isFortSt) { return Scaffold( + key: key, body: Body(showDevice: !isFortSt), ); } else { return Scaffold( + key: key, appBar: AppBar(title: Text("MyInfoMate", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)), drawer: Drawer( child: getMenu() diff --git a/lib/Screens/login_screen.dart b/lib/Screens/login_screen.dart index 3296fc1..bf4b694 100644 --- a/lib/Screens/login_screen.dart +++ b/lib/Screens/login_screen.dart @@ -30,14 +30,14 @@ class LoginScreen extends StatefulWidget { class _LoginScreenState extends State { String email = ""; // DEV "test@email.be" String password = ""; // DEV = "kljqsdkljqsd" - String? host = "https://api.myinfomate.be"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089 + String? host = "http://localhost:5000"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089 Client? clientAPI; bool isLoading = false; bool isRememberMe = false; String pageTitle = "MyInfoMate"; String? token; String? instanceId; - int? pinCode; + String? pinCode; Storage localStorage = window.localStorage; void authenticateTRY(AppContext appContext, bool fromClick) async { @@ -128,7 +128,12 @@ class _LoginScreenState extends State { isLoading = false; }); } - Navigator.pushAndRemoveUntil( + Navigator.pushNamedAndRemoveUntil( + context, + '/main', // <- correspond à ta route définie + (Route route) => false, + ); + /*Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) { @@ -136,7 +141,7 @@ class _LoginScreenState extends State { }, ), (Route route) => false // For pushAndRemoveUntil - ); + );*/ } else { showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null); setState(() { @@ -173,7 +178,7 @@ class _LoginScreenState extends State { @override void initState() { //this.isRememberMe = widget.session.rememberMe; - this.host = "https://api.myinfomate.be"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be" + this.host = "http://localhost:5000"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be" //this.email = "test@email.be"; //widget.session.email; //this.password = "kljqsdkljqsd"; //widget.session.password; @@ -190,7 +195,7 @@ class _LoginScreenState extends State { this.instanceId = localStorage.entries.where((element) => element.key == "instanceId").first.value; } if(localStorage.containsKey("pinCode")) { - this.pinCode = int.tryParse(localStorage.entries.where((element) => element.key == "pinCode").first.value); + this.pinCode = localStorage.entries.where((element) => element.key == "pinCode").first.value; } } super.initState(); @@ -227,6 +232,8 @@ class _LoginScreenState extends State { final appContext = Provider.of(context); Size size = MediaQuery.of(context).size; + final GlobalKey<_LoginScreenState> loginKey = GlobalKey(); + initInstance(appContext.getContext()); // ==> We need to work with route or something else like pop-up (pop up is nice) to make it works ! @@ -236,6 +243,7 @@ class _LoginScreenState extends State { }*/ return Scaffold( + key: loginKey, body: Center( child: SingleChildScrollView( child: Container( diff --git a/lib/api/openApiTest.dart b/lib/api/openApiTest.dart index 055e815..ced3dad 100644 --- a/lib/api/openApiTest.dart +++ b/lib/api/openApiTest.dart @@ -1,11 +1,11 @@ +// Openapi Generator last run: : 2025-05-07T14:31:51.428558 import 'package:openapi_generator_annotations/openapi_generator_annotations.dart'; @Openapi( additionalProperties: AdditionalProperties(pubName: 'manager_api_new', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), - inputSpecFile: 'lib/api/swagger.yaml', + inputSpec: InputSpec(path: 'lib/api/swagger.yaml'), generatorName: Generator.dart, - alwaysRun: true, outputDirectory: 'manager_api_new') class Example extends OpenapiGeneratorConfig {} diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml index 7a074e5..7f1fea3 100644 --- a/lib/api/swagger.yaml +++ b/lib/api/swagger.yaml @@ -1,2693 +1,4939 @@ -x-generator: NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0)) -openapi: 3.0.0 -info: - title: Manager Service - description: API Manager Service - version: Version Alpha -servers: - - url: https://api.myinfomate.be -paths: - /api/Configuration: - get: - tags: - - Configuration - operationId: Configuration_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ConfigurationDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - post: - tags: - - Configuration - operationId: Configuration_Create - requestBody: - x-name: newConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Configuration - operationId: Configuration_Update - requestBody: - x-name: updatedConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/byPin: - get: - tags: - - Configuration - operationId: Configuration_GetConfigurationsByPinCode - parameters: - - name: pinCode - in: query - schema: - type: integer - format: int32 - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ConfigurationDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Configuration/{id}: - get: - tags: - - Configuration - operationId: Configuration_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Configuration - operationId: Configuration_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}/export: - get: - tags: - - Configuration - operationId: Configuration_Export - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - - name: language - in: query - schema: - type: string - nullable: true - x-position: 2 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Configuration/import: - post: - tags: - - Configuration - operationId: Configuration_Import - requestBody: - x-name: exportConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ExportConfigurationDTO' - required: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device: - get: - tags: - - Device - operationId: Device_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Device - operationId: Device_Create - requestBody: - x-name: newDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - Device - operationId: Device_Update - requestBody: - x-name: updatedDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}/detail: - get: - tags: - - Device - operationId: Device_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Device/mainInfos: - put: - tags: - - Device - operationId: Device_UpdateMainInfos - requestBody: - x-name: deviceIn - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}: - delete: - tags: - - Device - operationId: Device_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Instance: - get: - tags: - - Instance - operationId: Instance_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Instance' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Instance - operationId: Instance_CreateInstance - requestBody: - x-name: newInstance - content: - application/json: - schema: - $ref: '#/components/schemas/Instance' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Instance - operationId: Instance_Updateinstance - requestBody: - x-name: updatedInstance - content: - application/json: - schema: - $ref: '#/components/schemas/Instance' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Instance/{id}: - get: - tags: - - Instance - operationId: Instance_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - Instance - operationId: Instance_DeleteInstance - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Instance/byPin: - get: - tags: - - Instance - operationId: Instance_GetInstanceByPinCode - parameters: - - name: pinCode - in: query - schema: - type: integer - format: int32 - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/InstanceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Resource: - get: - tags: - - Resource - operationId: Resource_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 - - name: types - in: query - style: form - explode: true - schema: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResourceType' - x-position: 2 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ResourceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Resource - operationId: Resource_Create - requestBody: - x-name: newResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Resource - operationId: Resource_Update - requestBody: - x-name: updatedResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/{id}/detail: - get: - tags: - - Resource - operationId: Resource_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Resource/{id}: - get: - tags: - - Resource - operationId: Resource_Show - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Resource - operationId: Resource_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/upload: - post: - tags: - - Resource - operationId: Resource_Upload - requestBody: - content: - multipart/form-data: - schema: - properties: - label: - type: string - nullable: true - type: - type: string - nullable: true - instanceId: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section: - get: - tags: - - Section - operationId: Section_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Section - operationId: Section_Create - requestBody: - x-name: newSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Section - operationId: Section_Update - requestBody: - x-name: updatedSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/configuration/{id}: - get: - tags: - - Section - operationId: Section_GetFromConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_DeleteAllForConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}/subsections: - get: - tags: - - Section - operationId: Section_GetAllSectionSubSections - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: {} - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}: - get: - tags: - - Section - operationId: Section_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/beacons/{instanceId}: - get: - tags: - - Section - operationId: Section_GetAllBeaconsForInstance - parameters: - - name: instanceId - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Section/order: - put: - tags: - - Section - operationId: Section_UpdateOrder - requestBody: - x-name: updatedSectionsOrder - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/MapDTO: - get: - tags: - - Section - operationId: Section_GetMapDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MapDTO' - security: - - bearer: [] - /api/Section/SliderDTO: - get: - tags: - - Section - operationId: Section_GetSliderDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SliderDTO' - security: - - bearer: [] - /api/Section/VideoDTO: - get: - tags: - - Section - operationId: Section_GetVideoDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/VideoDTO' - security: - - bearer: [] - /api/Section/WebDTO: - get: - tags: - - Section - operationId: Section_GetWebDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/WebDTO' - security: - - bearer: [] - /api/Section/MenuDTO: - get: - tags: - - Section - operationId: Section_GetMenuDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MenuDTO' - security: - - bearer: [] - /api/Section/PlayerMessageDTO: - get: - tags: - - Section - operationId: Section_PlayerMessageDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PlayerMessageDTO' - security: - - bearer: [] - /api/Section/QuizzDTO: - get: - tags: - - Section - operationId: Section_GetQuizzDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/QuizzDTO' - security: - - bearer: [] - /api/Section/ArticleDTO: - get: - tags: - - Section - operationId: Section_GetArticleDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ArticleDTO' - security: - - bearer: [] - /api/Section/PdfDTO: - get: - tags: - - Section - operationId: Section_GetPdfDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PdfDTO' - security: - - bearer: [] - /api/Section/PuzzleDTO: - get: - tags: - - Section - operationId: Section_GetPuzzleDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PuzzleDTO' - security: - - bearer: [] - /api/Section/AgendaDTO: - get: - tags: - - Section - operationId: Section_GetAgendaDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/AgendaDTO' - security: - - bearer: [] - /api/Section/WeatherDTO: - get: - tags: - - Section - operationId: Section_GetWeatherDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/WeatherDTO' - security: - - bearer: [] - /api/User: - get: - tags: - - User - operationId: User_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - User - operationId: User_CreateUser - requestBody: - x-name: newUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - User - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/User/{id}: - get: - tags: - - User - operationId: User_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - User - operationId: User_DeleteUser - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Authentication/Token: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithForm - requestBody: - content: - multipart/form-data: - schema: - properties: - grant_type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - client_id: - type: string - nullable: true - client_secret: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Authentication/Authenticate: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithJson - requestBody: - x-name: login - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string -components: - schemas: - ConfigurationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - primaryColor: - type: string - nullable: true - secondaryColor: - type: string - nullable: true - languages: - type: array - nullable: true - items: - type: string - dateCreation: - type: string - format: date-time - isMobile: - type: boolean - isTablet: - type: boolean - isOffline: - type: boolean - instanceId: - type: string - nullable: true - sectionIds: - type: array - nullable: true - items: - type: string - loaderImageId: - type: string - nullable: true - loaderImageUrl: - type: string - nullable: true - weatherCity: - type: string - nullable: true - weatherUpdatedDate: - type: string - format: date-time - nullable: true - weatherResult: - type: string - nullable: true - isWeather: - type: boolean - isDate: - type: boolean - isHour: - type: boolean - isSectionImageBackground: - type: boolean - roundedValue: - type: integer - format: int32 - nullable: true - screenPercentageSectionsMainPage: - type: integer - format: int32 - nullable: true - TranslationDTO: - type: object - additionalProperties: false - properties: - language: - type: string - nullable: true - value: - type: string - nullable: true - ExportConfigurationDTO: - allOf: - - $ref: '#/components/schemas/ConfigurationDTO' - - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - resources: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResourceDTO' - SectionDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - configurationId: - type: string - nullable: true - isSubSection: - type: boolean - parentId: - type: string - nullable: true - type: - $ref: '#/components/schemas/SectionType' - data: - type: string - nullable: true - dateCreation: - type: string - format: date-time - order: - type: integer - format: int32 - nullable: true - instanceId: - type: string - nullable: true - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - meterZoneGPS: - type: integer - format: int32 - nullable: true - isBeacon: - type: boolean - beaconId: - type: integer - format: int32 - nullable: true - SectionType: - type: integer - description: |- - 0 = Map - 1 = Slider - 2 = Video - 3 = Web - 4 = Menu - 5 = Quizz - 6 = Article - 7 = PDF - 8 = Puzzle - 9 = Agenda - 10 = Weather - x-enumNames: - - Map - - Slider - - Video - - Web - - Menu - - Quizz - - Article - - PDF - - Puzzle - - Agenda - - Weather - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - ResourceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - $ref: '#/components/schemas/ResourceType' - label: - type: string - nullable: true - url: - type: string - nullable: true - dateCreation: - type: string - format: date-time - instanceId: - type: string - nullable: true - ResourceType: - type: integer - description: |- - 0 = Image - 1 = Video - 2 = ImageUrl - 3 = VideoUrl - 4 = Audio - 5 = PDF - 6 = JSON - 7 = JSONUrl - x-enumNames: - - Image - - Video - - ImageUrl - - VideoUrl - - Audio - - PDF - - JSON - - JSONUrl - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - DeviceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - identifier: - type: string - nullable: true - name: - type: string - nullable: true - ipAddressWLAN: - type: string - nullable: true - ipAddressETH: - type: string - nullable: true - configurationId: - type: string - nullable: true - configuration: - type: string - nullable: true - connected: - type: boolean - dateCreation: - type: string - format: date-time - dateUpdate: - type: string - format: date-time - instanceId: - type: string - nullable: true - DeviceDetailDTO: - allOf: - - $ref: '#/components/schemas/DeviceDTO' - - type: object - additionalProperties: false - properties: - connectionLevel: - type: string - nullable: true - lastConnectionLevel: - type: string - format: date-time - batteryLevel: - type: string - nullable: true - lastBatteryLevel: - type: string - format: date-time - Instance: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - dateCreation: - type: string - format: date-time - pinCode: - type: integer - format: int32 - nullable: true - InstanceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - dateCreation: - type: string - format: date-time - pinCode: - type: integer - format: int32 - nullable: true - MapDTO: - type: object - additionalProperties: false - properties: - zoom: - type: integer - format: int32 - mapType: - nullable: true - oneOf: - - $ref: '#/components/schemas/MapTypeApp' - mapTypeMapbox: - nullable: true - oneOf: - - $ref: '#/components/schemas/MapTypeMapBox' - mapProvider: - nullable: true - oneOf: - - $ref: '#/components/schemas/MapProvider' - points: - type: array - nullable: true - items: - $ref: '#/components/schemas/GeoPointDTO' - iconResourceId: - type: string - nullable: true - iconSource: - type: string - nullable: true - categories: - type: array - nullable: true - items: - $ref: '#/components/schemas/CategorieDTO' - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - MapTypeApp: - type: integer - description: |- - 0 = none - 1 = normal - 2 = satellite - 3 = terrain - 4 = hybrid - x-enumNames: - - none - - normal - - satellite - - terrain - - hybrid - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - MapTypeMapBox: - type: integer - description: |- - 0 = standard - 1 = streets - 2 = outdoors - 3 = light - 4 = dark - 5 = satellite - 6 = satellite_streets - x-enumNames: - - standard - - streets - - outdoors - - light - - dark - - satellite - - satellite_streets - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - MapProvider: - type: integer - description: |- - 0 = Google - 1 = MapBox - x-enumNames: - - Google - - MapBox - enum: - - 0 - - 1 - GeoPointDTO: - type: object - additionalProperties: false - properties: - id: - type: integer - format: int32 - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - contents: - type: array - nullable: true - items: - $ref: '#/components/schemas/ContentGeoPoint' - categorie: - nullable: true - oneOf: - - $ref: '#/components/schemas/CategorieDTO' - categorieId: - type: integer - format: int32 - nullable: true - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - imageResourceId: - type: string - nullable: true - imageUrl: - type: string - nullable: true - schedules: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - prices: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - phone: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - email: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - site: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - ContentGeoPoint: - type: object - additionalProperties: false - properties: - resourceId: - type: string - nullable: true - resourceType: - $ref: '#/components/schemas/ResourceType' - resourceUrl: - type: string - nullable: true - resourceName: - type: string - nullable: true - CategorieDTO: - type: object - additionalProperties: false - properties: - id: - type: integer - format: int32 - nullable: true - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - icon: - type: string - nullable: true - iconResourceId: - type: string - nullable: true - iconUrl: - type: string - nullable: true - order: - type: integer - format: int32 - nullable: true - SliderDTO: - type: object - additionalProperties: false - properties: - contents: - type: array - nullable: true - items: - $ref: '#/components/schemas/ContentDTO' - ContentDTO: - type: object - additionalProperties: false - properties: - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - resourceUrl: - type: string - nullable: true - order: - type: integer - format: int32 - resourceType: - $ref: '#/components/schemas/ResourceType' - VideoDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - WebDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - MenuDTO: - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - PlayerMessageDTO: - type: object - additionalProperties: false - properties: - configChanged: - type: boolean - isDeleted: - type: boolean - QuizzDTO: - type: object - additionalProperties: false - properties: - questions: - type: array - nullable: true - items: - $ref: '#/components/schemas/QuestionDTO' - bad_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - medium_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - good_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - great_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - QuestionDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - responses: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResponseDTO' - imageBackgroundResourceId: - type: string - nullable: true - imageBackgroundResourceType: - nullable: true - oneOf: - - $ref: '#/components/schemas/ResourceType' - imageBackgroundResourceUrl: - type: string - nullable: true - order: - type: integer - format: int32 - TranslationAndResourceDTO: - type: object - additionalProperties: false - properties: - language: - type: string - nullable: true - value: - type: string - nullable: true - resourceId: - type: string - nullable: true - resourceType: - nullable: true - oneOf: - - $ref: '#/components/schemas/ResourceType' - resourceUrl: - type: string - nullable: true - ResponseDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - isGood: - type: boolean - order: - type: integer - format: int32 - LevelDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - ArticleDTO: - type: object - additionalProperties: false - properties: - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - isContentTop: - type: boolean - audioIds: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - isReadAudioAuto: - type: boolean - contents: - type: array - nullable: true - items: - $ref: '#/components/schemas/ContentDTO' - PdfDTO: - type: object - additionalProperties: false - properties: - pdfs: - type: array - nullable: true - items: - $ref: '#/components/schemas/PDFFileDTO' - PDFFileDTO: - type: object - additionalProperties: false - properties: - pdfFilesAndTitles: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - order: - type: integer - format: int32 - nullable: true - PuzzleDTO: - type: object - additionalProperties: false - properties: - messageDebut: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - messageFin: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationAndResourceDTO' - image: - nullable: true - oneOf: - - $ref: '#/components/schemas/ContentDTO' - rows: - type: integer - format: int32 - cols: - type: integer - format: int32 - AgendaDTO: - type: object - additionalProperties: false - properties: - resourceIds: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - mapProvider: - nullable: true - oneOf: - - $ref: '#/components/schemas/MapProvider' - WeatherDTO: - type: object - additionalProperties: false - properties: - city: - type: string - nullable: true - updatedDate: - type: string - format: date-time - nullable: true - result: - type: string - nullable: true - User: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - password: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - token: - type: string - nullable: true - dateCreation: - type: string - format: date-time - instanceId: - type: string - nullable: true - UserDetailDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - TokenDTO: - type: object - additionalProperties: false - properties: - access_token: - type: string - nullable: true - refresh_token: - type: string - nullable: true - scope: - type: string - nullable: true - token_type: - type: string - nullable: true - expires_in: - type: integer - format: int32 - expiration: - type: string - format: date-time - instanceId: - type: string - nullable: true - pinCode: - type: integer - format: int32 - nullable: true - LoginDTO: - type: object - additionalProperties: false - properties: - email: - type: string - nullable: true - password: - type: string - nullable: true - securitySchemes: - bearer: - type: oauth2 - description: Manager Authentication - flows: - password: - authorizationUrl: /authentication/Token - tokenUrl: /api/authentication/Token - scopes: - Manager-api: Manager WebAPI -security: - - bearer: [] -tags: - - name: Configuration - description: Configuration management - - name: Device - description: Device management - - name: Instance - description: Instance management - - name: Resource - description: Resource management - - name: Section - description: Section management - - name: User - description: User management - - name: Authentication - description: Authentication management +{ + "x-generator": "NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0))", + "openapi": "3.0.0", + "info": { + "title": "Manager Service", + "description": "API Manager Service", + "version": "Version Alpha 0" + }, + "servers": [ + { + "url": "https://localhost:5001" + } + ], + "paths": { + "/api/Configuration": { + "get": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Get", + "parameters": [ + { + "name": "instanceId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Create", + "requestBody": { + "x-name": "newConfiguration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Update", + "requestBody": { + "x-name": "updatedConfiguration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Configuration/byPin": { + "get": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_GetConfigurationsByPinCode", + "parameters": [ + { + "name": "pinCode", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Configuration/{id}": { + "get": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigurationDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Configuration/{id}/export": { + "get": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Export", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "language", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Configuration/import": { + "post": { + "tags": [ + "Configuration" + ], + "operationId": "Configuration_Import", + "requestBody": { + "x-name": "exportConfiguration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportConfigurationDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Device": { + "get": { + "tags": [ + "Device" + ], + "operationId": "Device_Get", + "parameters": [ + { + "name": "instanceId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "Device" + ], + "operationId": "Device_Create", + "requestBody": { + "x-name": "newDevice", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "put": { + "tags": [ + "Device" + ], + "operationId": "Device_Update", + "requestBody": { + "x-name": "updatedDevice", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Device/{id}/detail": { + "get": { + "tags": [ + "Device" + ], + "operationId": "Device_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Device/mainInfos": { + "put": { + "tags": [ + "Device" + ], + "operationId": "Device_UpdateMainInfos", + "requestBody": { + "x-name": "deviceIn", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Device/{id}": { + "delete": { + "tags": [ + "Device" + ], + "operationId": "Device_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Instance": { + "get": { + "tags": [ + "Instance" + ], + "operationId": "Instance_Get", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "Instance" + ], + "operationId": "Instance_CreateInstance", + "requestBody": { + "x-name": "newInstance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Instance" + ], + "operationId": "Instance_Updateinstance", + "requestBody": { + "x-name": "updatedInstance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Instance/{id}": { + "get": { + "tags": [ + "Instance" + ], + "operationId": "Instance_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "Instance" + ], + "operationId": "Instance_DeleteInstance", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Instance/byPin": { + "get": { + "tags": [ + "Instance" + ], + "operationId": "Instance_GetInstanceByPinCode", + "parameters": [ + { + "name": "pinCode", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Resource": { + "get": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Get", + "parameters": [ + { + "name": "instanceId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "types", + "in": "query", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResourceType" + } + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Create", + "requestBody": { + "x-name": "newResource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Update", + "requestBody": { + "x-name": "updatedResource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Resource/{id}/detail": { + "get": { + "tags": [ + "Resource" + ], + "operationId": "Resource_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Resource/{id}": { + "get": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Show", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Resource/upload": { + "post": { + "tags": [ + "Resource" + ], + "operationId": "Resource_Upload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "label": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "instanceId": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_Get", + "parameters": [ + { + "name": "instanceId", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "Section" + ], + "operationId": "Section_Create", + "requestBody": { + "x-name": "newSection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SectionDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "Section" + ], + "operationId": "Section_Update", + "requestBody": { + "x-name": "updatedSection", + "content": { + "application/json": { + "schema": {} + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/configuration/{id}": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetFromConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Section" + ], + "operationId": "Section_DeleteAllForConfiguration", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/{id}/subsections": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetAllSectionSubSections", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/{id}": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Section" + ], + "operationId": "Section_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/beacons/{instanceId}": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetAllBeaconsForInstance", + "parameters": [ + { + "name": "instanceId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Section/order": { + "put": { + "tags": [ + "Section" + ], + "operationId": "Section_UpdateOrder", + "requestBody": { + "x-name": "updatedSectionsOrder", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/MapDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetMapDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MapDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/SliderDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetSliderDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SliderDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/VideoDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetVideoDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VideoDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/WebDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetWebDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/MenuDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetMenuDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MenuDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/PlayerMessageDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_PlayerMessageDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlayerMessageDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/QuizDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetQuizDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuizDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/ArticleDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetArticleDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArticleDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/PdfDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetPdfDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PdfDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/PuzzleDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetPuzzleDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PuzzleDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/AgendaDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetAgendaDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgendaDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Section/WeatherDTO": { + "get": { + "tags": [ + "Section" + ], + "operationId": "Section_GetWeatherDTO", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WeatherDTO" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionMap/{sectionId}/points": { + "get": { + "tags": [ + "Section map" + ], + "operationId": "SectionMap_GetAllGeoPointsFromSection", + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPointDTO" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "tags": [ + "Section map" + ], + "operationId": "SectionMap_Create", + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "geoPointDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeoPointDTO" + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionMap": { + "put": { + "tags": [ + "Section map" + ], + "operationId": "SectionMap_Update", + "requestBody": { + "x-name": "geoPointDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeoPointDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionMap/points/delete/{geoPointId}": { + "delete": { + "tags": [ + "Section map" + ], + "operationId": "SectionMap_Delete", + "parameters": [ + { + "name": "geoPointId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionQuiz/{sectionId}/questions": { + "get": { + "tags": [ + "Section quiz" + ], + "operationId": "SectionQuiz_GetAllQuizQuestionFromSection", + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionDTO" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "tags": [ + "Section quiz" + ], + "operationId": "SectionQuiz_Create", + "parameters": [ + { + "name": "sectionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "questionDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestionDTO" + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuizQuestion" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionQuiz": { + "put": { + "tags": [ + "Section quiz" + ], + "operationId": "SectionQuiz_Update", + "requestBody": { + "x-name": "questionDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestionDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuizQuestion" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/SectionQuiz/questions/delete/{quizQuestionId}": { + "delete": { + "tags": [ + "Section quiz" + ], + "operationId": "SectionQuiz_Delete", + "parameters": [ + { + "name": "quizQuestionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/User": { + "get": { + "tags": [ + "User" + ], + "operationId": "User_Get", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "post": { + "tags": [ + "User" + ], + "operationId": "User_CreateUser", + "requestBody": { + "x-name": "newUserDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "put": { + "tags": [ + "User" + ], + "operationId": "User_UpdateUser", + "requestBody": { + "x-name": "updatedUser", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDetailDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDetailDTO" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/User/{id}": { + "get": { + "tags": [ + "User" + ], + "operationId": "User_GetDetail", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDetailDTO" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "User_DeleteUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/Authentication/Token": { + "post": { + "tags": [ + "Authentication" + ], + "operationId": "Authentication_AuthenticateWithForm", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "grant_type": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "client_id": { + "type": "string", + "nullable": true + }, + "client_secret": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDTO" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Authentication/Authenticate": { + "post": { + "tags": [ + "Authentication" + ], + "operationId": "Authentication_AuthenticateWithJson", + "requestBody": { + "x-name": "login", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginDTO" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDTO" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ConfigurationDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "title": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "imageId": { + "type": "string", + "nullable": true + }, + "imageSource": { + "type": "string", + "nullable": true + }, + "primaryColor": { + "type": "string", + "nullable": true + }, + "secondaryColor": { + "type": "string", + "nullable": true + }, + "languages": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "isMobile": { + "type": "boolean" + }, + "isTablet": { + "type": "boolean" + }, + "isOffline": { + "type": "boolean" + }, + "instanceId": { + "type": "string", + "nullable": true + }, + "sectionIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "loaderImageId": { + "type": "string", + "nullable": true + }, + "loaderImageUrl": { + "type": "string", + "nullable": true + }, + "isDate": { + "type": "boolean" + }, + "isHour": { + "type": "boolean" + }, + "isSectionImageBackground": { + "type": "boolean" + }, + "roundedValue": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "screenPercentageSectionsMainPage": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "TranslationDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "language": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + } + }, + "ExportConfigurationDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/ConfigurationDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "sections": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + }, + "resources": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResourceDTO" + } + } + } + } + ] + }, + "SectionDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "title": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "imageId": { + "type": "string", + "nullable": true + }, + "imageSource": { + "type": "string", + "nullable": true + }, + "configurationId": { + "type": "string", + "nullable": true + }, + "isSubSection": { + "type": "boolean" + }, + "parentId": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/SectionType" + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "order": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "instanceId": { + "type": "string", + "nullable": true + }, + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + }, + "meterZoneGPS": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isBeacon": { + "type": "boolean" + }, + "beaconId": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "SectionType": { + "type": "integer", + "description": "0 = Map\n1 = Slider\n2 = Video\n3 = Web\n4 = Menu\n5 = Quiz\n6 = Article\n7 = PDF\n8 = Puzzle\n9 = Agenda\n10 = Weather", + "x-enumNames": [ + "Map", + "Slider", + "Video", + "Web", + "Menu", + "Quiz", + "Article", + "PDF", + "Puzzle", + "Agenda", + "Weather" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ] + }, + "ResourceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ResourceType" + }, + "label": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string", + "nullable": true + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "instanceId": { + "type": "string", + "nullable": true + } + } + }, + "ResourceType": { + "type": "integer", + "description": "0 = Image\n1 = Video\n2 = ImageUrl\n3 = VideoUrl\n4 = Audio\n5 = PDF\n6 = JSON\n7 = JSONUrl", + "x-enumNames": [ + "Image", + "Video", + "ImageUrl", + "VideoUrl", + "Audio", + "PDF", + "JSON", + "JSONUrl" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, + "DeviceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "identifier": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "ipAddressWLAN": { + "type": "string", + "nullable": true + }, + "ipAddressETH": { + "type": "string", + "nullable": true + }, + "configurationId": { + "type": "string", + "nullable": true + }, + "configuration": { + "type": "string", + "nullable": true + }, + "connected": { + "type": "boolean" + }, + "dateCreation": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "dateUpdate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "instanceId": { + "type": "string", + "nullable": true + } + } + }, + "DeviceDetailDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "connectionLevel": { + "type": "string", + "nullable": true + }, + "lastConnectionLevel": { + "type": "string", + "format": "date-time" + }, + "batteryLevel": { + "type": "string", + "nullable": true + }, + "lastBatteryLevel": { + "type": "string", + "format": "date-time" + } + } + } + ] + }, + "Instance": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "pinCode": { + "type": "string", + "nullable": true + } + } + }, + "InstanceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "dateCreation": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "pinCode": { + "type": "string", + "nullable": true + } + } + }, + "MapDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "zoom": { + "type": "integer", + "format": "int32" + }, + "mapType": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapTypeApp" + } + ] + }, + "mapTypeMapbox": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapTypeMapBox" + } + ] + }, + "mapProvider": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapProvider" + } + ] + }, + "points": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/GeoPointDTO" + } + }, + "iconResourceId": { + "type": "string", + "nullable": true + }, + "iconSource": { + "type": "string", + "nullable": true + }, + "categories": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CategorieDTO" + } + }, + "centerLatitude": { + "type": "string", + "nullable": true + }, + "centerLongitude": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "MapTypeApp": { + "type": "integer", + "description": "0 = none\n1 = normal\n2 = satellite\n3 = terrain\n4 = hybrid", + "x-enumNames": [ + "none", + "normal", + "satellite", + "terrain", + "hybrid" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "MapTypeMapBox": { + "type": "integer", + "description": "0 = standard\n1 = streets\n2 = outdoors\n3 = light\n4 = dark\n5 = satellite\n6 = satellite_streets", + "x-enumNames": [ + "standard", + "streets", + "outdoors", + "light", + "dark", + "satellite", + "satellite_streets" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + "MapProvider": { + "type": "integer", + "description": "0 = Google\n1 = MapBox", + "x-enumNames": [ + "Google", + "MapBox" + ], + "enum": [ + 0, + 1 + ] + }, + "GeoPointDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "title": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "contents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ContentDTO" + } + }, + "categorieId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + }, + "imageResourceId": { + "type": "string", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + }, + "schedules": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "prices": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "phone": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "email": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "site": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + } + } + }, + "ContentDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "order": { + "type": "integer", + "format": "int32" + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "resource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ResourceDTO" + } + ] + } + } + }, + "CategorieDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "label": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "icon": { + "type": "string", + "nullable": true + }, + "resourceDTO": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ResourceDTO" + } + ] + }, + "order": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + }, + "SliderDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "contents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ContentDTO" + } + } + } + } + ] + }, + "VideoDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "source": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "WebDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "source": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "MenuDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "sections": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/SectionDTO" + } + } + } + } + ] + }, + "PlayerMessageDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "configChanged": { + "type": "boolean" + }, + "isDeleted": { + "type": "boolean" + } + } + }, + "QuizDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "questions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/QuestionDTO" + } + }, + "bad_level": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "medium_level": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "good_level": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "great_level": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + } + } + } + ] + }, + "QuestionDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "label": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "responses": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResponseDTO" + } + }, + "imageBackgroundResourceId": { + "type": "string", + "nullable": true + }, + "imageBackgroundResourceType": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ResourceType" + } + ] + }, + "imageBackgroundResourceUrl": { + "type": "string", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "TranslationAndResourceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "language": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "resource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ResourceDTO" + } + ] + } + } + }, + "ResponseDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "isGood": { + "type": "boolean" + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "ArticleDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "content": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "isContentTop": { + "type": "boolean" + }, + "audioIds": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "isReadAudioAuto": { + "type": "boolean" + }, + "contents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ContentDTO" + } + } + } + } + ] + }, + "PdfDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "pdfs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/OrderedTranslationAndResourceDTO" + } + } + } + } + ] + }, + "OrderedTranslationAndResourceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "translationAndResourceDTOs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "PuzzleDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "messageDebut": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "messageFin": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "puzzleImage": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/ResourceDTO" + } + ] + }, + "puzzleImageId": { + "type": "string", + "nullable": true + }, + "rows": { + "type": "integer", + "format": "int32" + }, + "cols": { + "type": "integer", + "format": "int32" + } + } + } + ] + }, + "AgendaDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "resourceIds": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "agendaMapProvider": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapProvider" + } + ] + } + } + } + ] + }, + "WeatherDTO": { + "allOf": [ + { + "$ref": "#/components/schemas/SectionDTO" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "city": { + "type": "string", + "nullable": true + }, + "updatedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "result": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "GeoPoint": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "title", + "description", + "contents", + "schedules", + "prices", + "phone", + "email", + "site" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentDTO" + } + }, + "categorieId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + }, + "imageResourceId": { + "type": "string", + "nullable": true + }, + "imageUrl": { + "type": "string", + "nullable": true + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "prices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "phone": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "email": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "site": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + } + } + }, + "QuizQuestion": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "label", + "responses" + ], + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationAndResourceDTO" + } + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "resource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Resource" + } + ] + }, + "order": { + "type": "integer", + "format": "int32" + }, + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseDTO" + } + } + } + }, + "Resource": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "type", + "label", + "instanceId" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "$ref": "#/components/schemas/ResourceType" + }, + "label": { + "type": "string", + "minLength": 1 + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "instanceId": { + "type": "string", + "minLength": 1 + }, + "url": { + "type": "string", + "nullable": true + } + } + }, + "User": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "email", + "password", + "lastName", + "token", + "instanceId" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "email": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string", + "minLength": 1 + }, + "firstName": { + "type": "string", + "nullable": true + }, + "lastName": { + "type": "string", + "minLength": 1 + }, + "token": { + "type": "string", + "minLength": 1 + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "instanceId": { + "type": "string", + "minLength": 1 + } + } + }, + "UserDetailDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + }, + "firstName": { + "type": "string", + "nullable": true + }, + "lastName": { + "type": "string", + "nullable": true + }, + "instanceId": { + "type": "string", + "nullable": true + } + } + }, + "TokenDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "access_token": { + "type": "string", + "nullable": true + }, + "refresh_token": { + "type": "string", + "nullable": true + }, + "scope": { + "type": "string", + "nullable": true + }, + "token_type": { + "type": "string", + "nullable": true + }, + "expires_in": { + "type": "integer", + "format": "int32" + }, + "expiration": { + "type": "string", + "format": "date-time" + }, + "instanceId": { + "type": "string", + "nullable": true + }, + "pinCode": { + "type": "string", + "nullable": true + } + } + }, + "LoginDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + } + } + } + }, + "securitySchemes": { + "bearer": { + "type": "oauth2", + "description": "Manager Authentication", + "flows": { + "password": { + "authorizationUrl": "/authentication/Token", + "tokenUrl": "/api/authentication/Token", + "scopes": { + "Manager-api": "Manager WebAPI" + } + } + } + } + } + }, + "security": [ + { + "bearer": [] + } + ], + "tags": [ + { + "name": "Configuration", + "description": "Configuration management" + }, + { + "name": "Device", + "description": "Device management" + }, + { + "name": "Instance", + "description": "Instance management" + }, + { + "name": "Resource", + "description": "Resource management" + }, + { + "name": "Section", + "description": "Section management" + }, + { + "name": "Section map", + "description": "Section map management" + }, + { + "name": "Section quiz", + "description": "Section quiz management" + }, + { + "name": "User", + "description": "User management" + }, + { + "name": "Authentication", + "description": "Authentication management" + } + ] +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 0aabaa7..4fe852c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,11 +60,14 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { + final GlobalKey<_MyAppState> mainKey = GlobalKey(); + @override Widget build(BuildContext context) { return ChangeNotifierProvider( create: (_) => AppContext(widget.managerAppContext), child: MaterialApp( + key: mainKey, builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: [ @@ -96,7 +99,10 @@ class _MyAppState extends State { '/policy': (context) => PolicyScreen(), '/policy/mdlf': (context) => PolicyScreen(param: "mdlf"), '/policy/fort': (context) => PolicyScreen(param: "fort"), - } + }, + onUnknownRoute: (settings) => MaterialPageRoute( + builder: (context) => Container(child: Center(child: Text("Not found"))), + ), ), ); } diff --git a/manager_api_new/.gitignore b/manager_api_new/.gitignore index 1be28ce..0f74d29 100644 --- a/manager_api_new/.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_new/.openapi-generator/FILES b/manager_api_new/.openapi-generator/FILES index 7849567..e91954b 100644 --- a/manager_api_new/.openapi-generator/FILES +++ b/manager_api_new/.openapi-generator/FILES @@ -3,48 +3,51 @@ 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/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/QuizQuestion.md +doc/QuizQuestionResource.md +doc/Resource.md doc/ResourceApi.md doc/ResourceDTO.md doc/ResourceType.md doc/ResponseDTO.md doc/SectionApi.md doc/SectionDTO.md +doc/SectionMapApi.md +doc/SectionQuizApi.md doc/SectionType.md doc/SliderDTO.md doc/TokenDTO.md @@ -64,6 +67,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,38 +79,39 @@ 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/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/quiz_question.dart +lib/model/quiz_question_resource.dart +lib/model/resource.dart lib/model/resource_dto.dart lib/model/resource_type.dart lib/model/response_dto.dart @@ -121,5 +127,18 @@ 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 +test/agenda_dto_all_of_agenda_map_provider_test.dart +test/content_dto_resource_test.dart +test/geo_point_test.dart +test/map_dto_all_of_map_provider_test.dart +test/map_dto_all_of_map_type_mapbox_test.dart +test/map_dto_all_of_map_type_test.dart +test/ordered_translation_and_resource_dto_test.dart +test/puzzle_dto_all_of_puzzle_image_test.dart +test/question_dto_image_background_resource_type_test.dart +test/quiz_dto_test.dart +test/quiz_question_resource_test.dart +test/quiz_question_test.dart +test/resource_test.dart +test/section_map_api_test.dart +test/section_quiz_api_test.dart diff --git a/manager_api_new/.openapi-generator/VERSION b/manager_api_new/.openapi-generator/VERSION index 717311e..4bc5d61 100644 --- a/manager_api_new/.openapi-generator/VERSION +++ b/manager_api_new/.openapi-generator/VERSION @@ -1 +1 @@ -unset \ No newline at end of file +7.9.0 diff --git a/manager_api_new/README.md b/manager_api_new/README.md index 8cf1095..3afdd13 100644 --- a/manager_api_new/README.md +++ b/manager_api_new/README.md @@ -3,7 +3,8 @@ API Manager Service This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: Version Alpha +- API version: Version Alpha 0 +- Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.DartClientCodegen ## Requirements @@ -60,117 +61,126 @@ try { ## Documentation for API Endpoints -All URIs are relative to *https://api.myinfomate.be* +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* | [**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 | +*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* | [**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) - - [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) + - [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) + - [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) + - [QuizQuestion](doc//QuizQuestion.md) + - [QuizQuestionResource](doc//QuizQuestionResource.md) + - [Resource](doc//Resource.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 diff --git a/manager_api_new/doc/AgendaDTO.md b/manager_api_new/doc/AgendaDTO.md index 7d91c0a..39f1981 100644 --- a/manager_api_new/doc/AgendaDTO.md +++ b/manager_api_new/doc/AgendaDTO.md @@ -8,8 +8,26 @@ 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 []] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] +**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_new/doc/AgendaDTOAllOfAgendaMapProvider.md b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md new file mode 100644 index 0000000..46aabe9 --- /dev/null +++ b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md @@ -0,0 +1,14 @@ +# manager_api_new.model.AgendaDTOAllOfAgendaMapProvider + +## 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/ArticleDTO.md b/manager_api_new/doc/ArticleDTO.md index 49d69b7..b23a827 100644 --- a/manager_api_new/doc/ArticleDTO.md +++ b/manager_api_new/doc/ArticleDTO.md @@ -8,6 +8,24 @@ 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 []] diff --git a/manager_api_new/doc/AuthenticationApi.md b/manager_api_new/doc/AuthenticationApi.md index 202d6b8..9ef127e 100644 --- a/manager_api_new/doc/AuthenticationApi.md +++ b/manager_api_new/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ 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 ------------- | ------------- | ------------- diff --git a/manager_api_new/doc/CategorieDTO.md b/manager_api_new/doc/CategorieDTO.md index 773a0ae..688a61d 100644 --- a/manager_api_new/doc/CategorieDTO.md +++ b/manager_api_new/doc/CategorieDTO.md @@ -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_new/doc/ConfigurationApi.md b/manager_api_new/doc/ConfigurationApi.md index d790375..8e88412 100644 --- a/manager_api_new/doc/ConfigurationApi.md +++ b/manager_api_new/doc/ConfigurationApi.md @@ -5,7 +5,7 @@ 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 ------------- | ------------- | ------------- @@ -205,7 +205,7 @@ import 'package:manager_api_new/api.dart'; //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 diff --git a/manager_api_new/doc/ConfigurationDTO.md b/manager_api_new/doc/ConfigurationDTO.md index a810fdc..3f099f6 100644 --- a/manager_api_new/doc/ConfigurationDTO.md +++ b/manager_api_new/doc/ConfigurationDTO.md @@ -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_new/doc/ContentDTO.md b/manager_api_new/doc/ContentDTO.md index 2b883a0..eccf209 100644 --- a/manager_api_new/doc/ContentDTO.md +++ b/manager_api_new/doc/ContentDTO.md @@ -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_new/doc/ContentDTOResource.md b/manager_api_new/doc/ContentDTOResource.md new file mode 100644 index 0000000..2315aec --- /dev/null +++ b/manager_api_new/doc/ContentDTOResource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.ContentDTOResource + +## 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_new/doc/DeviceApi.md b/manager_api_new/doc/DeviceApi.md index f9b4be4..1173900 100644 --- a/manager_api_new/doc/DeviceApi.md +++ b/manager_api_new/doc/DeviceApi.md @@ -5,7 +5,7 @@ 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 ------------- | ------------- | ------------- diff --git a/manager_api_new/doc/ExportConfigurationDTO.md b/manager_api_new/doc/ExportConfigurationDTO.md index 6e5c89c..e2abee5 100644 --- a/manager_api_new/doc/ExportConfigurationDTO.md +++ b/manager_api_new/doc/ExportConfigurationDTO.md @@ -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_new/doc/GeoPoint.md b/manager_api_new/doc/GeoPoint.md new file mode 100644 index 0000000..44bffcf --- /dev/null +++ b/manager_api_new/doc/GeoPoint.md @@ -0,0 +1,28 @@ +# 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] + +[[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/GeoPointDTO.md b/manager_api_new/doc/GeoPointDTO.md index 10b1688..2ec2498 100644 --- a/manager_api_new/doc/GeoPointDTO.md +++ b/manager_api_new/doc/GeoPointDTO.md @@ -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_new/doc/Instance.md b/manager_api_new/doc/Instance.md index 311fe97..4fa498d 100644 --- a/manager_api_new/doc/Instance.md +++ b/manager_api_new/doc/Instance.md @@ -8,10 +8,10 @@ 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_new/doc/InstanceApi.md b/manager_api_new/doc/InstanceApi.md index 87ff28f..5d8e006 100644 --- a/manager_api_new/doc/InstanceApi.md +++ b/manager_api_new/doc/InstanceApi.md @@ -5,7 +5,7 @@ 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,7 +18,7 @@ Method | HTTP request | Description # **instanceCreateInstance** -> InstanceDTO instanceCreateInstance(instance) +> InstanceDTO instanceCreateInstance(instanceDTO) @@ -29,10 +29,10 @@ import 'package:manager_api_new/api.dart'; //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 @@ -197,7 +197,7 @@ import 'package:manager_api_new/api.dart'; //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,7 +229,7 @@ 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) @@ -240,10 +240,10 @@ import 'package:manager_api_new/api.dart'; //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_new/doc/InstanceDTO.md b/manager_api_new/doc/InstanceDTO.md index b98d87d..9bc7fab 100644 --- a/manager_api_new/doc/InstanceDTO.md +++ b/manager_api_new/doc/InstanceDTO.md @@ -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_new/doc/MapDTO.md b/manager_api_new/doc/MapDTO.md index 9658b62..84aa572 100644 --- a/manager_api_new/doc/MapDTO.md +++ b/manager_api_new/doc/MapDTO.md @@ -8,16 +8,34 @@ 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** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional] -**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [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 []] -**latitude** | **String** | | [optional] -**longitude** | **String** | | [optional] +**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_new/doc/MapDTOAllOfMapProvider.md b/manager_api_new/doc/MapDTOAllOfMapProvider.md new file mode 100644 index 0000000..0a1a2ea --- /dev/null +++ b/manager_api_new/doc/MapDTOAllOfMapProvider.md @@ -0,0 +1,14 @@ +# manager_api_new.model.MapDTOAllOfMapProvider + +## 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/MapDTOAllOfMapType.md b/manager_api_new/doc/MapDTOAllOfMapType.md new file mode 100644 index 0000000..2ad023c --- /dev/null +++ b/manager_api_new/doc/MapDTOAllOfMapType.md @@ -0,0 +1,14 @@ +# manager_api_new.model.MapDTOAllOfMapType + +## 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/MapDTOAllOfMapTypeMapbox.md b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md new file mode 100644 index 0000000..90894c3 --- /dev/null +++ b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md @@ -0,0 +1,14 @@ +# manager_api_new.model.MapDTOAllOfMapTypeMapbox + +## 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/MenuDTO.md b/manager_api_new/doc/MenuDTO.md index 89d2690..df119df 100644 --- a/manager_api_new/doc/MenuDTO.md +++ b/manager_api_new/doc/MenuDTO.md @@ -8,6 +8,24 @@ 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**](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_new/doc/OrderedTranslationAndResourceDTO.md b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md new file mode 100644 index 0000000..aa8231e --- /dev/null +++ b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md @@ -0,0 +1,16 @@ +# manager_api_new.model.OrderedTranslationAndResourceDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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_new/doc/PdfDTO.md b/manager_api_new/doc/PdfDTO.md index 19a2efc..b50f735 100644 --- a/manager_api_new/doc/PdfDTO.md +++ b/manager_api_new/doc/PdfDTO.md @@ -8,7 +8,25 @@ import 'package:manager_api_new/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pdfs** | [**List**](PDFFileDTO.md) | | [optional] [default to const []] +**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_new/doc/PuzzleDTO.md b/manager_api_new/doc/PuzzleDTO.md index 0cc61a0..2c55b8d 100644 --- a/manager_api_new/doc/PuzzleDTO.md +++ b/manager_api_new/doc/PuzzleDTO.md @@ -8,9 +8,28 @@ 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 []] -**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional] +**puzzleImage** | [**PuzzleDTOAllOfPuzzleImage**](PuzzleDTOAllOfPuzzleImage.md) | | [optional] +**puzzleImageId** | **String** | | [optional] **rows** | **int** | | [optional] **cols** | **int** | | [optional] 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_new/doc/QuestionDTO.md b/manager_api_new/doc/QuestionDTO.md index b597774..ad9d7c4 100644 --- a/manager_api_new/doc/QuestionDTO.md +++ b/manager_api_new/doc/QuestionDTO.md @@ -8,10 +8,11 @@ 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/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..ca55dd4 --- /dev/null +++ b/manager_api_new/doc/QuizQuestion.md @@ -0,0 +1,20 @@ +# 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** | [**QuizQuestionResource**](QuizQuestionResource.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_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/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_new/doc/ResourceApi.md b/manager_api_new/doc/ResourceApi.md index 2b4b336..ff8f425 100644 --- a/manager_api_new/doc/ResourceApi.md +++ b/manager_api_new/doc/ResourceApi.md @@ -5,7 +5,7 @@ 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 ------------- | ------------- | ------------- diff --git a/manager_api_new/doc/SectionApi.md b/manager_api_new/doc/SectionApi.md index 2989293..8e2e397 100644 --- a/manager_api_new/doc/SectionApi.md +++ b/manager_api_new/doc/SectionApi.md @@ -5,7 +5,7 @@ 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 ------------- | ------------- | ------------- @@ -23,7 +23,7 @@ Method | HTTP request | Description [**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 | @@ -370,7 +370,7 @@ 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) @@ -399,7 +399,7 @@ Name | Type | Description | Notes ### Return type -[**SectionDTO**](SectionDTO.md) +[**Object**](Object.md) ### Authorization @@ -611,8 +611,8 @@ 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() @@ -625,10 +625,10 @@ import 'package:manager_api_new/api.dart'; 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 +637,7 @@ This endpoint does not need any parameter. ### Return type -[**QuizzDTO**](QuizzDTO.md) +[**QuizDTO**](QuizDTO.md) ### Authorization @@ -846,7 +846,7 @@ 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) +> SectionDTO sectionUpdate(body) @@ -857,10 +857,10 @@ import 'package:manager_api_new/api.dart'; //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,7 +871,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sectionDTO** | [**SectionDTO**](SectionDTO.md)| | + **body** | **Object**| | ### Return type diff --git a/manager_api_new/doc/SectionDTO.md b/manager_api_new/doc/SectionDTO.md index ff4e38f..d5d8fc0 100644 --- a/manager_api_new/doc/SectionDTO.md +++ b/manager_api_new/doc/SectionDTO.md @@ -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/SectionMapApi.md b/manager_api_new/doc/SectionMapApi.md new file mode 100644 index 0000000..84e4bfe --- /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** +> GeoPoint 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 + +[**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) + +# **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/SectionQuizApi.md b/manager_api_new/doc/SectionQuizApi.md new file mode 100644 index 0000000..f3a69a0 --- /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** +> QuizQuestion 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 + +[**QuizQuestion**](QuizQuestion.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** +> QuizQuestion 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 + +[**QuizQuestion**](QuizQuestion.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/SliderDTO.md b/manager_api_new/doc/SliderDTO.md index bb096d5..675c4b3 100644 --- a/manager_api_new/doc/SliderDTO.md +++ b/manager_api_new/doc/SliderDTO.md @@ -8,6 +8,24 @@ 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_new/doc/TokenDTO.md b/manager_api_new/doc/TokenDTO.md index 90a2026..975c521 100644 --- a/manager_api_new/doc/TokenDTO.md +++ b/manager_api_new/doc/TokenDTO.md @@ -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_new/doc/TranslationAndResourceDTO.md b/manager_api_new/doc/TranslationAndResourceDTO.md index 4326887..7d6868c 100644 --- a/manager_api_new/doc/TranslationAndResourceDTO.md +++ b/manager_api_new/doc/TranslationAndResourceDTO.md @@ -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_new/doc/User.md b/manager_api_new/doc/User.md index aa258fb..1edb33a 100644 --- a/manager_api_new/doc/User.md +++ b/manager_api_new/doc/User.md @@ -8,14 +8,14 @@ import 'package:manager_api_new/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] +**id** | **String** | | +**email** | **String** | | +**password** | **String** | | +**lastName** | **String** | | +**token** | **String** | | +**instanceId** | **String** | | **firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**token** | **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_new/doc/UserApi.md b/manager_api_new/doc/UserApi.md index 49c4b9e..c46e856 100644 --- a/manager_api_new/doc/UserApi.md +++ b/manager_api_new/doc/UserApi.md @@ -5,7 +5,7 @@ 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,7 +17,7 @@ Method | HTTP request | Description # **userCreateUser** -> UserDetailDTO userCreateUser(user) +> UserDetailDTO userCreateUser(userDetailDTO) @@ -28,10 +28,10 @@ import 'package:manager_api_new/api.dart'; //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 @@ -185,7 +185,7 @@ 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) @@ -196,10 +196,10 @@ import 'package:manager_api_new/api.dart'; //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_new/doc/UserDetailDTO.md b/manager_api_new/doc/UserDetailDTO.md index b60d678..5c4a0ea 100644 --- a/manager_api_new/doc/UserDetailDTO.md +++ b/manager_api_new/doc/UserDetailDTO.md @@ -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 index 651c805..511ab32 100644 --- a/manager_api_new/doc/VideoDTO.md +++ b/manager_api_new/doc/VideoDTO.md @@ -8,6 +8,24 @@ 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 index 75120ab..b6d019f 100644 --- a/manager_api_new/doc/WeatherDTO.md +++ b/manager_api_new/doc/WeatherDTO.md @@ -8,6 +8,24 @@ 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] diff --git a/manager_api_new/doc/WebDTO.md b/manager_api_new/doc/WebDTO.md index 64b79a2..3e585b6 100644 --- a/manager_api_new/doc/WebDTO.md +++ b/manager_api_new/doc/WebDTO.md @@ -8,6 +8,24 @@ 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/lib/api.dart b/manager_api_new/lib/api.dart index 078b45c..245f4f7 100644 --- a/manager_api_new/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,41 +34,44 @@ 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/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/quiz_question.dart'; +part 'model/quiz_question_resource.dart'; +part 'model/resource.dart'; part 'model/resource_dto.dart'; part 'model/resource_type.dart'; part 'model/response_dto.dart'; @@ -83,12 +87,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_new/lib/api/authentication_api.dart b/manager_api_new/lib/api/authentication_api.dart index e8647e9..c136358 100644 --- a/manager_api_new/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_new/lib/api/configuration_api.dart b/manager_api_new/lib/api/configuration_api.dart index 29b0b3e..ca73489 100644 --- a/manager_api_new/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', @@ -150,8 +166,16 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationExport(String id,) async { - final response = await configurationExportWithHttpInfo(id,); + /// + /// * [String] 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)); } @@ -169,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'; @@ -186,7 +212,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -201,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; } @@ -222,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'; @@ -240,7 +272,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -254,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; } @@ -277,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; @@ -291,7 +328,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -306,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; } @@ -325,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'; @@ -338,7 +383,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -353,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; } @@ -372,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'; @@ -385,7 +438,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -400,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_new/lib/api/device_api.dart b/manager_api_new/lib/api/device_api.dart index 7bb84ed..8d6b451 100644 --- a/manager_api_new/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_new/lib/api/instance_api.dart b/manager_api_new/lib/api/instance_api.dart index 2e120d1..45b2163 100644 --- a/manager_api_new/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_new/lib/api/resource_api.dart b/manager_api_new/lib/api/resource_api.dart index bb0ea9d..7980569 100644 --- a/manager_api_new/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_new/lib/api/section_api.dart b/manager_api_new/lib/api/section_api.dart index 5dfcc5d..92eda7f 100644 --- a/manager_api_new/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,25 @@ 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) { + 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; } @@ -370,7 +411,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -390,9 +430,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 +444,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 +459,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -430,17 +473,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 +502,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 +517,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -478,20 +531,25 @@ 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; } @@ -510,7 +568,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -530,9 +587,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 +611,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -571,9 +630,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 +654,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -612,9 +673,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 +697,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -653,17 +716,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 +740,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -686,17 +751,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 +783,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -735,9 +802,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 +826,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -776,9 +845,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 +869,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -817,9 +888,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 +912,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -858,9 +931,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 +955,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -899,9 +974,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 +987,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 +1003,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -937,18 +1016,25 @@ 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) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SectionDTO', + ) as SectionDTO; } return null; } @@ -957,7 +1043,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 +1058,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -985,17 +1072,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..51895f0 --- /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), + 'GeoPoint', + ) as GeoPoint; + } + 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..34db353 --- /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), + 'QuizQuestion', + ) as QuizQuestion; + } + 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), + 'QuizQuestion', + ) as QuizQuestion; + } + return null; + } +} diff --git a/manager_api_new/lib/api/user_api.dart b/manager_api_new/lib/api/user_api.dart index 989b146..786a2da 100644 --- a/manager_api_new/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_new/lib/api_client.dart b/manager_api_new/lib/api_client.dart index 2fb099d..35cdef5 100644 --- a/manager_api_new/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,32 @@ 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 '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,22 +275,28 @@ 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 'QuizQuestion': + return QuizQuestion.fromJson(value); + case 'QuizQuestionResource': + return QuizQuestionResource.fromJson(value); + case 'Resource': + return Resource.fromJson(value); case 'ResourceDTO': return ResourceDTO.fromJson(value); case 'ResourceType': @@ -277,27 +327,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 +392,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 +408,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_new/lib/api_exception.dart b/manager_api_new/lib/api_exception.dart index 796f7f7..d20b872 100644 --- a/manager_api_new/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_new/lib/api_helper.dart b/manager_api_new/lib/api_helper.dart index d13d9d7..5a0d454 100644 --- a/manager_api_new/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_new/lib/auth/api_key_auth.dart b/manager_api_new/lib/auth/api_key_auth.dart index 84dc295..00105ec 100644 --- a/manager_api_new/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_new/lib/auth/authentication.dart b/manager_api_new/lib/auth/authentication.dart index 1b1b8ae..3d8cb17 100644 --- a/manager_api_new/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_new/lib/auth/http_basic_auth.dart b/manager_api_new/lib/auth/http_basic_auth.dart index dfedaa5..cf02eb3 100644 --- a/manager_api_new/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_new/lib/auth/http_bearer_auth.dart b/manager_api_new/lib/auth/http_bearer_auth.dart index eddf3a5..61b6a23 100644 --- a/manager_api_new/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_new/lib/auth/oauth.dart b/manager_api_new/lib/auth/oauth.dart index e9e7d78..c7de2bf 100644 --- a/manager_api_new/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 index 27e2e1b..c59c63d 100644 --- a/manager_api_new/lib/model/agenda_dto.dart +++ b/manager_api_new/lib/model/agenda_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,39 +13,246 @@ 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.mapProvider, + 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? mapProvider; + MapProvider? agendaMapProvider; @override - bool operator ==(Object other) => identical(this, other) || other is AgendaDTO && - other.resourceIds == resourceIds && - other.mapProvider == mapProvider; + 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 - (resourceIds == null ? 0 : resourceIds!.hashCode) + - (mapProvider == null ? 0 : mapProvider!.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[resourceIds=$resourceIds, mapProvider=$mapProvider]'; + 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.mapProvider != null) { - json[r'mapProvider'] = this.mapProvider; + if (this.agendaMapProvider != null) { + json[r'agendaMapProvider'] = this.agendaMapProvider; } else { - json[r'mapProvider'] = null; + json[r'agendaMapProvider'] = null; } return json; } @@ -62,21 +269,44 @@ class AgendaDTO { // 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.'); + 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']), - mapProvider: MapProvider.fromJson(json[r'mapProvider']), + agendaMapProvider: MapProvider.fromJson(json[r'agendaMapProvider']), ); } 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 +334,24 @@ class AgendaDTO { } // maps a json object with a list of AgendaDTO-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] = AgendaDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + 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 index 2221429..67ac908 100644 --- a/manager_api_new/lib/model/article_dto.dart +++ b/manager_api_new/lib/model/article_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,24 @@ 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 [], @@ -20,6 +38,66 @@ class ArticleDTO { 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; /// @@ -43,27 +121,156 @@ class ArticleDTO { 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; + 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 - (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); + // 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[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; + 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 { @@ -104,13 +311,33 @@ class ArticleDTO { // 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.'); + 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']), @@ -121,7 +348,10 @@ class ArticleDTO { 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) { @@ -149,20 +379,24 @@ class ArticleDTO { } // maps a json object with a list of ArticleDTO-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] = ArticleDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/categorie_dto.dart b/manager_api_new/lib/model/categorie_dto.dart index 33dc8da..cfd2f88 100644 --- a/manager_api_new/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; + ContentDTOResource? 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: ContentDTOResource.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_new/lib/model/configuration_dto.dart b/manager_api_new/lib/model/configuration_dto.dart index 3d642fc..921b4f5 100644 --- a/manager_api_new/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_new/lib/model/content_dto.dart b/manager_api_new/lib/model/content_dto.dart index 32512da..2ed3ee5 100644 --- a/manager_api_new/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_new/lib/model/content_geo_point.dart b/manager_api_new/lib/model/content_geo_point.dart index d299f8a..9bd9ce8 100644 --- a/manager_api_new/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_new/lib/model/device_detail_dto.dart b/manager_api_new/lib/model/device_detail_dto.dart index 8c645d6..7b434d7 100644 --- a/manager_api_new/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_new/lib/model/device_detail_dto_all_of.dart b/manager_api_new/lib/model/device_detail_dto_all_of.dart index 2e990db..729d201 100644 --- a/manager_api_new/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_new/lib/model/device_dto.dart b/manager_api_new/lib/model/device_dto.dart index 7d8ea3a..879f3a8 100644 --- a/manager_api_new/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_new/lib/model/export_configuration_dto.dart b/manager_api_new/lib/model/export_configuration_dto.dart index e1f7cad..bdc808c 100644 --- a/manager_api_new/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_new/lib/model/export_configuration_dto_all_of.dart b/manager_api_new/lib/model/export_configuration_dto_all_of.dart index 89650d1..02e3aec 100644 --- a/manager_api_new/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..bce1aa0 --- /dev/null +++ b/manager_api_new/lib/model/geo_point.dart @@ -0,0 +1,241 @@ +// +// 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, + }); + + 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; + + @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; + + @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); + + @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]'; + + 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; + } + 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'), + ); + } + 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_new/lib/model/geo_point_dto.dart b/manager_api_new/lib/model/geo_point_dto.dart index 16c16bd..e901072 100644 --- a/manager_api_new/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,8 @@ class GeoPointDTO { List? description; - List? contents; + List? contents; - CategorieDTO? categorie; int? categorieId; String? latitude; @@ -60,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 = {}; @@ -121,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 { @@ -191,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; }()); @@ -201,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: CategorieDTO.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'), @@ -218,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) { @@ -246,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_new/lib/model/geo_point_dto_categorie.dart b/manager_api_new/lib/model/geo_point_dto_categorie.dart index 5c06018..5df6384 100644 --- a/manager_api_new/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/image_dto.dart b/manager_api_new/lib/model/image_dto.dart index a275b85..c0120e3 100644 --- a/manager_api_new/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) + + (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_new/lib/model/image_geo_point.dart b/manager_api_new/lib/model/image_geo_point.dart index 4ed4612..e92d32b 100644 --- a/manager_api_new/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) + + (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_new/lib/model/instance.dart b/manager_api_new/lib/model/instance.dart index 62800f6..84aed0c 100644 --- a/manager_api_new/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_new/lib/model/instance_dto.dart b/manager_api_new/lib/model/instance_dto.dart index 5f4399d..3dff3e1 100644 --- a/manager_api_new/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_new/lib/model/level_dto.dart b/manager_api_new/lib/model/level_dto.dart index 79e8ea1..3cdc4bc 100644 --- a/manager_api_new/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_new/lib/model/login_dto.dart b/manager_api_new/lib/model/login_dto.dart index a8e6b90..6e0e230 100644 --- a/manager_api_new/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 index 28d7aeb..e3671f9 100644 --- a/manager_api_new/lib/model/map_dto.dart +++ b/manager_api_new/lib/model/map_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,24 @@ 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, @@ -21,10 +39,70 @@ class MapDTO { this.iconResourceId, this.iconSource, this.categories = const [], - this.latitude, - this.longitude, + 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 @@ -47,42 +125,171 @@ class MapDTO { List? categories; - String? latitude; + String? centerLatitude; - String? longitude; + String? centerLongitude; @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; + 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 - (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); + // 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[zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, latitude=$latitude, longitude=$longitude]'; + 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 { @@ -123,15 +330,15 @@ class MapDTO { } else { json[r'categories'] = null; } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; + if (this.centerLatitude != null) { + json[r'centerLatitude'] = this.centerLatitude; } else { - json[r'latitude'] = null; + json[r'centerLatitude'] = null; } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; + if (this.centerLongitude != null) { + json[r'centerLongitude'] = this.centerLongitude; } else { - json[r'longitude'] = null; + json[r'centerLongitude'] = null; } return json; } @@ -148,13 +355,33 @@ class MapDTO { // 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.'); + 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']), @@ -163,14 +390,17 @@ class MapDTO { 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'), + centerLatitude: mapValueOfType(json, r'centerLatitude'), + centerLongitude: mapValueOfType(json, r'centerLongitude'), ); } 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) { @@ -198,20 +428,24 @@ class MapDTO { } // maps a json object with a list of MapDTO-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] = MapDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/map_dto_all_of_map_provider.dart b/manager_api_new/lib/model/map_dto_all_of_map_provider.dart new file mode 100644 index 0000000..27aa47a --- /dev/null +++ b/manager_api_new/lib/model/map_dto_all_of_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 MapDTOAllOfMapProvider { + /// Returns a new [MapDTOAllOfMapProvider] instance. + MapDTOAllOfMapProvider(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapProvider && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'MapDTOAllOfMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// 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 MapDTOAllOfMapProvider? 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 "MapDTOAllOfMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOAllOfMapProvider( + ); + } + 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 = MapDTOAllOfMapProvider.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 = MapDTOAllOfMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return 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] = MapDTOAllOfMapProvider.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/map_dto_all_of_map_type.dart b/manager_api_new/lib/model/map_dto_all_of_map_type.dart new file mode 100644 index 0000000..1aab427 --- /dev/null +++ b/manager_api_new/lib/model/map_dto_all_of_map_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 MapDTOAllOfMapType { + /// Returns a new [MapDTOAllOfMapType] instance. + MapDTOAllOfMapType(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapType && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'MapDTOAllOfMapType[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// 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 MapDTOAllOfMapType? 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 "MapDTOAllOfMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOAllOfMapType( + ); + } + 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 = MapDTOAllOfMapType.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 = MapDTOAllOfMapType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return 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] = MapDTOAllOfMapType.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/map_dto_all_of_map_type_mapbox.dart b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart new file mode 100644 index 0000000..e98d8e7 --- /dev/null +++ b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.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 MapDTOAllOfMapTypeMapbox { + /// Returns a new [MapDTOAllOfMapTypeMapbox] instance. + MapDTOAllOfMapTypeMapbox(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapTypeMapbox && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'MapDTOAllOfMapTypeMapbox[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// 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 MapDTOAllOfMapTypeMapbox? 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 "MapDTOAllOfMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapTypeMapbox[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOAllOfMapTypeMapbox( + ); + } + 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 = MapDTOAllOfMapTypeMapbox.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 = MapDTOAllOfMapTypeMapbox.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return 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] = MapDTOAllOfMapTypeMapbox.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/map_dto_map_provider.dart b/manager_api_new/lib/model/map_dto_map_provider.dart index 2ab6869..df0842a 100644 --- a/manager_api_new/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_new/lib/model/map_dto_map_type.dart b/manager_api_new/lib/model/map_dto_map_type.dart index 8b78f37..97f1df5 100644 --- a/manager_api_new/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_new/lib/model/map_dto_map_type_mapbox.dart b/manager_api_new/lib/model/map_dto_map_type_mapbox.dart index 2c164f5..32bf26d 100644 --- a/manager_api_new/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_new/lib/model/map_provider.dart b/manager_api_new/lib/model/map_provider.dart index c017c9b..d6de9a6 100644 --- a/manager_api_new/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_new/lib/model/map_type_app.dart b/manager_api_new/lib/model/map_type_app.dart index c2d54af..dd78f67 100644 --- a/manager_api_new/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._(); @@ -73,52 +78,26 @@ class MapTypeAppTypeTransformer { /// 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().toLowerCase()) { - 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; + 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().toLowerCase()) { - 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; } /// Singleton [MapTypeAppTypeTransformer] instance. static MapTypeAppTypeTransformer? _instance; } - diff --git a/manager_api_new/lib/model/map_type_map_box.dart b/manager_api_new/lib/model/map_type_map_box.dart index 7aaad20..fa8676a 100644 --- a/manager_api_new/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 @@ -23,28 +23,32 @@ class MapTypeMapBox { int toJson() => value; - static const standard = MapTypeMapBox._(0); - static const streets = MapTypeMapBox._(1); - static const outdoors = MapTypeMapBox._(2); - static const light = MapTypeMapBox._(3); - static const dark = MapTypeMapBox._(4); - static const satellite = MapTypeMapBox._(5); - static const satellite_streets = MapTypeMapBox._(6); + static const number0 = MapTypeMapBox._(0); + static const number1 = MapTypeMapBox._(1); + static const number2 = MapTypeMapBox._(2); + static const number3 = MapTypeMapBox._(3); + static const number4 = MapTypeMapBox._(4); + static const number5 = MapTypeMapBox._(5); + static const number6 = MapTypeMapBox._(6); /// List of all possible values in this [enum][MapTypeMapBox]. static const values = [ - standard, - streets, - outdoors, - light, - dark, - satellite, - satellite_streets, + number0, + number1, + number2, + number3, + number4, + number5, + number6, ]; - static MapTypeMapBox? fromJson(dynamic value) => MapTypeMapBoxTypeTransformer().decode(value); + static MapTypeMapBox? fromJson(dynamic value) => + MapTypeMapBoxTypeTransformer().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) { @@ -61,7 +65,8 @@ class MapTypeMapBox { /// Transformation class that can [encode] an instance of [MapTypeMapBox] to int, /// and [decode] dynamic data back to [MapTypeMapBox]. class MapTypeMapBoxTypeTransformer { - factory MapTypeMapBoxTypeTransformer() => _instance ??= const MapTypeMapBoxTypeTransformer._(); + factory MapTypeMapBoxTypeTransformer() => + _instance ??= const MapTypeMapBoxTypeTransformer._(); const MapTypeMapBoxTypeTransformer._(); @@ -77,38 +82,26 @@ class MapTypeMapBoxTypeTransformer { /// and users are still using an old app with the old code. MapTypeMapBox? decode(dynamic data, {bool allowNull = true}) { if (data != null) { - if(data.runtimeType == String) { - switch (data.toString().toLowerCase()) { - case r'standard': return MapTypeMapBox.standard; - case r'streets': return MapTypeMapBox.streets; - case r'outdoors': return MapTypeMapBox.outdoors; - case r'light': return MapTypeMapBox.light; - case r'dark': return MapTypeMapBox.dark; - case r'satellite': return MapTypeMapBox.satellite; - case r'satellite_streets': return MapTypeMapBox.satellite_streets; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } else { - if(data.runtimeType == int) { - switch (data) { - case 0: return MapTypeMapBox.standard; - case 1: return MapTypeMapBox.streets; - case 2: return MapTypeMapBox.outdoors; - case 3: return MapTypeMapBox.light; - case 4: return MapTypeMapBox.dark; - case 5: return MapTypeMapBox.satellite; - case 6: return MapTypeMapBox.satellite_streets; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } + switch (data) { + case 0: + return MapTypeMapBox.number0; + case 1: + return MapTypeMapBox.number1; + case 2: + return MapTypeMapBox.number2; + case 3: + return MapTypeMapBox.number3; + case 4: + return MapTypeMapBox.number4; + case 5: + return MapTypeMapBox.number5; + case 6: + return MapTypeMapBox.number6; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); } - } } - } return null; } @@ -116,4 +109,3 @@ class MapTypeMapBoxTypeTransformer { /// Singleton [MapTypeMapBoxTypeTransformer] instance. static MapTypeMapBoxTypeTransformer? _instance; } - diff --git a/manager_api_new/lib/model/menu_dto.dart b/manager_api_new/lib/model/menu_dto.dart index 0f47549..b94e973 100644 --- a/manager_api_new/lib/model/menu_dto.dart +++ b/manager_api_new/lib/model/menu_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,25 +13,232 @@ 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; + List? sections; @override - bool operator ==(Object other) => identical(this, other) || other is MenuDTO && - other.sections == sections; + 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 - (sections == null ? 0 : sections!.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[sections=$sections]'; + 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 { @@ -52,20 +259,43 @@ 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 "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: SectionDTO.listFromJson(json[r'sections']), ); } 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 +323,24 @@ class MenuDTO { } // maps a json object with a list of MenuDTO-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] = MenuDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + 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 index 53cb445..9782365 100644 --- a/manager_api_new/lib/model/pdf_dto.dart +++ b/manager_api_new/lib/model/pdf_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,25 +13,232 @@ 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 [], }); - List? pdfs; + 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.pdfs == pdfs; + 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 - (pdfs == null ? 0 : pdfs!.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[pdfs=$pdfs]'; + 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 { @@ -52,20 +259,43 @@ 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 "PdfDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PdfDTO[$key]" has a null value in JSON.'); }); return true; }()); return PdfDTO( - pdfs: PDFFileDTO.listFromJson(json[r'pdfs']), + 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,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +323,24 @@ class PdfDTO { } // maps a json object with a list of PdfDTO-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] = PdfDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/pdf_file_dto.dart b/manager_api_new/lib/model/pdf_file_dto.dart index fbe682e..dc4cfa3 100644 --- a/manager_api_new/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_new/lib/model/player_message_dto.dart b/manager_api_new/lib/model/player_message_dto.dart index 9e67106..a3fde1b 100644 --- a/manager_api_new/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 index 14654e5..de71bc4 100644 --- a/manager_api_new/lib/model/puzzle_dto.dart +++ b/manager_api_new/lib/model/puzzle_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,18 +13,99 @@ 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.image, + 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; - PuzzleDTOImage? image; + ResourceDTO? puzzleImage; + + String? puzzleImageId; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -43,27 +124,158 @@ class PuzzleDTO { 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; + 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 - (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); + // 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[messageDebut=$messageDebut, messageFin=$messageFin, image=$image, rows=$rows, cols=$cols]'; + 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 { @@ -74,10 +286,15 @@ class PuzzleDTO { } else { json[r'messageFin'] = null; } - if (this.image != null) { - json[r'image'] = this.image; + if (this.puzzleImage != null) { + json[r'puzzleImage'] = this.puzzleImage; } else { - json[r'image'] = null; + 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; @@ -104,16 +321,38 @@ class PuzzleDTO { // 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.'); + 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']), + 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']), - image: PuzzleDTOImage.fromJson(json[r'image']), + puzzleImage: ResourceDTO.fromJson(json[r'puzzleImage']), + puzzleImageId: mapValueOfType(json, r'puzzleImageId'), rows: mapValueOfType(json, r'rows'), cols: mapValueOfType(json, r'cols'), ); @@ -121,7 +360,10 @@ class PuzzleDTO { 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) { @@ -149,20 +391,24 @@ class PuzzleDTO { } // maps a json object with a list of PuzzleDTO-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] = PuzzleDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + 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_new/lib/model/puzzle_dto_image.dart b/manager_api_new/lib/model/puzzle_dto_image.dart index 1cd92ce..d47344f 100644 --- a/manager_api_new/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_new/lib/model/question_dto.dart b/manager_api_new/lib/model/question_dto.dart index 4eb1254..686d4f4 100644 --- a/manager_api_new/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..a79b1ed --- /dev/null +++ b/manager_api_new/lib/model/quiz_question.dart @@ -0,0 +1,177 @@ +// +// 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, + }); + + int id; + + List label; + + List responses; + + String? resourceId; + + QuizQuestionResource? 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; + + @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; + + @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); + + @override + String toString() => + 'QuizQuestion[id=$id, label=$label, responses=$responses, resourceId=$resourceId, resource=$resource, order=$order]'; + + 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; + } + 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: QuizQuestionResource.fromJson(json[r'resource']), + 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 = 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/quizz_dto.dart b/manager_api_new/lib/model/quizz_dto.dart index cf3c308..6daa28d 100644 --- a/manager_api_new/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,8 +95,10 @@ 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; }()); @@ -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_new/lib/model/quizz_dto_bad_level.dart b/manager_api_new/lib/model/quizz_dto_bad_level.dart index 3e2fee2..4a44df1 100644 --- a/manager_api_new/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_new/lib/model/resource_dto.dart b/manager_api_new/lib/model/resource_dto.dart index 028b523..3f8386b 100644 --- a/manager_api_new/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_new/lib/model/resource_type.dart b/manager_api_new/lib/model/resource_type.dart index cfde41e..b42ec0c 100644 --- a/manager_api_new/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_new/lib/model/response_dto.dart b/manager_api_new/lib/model/response_dto.dart index 6963754..d9e8dc3 100644 --- a/manager_api_new/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_dto.dart b/manager_api_new/lib/model/section_dto.dart index b3c097e..d03c3c7 100644 --- a/manager_api_new/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_type.dart b/manager_api_new/lib/model/section_type.dart index fe65f35..2493c31 100644 --- a/manager_api_new/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 diff --git a/manager_api_new/lib/model/slider_dto.dart b/manager_api_new/lib/model/slider_dto.dart index 837fb7a..87c5f1c 100644 --- a/manager_api_new/lib/model/slider_dto.dart +++ b/manager_api_new/lib/model/slider_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,25 +13,232 @@ 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.contents == contents; + 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 - (contents == null ? 0 : contents!.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[contents=$contents]'; + 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 { @@ -52,20 +259,43 @@ 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 "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,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +323,24 @@ class SliderDTO { } // maps a json object with a list of SliderDTO-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] = SliderDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/token_dto.dart b/manager_api_new/lib/model/token_dto.dart index 1c9ceb5..be65209 100644 --- a/manager_api_new/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_new/lib/model/translation_and_resource_dto.dart b/manager_api_new/lib/model/translation_and_resource_dto.dart index f365b2e..3fa9192 100644 --- a/manager_api_new/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_new/lib/model/translation_dto.dart b/manager_api_new/lib/model/translation_dto.dart index 4e324c2..798ab21 100644 --- a/manager_api_new/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_new/lib/model/user.dart b/manager_api_new/lib/model/user.dart index c3d7aad..14698a7 100644 --- a/manager_api_new/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_new/lib/model/user_detail_dto.dart b/manager_api_new/lib/model/user_detail_dto.dart index d0ce9cf..fb48547 100644 --- a/manager_api_new/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 index 01540ef..8cf9e0c 100644 --- a/manager_api_new/lib/model/video_dto.dart +++ b/manager_api_new/lib/model/video_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,25 +13,232 @@ 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.source_ == source_; + 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 - (source_ == null ? 0 : source_!.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[source_=$source_]'; + 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 { @@ -52,20 +259,43 @@ 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 "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,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +323,24 @@ class VideoDTO { } // maps a json object with a list of VideoDTO-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] = VideoDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/weather_dto.dart b/manager_api_new/lib/model/weather_dto.dart index e2447d0..342a85c 100644 --- a/manager_api_new/lib/model/weather_dto.dart +++ b/manager_api_new/lib/model/weather_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,11 +13,89 @@ 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; @@ -25,23 +103,152 @@ class WeatherDTO { String? result; @override - bool operator ==(Object other) => identical(this, other) || other is WeatherDTO && - other.city == city && - other.updatedDate == updatedDate && - other.result == result; + 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 - (city == null ? 0 : city!.hashCode) + - (updatedDate == null ? 0 : updatedDate!.hashCode) + - (result == null ? 0 : result!.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[city=$city, updatedDate=$updatedDate, result=$result]'; + 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 { @@ -72,22 +279,45 @@ class WeatherDTO { // 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.'); + 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', ''), + updatedDate: mapDateTime(json, r'updatedDate', r''), result: mapValueOfType(json, r'result'), ); } 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) { @@ -115,20 +345,24 @@ class WeatherDTO { } // maps a json object with a list of WeatherDTO-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] = WeatherDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/web_dto.dart b/manager_api_new/lib/model/web_dto.dart index 98d5c31..1189110 100644 --- a/manager_api_new/lib/model/web_dto.dart +++ b/manager_api_new/lib/model/web_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,25 +13,232 @@ 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.source_ == source_; + 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 - (source_ == null ? 0 : source_!.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[source_=$source_]'; + 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 { @@ -52,20 +259,43 @@ 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 "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,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +323,24 @@ class WebDTO { } // maps a json object with a list of WebDTO-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] = WebDTO.listFromJson(entry.value, growable: growable,); + 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 = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/pubspec.lock b/manager_api_new/pubspec.lock index 57f08fc..e58163c 100644 --- a/manager_api_new/pubspec.lock +++ b/manager_api_new/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "31.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "5.13.0" args: dependency: transitive description: @@ -41,14 +41,6 @@ packages: 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: @@ -58,7 +50,7 @@ packages: source: hosted version: "1.1.1" collection: - dependency: transitive + dependency: "direct main" description: name: collection sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" @@ -217,14 +209,6 @@ packages: 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: @@ -333,26 +317,26 @@ packages: dependency: "direct dev" description: name: test - sha256: d8df85e0659006d6dd09dd5d1d4bf81848d34fbe5b1fdd2b2a90e690aaa8195e + sha256: "03dbf5cb87d56394ffe951eef93893b43624240aa8dd16f6f063ee01fcb22aee" url: "https://pub.dev" source: hosted - version: "1.17.12" + version: "1.21.7" test_api: dependency: transitive description: name: test_api - sha256: "3c3c3eb64242eec8aeb7a7e530cd541737a84bb01fc08b363b429aaa4a91060d" + sha256: c9aba3b3dbfe8878845dfab5fa096eb8de7b62231baeeb1cea8e3ee81ca8c6d8 url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.4.15" test_core: dependency: transitive description: name: test_core - sha256: f269e59fdd3abd14d6d92d3da9a03f69e931e9dd9140d6f06f94fc2204584741 + sha256: f99f8a4c093d6c5adbe100494ccc259ec69c8f86eb769d661e5af18f9b6b9375 url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.4.19" typed_data: dependency: transitive description: @@ -402,4 +386,4 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/manager_api_new/pubspec.yaml b/manager_api_new/pubspec.yaml index f6406f9..1da4fa4 100644 --- a/manager_api_new/pubspec.yaml +++ b/manager_api_new/pubspec.yaml @@ -7,10 +7,11 @@ version: '1.0.0' description: 'OpenAPI API client' homepage: 'homepage' environment: - sdk: ">=3.1.0 <4.0.0" + sdk: '>=2.12.0 <4.0.0' dependencies: - http: '^1.1.0' - intl: '^0.19.0' - meta: '^1.1.8' + 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.16.0 <1.18.0' + 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_new/test/agenda_dto_test.dart b/manager_api_new/test/agenda_dto_test.dart index 58e4858..21a544e 100644 --- a/manager_api_new/test/agenda_dto_test.dart +++ b/manager_api_new/test/agenda_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/article_dto_test.dart b/manager_api_new/test/article_dto_test.dart index b2d72c1..a8dcca3 100644 --- a/manager_api_new/test/article_dto_test.dart +++ b/manager_api_new/test/article_dto_test.dart @@ -45,8 +45,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/authentication_api_test.dart b/manager_api_new/test/authentication_api_test.dart index f2b9750..0d16e2a 100644 --- a/manager_api_new/test/authentication_api_test.dart +++ b/manager_api_new/test/authentication_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/categorie_dto_test.dart b/manager_api_new/test/categorie_dto_test.dart index f17bc28..43d8523 100644 --- a/manager_api_new/test/categorie_dto_test.dart +++ b/manager_api_new/test/categorie_dto_test.dart @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/configuration_api_test.dart b/manager_api_new/test/configuration_api_test.dart index af1bfdb..0146ce3 100644 --- a/manager_api_new/test/configuration_api_test.dart +++ b/manager_api_new/test/configuration_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/configuration_dto_test.dart b/manager_api_new/test/configuration_dto_test.dart index f04c07b..7c2cbe4 100644 --- a/manager_api_new/test/configuration_dto_test.dart +++ b/manager_api_new/test/configuration_dto_test.dart @@ -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_new/test/content_dto_test.dart b/manager_api_new/test/content_dto_test.dart index ac26830..41ccfb6 100644 --- a/manager_api_new/test/content_dto_test.dart +++ b/manager_api_new/test/content_dto_test.dart @@ -45,8 +45,5 @@ void main() { test('to test the property `resourceType`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/content_geo_point_test.dart b/manager_api_new/test/content_geo_point_test.dart index 3e931db..976901c 100644 --- a/manager_api_new/test/content_geo_point_test.dart +++ b/manager_api_new/test/content_geo_point_test.dart @@ -35,8 +35,5 @@ void main() { test('to test the property `latitude`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/device_api_test.dart b/manager_api_new/test/device_api_test.dart index 8c16a8a..8cf1066 100644 --- a/manager_api_new/test/device_api_test.dart +++ b/manager_api_new/test/device_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/device_detail_dto_all_of_test.dart b/manager_api_new/test/device_detail_dto_all_of_test.dart index db6c424..0fb3beb 100644 --- a/manager_api_new/test/device_detail_dto_all_of_test.dart +++ b/manager_api_new/test/device_detail_dto_all_of_test.dart @@ -35,8 +35,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/device_detail_dto_test.dart b/manager_api_new/test/device_detail_dto_test.dart index cf64e42..20ff017 100644 --- a/manager_api_new/test/device_detail_dto_test.dart +++ b/manager_api_new/test/device_detail_dto_test.dart @@ -90,8 +90,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/device_dto_test.dart b/manager_api_new/test/device_dto_test.dart index d75af40..d854620 100644 --- a/manager_api_new/test/device_dto_test.dart +++ b/manager_api_new/test/device_dto_test.dart @@ -70,8 +70,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/export_configuration_dto_all_of_test.dart b/manager_api_new/test/export_configuration_dto_all_of_test.dart index 67cbcec..f80ca79 100644 --- a/manager_api_new/test/export_configuration_dto_all_of_test.dart +++ b/manager_api_new/test/export_configuration_dto_all_of_test.dart @@ -25,8 +25,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/export_configuration_dto_test.dart b/manager_api_new/test/export_configuration_dto_test.dart index ef54c54..ce0a09c 100644 --- a/manager_api_new/test/export_configuration_dto_test.dart +++ b/manager_api_new/test/export_configuration_dto_test.dart @@ -90,8 +90,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/geo_point_dto_categorie_test.dart b/manager_api_new/test/geo_point_dto_categorie_test.dart index 5f9287f..a1c9d4b 100644 --- a/manager_api_new/test/geo_point_dto_categorie_test.dart +++ b/manager_api_new/test/geo_point_dto_categorie_test.dart @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/geo_point_dto_test.dart b/manager_api_new/test/geo_point_dto_test.dart index df14c31..36a4653 100644 --- a/manager_api_new/test/geo_point_dto_test.dart +++ b/manager_api_new/test/geo_point_dto_test.dart @@ -45,8 +45,5 @@ void main() { test('to test the property `longitude`', () 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_new/test/image_dto_test.dart b/manager_api_new/test/image_dto_test.dart index 0c1a1fd..b1eb80c 100644 --- a/manager_api_new/test/image_dto_test.dart +++ b/manager_api_new/test/image_dto_test.dart @@ -40,8 +40,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/image_geo_point_test.dart b/manager_api_new/test/image_geo_point_test.dart index dd3523c..43b3852 100644 --- a/manager_api_new/test/image_geo_point_test.dart +++ b/manager_api_new/test/image_geo_point_test.dart @@ -25,8 +25,5 @@ void main() { test('to test the property `imageSource`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/instance_api_test.dart b/manager_api_new/test/instance_api_test.dart index f52a871..78bdf14 100644 --- a/manager_api_new/test/instance_api_test.dart +++ b/manager_api_new/test/instance_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/instance_dto_test.dart b/manager_api_new/test/instance_dto_test.dart index 5790d8f..745777f 100644 --- a/manager_api_new/test/instance_dto_test.dart +++ b/manager_api_new/test/instance_dto_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/instance_test.dart b/manager_api_new/test/instance_test.dart index 412363b..8a78243 100644 --- a/manager_api_new/test/instance_test.dart +++ b/manager_api_new/test/instance_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/level_dto_test.dart b/manager_api_new/test/level_dto_test.dart index 96b3e17..bca1bd3 100644 --- a/manager_api_new/test/level_dto_test.dart +++ b/manager_api_new/test/level_dto_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/login_dto_test.dart b/manager_api_new/test/login_dto_test.dart index 491ef54..5b39eaf 100644 --- a/manager_api_new/test/login_dto_test.dart +++ b/manager_api_new/test/login_dto_test.dart @@ -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_new/test/map_dto_map_provider_test.dart b/manager_api_new/test/map_dto_map_provider_test.dart index 568cad9..fa2f46d 100644 --- a/manager_api_new/test/map_dto_map_provider_test.dart +++ b/manager_api_new/test/map_dto_map_provider_test.dart @@ -15,8 +15,5 @@ import 'package:test/test.dart'; void main() { // final instance = MapDTOMapProvider(); - group('test MapDTOMapProvider', () { - - }); - + group('test MapDTOMapProvider', () {}); } diff --git a/manager_api_new/test/map_dto_map_type_mapbox_test.dart b/manager_api_new/test/map_dto_map_type_mapbox_test.dart index e8411b7..8d50d5d 100644 --- a/manager_api_new/test/map_dto_map_type_mapbox_test.dart +++ b/manager_api_new/test/map_dto_map_type_mapbox_test.dart @@ -15,8 +15,5 @@ import 'package:test/test.dart'; void main() { // final instance = MapDTOMapTypeMapbox(); - group('test MapDTOMapTypeMapbox', () { - - }); - + group('test MapDTOMapTypeMapbox', () {}); } diff --git a/manager_api_new/test/map_dto_map_type_test.dart b/manager_api_new/test/map_dto_map_type_test.dart index 793444f..f6b4cc3 100644 --- a/manager_api_new/test/map_dto_map_type_test.dart +++ b/manager_api_new/test/map_dto_map_type_test.dart @@ -15,8 +15,5 @@ import 'package:test/test.dart'; void main() { // final instance = MapDTOMapType(); - group('test MapDTOMapType', () { - - }); - + group('test MapDTOMapType', () {}); } diff --git a/manager_api_new/test/map_dto_test.dart b/manager_api_new/test/map_dto_test.dart index 26ab1b6..46714d5 100644 --- a/manager_api_new/test/map_dto_test.dart +++ b/manager_api_new/test/map_dto_test.dart @@ -40,8 +40,5 @@ void main() { test('to test the property `iconSource`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/map_provider_test.dart b/manager_api_new/test/map_provider_test.dart index c1d4e9c..809db34 100644 --- a/manager_api_new/test/map_provider_test.dart +++ b/manager_api_new/test/map_provider_test.dart @@ -13,9 +13,5 @@ import 'package:test/test.dart'; // tests for MapProvider void main() { - - group('test MapProvider', () { - - }); - + group('test MapProvider', () {}); } diff --git a/manager_api_new/test/map_type_app_test.dart b/manager_api_new/test/map_type_app_test.dart index 035c8d8..b3cf91b 100644 --- a/manager_api_new/test/map_type_app_test.dart +++ b/manager_api_new/test/map_type_app_test.dart @@ -13,9 +13,5 @@ import 'package:test/test.dart'; // tests for MapTypeApp void main() { - - group('test MapTypeApp', () { - - }); - + group('test MapTypeApp', () {}); } diff --git a/manager_api_new/test/map_type_map_box_test.dart b/manager_api_new/test/map_type_map_box_test.dart index b11e2b7..f5e68b5 100644 --- a/manager_api_new/test/map_type_map_box_test.dart +++ b/manager_api_new/test/map_type_map_box_test.dart @@ -13,9 +13,5 @@ import 'package:test/test.dart'; // tests for MapTypeMapBox void main() { - - group('test MapTypeMapBox', () { - - }); - + group('test MapTypeMapBox', () {}); } diff --git a/manager_api_new/test/menu_dto_test.dart b/manager_api_new/test/menu_dto_test.dart index cfd036b..d056934 100644 --- a/manager_api_new/test/menu_dto_test.dart +++ b/manager_api_new/test/menu_dto_test.dart @@ -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_new/test/pdf_dto_test.dart b/manager_api_new/test/pdf_dto_test.dart index 394d1b6..8bb540e 100644 --- a/manager_api_new/test/pdf_dto_test.dart +++ b/manager_api_new/test/pdf_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/pdf_file_dto_test.dart b/manager_api_new/test/pdf_file_dto_test.dart index a6d37ca..393189a 100644 --- a/manager_api_new/test/pdf_file_dto_test.dart +++ b/manager_api_new/test/pdf_file_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `pdfFilesAndTitles`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/player_message_dto_test.dart b/manager_api_new/test/player_message_dto_test.dart index fdbe131..de37e33 100644 --- a/manager_api_new/test/player_message_dto_test.dart +++ b/manager_api_new/test/player_message_dto_test.dart @@ -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_new/test/puzzle_dto_image_test.dart b/manager_api_new/test/puzzle_dto_image_test.dart index 20dce91..7aacc6e 100644 --- a/manager_api_new/test/puzzle_dto_image_test.dart +++ b/manager_api_new/test/puzzle_dto_image_test.dart @@ -45,8 +45,5 @@ void main() { test('to test the property `type`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/puzzle_dto_test.dart b/manager_api_new/test/puzzle_dto_test.dart index 2156351..7a5948d 100644 --- a/manager_api_new/test/puzzle_dto_test.dart +++ b/manager_api_new/test/puzzle_dto_test.dart @@ -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_new/test/question_dto_test.dart b/manager_api_new/test/question_dto_test.dart index b5b8375..2c8e074 100644 --- a/manager_api_new/test/question_dto_test.dart +++ b/manager_api_new/test/question_dto_test.dart @@ -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_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_new/test/quizz_dto_bad_level_test.dart b/manager_api_new/test/quizz_dto_bad_level_test.dart index f5f5e0c..46b452c 100644 --- a/manager_api_new/test/quizz_dto_bad_level_test.dart +++ b/manager_api_new/test/quizz_dto_bad_level_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/quizz_dto_test.dart b/manager_api_new/test/quizz_dto_test.dart index 6453fdd..765440b 100644 --- a/manager_api_new/test/quizz_dto_test.dart +++ b/manager_api_new/test/quizz_dto_test.dart @@ -40,8 +40,5 @@ void main() { test('to test the property `greatLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/resource_api_test.dart b/manager_api_new/test/resource_api_test.dart index 997ee7a..64baaf7 100644 --- a/manager_api_new/test/resource_api_test.dart +++ b/manager_api_new/test/resource_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/resource_dto_test.dart b/manager_api_new/test/resource_dto_test.dart index 4e4649a..18ba5df 100644 --- a/manager_api_new/test/resource_dto_test.dart +++ b/manager_api_new/test/resource_dto_test.dart @@ -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_new/test/resource_type_test.dart b/manager_api_new/test/resource_type_test.dart index 6b5329e..db9ec15 100644 --- a/manager_api_new/test/resource_type_test.dart +++ b/manager_api_new/test/resource_type_test.dart @@ -13,9 +13,5 @@ import 'package:test/test.dart'; // tests for ResourceType void main() { - - group('test ResourceType', () { - - }); - + group('test ResourceType', () {}); } diff --git a/manager_api_new/test/response_dto_test.dart b/manager_api_new/test/response_dto_test.dart index 2c0b90b..3459297 100644 --- a/manager_api_new/test/response_dto_test.dart +++ b/manager_api_new/test/response_dto_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/section_api_test.dart b/manager_api_new/test/section_api_test.dart index 2900ff5..71623d5 100644 --- a/manager_api_new/test/section_api_test.dart +++ b/manager_api_new/test/section_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/section_dto_test.dart b/manager_api_new/test/section_dto_test.dart index 9e9ca03..8400519 100644 --- a/manager_api_new/test/section_dto_test.dart +++ b/manager_api_new/test/section_dto_test.dart @@ -85,8 +85,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } 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_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_type_test.dart b/manager_api_new/test/section_type_test.dart index 2ff05e3..31c1f85 100644 --- a/manager_api_new/test/section_type_test.dart +++ b/manager_api_new/test/section_type_test.dart @@ -13,9 +13,5 @@ import 'package:test/test.dart'; // tests for SectionType void main() { - - group('test SectionType', () { - - }); - + group('test SectionType', () {}); } diff --git a/manager_api_new/test/slider_dto_test.dart b/manager_api_new/test/slider_dto_test.dart index ebfebce..7625d8f 100644 --- a/manager_api_new/test/slider_dto_test.dart +++ b/manager_api_new/test/slider_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/token_dto_test.dart b/manager_api_new/test/token_dto_test.dart index e38a606..7c69682 100644 --- a/manager_api_new/test/token_dto_test.dart +++ b/manager_api_new/test/token_dto_test.dart @@ -50,8 +50,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/translation_and_resource_dto_test.dart b/manager_api_new/test/translation_and_resource_dto_test.dart index 520204e..58ca673 100644 --- a/manager_api_new/test/translation_and_resource_dto_test.dart +++ b/manager_api_new/test/translation_and_resource_dto_test.dart @@ -40,8 +40,5 @@ void main() { test('to test the property `resourceUrl`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/translation_dto_test.dart b/manager_api_new/test/translation_dto_test.dart index 9c42ba7..2f54b36 100644 --- a/manager_api_new/test/translation_dto_test.dart +++ b/manager_api_new/test/translation_dto_test.dart @@ -25,8 +25,5 @@ void main() { test('to test the property `value`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/user_api_test.dart b/manager_api_new/test/user_api_test.dart index 3f1de63..4e866ff 100644 --- a/manager_api_new/test/user_api_test.dart +++ b/manager_api_new/test/user_api_test.dart @@ -11,7 +11,6 @@ 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_new/test/user_detail_dto_test.dart b/manager_api_new/test/user_detail_dto_test.dart index 02f80ad..56efe08 100644 --- a/manager_api_new/test/user_detail_dto_test.dart +++ b/manager_api_new/test/user_detail_dto_test.dart @@ -35,8 +35,5 @@ void main() { test('to test the property `lastName`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/user_test.dart b/manager_api_new/test/user_test.dart index 425265a..ce9fb95 100644 --- a/manager_api_new/test/user_test.dart +++ b/manager_api_new/test/user_test.dart @@ -55,8 +55,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/video_dto_test.dart b/manager_api_new/test/video_dto_test.dart index dc18ec3..dc86b92 100644 --- a/manager_api_new/test/video_dto_test.dart +++ b/manager_api_new/test/video_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/weather_dto_test.dart b/manager_api_new/test/weather_dto_test.dart index e0582e9..43cb003 100644 --- a/manager_api_new/test/weather_dto_test.dart +++ b/manager_api_new/test/weather_dto_test.dart @@ -30,8 +30,5 @@ void main() { test('to test the property `result`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/web_dto_test.dart b/manager_api_new/test/web_dto_test.dart index c5317fb..9479441 100644 --- a/manager_api_new/test/web_dto_test.dart +++ b/manager_api_new/test/web_dto_test.dart @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/openapi_generator_config.json b/openapi_generator_config.json new file mode 100644 index 0000000..7b8743f --- /dev/null +++ b/openapi_generator_config.json @@ -0,0 +1,9 @@ +{ + "openapiGeneratorVersion": "7.9.0", + "additionalCommands": "", + "downloadUrlOverride": null, + "jarCacheDir": ".dart_tool/openapi_generator_cache", + "customGeneratorUrls": [ + "https://repo1.maven.org/maven2/com/bluetrainsoftware/maven/openapi-dart-generator/7.2/openapi-dart-generator-7.2.jar" + ] +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 4a323c2..f67f79d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -25,14 +25,6 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.0" - another_flushbar: - dependency: "direct main" - description: - name: another_flushbar - sha256: "19bf9520230ec40b300aaf9dd2a8fefcb277b25ecd1c4838f530566965befc2a" - url: "https://pub.dev" - source: hosted - version: "1.12.30" archive: dependency: transitive description: @@ -45,10 +37,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.7.0" asn1lib: dependency: transitive description: @@ -217,6 +209,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" + cli_launcher: + dependency: transitive + description: + name: cli_launcher + sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005" + url: "https://pub.dev" + source: hosted + version: "0.3.1" clock: dependency: transitive description: @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: @@ -644,10 +644,10 @@ packages: dependency: transitive description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.4.0" http_multi_server: dependency: transitive description: @@ -883,26 +883,26 @@ packages: dependency: "direct dev" description: name: openapi_generator - sha256: "77d150d227677d9099f26b20dd2cf70f84265de952e9eec345bd201540964aaf" + sha256: fb39046f1753d92d2e25d1b4b132dd4f5b462b3b1b8af4a2b63078b8ac8e3a56 url: "https://pub.dev" source: hosted - version: "4.13.1" + version: "6.1.0" openapi_generator_annotations: dependency: transitive description: name: openapi_generator_annotations - sha256: "86d924de3037a4a82e8a8d3b60c4120eced3df9e6b52a7d17cdec12ff4299ac5" + sha256: "5b4d548c18b417cfc6abd03098a28971d6211d6e10ec57e4f8fb9b2eb46c0641" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.1.0" openapi_generator_cli: dependency: transitive description: name: openapi_generator_cli - sha256: "772694a131972634ce6d04754fc8b30a5106240c324f9e3454476462d80d72c2" + sha256: a7b764d8b121ecb7cdd466c688da1e1a592f7fff73673dcdb35ee5009f49739b url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.1.0" package_config: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9f7953e..d7d01bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -71,13 +71,13 @@ dependencies: flutter_widget_from_html: ^0.15.3 firebase_storage: ^12.0.1 firebase_core: ^3.1.0 - another_flushbar: ^1.12.30 + #another_flushbar: ^1.12.30 dev_dependencies: flutter_test: sdk: flutter build_runner: - openapi_generator: ^4.13.1 + openapi_generator: ^6.1.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec