From 0cd2b47211e27403ee35b14de001af7d6d61c7b9 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Fri, 23 May 2025 17:07:04 +0200 Subject: [PATCH] WIP Version 3.0 --- lib/Components/cached_custom_resource.dart | 2 +- lib/Components/loading_common.dart | 2 +- lib/Components/show_element_for_resource.dart | 2 +- lib/Components/video_viewer_youtube.dart | 2 +- lib/Helpers/DatabaseHelper.dart | 2 +- lib/Helpers/MQTTHelper.dart | 2 +- lib/Helpers/translationHelper.dart | 2 +- lib/Models/ResponseSubDTO.dart | 2 +- lib/Models/map-marker.dart | 6 +- lib/Models/tabletContext.dart | 2 +- lib/Models/translation.dart | 2 +- lib/Screens/Agenda/agenda_view.dart | 13 +- lib/Screens/Agenda/event_popup.dart | 2 +- lib/Screens/Article/article_view.dart | 11 +- lib/Screens/Configuration/config_view.dart | 8 +- .../Configuration/dropDown_configuration.dart | 2 +- lib/Screens/MainView/main_view.dart | 73 +- lib/Screens/MainView/section_page_detail.dart | 2 +- lib/Screens/Map/flutter_map_view.dart | 2 +- lib/Screens/Map/geo_point_filter.dart | 2 +- lib/Screens/Map/google_map_view.dart | 2 +- lib/Screens/Map/map_box_view.dart | 2 +- lib/Screens/Map/map_context.dart | 2 +- lib/Screens/Map/map_view.dart | 17 +- lib/Screens/Map/marker_view.dart | 2 +- lib/Screens/Menu/menu_view.dart | 10 +- lib/Screens/PDF/pdf_filter.dart | 6 +- lib/Screens/PDF/pdf_view.dart | 25 +- lib/Screens/Previous/previous_view.dart | 4 +- lib/Screens/Puzzle/message_dialog.dart | 4 +- lib/Screens/Puzzle/puzzle_view.dart | 16 +- lib/Screens/Quizz/quizz_view.dart | 11 +- lib/Screens/Quizz/showResponses.dart | 2 +- lib/Screens/Slider/slider_view.dart | 18 +- lib/Screens/Video/video_view.dart | 13 +- lib/Screens/Weather/weather_view.dart | 9 +- lib/Screens/Web/web_view.dart | 11 +- lib/Services/downloadService.dart | 2 +- lib/api/openApi.dart | 9 +- lib/api/swagger.yaml | 7770 +++++++++++------ lib/client.dart | 2 +- lib/main.dart | 2 +- manager_api/.openapi-generator/VERSION | 1 - manager_api/README.md | 192 - manager_api/doc/ArticleDTO.md | 19 - manager_api/doc/MapDTO.md | 24 - manager_api/doc/PuzzleDTO.md | 19 - manager_api/doc/SliderDTO.md | 15 - manager_api/doc/WeatherDTO.md | 17 - manager_api/lib/model/agenda_dto.dart | 123 - manager_api/lib/model/article_dto.dart | 168 - manager_api/lib/model/map_dto.dart | 217 - manager_api/lib/model/puzzle_dto.dart | 168 - manager_api/lib/model/weather_dto.dart | 134 - manager_api/pubspec.yaml | 16 - {manager_api => manager_api_new}/.gitignore | 4 +- .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 66 +- manager_api_new/.openapi-generator/VERSION | 1 + {manager_api => manager_api_new}/.travis.yml | 0 manager_api_new/README.md | 208 + .../analysis_options.yaml | 0 manager_api_new/doc/AgendaDTO.md | 34 + .../doc/AgendaDTOAllOfAgendaMapProvider.md | 5 +- manager_api_new/doc/ArticleDTO.md | 37 + .../doc/AuthenticationApi.md | 10 +- .../doc/CategorieDTO.md | 7 +- .../doc/ConfigurationApi.md | 26 +- .../doc/ConfigurationDTO.md | 8 +- .../doc/ContentDTO.md | 9 +- .../doc/ContentDTOResource.md | 12 +- .../doc/ContentGeoPoint.md | 4 +- .../doc/DeviceApi.md | 18 +- .../doc/DeviceDTO.md | 4 +- .../doc/DeviceDetailDTO.md | 4 +- .../doc/DeviceDetailDTOAllOf.md | 4 +- .../doc/ExportConfigurationDTO.md | 8 +- .../doc/ExportConfigurationDTOAllOf.md | 4 +- manager_api_new/doc/GeoPoint.md | 30 + .../doc/GeoPointDTO.md | 7 +- .../doc/GeoPointDTOCategorie.md | 4 +- manager_api_new/doc/GeoPointSectionMap.md | 42 + .../doc/ImageDTO.md | 5 +- .../doc/ImageGeoPoint.md | 4 +- .../doc/Instance.md | 10 +- .../doc/InstanceApi.md | 38 +- .../doc/InstanceDTO.md | 6 +- .../doc/LevelDTO.md | 4 +- .../doc/LoginDTO.md | 4 +- manager_api_new/doc/MapDTO.md | 42 + .../doc/MapDTOAllOfMapProvider.md | 5 +- .../doc/MapDTOAllOfMapType.md | 5 +- .../doc/MapDTOAllOfMapTypeMapbox.md | 5 +- .../doc/MapDTOMapProvider.md | 4 +- .../doc/MapDTOMapType.md | 4 +- .../doc/MapDTOMapTypeMapbox.md | 4 +- .../doc/MapProvider.md | 4 +- .../doc/MapTypeApp.md | 4 +- .../doc/MapTypeMapBox.md | 4 +- manager_api_new/doc/MenuDTO.md | 33 + .../doc/OrderedTranslationAndResourceDTO.md | 8 +- .../doc/PDFFileDTO.md | 4 +- manager_api_new/doc/PdfDTO.md | 33 + .../doc/PlayerMessageDTO.md | 4 +- manager_api_new/doc/PuzzleDTO.md | 38 + .../doc/PuzzleDTOAllOfPuzzleImage.md | 20 + .../doc/PuzzleDTOImage.md | 4 +- .../doc/QuestionDTO.md | 7 +- .../QuestionDTOImageBackgroundResourceType.md | 14 + manager_api_new/doc/QuizDTO.md | 37 + manager_api_new/doc/QuizQuestion.md | 22 + manager_api_new/doc/QuizQuestionResource.md | 20 + .../doc/QuizQuestionSectionQuiz.md | 37 + .../doc/QuizzDTO.md | 4 +- .../doc/QuizzDTOBadLevel.md | 4 +- manager_api_new/doc/Resource.md | 20 + .../doc/ResourceApi.md | 20 +- .../doc/ResourceDTO.md | 4 +- .../doc/ResourceType.md | 4 +- .../doc/ResponseDTO.md | 4 +- manager_api_new/doc/Section.md | 32 + .../doc/SectionApi.md | 120 +- .../doc/SectionDTO.md | 5 +- manager_api_new/doc/SectionMap.md | 42 + .../doc/SectionMapAllOfMapMapProvider.md | 14 + .../doc/SectionMapAllOfMapMapType.md | 14 + .../doc/SectionMapAllOfMapResource.md | 20 + .../doc/SectionMapAllOfMapTypeMapbox.md | 14 + manager_api_new/doc/SectionMapApi.md | 191 + manager_api_new/doc/SectionQuiz.md | 37 + manager_api_new/doc/SectionQuizApi.md | 191 + .../doc/SectionType.md | 4 +- manager_api_new/doc/SliderDTO.md | 33 + .../doc/TokenDTO.md | 6 +- .../doc/TranslationAndResourceDTO.md | 7 +- .../doc/TranslationDTO.md | 4 +- manager_api_new/doc/User.md | 22 + .../doc/UserApi.md | 32 +- .../doc/UserDetailDTO.md | 5 +- manager_api_new/doc/VideoDTO.md | 33 + manager_api_new/doc/WeatherDTO.md | 35 + manager_api_new/doc/WebDTO.md | 33 + {manager_api => manager_api_new}/git_push.sh | 0 {manager_api => manager_api_new}/lib/api.dart | 44 +- .../lib/api/authentication_api.dart | 61 +- .../lib/api/configuration_api.dart | 195 +- .../lib/api/device_api.dart | 143 +- .../lib/api/instance_api.dart | 150 +- .../lib/api/resource_api.dart | 179 +- .../lib/api/section_api.dart | 453 +- manager_api_new/lib/api/section_map_api.dart | 249 + manager_api_new/lib/api/section_quiz_api.dart | 249 + .../lib/api/user_api.dart | 121 +- .../lib/api_client.dart | 270 +- .../lib/api_exception.dart | 5 +- .../lib/api_helper.dart | 31 +- .../lib/auth/api_key_auth.dart | 7 +- .../lib/auth/authentication.dart | 5 +- .../lib/auth/http_basic_auth.dart | 10 +- .../lib/auth/http_bearer_auth.dart | 10 +- .../lib/auth/oauth.dart | 7 +- manager_api_new/lib/model/agenda_dto.dart | 357 + ...agenda_dto_all_of_agenda_map_provider.dart | 100 + manager_api_new/lib/model/article_dto.dart | 402 + .../lib/model/categorie_dto.dart | 85 +- .../lib/model/configuration_dto.dart | 198 +- .../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 +- .../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 | 263 + .../lib/model/geo_point_dto.dart | 107 +- .../lib/model/geo_point_dto_categorie.dart | 58 +- .../lib/model/geo_point_section_map.dart | 424 + .../lib/model/image_dto.dart | 54 +- .../lib/model/image_geo_point.dart | 42 +- .../lib/model/instance.dart | 81 +- .../lib/model/instance_dto.dart | 64 +- .../lib/model/level_dto.dart | 33 +- .../lib/model/login_dto.dart | 39 +- manager_api_new/lib/model/map_dto.dart | 451 + .../model/map_dto_all_of_map_provider.dart | 58 +- .../lib/model/map_dto_all_of_map_type.dart | 58 +- .../model/map_dto_all_of_map_type_mapbox.dart | 58 +- .../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 +- .../lib/model/map_provider.dart | 2 +- .../lib/model/map_type_app.dart | 82 +- .../lib/model/map_type_map_box.dart | 5 +- manager_api_new/lib/model/menu_dto.dart | 346 + .../ordered_translation_and_resource_dto.dart | 146 + manager_api_new/lib/model/pdf_dto.dart | 346 + .../lib/model/pdf_file_dto.dart | 45 +- .../lib/model/player_message_dto.dart | 44 +- manager_api_new/lib/model/puzzle_dto.dart | 414 + .../model/puzzle_dto_all_of_puzzle_image.dart | 191 + .../lib/model/puzzle_dto_image.dart | 58 +- .../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 | 199 + .../lib/model/quiz_question_resource.dart | 174 + .../lib/model/quiz_question_section_quiz.dart | 353 + .../lib/model/quizz_dto.dart | 56 +- .../lib/model/quizz_dto_bad_level.dart | 34 +- manager_api_new/lib/model/resource.dart | 174 + .../lib/model/resource_dto.dart | 62 +- .../lib/model/resource_type.dart | 2 +- .../lib/model/response_dto.dart | 48 +- manager_api_new/lib/model/section.dart | 309 + .../lib/model/section_dto.dart | 121 +- manager_api_new/lib/model/section_map.dart | 424 + .../section_map_all_of_map_map_provider.dart | 100 + .../section_map_all_of_map_map_type.dart | 58 +- .../section_map_all_of_map_resource.dart | 174 + .../section_map_all_of_map_type_mapbox.dart | 58 +- manager_api_new/lib/model/section_quiz.dart | 353 + .../lib/model/section_type.dart | 12 +- manager_api_new/lib/model/slider_dto.dart | 346 + .../lib/model/token_dto.dart | 74 +- .../model/translation_and_resource_dto.dart | 81 +- .../lib/model/translation_dto.dart | 41 +- .../lib/model/user.dart | 151 +- .../lib/model/user_detail_dto.dart | 63 +- manager_api_new/lib/model/video_dto.dart | 346 + manager_api_new/lib/model/weather_dto.dart | 368 + manager_api_new/lib/model/web_dto.dart | 346 + manager_api_new/pubspec.yaml | 17 + ...a_dto_all_of_agenda_map_provider_test.dart | 19 + .../test/agenda_dto_test.dart | 9 +- .../test/article_dto_test.dart | 10 +- .../test/authentication_api_test.dart | 4 +- .../test/categorie_dto_test.dart | 5 +- .../test/configuration_api_test.dart | 4 +- .../test/configuration_dto_test.dart | 5 +- .../test/content_dto_resource_test.dart | 49 + .../test/content_dto_test.dart | 5 +- .../test/content_geo_point_test.dart | 5 +- .../test/device_api_test.dart | 4 +- .../test/device_detail_dto_all_of_test.dart | 5 +- .../test/device_detail_dto_test.dart | 5 +- .../test/device_dto_test.dart | 5 +- .../export_configuration_dto_all_of_test.dart | 5 +- .../test/export_configuration_dto_test.dart | 5 +- .../test/geo_point_dto_categorie_test.dart | 5 +- .../test/geo_point_dto_test.dart | 5 +- .../test/geo_point_section_map_test.dart | 159 + manager_api_new/test/geo_point_test.dart | 89 + .../test/image_dto_test.dart | 5 +- .../test/image_geo_point_test.dart | 5 +- .../test/instance_api_test.dart | 4 +- .../test/instance_dto_test.dart | 5 +- .../test/instance_test.dart | 5 +- .../test/level_dto_test.dart | 5 +- .../test/login_dto_test.dart | 5 +- .../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 | 7 +- .../test/map_dto_map_type_mapbox_test.dart | 7 +- .../test/map_dto_map_type_test.dart | 7 +- .../test/map_dto_test.dart | 5 +- .../test/map_provider_test.dart | 8 +- .../test/map_type_app_test.dart | 8 +- .../test/map_type_map_box_test.dart | 8 +- .../test/menu_dto_test.dart | 5 +- ...red_translation_and_resource_dto_test.dart | 29 + .../test/pdf_dto_test.dart | 9 +- .../test/pdf_file_dto_test.dart | 10 +- .../test/player_message_dto_test.dart | 5 +- .../puzzle_dto_all_of_puzzle_image_test.dart | 49 + .../test/puzzle_dto_image_test.dart | 8 +- .../test/puzzle_dto_test.dart | 5 +- ...o_image_background_resource_type_test.dart | 19 + .../test/question_dto_test.dart | 5 +- manager_api_new/test/quiz_dto_test.dart | 134 + .../test/quiz_question_resource_test.dart | 49 + .../test/quiz_question_section_quiz_test.dart | 134 + manager_api_new/test/quiz_question_test.dart | 49 + .../test/quizz_dto_bad_level_test.dart | 5 +- .../test/quizz_dto_test.dart | 5 +- .../test/resource_api_test.dart | 4 +- .../test/resource_dto_test.dart | 5 +- manager_api_new/test/resource_test.dart | 49 + .../test/resource_type_test.dart | 8 +- .../test/response_dto_test.dart | 5 +- .../test/section_api_test.dart | 4 +- .../test/section_dto_test.dart | 30 +- ...tion_map_all_of_map_map_provider_test.dart | 19 + .../section_map_all_of_map_map_type_test.dart | 19 + .../section_map_all_of_map_resource_test.dart | 49 + ...ction_map_all_of_map_type_mapbox_test.dart | 19 + .../test/section_map_api_test.dart | 39 + manager_api_new/test/section_map_test.dart | 159 + .../test/section_quiz_api_test.dart | 39 + manager_api_new/test/section_quiz_test.dart | 134 + manager_api_new/test/section_test.dart | 109 + .../test/section_type_test.dart | 8 +- .../test/slider_dto_test.dart | 5 +- .../test/token_dto_test.dart | 5 +- .../translation_and_resource_dto_test.dart | 5 +- .../test/translation_dto_test.dart | 5 +- .../test/user_api_test.dart | 4 +- .../test/user_detail_dto_test.dart | 5 +- .../test/user_test.dart | 5 +- .../test/video_dto_test.dart | 5 +- .../test/weather_dto_test.dart | 5 +- .../test/web_dto_test.dart | 5 +- pubspec.yaml | 4 +- 314 files changed, 19415 insertions(+), 6420 deletions(-) delete mode 100644 manager_api/.openapi-generator/VERSION delete mode 100644 manager_api/README.md delete mode 100644 manager_api/doc/ArticleDTO.md delete mode 100644 manager_api/doc/MapDTO.md delete mode 100644 manager_api/doc/PuzzleDTO.md delete mode 100644 manager_api/doc/SliderDTO.md delete mode 100644 manager_api/doc/WeatherDTO.md delete mode 100644 manager_api/lib/model/agenda_dto.dart delete mode 100644 manager_api/lib/model/article_dto.dart delete mode 100644 manager_api/lib/model/map_dto.dart delete mode 100644 manager_api/lib/model/puzzle_dto.dart delete mode 100644 manager_api/lib/model/weather_dto.dart delete mode 100644 manager_api/pubspec.yaml rename {manager_api => manager_api_new}/.gitignore (75%) rename {manager_api => manager_api_new}/.openapi-generator-ignore (100%) rename {manager_api => manager_api_new}/.openapi-generator/FILES (62%) create mode 100644 manager_api_new/.openapi-generator/VERSION rename {manager_api => manager_api_new}/.travis.yml (100%) create mode 100644 manager_api_new/README.md rename {manager_api => manager_api_new}/analysis_options.yaml (100%) create mode 100644 manager_api_new/doc/AgendaDTO.md rename manager_api/doc/WebDTO.md => manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md (74%) create mode 100644 manager_api_new/doc/ArticleDTO.md rename {manager_api => manager_api_new}/doc/AuthenticationApi.md (93%) rename {manager_api => manager_api_new}/doc/CategorieDTO.md (76%) rename {manager_api => manager_api_new}/doc/ConfigurationApi.md (94%) rename {manager_api => manager_api_new}/doc/ConfigurationDTO.md (83%) rename {manager_api => manager_api_new}/doc/ContentDTO.md (75%) rename manager_api/doc/User.md => manager_api_new/doc/ContentDTOResource.md (62%) rename {manager_api => manager_api_new}/doc/ContentGeoPoint.md (86%) rename {manager_api => manager_api_new}/doc/DeviceApi.md (94%) rename {manager_api => manager_api_new}/doc/DeviceDTO.md (91%) rename {manager_api => manager_api_new}/doc/DeviceDetailDTO.md (92%) rename {manager_api => manager_api_new}/doc/DeviceDetailDTOAllOf.md (86%) rename {manager_api => manager_api_new}/doc/ExportConfigurationDTO.md (84%) rename {manager_api => manager_api_new}/doc/ExportConfigurationDTOAllOf.md (84%) create mode 100644 manager_api_new/doc/GeoPoint.md rename {manager_api => manager_api_new}/doc/GeoPointDTO.md (82%) rename {manager_api => manager_api_new}/doc/GeoPointDTOCategorie.md (87%) create mode 100644 manager_api_new/doc/GeoPointSectionMap.md rename {manager_api => manager_api_new}/doc/ImageDTO.md (81%) rename {manager_api => manager_api_new}/doc/ImageGeoPoint.md (83%) rename {manager_api => manager_api_new}/doc/Instance.md (67%) rename {manager_api => manager_api_new}/doc/InstanceApi.md (87%) rename {manager_api => manager_api_new}/doc/InstanceDTO.md (78%) rename {manager_api => manager_api_new}/doc/LevelDTO.md (85%) rename {manager_api => manager_api_new}/doc/LoginDTO.md (83%) create mode 100644 manager_api_new/doc/MapDTO.md rename manager_api/doc/VideoDTO.md => manager_api_new/doc/MapDTOAllOfMapProvider.md (74%) rename manager_api/doc/PdfDTO.md => manager_api_new/doc/MapDTOAllOfMapType.md (67%) rename manager_api/doc/MenuDTO.md => manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md (66%) rename {manager_api => manager_api_new}/doc/MapDTOMapProvider.md (78%) rename {manager_api => manager_api_new}/doc/MapDTOMapType.md (79%) rename {manager_api => manager_api_new}/doc/MapDTOMapTypeMapbox.md (78%) rename {manager_api => manager_api_new}/doc/MapProvider.md (79%) rename {manager_api => manager_api_new}/doc/MapTypeApp.md (80%) rename {manager_api => manager_api_new}/doc/MapTypeMapBox.md (79%) create mode 100644 manager_api_new/doc/MenuDTO.md rename manager_api/doc/AgendaDTO.md => manager_api_new/doc/OrderedTranslationAndResourceDTO.md (53%) rename {manager_api => manager_api_new}/doc/PDFFileDTO.md (86%) create mode 100644 manager_api_new/doc/PdfDTO.md rename {manager_api => manager_api_new}/doc/PlayerMessageDTO.md (82%) create mode 100644 manager_api_new/doc/PuzzleDTO.md create mode 100644 manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md rename {manager_api => manager_api_new}/doc/PuzzleDTOImage.md (89%) rename {manager_api => manager_api_new}/doc/QuestionDTO.md (73%) create mode 100644 manager_api_new/doc/QuestionDTOImageBackgroundResourceType.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/QuizQuestionSectionQuiz.md rename {manager_api => manager_api_new}/doc/QuizzDTO.md (90%) rename {manager_api => manager_api_new}/doc/QuizzDTOBadLevel.md (83%) create mode 100644 manager_api_new/doc/Resource.md rename {manager_api => manager_api_new}/doc/ResourceApi.md (95%) rename {manager_api => manager_api_new}/doc/ResourceDTO.md (88%) rename {manager_api => manager_api_new}/doc/ResourceType.md (79%) rename {manager_api => manager_api_new}/doc/ResponseDTO.md (86%) create mode 100644 manager_api_new/doc/Section.md rename {manager_api => manager_api_new}/doc/SectionApi.md (88%) rename {manager_api => manager_api_new}/doc/SectionDTO.md (91%) create mode 100644 manager_api_new/doc/SectionMap.md create mode 100644 manager_api_new/doc/SectionMapAllOfMapMapProvider.md create mode 100644 manager_api_new/doc/SectionMapAllOfMapMapType.md create mode 100644 manager_api_new/doc/SectionMapAllOfMapResource.md create mode 100644 manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md create mode 100644 manager_api_new/doc/SectionMapApi.md create mode 100644 manager_api_new/doc/SectionQuiz.md create mode 100644 manager_api_new/doc/SectionQuizApi.md rename {manager_api => manager_api_new}/doc/SectionType.md (79%) create mode 100644 manager_api_new/doc/SliderDTO.md rename {manager_api => manager_api_new}/doc/TokenDTO.md (84%) rename {manager_api => manager_api_new}/doc/TranslationAndResourceDTO.md (68%) rename {manager_api => manager_api_new}/doc/TranslationDTO.md (82%) create mode 100644 manager_api_new/doc/User.md rename {manager_api => manager_api_new}/doc/UserApi.md (85%) rename {manager_api => manager_api_new}/doc/UserDetailDTO.md (79%) create mode 100644 manager_api_new/doc/VideoDTO.md create mode 100644 manager_api_new/doc/WeatherDTO.md create mode 100644 manager_api_new/doc/WebDTO.md rename {manager_api => manager_api_new}/git_push.sh (100%) rename {manager_api => manager_api_new}/lib/api.dart (65%) rename {manager_api => manager_api_new}/lib/api/authentication_api.dart (76%) rename {manager_api => manager_api_new}/lib/api/configuration_api.dart (71%) rename {manager_api => manager_api_new}/lib/api/device_api.dart (71%) rename {manager_api => manager_api_new}/lib/api/instance_api.dart (69%) rename {manager_api => manager_api_new}/lib/api/resource_api.dart (70%) rename {manager_api => manager_api_new}/lib/api/section_api.dart (72%) create mode 100644 manager_api_new/lib/api/section_map_api.dart create mode 100644 manager_api_new/lib/api/section_quiz_api.dart rename {manager_api => manager_api_new}/lib/api/user_api.dart (70%) rename {manager_api => manager_api_new}/lib/api_client.dart (57%) rename {manager_api => manager_api_new}/lib/api_exception.dart (86%) rename {manager_api => manager_api_new}/lib/api_helper.dart (81%) rename {manager_api => manager_api_new}/lib/auth/api_key_auth.dart (88%) rename {manager_api => manager_api_new}/lib/auth/authentication.dart (77%) rename {manager_api => manager_api_new}/lib/auth/http_basic_auth.dart (70%) rename {manager_api => manager_api_new}/lib/auth/http_bearer_auth.dart (81%) rename {manager_api => manager_api_new}/lib/auth/oauth.dart (79%) create mode 100644 manager_api_new/lib/model/agenda_dto.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/article_dto.dart rename {manager_api => manager_api_new}/lib/model/categorie_dto.dart (62%) rename {manager_api => manager_api_new}/lib/model/configuration_dto.dart (62%) rename {manager_api => manager_api_new}/lib/model/content_dto.dart (62%) create mode 100644 manager_api_new/lib/model/content_dto_resource.dart rename {manager_api => manager_api_new}/lib/model/content_geo_point.dart (73%) rename {manager_api => manager_api_new}/lib/model/device_detail_dto.dart (65%) rename {manager_api => manager_api_new}/lib/model/device_detail_dto_all_of.dart (72%) rename {manager_api => manager_api_new}/lib/model/device_dto.dart (65%) rename {manager_api => manager_api_new}/lib/model/export_configuration_dto.dart (63%) rename {manager_api => manager_api_new}/lib/model/export_configuration_dto_all_of.dart (76%) create mode 100644 manager_api_new/lib/model/geo_point.dart rename {manager_api => manager_api_new}/lib/model/geo_point_dto.dart (68%) rename {manager_api => manager_api_new}/lib/model/geo_point_dto_categorie.dart (73%) create mode 100644 manager_api_new/lib/model/geo_point_section_map.dart rename {manager_api => manager_api_new}/lib/model/image_dto.dart (74%) rename {manager_api => manager_api_new}/lib/model/image_geo_point.dart (72%) rename {manager_api => manager_api_new}/lib/model/instance.dart (66%) rename {manager_api => manager_api_new}/lib/model/instance_dto.dart (66%) rename {manager_api => manager_api_new}/lib/model/level_dto.dart (76%) rename {manager_api => manager_api_new}/lib/model/login_dto.dart (75%) create mode 100644 manager_api_new/lib/model/map_dto.dart rename manager_api/lib/model/pdf_dto.dart => manager_api_new/lib/model/map_dto_all_of_map_provider.dart (57%) rename manager_api/lib/model/web_dto.dart => manager_api_new/lib/model/map_dto_all_of_map_type.dart (56%) rename manager_api/lib/model/video_dto.dart => manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart (56%) rename {manager_api => manager_api_new}/lib/model/map_dto_map_provider.dart (75%) rename {manager_api => manager_api_new}/lib/model/map_dto_map_type.dart (76%) rename {manager_api => manager_api_new}/lib/model/map_dto_map_type_mapbox.dart (77%) rename {manager_api => manager_api_new}/lib/model/map_provider.dart (99%) rename {manager_api => manager_api_new}/lib/model/map_type_app.dart (53%) rename {manager_api => manager_api_new}/lib/model/map_type_map_box.dart (99%) create mode 100644 manager_api_new/lib/model/menu_dto.dart create mode 100644 manager_api_new/lib/model/ordered_translation_and_resource_dto.dart create mode 100644 manager_api_new/lib/model/pdf_dto.dart rename {manager_api => manager_api_new}/lib/model/pdf_file_dto.dart (70%) rename {manager_api => manager_api_new}/lib/model/player_message_dto.dart (76%) create mode 100644 manager_api_new/lib/model/puzzle_dto.dart create mode 100644 manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart rename {manager_api => manager_api_new}/lib/model/puzzle_dto_image.dart (75%) rename {manager_api => manager_api_new}/lib/model/question_dto.dart (69%) 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/quiz_question_section_quiz.dart rename {manager_api => manager_api_new}/lib/model/quizz_dto.dart (70%) rename {manager_api => manager_api_new}/lib/model/quizz_dto_bad_level.dart (76%) create mode 100644 manager_api_new/lib/model/resource.dart rename {manager_api => manager_api_new}/lib/model/resource_dto.dart (74%) rename {manager_api => manager_api_new}/lib/model/resource_type.dart (99%) rename {manager_api => manager_api_new}/lib/model/response_dto.dart (76%) create mode 100644 manager_api_new/lib/model/section.dart rename {manager_api => manager_api_new}/lib/model/section_dto.dart (72%) create mode 100644 manager_api_new/lib/model/section_map.dart create mode 100644 manager_api_new/lib/model/section_map_all_of_map_map_provider.dart rename manager_api/lib/model/slider_dto.dart => manager_api_new/lib/model/section_map_all_of_map_map_type.dart (56%) create mode 100644 manager_api_new/lib/model/section_map_all_of_map_resource.dart rename manager_api/lib/model/menu_dto.dart => manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart (54%) create mode 100644 manager_api_new/lib/model/section_quiz.dart rename {manager_api => manager_api_new}/lib/model/section_type.dart (93%) create mode 100644 manager_api_new/lib/model/slider_dto.dart rename {manager_api => manager_api_new}/lib/model/token_dto.dart (71%) rename {manager_api => manager_api_new}/lib/model/translation_and_resource_dto.dart (61%) rename {manager_api => manager_api_new}/lib/model/translation_dto.dart (75%) rename {manager_api => manager_api_new}/lib/model/user.dart (52%) rename {manager_api => manager_api_new}/lib/model/user_detail_dto.dart (66%) create mode 100644 manager_api_new/lib/model/video_dto.dart create mode 100644 manager_api_new/lib/model/weather_dto.dart create mode 100644 manager_api_new/lib/model/web_dto.dart create mode 100644 manager_api_new/pubspec.yaml create mode 100644 manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart rename {manager_api => manager_api_new}/test/agenda_dto_test.dart (77%) rename {manager_api => manager_api_new}/test/article_dto_test.dart (88%) rename {manager_api => manager_api_new}/test/authentication_api_test.dart (95%) rename {manager_api => manager_api_new}/test/categorie_dto_test.dart (93%) rename {manager_api => manager_api_new}/test/configuration_api_test.dart (97%) rename {manager_api => manager_api_new}/test/configuration_dto_test.dart (97%) create mode 100644 manager_api_new/test/content_dto_resource_test.dart rename {manager_api => manager_api_new}/test/content_dto_test.dart (96%) rename {manager_api => manager_api_new}/test/content_geo_point_test.dart (95%) rename {manager_api => manager_api_new}/test/device_api_test.dart (96%) rename {manager_api => manager_api_new}/test/device_detail_dto_all_of_test.dart (95%) rename {manager_api => manager_api_new}/test/device_detail_dto_test.dart (97%) rename {manager_api => manager_api_new}/test/device_dto_test.dart (97%) rename {manager_api => manager_api_new}/test/export_configuration_dto_all_of_test.dart (94%) rename {manager_api => manager_api_new}/test/export_configuration_dto_test.dart (98%) rename {manager_api => manager_api_new}/test/geo_point_dto_categorie_test.dart (93%) rename {manager_api => manager_api_new}/test/geo_point_dto_test.dart (96%) create mode 100644 manager_api_new/test/geo_point_section_map_test.dart create mode 100644 manager_api_new/test/geo_point_test.dart rename {manager_api => manager_api_new}/test/image_dto_test.dart (95%) rename {manager_api => manager_api_new}/test/image_geo_point_test.dart (93%) rename {manager_api => manager_api_new}/test/instance_api_test.dart (96%) rename {manager_api => manager_api_new}/test/instance_dto_test.dart (94%) rename {manager_api => manager_api_new}/test/instance_test.dart (94%) rename {manager_api => manager_api_new}/test/level_dto_test.dart (94%) rename {manager_api => manager_api_new}/test/login_dto_test.dart (93%) 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 rename {manager_api => manager_api_new}/test/map_dto_map_provider_test.dart (82%) rename {manager_api => manager_api_new}/test/map_dto_map_type_mapbox_test.dart (81%) rename {manager_api => manager_api_new}/test/map_dto_map_type_test.dart (82%) rename {manager_api => manager_api_new}/test/map_dto_test.dart (95%) rename {manager_api => manager_api_new}/test/map_provider_test.dart (80%) rename {manager_api => manager_api_new}/test/map_type_app_test.dart (80%) rename {manager_api => manager_api_new}/test/map_type_map_box_test.dart (80%) rename {manager_api => manager_api_new}/test/menu_dto_test.dart (92%) create mode 100644 manager_api_new/test/ordered_translation_and_resource_dto_test.dart rename {manager_api => manager_api_new}/test/pdf_dto_test.dart (77%) rename {manager_api => manager_api_new}/test/pdf_file_dto_test.dart (81%) rename {manager_api => manager_api_new}/test/player_message_dto_test.dart (93%) create mode 100644 manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart rename {manager_api => manager_api_new}/test/puzzle_dto_image_test.dart (87%) rename {manager_api => manager_api_new}/test/puzzle_dto_test.dart (94%) create mode 100644 manager_api_new/test/question_dto_image_background_resource_type_test.dart rename {manager_api => manager_api_new}/test/question_dto_test.dart (95%) 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_section_quiz_test.dart create mode 100644 manager_api_new/test/quiz_question_test.dart rename {manager_api => manager_api_new}/test/quizz_dto_bad_level_test.dart (94%) rename {manager_api => manager_api_new}/test/quizz_dto_test.dart (95%) rename {manager_api => manager_api_new}/test/resource_api_test.dart (97%) rename {manager_api => manager_api_new}/test/resource_dto_test.dart (95%) create mode 100644 manager_api_new/test/resource_test.dart rename {manager_api => manager_api_new}/test/resource_type_test.dart (80%) rename {manager_api => manager_api_new}/test/response_dto_test.dart (94%) rename {manager_api => manager_api_new}/test/section_api_test.dart (98%) rename {manager_api => manager_api_new}/test/section_dto_test.dart (77%) create mode 100644 manager_api_new/test/section_map_all_of_map_map_provider_test.dart create mode 100644 manager_api_new/test/section_map_all_of_map_map_type_test.dart create mode 100644 manager_api_new/test/section_map_all_of_map_resource_test.dart create mode 100644 manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart create mode 100644 manager_api_new/test/section_map_api_test.dart create mode 100644 manager_api_new/test/section_map_test.dart create mode 100644 manager_api_new/test/section_quiz_api_test.dart create mode 100644 manager_api_new/test/section_quiz_test.dart create mode 100644 manager_api_new/test/section_test.dart rename {manager_api => manager_api_new}/test/section_type_test.dart (80%) rename {manager_api => manager_api_new}/test/slider_dto_test.dart (92%) rename {manager_api => manager_api_new}/test/token_dto_test.dart (96%) rename {manager_api => manager_api_new}/test/translation_and_resource_dto_test.dart (95%) rename {manager_api => manager_api_new}/test/translation_dto_test.dart (93%) rename {manager_api => manager_api_new}/test/user_api_test.dart (95%) rename {manager_api => manager_api_new}/test/user_detail_dto_test.dart (94%) rename {manager_api => manager_api_new}/test/user_test.dart (96%) rename {manager_api => manager_api_new}/test/video_dto_test.dart (92%) rename {manager_api => manager_api_new}/test/weather_dto_test.dart (94%) rename {manager_api => manager_api_new}/test/web_dto_test.dart (92%) diff --git a/lib/Components/cached_custom_resource.dart b/lib/Components/cached_custom_resource.dart index 2c7db0f..e4813f5 100644 --- a/lib/Components/cached_custom_resource.dart +++ b/lib/Components/cached_custom_resource.dart @@ -3,7 +3,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:cached_network_image/cached_network_image.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/audio_player.dart'; diff --git a/lib/Components/loading_common.dart b/lib/Components/loading_common.dart index 520563f..dc6dff2 100644 --- a/lib/Components/loading_common.dart +++ b/lib/Components/loading_common.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/cached_custom_resource.dart'; diff --git a/lib/Components/show_element_for_resource.dart b/lib/Components/show_element_for_resource.dart index da2d1e6..d24f4e0 100644 --- a/lib/Components/show_element_for_resource.dart +++ b/lib/Components/show_element_for_resource.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/Components/audio_player.dart'; import 'package:tablet_app/Components/video_viewer.dart'; import 'package:tablet_app/Components/video_viewer_youtube.dart'; diff --git a/lib/Components/video_viewer_youtube.dart b/lib/Components/video_viewer_youtube.dart index 2a5e305..49c5f69 100644 --- a/lib/Components/video_viewer_youtube.dart +++ b/lib/Components/video_viewer_youtube.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/constants.dart'; import 'package:youtube_player_iframe/youtube_player_iframe.dart' as iframe; //import 'package:youtube_player_flutter/youtube_player_flutter.dart'; diff --git a/lib/Helpers/DatabaseHelper.dart b/lib/Helpers/DatabaseHelper.dart index 495e18a..016e628 100644 --- a/lib/Helpers/DatabaseHelper.dart +++ b/lib/Helpers/DatabaseHelper.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path/path.dart'; import 'package:sqflite/sqflite.dart'; import 'package:tablet_app/Models/tabletContext.dart'; diff --git a/lib/Helpers/MQTTHelper.dart b/lib/Helpers/MQTTHelper.dart index 5bdc79c..a08d6a8 100644 --- a/lib/Helpers/MQTTHelper.dart +++ b/lib/Helpers/MQTTHelper.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:mqtt_client/mqtt_browser_client.dart'; import 'package:mqtt_client/mqtt_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; diff --git a/lib/Helpers/translationHelper.dart b/lib/Helpers/translationHelper.dart index a269e76..63c2fe1 100644 --- a/lib/Helpers/translationHelper.dart +++ b/lib/Helpers/translationHelper.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/Helpers/translations.dart'; import 'package:tablet_app/Models/tabletContext.dart'; diff --git a/lib/Models/ResponseSubDTO.dart b/lib/Models/ResponseSubDTO.dart index 130523a..5162344 100644 --- a/lib/Models/ResponseSubDTO.dart +++ b/lib/Models/ResponseSubDTO.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class ResponseSubDTO { List? label; diff --git a/lib/Models/map-marker.dart b/lib/Models/map-marker.dart index fb067a0..139fec6 100644 --- a/lib/Models/map-marker.dart +++ b/lib/Models/map-marker.dart @@ -1,10 +1,10 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class MapMarker { int? id; String? title; String? description; - List? contents; + List? contents; String? latitude; String? longitude; @@ -15,7 +15,7 @@ class MapMarker { id: json['id'] as int, title: json['title'] as String, description: json['description'] as String, - contents: json['contents'] as List, + contents: json['contents'] as List, latitude: json['latitude'] as String, longitude: json['longitude'] as String, ); diff --git a/lib/Models/tabletContext.dart b/lib/Models/tabletContext.dart index 3cc641c..48f508b 100644 --- a/lib/Models/tabletContext.dart +++ b/lib/Models/tabletContext.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:mqtt_client/mqtt_browser_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; import 'package:tablet_app/client.dart'; diff --git a/lib/Models/translation.dart b/lib/Models/translation.dart index b049c5f..506b190 100644 --- a/lib/Models/translation.dart +++ b/lib/Models/translation.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class Translation { String? language = ""; diff --git a/lib/Screens/Agenda/agenda_view.dart b/lib/Screens/Agenda/agenda_view.dart index 9bc329f..a620fba 100644 --- a/lib/Screens/Agenda/agenda_view.dart +++ b/lib/Screens/Agenda/agenda_view.dart @@ -7,7 +7,7 @@ import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; import 'package:tablet_app/Models/agenda.dart'; @@ -20,8 +20,8 @@ import 'package:tablet_app/constants.dart'; class AgendaView extends StatefulWidget { - final SectionDTO? section; - AgendaView({this.section}); + final AgendaDTO section; + AgendaView({required this.section}); @override _AgendaView createState() => _AgendaView(); @@ -35,9 +35,10 @@ class _AgendaView extends State { @override void initState() { - print(widget.section!.data); + /*print(widget.section!.data); agendaDTO = AgendaDTO.fromJson(jsonDecode(widget.section!.data!))!; - print(agendaDTO); + print(agendaDTO);*/ + agendaDTO = widget.section; super.initState(); } @@ -152,7 +153,7 @@ class _AgendaView extends State { showDialog( context: context, builder: (BuildContext context) { - return EventPopup(eventAgenda: eventAgenda, mapProvider: agendaDTO.mapProvider ?? MapProvider.Google, mapIcon: mapIcon); + return EventPopup(eventAgenda: eventAgenda, mapProvider: agendaDTO.agendaMapProvider ?? MapProvider.Google, mapIcon: mapIcon); }, ); }, diff --git a/lib/Screens/Agenda/event_popup.dart b/lib/Screens/Agenda/event_popup.dart index 592b5b5..1aa810d 100644 --- a/lib/Screens/Agenda/event_popup.dart +++ b/lib/Screens/Agenda/event_popup.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart' as mapBox; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:tablet_app/Components/loading_common.dart'; diff --git a/lib/Screens/Article/article_view.dart b/lib/Screens/Article/article_view.dart index 420a396..38fa35f 100644 --- a/lib/Screens/Article/article_view.dart +++ b/lib/Screens/Article/article_view.dart @@ -6,7 +6,7 @@ import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path_provider/path_provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; @@ -20,13 +20,14 @@ class ArticleView extends StatefulWidget { } class _ArticleView extends State { - AgendaDTO agendaDTO = AgendaDTO(); + ArticleDTO articleDTO = ArticleDTO(); @override void initState() { - print(widget.section!.data); + /*print(widget.section!.data); agendaDTO = AgendaDTO.fromJson(jsonDecode(widget.section!.data!))!; - print(agendaDTO); + print(agendaDTO);*/ + super.initState(); } @@ -40,7 +41,7 @@ class _ArticleView extends State { @override Widget build(BuildContext context) { return new Center( - child: Text("TODO Agenda"), + child: Text("TODO Article"), ); } } //_webView \ No newline at end of file diff --git a/lib/Screens/Configuration/config_view.dart b/lib/Screens/Configuration/config_view.dart index 4acc81d..0010981 100644 --- a/lib/Screens/Configuration/config_view.dart +++ b/lib/Screens/Configuration/config_view.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:fluttertoast/fluttertoast.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:mqtt_client/mqtt_browser_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -36,7 +36,7 @@ class ConfigViewWidget extends StatefulWidget { class _ConfigViewWidget extends State { Size sizeScreen = new Size(1080.0, 1920.0); // Tablet resolution String url = "https://api.myinfomate.be"; //DEV "http://192.168.31.96" http://192.168.31.140:8089 // PROD MDLF "http://192.168.1.19" - int? pinCode; + String? pinCode; bool configOk = false; @override @@ -188,7 +188,7 @@ class _ConfigViewWidget extends State { hintText: "PIN", onChanged: (value) { setState(() { - pinCode = int.tryParse(value); + pinCode = value; }); }, icon: Icons.pin, @@ -329,7 +329,7 @@ class _ConfigViewWidget extends State { } } - Future getInstanceIdByPinCode(Client client, int pinCode) async { + Future getInstanceIdByPinCode(Client client, String pinCode) async { try { var instance = await client.instanceApi!.instanceGetInstanceByPinCode(pinCode: pinCode); return instance; diff --git a/lib/Screens/Configuration/dropDown_configuration.dart b/lib/Screens/Configuration/dropDown_configuration.dart index 23b33d8..850036f 100644 --- a/lib/Screens/Configuration/dropDown_configuration.dart +++ b/lib/Screens/Configuration/dropDown_configuration.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/constants.dart'; diff --git a/lib/Screens/MainView/main_view.dart b/lib/Screens/MainView/main_view.dart index 6735287..484365c 100644 --- a/lib/Screens/MainView/main_view.dart +++ b/lib/Screens/MainView/main_view.dart @@ -11,7 +11,7 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; @@ -63,6 +63,8 @@ class _MainViewWidget extends State { bool isImageBackground = false; List? sectionsLocal; + late List rawSectionsData; + bool isInit = true; // Use to make it faster and to load resource at init bool isDialogOpen = false; @@ -279,11 +281,20 @@ class _MainViewWidget extends State { if(isInit) { try { - List? sections = await tabletAppContext.clientAPI!.sectionApi!.sectionGetFromConfiguration(tabletAppContext.configuration!.id!); - sections!.sort((a, b) => a.order!.compareTo(b.order!)); - sectionsLocal = sections; + + final rawList = await tabletAppContext.clientAPI!.sectionApi!.sectionGetFromConfigurationDetail(tabletAppContext.configuration!.id!); + //var sections = rawList.map((json) => SectionDTO.fromJson(json)).toList(); + rawSectionsData = jsonDecode(jsonEncode(rawList)); + rawSectionsData = rawSectionsData.map((json) => SectionDTO.fromJson(json)).toList(); + List sectionList = rawSectionsData.whereType().toList(); + sectionList.sort((a, b) => a.order!.compareTo(b.order!)); + + /*List? sections = await tabletAppContext.clientAPI!.sectionApi!.sectionGetFromConfiguration(tabletAppContext.configuration!.id!); + sections!.sort((a, b) => a.order!.compareTo(b.order!));*/ + + sectionsLocal = sectionList; isInit = false; - return sections; + return sectionList; } catch (e) { print(e); print("IN CATCH"); @@ -324,7 +335,7 @@ class _MainViewWidget extends State { context, MaterialPageRoute( builder: (context) { - return SectionPageDetail(configurationDTO: configurationDTO, sectionDTO: sectionsLocal![index], textColor: textColor, isImageBackground: isImageBackground, elementToShow: getContent(tabletAppContext, sectionsLocal![index], isImageBackground), isFromMenu: false); + return SectionPageDetail(configurationDTO: configurationDTO, sectionDTO: sectionsLocal![index], textColor: textColor, isImageBackground: isImageBackground, elementToShow: getContent(tabletAppContext, sectionsLocal![index], isImageBackground, rawSectionsData[index]), isFromMenu: false); }, ),// For pushAndRemoveUntil ); @@ -426,11 +437,11 @@ boxDecoration(AppContext appContext, SectionDTO section, bool isSelected) { ); } -Future>> getByteIcons(TabletAppContext tabletAppContext, SectionDTO section) async { - var mapDTO = MapDTO.fromJson(jsonDecode(section.data!)); +Future>> getByteIcons(TabletAppContext tabletAppContext, MapDTO mapDTO) async { + //var mapDTO = MapDTO.fromJson(jsonDecode(section.data!)); var selectedMarkerIcon; - if (mapDTO != null && mapDTO.iconSource != null) { + if (mapDTO.iconSource != null) { if (kIsWeb) { Uint8List fileData = await http.readBytes(Uri.parse(mapDTO.iconSource!)); selectedMarkerIcon = resizeImage(fileData, 40); @@ -456,14 +467,14 @@ Future>> getByteIcons(TabletAppContext tabletAppContex // Utiliser Future.forEach() pour itérer de manière asynchrone sur la liste des catégories await Future.forEach(mapDTO!.categories!, (cat) async { - if (cat.iconUrl != null && cat.iconResourceId != null) { + if (cat.resourceDTO != null && cat.resourceDTO!.url != null && cat.resourceDTO!.id != null) { Uint8List categoryIcon; if (kIsWeb) { - categoryIcon = await http.readBytes(Uri.parse(cat.iconUrl!)); + categoryIcon = await http.readBytes(Uri.parse(cat.resourceDTO!.url!)); } else { - File? localIcon = await _checkIfLocalResourceExists(tabletAppContext, cat.iconResourceId!); + File? localIcon = await _checkIfLocalResourceExists(tabletAppContext, cat.resourceDTO!.id!); if(localIcon == null) { - final ByteData imageData = await NetworkAssetBundle(Uri.parse(cat.iconUrl!)).load(""); + final ByteData imageData = await NetworkAssetBundle(Uri.parse(cat.resourceDTO!.url!)).load(""); categoryIcon = await getBytesFromAsset(imageData, 50); } else { Uint8List bytes = await localIcon.readAsBytes(); @@ -510,17 +521,18 @@ Uint8List resizeImage(Uint8List data, int width) { return resizedData; } -Widget getContent(TabletAppContext tabletAppContext, SectionDTO sectionSelected, bool isImageBackground) { +Widget getContent(TabletAppContext tabletAppContext, SectionDTO sectionSelected, bool isImageBackground, Object rawSectionData) { switch (sectionSelected.type) { case SectionType.Map : // MAP + MapDTO mapDTO = MapDTO.fromJson(rawSectionData)!; return ChangeNotifierProvider( create: (_) => MapContext(null), child: FutureBuilder( - future: getByteIcons(tabletAppContext, sectionSelected), + future: getByteIcons(tabletAppContext, mapDTO), builder: (context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done) { - return MapViewWidget(section: sectionSelected, icons: snapshot.data); + return MapView(section: sectionSelected, icons: snapshot.data); } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { @@ -538,26 +550,35 @@ Widget getContent(TabletAppContext tabletAppContext, SectionDTO sectionSelected, : CircularProgressIndicator()),*/ ); case SectionType.Web : // WEB - return WebView(section: sectionSelected); + WebDTO webDTO = WebDTO.fromJson(rawSectionData)!; + return WebView(section: webDTO); case SectionType.Video : // Video - return VideoView(section: sectionSelected); + VideoDTO videoDTO = VideoDTO.fromJson(rawSectionData)!; + return VideoView(section: videoDTO); case SectionType.Slider : - return SliderView(section: sectionSelected); + SliderDTO sliderDTO = SliderDTO.fromJson(rawSectionData)!; + return SliderView(section: sliderDTO); case SectionType.Menu : - return MenuView(section: sectionSelected, isImageBackground: isImageBackground); - case SectionType.Quizz : - return QuizzView(section: sectionSelected); + MenuDTO menuDTO = MenuDTO.fromJson(rawSectionData)!; + return MenuView(section: menuDTO, isImageBackground: isImageBackground); + case SectionType.Quiz : + QuizDTO quizDTO = QuizDTO.fromJson(rawSectionData)!; + return QuizzView(section: quizDTO); case SectionType.Pdf : - return PDFViewWidget(section: sectionSelected); + PdfDTO pdfDTO = PdfDTO.fromJson(rawSectionData)!; + return PDFViewWidget(section: pdfDTO); case SectionType.Puzzle : - return PuzzleView(section: sectionSelected); + PuzzleDTO puzzleDTO = PuzzleDTO.fromJson(rawSectionData)!; + return PuzzleView(section: puzzleDTO); case SectionType.Agenda : - return AgendaView(section: sectionSelected); + AgendaDTO agendaDTO = AgendaDTO.fromJson(rawSectionData)!; + return AgendaView(section: agendaDTO); /*case SectionType.article : // TODO elementToShow = ArticleView(section: sectionSelected); break;*/ case SectionType.Weather : - return WeatherView(section: sectionSelected); + WeatherDTO weatherDTO = WeatherDTO.fromJson(rawSectionData)!; + return WeatherView(section: weatherDTO); default: return Text("Ce type n'est pas supporté"); }; diff --git a/lib/Screens/MainView/section_page_detail.dart b/lib/Screens/MainView/section_page_detail.dart index 6f1945a..12f256d 100644 --- a/lib/Screens/MainView/section_page_detail.dart +++ b/lib/Screens/MainView/section_page_detail.dart @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; import 'package:tablet_app/Components/multi_select_container.dart'; diff --git a/lib/Screens/Map/flutter_map_view.dart b/lib/Screens/Map/flutter_map_view.dart index a35dc5e..3690611 100644 --- a/lib/Screens/Map/flutter_map_view.dart +++ b/lib/Screens/Map/flutter_map_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:latlong2/latlong.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Models/tabletContext.dart'; import 'package:tablet_app/Screens/Map/map_context.dart'; diff --git a/lib/Screens/Map/geo_point_filter.dart b/lib/Screens/Map/geo_point_filter.dart index 4d3fed4..0a5aa65 100644 --- a/lib/Screens/Map/geo_point_filter.dart +++ b/lib/Screens/Map/geo_point_filter.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; //import 'package:generate_tree/generate_tree.dart'; //import 'package:generate_tree/treeNode.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Helpers/translationHelper.dart'; import 'package:tablet_app/Models/tabletContext.dart'; diff --git a/lib/Screens/Map/google_map_view.dart b/lib/Screens/Map/google_map_view.dart index e690026..a0eaf7d 100644 --- a/lib/Screens/Map/google_map_view.dart +++ b/lib/Screens/Map/google_map_view.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Models/tabletContext.dart'; import 'package:tablet_app/Screens/Map/map_context.dart'; diff --git a/lib/Screens/Map/map_box_view.dart b/lib/Screens/Map/map_box_view.dart index a49fadb..c3100a4 100644 --- a/lib/Screens/Map/map_box_view.dart +++ b/lib/Screens/Map/map_box_view.dart @@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart' as mapBox; import 'package:provider/provider.dart'; import 'package:tablet_app/Models/tabletContext.dart'; diff --git a/lib/Screens/Map/map_context.dart b/lib/Screens/Map/map_context.dart index c47104d..e2a5a4e 100644 --- a/lib/Screens/Map/map_context.dart +++ b/lib/Screens/Map/map_context.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; class MapContext with ChangeNotifier { GeoPointDTO? _selectedPoint; diff --git a/lib/Screens/Map/map_view.dart b/lib/Screens/Map/map_view.dart index fe66ab6..92020e0 100644 --- a/lib/Screens/Map/map_view.dart +++ b/lib/Screens/Map/map_view.dart @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; // 'package:flutter/services.dart'; //import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; /*import 'package:tablet_app/Components/loading.dart'; import 'package:tablet_app/Components/loading_common.dart';*/ @@ -26,16 +26,16 @@ import 'google_map_view.dart'; //Set markers = {}; List markersList = []; -class MapViewWidget extends StatefulWidget { - final SectionDTO section; +class MapView extends StatefulWidget { + final MapDTO section; final List> icons; - MapViewWidget({Key? key, required this.section, required this.icons}) : super(key: key); + MapView({Key? key, required this.section, required this.icons}) : super(key: key); @override - _MapViewWidget createState() => _MapViewWidget(); + _MapView createState() => _MapView(); } -class _MapViewWidget extends State { +class _MapView extends State { MapDTO? mapDTO; //Completer _controller = Completer(); //Uint8List? selectedMarkerIcon; @@ -53,7 +53,8 @@ class _MapViewWidget extends State { @override void initState() { - mapDTO = MapDTO.fromJson(jsonDecode(widget.section.data!)); + //mapDTO = MapDTO.fromJson(jsonDecode(widget.section.data!)); + mapDTO = widget.section; _geoPoints.value = mapDTO!.points!; super.initState(); } @@ -101,7 +102,7 @@ class _MapViewWidget extends State { case MapProvider.MapBox: return MapBoxView(language: appContext.getContext().language, geoPoints: value, mapDTO: mapDTO, icons: widget.icons); // If mapbox bug as 3.24 flutter, we can test via this new widget - //return FlutterMapView(language: appContext.getContext().language, geoPoints: value, mapDTO: mapDTO, icons: widget.icons); + return FlutterMapView(language: appContext.getContext().language, geoPoints: value, mapDTO: mapDTO, icons: widget.icons); default: // By default google return GoogleMapView(language: appContext.getContext().language, geoPoints: value, mapDTO: mapDTO!, icons: widget.icons); diff --git a/lib/Screens/Map/marker_view.dart b/lib/Screens/Map/marker_view.dart index ff6d3e6..4cbf1bb 100644 --- a/lib/Screens/Map/marker_view.dart +++ b/lib/Screens/Map/marker_view.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:photo_view/photo_view.dart'; import 'package:provider/provider.dart'; import 'package:qr_flutter/qr_flutter.dart'; diff --git a/lib/Screens/Menu/menu_view.dart b/lib/Screens/Menu/menu_view.dart index 9f0f7c3..30900eb 100644 --- a/lib/Screens/Menu/menu_view.dart +++ b/lib/Screens/Menu/menu_view.dart @@ -4,7 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; import 'package:tablet_app/Helpers/ImageCustomProvider.dart'; @@ -25,7 +25,7 @@ import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/constants.dart'; class MenuView extends StatefulWidget { - final SectionDTO section; + final MenuDTO section; final bool isImageBackground; MenuView({required this.section, required this.isImageBackground}); @@ -40,9 +40,11 @@ class _MenuView extends State { @override void initState() { - print(widget.section.data); + /*print(widget.section.data); menuDTO = MenuDTO.fromJson(jsonDecode(widget.section.data!))!; - print(menuDTO); + print(menuDTO);*/ + menuDTO = widget.section; + menuDTO.sections!.sort((a, b) => a.order!.compareTo(b.order!)); // useless, we get these after that isImageBackground = widget.isImageBackground; diff --git a/lib/Screens/PDF/pdf_filter.dart b/lib/Screens/PDF/pdf_filter.dart index 013601d..31c513e 100644 --- a/lib/Screens/PDF/pdf_filter.dart +++ b/lib/Screens/PDF/pdf_filter.dart @@ -2,14 +2,14 @@ import 'dart:ffi'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Models/tabletContext.dart'; import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/constants.dart'; class PdfFilter extends StatefulWidget { - final List pdfsList; + final List pdfsList; final Function(int?) onPDFSelected; PdfFilter({required this.pdfsList, required this.onPDFSelected}); @@ -35,7 +35,7 @@ class _PdfFilterState extends State { if (widget.pdfsList.isNotEmpty) { return ListTile( title: HtmlWidget( - '${widget.pdfsList[index].pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == currentLanguage).value}', + '${widget.pdfsList[index].translationAndResourceDTOs!.firstWhere((pfat) => pfat.language == currentLanguage).value}', textStyle: TextStyle( fontSize: 15.0, fontWeight: _selectedOrderPdf == widget.pdfsList[index].order ? FontWeight.bold : FontWeight.normal, diff --git a/lib/Screens/PDF/pdf_view.dart b/lib/Screens/PDF/pdf_view.dart index c5a515f..fe66224 100644 --- a/lib/Screens/PDF/pdf_view.dart +++ b/lib/Screens/PDF/pdf_view.dart @@ -7,7 +7,7 @@ import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_pdfview/flutter_pdfview.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; @@ -18,8 +18,8 @@ import 'package:tablet_app/constants.dart'; class PDFViewWidget extends StatefulWidget { - final SectionDTO? section; - PDFViewWidget({this.section}); + final PdfDTO section; + PDFViewWidget({required this.section}); @override _PDFViewWidget createState() => _PDFViewWidget(); @@ -33,14 +33,17 @@ class _PDFViewWidget extends State { int? currentPage = 0; bool isReady = false; String errorMessage = ''; - late ValueNotifier selectedPdf = ValueNotifier(pdfDTO.pdfs!.first); + late ValueNotifier selectedPdf = ValueNotifier(pdfDTO.pdfs!.first); ValueNotifier> currentState = ValueNotifier>({'page': 0, 'total': 1}); @override void initState() { - print(widget.section!.data); + /*print(widget.section!.data); pdfDTO = PdfDTO.fromJson(jsonDecode(widget.section!.data!))!; - print(pdfDTO); + print(pdfDTO);*/ + pdfDTO = widget.section; + pdfDTO.pdfs!.sort((a, b) => a.order!.compareTo(b.order!)); + super.initState(); /*createFileOfPdfUrl(pdfDTO.source_!).then((f) { @@ -52,20 +55,20 @@ class _PDFViewWidget extends State { });*/ } - Future createFileOfPdfUrl(TabletAppContext tabletAppContext, PDFFileDTO pdfFileDTO) async { + Future createFileOfPdfUrl(TabletAppContext tabletAppContext, OrderedTranslationAndResourceDTO pdfFileDTO) async { Completer completer = Completer(); - if(pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId == null) { + if(pdfFileDTO.translationAndResourceDTOs!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId == null) { completer.complete(null); } else { - var file = await _checkIfLocalResourceExists(tabletAppContext, pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId!); + var file = await _checkIfLocalResourceExists(tabletAppContext, pdfFileDTO.translationAndResourceDTOs!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceId!); if(file == null) { print("Start download file from internet!"); try { // "https://berlin2017.droidcon.cod.newthinking.net/sites/global.droidcon.cod.newthinking.net/files/media/documents/Flutter%20-%2060FPS%20UI%20of%20the%20future%20%20-%20DroidconDE%2017.pdf"; // final url = "https://pdfkit.org/docs/guide.pdf"; - final url = pdfFileDTO.pdfFilesAndTitles!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resourceUrl!; + final url = pdfFileDTO.translationAndResourceDTOs!.firstWhere((pfat) => pfat.language == tabletAppContext.language).resource!.url!; final filename = url.substring(url.lastIndexOf("/") + 1); var request = await HttpClient().getUrl(Uri.parse(url)); var response = await request.close(); @@ -130,7 +133,7 @@ class _PDFViewWidget extends State { flex: 4, child: Padding( padding: const EdgeInsets.all(8.0), - child: ValueListenableBuilder( + child: ValueListenableBuilder( valueListenable: selectedPdf, builder: (context, value, _) { return FutureBuilder( diff --git a/lib/Screens/Previous/previous_view.dart b/lib/Screens/Previous/previous_view.dart index cf09be8..dc33bad 100644 --- a/lib/Screens/Previous/previous_view.dart +++ b/lib/Screens/Previous/previous_view.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Models/map-marker.dart'; import 'package:tablet_app/Screens/Map/map_context.dart'; @@ -266,7 +266,7 @@ class _PreviousViewWidget extends State with TickerProviderS child: ChangeNotifierProvider( create: (_) => MapContext(null), - child: MapViewWidget(section: SectionDTO(), icons: []) /*FutureBuilder( + child: MapView(section: SectionDTO(), icons: []) /*FutureBuilder( future: _url, builder: (BuildContext context, AsyncSnapshot snapshot) => snapshot.hasData ? WebViewWidget(url: snapshot.data,) diff --git a/lib/Screens/Puzzle/message_dialog.dart b/lib/Screens/Puzzle/message_dialog.dart index 9ba08de..fe82b0d 100644 --- a/lib/Screens/Puzzle/message_dialog.dart +++ b/lib/Screens/Puzzle/message_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/Components/show_element_for_resource.dart'; import 'package:tablet_app/Models/tabletContext.dart'; import 'package:tablet_app/app_context.dart'; @@ -33,7 +33,7 @@ void showMessage(TranslationAndResourceDTO translationAndResourceDTO, AppContext borderRadius: BorderRadius.circular(tabletAppContext.configuration!.roundedValue?.toDouble() ?? 30), //border: Border.all(width: 3, color: Colors.black) ), - child: showElementForResource(ResourceDTO(id: translationAndResourceDTO.resourceId, type: translationAndResourceDTO.resourceType, url: translationAndResourceDTO.resourceUrl), appContext, true, false), + child: showElementForResource(ResourceDTO(id: translationAndResourceDTO.resourceId, type: translationAndResourceDTO.resource!.type, url: translationAndResourceDTO.resource!.url), appContext, true, false), ), ), ), diff --git a/lib/Screens/Puzzle/puzzle_view.dart b/lib/Screens/Puzzle/puzzle_view.dart index 708ec7d..8fb30cd 100644 --- a/lib/Screens/Puzzle/puzzle_view.dart +++ b/lib/Screens/Puzzle/puzzle_view.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/loading_common.dart'; import 'package:tablet_app/Models/tabletContext.dart'; @@ -16,8 +16,8 @@ import 'puzzle_piece.dart'; const IMAGE_PATH = 'image_path'; class PuzzleView extends StatefulWidget { - final SectionDTO? section; - PuzzleView({this.section}); + final PuzzleDTO section; + PuzzleView({required this.section}); @override _PuzzleView createState() => _PuzzleView(); @@ -36,8 +36,8 @@ class _PuzzleView extends State { @override void initState() { - puzzleDTO = PuzzleDTO.fromJson(jsonDecode(widget.section!.data!))!; - + //puzzleDTO = PuzzleDTO.fromJson(jsonDecode(widget.section!.data!))!; + puzzleDTO = widget.section; puzzleDTO.rows = puzzleDTO.rows != null ? puzzleDTO.rows : 3; puzzleDTO.cols = puzzleDTO.cols != null ? puzzleDTO.cols : 3; @@ -55,10 +55,10 @@ class _PuzzleView extends State { getRealWidgetSize(); - if(puzzleDTO.image != null && puzzleDTO.image!.resourceUrl != null) { + if(puzzleDTO.puzzleImage != null && puzzleDTO.puzzleImage!.url != null) { //splitImage(Image.network(puzzleDTO.image!.resourceUrl!)); splitImage(CachedNetworkImage( - imageUrl: puzzleDTO.image!.resourceUrl!, + imageUrl: puzzleDTO.puzzleImage!.url!, fit: BoxFit.fill, errorWidget: (context, url, error) => Icon(Icons.error), )); @@ -211,7 +211,7 @@ class _PuzzleView extends State { key: _widgetKey, padding: const EdgeInsets.all(0.0), child: isSplittingImage ? Center(child: LoadingCommon()) : - puzzleDTO.image == null || puzzleDTO.image!.resourceUrl == null || realWidgetSize == null + puzzleDTO.puzzleImage == null || puzzleDTO.puzzleImage!.url == null || realWidgetSize == null ? Center(child: Text("Aucune image à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect))) : Center( child: Padding( diff --git a/lib/Screens/Quizz/quizz_view.dart b/lib/Screens/Quizz/quizz_view.dart index ee786cd..e937758 100644 --- a/lib/Screens/Quizz/quizz_view.dart +++ b/lib/Screens/Quizz/quizz_view.dart @@ -8,7 +8,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:photo_view/photo_view.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/Buttons/rounded_button.dart'; @@ -27,9 +27,9 @@ import 'drawStrawberry.dart'; class QuizzView extends StatefulWidget { - final SectionDTO? section; + final QuizDTO section; GlobalKey? key; - QuizzView({this.section, this.key}); + QuizzView({required this.section, this.key}); @override _QuizzView createState() => _QuizzView(); @@ -37,7 +37,7 @@ class QuizzView extends StatefulWidget { class _QuizzView extends State { ConfettiController? _controllerCenter; - QuizzDTO quizzDTO = QuizzDTO(); + QuizDTO quizzDTO = QuizDTO(); List _questionsSubDTO = []; cs.CarouselController? sliderController; int currentIndex = 1; @@ -52,7 +52,8 @@ class _QuizzView extends State { sliderController = cs.CarouselController(); - quizzDTO = QuizzDTO.fromJson(jsonDecode(widget.section!.data!))!; + //quizzDTO = QuizzDTO.fromJson(jsonDecode(widget.section!.data!))!; + quizzDTO = widget.section; quizzDTO.questions!.sort((a, b) => a.order!.compareTo(b.order!)); _questionsSubDTO = QuestionSubDTO().fromJSON(quizzDTO.questions!); diff --git a/lib/Screens/Quizz/showResponses.dart b/lib/Screens/Quizz/showResponses.dart index abae3c8..9347250 100644 --- a/lib/Screens/Quizz/showResponses.dart +++ b/lib/Screens/Quizz/showResponses.dart @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/Carousel/carousel_slider.dart' as cs; import 'package:tablet_app/Helpers/ImageCustomProvider.dart'; diff --git a/lib/Screens/Slider/slider_view.dart b/lib/Screens/Slider/slider_view.dart index 41bbf0c..317c9af 100644 --- a/lib/Screens/Slider/slider_view.dart +++ b/lib/Screens/Slider/slider_view.dart @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Components/Carousel/carousel_slider.dart' as cs; @@ -18,8 +18,8 @@ import 'package:tablet_app/constants.dart'; import 'package:photo_view/photo_view.dart'; class SliderView extends StatefulWidget { - final SectionDTO? section; - SliderView({this.section}); + final SliderDTO section; + SliderView({required this.section}); @override _SliderView createState() => _SliderView(); @@ -35,8 +35,8 @@ class _SliderView extends State { @override void initState() { sliderController = cs.CarouselController(); - sliderDTO = SliderDTO.fromJson(jsonDecode(widget.section!.data!))!; - + //sliderDTO = SliderDTO.fromJson(jsonDecode(widget.section!.data!))!; + sliderDTO = widget.section; sliderDTO.contents!.sort((a, b) => a.order!.compareTo(b.order!)); super.initState(); @@ -256,10 +256,10 @@ class _SliderView extends State { var widgetToInclude; TabletAppContext tabletAppContext = appContext.getContext() as TabletAppContext; - switch(i.resourceType) { + switch(i.resource!.type) { case ResourceType.Image: widgetToInclude = PhotoView( - imageProvider: ImageCustomProvider.getImageProvider(appContext, i.resourceId!, i.resourceUrl!), + imageProvider: ImageCustomProvider.getImageProvider(appContext, i.resourceId!, i.resource!.url!), minScale: PhotoViewComputedScale.contained * 0.8, maxScale: PhotoViewComputedScale.contained * 3.0, backgroundDecoration: BoxDecoration( @@ -271,7 +271,7 @@ class _SliderView extends State { break; case ResourceType.ImageUrl: widgetToInclude = PhotoView( - imageProvider: CachedNetworkImageProvider(i.resourceUrl!), + imageProvider: CachedNetworkImageProvider(i.resource!.url!), minScale: PhotoViewComputedScale.contained * 0.8, maxScale: PhotoViewComputedScale.contained * 3.0, backgroundDecoration: BoxDecoration( @@ -290,7 +290,7 @@ class _SliderView extends State { //shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(tabletAppContext.configuration!.roundedValue?.toDouble() ?? 15.0), ), - child: showElementForResource(ResourceDTO(id: i.resourceId, url: i.resourceUrl, type: i.resourceType), appContext, false, true), + child: showElementForResource(ResourceDTO(id: i.resourceId, url: i.resource!.url, type: i.resource!.type), appContext, false, true), ); break; } diff --git a/lib/Screens/Video/video_view.dart b/lib/Screens/Video/video_view.dart index 6f17d45..676f306 100644 --- a/lib/Screens/Video/video_view.dart +++ b/lib/Screens/Video/video_view.dart @@ -2,15 +2,15 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/constants.dart'; import 'package:youtube_player_flutter/youtube_player_flutter.dart'; import 'package:youtube_player_iframe/youtube_player_iframe.dart' as iframe; //import 'package:youtube_player_flutter/youtube_player_flutter.dart'; class VideoView extends StatefulWidget { - final SectionDTO? section; - VideoView({this.section}); + final VideoDTO section; + VideoView({required this.section}); @override _VideoView createState() => _VideoView(); @@ -23,9 +23,10 @@ class _VideoView extends State { @override void initState() { - print(widget.section!.data); - videoDTO = VideoDTO.fromJson(jsonDecode(widget.section!.data!)); - print(videoDTO); + //print(widget.section!.data); + //videoDTO = VideoDTO.fromJson(jsonDecode(widget.section!.data!)); + //print(videoDTO); + videoDTO= widget.section; String? videoId; if (videoDTO!.source_ != null && videoDTO!.source_!.length > 0 ) { diff --git a/lib/Screens/Weather/weather_view.dart b/lib/Screens/Weather/weather_view.dart index c0a736f..8ce4326 100644 --- a/lib/Screens/Weather/weather_view.dart +++ b/lib/Screens/Weather/weather_view.dart @@ -5,7 +5,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:tablet_app/Helpers/translationHelper.dart'; import 'package:tablet_app/Models/WeatherData.dart'; @@ -15,7 +15,7 @@ import 'package:tablet_app/constants.dart'; import 'package:intl/intl.dart'; class WeatherView extends StatefulWidget { - final SectionDTO? section; + final WeatherDTO section; WeatherView({required this.section}); @override @@ -29,9 +29,10 @@ class _WeatherViewState extends State { @override void initState() { - print(widget.section!.data); + /*print(widget.section!.data); weatherDTO = WeatherDTO.fromJson(jsonDecode(widget.section!.data!))!; - print(weatherDTO); + print(weatherDTO);*/ + weatherDTO = widget.section; if(weatherDTO.result != null) { Map weatherResultInJson = jsonDecode(weatherDTO.result!); weatherData = WeatherData.fromJson(weatherResultInJson); diff --git a/lib/Screens/Web/web_view.dart b/lib/Screens/Web/web_view.dart index 1bbbf09..b70dcdf 100644 --- a/lib/Screens/Web/web_view.dart +++ b/lib/Screens/Web/web_view.dart @@ -4,15 +4,15 @@ import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:tablet_app/constants.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter_platform_interface/webview_flutter_platform_interface.dart'; //import 'package:webview_flutter_web/webview_flutter_web.dart'; class WebView extends StatefulWidget { - final SectionDTO? section; - WebView({this.section}); + final WebDTO section; + WebView({required this.section}); @override _WebView createState() => _WebView(); @@ -27,8 +27,9 @@ class _WebView extends State { @override void initState() { - print(widget.section!.data); - webDTO = WebDTO.fromJson(jsonDecode(widget.section!.data!))!; + //print(widget.section!.data); + webDTO = widget.section; + //webDTO = WebDTO.fromJson(jsonDecode(widget.section!.data!))!; print(webDTO); diff --git a/lib/Services/downloadService.dart b/lib/Services/downloadService.dart index 3bece3e..a5f2a99 100644 --- a/lib/Services/downloadService.dart +++ b/lib/Services/downloadService.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:ota_update/ota_update.dart'; //import 'package:package_info/package_info.dart'; //import 'package:package_info_plus/package_info_plus.dart'; diff --git a/lib/api/openApi.dart b/lib/api/openApi.dart index c4943f9..18add1e 100644 --- a/lib/api/openApi.dart +++ b/lib/api/openApi.dart @@ -1,11 +1,12 @@ +// Openapi Generator last run: : 2025-05-23T15:19:19.419517 import 'package:openapi_generator_annotations/openapi_generator_annotations.dart'; @Openapi( - additionalProperties: AdditionalProperties(pubName: 'manager_api', pubAuthor: 'Fransolet Thomas'), - inputSpecFile: 'lib/api/swagger.yaml', + additionalProperties: + AdditionalProperties(pubName: 'manager_api_new', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), + inputSpec: InputSpec(path: 'lib/api/swagger.yaml'), generatorName: Generator.dart, - alwaysRun: true, - outputDirectory: 'manager_api') + outputDirectory: 'manager_api_new') class Example extends OpenapiGeneratorConfig {} /* diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml index 7a074e5..f146761 100644 --- a/lib/api/swagger.yaml +++ b/lib/api/swagger.yaml @@ -1,2693 +1,5077 @@ -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 3" + }, + "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": {} + } + } + }, + "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/GeoPointDTO" + } + } + } + }, + "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/QuestionDTO" + } + } + } + }, + "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/QuestionDTO" + } + } + } + }, + "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", + "nullable": true + }, + "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", + "nullable": true + }, + "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", + "nullable": true + } + } + }, + "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" + } + }, + "sectionMapId": { + "type": "string", + "nullable": true + }, + "sectionMap": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/SectionMap" + } + ] + } + } + }, + "SectionMap": { + "allOf": [ + { + "$ref": "#/components/schemas/Section" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "mapCategories" + ], + "properties": { + "mapZoom": { + "type": "integer", + "format": "int32" + }, + "mapMapType": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapTypeApp" + } + ] + }, + "mapTypeMapbox": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapTypeMapBox" + } + ] + }, + "mapMapProvider": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/MapProvider" + } + ] + }, + "mapPoints": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "mapResourceId": { + "type": "string", + "nullable": true + }, + "mapResource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/Resource" + } + ] + }, + "mapCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CategorieDTO" + } + }, + "mapCenterLatitude": { + "type": "string", + "nullable": true + }, + "mapCenterLongitude": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "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 + } + } + }, + "Section": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "label", + "title", + "configurationId", + "type", + "isSubSection", + "instanceId" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "label": { + "type": "string", + "minLength": 1 + }, + "title": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "order": { + "type": "integer", + "format": "int32" + }, + "configurationId": { + "type": "string", + "minLength": 1 + }, + "imageId": { + "type": "string", + "nullable": true + }, + "imageSource": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/SectionType" + }, + "isSubSection": { + "type": "boolean" + }, + "parentId": { + "type": "string", + "nullable": true + }, + "dateCreation": { + "type": "string", + "format": "date-time" + }, + "instanceId": { + "type": "string", + "minLength": 1 + }, + "isBeacon": { + "type": "boolean" + }, + "beaconId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + }, + "meterZoneGPS": { + "type": "integer", + "format": "int32", + "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/client.dart b/lib/client.dart index c7518e2..fab7b41 100644 --- a/lib/client.dart +++ b/lib/client.dart @@ -1,4 +1,4 @@ -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:openapi_dart_common/openapi.dart'; class Client { diff --git a/lib/main.dart b/lib/main.dart index 0d1c0d6..83bf43f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; import 'package:path_provider/path_provider.dart'; import 'package:provider/provider.dart'; diff --git a/manager_api/.openapi-generator/VERSION b/manager_api/.openapi-generator/VERSION deleted file mode 100644 index 717311e..0000000 --- a/manager_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -unset \ No newline at end of file diff --git a/manager_api/README.md b/manager_api/README.md deleted file mode 100644 index 7a47de3..0000000 --- a/manager_api/README.md +++ /dev/null @@ -1,192 +0,0 @@ -# manager_api -API Manager Service - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: Version Alpha -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 2.12 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, add the following dependency to your pubspec.yaml -``` -dependencies: - manager_api: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -### Local -To use the package in your local drive, add the following dependency to your pubspec.yaml -``` -dependencies: - manager_api: - path: /path/to/manager_api -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:manager_api/api.dart'; - -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = AuthenticationApi(); -final grantType = grantType_example; // String | -final username = username_example; // String | -final password = password_example; // String | -final clientId = clientId_example; // String | -final clientSecret = clientSecret_example; // String | - -try { - final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret); - print(result); -} catch (e) { - print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n'); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.myinfomate.be* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | -*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | -*ConfigurationApi* | [**configurationCreate**](doc\/ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration | -*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} | -*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export | -*ConfigurationApi* | [**configurationGet**](doc\/ConfigurationApi.md#configurationget) | **GET** /api/Configuration | -*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc\/ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin | -*ConfigurationApi* | [**configurationGetDetail**](doc\/ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} | -*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import | -*ConfigurationApi* | [**configurationUpdate**](doc\/ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration | -*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/Device | -*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} | -*DeviceApi* | [**deviceGet**](doc\/DeviceApi.md#deviceget) | **GET** /api/Device | -*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail | -*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device | -*DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos | -*InstanceApi* | [**instanceCreateInstance**](doc\/InstanceApi.md#instancecreateinstance) | **POST** /api/Instance | -*InstanceApi* | [**instanceDeleteInstance**](doc\/InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} | -*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance | -*InstanceApi* | [**instanceGetDetail**](doc\/InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} | -*InstanceApi* | [**instanceGetInstanceByPinCode**](doc\/InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin | -*InstanceApi* | [**instanceUpdateinstance**](doc\/InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance | -*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource | -*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} | -*ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource | -*ResourceApi* | [**resourceGetDetail**](doc\/ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail | -*ResourceApi* | [**resourceShow**](doc\/ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} | -*ResourceApi* | [**resourceUpdate**](doc\/ResourceApi.md#resourceupdate) | **PUT** /api/Resource | -*ResourceApi* | [**resourceUpload**](doc\/ResourceApi.md#resourceupload) | **POST** /api/Resource/upload | -*SectionApi* | [**sectionCreate**](doc\/SectionApi.md#sectioncreate) | **POST** /api/Section | -*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} | -*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | -*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section | -*SectionApi* | [**sectionGetAgendaDTO**](doc\/SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO | -*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} | -*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | -*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | -*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | -*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | -*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | -*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | -*SectionApi* | [**sectionGetPdfDTO**](doc\/SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | -*SectionApi* | [**sectionGetPuzzleDTO**](doc\/SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | -*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO | -*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | -*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | -*SectionApi* | [**sectionGetWeatherDTO**](doc\/SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | -*SectionApi* | [**sectionGetWebDTO**](doc\/SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO | -*SectionApi* | [**sectionPlayerMessageDTO**](doc\/SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO | -*SectionApi* | [**sectionUpdate**](doc\/SectionApi.md#sectionupdate) | **PUT** /api/Section | -*SectionApi* | [**sectionUpdateOrder**](doc\/SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order | -*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/User | -*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} | -*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/User | -*UserApi* | [**userGetDetail**](doc\/UserApi.md#usergetdetail) | **GET** /api/User/{id} | -*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/User | - - -## Documentation For Models - - - [AgendaDTO](doc\/AgendaDTO.md) - - [ArticleDTO](doc\/ArticleDTO.md) - - [CategorieDTO](doc\/CategorieDTO.md) - - [ConfigurationDTO](doc\/ConfigurationDTO.md) - - [ContentDTO](doc\/ContentDTO.md) - - [ContentGeoPoint](doc\/ContentGeoPoint.md) - - [DeviceDTO](doc\/DeviceDTO.md) - - [DeviceDetailDTO](doc\/DeviceDetailDTO.md) - - [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md) - - [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md) - - [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md) - - [GeoPointDTO](doc\/GeoPointDTO.md) - - [GeoPointDTOCategorie](doc\/GeoPointDTOCategorie.md) - - [Instance](doc\/Instance.md) - - [InstanceDTO](doc\/InstanceDTO.md) - - [LevelDTO](doc\/LevelDTO.md) - - [LoginDTO](doc\/LoginDTO.md) - - [MapDTO](doc\/MapDTO.md) - - [MapDTOMapProvider](doc\/MapDTOMapProvider.md) - - [MapDTOMapType](doc\/MapDTOMapType.md) - - [MapDTOMapTypeMapbox](doc\/MapDTOMapTypeMapbox.md) - - [MapProvider](doc\/MapProvider.md) - - [MapTypeApp](doc\/MapTypeApp.md) - - [MapTypeMapBox](doc\/MapTypeMapBox.md) - - [MenuDTO](doc\/MenuDTO.md) - - [PDFFileDTO](doc\/PDFFileDTO.md) - - [PdfDTO](doc\/PdfDTO.md) - - [PlayerMessageDTO](doc\/PlayerMessageDTO.md) - - [PuzzleDTO](doc\/PuzzleDTO.md) - - [PuzzleDTOImage](doc\/PuzzleDTOImage.md) - - [QuestionDTO](doc\/QuestionDTO.md) - - [QuizzDTO](doc\/QuizzDTO.md) - - [QuizzDTOBadLevel](doc\/QuizzDTOBadLevel.md) - - [ResourceDTO](doc\/ResourceDTO.md) - - [ResourceType](doc\/ResourceType.md) - - [ResponseDTO](doc\/ResponseDTO.md) - - [SectionDTO](doc\/SectionDTO.md) - - [SectionType](doc\/SectionType.md) - - [SliderDTO](doc\/SliderDTO.md) - - [TokenDTO](doc\/TokenDTO.md) - - [TranslationAndResourceDTO](doc\/TranslationAndResourceDTO.md) - - [TranslationDTO](doc\/TranslationDTO.md) - - [User](doc\/User.md) - - [UserDetailDTO](doc\/UserDetailDTO.md) - - [VideoDTO](doc\/VideoDTO.md) - - [WeatherDTO](doc\/WeatherDTO.md) - - [WebDTO](doc\/WebDTO.md) - - -## Documentation For Authorization - - -Authentication schemes defined for the API: -### bearer - -- **Type**: OAuth -- **Flow**: password -- **Authorization URL**: /authentication/Token -- **Scopes**: - - **Manager-api**: Manager WebAPI - - -## Author - - - diff --git a/manager_api/doc/ArticleDTO.md b/manager_api/doc/ArticleDTO.md deleted file mode 100644 index b8e31fb..0000000 --- a/manager_api/doc/ArticleDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# manager_api.model.ArticleDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**isContentTop** | **bool** | | [optional] -**audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**isReadAudioAuto** | **bool** | | [optional] -**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/MapDTO.md b/manager_api/doc/MapDTO.md deleted file mode 100644 index ffcad9b..0000000 --- a/manager_api/doc/MapDTO.md +++ /dev/null @@ -1,24 +0,0 @@ -# manager_api.model.MapDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zoom** | **int** | | [optional] -**mapType** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional] -**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] -**points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] -**iconResourceId** | **String** | | [optional] -**iconSource** | **String** | | [optional] -**categories** | [**List**](CategorieDTO.md) | | [optional] [default to const []] -**latitude** | **String** | | [optional] -**longitude** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/PuzzleDTO.md b/manager_api/doc/PuzzleDTO.md deleted file mode 100644 index a6655c1..0000000 --- a/manager_api/doc/PuzzleDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# manager_api.model.PuzzleDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageDebut** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] -**messageFin** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] -**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional] -**rows** | **int** | | [optional] -**cols** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/SliderDTO.md b/manager_api/doc/SliderDTO.md deleted file mode 100644 index 31d6839..0000000 --- a/manager_api/doc/SliderDTO.md +++ /dev/null @@ -1,15 +0,0 @@ -# manager_api.model.SliderDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/doc/WeatherDTO.md b/manager_api/doc/WeatherDTO.md deleted file mode 100644 index fedb7d7..0000000 --- a/manager_api/doc/WeatherDTO.md +++ /dev/null @@ -1,17 +0,0 @@ -# manager_api.model.WeatherDTO - -## Load the model package -```dart -import 'package:manager_api/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**city** | **String** | | [optional] -**updatedDate** | [**DateTime**](DateTime.md) | | [optional] -**result** | **String** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/manager_api/lib/model/agenda_dto.dart b/manager_api/lib/model/agenda_dto.dart deleted file mode 100644 index 27e2e1b..0000000 --- a/manager_api/lib/model/agenda_dto.dart +++ /dev/null @@ -1,123 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AgendaDTO { - /// Returns a new [AgendaDTO] instance. - AgendaDTO({ - this.resourceIds = const [], - this.mapProvider, - }); - - List? resourceIds; - - MapProvider? mapProvider; - - @override - bool operator ==(Object other) => identical(this, other) || other is AgendaDTO && - other.resourceIds == resourceIds && - other.mapProvider == mapProvider; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (resourceIds == null ? 0 : resourceIds!.hashCode) + - (mapProvider == null ? 0 : mapProvider!.hashCode); - - @override - String toString() => 'AgendaDTO[resourceIds=$resourceIds, mapProvider=$mapProvider]'; - - Map toJson() { - final json = {}; - if (this.resourceIds != null) { - json[r'resourceIds'] = this.resourceIds; - } else { - json[r'resourceIds'] = null; - } - if (this.mapProvider != null) { - json[r'mapProvider'] = this.mapProvider; - } else { - json[r'mapProvider'] = null; - } - return json; - } - - /// Returns a new [AgendaDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AgendaDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "AgendaDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "AgendaDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return AgendaDTO( - resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']), - mapProvider: MapProvider.fromJson(json[r'mapProvider']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AgendaDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AgendaDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AgendaDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AgendaDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart deleted file mode 100644 index 2221429..0000000 --- a/manager_api/lib/model/article_dto.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ArticleDTO { - /// Returns a new [ArticleDTO] instance. - ArticleDTO({ - this.content = const [], - this.isContentTop, - this.audioIds = const [], - this.isReadAudioAuto, - this.contents = const [], - }); - - List? content; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isContentTop; - - List? audioIds; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isReadAudioAuto; - - List? contents; - - @override - bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && - other.content == content && - other.isContentTop == isContentTop && - other.audioIds == audioIds && - other.isReadAudioAuto == isReadAudioAuto && - other.contents == contents; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (content == null ? 0 : content!.hashCode) + - (isContentTop == null ? 0 : isContentTop!.hashCode) + - (audioIds == null ? 0 : audioIds!.hashCode) + - (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + - (contents == null ? 0 : contents!.hashCode); - - @override - String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; - - Map toJson() { - final json = {}; - if (this.content != null) { - json[r'content'] = this.content; - } else { - json[r'content'] = null; - } - if (this.isContentTop != null) { - json[r'isContentTop'] = this.isContentTop; - } else { - json[r'isContentTop'] = null; - } - if (this.audioIds != null) { - json[r'audioIds'] = this.audioIds; - } else { - json[r'audioIds'] = null; - } - if (this.isReadAudioAuto != null) { - json[r'isReadAudioAuto'] = this.isReadAudioAuto; - } else { - json[r'isReadAudioAuto'] = null; - } - if (this.contents != null) { - json[r'contents'] = this.contents; - } else { - json[r'contents'] = null; - } - return json; - } - - /// Returns a new [ArticleDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ArticleDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ArticleDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ArticleDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return ArticleDTO( - content: TranslationDTO.listFromJson(json[r'content']), - isContentTop: mapValueOfType(json, r'isContentTop'), - audioIds: TranslationDTO.listFromJson(json[r'audioIds']), - isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), - contents: ContentDTO.listFromJson(json[r'contents']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ArticleDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ArticleDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ArticleDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ArticleDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/map_dto.dart b/manager_api/lib/model/map_dto.dart deleted file mode 100644 index 0f97a93..0000000 --- a/manager_api/lib/model/map_dto.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapDTO { - /// Returns a new [MapDTO] instance. - MapDTO({ - this.zoom, - this.mapType, - this.mapTypeMapbox, - this.mapProvider, - this.points = const [], - this.iconResourceId, - this.iconSource, - this.categories = const [], - this.latitude, - this.longitude, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? zoom; - - MapTypeApp? mapType; - - MapTypeMapBox? mapTypeMapbox; - - MapProvider? mapProvider; - - List? points; - - String? iconResourceId; - - String? iconSource; - - List? categories; - - String? latitude; - - String? longitude; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapDTO && - other.zoom == zoom && - other.mapType == mapType && - other.mapTypeMapbox == mapTypeMapbox && - other.mapProvider == mapProvider && - other.points == points && - other.iconResourceId == iconResourceId && - other.iconSource == iconSource && - other.categories == categories && - other.latitude == latitude && - other.longitude == longitude; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (zoom == null ? 0 : zoom!.hashCode) + - (mapType == null ? 0 : mapType!.hashCode) + - (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + - (mapProvider == null ? 0 : mapProvider!.hashCode) + - (points == null ? 0 : points!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconSource == null ? 0 : iconSource!.hashCode) + - (categories == null ? 0 : categories!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode); - - @override - String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, latitude=$latitude, longitude=$longitude]'; - - Map toJson() { - final json = {}; - if (this.zoom != null) { - json[r'zoom'] = this.zoom; - } else { - json[r'zoom'] = null; - } - if (this.mapType != null) { - json[r'mapType'] = this.mapType; - } else { - json[r'mapType'] = null; - } - if (this.mapTypeMapbox != null) { - json[r'mapTypeMapbox'] = this.mapTypeMapbox; - } else { - json[r'mapTypeMapbox'] = null; - } - if (this.mapProvider != null) { - json[r'mapProvider'] = this.mapProvider; - } else { - json[r'mapProvider'] = null; - } - if (this.points != null) { - json[r'points'] = this.points; - } else { - json[r'points'] = null; - } - if (this.iconResourceId != null) { - json[r'iconResourceId'] = this.iconResourceId; - } else { - json[r'iconResourceId'] = null; - } - if (this.iconSource != null) { - json[r'iconSource'] = this.iconSource; - } else { - json[r'iconSource'] = null; - } - if (this.categories != null) { - json[r'categories'] = this.categories; - } else { - json[r'categories'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - json[r'latitude'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - json[r'longitude'] = null; - } - return json; - } - - /// Returns a new [MapDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return MapDTO( - zoom: mapValueOfType(json, r'zoom'), - mapType: MapTypeApp.fromJson(json[r'mapType']), - mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']), - mapProvider: MapProvider.fromJson(json[r'mapProvider']), - points: GeoPointDTO.listFromJson(json[r'points']), - iconResourceId: mapValueOfType(json, r'iconResourceId'), - iconSource: mapValueOfType(json, r'iconSource'), - categories: CategorieDTO.listFromJson(json[r'categories']), - latitude: mapValueOfType(json, r'latitude'), - longitude: mapValueOfType(json, r'longitude'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/puzzle_dto.dart b/manager_api/lib/model/puzzle_dto.dart deleted file mode 100644 index 14654e5..0000000 --- a/manager_api/lib/model/puzzle_dto.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PuzzleDTO { - /// Returns a new [PuzzleDTO] instance. - PuzzleDTO({ - this.messageDebut = const [], - this.messageFin = const [], - this.image, - this.rows, - this.cols, - }); - - List? messageDebut; - - List? messageFin; - - PuzzleDTOImage? image; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? rows; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - int? cols; - - @override - bool operator ==(Object other) => identical(this, other) || other is PuzzleDTO && - other.messageDebut == messageDebut && - other.messageFin == messageFin && - other.image == image && - other.rows == rows && - other.cols == cols; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (messageDebut == null ? 0 : messageDebut!.hashCode) + - (messageFin == null ? 0 : messageFin!.hashCode) + - (image == null ? 0 : image!.hashCode) + - (rows == null ? 0 : rows!.hashCode) + - (cols == null ? 0 : cols!.hashCode); - - @override - String toString() => 'PuzzleDTO[messageDebut=$messageDebut, messageFin=$messageFin, image=$image, rows=$rows, cols=$cols]'; - - Map toJson() { - final json = {}; - if (this.messageDebut != null) { - json[r'messageDebut'] = this.messageDebut; - } else { - json[r'messageDebut'] = null; - } - if (this.messageFin != null) { - json[r'messageFin'] = this.messageFin; - } else { - json[r'messageFin'] = null; - } - if (this.image != null) { - json[r'image'] = this.image; - } else { - json[r'image'] = null; - } - if (this.rows != null) { - json[r'rows'] = this.rows; - } else { - json[r'rows'] = null; - } - if (this.cols != null) { - json[r'cols'] = this.cols; - } else { - json[r'cols'] = null; - } - return json; - } - - /// Returns a new [PuzzleDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PuzzleDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PuzzleDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PuzzleDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return PuzzleDTO( - messageDebut: TranslationAndResourceDTO.listFromJson(json[r'messageDebut']), - messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']), - image: PuzzleDTOImage.fromJson(json[r'image']), - rows: mapValueOfType(json, r'rows'), - cols: mapValueOfType(json, r'cols'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PuzzleDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PuzzleDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PuzzleDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PuzzleDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/lib/model/weather_dto.dart b/manager_api/lib/model/weather_dto.dart deleted file mode 100644 index e2447d0..0000000 --- a/manager_api/lib/model/weather_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WeatherDTO { - /// Returns a new [WeatherDTO] instance. - WeatherDTO({ - this.city, - this.updatedDate, - this.result, - }); - - String? city; - - DateTime? updatedDate; - - String? result; - - @override - bool operator ==(Object other) => identical(this, other) || other is WeatherDTO && - other.city == city && - other.updatedDate == updatedDate && - other.result == result; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (updatedDate == null ? 0 : updatedDate!.hashCode) + - (result == null ? 0 : result!.hashCode); - - @override - String toString() => 'WeatherDTO[city=$city, updatedDate=$updatedDate, result=$result]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.updatedDate != null) { - json[r'updatedDate'] = this.updatedDate!.toUtc().toIso8601String(); - } else { - json[r'updatedDate'] = null; - } - if (this.result != null) { - json[r'result'] = this.result; - } else { - json[r'result'] = null; - } - return json; - } - - /// Returns a new [WeatherDTO] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WeatherDTO? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "WeatherDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "WeatherDTO[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return WeatherDTO( - city: mapValueOfType(json, r'city'), - updatedDate: mapDateTime(json, r'updatedDate', ''), - result: mapValueOfType(json, r'result'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WeatherDTO.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WeatherDTO.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WeatherDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WeatherDTO.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/manager_api/pubspec.yaml b/manager_api/pubspec.yaml deleted file mode 100644 index 50ecdf7..0000000 --- a/manager_api/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'manager_api' -version: '1.0.0' -description: 'OpenAPI API client' -homepage: 'homepage' -environment: - sdk: ">=3.1.0 <4.0.0" -dependencies: - http: '^1.1.0' - intl: '^0.18.0' - meta: '^1.1.8' -dev_dependencies: - test: '>=1.16.0 <1.18.0' diff --git a/manager_api/.gitignore b/manager_api_new/.gitignore similarity index 75% rename from manager_api/.gitignore rename to manager_api_new/.gitignore index 1be28ce..0f74d29 100644 --- a/manager_api/.gitignore +++ b/manager_api_new/.gitignore @@ -3,7 +3,9 @@ .dart_tool/ .packages build/ -pubspec.lock # Except for application packages + +# Except for application packages +pubspec.lock doc/api/ diff --git a/manager_api/.openapi-generator-ignore b/manager_api_new/.openapi-generator-ignore similarity index 100% rename from manager_api/.openapi-generator-ignore rename to manager_api_new/.openapi-generator-ignore diff --git a/manager_api/.openapi-generator/FILES b/manager_api_new/.openapi-generator/FILES similarity index 62% rename from manager_api/.openapi-generator/FILES rename to manager_api_new/.openapi-generator/FILES index 7849567..8f248e2 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api_new/.openapi-generator/FILES @@ -3,48 +3,56 @@ README.md analysis_options.yaml doc/AgendaDTO.md +doc/AgendaDTOAllOfAgendaMapProvider.md doc/ArticleDTO.md doc/AuthenticationApi.md doc/CategorieDTO.md doc/ConfigurationApi.md doc/ConfigurationDTO.md doc/ContentDTO.md -doc/ContentGeoPoint.md +doc/ContentDTOResource.md doc/DeviceApi.md doc/DeviceDTO.md doc/DeviceDetailDTO.md -doc/DeviceDetailDTOAllOf.md doc/ExportConfigurationDTO.md -doc/ExportConfigurationDTOAllOf.md +doc/GeoPoint.md doc/GeoPointDTO.md -doc/GeoPointDTOCategorie.md +doc/GeoPointSectionMap.md doc/Instance.md doc/InstanceApi.md doc/InstanceDTO.md -doc/LevelDTO.md doc/LoginDTO.md doc/MapDTO.md -doc/MapDTOMapProvider.md -doc/MapDTOMapType.md -doc/MapDTOMapTypeMapbox.md +doc/MapDTOAllOfMapProvider.md +doc/MapDTOAllOfMapType.md +doc/MapDTOAllOfMapTypeMapbox.md doc/MapProvider.md doc/MapTypeApp.md doc/MapTypeMapBox.md doc/MenuDTO.md -doc/PDFFileDTO.md +doc/OrderedTranslationAndResourceDTO.md doc/PdfDTO.md doc/PlayerMessageDTO.md doc/PuzzleDTO.md -doc/PuzzleDTOImage.md +doc/PuzzleDTOAllOfPuzzleImage.md doc/QuestionDTO.md -doc/QuizzDTO.md -doc/QuizzDTOBadLevel.md +doc/QuestionDTOImageBackgroundResourceType.md +doc/QuizDTO.md +doc/Resource.md doc/ResourceApi.md doc/ResourceDTO.md doc/ResourceType.md doc/ResponseDTO.md +doc/Section.md doc/SectionApi.md doc/SectionDTO.md +doc/SectionMap.md +doc/SectionMapAllOfMapMapProvider.md +doc/SectionMapAllOfMapMapType.md +doc/SectionMapAllOfMapResource.md +doc/SectionMapAllOfMapTypeMapbox.md +doc/SectionMapApi.md +doc/SectionQuizApi.md doc/SectionType.md doc/SliderDTO.md doc/TokenDTO.md @@ -64,6 +72,8 @@ lib/api/device_api.dart lib/api/instance_api.dart lib/api/resource_api.dart lib/api/section_api.dart +lib/api/section_map_api.dart +lib/api/section_quiz_api.dart lib/api/user_api.dart lib/api_client.dart lib/api_exception.dart @@ -74,42 +84,48 @@ lib/auth/http_basic_auth.dart lib/auth/http_bearer_auth.dart lib/auth/oauth.dart lib/model/agenda_dto.dart +lib/model/agenda_dto_all_of_agenda_map_provider.dart lib/model/article_dto.dart lib/model/categorie_dto.dart lib/model/configuration_dto.dart lib/model/content_dto.dart -lib/model/content_geo_point.dart +lib/model/content_dto_resource.dart lib/model/device_detail_dto.dart -lib/model/device_detail_dto_all_of.dart lib/model/device_dto.dart lib/model/export_configuration_dto.dart -lib/model/export_configuration_dto_all_of.dart +lib/model/geo_point.dart lib/model/geo_point_dto.dart -lib/model/geo_point_dto_categorie.dart +lib/model/geo_point_section_map.dart lib/model/instance.dart lib/model/instance_dto.dart -lib/model/level_dto.dart lib/model/login_dto.dart lib/model/map_dto.dart -lib/model/map_dto_map_provider.dart -lib/model/map_dto_map_type.dart -lib/model/map_dto_map_type_mapbox.dart +lib/model/map_dto_all_of_map_provider.dart +lib/model/map_dto_all_of_map_type.dart +lib/model/map_dto_all_of_map_type_mapbox.dart lib/model/map_provider.dart lib/model/map_type_app.dart lib/model/map_type_map_box.dart lib/model/menu_dto.dart +lib/model/ordered_translation_and_resource_dto.dart lib/model/pdf_dto.dart -lib/model/pdf_file_dto.dart lib/model/player_message_dto.dart lib/model/puzzle_dto.dart -lib/model/puzzle_dto_image.dart +lib/model/puzzle_dto_all_of_puzzle_image.dart lib/model/question_dto.dart -lib/model/quizz_dto.dart -lib/model/quizz_dto_bad_level.dart +lib/model/question_dto_image_background_resource_type.dart +lib/model/quiz_dto.dart +lib/model/resource.dart lib/model/resource_dto.dart lib/model/resource_type.dart lib/model/response_dto.dart +lib/model/section.dart lib/model/section_dto.dart +lib/model/section_map.dart +lib/model/section_map_all_of_map_map_provider.dart +lib/model/section_map_all_of_map_map_type.dart +lib/model/section_map_all_of_map_resource.dart +lib/model/section_map_all_of_map_type_mapbox.dart lib/model/section_type.dart lib/model/slider_dto.dart lib/model/token_dto.dart @@ -121,5 +137,3 @@ lib/model/video_dto.dart lib/model/weather_dto.dart lib/model/web_dto.dart pubspec.yaml -test/pdf_file_dto_test.dart -test/weather_dto_test.dart diff --git a/manager_api_new/.openapi-generator/VERSION b/manager_api_new/.openapi-generator/VERSION new file mode 100644 index 0000000..4bc5d61 --- /dev/null +++ b/manager_api_new/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.9.0 diff --git a/manager_api/.travis.yml b/manager_api_new/.travis.yml similarity index 100% rename from manager_api/.travis.yml rename to manager_api_new/.travis.yml diff --git a/manager_api_new/README.md b/manager_api_new/README.md new file mode 100644 index 0000000..ca87372 --- /dev/null +++ b/manager_api_new/README.md @@ -0,0 +1,208 @@ +# manager_api_new +API Manager Service + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: Version Alpha 3 +- Generator version: 7.9.0 +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 2.12 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, add the following dependency to your pubspec.yaml +``` +dependencies: + manager_api_new: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` + +### Local +To use the package in your local drive, add the following dependency to your pubspec.yaml +``` +dependencies: + manager_api_new: + path: /path/to/manager_api_new +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:manager_api_new/api.dart'; + +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = AuthenticationApi(); +final grantType = grantType_example; // String | +final username = username_example; // String | +final password = password_example; // String | +final clientId = clientId_example; // String | +final clientSecret = clientSecret_example; // String | + +try { + final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret); + print(result); +} catch (e) { + print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n'); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost:5001* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc//AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | +*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc//AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | +*ConfigurationApi* | [**configurationCreate**](doc//ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration | +*ConfigurationApi* | [**configurationDelete**](doc//ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} | +*ConfigurationApi* | [**configurationExport**](doc//ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export | +*ConfigurationApi* | [**configurationGet**](doc//ConfigurationApi.md#configurationget) | **GET** /api/Configuration | +*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc//ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin | +*ConfigurationApi* | [**configurationGetDetail**](doc//ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} | +*ConfigurationApi* | [**configurationImport**](doc//ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import | +*ConfigurationApi* | [**configurationUpdate**](doc//ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration | +*DeviceApi* | [**deviceCreate**](doc//DeviceApi.md#devicecreate) | **POST** /api/Device | +*DeviceApi* | [**deviceDelete**](doc//DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} | +*DeviceApi* | [**deviceGet**](doc//DeviceApi.md#deviceget) | **GET** /api/Device | +*DeviceApi* | [**deviceGetDetail**](doc//DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail | +*DeviceApi* | [**deviceUpdate**](doc//DeviceApi.md#deviceupdate) | **PUT** /api/Device | +*DeviceApi* | [**deviceUpdateMainInfos**](doc//DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos | +*InstanceApi* | [**instanceCreateInstance**](doc//InstanceApi.md#instancecreateinstance) | **POST** /api/Instance | +*InstanceApi* | [**instanceDeleteInstance**](doc//InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} | +*InstanceApi* | [**instanceGet**](doc//InstanceApi.md#instanceget) | **GET** /api/Instance | +*InstanceApi* | [**instanceGetDetail**](doc//InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} | +*InstanceApi* | [**instanceGetInstanceByPinCode**](doc//InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin | +*InstanceApi* | [**instanceUpdateinstance**](doc//InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance | +*ResourceApi* | [**resourceCreate**](doc//ResourceApi.md#resourcecreate) | **POST** /api/Resource | +*ResourceApi* | [**resourceDelete**](doc//ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} | +*ResourceApi* | [**resourceGet**](doc//ResourceApi.md#resourceget) | **GET** /api/Resource | +*ResourceApi* | [**resourceGetDetail**](doc//ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail | +*ResourceApi* | [**resourceShow**](doc//ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} | +*ResourceApi* | [**resourceUpdate**](doc//ResourceApi.md#resourceupdate) | **PUT** /api/Resource | +*ResourceApi* | [**resourceUpload**](doc//ResourceApi.md#resourceupload) | **POST** /api/Resource/upload | +*SectionApi* | [**sectionCreate**](doc//SectionApi.md#sectioncreate) | **POST** /api/Section | +*SectionApi* | [**sectionDelete**](doc//SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} | +*SectionApi* | [**sectionDeleteAllForConfiguration**](doc//SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | +*SectionApi* | [**sectionGet**](doc//SectionApi.md#sectionget) | **GET** /api/Section | +*SectionApi* | [**sectionGetAgendaDTO**](doc//SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO | +*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc//SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} | +*SectionApi* | [**sectionGetAllSectionSubSections**](doc//SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | +*SectionApi* | [**sectionGetArticleDTO**](doc//SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | +*SectionApi* | [**sectionGetDetail**](doc//SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | +*SectionApi* | [**sectionGetFromConfiguration**](doc//SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | +*SectionApi* | [**sectionGetFromConfigurationDetail**](doc//SectionApi.md#sectiongetfromconfigurationdetail) | **GET** /api/Section/configuration/{id}/detail | +*SectionApi* | [**sectionGetMapDTO**](doc//SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | +*SectionApi* | [**sectionGetMenuDTO**](doc//SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | +*SectionApi* | [**sectionGetPdfDTO**](doc//SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | +*SectionApi* | [**sectionGetPuzzleDTO**](doc//SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | +*SectionApi* | [**sectionGetQuizDTO**](doc//SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO | +*SectionApi* | [**sectionGetSliderDTO**](doc//SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | +*SectionApi* | [**sectionGetVideoDTO**](doc//SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | +*SectionApi* | [**sectionGetWeatherDTO**](doc//SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | +*SectionApi* | [**sectionGetWebDTO**](doc//SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO | +*SectionApi* | [**sectionPlayerMessageDTO**](doc//SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO | +*SectionApi* | [**sectionUpdate**](doc//SectionApi.md#sectionupdate) | **PUT** /api/Section | +*SectionApi* | [**sectionUpdateOrder**](doc//SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order | +*SectionMapApi* | [**sectionMapCreate**](doc//SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points | +*SectionMapApi* | [**sectionMapDelete**](doc//SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} | +*SectionMapApi* | [**sectionMapGetAllGeoPointsFromSection**](doc//SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points | +*SectionMapApi* | [**sectionMapUpdate**](doc//SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap | +*SectionQuizApi* | [**sectionQuizCreate**](doc//SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions | +*SectionQuizApi* | [**sectionQuizDelete**](doc//SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} | +*SectionQuizApi* | [**sectionQuizGetAllQuizQuestionFromSection**](doc//SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions | +*SectionQuizApi* | [**sectionQuizUpdate**](doc//SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz | +*UserApi* | [**userCreateUser**](doc//UserApi.md#usercreateuser) | **POST** /api/User | +*UserApi* | [**userDeleteUser**](doc//UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} | +*UserApi* | [**userGet**](doc//UserApi.md#userget) | **GET** /api/User | +*UserApi* | [**userGetDetail**](doc//UserApi.md#usergetdetail) | **GET** /api/User/{id} | +*UserApi* | [**userUpdateUser**](doc//UserApi.md#userupdateuser) | **PUT** /api/User | + + +## Documentation For Models + + - [AgendaDTO](doc//AgendaDTO.md) + - [AgendaDTOAllOfAgendaMapProvider](doc//AgendaDTOAllOfAgendaMapProvider.md) + - [ArticleDTO](doc//ArticleDTO.md) + - [CategorieDTO](doc//CategorieDTO.md) + - [ConfigurationDTO](doc//ConfigurationDTO.md) + - [ContentDTO](doc//ContentDTO.md) + - [ContentDTOResource](doc//ContentDTOResource.md) + - [DeviceDTO](doc//DeviceDTO.md) + - [DeviceDetailDTO](doc//DeviceDetailDTO.md) + - [ExportConfigurationDTO](doc//ExportConfigurationDTO.md) + - [GeoPoint](doc//GeoPoint.md) + - [GeoPointDTO](doc//GeoPointDTO.md) + - [GeoPointSectionMap](doc//GeoPointSectionMap.md) + - [Instance](doc//Instance.md) + - [InstanceDTO](doc//InstanceDTO.md) + - [LoginDTO](doc//LoginDTO.md) + - [MapDTO](doc//MapDTO.md) + - [MapDTOAllOfMapProvider](doc//MapDTOAllOfMapProvider.md) + - [MapDTOAllOfMapType](doc//MapDTOAllOfMapType.md) + - [MapDTOAllOfMapTypeMapbox](doc//MapDTOAllOfMapTypeMapbox.md) + - [MapProvider](doc//MapProvider.md) + - [MapTypeApp](doc//MapTypeApp.md) + - [MapTypeMapBox](doc//MapTypeMapBox.md) + - [MenuDTO](doc//MenuDTO.md) + - [OrderedTranslationAndResourceDTO](doc//OrderedTranslationAndResourceDTO.md) + - [PdfDTO](doc//PdfDTO.md) + - [PlayerMessageDTO](doc//PlayerMessageDTO.md) + - [PuzzleDTO](doc//PuzzleDTO.md) + - [PuzzleDTOAllOfPuzzleImage](doc//PuzzleDTOAllOfPuzzleImage.md) + - [QuestionDTO](doc//QuestionDTO.md) + - [QuestionDTOImageBackgroundResourceType](doc//QuestionDTOImageBackgroundResourceType.md) + - [QuizDTO](doc//QuizDTO.md) + - [Resource](doc//Resource.md) + - [ResourceDTO](doc//ResourceDTO.md) + - [ResourceType](doc//ResourceType.md) + - [ResponseDTO](doc//ResponseDTO.md) + - [Section](doc//Section.md) + - [SectionDTO](doc//SectionDTO.md) + - [SectionMap](doc//SectionMap.md) + - [SectionMapAllOfMapMapProvider](doc//SectionMapAllOfMapMapProvider.md) + - [SectionMapAllOfMapMapType](doc//SectionMapAllOfMapMapType.md) + - [SectionMapAllOfMapResource](doc//SectionMapAllOfMapResource.md) + - [SectionMapAllOfMapTypeMapbox](doc//SectionMapAllOfMapTypeMapbox.md) + - [SectionType](doc//SectionType.md) + - [SliderDTO](doc//SliderDTO.md) + - [TokenDTO](doc//TokenDTO.md) + - [TranslationAndResourceDTO](doc//TranslationAndResourceDTO.md) + - [TranslationDTO](doc//TranslationDTO.md) + - [User](doc//User.md) + - [UserDetailDTO](doc//UserDetailDTO.md) + - [VideoDTO](doc//VideoDTO.md) + - [WeatherDTO](doc//WeatherDTO.md) + - [WebDTO](doc//WebDTO.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### bearer + +- **Type**: OAuth +- **Flow**: password +- **Authorization URL**: /authentication/Token +- **Scopes**: + - **Manager-api**: Manager WebAPI + + +## Author + + + diff --git a/manager_api/analysis_options.yaml b/manager_api_new/analysis_options.yaml similarity index 100% rename from manager_api/analysis_options.yaml rename to manager_api_new/analysis_options.yaml diff --git a/manager_api_new/doc/AgendaDTO.md b/manager_api_new/doc/AgendaDTO.md new file mode 100644 index 0000000..39f1981 --- /dev/null +++ b/manager_api_new/doc/AgendaDTO.md @@ -0,0 +1,34 @@ +# manager_api_new.model.AgendaDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**resourceIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**agendaMapProvider** | [**AgendaDTOAllOfAgendaMapProvider**](AgendaDTOAllOfAgendaMapProvider.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/WebDTO.md b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md similarity index 74% rename from manager_api/doc/WebDTO.md rename to manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md index a6ac523..46aabe9 100644 --- a/manager_api/doc/WebDTO.md +++ b/manager_api_new/doc/AgendaDTOAllOfAgendaMapProvider.md @@ -1,14 +1,13 @@ -# manager_api.model.WebDTO +# manager_api_new.model.AgendaDTOAllOfAgendaMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api_new/doc/ArticleDTO.md b/manager_api_new/doc/ArticleDTO.md new file mode 100644 index 0000000..b23a827 --- /dev/null +++ b/manager_api_new/doc/ArticleDTO.md @@ -0,0 +1,37 @@ +# manager_api_new.model.ArticleDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**content** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**isContentTop** | **bool** | | [optional] +**audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**isReadAudioAuto** | **bool** | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api_new/doc/AuthenticationApi.md similarity index 93% rename from manager_api/doc/AuthenticationApi.md rename to manager_api_new/doc/AuthenticationApi.md index 71112c8..9ef127e 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api_new/doc/AuthenticationApi.md @@ -1,11 +1,11 @@ -# manager_api.api.AuthenticationApi +# manager_api_new.api.AuthenticationApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -20,7 +20,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -71,7 +71,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/CategorieDTO.md b/manager_api_new/doc/CategorieDTO.md similarity index 76% rename from manager_api/doc/CategorieDTO.md rename to manager_api_new/doc/CategorieDTO.md index e346999..688a61d 100644 --- a/manager_api/doc/CategorieDTO.md +++ b/manager_api_new/doc/CategorieDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.CategorieDTO +# manager_api_new.model.CategorieDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **icon** | **String** | | [optional] -**iconResourceId** | **String** | | [optional] -**iconUrl** | **String** | | [optional] +**resourceDTO** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] **order** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api_new/doc/ConfigurationApi.md similarity index 94% rename from manager_api/doc/ConfigurationApi.md rename to manager_api_new/doc/ConfigurationApi.md index 7ef7c1c..8e88412 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api_new/doc/ConfigurationApi.md @@ -1,11 +1,11 @@ -# manager_api.api.ConfigurationApi +# manager_api_new.api.ConfigurationApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,7 +26,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -69,7 +69,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -157,7 +157,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -200,12 +200,12 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = ConfigurationApi(); -final pinCode = 56; // int | +final pinCode = pinCode_example; // String | try { final result = api_instance.configurationGetConfigurationsByPinCode(pinCode); @@ -219,7 +219,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pinCode** | **int**| | [optional] + **pinCode** | **String**| | [optional] ### Return type @@ -243,7 +243,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -286,7 +286,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -329,7 +329,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api_new/doc/ConfigurationDTO.md similarity index 83% rename from manager_api/doc/ConfigurationDTO.md rename to manager_api_new/doc/ConfigurationDTO.md index edf6380..3f099f6 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api_new/doc/ConfigurationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ConfigurationDTO +# manager_api_new.model.ConfigurationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -24,10 +24,6 @@ Name | Type | Description | Notes **sectionIds** | **List** | | [optional] [default to const []] **loaderImageId** | **String** | | [optional] **loaderImageUrl** | **String** | | [optional] -**weatherCity** | **String** | | [optional] -**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional] -**weatherResult** | **String** | | [optional] -**isWeather** | **bool** | | [optional] **isDate** | **bool** | | [optional] **isHour** | **bool** | | [optional] **isSectionImageBackground** | **bool** | | [optional] diff --git a/manager_api/doc/ContentDTO.md b/manager_api_new/doc/ContentDTO.md similarity index 75% rename from manager_api/doc/ContentDTO.md rename to manager_api_new/doc/ContentDTO.md index 47fe015..eccf209 100644 --- a/manager_api/doc/ContentDTO.md +++ b/manager_api_new/doc/ContentDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ContentDTO +# manager_api_new.model.ContentDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -10,10 +10,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**resourceId** | **String** | | [optional] -**resourceUrl** | **String** | | [optional] **order** | **int** | | [optional] -**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**resourceId** | **String** | | [optional] +**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/User.md b/manager_api_new/doc/ContentDTOResource.md similarity index 62% rename from manager_api/doc/User.md rename to manager_api_new/doc/ContentDTOResource.md index b51b3d3..2315aec 100644 --- a/manager_api/doc/User.md +++ b/manager_api_new/doc/ContentDTOResource.md @@ -1,19 +1,17 @@ -# manager_api.model.User +# manager_api_new.model.ContentDTOResource ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**token** | **String** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] +**label** | **String** | | [optional] +**url** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api/doc/ContentGeoPoint.md b/manager_api_new/doc/ContentGeoPoint.md similarity index 86% rename from manager_api/doc/ContentGeoPoint.md rename to manager_api_new/doc/ContentGeoPoint.md index adb2867..682228e 100644 --- a/manager_api/doc/ContentGeoPoint.md +++ b/manager_api_new/doc/ContentGeoPoint.md @@ -1,8 +1,8 @@ -# manager_api.model.ContentGeoPoint +# manager_api_new.model.ContentGeoPoint ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceApi.md b/manager_api_new/doc/DeviceApi.md similarity index 94% rename from manager_api/doc/DeviceApi.md rename to manager_api_new/doc/DeviceApi.md index aef8698..1173900 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api_new/doc/DeviceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.DeviceApi +# manager_api_new.api.DeviceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,7 +24,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -110,7 +110,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -153,7 +153,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -196,7 +196,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -239,7 +239,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/DeviceDTO.md b/manager_api_new/doc/DeviceDTO.md similarity index 91% rename from manager_api/doc/DeviceDTO.md rename to manager_api_new/doc/DeviceDTO.md index 0f99dac..d2c0be2 100644 --- a/manager_api/doc/DeviceDTO.md +++ b/manager_api_new/doc/DeviceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDTO +# manager_api_new.model.DeviceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceDetailDTO.md b/manager_api_new/doc/DeviceDetailDTO.md similarity index 92% rename from manager_api/doc/DeviceDetailDTO.md rename to manager_api_new/doc/DeviceDetailDTO.md index 2d9ed26..2899936 100644 --- a/manager_api/doc/DeviceDetailDTO.md +++ b/manager_api_new/doc/DeviceDetailDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDetailDTO +# manager_api_new.model.DeviceDetailDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/DeviceDetailDTOAllOf.md b/manager_api_new/doc/DeviceDetailDTOAllOf.md similarity index 86% rename from manager_api/doc/DeviceDetailDTOAllOf.md rename to manager_api_new/doc/DeviceDetailDTOAllOf.md index 8d701aa..0b6c098 100644 --- a/manager_api/doc/DeviceDetailDTOAllOf.md +++ b/manager_api_new/doc/DeviceDetailDTOAllOf.md @@ -1,8 +1,8 @@ -# manager_api.model.DeviceDetailDTOAllOf +# manager_api_new.model.DeviceDetailDTOAllOf ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ExportConfigurationDTO.md b/manager_api_new/doc/ExportConfigurationDTO.md similarity index 84% rename from manager_api/doc/ExportConfigurationDTO.md rename to manager_api_new/doc/ExportConfigurationDTO.md index 3c88c48..e2abee5 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api_new/doc/ExportConfigurationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ExportConfigurationDTO +# manager_api_new.model.ExportConfigurationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -24,10 +24,6 @@ Name | Type | Description | Notes **sectionIds** | **List** | | [optional] [default to const []] **loaderImageId** | **String** | | [optional] **loaderImageUrl** | **String** | | [optional] -**weatherCity** | **String** | | [optional] -**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional] -**weatherResult** | **String** | | [optional] -**isWeather** | **bool** | | [optional] **isDate** | **bool** | | [optional] **isHour** | **bool** | | [optional] **isSectionImageBackground** | **bool** | | [optional] diff --git a/manager_api/doc/ExportConfigurationDTOAllOf.md b/manager_api_new/doc/ExportConfigurationDTOAllOf.md similarity index 84% rename from manager_api/doc/ExportConfigurationDTOAllOf.md rename to manager_api_new/doc/ExportConfigurationDTOAllOf.md index 21322a8..6e8eeff 100644 --- a/manager_api/doc/ExportConfigurationDTOAllOf.md +++ b/manager_api_new/doc/ExportConfigurationDTOAllOf.md @@ -1,8 +1,8 @@ -# manager_api.model.ExportConfigurationDTOAllOf +# manager_api_new.model.ExportConfigurationDTOAllOf ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/GeoPoint.md b/manager_api_new/doc/GeoPoint.md new file mode 100644 index 0000000..60f5aa0 --- /dev/null +++ b/manager_api_new/doc/GeoPoint.md @@ -0,0 +1,30 @@ +# manager_api_new.model.GeoPoint + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [default to const []] +**contents** | [**List**](ContentDTO.md) | | [default to const []] +**schedules** | [**List**](TranslationDTO.md) | | [default to const []] +**prices** | [**List**](TranslationDTO.md) | | [default to const []] +**phone** | [**List**](TranslationDTO.md) | | [default to const []] +**email** | [**List**](TranslationDTO.md) | | [default to const []] +**site** | [**List**](TranslationDTO.md) | | [default to const []] +**categorieId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**imageResourceId** | **String** | | [optional] +**imageUrl** | **String** | | [optional] +**sectionMapId** | **String** | | [optional] +**sectionMap** | [**GeoPointSectionMap**](GeoPointSectionMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/GeoPointDTO.md b/manager_api_new/doc/GeoPointDTO.md similarity index 82% rename from manager_api/doc/GeoPointDTO.md rename to manager_api_new/doc/GeoPointDTO.md index a3412ff..2ec2498 100644 --- a/manager_api/doc/GeoPointDTO.md +++ b/manager_api_new/doc/GeoPointDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.GeoPointDTO +# manager_api_new.model.GeoPointDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**contents** | [**List**](ContentGeoPoint.md) | | [optional] [default to const []] -**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] **categorieId** | **int** | | [optional] **latitude** | **String** | | [optional] **longitude** | **String** | | [optional] diff --git a/manager_api/doc/GeoPointDTOCategorie.md b/manager_api_new/doc/GeoPointDTOCategorie.md similarity index 87% rename from manager_api/doc/GeoPointDTOCategorie.md rename to manager_api_new/doc/GeoPointDTOCategorie.md index 6765935..eeefaed 100644 --- a/manager_api/doc/GeoPointDTOCategorie.md +++ b/manager_api_new/doc/GeoPointDTOCategorie.md @@ -1,8 +1,8 @@ -# manager_api.model.GeoPointDTOCategorie +# manager_api_new.model.GeoPointDTOCategorie ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/GeoPointSectionMap.md b/manager_api_new/doc/GeoPointSectionMap.md new file mode 100644 index 0000000..1eb7bb9 --- /dev/null +++ b/manager_api_new/doc/GeoPointSectionMap.md @@ -0,0 +1,42 @@ +# manager_api_new.model.GeoPointSectionMap + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**mapCategories** | [**List**](CategorieDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**mapZoom** | **int** | | [optional] +**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional] +**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional] +**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional] +**mapPoints** | [**List**](GeoPoint.md) | | [optional] [default to const []] +**mapResourceId** | **String** | | [optional] +**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**mapCenterLatitude** | **String** | | [optional] +**mapCenterLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/ImageDTO.md b/manager_api_new/doc/ImageDTO.md similarity index 81% rename from manager_api/doc/ImageDTO.md rename to manager_api_new/doc/ImageDTO.md index 9844084..20db40a 100644 --- a/manager_api/doc/ImageDTO.md +++ b/manager_api_new/doc/ImageDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ImageDTO +# manager_api_new.model.ImageDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -13,6 +13,7 @@ Name | Type | Description | Notes **resourceId** | **String** | | [optional] **source_** | **String** | | [optional] **order** | **int** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/ImageGeoPoint.md b/manager_api_new/doc/ImageGeoPoint.md similarity index 83% rename from manager_api/doc/ImageGeoPoint.md rename to manager_api_new/doc/ImageGeoPoint.md index 73dd52f..7460899 100644 --- a/manager_api/doc/ImageGeoPoint.md +++ b/manager_api_new/doc/ImageGeoPoint.md @@ -1,8 +1,8 @@ -# manager_api.model.ImageGeoPoint +# manager_api_new.model.ImageGeoPoint ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/Instance.md b/manager_api_new/doc/Instance.md similarity index 67% rename from manager_api/doc/Instance.md rename to manager_api_new/doc/Instance.md index 1fd6ac6..4fa498d 100644 --- a/manager_api/doc/Instance.md +++ b/manager_api_new/doc/Instance.md @@ -1,17 +1,17 @@ -# manager_api.model.Instance +# manager_api_new.model.Instance ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**name** | **String** | | [optional] +**id** | **String** | | +**name** | **String** | | **dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/InstanceApi.md b/manager_api_new/doc/InstanceApi.md similarity index 87% rename from manager_api/doc/InstanceApi.md rename to manager_api_new/doc/InstanceApi.md index a0aaa08..5d8e006 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api_new/doc/InstanceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.InstanceApi +# manager_api_new.api.InstanceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -18,21 +18,21 @@ Method | HTTP request | Description # **instanceCreateInstance** -> InstanceDTO instanceCreateInstance(instance) +> InstanceDTO instanceCreateInstance(instanceDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final instance = Instance(); // Instance | +final instanceDTO = InstanceDTO(); // InstanceDTO | try { - final result = api_instance.instanceCreateInstance(instance); + final result = api_instance.instanceCreateInstance(instanceDTO); print(result); } catch (e) { print('Exception when calling InstanceApi->instanceCreateInstance: $e\n'); @@ -43,7 +43,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **instance** | [**Instance**](Instance.md)| | + **instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| | ### Return type @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -110,7 +110,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -149,7 +149,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -192,12 +192,12 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final pinCode = 56; // int | +final pinCode = pinCode_example; // String | try { final result = api_instance.instanceGetInstanceByPinCode(pinCode); @@ -211,7 +211,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pinCode** | **int**| | [optional] + **pinCode** | **String**| | [optional] ### Return type @@ -229,21 +229,21 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **instanceUpdateinstance** -> InstanceDTO instanceUpdateinstance(instance) +> InstanceDTO instanceUpdateinstance(instanceDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = InstanceApi(); -final instance = Instance(); // Instance | +final instanceDTO = InstanceDTO(); // InstanceDTO | try { - final result = api_instance.instanceUpdateinstance(instance); + final result = api_instance.instanceUpdateinstance(instanceDTO); print(result); } catch (e) { print('Exception when calling InstanceApi->instanceUpdateinstance: $e\n'); @@ -254,7 +254,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **instance** | [**Instance**](Instance.md)| | + **instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| | ### Return type diff --git a/manager_api/doc/InstanceDTO.md b/manager_api_new/doc/InstanceDTO.md similarity index 78% rename from manager_api/doc/InstanceDTO.md rename to manager_api_new/doc/InstanceDTO.md index ec1d952..9bc7fab 100644 --- a/manager_api/doc/InstanceDTO.md +++ b/manager_api_new/doc/InstanceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.InstanceDTO +# manager_api_new.model.InstanceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **name** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/LevelDTO.md b/manager_api_new/doc/LevelDTO.md similarity index 85% rename from manager_api/doc/LevelDTO.md rename to manager_api_new/doc/LevelDTO.md index d87fee3..5627672 100644 --- a/manager_api/doc/LevelDTO.md +++ b/manager_api_new/doc/LevelDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.LevelDTO +# manager_api_new.model.LevelDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/LoginDTO.md b/manager_api_new/doc/LoginDTO.md similarity index 83% rename from manager_api/doc/LoginDTO.md rename to manager_api_new/doc/LoginDTO.md index fa86966..a07728f 100644 --- a/manager_api/doc/LoginDTO.md +++ b/manager_api_new/doc/LoginDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.LoginDTO +# manager_api_new.model.LoginDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/MapDTO.md b/manager_api_new/doc/MapDTO.md new file mode 100644 index 0000000..84aa572 --- /dev/null +++ b/manager_api_new/doc/MapDTO.md @@ -0,0 +1,42 @@ +# manager_api_new.model.MapDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**zoom** | **int** | | [optional] +**mapType** | [**MapDTOAllOfMapType**](MapDTOAllOfMapType.md) | | [optional] +**mapTypeMapbox** | [**MapDTOAllOfMapTypeMapbox**](MapDTOAllOfMapTypeMapbox.md) | | [optional] +**mapProvider** | [**MapDTOAllOfMapProvider**](MapDTOAllOfMapProvider.md) | | [optional] +**points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] +**iconResourceId** | **String** | | [optional] +**iconSource** | **String** | | [optional] +**categories** | [**List**](CategorieDTO.md) | | [optional] [default to const []] +**centerLatitude** | **String** | | [optional] +**centerLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/VideoDTO.md b/manager_api_new/doc/MapDTOAllOfMapProvider.md similarity index 74% rename from manager_api/doc/VideoDTO.md rename to manager_api_new/doc/MapDTOAllOfMapProvider.md index a13142e..0a1a2ea 100644 --- a/manager_api/doc/VideoDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapProvider.md @@ -1,14 +1,13 @@ -# manager_api.model.VideoDTO +# manager_api_new.model.MapDTOAllOfMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/PdfDTO.md b/manager_api_new/doc/MapDTOAllOfMapType.md similarity index 67% rename from manager_api/doc/PdfDTO.md rename to manager_api_new/doc/MapDTOAllOfMapType.md index 1caaab8..2ad023c 100644 --- a/manager_api/doc/PdfDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapType.md @@ -1,14 +1,13 @@ -# manager_api.model.PdfDTO +# manager_api_new.model.MapDTOAllOfMapType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pdfs** | [**List**](PDFFileDTO.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/MenuDTO.md b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md similarity index 66% rename from manager_api/doc/MenuDTO.md rename to manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md index cdbc1db..90894c3 100644 --- a/manager_api/doc/MenuDTO.md +++ b/manager_api_new/doc/MapDTOAllOfMapTypeMapbox.md @@ -1,14 +1,13 @@ -# manager_api.model.MenuDTO +# manager_api_new.model.MapDTOAllOfMapTypeMapbox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/MapDTOMapProvider.md b/manager_api_new/doc/MapDTOMapProvider.md similarity index 78% rename from manager_api/doc/MapDTOMapProvider.md rename to manager_api_new/doc/MapDTOMapProvider.md index 882195a..ab01794 100644 --- a/manager_api/doc/MapDTOMapProvider.md +++ b/manager_api_new/doc/MapDTOMapProvider.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapProvider +# manager_api_new.model.MapDTOMapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapDTOMapType.md b/manager_api_new/doc/MapDTOMapType.md similarity index 79% rename from manager_api/doc/MapDTOMapType.md rename to manager_api_new/doc/MapDTOMapType.md index 118e848..514d3b3 100644 --- a/manager_api/doc/MapDTOMapType.md +++ b/manager_api_new/doc/MapDTOMapType.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapType +# manager_api_new.model.MapDTOMapType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapDTOMapTypeMapbox.md b/manager_api_new/doc/MapDTOMapTypeMapbox.md similarity index 78% rename from manager_api/doc/MapDTOMapTypeMapbox.md rename to manager_api_new/doc/MapDTOMapTypeMapbox.md index d3937ca..9014978 100644 --- a/manager_api/doc/MapDTOMapTypeMapbox.md +++ b/manager_api_new/doc/MapDTOMapTypeMapbox.md @@ -1,8 +1,8 @@ -# manager_api.model.MapDTOMapTypeMapbox +# manager_api_new.model.MapDTOMapTypeMapbox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapProvider.md b/manager_api_new/doc/MapProvider.md similarity index 79% rename from manager_api/doc/MapProvider.md rename to manager_api_new/doc/MapProvider.md index f600a20..21714af 100644 --- a/manager_api/doc/MapProvider.md +++ b/manager_api_new/doc/MapProvider.md @@ -1,8 +1,8 @@ -# manager_api.model.MapProvider +# manager_api_new.model.MapProvider ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapTypeApp.md b/manager_api_new/doc/MapTypeApp.md similarity index 80% rename from manager_api/doc/MapTypeApp.md rename to manager_api_new/doc/MapTypeApp.md index b8ef959..4aaf681 100644 --- a/manager_api/doc/MapTypeApp.md +++ b/manager_api_new/doc/MapTypeApp.md @@ -1,8 +1,8 @@ -# manager_api.model.MapTypeApp +# manager_api_new.model.MapTypeApp ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapTypeMapBox.md b/manager_api_new/doc/MapTypeMapBox.md similarity index 79% rename from manager_api/doc/MapTypeMapBox.md rename to manager_api_new/doc/MapTypeMapBox.md index 99b9232..561b3a4 100644 --- a/manager_api/doc/MapTypeMapBox.md +++ b/manager_api_new/doc/MapTypeMapBox.md @@ -1,8 +1,8 @@ -# manager_api.model.MapTypeMapBox +# manager_api_new.model.MapTypeMapBox ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/MenuDTO.md b/manager_api_new/doc/MenuDTO.md new file mode 100644 index 0000000..df119df --- /dev/null +++ b/manager_api_new/doc/MenuDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.MenuDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/AgendaDTO.md b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md similarity index 53% rename from manager_api/doc/AgendaDTO.md rename to manager_api_new/doc/OrderedTranslationAndResourceDTO.md index b341661..aa8231e 100644 --- a/manager_api/doc/AgendaDTO.md +++ b/manager_api_new/doc/OrderedTranslationAndResourceDTO.md @@ -1,15 +1,15 @@ -# manager_api.model.AgendaDTO +# manager_api_new.model.OrderedTranslationAndResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**resourceIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] +**translationAndResourceDTOs** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/PDFFileDTO.md b/manager_api_new/doc/PDFFileDTO.md similarity index 86% rename from manager_api/doc/PDFFileDTO.md rename to manager_api_new/doc/PDFFileDTO.md index 4d2432a..f70fea4 100644 --- a/manager_api/doc/PDFFileDTO.md +++ b/manager_api_new/doc/PDFFileDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.PDFFileDTO +# manager_api_new.model.PDFFileDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/PdfDTO.md b/manager_api_new/doc/PdfDTO.md new file mode 100644 index 0000000..b50f735 --- /dev/null +++ b/manager_api_new/doc/PdfDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.PdfDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**pdfs** | [**List**](OrderedTranslationAndResourceDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/PlayerMessageDTO.md b/manager_api_new/doc/PlayerMessageDTO.md similarity index 82% rename from manager_api/doc/PlayerMessageDTO.md rename to manager_api_new/doc/PlayerMessageDTO.md index b5a97b7..4e6ac89 100644 --- a/manager_api/doc/PlayerMessageDTO.md +++ b/manager_api_new/doc/PlayerMessageDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.PlayerMessageDTO +# manager_api_new.model.PlayerMessageDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/PuzzleDTO.md b/manager_api_new/doc/PuzzleDTO.md new file mode 100644 index 0000000..2c55b8d --- /dev/null +++ b/manager_api_new/doc/PuzzleDTO.md @@ -0,0 +1,38 @@ +# manager_api_new.model.PuzzleDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**messageDebut** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**messageFin** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**puzzleImage** | [**PuzzleDTOAllOfPuzzleImage**](PuzzleDTOAllOfPuzzleImage.md) | | [optional] +**puzzleImageId** | **String** | | [optional] +**rows** | **int** | | [optional] +**cols** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md b/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md new file mode 100644 index 0000000..926dfa7 --- /dev/null +++ b/manager_api_new/doc/PuzzleDTOAllOfPuzzleImage.md @@ -0,0 +1,20 @@ +# manager_api_new.model.PuzzleDTOAllOfPuzzleImage + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**type** | [**ResourceType**](ResourceType.md) | | [optional] +**label** | **String** | | [optional] +**url** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**instanceId** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/PuzzleDTOImage.md b/manager_api_new/doc/PuzzleDTOImage.md similarity index 89% rename from manager_api/doc/PuzzleDTOImage.md rename to manager_api_new/doc/PuzzleDTOImage.md index cc2e07a..9777e5f 100644 --- a/manager_api/doc/PuzzleDTOImage.md +++ b/manager_api_new/doc/PuzzleDTOImage.md @@ -1,8 +1,8 @@ -# manager_api.model.PuzzleDTOImage +# manager_api_new.model.PuzzleDTOImage ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/QuestionDTO.md b/manager_api_new/doc/QuestionDTO.md similarity index 73% rename from manager_api/doc/QuestionDTO.md rename to manager_api_new/doc/QuestionDTO.md index 24020cc..ad9d7c4 100644 --- a/manager_api/doc/QuestionDTO.md +++ b/manager_api_new/doc/QuestionDTO.md @@ -1,17 +1,18 @@ -# manager_api.model.QuestionDTO +# manager_api_new.model.QuestionDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] **label** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] **responses** | [**List**](ResponseDTO.md) | | [optional] [default to const []] **imageBackgroundResourceId** | **String** | | [optional] -**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**imageBackgroundResourceType** | [**QuestionDTOImageBackgroundResourceType**](QuestionDTOImageBackgroundResourceType.md) | | [optional] **imageBackgroundResourceUrl** | **String** | | [optional] **order** | **int** | | [optional] diff --git a/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md b/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md new file mode 100644 index 0000000..fd5da45 --- /dev/null +++ b/manager_api_new/doc/QuestionDTOImageBackgroundResourceType.md @@ -0,0 +1,14 @@ +# manager_api_new.model.QuestionDTOImageBackgroundResourceType + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizDTO.md b/manager_api_new/doc/QuizDTO.md new file mode 100644 index 0000000..dace0c8 --- /dev/null +++ b/manager_api_new/doc/QuizDTO.md @@ -0,0 +1,37 @@ +# manager_api_new.model.QuizDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**questions** | [**List**](QuestionDTO.md) | | [optional] [default to const []] +**badLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**mediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**goodLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**greatLevel** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestion.md b/manager_api_new/doc/QuizQuestion.md new file mode 100644 index 0000000..f8dd67a --- /dev/null +++ b/manager_api_new/doc/QuizQuestion.md @@ -0,0 +1,22 @@ +# manager_api_new.model.QuizQuestion + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**label** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**responses** | [**List**](ResponseDTO.md) | | [default to const []] +**resourceId** | **String** | | [optional] +**resource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**order** | **int** | | [optional] +**sectionQuizId** | **String** | | [optional] +**sectionQuiz** | [**QuizQuestionSectionQuiz**](QuizQuestionSectionQuiz.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestionResource.md b/manager_api_new/doc/QuizQuestionResource.md new file mode 100644 index 0000000..88ce9ce --- /dev/null +++ b/manager_api_new/doc/QuizQuestionResource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.QuizQuestionResource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/QuizQuestionSectionQuiz.md b/manager_api_new/doc/QuizQuestionSectionQuiz.md new file mode 100644 index 0000000..8979911 --- /dev/null +++ b/manager_api_new/doc/QuizQuestionSectionQuiz.md @@ -0,0 +1,37 @@ +# manager_api_new.model.QuizQuestionSectionQuiz + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**quizQuestions** | [**List**](QuizQuestion.md) | | [default to const []] +**quizBadLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizMediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGoodLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGreatLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/QuizzDTO.md b/manager_api_new/doc/QuizzDTO.md similarity index 90% rename from manager_api/doc/QuizzDTO.md rename to manager_api_new/doc/QuizzDTO.md index 11c9d89..c359720 100644 --- a/manager_api/doc/QuizzDTO.md +++ b/manager_api_new/doc/QuizzDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.QuizzDTO +# manager_api_new.model.QuizzDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/QuizzDTOBadLevel.md b/manager_api_new/doc/QuizzDTOBadLevel.md similarity index 83% rename from manager_api/doc/QuizzDTOBadLevel.md rename to manager_api_new/doc/QuizzDTOBadLevel.md index fd4ad3a..c89cf1c 100644 --- a/manager_api/doc/QuizzDTOBadLevel.md +++ b/manager_api_new/doc/QuizzDTOBadLevel.md @@ -1,8 +1,8 @@ -# manager_api.model.QuizzDTOBadLevel +# manager_api_new.model.QuizzDTOBadLevel ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/Resource.md b/manager_api_new/doc/Resource.md new file mode 100644 index 0000000..8d5a870 --- /dev/null +++ b/manager_api_new/doc/Resource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.Resource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/ResourceApi.md b/manager_api_new/doc/ResourceApi.md similarity index 95% rename from manager_api/doc/ResourceApi.md rename to manager_api_new/doc/ResourceApi.md index 22722f9..ff8f425 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api_new/doc/ResourceApi.md @@ -1,11 +1,11 @@ -# manager_api.api.ResourceApi +# manager_api_new.api.ResourceApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,7 +25,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -68,7 +68,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -111,7 +111,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -199,7 +199,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -242,7 +242,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -285,7 +285,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/ResourceDTO.md b/manager_api_new/doc/ResourceDTO.md similarity index 88% rename from manager_api/doc/ResourceDTO.md rename to manager_api_new/doc/ResourceDTO.md index 8f3ef86..883e620 100644 --- a/manager_api/doc/ResourceDTO.md +++ b/manager_api_new/doc/ResourceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ResourceDTO +# manager_api_new.model.ResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ResourceType.md b/manager_api_new/doc/ResourceType.md similarity index 79% rename from manager_api/doc/ResourceType.md rename to manager_api_new/doc/ResourceType.md index afd3f6e..ef72cc8 100644 --- a/manager_api/doc/ResourceType.md +++ b/manager_api_new/doc/ResourceType.md @@ -1,8 +1,8 @@ -# manager_api.model.ResourceType +# manager_api_new.model.ResourceType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ResponseDTO.md b/manager_api_new/doc/ResponseDTO.md similarity index 86% rename from manager_api/doc/ResponseDTO.md rename to manager_api_new/doc/ResponseDTO.md index c40e9a8..71c91bd 100644 --- a/manager_api/doc/ResponseDTO.md +++ b/manager_api_new/doc/ResponseDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.ResponseDTO +# manager_api_new.model.ResponseDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/Section.md b/manager_api_new/doc/Section.md new file mode 100644 index 0000000..165ef46 --- /dev/null +++ b/manager_api_new/doc/Section.md @@ -0,0 +1,32 @@ +# manager_api_new.model.Section + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/SectionApi.md b/manager_api_new/doc/SectionApi.md similarity index 88% rename from manager_api/doc/SectionApi.md rename to manager_api_new/doc/SectionApi.md index 5dba346..2f7236f 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api_new/doc/SectionApi.md @@ -1,11 +1,11 @@ -# manager_api.api.SectionApi +# manager_api_new.api.SectionApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,11 +19,12 @@ Method | HTTP request | Description [**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | [**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | [**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | +[**sectionGetFromConfigurationDetail**](SectionApi.md#sectiongetfromconfigurationdetail) | **GET** /api/Section/configuration/{id}/detail | [**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | [**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO | [**sectionGetPdfDTO**](SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO | [**sectionGetPuzzleDTO**](SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO | -[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO | +[**sectionGetQuizDTO**](SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO | [**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | [**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | [**sectionGetWeatherDTO**](SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | @@ -40,7 +41,7 @@ Method | HTTP request | Description ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -83,7 +84,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -126,7 +127,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -169,7 +170,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -212,7 +213,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -251,7 +252,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -294,7 +295,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -337,7 +338,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -370,13 +371,13 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sectionGetDetail** -> SectionDTO sectionGetDetail(id) +> Object sectionGetDetail(id) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -399,7 +400,7 @@ Name | Type | Description | Notes ### Return type -[**SectionDTO**](SectionDTO.md) +[**Object**](Object.md) ### Authorization @@ -419,7 +420,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -455,6 +456,49 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **sectionGetFromConfigurationDetail** +> List sectionGetFromConfigurationDetail(id) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); +final id = id_example; // String | + +try { + final result = api_instance.sectionGetFromConfigurationDetail(id); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetFromConfigurationDetail: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**List**](Object.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **sectionGetMapDTO** > MapDTO sectionGetMapDTO() @@ -462,7 +506,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -501,7 +545,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -540,7 +584,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -579,7 +623,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -611,24 +655,24 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **sectionGetQuizzDTO** -> QuizzDTO sectionGetQuizzDTO() +# **sectionGetQuizDTO** +> QuizDTO sectionGetQuizDTO() ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = SectionApi(); try { - final result = api_instance.sectionGetQuizzDTO(); + final result = api_instance.sectionGetQuizDTO(); print(result); } catch (e) { - print('Exception when calling SectionApi->sectionGetQuizzDTO: $e\n'); + print('Exception when calling SectionApi->sectionGetQuizDTO: $e\n'); } ``` @@ -637,7 +681,7 @@ This endpoint does not need any parameter. ### Return type -[**QuizzDTO**](QuizzDTO.md) +[**QuizDTO**](QuizDTO.md) ### Authorization @@ -657,7 +701,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -696,7 +740,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -735,7 +779,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -774,7 +818,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -813,7 +857,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -846,21 +890,21 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **sectionUpdate** -> SectionDTO sectionUpdate(sectionDTO) +> Object sectionUpdate(body) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = SectionApi(); -final sectionDTO = SectionDTO(); // SectionDTO | +final body = Object(); // Object | try { - final result = api_instance.sectionUpdate(sectionDTO); + final result = api_instance.sectionUpdate(body); print(result); } catch (e) { print('Exception when calling SectionApi->sectionUpdate: $e\n'); @@ -871,11 +915,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sectionDTO** | [**SectionDTO**](SectionDTO.md)| | + **body** | **Object**| | ### Return type -[**SectionDTO**](SectionDTO.md) +[**Object**](Object.md) ### Authorization @@ -895,7 +939,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; diff --git a/manager_api/doc/SectionDTO.md b/manager_api_new/doc/SectionDTO.md similarity index 91% rename from manager_api/doc/SectionDTO.md rename to manager_api_new/doc/SectionDTO.md index 484d474..d5d8fc0 100644 --- a/manager_api/doc/SectionDTO.md +++ b/manager_api_new/doc/SectionDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.SectionDTO +# manager_api_new.model.SectionDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -18,7 +18,6 @@ Name | Type | Description | Notes **isSubSection** | **bool** | | [optional] **parentId** | **String** | | [optional] **type** | [**SectionType**](SectionType.md) | | [optional] -**data** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **order** | **int** | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api_new/doc/SectionMap.md b/manager_api_new/doc/SectionMap.md new file mode 100644 index 0000000..e875189 --- /dev/null +++ b/manager_api_new/doc/SectionMap.md @@ -0,0 +1,42 @@ +# manager_api_new.model.SectionMap + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**mapCategories** | [**List**](CategorieDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**mapZoom** | **int** | | [optional] +**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional] +**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional] +**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional] +**mapPoints** | [**List**](GeoPoint.md) | | [optional] [default to const []] +**mapResourceId** | **String** | | [optional] +**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional] +**mapCenterLatitude** | **String** | | [optional] +**mapCenterLongitude** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapMapProvider.md b/manager_api_new/doc/SectionMapAllOfMapMapProvider.md new file mode 100644 index 0000000..bc9de49 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapMapProvider.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapMapProvider + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapMapType.md b/manager_api_new/doc/SectionMapAllOfMapMapType.md new file mode 100644 index 0000000..2594134 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapMapType.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapMapType + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapResource.md b/manager_api_new/doc/SectionMapAllOfMapResource.md new file mode 100644 index 0000000..4d70802 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapResource.md @@ -0,0 +1,20 @@ +# manager_api_new.model.SectionMapAllOfMapResource + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**type** | [**ResourceType**](ResourceType.md) | | +**label** | **String** | | +**instanceId** | **String** | | +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**url** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md b/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md new file mode 100644 index 0000000..1998288 --- /dev/null +++ b/manager_api_new/doc/SectionMapAllOfMapTypeMapbox.md @@ -0,0 +1,14 @@ +# manager_api_new.model.SectionMapAllOfMapTypeMapbox + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionMapApi.md b/manager_api_new/doc/SectionMapApi.md new file mode 100644 index 0000000..5cb26c5 --- /dev/null +++ b/manager_api_new/doc/SectionMapApi.md @@ -0,0 +1,191 @@ +# manager_api_new.api.SectionMapApi + +## Load the API package +```dart +import 'package:manager_api_new/api.dart'; +``` + +All URIs are relative to *https://localhost:5001* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sectionMapCreate**](SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points | +[**sectionMapDelete**](SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} | +[**sectionMapGetAllGeoPointsFromSection**](SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points | +[**sectionMapUpdate**](SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap | + + +# **sectionMapCreate** +> GeoPointDTO sectionMapCreate(sectionId, geoPointDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final sectionId = sectionId_example; // String | +final geoPointDTO = GeoPointDTO(); // GeoPointDTO | + +try { + final result = api_instance.sectionMapCreate(sectionId, geoPointDTO); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapCreate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + **geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| | + +### Return type + +[**GeoPointDTO**](GeoPointDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapDelete** +> String sectionMapDelete(geoPointId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final geoPointId = 56; // int | + +try { + final result = api_instance.sectionMapDelete(geoPointId); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapDelete: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **geoPointId** | **int**| | + +### Return type + +**String** + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapGetAllGeoPointsFromSection** +> List sectionMapGetAllGeoPointsFromSection(sectionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final sectionId = sectionId_example; // String | + +try { + final result = api_instance.sectionMapGetAllGeoPointsFromSection(sectionId); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapGetAllGeoPointsFromSection: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + +### Return type + +[**List**](GeoPointDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionMapUpdate** +> GeoPoint sectionMapUpdate(geoPointDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionMapApi(); +final geoPointDTO = GeoPointDTO(); // GeoPointDTO | + +try { + final result = api_instance.sectionMapUpdate(geoPointDTO); + print(result); +} catch (e) { + print('Exception when calling SectionMapApi->sectionMapUpdate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| | + +### Return type + +[**GeoPoint**](GeoPoint.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/manager_api_new/doc/SectionQuiz.md b/manager_api_new/doc/SectionQuiz.md new file mode 100644 index 0000000..0a9e9f6 --- /dev/null +++ b/manager_api_new/doc/SectionQuiz.md @@ -0,0 +1,37 @@ +# manager_api_new.model.SectionQuiz + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**label** | **String** | | +**title** | [**List**](TranslationDTO.md) | | [default to const []] +**configurationId** | **String** | | +**type** | [**SectionType**](SectionType.md) | | +**isSubSection** | **bool** | | +**instanceId** | **String** | | +**quizQuestions** | [**List**](QuizQuestion.md) | | [default to const []] +**quizBadLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizMediumLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGoodLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**quizGreatLevel** | [**List**](TranslationAndResourceDTO.md) | | [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**order** | **int** | | [optional] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**parentId** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/SectionQuizApi.md b/manager_api_new/doc/SectionQuizApi.md new file mode 100644 index 0000000..6d35ebf --- /dev/null +++ b/manager_api_new/doc/SectionQuizApi.md @@ -0,0 +1,191 @@ +# manager_api_new.api.SectionQuizApi + +## Load the API package +```dart +import 'package:manager_api_new/api.dart'; +``` + +All URIs are relative to *https://localhost:5001* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sectionQuizCreate**](SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions | +[**sectionQuizDelete**](SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} | +[**sectionQuizGetAllQuizQuestionFromSection**](SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions | +[**sectionQuizUpdate**](SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz | + + +# **sectionQuizCreate** +> QuestionDTO sectionQuizCreate(sectionId, questionDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final sectionId = sectionId_example; // String | +final questionDTO = QuestionDTO(); // QuestionDTO | + +try { + final result = api_instance.sectionQuizCreate(sectionId, questionDTO); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizCreate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + **questionDTO** | [**QuestionDTO**](QuestionDTO.md)| | + +### Return type + +[**QuestionDTO**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizDelete** +> String sectionQuizDelete(quizQuestionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final quizQuestionId = 56; // int | + +try { + final result = api_instance.sectionQuizDelete(quizQuestionId); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizDelete: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quizQuestionId** | **int**| | + +### Return type + +**String** + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizGetAllQuizQuestionFromSection** +> List sectionQuizGetAllQuizQuestionFromSection(sectionId) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final sectionId = sectionId_example; // String | + +try { + final result = api_instance.sectionQuizGetAllQuizQuestionFromSection(sectionId); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizGetAllQuizQuestionFromSection: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sectionId** | **String**| | + +### Return type + +[**List**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sectionQuizUpdate** +> QuestionDTO sectionQuizUpdate(questionDTO) + + + +### Example +```dart +import 'package:manager_api_new/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionQuizApi(); +final questionDTO = QuestionDTO(); // QuestionDTO | + +try { + final result = api_instance.sectionQuizUpdate(questionDTO); + print(result); +} catch (e) { + print('Exception when calling SectionQuizApi->sectionQuizUpdate: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **questionDTO** | [**QuestionDTO**](QuestionDTO.md)| | + +### Return type + +[**QuestionDTO**](QuestionDTO.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/manager_api/doc/SectionType.md b/manager_api_new/doc/SectionType.md similarity index 79% rename from manager_api/doc/SectionType.md rename to manager_api_new/doc/SectionType.md index 8374ab6..586ae2d 100644 --- a/manager_api/doc/SectionType.md +++ b/manager_api_new/doc/SectionType.md @@ -1,8 +1,8 @@ -# manager_api.model.SectionType +# manager_api_new.model.SectionType ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/SliderDTO.md b/manager_api_new/doc/SliderDTO.md new file mode 100644 index 0000000..675c4b3 --- /dev/null +++ b/manager_api_new/doc/SliderDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.SliderDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**contents** | [**List**](ContentDTO.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/TokenDTO.md b/manager_api_new/doc/TokenDTO.md similarity index 84% rename from manager_api/doc/TokenDTO.md rename to manager_api_new/doc/TokenDTO.md index 843486c..975c521 100644 --- a/manager_api/doc/TokenDTO.md +++ b/manager_api_new/doc/TokenDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TokenDTO +# manager_api_new.model.TokenDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -15,7 +15,7 @@ Name | Type | Description | Notes **expiresIn** | **int** | | [optional] **expiration** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] -**pinCode** | **int** | | [optional] +**pinCode** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/TranslationAndResourceDTO.md b/manager_api_new/doc/TranslationAndResourceDTO.md similarity index 68% rename from manager_api/doc/TranslationAndResourceDTO.md rename to manager_api_new/doc/TranslationAndResourceDTO.md index 5f6f567..7d6868c 100644 --- a/manager_api/doc/TranslationAndResourceDTO.md +++ b/manager_api_new/doc/TranslationAndResourceDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TranslationAndResourceDTO +# manager_api_new.model.TranslationAndResourceDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -11,8 +11,7 @@ Name | Type | Description | Notes **language** | **String** | | [optional] **value** | **String** | | [optional] **resourceId** | **String** | | [optional] -**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] -**resourceUrl** | **String** | | [optional] +**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/TranslationDTO.md b/manager_api_new/doc/TranslationDTO.md similarity index 82% rename from manager_api/doc/TranslationDTO.md rename to manager_api_new/doc/TranslationDTO.md index 45938ec..c9e67be 100644 --- a/manager_api/doc/TranslationDTO.md +++ b/manager_api_new/doc/TranslationDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.TranslationDTO +# manager_api_new.model.TranslationDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api_new/doc/User.md b/manager_api_new/doc/User.md new file mode 100644 index 0000000..1edb33a --- /dev/null +++ b/manager_api_new/doc/User.md @@ -0,0 +1,22 @@ +# manager_api_new.model.User + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**email** | **String** | | +**password** | **String** | | +**lastName** | **String** | | +**token** | **String** | | +**instanceId** | **String** | | +**firstName** | **String** | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/doc/UserApi.md b/manager_api_new/doc/UserApi.md similarity index 85% rename from manager_api/doc/UserApi.md rename to manager_api_new/doc/UserApi.md index 644770e..c46e856 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api_new/doc/UserApi.md @@ -1,11 +1,11 @@ -# manager_api.api.UserApi +# manager_api_new.api.UserApi ## Load the API package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *https://api.myinfomate.be* +All URIs are relative to *https://localhost:5001* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -17,21 +17,21 @@ Method | HTTP request | Description # **userCreateUser** -> UserDetailDTO userCreateUser(user) +> UserDetailDTO userCreateUser(userDetailDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final user = User(); // User | +final userDetailDTO = UserDetailDTO(); // UserDetailDTO | try { - final result = api_instance.userCreateUser(user); + final result = api_instance.userCreateUser(userDetailDTO); print(result); } catch (e) { print('Exception when calling UserApi->userCreateUser: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| | + **userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| | ### Return type @@ -66,7 +66,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -109,7 +109,7 @@ Name | Type | Description | Notes ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -148,7 +148,7 @@ This endpoint does not need any parameter. ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -185,21 +185,21 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **userUpdateUser** -> UserDetailDTO userUpdateUser(user) +> UserDetailDTO userUpdateUser(userDetailDTO) ### Example ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = UserApi(); -final user = User(); // User | +final userDetailDTO = UserDetailDTO(); // UserDetailDTO | try { - final result = api_instance.userUpdateUser(user); + final result = api_instance.userUpdateUser(userDetailDTO); print(result); } catch (e) { print('Exception when calling UserApi->userUpdateUser: $e\n'); @@ -210,7 +210,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| | + **userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| | ### Return type diff --git a/manager_api/doc/UserDetailDTO.md b/manager_api_new/doc/UserDetailDTO.md similarity index 79% rename from manager_api/doc/UserDetailDTO.md rename to manager_api_new/doc/UserDetailDTO.md index 27a3126..5c4a0ea 100644 --- a/manager_api/doc/UserDetailDTO.md +++ b/manager_api_new/doc/UserDetailDTO.md @@ -1,8 +1,8 @@ -# manager_api.model.UserDetailDTO +# manager_api_new.model.UserDetailDTO ## Load the model package ```dart -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties @@ -12,6 +12,7 @@ Name | Type | Description | Notes **email** | **String** | | [optional] **firstName** | **String** | | [optional] **lastName** | **String** | | [optional] +**instanceId** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api_new/doc/VideoDTO.md b/manager_api_new/doc/VideoDTO.md new file mode 100644 index 0000000..511ab32 --- /dev/null +++ b/manager_api_new/doc/VideoDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.VideoDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**source_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/WeatherDTO.md b/manager_api_new/doc/WeatherDTO.md new file mode 100644 index 0000000..b6d019f --- /dev/null +++ b/manager_api_new/doc/WeatherDTO.md @@ -0,0 +1,35 @@ +# manager_api_new.model.WeatherDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**city** | **String** | | [optional] +**updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**result** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api_new/doc/WebDTO.md b/manager_api_new/doc/WebDTO.md new file mode 100644 index 0000000..3e585b6 --- /dev/null +++ b/manager_api_new/doc/WebDTO.md @@ -0,0 +1,33 @@ +# manager_api_new.model.WebDTO + +## Load the model package +```dart +import 'package:manager_api_new/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**label** | **String** | | [optional] +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**imageId** | **String** | | [optional] +**imageSource** | **String** | | [optional] +**configurationId** | **String** | | [optional] +**isSubSection** | **bool** | | [optional] +**parentId** | **String** | | [optional] +**type** | [**SectionType**](SectionType.md) | | [optional] +**dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**order** | **int** | | [optional] +**instanceId** | **String** | | [optional] +**latitude** | **String** | | [optional] +**longitude** | **String** | | [optional] +**meterZoneGPS** | **int** | | [optional] +**isBeacon** | **bool** | | [optional] +**beaconId** | **int** | | [optional] +**source_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/manager_api/git_push.sh b/manager_api_new/git_push.sh similarity index 100% rename from manager_api/git_push.sh rename to manager_api_new/git_push.sh diff --git a/manager_api/lib/api.dart b/manager_api_new/lib/api.dart similarity index 65% rename from manager_api/lib/api.dart rename to manager_api_new/lib/api.dart index 8e2d73c..142059a 100644 --- a/manager_api/lib/api.dart +++ b/manager_api_new/lib/api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -14,11 +14,10 @@ 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'; -import 'package:http/http.dart' as http; -import 'package:http/io_client.dart'; part 'api_client.dart'; part 'api_helper.dart'; @@ -35,45 +34,53 @@ part 'api/device_api.dart'; part 'api/instance_api.dart'; part 'api/resource_api.dart'; part 'api/section_api.dart'; +part 'api/section_map_api.dart'; +part 'api/section_quiz_api.dart'; part 'api/user_api.dart'; part 'model/agenda_dto.dart'; +part 'model/agenda_dto_all_of_agenda_map_provider.dart'; part 'model/article_dto.dart'; part 'model/categorie_dto.dart'; part 'model/configuration_dto.dart'; part 'model/content_dto.dart'; -part 'model/content_geo_point.dart'; +part 'model/content_dto_resource.dart'; part 'model/device_dto.dart'; part 'model/device_detail_dto.dart'; -part 'model/device_detail_dto_all_of.dart'; part 'model/export_configuration_dto.dart'; -part 'model/export_configuration_dto_all_of.dart'; +part 'model/geo_point.dart'; part 'model/geo_point_dto.dart'; -part 'model/geo_point_dto_categorie.dart'; +part 'model/geo_point_section_map.dart'; part 'model/instance.dart'; part 'model/instance_dto.dart'; -part 'model/level_dto.dart'; part 'model/login_dto.dart'; part 'model/map_dto.dart'; -part 'model/map_dto_map_provider.dart'; -part 'model/map_dto_map_type.dart'; -part 'model/map_dto_map_type_mapbox.dart'; +part 'model/map_dto_all_of_map_provider.dart'; +part 'model/map_dto_all_of_map_type.dart'; +part 'model/map_dto_all_of_map_type_mapbox.dart'; part 'model/map_provider.dart'; part 'model/map_type_app.dart'; part 'model/map_type_map_box.dart'; part 'model/menu_dto.dart'; -part 'model/pdf_file_dto.dart'; +part 'model/ordered_translation_and_resource_dto.dart'; part 'model/pdf_dto.dart'; part 'model/player_message_dto.dart'; part 'model/puzzle_dto.dart'; -part 'model/puzzle_dto_image.dart'; +part 'model/puzzle_dto_all_of_puzzle_image.dart'; part 'model/question_dto.dart'; -part 'model/quizz_dto.dart'; -part 'model/quizz_dto_bad_level.dart'; +part 'model/question_dto_image_background_resource_type.dart'; +part 'model/quiz_dto.dart'; +part 'model/resource.dart'; part 'model/resource_dto.dart'; part 'model/resource_type.dart'; part 'model/response_dto.dart'; +part 'model/section.dart'; part 'model/section_dto.dart'; +part 'model/section_map.dart'; +part 'model/section_map_all_of_map_map_provider.dart'; +part 'model/section_map_all_of_map_map_type.dart'; +part 'model/section_map_all_of_map_resource.dart'; +part 'model/section_map_all_of_map_type_mapbox.dart'; part 'model/section_type.dart'; part 'model/slider_dto.dart'; part 'model/token_dto.dart'; @@ -85,12 +92,17 @@ part 'model/video_dto.dart'; part 'model/weather_dto.dart'; part 'model/web_dto.dart'; +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); -ApiClient defaultApiClient = ApiClient(); +bool _isEpochMarker(String? pattern) => + pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/manager_api/lib/api/authentication_api.dart b/manager_api_new/lib/api/authentication_api.dart similarity index 76% rename from manager_api/lib/api/authentication_api.dart rename to manager_api_new/lib/api/authentication_api.dart index e8647e9..c136358 100644 --- a/manager_api/lib/api/authentication_api.dart +++ b/manager_api_new/lib/api/authentication_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class AuthenticationApi { - AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + AuthenticationApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -28,7 +28,13 @@ class AuthenticationApi { /// * [String] clientId: /// /// * [String] clientSecret: - Future authenticationAuthenticateWithFormWithHttpInfo({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async { + Future authenticationAuthenticateWithFormWithHttpInfo({ + String? grantType, + String? username, + String? password, + String? clientId, + String? clientSecret, + }) async { // ignore: prefer_const_declarations final path = r'/api/Authentication/Token'; @@ -89,17 +95,32 @@ class AuthenticationApi { /// * [String] clientId: /// /// * [String] clientSecret: - Future authenticationAuthenticateWithForm({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async { - final response = await authenticationAuthenticateWithFormWithHttpInfo( grantType: grantType, username: username, password: password, clientId: clientId, clientSecret: clientSecret, ); + Future authenticationAuthenticateWithForm({ + String? grantType, + String? username, + String? password, + String? clientId, + String? clientSecret, + }) async { + final response = await authenticationAuthenticateWithFormWithHttpInfo( + grantType: grantType, + username: username, + password: password, + clientId: clientId, + clientSecret: clientSecret, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'TokenDTO', + ) as TokenDTO; } return null; } @@ -108,7 +129,9 @@ class AuthenticationApi { /// Parameters: /// /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO,) async { + Future authenticationAuthenticateWithJsonWithHttpInfo( + LoginDTO loginDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Authentication/Authenticate'; @@ -121,7 +144,6 @@ class AuthenticationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -136,17 +158,24 @@ class AuthenticationApi { /// Parameters: /// /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJson(LoginDTO loginDTO,) async { - final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO,); + Future authenticationAuthenticateWithJson( + LoginDTO loginDTO, + ) async { + final response = await authenticationAuthenticateWithJsonWithHttpInfo( + loginDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'TokenDTO', + ) as TokenDTO; } return null; } diff --git a/manager_api/lib/api/configuration_api.dart b/manager_api_new/lib/api/configuration_api.dart similarity index 71% rename from manager_api/lib/api/configuration_api.dart rename to manager_api_new/lib/api/configuration_api.dart index 5eb92d2..ca73489 100644 --- a/manager_api/lib/api/configuration_api.dart +++ b/manager_api_new/lib/api/configuration_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class ConfigurationApi { - ConfigurationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + ConfigurationApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + Future configurationCreateWithHttpInfo( + ConfigurationDTO configurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -33,7 +35,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreate(ConfigurationDTO configurationDTO,) async { - final response = await configurationCreateWithHttpInfo(configurationDTO,); + Future configurationCreate( + ConfigurationDTO configurationDTO, + ) async { + final response = await configurationCreateWithHttpInfo( + configurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } @@ -67,10 +75,11 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationDeleteWithHttpInfo(String id,) async { + Future configurationDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationDelete(String id,) async { - final response = await configurationDeleteWithHttpInfo(id,); + Future configurationDelete( + String id, + ) async { + final response = await configurationDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -117,10 +132,12 @@ class ConfigurationApi { /// * [String] id (required): /// /// * [String] language: - Future configurationExportWithHttpInfo(String id, { String? language, }) async { + Future configurationExportWithHttpInfo( + String id, { + String? language, + }) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}/export' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}/export'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -135,7 +152,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -152,8 +168,14 @@ class ConfigurationApi { /// * [String] id (required): /// /// * [String] language: - Future configurationExport(String id,) async { - final response = await configurationExportWithHttpInfo(id,); + Future configurationExport( + String id, { + String? language, + }) async { + final response = await configurationExportWithHttpInfo( + id, + language: language, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -162,7 +184,7 @@ class ConfigurationApi { // FormatException when trying to decode an empty string. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ExportConfigurationDTO',) as ExportConfigurationDTO; - + } return Future.value(null); } @@ -171,7 +193,9 @@ class ConfigurationApi { /// Parameters: /// /// * [String] instanceId: - Future configurationGetWithHttpInfo({ String? instanceId, }) async { + Future configurationGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -188,7 +212,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -203,20 +226,25 @@ class ConfigurationApi { /// Parameters: /// /// * [String] instanceId: - Future?> configurationGet({ String? instanceId, }) async { - final response = await configurationGetWithHttpInfo( instanceId: instanceId, ); + Future?> configurationGet({ + String? instanceId, + }) async { + final response = await configurationGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -224,8 +252,10 @@ class ConfigurationApi { /// Performs an HTTP 'GET /api/Configuration/byPin' operation and returns the [Response]. /// Parameters: /// - /// * [int] pinCode: - Future configurationGetConfigurationsByPinCodeWithHttpInfo({ int? pinCode, }) async { + /// * [String] pinCode: + Future configurationGetConfigurationsByPinCodeWithHttpInfo({ + String? pinCode, + }) async { // ignore: prefer_const_declarations final path = r'/api/Configuration/byPin'; @@ -242,7 +272,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -256,21 +285,26 @@ class ConfigurationApi { /// Parameters: /// - /// * [int] pinCode: - Future?> configurationGetConfigurationsByPinCode({ int? pinCode, }) async { - final response = await configurationGetConfigurationsByPinCodeWithHttpInfo( pinCode: pinCode, ); + /// * [String] pinCode: + Future?> configurationGetConfigurationsByPinCode({ + String? pinCode, + }) async { + final response = await configurationGetConfigurationsByPinCodeWithHttpInfo( + pinCode: pinCode, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -279,10 +313,11 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationGetDetailWithHttpInfo(String id,) async { + Future configurationGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -293,7 +328,6 @@ class ConfigurationApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -308,17 +342,24 @@ class ConfigurationApi { /// Parameters: /// /// * [String] id (required): - Future configurationGetDetail(String id,) async { - final response = await configurationGetDetailWithHttpInfo(id,); + Future configurationGetDetail( + String id, + ) async { + final response = await configurationGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } @@ -327,7 +368,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO,) async { + Future configurationImportWithHttpInfo( + ExportConfigurationDTO exportConfigurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration/import'; @@ -340,7 +383,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -355,17 +397,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImport(ExportConfigurationDTO exportConfigurationDTO,) async { - final response = await configurationImportWithHttpInfo(exportConfigurationDTO,); + Future configurationImport( + ExportConfigurationDTO exportConfigurationDTO, + ) async { + final response = await configurationImportWithHttpInfo( + exportConfigurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -374,7 +423,9 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + Future configurationUpdateWithHttpInfo( + ConfigurationDTO configurationDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Configuration'; @@ -387,7 +438,6 @@ class ConfigurationApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -402,17 +452,24 @@ class ConfigurationApi { /// Parameters: /// /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdate(ConfigurationDTO configurationDTO,) async { - final response = await configurationUpdateWithHttpInfo(configurationDTO,); + Future configurationUpdate( + ConfigurationDTO configurationDTO, + ) async { + final response = await configurationUpdateWithHttpInfo( + configurationDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ConfigurationDTO', + ) as ConfigurationDTO; } return null; } diff --git a/manager_api/lib/api/device_api.dart b/manager_api_new/lib/api/device_api.dart similarity index 71% rename from manager_api/lib/api/device_api.dart rename to manager_api_new/lib/api/device_api.dart index 7bb84ed..8d6b451 100644 --- a/manager_api/lib/api/device_api.dart +++ b/manager_api_new/lib/api/device_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,6 @@ part of openapi.api; - class DeviceApi { DeviceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; @@ -20,7 +19,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + Future deviceCreateWithHttpInfo( + DeviceDetailDTO deviceDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -33,7 +34,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +48,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreate(DeviceDetailDTO deviceDetailDTO,) async { - final response = await deviceCreateWithHttpInfo(deviceDetailDTO,); + Future deviceCreate( + DeviceDetailDTO deviceDetailDTO, + ) async { + final response = await deviceCreateWithHttpInfo( + deviceDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -67,10 +74,11 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceDeleteWithHttpInfo(String id,) async { + Future deviceDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Device/{id}' - .replaceAll('{id}', id); + final path = r'/api/Device/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +89,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +103,24 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceDelete(String id,) async { - final response = await deviceDeleteWithHttpInfo(id,); + Future deviceDelete( + String id, + ) async { + final response = await deviceDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -115,7 +129,9 @@ class DeviceApi { /// Parameters: /// /// * [String] instanceId: - Future deviceGetWithHttpInfo({ String? instanceId, }) async { + Future deviceGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -132,7 +148,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -147,20 +162,25 @@ class DeviceApi { /// Parameters: /// /// * [String] instanceId: - Future?> deviceGet({ String? instanceId, }) async { - final response = await deviceGetWithHttpInfo( instanceId: instanceId, ); + Future?> deviceGet({ + String? instanceId, + }) async { + final response = await deviceGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -169,10 +189,11 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceGetDetailWithHttpInfo(String id,) async { + Future deviceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Device/{id}/detail' - .replaceAll('{id}', id); + final path = r'/api/Device/{id}/detail'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -183,7 +204,6 @@ class DeviceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -198,17 +218,24 @@ class DeviceApi { /// Parameters: /// /// * [String] id (required): - Future deviceGetDetail(String id,) async { - final response = await deviceGetDetailWithHttpInfo(id,); + Future deviceGetDetail( + String id, + ) async { + final response = await deviceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -217,7 +244,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + Future deviceUpdateWithHttpInfo( + DeviceDetailDTO deviceDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device'; @@ -230,7 +259,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -245,17 +273,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdate(DeviceDetailDTO deviceDetailDTO,) async { - final response = await deviceUpdateWithHttpInfo(deviceDetailDTO,); + Future deviceUpdate( + DeviceDetailDTO deviceDetailDTO, + ) async { + final response = await deviceUpdateWithHttpInfo( + deviceDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDetailDTO', + ) as DeviceDetailDTO; } return null; } @@ -264,7 +299,9 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO,) async { + Future deviceUpdateMainInfosWithHttpInfo( + DeviceDTO deviceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Device/mainInfos'; @@ -277,7 +314,6 @@ class DeviceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -292,17 +328,24 @@ class DeviceApi { /// Parameters: /// /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfos(DeviceDTO deviceDTO,) async { - final response = await deviceUpdateMainInfosWithHttpInfo(deviceDTO,); + Future deviceUpdateMainInfos( + DeviceDTO deviceDTO, + ) async { + final response = await deviceUpdateMainInfosWithHttpInfo( + deviceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDTO',) as DeviceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'DeviceDTO', + ) as DeviceDTO; } return null; } diff --git a/manager_api/lib/api/instance_api.dart b/manager_api_new/lib/api/instance_api.dart similarity index 69% rename from manager_api/lib/api/instance_api.dart rename to manager_api_new/lib/api/instance_api.dart index 2e120d1..45b2163 100644 --- a/manager_api/lib/api/instance_api.dart +++ b/manager_api_new/lib/api/instance_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,22 +10,24 @@ part of openapi.api; - class InstanceApi { - InstanceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + InstanceApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; /// Performs an HTTP 'POST /api/Instance' operation and returns the [Response]. /// Parameters: /// - /// * [Instance] instance (required): - Future instanceCreateInstanceWithHttpInfo(Instance instance,) async { + /// * [InstanceDTO] instanceDTO (required): + Future instanceCreateInstanceWithHttpInfo( + InstanceDTO instanceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Instance'; // ignore: prefer_final_locals - Object? postBody = instance; + Object? postBody = instanceDTO; final queryParams = []; final headerParams = {}; @@ -33,7 +35,6 @@ class InstanceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -47,18 +48,25 @@ class InstanceApi { /// Parameters: /// - /// * [Instance] instance (required): - Future instanceCreateInstance(Instance instance,) async { - final response = await instanceCreateInstanceWithHttpInfo(instance,); + /// * [InstanceDTO] instanceDTO (required): + Future instanceCreateInstance( + InstanceDTO instanceDTO, + ) async { + final response = await instanceCreateInstanceWithHttpInfo( + instanceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -67,10 +75,11 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceDeleteInstanceWithHttpInfo(String id,) async { + Future instanceDeleteInstanceWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Instance/{id}' - .replaceAll('{id}', id); + final path = r'/api/Instance/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceDeleteInstance(String id,) async { - final response = await instanceDeleteInstanceWithHttpInfo(id,); + Future instanceDeleteInstance( + String id, + ) async { + final response = await instanceDeleteInstanceWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -125,7 +140,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -145,12 +159,13 @@ class InstanceApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -159,10 +174,11 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceGetDetailWithHttpInfo(String id,) async { + Future instanceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Instance/{id}' - .replaceAll('{id}', id); + final path = r'/api/Instance/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -173,7 +189,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -188,17 +203,24 @@ class InstanceApi { /// Parameters: /// /// * [String] id (required): - Future instanceGetDetail(String id,) async { - final response = await instanceGetDetailWithHttpInfo(id,); + Future instanceGetDetail( + String id, + ) async { + final response = await instanceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -206,8 +228,10 @@ class InstanceApi { /// Performs an HTTP 'GET /api/Instance/byPin' operation and returns the [Response]. /// Parameters: /// - /// * [int] pinCode: - Future instanceGetInstanceByPinCodeWithHttpInfo({ int? pinCode, }) async { + /// * [String] pinCode: + Future instanceGetInstanceByPinCodeWithHttpInfo({ + String? pinCode, + }) async { // ignore: prefer_const_declarations final path = r'/api/Instance/byPin'; @@ -224,7 +248,6 @@ class InstanceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -238,18 +261,25 @@ class InstanceApi { /// Parameters: /// - /// * [int] pinCode: - Future instanceGetInstanceByPinCode({ int? pinCode, }) async { - final response = await instanceGetInstanceByPinCodeWithHttpInfo( pinCode: pinCode, ); + /// * [String] pinCode: + Future instanceGetInstanceByPinCode({ + String? pinCode, + }) async { + final response = await instanceGetInstanceByPinCodeWithHttpInfo( + pinCode: pinCode, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } @@ -257,13 +287,15 @@ class InstanceApi { /// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response]. /// Parameters: /// - /// * [Instance] instance (required): - Future instanceUpdateinstanceWithHttpInfo(Instance instance,) async { + /// * [InstanceDTO] instanceDTO (required): + Future instanceUpdateinstanceWithHttpInfo( + InstanceDTO instanceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Instance'; // ignore: prefer_final_locals - Object? postBody = instance; + Object? postBody = instanceDTO; final queryParams = []; final headerParams = {}; @@ -271,7 +303,6 @@ class InstanceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -285,18 +316,25 @@ class InstanceApi { /// Parameters: /// - /// * [Instance] instance (required): - Future instanceUpdateinstance(Instance instance,) async { - final response = await instanceUpdateinstanceWithHttpInfo(instance,); + /// * [InstanceDTO] instanceDTO (required): + Future instanceUpdateinstance( + InstanceDTO instanceDTO, + ) async { + final response = await instanceUpdateinstanceWithHttpInfo( + instanceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'InstanceDTO', + ) as InstanceDTO; } return null; } diff --git a/manager_api/lib/api/resource_api.dart b/manager_api_new/lib/api/resource_api.dart similarity index 70% rename from manager_api/lib/api/resource_api.dart rename to manager_api_new/lib/api/resource_api.dart index bb0ea9d..7980569 100644 --- a/manager_api/lib/api/resource_api.dart +++ b/manager_api_new/lib/api/resource_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class ResourceApi { - ResourceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + ResourceApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceCreateWithHttpInfo(ResourceDTO resourceDTO,) async { + Future resourceCreateWithHttpInfo( + ResourceDTO resourceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -33,7 +35,6 @@ class ResourceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceCreate(ResourceDTO resourceDTO,) async { - final response = await resourceCreateWithHttpInfo(resourceDTO,); + Future resourceCreate( + ResourceDTO resourceDTO, + ) async { + final response = await resourceCreateWithHttpInfo( + resourceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -67,10 +75,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceDeleteWithHttpInfo(String id,) async { + Future resourceDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceDelete(String id,) async { - final response = await resourceDeleteWithHttpInfo(id,); + Future resourceDelete( + String id, + ) async { + final response = await resourceDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -117,7 +132,10 @@ class ResourceApi { /// * [String] instanceId: /// /// * [List] types: - Future resourceGetWithHttpInfo({ String? instanceId, List? types, }) async { + Future resourceGetWithHttpInfo({ + String? instanceId, + List? types, + }) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -137,7 +155,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -154,20 +171,27 @@ class ResourceApi { /// * [String] instanceId: /// /// * [List] types: - Future?> resourceGet({ String? instanceId, List? types, }) async { - final response = await resourceGetWithHttpInfo( instanceId: instanceId, types: types, ); + Future?> resourceGet({ + String? instanceId, + List? types, + }) async { + final response = await resourceGetWithHttpInfo( + instanceId: instanceId, + types: types, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); } return null; } @@ -176,10 +200,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceGetDetailWithHttpInfo(String id,) async { + Future resourceGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}/detail' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}/detail'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -190,7 +215,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -205,17 +229,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceGetDetail(String id,) async { - final response = await resourceGetDetailWithHttpInfo(id,); + Future resourceGetDetail( + String id, + ) async { + final response = await resourceGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -224,10 +255,11 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceShowWithHttpInfo(String id,) async { + Future resourceShowWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Resource/{id}' - .replaceAll('{id}', id); + final path = r'/api/Resource/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -238,7 +270,6 @@ class ResourceApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -253,17 +284,24 @@ class ResourceApi { /// Parameters: /// /// * [String] id (required): - Future resourceShow(String id,) async { - final response = await resourceShowWithHttpInfo(id,); + Future resourceShow( + String id, + ) async { + final response = await resourceShowWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'MultipartFile', + ) as MultipartFile; } return null; } @@ -272,7 +310,9 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdateWithHttpInfo(ResourceDTO resourceDTO,) async { + Future resourceUpdateWithHttpInfo( + ResourceDTO resourceDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Resource'; @@ -285,7 +325,6 @@ class ResourceApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -300,17 +339,24 @@ class ResourceApi { /// Parameters: /// /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdate(ResourceDTO resourceDTO,) async { - final response = await resourceUpdateWithHttpInfo(resourceDTO,); + Future resourceUpdate( + ResourceDTO resourceDTO, + ) async { + final response = await resourceUpdateWithHttpInfo( + resourceDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ResourceDTO', + ) as ResourceDTO; } return null; } @@ -323,7 +369,11 @@ class ResourceApi { /// * [String] type: /// /// * [String] instanceId: - Future resourceUploadWithHttpInfo({ String? label, String? type, String? instanceId, }) async { + Future resourceUploadWithHttpInfo({ + String? label, + String? type, + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Resource/upload'; @@ -372,17 +422,28 @@ class ResourceApi { /// * [String] type: /// /// * [String] instanceId: - Future resourceUpload({ String? label, String? type, String? instanceId, }) async { - final response = await resourceUploadWithHttpInfo( label: label, type: type, instanceId: instanceId, ); + Future resourceUpload({ + String? label, + String? type, + String? instanceId, + }) async { + final response = await resourceUploadWithHttpInfo( + label: label, + type: type, + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } diff --git a/manager_api/lib/api/section_api.dart b/manager_api_new/lib/api/section_api.dart similarity index 72% rename from manager_api/lib/api/section_api.dart rename to manager_api_new/lib/api/section_api.dart index 5dfcc5d..61e0a7b 100644 --- a/manager_api/lib/api/section_api.dart +++ b/manager_api_new/lib/api/section_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,9 +10,9 @@ part of openapi.api; - class SectionApi { - SectionApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + SectionApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; @@ -20,7 +20,9 @@ class SectionApi { /// Parameters: /// /// * [SectionDTO] sectionDTO (required): - Future sectionCreateWithHttpInfo(SectionDTO sectionDTO,) async { + Future sectionCreateWithHttpInfo( + SectionDTO sectionDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section'; @@ -33,7 +35,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -48,17 +49,24 @@ class SectionApi { /// Parameters: /// /// * [SectionDTO] sectionDTO (required): - Future sectionCreate(SectionDTO sectionDTO,) async { - final response = await sectionCreateWithHttpInfo(sectionDTO,); + Future sectionCreate( + SectionDTO sectionDTO, + ) async { + final response = await sectionCreateWithHttpInfo( + sectionDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SectionDTO', + ) as SectionDTO; } return null; } @@ -67,10 +75,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteWithHttpInfo(String id,) async { + Future sectionDeleteWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +90,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +104,24 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDelete(String id,) async { - final response = await sectionDeleteWithHttpInfo(id,); + Future sectionDelete( + String id, + ) async { + final response = await sectionDeleteWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -115,10 +130,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteAllForConfigurationWithHttpInfo(String id,) async { + Future sectionDeleteAllForConfigurationWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -129,7 +145,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -144,17 +159,24 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionDeleteAllForConfiguration(String id,) async { - final response = await sectionDeleteAllForConfigurationWithHttpInfo(id,); + Future sectionDeleteAllForConfiguration( + String id, + ) async { + final response = await sectionDeleteAllForConfigurationWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -163,7 +185,9 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId: - Future sectionGetWithHttpInfo({ String? instanceId, }) async { + Future sectionGetWithHttpInfo({ + String? instanceId, + }) async { // ignore: prefer_const_declarations final path = r'/api/Section'; @@ -180,7 +204,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -195,20 +218,25 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId: - Future?> sectionGet({ String? instanceId, }) async { - final response = await sectionGetWithHttpInfo( instanceId: instanceId, ); + Future?> sectionGet({ + String? instanceId, + }) async { + final response = await sectionGetWithHttpInfo( + instanceId: instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -227,7 +255,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -247,9 +274,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AgendaDTO',) as AgendaDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'AgendaDTO', + ) as AgendaDTO; } return null; } @@ -258,10 +288,12 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId (required): - Future sectionGetAllBeaconsForInstanceWithHttpInfo(String instanceId,) async { + Future sectionGetAllBeaconsForInstanceWithHttpInfo( + String instanceId, + ) async { // ignore: prefer_const_declarations final path = r'/api/Section/beacons/{instanceId}' - .replaceAll('{instanceId}', instanceId); + .replaceAll('{instanceId}', instanceId); // ignore: prefer_final_locals Object? postBody; @@ -272,7 +304,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -287,20 +318,25 @@ class SectionApi { /// Parameters: /// /// * [String] instanceId (required): - Future?> sectionGetAllBeaconsForInstance(String instanceId,) async { - final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(instanceId,); + Future?> sectionGetAllBeaconsForInstance( + String instanceId, + ) async { + final response = await sectionGetAllBeaconsForInstanceWithHttpInfo( + instanceId, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -309,10 +345,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetAllSectionSubSectionsWithHttpInfo(String id,) async { + Future sectionGetAllSectionSubSectionsWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}/subsections' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}/subsections'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -323,7 +360,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -338,20 +374,27 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future?> sectionGetAllSectionSubSections(String id,) async { - final response = await sectionGetAllSectionSubSectionsWithHttpInfo(id,); + Future sectionGetAllSectionSubSections( + String id, + ) async { + final response = await sectionGetAllSectionSubSectionsWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + /*final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false);*/ + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; } return null; } @@ -370,7 +413,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -390,9 +432,12 @@ class SectionApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ArticleDTO',) as ArticleDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'ArticleDTO', + ) as ArticleDTO; } return null; } @@ -401,10 +446,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetDetailWithHttpInfo(String id,) async { + Future sectionGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -415,7 +461,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -430,17 +475,27 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetDetail(String id,) async { - final response = await sectionGetDetailWithHttpInfo(id,); + Future sectionGetDetail( + String id, + ) async { + final response = await sectionGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + /*return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'Object', + ) as Object;*/ + + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; // <- Ce sera un Map ou une List selon le JSON } return null; } @@ -449,10 +504,11 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future sectionGetFromConfigurationWithHttpInfo(String id,) async { + Future sectionGetFromConfigurationWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/Section/configuration/{id}' - .replaceAll('{id}', id); + final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -463,7 +519,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -478,20 +533,84 @@ class SectionApi { /// Parameters: /// /// * [String] id (required): - Future?> sectionGetFromConfiguration(String id,) async { - final response = await sectionGetFromConfigurationWithHttpInfo(id,); + Future?> sectionGetFromConfiguration( + String id, + ) async { + final response = await sectionGetFromConfigurationWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); + } + return null; + } + /// Performs an HTTP 'GET /api/Section/configuration/{id}/detail' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetFromConfigurationDetailWithHttpInfo( + String id, + ) async { + // ignore: prefer_const_declarations + final path = + r'/api/Section/configuration/{id}/detail'.replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetFromConfigurationDetail( + String id, + ) async { + final response = await sectionGetFromConfigurationDetailWithHttpInfo( + id, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + /*final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false);*/ + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; } return null; } @@ -510,7 +629,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -530,9 +648,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 +672,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -571,9 +691,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 +715,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -612,9 +734,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 +758,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -653,17 +777,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 +801,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -686,17 +812,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 +844,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -735,9 +863,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 +887,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -776,9 +906,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 +930,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -817,9 +949,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 +973,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -858,9 +992,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 +1016,6 @@ class SectionApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -899,9 +1035,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 +1048,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 +1064,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -937,18 +1077,27 @@ class SectionApi { /// Parameters: /// - /// * [SectionDTO] sectionDTO (required): - Future sectionUpdate(SectionDTO sectionDTO,) async { - final response = await sectionUpdateWithHttpInfo(sectionDTO,); + /// * [Object] body (required): + Future sectionUpdate( + Object body, + ) async { + final response = await sectionUpdateWithHttpInfo( + body, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final decoded = json.decode(await _decodeBodyBytes(response)); + return decoded; + /*return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'SectionDTO', + ) as SectionDTO*/; } return null; } @@ -957,7 +1106,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 +1121,6 @@ class SectionApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -985,17 +1135,24 @@ class SectionApi { /// Parameters: /// /// * [List] sectionDTO (required): - Future sectionUpdateOrder(List sectionDTO,) async { - final response = await sectionUpdateOrderWithHttpInfo(sectionDTO,); + Future sectionUpdateOrder( + List sectionDTO, + ) async { + final response = await sectionUpdateOrderWithHttpInfo( + sectionDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } diff --git a/manager_api_new/lib/api/section_map_api.dart b/manager_api_new/lib/api/section_map_api.dart new file mode 100644 index 0000000..2fd0f88 --- /dev/null +++ b/manager_api_new/lib/api/section_map_api.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapApi { + SectionMapApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/SectionMap/{sectionId}/points' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapCreateWithHttpInfo( + String sectionId, + GeoPointDTO geoPointDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/{sectionId}/points' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody = geoPointDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapCreate( + String sectionId, + GeoPointDTO geoPointDTO, + ) async { + final response = await sectionMapCreateWithHttpInfo( + sectionId, + geoPointDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'GeoPointDTO', + ) as GeoPointDTO; + } + return null; + } + + /// Performs an HTTP 'DELETE /api/SectionMap/points/delete/{geoPointId}' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] geoPointId (required): + Future sectionMapDeleteWithHttpInfo( + int geoPointId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/points/delete/{geoPointId}' + .replaceAll('{geoPointId}', geoPointId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] geoPointId (required): + Future sectionMapDelete( + int geoPointId, + ) async { + final response = await sectionMapDeleteWithHttpInfo( + geoPointId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; + } + return null; + } + + /// Performs an HTTP 'GET /api/SectionMap/{sectionId}/points' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + Future sectionMapGetAllGeoPointsFromSectionWithHttpInfo( + String sectionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap/{sectionId}/points' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + Future?> sectionMapGetAllGeoPointsFromSection( + String sectionId, + ) async { + final response = await sectionMapGetAllGeoPointsFromSectionWithHttpInfo( + sectionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); + } + return null; + } + + /// Performs an HTTP 'PUT /api/SectionMap' operation and returns the [Response]. + /// Parameters: + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapUpdateWithHttpInfo( + GeoPointDTO geoPointDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionMap'; + + // ignore: prefer_final_locals + Object? postBody = geoPointDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [GeoPointDTO] geoPointDTO (required): + Future sectionMapUpdate( + GeoPointDTO geoPointDTO, + ) async { + final response = await sectionMapUpdateWithHttpInfo( + geoPointDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'GeoPoint', + ) as GeoPoint; + } + return null; + } +} diff --git a/manager_api_new/lib/api/section_quiz_api.dart b/manager_api_new/lib/api/section_quiz_api.dart new file mode 100644 index 0000000..4bddda1 --- /dev/null +++ b/manager_api_new/lib/api/section_quiz_api.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionQuizApi { + SectionQuizApi([ApiClient? apiClient]) + : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizCreateWithHttpInfo( + String sectionId, + QuestionDTO questionDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/{sectionId}/questions' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody = questionDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizCreate( + String sectionId, + QuestionDTO questionDTO, + ) async { + final response = await sectionQuizCreateWithHttpInfo( + sectionId, + questionDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'QuestionDTO', + ) as QuestionDTO; + } + return null; + } + + /// Performs an HTTP 'DELETE /api/SectionQuiz/questions/delete/{quizQuestionId}' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] quizQuestionId (required): + Future sectionQuizDeleteWithHttpInfo( + int quizQuestionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/questions/delete/{quizQuestionId}' + .replaceAll('{quizQuestionId}', quizQuestionId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] quizQuestionId (required): + Future sectionQuizDelete( + int quizQuestionId, + ) async { + final response = await sectionQuizDeleteWithHttpInfo( + quizQuestionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; + } + return null; + } + + /// Performs an HTTP 'GET /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] sectionId (required): + Future sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo( + String sectionId, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz/{sectionId}/questions' + .replaceAll('{sectionId}', sectionId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] sectionId (required): + Future?> sectionQuizGetAllQuizQuestionFromSection( + String sectionId, + ) async { + final response = await sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo( + sectionId, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync( + responseBody, 'List') as List) + .cast() + .toList(growable: false); + } + return null; + } + + /// Performs an HTTP 'PUT /api/SectionQuiz' operation and returns the [Response]. + /// Parameters: + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizUpdateWithHttpInfo( + QuestionDTO questionDTO, + ) async { + // ignore: prefer_const_declarations + final path = r'/api/SectionQuiz'; + + // ignore: prefer_final_locals + Object? postBody = questionDTO; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [QuestionDTO] questionDTO (required): + Future sectionQuizUpdate( + QuestionDTO questionDTO, + ) async { + final response = await sectionQuizUpdateWithHttpInfo( + questionDTO, + ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'QuestionDTO', + ) as QuestionDTO; + } + return null; + } +} diff --git a/manager_api/lib/api/user_api.dart b/manager_api_new/lib/api/user_api.dart similarity index 70% rename from manager_api/lib/api/user_api.dart rename to manager_api_new/lib/api/user_api.dart index 989b146..786a2da 100644 --- a/manager_api/lib/api/user_api.dart +++ b/manager_api_new/lib/api/user_api.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,6 @@ part of openapi.api; - class UserApi { UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; @@ -19,13 +18,15 @@ class UserApi { /// Performs an HTTP 'POST /api/User' operation and returns the [Response]. /// Parameters: /// - /// * [User] user (required): - Future userCreateUserWithHttpInfo(User user,) async { + /// * [UserDetailDTO] userDetailDTO (required): + Future userCreateUserWithHttpInfo( + UserDetailDTO userDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/User'; // ignore: prefer_final_locals - Object? postBody = user; + Object? postBody = userDetailDTO; final queryParams = []; final headerParams = {}; @@ -33,7 +34,6 @@ class UserApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'POST', @@ -47,18 +47,25 @@ class UserApi { /// Parameters: /// - /// * [User] user (required): - Future userCreateUser(User user,) async { - final response = await userCreateUserWithHttpInfo(user,); + /// * [UserDetailDTO] userDetailDTO (required): + Future userCreateUser( + UserDetailDTO userDetailDTO, + ) async { + final response = await userCreateUserWithHttpInfo( + userDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } @@ -67,10 +74,11 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userDeleteUserWithHttpInfo(String id,) async { + Future userDeleteUserWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/User/{id}' - .replaceAll('{id}', id); + final path = r'/api/User/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -81,7 +89,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'DELETE', @@ -96,17 +103,24 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userDeleteUser(String id,) async { - final response = await userDeleteUserWithHttpInfo(id,); + Future userDeleteUser( + String id, + ) async { + final response = await userDeleteUserWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'String', + ) as String; } return null; } @@ -125,7 +139,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -145,12 +158,13 @@ class UserApi { // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(); - + return (await apiClient.deserializeAsync(responseBody, 'List') + as List) + .cast() + .toList(growable: false); } return null; } @@ -159,10 +173,11 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userGetDetailWithHttpInfo(String id,) async { + Future userGetDetailWithHttpInfo( + String id, + ) async { // ignore: prefer_const_declarations - final path = r'/api/User/{id}' - .replaceAll('{id}', id); + final path = r'/api/User/{id}'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; @@ -173,7 +188,6 @@ class UserApi { const contentTypes = []; - return apiClient.invokeAPI( path, 'GET', @@ -188,17 +202,24 @@ class UserApi { /// Parameters: /// /// * [String] id (required): - Future userGetDetail(String id,) async { - final response = await userGetDetailWithHttpInfo(id,); + Future userGetDetail( + String id, + ) async { + final response = await userGetDetailWithHttpInfo( + id, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } @@ -206,13 +227,15 @@ class UserApi { /// Performs an HTTP 'PUT /api/User' operation and returns the [Response]. /// Parameters: /// - /// * [User] user (required): - Future userUpdateUserWithHttpInfo(User user,) async { + /// * [UserDetailDTO] userDetailDTO (required): + Future userUpdateUserWithHttpInfo( + UserDetailDTO userDetailDTO, + ) async { // ignore: prefer_const_declarations final path = r'/api/User'; // ignore: prefer_final_locals - Object? postBody = user; + Object? postBody = userDetailDTO; final queryParams = []; final headerParams = {}; @@ -220,7 +243,6 @@ class UserApi { const contentTypes = ['application/json']; - return apiClient.invokeAPI( path, 'PUT', @@ -234,18 +256,25 @@ class UserApi { /// Parameters: /// - /// * [User] user (required): - Future userUpdateUser(User user,) async { - final response = await userUpdateUserWithHttpInfo(user,); + /// * [UserDetailDTO] userDetailDTO (required): + Future userUpdateUser( + UserDetailDTO userDetailDTO, + ) async { + final response = await userUpdateUserWithHttpInfo( + userDetailDTO, + ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } // When a remote server returns no body with a status of 204, we shall not decode it. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO; - + if (response.body.isNotEmpty && + response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync( + await _decodeBodyBytes(response), + 'UserDetailDTO', + ) as UserDetailDTO; } return null; } diff --git a/manager_api/lib/api_client.dart b/manager_api_new/lib/api_client.dart similarity index 57% rename from manager_api/lib/api_client.dart rename to manager_api_new/lib/api_client.dart index 4634079..a1dca31 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api_new/lib/api_client.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -11,51 +11,31 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'https://api.myinfomate.be', this.authentication,}) { - _client = createIOClient(); - } + ApiClient({ + this.basePath = 'https://localhost:5001', + this.authentication, + }); final String basePath; final Authentication? authentication; - late http.Client _client; + var _client = Client(); final _defaultHeaderMap = {}; /// Returns the current HTTP [Client] instance to use in this class. /// /// The return value is guaranteed to never be null. - http.Client get client => _client; + Client get client => _client; /// Requests to use a new HTTP [Client] in this class. - set client(http.Client newClient) { + set client(Client newClient) { _client = newClient; } Map get defaultHeaderMap => _defaultHeaderMap; void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; - } - - HttpClient createHttpClient() { - SecurityContext context = SecurityContext.defaultContext; - - try { - // Assumes that the certificate is in PEM format and located in the assets - context.setTrustedCertificates('/storage/emulated/0/Download/isrgrootx1.pem'); // Hardcoded for MDLF - } on TlsException catch (e) { - print('Error loading certificate: $e'); - } on Exception catch (error) { - print('I guess not found, but nevermind for other than MDLF'); - } - - return HttpClient(context: context); - //..badCertificateCallback = (X509Certificate cert, String host, int port) => true; - } - - IOClient createIOClient() { - HttpClient httpClient = createHttpClient(); - return IOClient(httpClient); + _defaultHeaderMap[key] = value; } // We don't use a Map for queryParams. @@ -77,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); } @@ -111,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( @@ -166,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': @@ -206,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': @@ -214,38 +241,34 @@ class ApiClient { return ConfigurationDTO.fromJson(value); case 'ContentDTO': return ContentDTO.fromJson(value); - case 'ContentGeoPoint': - return ContentGeoPoint.fromJson(value); + case 'ContentDTOResource': + return ContentDTOResource.fromJson(value); case 'DeviceDTO': return DeviceDTO.fromJson(value); case 'DeviceDetailDTO': return DeviceDetailDTO.fromJson(value); - case 'DeviceDetailDTOAllOf': - return DeviceDetailDTOAllOf.fromJson(value); case 'ExportConfigurationDTO': return ExportConfigurationDTO.fromJson(value); - case 'ExportConfigurationDTOAllOf': - return ExportConfigurationDTOAllOf.fromJson(value); + case 'GeoPoint': + return GeoPoint.fromJson(value); case 'GeoPointDTO': return GeoPointDTO.fromJson(value); - case 'GeoPointDTOCategorie': - return GeoPointDTOCategorie.fromJson(value); + case 'GeoPointSectionMap': + return GeoPointSectionMap.fromJson(value); case 'Instance': return Instance.fromJson(value); case 'InstanceDTO': return InstanceDTO.fromJson(value); - case 'LevelDTO': - return LevelDTO.fromJson(value); case 'LoginDTO': return LoginDTO.fromJson(value); case 'MapDTO': return MapDTO.fromJson(value); - case 'MapDTOMapProvider': - return MapDTOMapProvider.fromJson(value); - case 'MapDTOMapType': - return MapDTOMapType.fromJson(value); - case 'MapDTOMapTypeMapbox': - return MapDTOMapTypeMapbox.fromJson(value); + case 'MapDTOAllOfMapProvider': + return MapDTOAllOfMapProvider.fromJson(value); + case 'MapDTOAllOfMapType': + return MapDTOAllOfMapType.fromJson(value); + case 'MapDTOAllOfMapTypeMapbox': + return MapDTOAllOfMapTypeMapbox.fromJson(value); case 'MapProvider': return MapProviderTypeTransformer().decode(value); case 'MapTypeApp': @@ -254,30 +277,44 @@ class ApiClient { return MapTypeMapBoxTypeTransformer().decode(value); case 'MenuDTO': return MenuDTO.fromJson(value); - case 'PDFFileDTO': - return PDFFileDTO.fromJson(value); + case 'OrderedTranslationAndResourceDTO': + return OrderedTranslationAndResourceDTO.fromJson(value); case 'PdfDTO': return PdfDTO.fromJson(value); case 'PlayerMessageDTO': return PlayerMessageDTO.fromJson(value); case 'PuzzleDTO': return PuzzleDTO.fromJson(value); - case 'PuzzleDTOImage': - return PuzzleDTOImage.fromJson(value); + case 'PuzzleDTOAllOfPuzzleImage': + return PuzzleDTOAllOfPuzzleImage.fromJson(value); case 'QuestionDTO': return QuestionDTO.fromJson(value); - case 'QuizzDTO': - return QuizzDTO.fromJson(value); - case 'QuizzDTOBadLevel': - return QuizzDTOBadLevel.fromJson(value); + case 'QuestionDTOImageBackgroundResourceType': + return QuestionDTOImageBackgroundResourceType.fromJson(value); + case 'QuizDTO': + return QuizDTO.fromJson(value); + case 'Resource': + return Resource.fromJson(value); case 'ResourceDTO': return ResourceDTO.fromJson(value); case 'ResourceType': return ResourceTypeTypeTransformer().decode(value); case 'ResponseDTO': return ResponseDTO.fromJson(value); + case 'Section': + return Section.fromJson(value); case 'SectionDTO': return SectionDTO.fromJson(value); + case 'SectionMap': + return SectionMap.fromJson(value); + case 'SectionMapAllOfMapMapProvider': + return SectionMapAllOfMapMapProvider.fromJson(value); + case 'SectionMapAllOfMapMapType': + return SectionMapAllOfMapMapType.fromJson(value); + case 'SectionMapAllOfMapResource': + return SectionMapAllOfMapResource.fromJson(value); + case 'SectionMapAllOfMapTypeMapbox': + return SectionMapAllOfMapTypeMapbox.fromJson(value); case 'SectionType': return SectionTypeTypeTransformer().decode(value); case 'SliderDTO': @@ -300,27 +337,50 @@ class ApiClient { return WebDTO.fromJson(value); default: dynamic match; - if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { + if (value is List && + (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, match, growable: growable,)) - .toList(growable: growable); + .map((dynamic v) => fromJson( + v, + match, + growable: growable, + )) + .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { + if (value is Set && + (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((dynamic v) => _deserialize(v, match, growable: growable,)) - .toSet(); + .map((dynamic v) => fromJson( + v, + match, + growable: growable, + )) + .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { + if (value is Map && + (match = _regMap.firstMatch(targetType)?.group(1)) != null) { return Map.fromIterables( value.keys.cast(), - value.values.map((dynamic v) => _deserialize(v, match, growable: growable,)), + value.values.map((dynamic v) => fromJson( + v, + match, + growable: growable, + )), ); } } } on Exception catch (error, trace) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); + throw ApiException.withInner( + HttpStatus.internalServerError, + 'Exception during deserialization.', + error, + trace, + ); } - throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); + throw ApiException( + HttpStatus.internalServerError, + 'Could not find a suitable class for deserialization', + ); } } @@ -342,6 +402,15 @@ class DeserializationMessage { final bool growable; } +/// Primarily intended for use in an isolate. +Future decodeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' ? message.json : json.decode(message.json); +} + /// Primarily intended for use in an isolate. Future deserializeAsync(DeserializationMessage message) async { // Remove all spaces. Necessary for regular expressions as well. @@ -349,13 +418,14 @@ Future deserializeAsync(DeserializationMessage message) async { // If the expected target type is String, nothing to do... return targetType == 'String' - ? message.json - : ApiClient._deserialize( - jsonDecode(message.json), - targetType, - growable: message.growable, - ); + ? message.json + : ApiClient.fromJson( + json.decode(message.json), + targetType, + growable: message.growable, + ); } /// Primarily intended for use in an isolate. -Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); +Future serializeAsync(Object? value) async => + value == null ? '' : json.encode(value); diff --git a/manager_api/lib/api_exception.dart b/manager_api_new/lib/api_exception.dart similarity index 86% rename from manager_api/lib/api_exception.dart rename to manager_api_new/lib/api_exception.dart index 796f7f7..d20b872 100644 --- a/manager_api/lib/api_exception.dart +++ b/manager_api_new/lib/api_exception.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,7 +13,8 @@ part of openapi.api; class ApiException implements Exception { ApiException(this.code, this.message); - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + ApiException.withInner( + this.code, this.message, this.innerException, this.stackTrace); int code = 0; String? message; diff --git a/manager_api/lib/api_helper.dart b/manager_api_new/lib/api_helper.dart similarity index 81% rename from manager_api/lib/api_helper.dart rename to manager_api_new/lib/api_helper.dart index d13d9d7..5a0d454 100644 --- a/manager_api/lib/api_helper.dart +++ b/manager_api_new/lib/api_helper.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,11 +17,16 @@ class QueryParam { final String value; @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; + String toString() => + '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; } // Ported from the Java version. -Iterable _queryParams(String collectionFormat, String name, dynamic value,) { +Iterable _queryParams( + String collectionFormat, + String name, + dynamic value, +) { // Assertions to run in debug mode only. assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); @@ -29,7 +34,9 @@ Iterable _queryParams(String collectionFormat, String name, dynamic if (value is List) { if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + return value.map( + (dynamic v) => QueryParam(name, parameterToString(v)), + ); } // Default collection format is 'csv'. @@ -39,7 +46,10 @@ Iterable _queryParams(String collectionFormat, String name, dynamic final delimiter = _delimiters[collectionFormat] ?? ','; - params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + params.add(QueryParam( + name, + value.map(parameterToString).join(delimiter), + )); } else if (value != null) { params.add(QueryParam(name, parameterToString(value))); } @@ -77,9 +87,12 @@ String parameterToString(dynamic value) { /// content type. Otherwise, returns the decoded body as decoded by dart:http package. Future _decodeBodyBytes(Response response) async { final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) - : response.body; + return contentType != null && + contentType.toLowerCase().startsWith('application/json') + ? response.bodyBytes.isEmpty + ? '' + : utf8.decode(response.bodyBytes) + : response.body; } /// Returns a valid [T] value found at the specified Map [key], null otherwise. @@ -102,7 +115,7 @@ DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { if (value is int) { millis = value; } else if (value is String) { - if (pattern == _dateEpochMarker) { + if (_isEpochMarker(pattern)) { millis = int.tryParse(value); } else { return DateTime.tryParse(value); diff --git a/manager_api/lib/auth/api_key_auth.dart b/manager_api_new/lib/auth/api_key_auth.dart similarity index 88% rename from manager_api/lib/auth/api_key_auth.dart rename to manager_api_new/lib/auth/api_key_auth.dart index 84dc295..00105ec 100644 --- a/manager_api/lib/auth/api_key_auth.dart +++ b/manager_api_new/lib/auth/api_key_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -20,7 +20,10 @@ class ApiKeyAuth implements Authentication { String apiKey = ''; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; if (paramValue.isNotEmpty) { diff --git a/manager_api/lib/auth/authentication.dart b/manager_api_new/lib/auth/authentication.dart similarity index 77% rename from manager_api/lib/auth/authentication.dart rename to manager_api_new/lib/auth/authentication.dart index 1b1b8ae..3d8cb17 100644 --- a/manager_api/lib/auth/authentication.dart +++ b/manager_api_new/lib/auth/authentication.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,5 +13,6 @@ part of openapi.api; // ignore: one_member_abstracts abstract class Authentication { /// Apply authentication settings to header and query params. - Future applyToParams(List queryParams, Map headerParams); + Future applyToParams( + List queryParams, Map headerParams); } diff --git a/manager_api/lib/auth/http_basic_auth.dart b/manager_api_new/lib/auth/http_basic_auth.dart similarity index 70% rename from manager_api/lib/auth/http_basic_auth.dart rename to manager_api_new/lib/auth/http_basic_auth.dart index dfedaa5..cf02eb3 100644 --- a/manager_api/lib/auth/http_basic_auth.dart +++ b/manager_api_new/lib/auth/http_basic_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,10 +17,14 @@ class HttpBasicAuth implements Authentication { String password; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (username.isNotEmpty && password.isNotEmpty) { final credentials = '$username:$password'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + headerParams['Authorization'] = + 'Basic ${base64.encode(utf8.encode(credentials))}'; } } } diff --git a/manager_api/lib/auth/http_bearer_auth.dart b/manager_api_new/lib/auth/http_bearer_auth.dart similarity index 81% rename from manager_api/lib/auth/http_bearer_auth.dart rename to manager_api_new/lib/auth/http_bearer_auth.dart index eddf3a5..61b6a23 100644 --- a/manager_api/lib/auth/http_bearer_auth.dart +++ b/manager_api_new/lib/auth/http_bearer_auth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -21,13 +21,17 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('accessToken value must be either a String or a String Function().'); + throw ArgumentError( + 'accessToken value must be either a String or a String Function().'); } _accessToken = accessToken; } @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (_accessToken == null) { return; } diff --git a/manager_api/lib/auth/oauth.dart b/manager_api_new/lib/auth/oauth.dart similarity index 79% rename from manager_api/lib/auth/oauth.dart rename to manager_api_new/lib/auth/oauth.dart index e9e7d78..c7de2bf 100644 --- a/manager_api/lib/auth/oauth.dart +++ b/manager_api_new/lib/auth/oauth.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,7 +16,10 @@ class OAuth implements Authentication { String accessToken; @override - Future applyToParams(List queryParams, Map headerParams,) async { + Future applyToParams( + List queryParams, + Map headerParams, + ) async { if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/manager_api_new/lib/model/agenda_dto.dart b/manager_api_new/lib/model/agenda_dto.dart new file mode 100644 index 0000000..c59c63d --- /dev/null +++ b/manager_api_new/lib/model/agenda_dto.dart @@ -0,0 +1,357 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AgendaDTO { + /// Returns a new [AgendaDTO] instance. + AgendaDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.resourceIds = const [], + this.agendaMapProvider, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? resourceIds; + + MapProvider? agendaMapProvider; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AgendaDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.resourceIds, resourceIds) && + other.agendaMapProvider == agendaMapProvider; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (resourceIds == null ? 0 : resourceIds!.hashCode) + + (agendaMapProvider == null ? 0 : agendaMapProvider!.hashCode); + + @override + String toString() => + 'AgendaDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, resourceIds=$resourceIds, agendaMapProvider=$agendaMapProvider]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.resourceIds != null) { + json[r'resourceIds'] = this.resourceIds; + } else { + json[r'resourceIds'] = null; + } + if (this.agendaMapProvider != null) { + json[r'agendaMapProvider'] = this.agendaMapProvider; + } else { + json[r'agendaMapProvider'] = null; + } + return json; + } + + /// Returns a new [AgendaDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AgendaDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "AgendaDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "AgendaDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AgendaDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']), + agendaMapProvider: MapProvider.fromJson(json[r'agendaMapProvider']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AgendaDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AgendaDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AgendaDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AgendaDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart b/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart new file mode 100644 index 0000000..d2d6aa0 --- /dev/null +++ b/manager_api_new/lib/model/agenda_dto_all_of_agenda_map_provider.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AgendaDTOAllOfAgendaMapProvider { + /// Returns a new [AgendaDTOAllOfAgendaMapProvider] instance. + AgendaDTOAllOfAgendaMapProvider(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is AgendaDTOAllOfAgendaMapProvider && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'AgendaDTOAllOfAgendaMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [AgendaDTOAllOfAgendaMapProvider] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AgendaDTOAllOfAgendaMapProvider? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AgendaDTOAllOfAgendaMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AgendaDTOAllOfAgendaMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AgendaDTOAllOfAgendaMapProvider( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AgendaDTOAllOfAgendaMapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AgendaDTOAllOfAgendaMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AgendaDTOAllOfAgendaMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AgendaDTOAllOfAgendaMapProvider.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/article_dto.dart b/manager_api_new/lib/model/article_dto.dart new file mode 100644 index 0000000..67ac908 --- /dev/null +++ b/manager_api_new/lib/model/article_dto.dart @@ -0,0 +1,402 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ArticleDTO { + /// Returns a new [ArticleDTO] instance. + ArticleDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.content = const [], + this.isContentTop, + this.audioIds = const [], + this.isReadAudioAuto, + this.contents = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? content; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isContentTop; + + List? audioIds; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isReadAudioAuto; + + List? contents; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ArticleDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.content, content) && + other.isContentTop == isContentTop && + _deepEquality.equals(other.audioIds, audioIds) && + other.isReadAudioAuto == isReadAudioAuto && + _deepEquality.equals(other.contents, contents); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (content == null ? 0 : content!.hashCode) + + (isContentTop == null ? 0 : isContentTop!.hashCode) + + (audioIds == null ? 0 : audioIds!.hashCode) + + (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + + (contents == null ? 0 : contents!.hashCode); + + @override + String toString() => + 'ArticleDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.content != null) { + json[r'content'] = this.content; + } else { + json[r'content'] = null; + } + if (this.isContentTop != null) { + json[r'isContentTop'] = this.isContentTop; + } else { + json[r'isContentTop'] = null; + } + if (this.audioIds != null) { + json[r'audioIds'] = this.audioIds; + } else { + json[r'audioIds'] = null; + } + if (this.isReadAudioAuto != null) { + json[r'isReadAudioAuto'] = this.isReadAudioAuto; + } else { + json[r'isReadAudioAuto'] = null; + } + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; + } + return json; + } + + /// Returns a new [ArticleDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ArticleDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "ArticleDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ArticleDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ArticleDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + content: TranslationDTO.listFromJson(json[r'content']), + isContentTop: mapValueOfType(json, r'isContentTop'), + audioIds: TranslationDTO.listFromJson(json[r'audioIds']), + isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), + contents: ContentDTO.listFromJson(json[r'contents']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArticleDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArticleDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ArticleDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ArticleDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/categorie_dto.dart b/manager_api_new/lib/model/categorie_dto.dart similarity index 62% rename from manager_api/lib/model/categorie_dto.dart rename to manager_api_new/lib/model/categorie_dto.dart index 33dc8da..eda272d 100644 --- a/manager_api/lib/model/categorie_dto.dart +++ b/manager_api_new/lib/model/categorie_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,44 +16,48 @@ class CategorieDTO { this.id, this.label = const [], this.icon, - this.iconResourceId, - this.iconUrl, + this.resourceDTO, this.order, }); + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// int? id; List? label; String? icon; - String? iconResourceId; - - String? iconUrl; + ResourceDTO? resourceDTO; int? order; @override - bool operator ==(Object other) => identical(this, other) || other is CategorieDTO && - other.id == id && - other.label == label && - other.icon == icon && - other.iconResourceId == iconResourceId && - other.iconUrl == iconUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is CategorieDTO && + other.id == id && + _deepEquality.equals(other.label, label) && + other.icon == icon && + other.resourceDTO == resourceDTO && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (icon == null ? 0 : icon!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconUrl == null ? 0 : iconUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (resourceDTO == null ? 0 : resourceDTO!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'CategorieDTO[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + String toString() => + 'CategorieDTO[id=$id, label=$label, icon=$icon, resourceDTO=$resourceDTO, order=$order]'; Map toJson() { final json = {}; @@ -72,15 +76,10 @@ class CategorieDTO { } else { json[r'icon'] = null; } - if (this.iconResourceId != null) { - json[r'iconResourceId'] = this.iconResourceId; + if (this.resourceDTO != null) { + json[r'resourceDTO'] = this.resourceDTO; } else { - json[r'iconResourceId'] = null; - } - if (this.iconUrl != null) { - json[r'iconUrl'] = this.iconUrl; - } else { - json[r'iconUrl'] = null; + json[r'resourceDTO'] = null; } if (this.order != null) { json[r'order'] = this.order; @@ -102,8 +101,10 @@ class CategorieDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "CategorieDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "CategorieDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "CategorieDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "CategorieDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -112,15 +113,17 @@ class CategorieDTO { id: mapValueOfType(json, r'id'), label: TranslationDTO.listFromJson(json[r'label']), icon: mapValueOfType(json, r'icon'), - iconResourceId: mapValueOfType(json, r'iconResourceId'), - iconUrl: mapValueOfType(json, r'iconUrl'), + resourceDTO: ResourceDTO.fromJson(json[r'resourceDTO']), order: mapValueOfType(json, r'order'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -148,20 +151,24 @@ class CategorieDTO { } // maps a json object with a list of CategorieDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = CategorieDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = CategorieDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api_new/lib/model/configuration_dto.dart similarity index 62% rename from manager_api/lib/model/configuration_dto.dart rename to manager_api_new/lib/model/configuration_dto.dart index 3d642fc..921b4f5 100644 --- a/manager_api/lib/model/configuration_dto.dart +++ b/manager_api_new/lib/model/configuration_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -29,10 +29,6 @@ class ConfigurationDTO { this.sectionIds = const [], this.loaderImageId, this.loaderImageUrl, - this.weatherCity, - this.weatherUpdatedDate, - this.weatherResult, - this.isWeather, this.isDate, this.isHour, this.isSectionImageBackground, @@ -96,20 +92,6 @@ class ConfigurationDTO { String? loaderImageUrl; - String? weatherCity; - - DateTime? weatherUpdatedDate; - - String? weatherResult; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isWeather; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -139,64 +121,64 @@ class ConfigurationDTO { int? screenPercentageSectionsMainPage; @override - bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && - other.id == id && - other.label == label && - other.title == title && - other.imageId == imageId && - other.imageSource == imageSource && - other.primaryColor == primaryColor && - other.secondaryColor == secondaryColor && - other.languages == languages && - other.dateCreation == dateCreation && - other.isMobile == isMobile && - other.isTablet == isTablet && - other.isOffline == isOffline && - other.instanceId == instanceId && - other.sectionIds == sectionIds && - other.loaderImageId == loaderImageId && - other.loaderImageUrl == loaderImageUrl && - other.weatherCity == weatherCity && - other.weatherUpdatedDate == weatherUpdatedDate && - other.weatherResult == weatherResult && - other.isWeather == isWeather && - other.isDate == isDate && - other.isHour == isHour && - other.isSectionImageBackground == isSectionImageBackground && - other.roundedValue == roundedValue && - other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage; + bool operator ==(Object other) => + identical(this, other) || + other is ConfigurationDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.imageId == imageId && + other.imageSource == imageSource && + other.primaryColor == primaryColor && + other.secondaryColor == secondaryColor && + _deepEquality.equals(other.languages, languages) && + other.dateCreation == dateCreation && + other.isMobile == isMobile && + other.isTablet == isTablet && + other.isOffline == isOffline && + other.instanceId == instanceId && + _deepEquality.equals(other.sectionIds, sectionIds) && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == + screenPercentageSectionsMainPage; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (primaryColor == null ? 0 : primaryColor!.hashCode) + - (secondaryColor == null ? 0 : secondaryColor!.hashCode) + - (languages == null ? 0 : languages!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (isMobile == null ? 0 : isMobile!.hashCode) + - (isTablet == null ? 0 : isTablet!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (sectionIds == null ? 0 : sectionIds!.hashCode) + - (loaderImageId == null ? 0 : loaderImageId!.hashCode) + - (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + - (weatherCity == null ? 0 : weatherCity!.hashCode) + - (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + - (weatherResult == null ? 0 : weatherResult!.hashCode) + - (isWeather == null ? 0 : isWeather!.hashCode) + - (isDate == null ? 0 : isDate!.hashCode) + - (isHour == null ? 0 : isHour!.hashCode) + - (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + - (roundedValue == null ? 0 : roundedValue!.hashCode) + - (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (primaryColor == null ? 0 : primaryColor!.hashCode) + + (secondaryColor == null ? 0 : secondaryColor!.hashCode) + + (languages == null ? 0 : languages!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isMobile == null ? 0 : isMobile!.hashCode) + + (isTablet == null ? 0 : isTablet!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null + ? 0 + : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null + ? 0 + : screenPercentageSectionsMainPage!.hashCode); @override - String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage]'; + String toString() => + 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage]'; Map toJson() { final json = {}; @@ -280,26 +262,6 @@ class ConfigurationDTO { } else { json[r'loaderImageUrl'] = null; } - if (this.weatherCity != null) { - json[r'weatherCity'] = this.weatherCity; - } else { - json[r'weatherCity'] = null; - } - if (this.weatherUpdatedDate != null) { - json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); - } else { - json[r'weatherUpdatedDate'] = null; - } - if (this.weatherResult != null) { - json[r'weatherResult'] = this.weatherResult; - } else { - json[r'weatherResult'] = null; - } - if (this.isWeather != null) { - json[r'isWeather'] = this.isWeather; - } else { - json[r'isWeather'] = null; - } if (this.isDate != null) { json[r'isDate'] = this.isDate; } else { @@ -321,7 +283,8 @@ class ConfigurationDTO { json[r'roundedValue'] = null; } if (this.screenPercentageSectionsMainPage != null) { - json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + json[r'screenPercentageSectionsMainPage'] = + this.screenPercentageSectionsMainPage; } else { json[r'screenPercentageSectionsMainPage'] = null; } @@ -340,8 +303,10 @@ class ConfigurationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ConfigurationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ConfigurationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ConfigurationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -354,34 +319,39 @@ class ConfigurationDTO { imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), secondaryColor: mapValueOfType(json, r'secondaryColor'), - languages: json[r'languages'] is List - ? (json[r'languages'] as List).cast() + languages: json[r'languages'] is Iterable + ? (json[r'languages'] as Iterable) + .cast() + .toList(growable: false) : const [], - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), isMobile: mapValueOfType(json, r'isMobile'), isTablet: mapValueOfType(json, r'isTablet'), isOffline: mapValueOfType(json, r'isOffline'), instanceId: mapValueOfType(json, r'instanceId'), - sectionIds: json[r'sectionIds'] is List - ? (json[r'sectionIds'] as List).cast() + sectionIds: json[r'sectionIds'] is Iterable + ? (json[r'sectionIds'] as Iterable) + .cast() + .toList(growable: false) : const [], loaderImageId: mapValueOfType(json, r'loaderImageId'), loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), - weatherCity: mapValueOfType(json, r'weatherCity'), - weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), - weatherResult: mapValueOfType(json, r'weatherResult'), - isWeather: mapValueOfType(json, r'isWeather'), isDate: mapValueOfType(json, r'isDate'), isHour: mapValueOfType(json, r'isHour'), - isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + isSectionImageBackground: + mapValueOfType(json, r'isSectionImageBackground'), roundedValue: mapValueOfType(json, r'roundedValue'), - screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), + screenPercentageSectionsMainPage: + mapValueOfType(json, r'screenPercentageSectionsMainPage'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -409,20 +379,24 @@ class ConfigurationDTO { } // maps a json object with a list of ConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ConfigurationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ConfigurationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/content_dto.dart b/manager_api_new/lib/model/content_dto.dart similarity index 62% rename from manager_api/lib/model/content_dto.dart rename to manager_api_new/lib/model/content_dto.dart index 32512da..2ed3ee5 100644 --- a/manager_api/lib/model/content_dto.dart +++ b/manager_api_new/lib/model/content_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -15,20 +15,15 @@ class ContentDTO { ContentDTO({ this.title = const [], this.description = const [], - this.resourceId, - this.resourceUrl, this.order, - this.resourceType, + this.resourceId, + this.resource, }); List? title; List? description; - String? resourceId; - - String? resourceUrl; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -37,35 +32,32 @@ class ContentDTO { /// int? order; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - ResourceType? resourceType; + String? resourceId; + + ResourceDTO? resource; @override - bool operator ==(Object other) => identical(this, other) || other is ContentDTO && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.resourceUrl == resourceUrl && - other.order == order && - other.resourceType == resourceType; + bool operator ==(Object other) => + identical(this, other) || + other is ContentDTO && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.resourceId == resourceId && + other.resource == resource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode); @override - String toString() => 'ContentDTO[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + String toString() => + 'ContentDTO[title=$title, description=$description, order=$order, resourceId=$resourceId, resource=$resource]'; Map toJson() { final json = {}; @@ -79,25 +71,20 @@ class ContentDTO { } else { json[r'description'] = null; } - if (this.resourceId != null) { - json[r'resourceId'] = this.resourceId; - } else { - json[r'resourceId'] = null; - } - if (this.resourceUrl != null) { - json[r'resourceUrl'] = this.resourceUrl; - } else { - json[r'resourceUrl'] = null; - } if (this.order != null) { json[r'order'] = this.order; } else { json[r'order'] = null; } - if (this.resourceType != null) { - json[r'resourceType'] = this.resourceType; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; } else { - json[r'resourceType'] = null; + json[r'resourceId'] = null; + } + if (this.resource != null) { + json[r'resource'] = this.resource; + } else { + json[r'resource'] = null; } return json; } @@ -114,8 +101,10 @@ class ContentDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ContentDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ContentDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ContentDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -123,16 +112,18 @@ class ContentDTO { return ContentDTO( title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), - resourceId: mapValueOfType(json, r'resourceId'), - resourceUrl: mapValueOfType(json, r'resourceUrl'), order: mapValueOfType(json, r'order'), - resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceId: mapValueOfType(json, r'resourceId'), + resource: ResourceDTO.fromJson(json[r'resource']), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +151,24 @@ class ContentDTO { } // maps a json object with a list of ContentDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ContentDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ContentDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/content_dto_resource.dart b/manager_api_new/lib/model/content_dto_resource.dart new file mode 100644 index 0000000..521be98 --- /dev/null +++ b/manager_api_new/lib/model/content_dto_resource.dart @@ -0,0 +1,191 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ContentDTOResource { + /// Returns a new [ContentDTOResource] instance. + ContentDTOResource({ + this.id, + this.type, + this.label, + this.url, + this.dateCreation, + this.instanceId, + }); + + String? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? type; + + String? label; + + String? url; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? instanceId; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ContentDTOResource && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); + + @override + String toString() => + 'ContentDTOResource[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + return json; + } + + /// Returns a new [ContentDTOResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentDTOResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "ContentDTOResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentDTOResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentDTOResource( + id: mapValueOfType(json, r'id'), + type: ResourceType.fromJson(json[r'type']), + label: mapValueOfType(json, r'label'), + url: mapValueOfType(json, r'url'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + instanceId: mapValueOfType(json, r'instanceId'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentDTOResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentDTOResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentDTOResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentDTOResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/content_geo_point.dart b/manager_api_new/lib/model/content_geo_point.dart similarity index 73% rename from manager_api/lib/model/content_geo_point.dart rename to manager_api_new/lib/model/content_geo_point.dart index d299f8a..9bd9ce8 100644 --- a/manager_api/lib/model/content_geo_point.dart +++ b/manager_api_new/lib/model/content_geo_point.dart @@ -34,22 +34,25 @@ class ContentGeoPoint { String? resourceName; @override - bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint && - other.resourceId == resourceId && - other.resourceType == resourceType && - other.resourceUrl == resourceUrl && - other.resourceName == resourceName; + bool operator ==(Object other) => + identical(this, other) || + other is ContentGeoPoint && + other.resourceId == resourceId && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl && + other.resourceName == resourceName; @override int get hashCode => - // ignore: unnecessary_parenthesis - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (resourceName == null ? 0 : resourceName!.hashCode); + // ignore: unnecessary_parenthesis + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (resourceName == null ? 0 : resourceName!.hashCode); @override - String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]'; + String toString() => + 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]'; Map toJson() { final json = {}; @@ -88,8 +91,10 @@ class ContentGeoPoint { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ContentGeoPoint[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ContentGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); }); return true; }()); @@ -104,7 +109,10 @@ class ContentGeoPoint { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,20 +140,24 @@ class ContentGeoPoint { } // maps a json object with a list of ContentGeoPoint-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ContentGeoPoint.listFromJson(entry.value, growable: growable,); + map[entry.key] = ContentGeoPoint.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_detail_dto.dart b/manager_api_new/lib/model/device_detail_dto.dart similarity index 65% rename from manager_api/lib/model/device_detail_dto.dart rename to manager_api_new/lib/model/device_detail_dto.dart index 8c645d6..7b434d7 100644 --- a/manager_api/lib/model/device_detail_dto.dart +++ b/manager_api_new/lib/model/device_detail_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -52,20 +52,8 @@ class DeviceDetailDTO { /// bool? connected; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateUpdate; String? instanceId; @@ -91,44 +79,47 @@ class DeviceDetailDTO { DateTime? lastBatteryLevel; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO && - other.id == id && - other.identifier == identifier && - other.name == name && - other.ipAddressWLAN == ipAddressWLAN && - other.ipAddressETH == ipAddressETH && - other.configurationId == configurationId && - other.configuration == configuration && - other.connected == connected && - other.dateCreation == dateCreation && - other.dateUpdate == dateUpdate && - other.instanceId == instanceId && - other.connectionLevel == connectionLevel && - other.lastConnectionLevel == lastConnectionLevel && - other.batteryLevel == batteryLevel && - other.lastBatteryLevel == lastBatteryLevel; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDetailDTO && + other.id == id && + other.identifier == identifier && + other.name == name && + other.ipAddressWLAN == ipAddressWLAN && + other.ipAddressETH == ipAddressETH && + other.configurationId == configurationId && + other.configuration == configuration && + other.connected == connected && + other.dateCreation == dateCreation && + other.dateUpdate == dateUpdate && + other.instanceId == instanceId && + other.connectionLevel == connectionLevel && + other.lastConnectionLevel == lastConnectionLevel && + other.batteryLevel == batteryLevel && + other.lastBatteryLevel == lastBatteryLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (identifier == null ? 0 : identifier!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + - (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (configuration == null ? 0 : configuration!.hashCode) + - (connected == null ? 0 : connected!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (dateUpdate == null ? 0 : dateUpdate!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (connectionLevel == null ? 0 : connectionLevel!.hashCode) + - (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + - (batteryLevel == null ? 0 : batteryLevel!.hashCode) + - (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + + (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (configuration == null ? 0 : configuration!.hashCode) + + (connected == null ? 0 : connected!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (dateUpdate == null ? 0 : dateUpdate!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (connectionLevel == null ? 0 : connectionLevel!.hashCode) + + (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + + (batteryLevel == null ? 0 : batteryLevel!.hashCode) + + (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); @override - String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; + String toString() => + 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { final json = {}; @@ -193,7 +184,8 @@ class DeviceDetailDTO { json[r'connectionLevel'] = null; } if (this.lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + json[r'lastConnectionLevel'] = + this.lastConnectionLevel!.toUtc().toIso8601String(); } else { json[r'lastConnectionLevel'] = null; } @@ -203,7 +195,8 @@ class DeviceDetailDTO { json[r'batteryLevel'] = null; } if (this.lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + json[r'lastBatteryLevel'] = + this.lastBatteryLevel!.toUtc().toIso8601String(); } else { json[r'lastBatteryLevel'] = null; } @@ -222,8 +215,10 @@ class DeviceDetailDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDetailDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDetailDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDetailDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -237,19 +232,22 @@ class DeviceDetailDTO { configurationId: mapValueOfType(json, r'configurationId'), configuration: mapValueOfType(json, r'configuration'), connected: mapValueOfType(json, r'connected'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - dateUpdate: mapDateTime(json, r'dateUpdate', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), + dateUpdate: mapDateTime(json, r'dateUpdate', r''), instanceId: mapValueOfType(json, r'instanceId'), connectionLevel: mapValueOfType(json, r'connectionLevel'), - lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''), + lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', r''), batteryLevel: mapValueOfType(json, r'batteryLevel'), - lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', ''), + lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', r''), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -277,20 +275,24 @@ class DeviceDetailDTO { } // maps a json object with a list of DeviceDetailDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDetailDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDetailDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_detail_dto_all_of.dart b/manager_api_new/lib/model/device_detail_dto_all_of.dart similarity index 72% rename from manager_api/lib/model/device_detail_dto_all_of.dart rename to manager_api_new/lib/model/device_detail_dto_all_of.dart index 2e990db..729d201 100644 --- a/manager_api/lib/model/device_detail_dto_all_of.dart +++ b/manager_api_new/lib/model/device_detail_dto_all_of.dart @@ -40,22 +40,25 @@ class DeviceDetailDTOAllOf { DateTime? lastBatteryLevel; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTOAllOf && - other.connectionLevel == connectionLevel && - other.lastConnectionLevel == lastConnectionLevel && - other.batteryLevel == batteryLevel && - other.lastBatteryLevel == lastBatteryLevel; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDetailDTOAllOf && + other.connectionLevel == connectionLevel && + other.lastConnectionLevel == lastConnectionLevel && + other.batteryLevel == batteryLevel && + other.lastBatteryLevel == lastBatteryLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (connectionLevel == null ? 0 : connectionLevel!.hashCode) + - (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + - (batteryLevel == null ? 0 : batteryLevel!.hashCode) + - (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); + // ignore: unnecessary_parenthesis + (connectionLevel == null ? 0 : connectionLevel!.hashCode) + + (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + + (batteryLevel == null ? 0 : batteryLevel!.hashCode) + + (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); @override - String toString() => 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; + String toString() => + 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { final json = {}; @@ -65,7 +68,8 @@ class DeviceDetailDTOAllOf { json[r'connectionLevel'] = null; } if (this.lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + json[r'lastConnectionLevel'] = + this.lastConnectionLevel!.toUtc().toIso8601String(); } else { json[r'lastConnectionLevel'] = null; } @@ -75,7 +79,8 @@ class DeviceDetailDTOAllOf { json[r'batteryLevel'] = null; } if (this.lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + json[r'lastBatteryLevel'] = + this.lastBatteryLevel!.toUtc().toIso8601String(); } else { json[r'lastBatteryLevel'] = null; } @@ -94,8 +99,10 @@ class DeviceDetailDTOAllOf { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDetailDTOAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDetailDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.'); }); return true; }()); @@ -110,7 +117,10 @@ class DeviceDetailDTOAllOf { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -138,20 +148,24 @@ class DeviceDetailDTOAllOf { } // maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDetailDTOAllOf.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDetailDTOAllOf.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/device_dto.dart b/manager_api_new/lib/model/device_dto.dart similarity index 65% rename from manager_api/lib/model/device_dto.dart rename to manager_api_new/lib/model/device_dto.dart index 7d8ea3a..879f3a8 100644 --- a/manager_api/lib/model/device_dto.dart +++ b/manager_api_new/lib/model/device_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -48,55 +48,46 @@ class DeviceDTO { /// bool? connected; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateUpdate; String? instanceId; @override - bool operator ==(Object other) => identical(this, other) || other is DeviceDTO && - other.id == id && - other.identifier == identifier && - other.name == name && - other.ipAddressWLAN == ipAddressWLAN && - other.ipAddressETH == ipAddressETH && - other.configurationId == configurationId && - other.configuration == configuration && - other.connected == connected && - other.dateCreation == dateCreation && - other.dateUpdate == dateUpdate && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is DeviceDTO && + other.id == id && + other.identifier == identifier && + other.name == name && + other.ipAddressWLAN == ipAddressWLAN && + other.ipAddressETH == ipAddressETH && + other.configurationId == configurationId && + other.configuration == configuration && + other.connected == connected && + other.dateCreation == dateCreation && + other.dateUpdate == dateUpdate && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (identifier == null ? 0 : identifier!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + - (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (configuration == null ? 0 : configuration!.hashCode) + - (connected == null ? 0 : connected!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (dateUpdate == null ? 0 : dateUpdate!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (ipAddressWLAN == null ? 0 : ipAddressWLAN!.hashCode) + + (ipAddressETH == null ? 0 : ipAddressETH!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (configuration == null ? 0 : configuration!.hashCode) + + (connected == null ? 0 : connected!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (dateUpdate == null ? 0 : dateUpdate!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]'; + String toString() => + 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -170,8 +161,10 @@ class DeviceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DeviceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DeviceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "DeviceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "DeviceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -185,15 +178,18 @@ class DeviceDTO { configurationId: mapValueOfType(json, r'configurationId'), configuration: mapValueOfType(json, r'configuration'), connected: mapValueOfType(json, r'connected'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - dateUpdate: mapDateTime(json, r'dateUpdate', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), + dateUpdate: mapDateTime(json, r'dateUpdate', r''), instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -221,20 +217,24 @@ class DeviceDTO { } // maps a json object with a list of DeviceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = DeviceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = DeviceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api_new/lib/model/export_configuration_dto.dart similarity index 63% rename from manager_api/lib/model/export_configuration_dto.dart rename to manager_api_new/lib/model/export_configuration_dto.dart index e1f7cad..bdc808c 100644 --- a/manager_api/lib/model/export_configuration_dto.dart +++ b/manager_api_new/lib/model/export_configuration_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -29,10 +29,6 @@ class ExportConfigurationDTO { this.sectionIds = const [], this.loaderImageId, this.loaderImageUrl, - this.weatherCity, - this.weatherUpdatedDate, - this.weatherResult, - this.isWeather, this.isDate, this.isHour, this.isSectionImageBackground, @@ -98,20 +94,6 @@ class ExportConfigurationDTO { String? loaderImageUrl; - String? weatherCity; - - DateTime? weatherUpdatedDate; - - String? weatherResult; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? isWeather; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -145,68 +127,68 @@ class ExportConfigurationDTO { List? resources; @override - bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTO && - other.id == id && - other.label == label && - other.title == title && - other.imageId == imageId && - other.imageSource == imageSource && - other.primaryColor == primaryColor && - other.secondaryColor == secondaryColor && - other.languages == languages && - other.dateCreation == dateCreation && - other.isMobile == isMobile && - other.isTablet == isTablet && - other.isOffline == isOffline && - other.instanceId == instanceId && - other.sectionIds == sectionIds && - other.loaderImageId == loaderImageId && - other.loaderImageUrl == loaderImageUrl && - other.weatherCity == weatherCity && - other.weatherUpdatedDate == weatherUpdatedDate && - other.weatherResult == weatherResult && - other.isWeather == isWeather && - other.isDate == isDate && - other.isHour == isHour && - other.isSectionImageBackground == isSectionImageBackground && - other.roundedValue == roundedValue && - other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage && - other.sections == sections && - other.resources == resources; + bool operator ==(Object other) => + identical(this, other) || + other is ExportConfigurationDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.imageId == imageId && + other.imageSource == imageSource && + other.primaryColor == primaryColor && + other.secondaryColor == secondaryColor && + _deepEquality.equals(other.languages, languages) && + other.dateCreation == dateCreation && + other.isMobile == isMobile && + other.isTablet == isTablet && + other.isOffline == isOffline && + other.instanceId == instanceId && + _deepEquality.equals(other.sectionIds, sectionIds) && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == + screenPercentageSectionsMainPage && + _deepEquality.equals(other.sections, sections) && + _deepEquality.equals(other.resources, resources); @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (primaryColor == null ? 0 : primaryColor!.hashCode) + - (secondaryColor == null ? 0 : secondaryColor!.hashCode) + - (languages == null ? 0 : languages!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (isMobile == null ? 0 : isMobile!.hashCode) + - (isTablet == null ? 0 : isTablet!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (sectionIds == null ? 0 : sectionIds!.hashCode) + - (loaderImageId == null ? 0 : loaderImageId!.hashCode) + - (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + - (weatherCity == null ? 0 : weatherCity!.hashCode) + - (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + - (weatherResult == null ? 0 : weatherResult!.hashCode) + - (isWeather == null ? 0 : isWeather!.hashCode) + - (isDate == null ? 0 : isDate!.hashCode) + - (isHour == null ? 0 : isHour!.hashCode) + - (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + - (roundedValue == null ? 0 : roundedValue!.hashCode) + - (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode) + - (sections == null ? 0 : sections!.hashCode) + - (resources == null ? 0 : resources!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (primaryColor == null ? 0 : primaryColor!.hashCode) + + (secondaryColor == null ? 0 : secondaryColor!.hashCode) + + (languages == null ? 0 : languages!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isMobile == null ? 0 : isMobile!.hashCode) + + (isTablet == null ? 0 : isTablet!.hashCode) + + (isOffline == null ? 0 : isOffline!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null + ? 0 + : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null + ? 0 + : screenPercentageSectionsMainPage!.hashCode) + + (sections == null ? 0 : sections!.hashCode) + + (resources == null ? 0 : resources!.hashCode); @override - String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, sections=$sections, resources=$resources]'; + String toString() => + 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, sections=$sections, resources=$resources]'; Map toJson() { final json = {}; @@ -290,26 +272,6 @@ class ExportConfigurationDTO { } else { json[r'loaderImageUrl'] = null; } - if (this.weatherCity != null) { - json[r'weatherCity'] = this.weatherCity; - } else { - json[r'weatherCity'] = null; - } - if (this.weatherUpdatedDate != null) { - json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); - } else { - json[r'weatherUpdatedDate'] = null; - } - if (this.weatherResult != null) { - json[r'weatherResult'] = this.weatherResult; - } else { - json[r'weatherResult'] = null; - } - if (this.isWeather != null) { - json[r'isWeather'] = this.isWeather; - } else { - json[r'isWeather'] = null; - } if (this.isDate != null) { json[r'isDate'] = this.isDate; } else { @@ -331,7 +293,8 @@ class ExportConfigurationDTO { json[r'roundedValue'] = null; } if (this.screenPercentageSectionsMainPage != null) { - json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + json[r'screenPercentageSectionsMainPage'] = + this.screenPercentageSectionsMainPage; } else { json[r'screenPercentageSectionsMainPage'] = null; } @@ -360,8 +323,10 @@ class ExportConfigurationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ExportConfigurationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ExportConfigurationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ExportConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ExportConfigurationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -374,28 +339,30 @@ class ExportConfigurationDTO { imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), secondaryColor: mapValueOfType(json, r'secondaryColor'), - languages: json[r'languages'] is List - ? (json[r'languages'] as List).cast() + languages: json[r'languages'] is Iterable + ? (json[r'languages'] as Iterable) + .cast() + .toList(growable: false) : const [], - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), isMobile: mapValueOfType(json, r'isMobile'), isTablet: mapValueOfType(json, r'isTablet'), isOffline: mapValueOfType(json, r'isOffline'), instanceId: mapValueOfType(json, r'instanceId'), - sectionIds: json[r'sectionIds'] is List - ? (json[r'sectionIds'] as List).cast() + sectionIds: json[r'sectionIds'] is Iterable + ? (json[r'sectionIds'] as Iterable) + .cast() + .toList(growable: false) : const [], loaderImageId: mapValueOfType(json, r'loaderImageId'), loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), - weatherCity: mapValueOfType(json, r'weatherCity'), - weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), - weatherResult: mapValueOfType(json, r'weatherResult'), - isWeather: mapValueOfType(json, r'isWeather'), isDate: mapValueOfType(json, r'isDate'), isHour: mapValueOfType(json, r'isHour'), - isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + isSectionImageBackground: + mapValueOfType(json, r'isSectionImageBackground'), roundedValue: mapValueOfType(json, r'roundedValue'), - screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), + screenPercentageSectionsMainPage: + mapValueOfType(json, r'screenPercentageSectionsMainPage'), sections: SectionDTO.listFromJson(json[r'sections']), resources: ResourceDTO.listFromJson(json[r'resources']), ); @@ -403,7 +370,10 @@ class ExportConfigurationDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -431,20 +401,24 @@ class ExportConfigurationDTO { } // maps a json object with a list of ExportConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ExportConfigurationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ExportConfigurationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/export_configuration_dto_all_of.dart b/manager_api_new/lib/model/export_configuration_dto_all_of.dart similarity index 76% rename from manager_api/lib/model/export_configuration_dto_all_of.dart rename to manager_api_new/lib/model/export_configuration_dto_all_of.dart index 89650d1..02e3aec 100644 --- a/manager_api/lib/model/export_configuration_dto_all_of.dart +++ b/manager_api_new/lib/model/export_configuration_dto_all_of.dart @@ -22,18 +22,21 @@ class ExportConfigurationDTOAllOf { List? resources; @override - bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTOAllOf && - other.sections == sections && - other.resources == resources; + bool operator ==(Object other) => + identical(this, other) || + other is ExportConfigurationDTOAllOf && + other.sections == sections && + other.resources == resources; @override int get hashCode => - // ignore: unnecessary_parenthesis - (sections == null ? 0 : sections!.hashCode) + - (resources == null ? 0 : resources!.hashCode); + // ignore: unnecessary_parenthesis + (sections == null ? 0 : sections!.hashCode) + + (resources == null ? 0 : resources!.hashCode); @override - String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; + String toString() => + 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; Map toJson() { final json = {}; @@ -62,8 +65,10 @@ class ExportConfigurationDTOAllOf { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ExportConfigurationDTOAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ExportConfigurationDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +81,10 @@ class ExportConfigurationDTOAllOf { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +112,24 @@ class ExportConfigurationDTOAllOf { } // maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ExportConfigurationDTOAllOf.listFromJson(entry.value, growable: growable,); + map[entry.key] = ExportConfigurationDTOAllOf.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/geo_point.dart b/manager_api_new/lib/model/geo_point.dart new file mode 100644 index 0000000..955c841 --- /dev/null +++ b/manager_api_new/lib/model/geo_point.dart @@ -0,0 +1,263 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GeoPoint { + /// Returns a new [GeoPoint] instance. + GeoPoint({ + required this.id, + this.title = const [], + this.description = const [], + this.contents = const [], + this.schedules = const [], + this.prices = const [], + this.phone = const [], + this.email = const [], + this.site = const [], + this.categorieId, + this.latitude, + this.longitude, + this.imageResourceId, + this.imageUrl, + this.sectionMapId, + this.sectionMap, + }); + + int id; + + List title; + + List description; + + List contents; + + List schedules; + + List prices; + + List phone; + + List email; + + List site; + + int? categorieId; + + String? latitude; + + String? longitude; + + String? imageResourceId; + + String? imageUrl; + + String? sectionMapId; + + GeoPointSectionMap? sectionMap; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GeoPoint && + other.id == id && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + _deepEquality.equals(other.contents, contents) && + _deepEquality.equals(other.schedules, schedules) && + _deepEquality.equals(other.prices, prices) && + _deepEquality.equals(other.phone, phone) && + _deepEquality.equals(other.email, email) && + _deepEquality.equals(other.site, site) && + other.categorieId == categorieId && + other.latitude == latitude && + other.longitude == longitude && + other.imageResourceId == imageResourceId && + other.imageUrl == imageUrl && + other.sectionMapId == sectionMapId && + other.sectionMap == sectionMap; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (title.hashCode) + + (description.hashCode) + + (contents.hashCode) + + (schedules.hashCode) + + (prices.hashCode) + + (phone.hashCode) + + (email.hashCode) + + (site.hashCode) + + (categorieId == null ? 0 : categorieId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageUrl == null ? 0 : imageUrl!.hashCode) + + (sectionMapId == null ? 0 : sectionMapId!.hashCode) + + (sectionMap == null ? 0 : sectionMap!.hashCode); + + @override + String toString() => + 'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'title'] = this.title; + json[r'description'] = this.description; + json[r'contents'] = this.contents; + json[r'schedules'] = this.schedules; + json[r'prices'] = this.prices; + json[r'phone'] = this.phone; + json[r'email'] = this.email; + json[r'site'] = this.site; + if (this.categorieId != null) { + json[r'categorieId'] = this.categorieId; + } else { + json[r'categorieId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.imageResourceId != null) { + json[r'imageResourceId'] = this.imageResourceId; + } else { + json[r'imageResourceId'] = null; + } + if (this.imageUrl != null) { + json[r'imageUrl'] = this.imageUrl; + } else { + json[r'imageUrl'] = null; + } + if (this.sectionMapId != null) { + json[r'sectionMapId'] = this.sectionMapId; + } else { + json[r'sectionMapId'] = null; + } + if (this.sectionMap != null) { + json[r'sectionMap'] = this.sectionMap; + } else { + json[r'sectionMap'] = null; + } + return json; + } + + /// Returns a new [GeoPoint] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPoint? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "GeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPoint[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPoint( + id: mapValueOfType(json, r'id')!, + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + contents: ContentDTO.listFromJson(json[r'contents']), + schedules: TranslationDTO.listFromJson(json[r'schedules']), + prices: TranslationDTO.listFromJson(json[r'prices']), + phone: TranslationDTO.listFromJson(json[r'phone']), + email: TranslationDTO.listFromJson(json[r'email']), + site: TranslationDTO.listFromJson(json[r'site']), + categorieId: mapValueOfType(json, r'categorieId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + imageResourceId: mapValueOfType(json, r'imageResourceId'), + imageUrl: mapValueOfType(json, r'imageUrl'), + sectionMapId: mapValueOfType(json, r'sectionMapId'), + sectionMap: GeoPointSectionMap.fromJson(json[r'sectionMap']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPoint.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPoint.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPoint-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPoint.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'title', + 'description', + 'contents', + 'schedules', + 'prices', + 'phone', + 'email', + 'site', + }; +} diff --git a/manager_api/lib/model/geo_point_dto.dart b/manager_api_new/lib/model/geo_point_dto.dart similarity index 68% rename from manager_api/lib/model/geo_point_dto.dart rename to manager_api_new/lib/model/geo_point_dto.dart index a9acae5..e901072 100644 --- a/manager_api/lib/model/geo_point_dto.dart +++ b/manager_api_new/lib/model/geo_point_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,7 +17,6 @@ class GeoPointDTO { this.title = const [], this.description = const [], this.contents = const [], - this.categorie, this.categorieId, this.latitude, this.longitude, @@ -36,9 +35,7 @@ class GeoPointDTO { List? description; - List? contents; - - GeoPointDTOCategorie? categorie; + List? contents; int? categorieId; @@ -61,44 +58,45 @@ class GeoPointDTO { List? site; @override - bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO && - other.id == id && - other.title == title && - other.description == description && - other.contents == contents && - other.categorie == categorie && - other.categorieId == categorieId && - other.latitude == latitude && - other.longitude == longitude && - other.imageResourceId == imageResourceId && - other.imageUrl == imageUrl && - other.schedules == schedules && - other.prices == prices && - other.phone == phone && - other.email == email && - other.site == site; + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointDTO && + other.id == id && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + _deepEquality.equals(other.contents, contents) && + other.categorieId == categorieId && + other.latitude == latitude && + other.longitude == longitude && + other.imageResourceId == imageResourceId && + other.imageUrl == imageUrl && + _deepEquality.equals(other.schedules, schedules) && + _deepEquality.equals(other.prices, prices) && + _deepEquality.equals(other.phone, phone) && + _deepEquality.equals(other.email, email) && + _deepEquality.equals(other.site, site); @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (contents == null ? 0 : contents!.hashCode) + - (categorie == null ? 0 : categorie!.hashCode) + - (categorieId == null ? 0 : categorieId!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (imageResourceId == null ? 0 : imageResourceId!.hashCode) + - (imageUrl == null ? 0 : imageUrl!.hashCode) + - (schedules == null ? 0 : schedules!.hashCode) + - (prices == null ? 0 : prices!.hashCode) + - (phone == null ? 0 : phone!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (site == null ? 0 : site!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (contents == null ? 0 : contents!.hashCode) + + (categorieId == null ? 0 : categorieId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageUrl == null ? 0 : imageUrl!.hashCode) + + (schedules == null ? 0 : schedules!.hashCode) + + (prices == null ? 0 : prices!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (site == null ? 0 : site!.hashCode); @override - String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; + String toString() => + 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; Map toJson() { final json = {}; @@ -122,11 +120,6 @@ class GeoPointDTO { } else { json[r'contents'] = null; } - if (this.categorie != null) { - json[r'categorie'] = this.categorie; - } else { - json[r'categorie'] = null; - } if (this.categorieId != null) { json[r'categorieId'] = this.categorieId; } else { @@ -192,8 +185,10 @@ class GeoPointDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "GeoPointDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "GeoPointDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "GeoPointDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -202,8 +197,7 @@ class GeoPointDTO { id: mapValueOfType(json, r'id'), title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), - contents: ContentGeoPoint.listFromJson(json[r'contents']), - categorie: GeoPointDTOCategorie.fromJson(json[r'categorie']), + contents: ContentDTO.listFromJson(json[r'contents']), categorieId: mapValueOfType(json, r'categorieId'), latitude: mapValueOfType(json, r'latitude'), longitude: mapValueOfType(json, r'longitude'), @@ -219,7 +213,10 @@ class GeoPointDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -247,20 +244,24 @@ class GeoPointDTO { } // maps a json object with a list of GeoPointDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = GeoPointDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = GeoPointDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/geo_point_dto_categorie.dart b/manager_api_new/lib/model/geo_point_dto_categorie.dart similarity index 73% rename from manager_api/lib/model/geo_point_dto_categorie.dart rename to manager_api_new/lib/model/geo_point_dto_categorie.dart index 5c06018..5df6384 100644 --- a/manager_api/lib/model/geo_point_dto_categorie.dart +++ b/manager_api_new/lib/model/geo_point_dto_categorie.dart @@ -34,26 +34,29 @@ class GeoPointDTOCategorie { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie && - other.id == id && - other.label == label && - other.icon == icon && - other.iconResourceId == iconResourceId && - other.iconUrl == iconUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointDTOCategorie && + other.id == id && + other.label == label && + other.icon == icon && + other.iconResourceId == iconResourceId && + other.iconUrl == iconUrl && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (icon == null ? 0 : icon!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconUrl == null ? 0 : iconUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconUrl == null ? 0 : iconUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + String toString() => + 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; Map toJson() { final json = {}; @@ -102,8 +105,10 @@ class GeoPointDTOCategorie { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); }); return true; }()); @@ -120,7 +125,10 @@ class GeoPointDTOCategorie { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -148,20 +156,24 @@ class GeoPointDTOCategorie { } // maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = GeoPointDTOCategorie.listFromJson(entry.value, growable: growable,); + map[entry.key] = GeoPointDTOCategorie.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/geo_point_section_map.dart b/manager_api_new/lib/model/geo_point_section_map.dart new file mode 100644 index 0000000..c9a7653 --- /dev/null +++ b/manager_api_new/lib/model/geo_point_section_map.dart @@ -0,0 +1,424 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GeoPointSectionMap { + /// Returns a new [GeoPointSectionMap] instance. + GeoPointSectionMap({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.mapCategories = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.mapZoom, + this.mapMapType, + this.mapTypeMapbox, + this.mapMapProvider, + this.mapPoints = const [], + this.mapResourceId, + this.mapResource, + this.mapCenterLatitude, + this.mapCenterLongitude, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List mapCategories; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? mapZoom; + + SectionMapAllOfMapMapType? mapMapType; + + SectionMapAllOfMapTypeMapbox? mapTypeMapbox; + + SectionMapAllOfMapMapProvider? mapMapProvider; + + List? mapPoints; + + String? mapResourceId; + + SectionMapAllOfMapResource? mapResource; + + String? mapCenterLatitude; + + String? mapCenterLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GeoPointSectionMap && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.mapCategories, mapCategories) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.mapZoom == mapZoom && + other.mapMapType == mapMapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapMapProvider == mapMapProvider && + _deepEquality.equals(other.mapPoints, mapPoints) && + other.mapResourceId == mapResourceId && + other.mapResource == mapResource && + other.mapCenterLatitude == mapCenterLatitude && + other.mapCenterLongitude == mapCenterLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (mapCategories.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (mapZoom == null ? 0 : mapZoom!.hashCode) + + (mapMapType == null ? 0 : mapMapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapMapProvider == null ? 0 : mapMapProvider!.hashCode) + + (mapPoints == null ? 0 : mapPoints!.hashCode) + + (mapResourceId == null ? 0 : mapResourceId!.hashCode) + + (mapResource == null ? 0 : mapResource!.hashCode) + + (mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) + + (mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode); + + @override + String toString() => + 'GeoPointSectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'mapCategories'] = this.mapCategories; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.mapZoom != null) { + json[r'mapZoom'] = this.mapZoom; + } else { + json[r'mapZoom'] = null; + } + if (this.mapMapType != null) { + json[r'mapMapType'] = this.mapMapType; + } else { + json[r'mapMapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapMapProvider != null) { + json[r'mapMapProvider'] = this.mapMapProvider; + } else { + json[r'mapMapProvider'] = null; + } + if (this.mapPoints != null) { + json[r'mapPoints'] = this.mapPoints; + } else { + json[r'mapPoints'] = null; + } + if (this.mapResourceId != null) { + json[r'mapResourceId'] = this.mapResourceId; + } else { + json[r'mapResourceId'] = null; + } + if (this.mapResource != null) { + json[r'mapResource'] = this.mapResource; + } else { + json[r'mapResource'] = null; + } + if (this.mapCenterLatitude != null) { + json[r'mapCenterLatitude'] = this.mapCenterLatitude; + } else { + json[r'mapCenterLatitude'] = null; + } + if (this.mapCenterLongitude != null) { + json[r'mapCenterLongitude'] = this.mapCenterLongitude; + } else { + json[r'mapCenterLongitude'] = null; + } + return json; + } + + /// Returns a new [GeoPointSectionMap] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPointSectionMap? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "GeoPointSectionMap[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "GeoPointSectionMap[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPointSectionMap( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + mapZoom: mapValueOfType(json, r'mapZoom'), + mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']), + mapTypeMapbox: + SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']), + mapMapProvider: + SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']), + mapPoints: GeoPoint.listFromJson(json[r'mapPoints']), + mapResourceId: mapValueOfType(json, r'mapResourceId'), + mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']), + mapCenterLatitude: mapValueOfType(json, r'mapCenterLatitude'), + mapCenterLongitude: mapValueOfType(json, r'mapCenterLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPointSectionMap.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPointSectionMap.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPointSectionMap-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPointSectionMap.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'mapCategories', + }; +} diff --git a/manager_api/lib/model/image_dto.dart b/manager_api_new/lib/model/image_dto.dart similarity index 74% rename from manager_api/lib/model/image_dto.dart rename to manager_api_new/lib/model/image_dto.dart index 0a55eed..c0120e3 100644 --- a/manager_api/lib/model/image_dto.dart +++ b/manager_api_new/lib/model/image_dto.dart @@ -37,24 +37,27 @@ class ImageDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is ImageDTO && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.source_ == source_ && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is ImageDTO && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.source_ == source_ && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; + String toString() => + 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; Map toJson() { final json = {}; @@ -98,8 +101,10 @@ class ImageDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ImageDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ImageDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ImageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ImageDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -115,7 +120,10 @@ class ImageDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -143,20 +151,24 @@ class ImageDTO { } // maps a json object with a list of ImageDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ImageDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ImageDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/image_geo_point.dart b/manager_api_new/lib/model/image_geo_point.dart similarity index 72% rename from manager_api/lib/model/image_geo_point.dart rename to manager_api_new/lib/model/image_geo_point.dart index 4ecb68c..e92d32b 100644 --- a/manager_api/lib/model/image_geo_point.dart +++ b/manager_api_new/lib/model/image_geo_point.dart @@ -22,18 +22,21 @@ class ImageGeoPoint { String? imageSource; @override - bool operator ==(Object other) => identical(this, other) || other is ImageGeoPoint && - other.imageResourceId == imageResourceId && - other.imageSource == imageSource; + bool operator ==(Object other) => + identical(this, other) || + other is ImageGeoPoint && + other.imageResourceId == imageResourceId && + other.imageSource == imageSource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (imageResourceId == null ? 0 : imageResourceId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode); + // ignore: unnecessary_parenthesis + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode); @override - String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; + String toString() => + 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; Map toJson() { final json = {}; @@ -62,8 +65,10 @@ class ImageGeoPoint { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ImageGeoPoint[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ImageGeoPoint[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ImageGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ImageGeoPoint[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +81,10 @@ class ImageGeoPoint { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +112,24 @@ class ImageGeoPoint { } // maps a json object with a list of ImageGeoPoint-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ImageGeoPoint.listFromJson(entry.value, growable: growable,); + map[entry.key] = ImageGeoPoint.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/instance.dart b/manager_api_new/lib/model/instance.dart similarity index 66% rename from manager_api/lib/model/instance.dart rename to manager_api_new/lib/model/instance.dart index 62800f6..84aed0c 100644 --- a/manager_api/lib/model/instance.dart +++ b/manager_api_new/lib/model/instance.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,15 +13,15 @@ part of openapi.api; class Instance { /// Returns a new [Instance] instance. Instance({ - this.id, - this.name, + required this.id, + required this.name, this.dateCreation, this.pinCode, }); - String? id; + String id; - String? name; + String name; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -31,38 +31,33 @@ class Instance { /// DateTime? dateCreation; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is Instance && - other.id == id && - other.name == name && - other.dateCreation == dateCreation && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is Instance && + other.id == id && + other.name == name && + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; + String toString() => + 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { final json = {}; - if (this.id != null) { - json[r'id'] = this.id; - } else { - json[r'id'] = null; - } - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } + json[r'id'] = this.id; + json[r'name'] = this.name; if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { @@ -88,23 +83,28 @@ class Instance { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "Instance[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "Instance[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "Instance[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Instance[$key]" has a null value in JSON.'); }); return true; }()); return Instance( - id: mapValueOfType(json, r'id'), - name: mapValueOfType(json, r'name'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - pinCode: mapValueOfType(json, r'pinCode'), + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,13 +132,19 @@ class Instance { } // maps a json object with a list of Instance-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = Instance.listFromJson(entry.value, growable: growable,); + map[entry.key] = Instance.listFromJson( + entry.value, + growable: growable, + ); } } return map; @@ -146,6 +152,7 @@ class Instance { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'id', + 'name', }; } - diff --git a/manager_api/lib/model/instance_dto.dart b/manager_api_new/lib/model/instance_dto.dart similarity index 66% rename from manager_api/lib/model/instance_dto.dart rename to manager_api_new/lib/model/instance_dto.dart index 5f4399d..3dff3e1 100644 --- a/manager_api/lib/model/instance_dto.dart +++ b/manager_api_new/lib/model/instance_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,33 +23,30 @@ class InstanceDTO { String? name; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// DateTime? dateCreation; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is InstanceDTO && - other.id == id && - other.name == name && - other.dateCreation == dateCreation && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is InstanceDTO && + other.id == id && + other.name == name && + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; + String toString() => + 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { final json = {}; @@ -88,8 +85,10 @@ class InstanceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "InstanceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "InstanceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "InstanceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "InstanceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -97,14 +96,17 @@ class InstanceDTO { return InstanceDTO( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - pinCode: mapValueOfType(json, r'pinCode'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -132,20 +134,24 @@ class InstanceDTO { } // maps a json object with a list of InstanceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = InstanceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = InstanceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/level_dto.dart b/manager_api_new/lib/model/level_dto.dart similarity index 76% rename from manager_api/lib/model/level_dto.dart rename to manager_api_new/lib/model/level_dto.dart index 79e8ea1..3cdc4bc 100644 --- a/manager_api/lib/model/level_dto.dart +++ b/manager_api_new/lib/model/level_dto.dart @@ -19,13 +19,13 @@ class LevelDTO { List? label; @override - bool operator ==(Object other) => identical(this, other) || other is LevelDTO && - other.label == label; + bool operator ==(Object other) => + identical(this, other) || other is LevelDTO && other.label == label; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode); @override String toString() => 'LevelDTO[label=$label]'; @@ -52,8 +52,10 @@ class LevelDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "LevelDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "LevelDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "LevelDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "LevelDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -65,7 +67,10 @@ class LevelDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +98,24 @@ class LevelDTO { } // maps a json object with a list of LevelDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = LevelDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = LevelDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/login_dto.dart b/manager_api_new/lib/model/login_dto.dart similarity index 75% rename from manager_api/lib/model/login_dto.dart rename to manager_api_new/lib/model/login_dto.dart index a8e6b90..6e0e230 100644 --- a/manager_api/lib/model/login_dto.dart +++ b/manager_api_new/lib/model/login_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -22,15 +22,15 @@ class LoginDTO { String? password; @override - bool operator ==(Object other) => identical(this, other) || other is LoginDTO && - other.email == email && - other.password == password; + bool operator ==(Object other) => + identical(this, other) || + other is LoginDTO && other.email == email && other.password == password; @override int get hashCode => - // ignore: unnecessary_parenthesis - (email == null ? 0 : email!.hashCode) + - (password == null ? 0 : password!.hashCode); + // ignore: unnecessary_parenthesis + (email == null ? 0 : email!.hashCode) + + (password == null ? 0 : password!.hashCode); @override String toString() => 'LoginDTO[email=$email, password=$password]'; @@ -62,8 +62,10 @@ class LoginDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "LoginDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "LoginDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "LoginDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "LoginDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +78,10 @@ class LoginDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +109,24 @@ class LoginDTO { } // maps a json object with a list of LoginDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = LoginDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = LoginDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/map_dto.dart b/manager_api_new/lib/model/map_dto.dart new file mode 100644 index 0000000..e3671f9 --- /dev/null +++ b/manager_api_new/lib/model/map_dto.dart @@ -0,0 +1,451 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MapDTO { + /// Returns a new [MapDTO] instance. + MapDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.zoom, + this.mapType, + this.mapTypeMapbox, + this.mapProvider, + this.points = const [], + this.iconResourceId, + this.iconSource, + this.categories = const [], + this.centerLatitude, + this.centerLongitude, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? zoom; + + MapTypeApp? mapType; + + MapTypeMapBox? mapTypeMapbox; + + MapProvider? mapProvider; + + List? points; + + String? iconResourceId; + + String? iconSource; + + List? categories; + + String? centerLatitude; + + String? centerLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MapDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.zoom == zoom && + other.mapType == mapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapProvider == mapProvider && + _deepEquality.equals(other.points, points) && + other.iconResourceId == iconResourceId && + other.iconSource == iconSource && + _deepEquality.equals(other.categories, categories) && + other.centerLatitude == centerLatitude && + other.centerLongitude == centerLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (zoom == null ? 0 : zoom!.hashCode) + + (mapType == null ? 0 : mapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapProvider == null ? 0 : mapProvider!.hashCode) + + (points == null ? 0 : points!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconSource == null ? 0 : iconSource!.hashCode) + + (categories == null ? 0 : categories!.hashCode) + + (centerLatitude == null ? 0 : centerLatitude!.hashCode) + + (centerLongitude == null ? 0 : centerLongitude!.hashCode); + + @override + String toString() => + 'MapDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, centerLatitude=$centerLatitude, centerLongitude=$centerLongitude]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.zoom != null) { + json[r'zoom'] = this.zoom; + } else { + json[r'zoom'] = null; + } + if (this.mapType != null) { + json[r'mapType'] = this.mapType; + } else { + json[r'mapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapProvider != null) { + json[r'mapProvider'] = this.mapProvider; + } else { + json[r'mapProvider'] = null; + } + if (this.points != null) { + json[r'points'] = this.points; + } else { + json[r'points'] = null; + } + if (this.iconResourceId != null) { + json[r'iconResourceId'] = this.iconResourceId; + } else { + json[r'iconResourceId'] = null; + } + if (this.iconSource != null) { + json[r'iconSource'] = this.iconSource; + } else { + json[r'iconSource'] = null; + } + if (this.categories != null) { + json[r'categories'] = this.categories; + } else { + json[r'categories'] = null; + } + if (this.centerLatitude != null) { + json[r'centerLatitude'] = this.centerLatitude; + } else { + json[r'centerLatitude'] = null; + } + if (this.centerLongitude != null) { + json[r'centerLongitude'] = this.centerLongitude; + } else { + json[r'centerLongitude'] = null; + } + return json; + } + + /// Returns a new [MapDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "MapDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + zoom: mapValueOfType(json, r'zoom'), + mapType: MapTypeApp.fromJson(json[r'mapType']), + mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']), + mapProvider: MapProvider.fromJson(json[r'mapProvider']), + points: GeoPointDTO.listFromJson(json[r'points']), + iconResourceId: mapValueOfType(json, r'iconResourceId'), + iconSource: mapValueOfType(json, r'iconSource'), + categories: CategorieDTO.listFromJson(json[r'categories']), + centerLatitude: mapValueOfType(json, r'centerLatitude'), + centerLongitude: mapValueOfType(json, r'centerLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/pdf_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_provider.dart similarity index 57% rename from manager_api/lib/model/pdf_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_provider.dart index 53cb445..27aa47a 100644 --- a/manager_api/lib/model/pdf_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_provider.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class PdfDTO { - /// Returns a new [PdfDTO] instance. - PdfDTO({ - this.pdfs = const [], - }); +class MapDTOAllOfMapProvider { + /// Returns a new [MapDTOAllOfMapProvider] instance. + MapDTOAllOfMapProvider(); - List? pdfs; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapProvider && @override - bool operator ==(Object other) => identical(this, other) || other is PdfDTO && - other.pdfs == pdfs; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (pdfs == null ? 0 : pdfs!.hashCode); @override - String toString() => 'PdfDTO[pdfs=$pdfs]'; + String toString() => 'MapDTOAllOfMapProvider[]'; Map toJson() { final json = {}; - if (this.pdfs != null) { - json[r'pdfs'] = this.pdfs; - } else { - json[r'pdfs'] = null; - } return json; } - /// Returns a new [PdfDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapProvider] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static PdfDTO? fromJson(dynamic value) { + static MapDTOAllOfMapProvider? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class PdfDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PdfDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PdfDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapProvider[$key]" has a null value in JSON.'); }); return true; }()); - return PdfDTO( - pdfs: PDFFileDTO.listFromJson(json[r'pdfs']), + return MapDTOAllOfMapProvider( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = PdfDTO.fromJson(row); + final value = MapDTOAllOfMapProvider.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class PdfDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = PdfDTO.fromJson(entry.value); + final value = MapDTOAllOfMapProvider.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class PdfDTO { return map; } - // maps a json object with a list of PdfDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PdfDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapProvider.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/web_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_type.dart similarity index 56% rename from manager_api/lib/model/web_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_type.dart index 98d5c31..1aab427 100644 --- a/manager_api/lib/model/web_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class WebDTO { - /// Returns a new [WebDTO] instance. - WebDTO({ - this.source_, - }); +class MapDTOAllOfMapType { + /// Returns a new [MapDTOAllOfMapType] instance. + MapDTOAllOfMapType(); - String? source_; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapType && @override - bool operator ==(Object other) => identical(this, other) || other is WebDTO && - other.source_ == source_; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); @override - String toString() => 'WebDTO[source_=$source_]'; + String toString() => 'MapDTOAllOfMapType[]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; - } else { - json[r'source'] = null; - } return json; } - /// Returns a new [WebDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapType] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static WebDTO? fromJson(dynamic value) { + static MapDTOAllOfMapType? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class WebDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "WebDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "WebDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapType[$key]" has a null value in JSON.'); }); return true; }()); - return WebDTO( - source_: mapValueOfType(json, r'source'), + return MapDTOAllOfMapType( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = WebDTO.fromJson(row); + final value = MapDTOAllOfMapType.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class WebDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = WebDTO.fromJson(entry.value); + final value = MapDTOAllOfMapType.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class WebDTO { return map; } - // maps a json object with a list of WebDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = WebDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapType.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/video_dto.dart b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart similarity index 56% rename from manager_api/lib/model/video_dto.dart rename to manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart index 01540ef..e98d8e7 100644 --- a/manager_api/lib/model/video_dto.dart +++ b/manager_api_new/lib/model/map_dto_all_of_map_type_mapbox.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class VideoDTO { - /// Returns a new [VideoDTO] instance. - VideoDTO({ - this.source_, - }); +class MapDTOAllOfMapTypeMapbox { + /// Returns a new [MapDTOAllOfMapTypeMapbox] instance. + MapDTOAllOfMapTypeMapbox(); - String? source_; + /*@override + bool operator ==(Object other) => identical(this, other) || other is MapDTOAllOfMapTypeMapbox && @override - bool operator ==(Object other) => identical(this, other) || other is VideoDTO && - other.source_ == source_; - - @override - int get hashCode => + int get hashCode =>*/ // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); @override - String toString() => 'VideoDTO[source_=$source_]'; + String toString() => 'MapDTOAllOfMapTypeMapbox[]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; - } else { - json[r'source'] = null; - } return json; } - /// Returns a new [VideoDTO] instance and imports its values from + /// Returns a new [MapDTOAllOfMapTypeMapbox] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static VideoDTO? fromJson(dynamic value) { + static MapDTOAllOfMapTypeMapbox? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class VideoDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "VideoDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "VideoDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "MapDTOAllOfMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOAllOfMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return VideoDTO( - source_: mapValueOfType(json, r'source'), + return MapDTOAllOfMapTypeMapbox( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = VideoDTO.fromJson(row); + final value = MapDTOAllOfMapTypeMapbox.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class VideoDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = VideoDTO.fromJson(entry.value); + final value = MapDTOAllOfMapTypeMapbox.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class VideoDTO { return map; } - // maps a json object with a list of VideoDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of MapDTOAllOfMapTypeMapbox-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = VideoDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOAllOfMapTypeMapbox.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/map_dto_map_provider.dart b/manager_api_new/lib/model/map_dto_map_provider.dart similarity index 75% rename from manager_api/lib/model/map_dto_map_provider.dart rename to manager_api_new/lib/model/map_dto_map_provider.dart index 2ab6869..df0842a 100644 --- a/manager_api/lib/model/map_dto_map_provider.dart +++ b/manager_api_new/lib/model/map_dto_map_provider.dart @@ -15,7 +15,8 @@ class MapDTOMapProvider { MapDTOMapProvider(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapProvider; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapProvider; @override String toString() => 'MapDTOMapProvider[]'; @@ -37,19 +38,23 @@ class MapDTOMapProvider { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapProvider[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapProvider( - ); + return MapDTOMapProvider(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapProvider { } // maps a json object with a list of MapDTOMapProvider-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapProvider.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapProvider.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_dto_map_type.dart b/manager_api_new/lib/model/map_dto_map_type.dart similarity index 76% rename from manager_api/lib/model/map_dto_map_type.dart rename to manager_api_new/lib/model/map_dto_map_type.dart index 8b78f37..97f1df5 100644 --- a/manager_api/lib/model/map_dto_map_type.dart +++ b/manager_api_new/lib/model/map_dto_map_type.dart @@ -15,7 +15,8 @@ class MapDTOMapType { MapDTOMapType(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapType; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapType; @override String toString() => 'MapDTOMapType[]'; @@ -37,19 +38,23 @@ class MapDTOMapType { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapType[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapType[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapType[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapType[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapType( - ); + return MapDTOMapType(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapType { } // maps a json object with a list of MapDTOMapType-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapType.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapType.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_dto_map_type_mapbox.dart b/manager_api_new/lib/model/map_dto_map_type_mapbox.dart similarity index 77% rename from manager_api/lib/model/map_dto_map_type_mapbox.dart rename to manager_api_new/lib/model/map_dto_map_type_mapbox.dart index 2c164f5..32bf26d 100644 --- a/manager_api/lib/model/map_dto_map_type_mapbox.dart +++ b/manager_api_new/lib/model/map_dto_map_type_mapbox.dart @@ -15,7 +15,8 @@ class MapDTOMapTypeMapbox { MapDTOMapTypeMapbox(); @override - bool operator ==(Object other) => identical(this, other) || other is MapDTOMapTypeMapbox; + bool operator ==(Object other) => + identical(this, other) || other is MapDTOMapTypeMapbox; @override String toString() => 'MapDTOMapTypeMapbox[]'; @@ -37,19 +38,23 @@ class MapDTOMapTypeMapbox { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return MapDTOMapTypeMapbox( - ); + return MapDTOMapTypeMapbox(); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,20 +82,24 @@ class MapDTOMapTypeMapbox { } // maps a json object with a list of MapDTOMapTypeMapbox-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MapDTOMapTypeMapbox.listFromJson(entry.value, growable: growable,); + map[entry.key] = MapDTOMapTypeMapbox.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/map_provider.dart b/manager_api_new/lib/model/map_provider.dart similarity index 99% rename from manager_api/lib/model/map_provider.dart rename to manager_api_new/lib/model/map_provider.dart index c017c9b..d6de9a6 100644 --- a/manager_api/lib/model/map_provider.dart +++ b/manager_api_new/lib/model/map_provider.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/manager_api/lib/model/map_type_app.dart b/manager_api_new/lib/model/map_type_app.dart similarity index 53% rename from manager_api/lib/model/map_type_app.dart rename to manager_api_new/lib/model/map_type_app.dart index 174ce99..dd78f67 100644 --- a/manager_api/lib/model/map_type_app.dart +++ b/manager_api_new/lib/model/map_type_app.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,24 +23,28 @@ class MapTypeApp { int toJson() => value; - static const none = MapTypeApp._(0); - static const normal = MapTypeApp._(1); - static const satellite = MapTypeApp._(2); - static const terrain = MapTypeApp._(3); - static const hybrid = MapTypeApp._(4); + static const number0 = MapTypeApp._(0); + static const number1 = MapTypeApp._(1); + static const number2 = MapTypeApp._(2); + static const number3 = MapTypeApp._(3); + static const number4 = MapTypeApp._(4); /// List of all possible values in this [enum][MapTypeApp]. static const values = [ - none, - normal, - satellite, - terrain, - hybrid, + number0, + number1, + number2, + number3, + number4, ]; - static MapTypeApp? fromJson(dynamic value) => MapTypeAppTypeTransformer().decode(value); + static MapTypeApp? fromJson(dynamic value) => + MapTypeAppTypeTransformer().decode(value); - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -57,7 +61,8 @@ class MapTypeApp { /// Transformation class that can [encode] an instance of [MapTypeApp] to int, /// and [decode] dynamic data back to [MapTypeApp]. class MapTypeAppTypeTransformer { - factory MapTypeAppTypeTransformer() => _instance ??= const MapTypeAppTypeTransformer._(); + factory MapTypeAppTypeTransformer() => + _instance ??= const MapTypeAppTypeTransformer._(); const MapTypeAppTypeTransformer._(); @@ -72,47 +77,23 @@ class MapTypeAppTypeTransformer { /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. MapTypeApp? decode(dynamic data, {bool allowNull = true}) { - /*if (data != null) { - switch (data.toString()) { - case r'None': return MapTypeApp.none; - case r'Normal': return MapTypeApp.normal; - case r'Satellite': return MapTypeApp.satellite; - case r'Terrain': return MapTypeApp.terrain; - case r'Hybrid': return MapTypeApp.hybrid; + if (data != null) { + switch (data) { + case 0: + return MapTypeApp.number0; + case 1: + return MapTypeApp.number1; + case 2: + return MapTypeApp.number2; + case 3: + return MapTypeApp.number3; + case 4: + return MapTypeApp.number4; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); } } - }*/ - if (data != null) { - if(data.runtimeType == String) { - switch (data.toString()) { - case r'None': return MapTypeApp.none; - case r'Normal': return MapTypeApp.normal; - case r'Satellite': return MapTypeApp.satellite; - case r'Terrain': return MapTypeApp.terrain; - case r'Hybrid': return MapTypeApp.hybrid; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } else { - if(data.runtimeType == int) { - switch (data) { - case 0: return MapTypeApp.none; - case 1: return MapTypeApp.normal; - case 2: return MapTypeApp.satellite; - case 3: return MapTypeApp.terrain; - case 4: return MapTypeApp.hybrid; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - } } return null; } @@ -120,4 +101,3 @@ class MapTypeAppTypeTransformer { /// Singleton [MapTypeAppTypeTransformer] instance. static MapTypeAppTypeTransformer? _instance; } - diff --git a/manager_api/lib/model/map_type_map_box.dart b/manager_api_new/lib/model/map_type_map_box.dart similarity index 99% rename from manager_api/lib/model/map_type_map_box.dart rename to manager_api_new/lib/model/map_type_map_box.dart index 7aaad20..3f64cd0 100644 --- a/manager_api/lib/model/map_type_map_box.dart +++ b/manager_api_new/lib/model/map_type_map_box.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -115,5 +115,4 @@ class MapTypeMapBoxTypeTransformer { /// Singleton [MapTypeMapBoxTypeTransformer] instance. static MapTypeMapBoxTypeTransformer? _instance; -} - +} \ No newline at end of file diff --git a/manager_api_new/lib/model/menu_dto.dart b/manager_api_new/lib/model/menu_dto.dart new file mode 100644 index 0000000..b94e973 --- /dev/null +++ b/manager_api_new/lib/model/menu_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MenuDTO { + /// Returns a new [MenuDTO] instance. + MenuDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.sections = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? sections; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MenuDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.sections, sections); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (sections == null ? 0 : sections!.hashCode); + + @override + String toString() => + 'MenuDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, sections=$sections]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.sections != null) { + json[r'sections'] = this.sections; + } else { + json[r'sections'] = null; + } + return json; + } + + /// Returns a new [MenuDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MenuDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "MenuDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "MenuDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MenuDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + sections: SectionDTO.listFromJson(json[r'sections']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MenuDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MenuDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MenuDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MenuDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart b/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart new file mode 100644 index 0000000..1d72d6e --- /dev/null +++ b/manager_api_new/lib/model/ordered_translation_and_resource_dto.dart @@ -0,0 +1,146 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OrderedTranslationAndResourceDTO { + /// Returns a new [OrderedTranslationAndResourceDTO] instance. + OrderedTranslationAndResourceDTO({ + this.translationAndResourceDTOs = const [], + this.order, + }); + + List? translationAndResourceDTOs; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OrderedTranslationAndResourceDTO && + _deepEquality.equals( + other.translationAndResourceDTOs, translationAndResourceDTOs) && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (translationAndResourceDTOs == null + ? 0 + : translationAndResourceDTOs!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => + 'OrderedTranslationAndResourceDTO[translationAndResourceDTOs=$translationAndResourceDTOs, order=$order]'; + + Map toJson() { + final json = {}; + if (this.translationAndResourceDTOs != null) { + json[r'translationAndResourceDTOs'] = this.translationAndResourceDTOs; + } else { + json[r'translationAndResourceDTOs'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; + } + + /// Returns a new [OrderedTranslationAndResourceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OrderedTranslationAndResourceDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "OrderedTranslationAndResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "OrderedTranslationAndResourceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OrderedTranslationAndResourceDTO( + translationAndResourceDTOs: TranslationAndResourceDTO.listFromJson( + json[r'translationAndResourceDTOs']), + order: mapValueOfType(json, r'order'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OrderedTranslationAndResourceDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson( + dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OrderedTranslationAndResourceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OrderedTranslationAndResourceDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OrderedTranslationAndResourceDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/pdf_dto.dart b/manager_api_new/lib/model/pdf_dto.dart new file mode 100644 index 0000000..9782365 --- /dev/null +++ b/manager_api_new/lib/model/pdf_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PdfDTO { + /// Returns a new [PdfDTO] instance. + PdfDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.pdfs = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? pdfs; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PdfDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.pdfs, pdfs); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (pdfs == null ? 0 : pdfs!.hashCode); + + @override + String toString() => + 'PdfDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, pdfs=$pdfs]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.pdfs != null) { + json[r'pdfs'] = this.pdfs; + } else { + json[r'pdfs'] = null; + } + return json; + } + + /// Returns a new [PdfDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PdfDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PdfDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PdfDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PdfDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + pdfs: OrderedTranslationAndResourceDTO.listFromJson(json[r'pdfs']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PdfDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PdfDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PdfDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PdfDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/pdf_file_dto.dart b/manager_api_new/lib/model/pdf_file_dto.dart similarity index 70% rename from manager_api/lib/model/pdf_file_dto.dart rename to manager_api_new/lib/model/pdf_file_dto.dart index fbe682e..dc4cfa3 100644 --- a/manager_api/lib/model/pdf_file_dto.dart +++ b/manager_api_new/lib/model/pdf_file_dto.dart @@ -22,18 +22,21 @@ class PDFFileDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is PDFFileDTO && - other.pdfFilesAndTitles == pdfFilesAndTitles && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is PDFFileDTO && + other.pdfFilesAndTitles == pdfFilesAndTitles && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]'; + String toString() => + 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]'; Map toJson() { final json = {}; @@ -62,21 +65,27 @@ class PDFFileDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PDFFileDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PDFFileDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PDFFileDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PDFFileDTO[$key]" has a null value in JSON.'); }); return true; }()); return PDFFileDTO( - pdfFilesAndTitles: TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']), + pdfFilesAndTitles: + TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']), order: mapValueOfType(json, r'order'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +113,24 @@ class PDFFileDTO { } // maps a json object with a list of PDFFileDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PDFFileDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = PDFFileDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/player_message_dto.dart b/manager_api_new/lib/model/player_message_dto.dart similarity index 76% rename from manager_api/lib/model/player_message_dto.dart rename to manager_api_new/lib/model/player_message_dto.dart index 9e67106..a3fde1b 100644 --- a/manager_api/lib/model/player_message_dto.dart +++ b/manager_api_new/lib/model/player_message_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -34,18 +34,21 @@ class PlayerMessageDTO { bool? isDeleted; @override - bool operator ==(Object other) => identical(this, other) || other is PlayerMessageDTO && - other.configChanged == configChanged && - other.isDeleted == isDeleted; + bool operator ==(Object other) => + identical(this, other) || + other is PlayerMessageDTO && + other.configChanged == configChanged && + other.isDeleted == isDeleted; @override int get hashCode => - // ignore: unnecessary_parenthesis - (configChanged == null ? 0 : configChanged!.hashCode) + - (isDeleted == null ? 0 : isDeleted!.hashCode); + // ignore: unnecessary_parenthesis + (configChanged == null ? 0 : configChanged!.hashCode) + + (isDeleted == null ? 0 : isDeleted!.hashCode); @override - String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; + String toString() => + 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; Map toJson() { final json = {}; @@ -74,8 +77,10 @@ class PlayerMessageDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PlayerMessageDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PlayerMessageDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PlayerMessageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PlayerMessageDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -88,7 +93,10 @@ class PlayerMessageDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -116,20 +124,24 @@ class PlayerMessageDTO { } // maps a json object with a list of PlayerMessageDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PlayerMessageDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = PlayerMessageDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/puzzle_dto.dart b/manager_api_new/lib/model/puzzle_dto.dart new file mode 100644 index 0000000..de71bc4 --- /dev/null +++ b/manager_api_new/lib/model/puzzle_dto.dart @@ -0,0 +1,414 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PuzzleDTO { + /// Returns a new [PuzzleDTO] instance. + PuzzleDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.messageDebut = const [], + this.messageFin = const [], + this.puzzleImage, + this.puzzleImageId, + this.rows, + this.cols, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? messageDebut; + + List? messageFin; + + ResourceDTO? puzzleImage; + + String? puzzleImageId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? rows; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? cols; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.messageDebut, messageDebut) && + _deepEquality.equals(other.messageFin, messageFin) && + other.puzzleImage == puzzleImage && + other.puzzleImageId == puzzleImageId && + other.rows == rows && + other.cols == cols; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (messageDebut == null ? 0 : messageDebut!.hashCode) + + (messageFin == null ? 0 : messageFin!.hashCode) + + (puzzleImage == null ? 0 : puzzleImage!.hashCode) + + (puzzleImageId == null ? 0 : puzzleImageId!.hashCode) + + (rows == null ? 0 : rows!.hashCode) + + (cols == null ? 0 : cols!.hashCode); + + @override + String toString() => + 'PuzzleDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.messageDebut != null) { + json[r'messageDebut'] = this.messageDebut; + } else { + json[r'messageDebut'] = null; + } + if (this.messageFin != null) { + json[r'messageFin'] = this.messageFin; + } else { + json[r'messageFin'] = null; + } + if (this.puzzleImage != null) { + json[r'puzzleImage'] = this.puzzleImage; + } else { + json[r'puzzleImage'] = null; + } + if (this.puzzleImageId != null) { + json[r'puzzleImageId'] = this.puzzleImageId; + } else { + json[r'puzzleImageId'] = null; + } + if (this.rows != null) { + json[r'rows'] = this.rows; + } else { + json[r'rows'] = null; + } + if (this.cols != null) { + json[r'cols'] = this.cols; + } else { + json[r'cols'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PuzzleDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + messageDebut: + TranslationAndResourceDTO.listFromJson(json[r'messageDebut']), + messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']), + puzzleImage: ResourceDTO.fromJson(json[r'puzzleImage']), + puzzleImageId: mapValueOfType(json, r'puzzleImageId'), + rows: mapValueOfType(json, r'rows'), + cols: mapValueOfType(json, r'cols'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart b/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart new file mode 100644 index 0000000..adfdb2d --- /dev/null +++ b/manager_api_new/lib/model/puzzle_dto_all_of_puzzle_image.dart @@ -0,0 +1,191 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PuzzleDTOAllOfPuzzleImage { + /// Returns a new [PuzzleDTOAllOfPuzzleImage] instance. + PuzzleDTOAllOfPuzzleImage({ + this.id, + this.type, + this.label, + this.url, + this.dateCreation, + this.instanceId, + }); + + String? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? type; + + String? label; + + String? url; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? instanceId; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTOAllOfPuzzleImage && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); + + @override + String toString() => + 'PuzzleDTOAllOfPuzzleImage[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTOAllOfPuzzleImage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTOAllOfPuzzleImage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "PuzzleDTOAllOfPuzzleImage[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTOAllOfPuzzleImage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTOAllOfPuzzleImage( + id: mapValueOfType(json, r'id'), + type: ResourceType.fromJson(json[r'type']), + label: mapValueOfType(json, r'label'), + url: mapValueOfType(json, r'url'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + instanceId: mapValueOfType(json, r'instanceId'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTOAllOfPuzzleImage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTOAllOfPuzzleImage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTOAllOfPuzzleImage-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTOAllOfPuzzleImage.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/puzzle_dto_image.dart b/manager_api_new/lib/model/puzzle_dto_image.dart similarity index 75% rename from manager_api/lib/model/puzzle_dto_image.dart rename to manager_api_new/lib/model/puzzle_dto_image.dart index 1cd92ce..d47344f 100644 --- a/manager_api/lib/model/puzzle_dto_image.dart +++ b/manager_api_new/lib/model/puzzle_dto_image.dart @@ -46,26 +46,29 @@ class PuzzleDTOImage { ResourceType? resourceType; @override - bool operator ==(Object other) => identical(this, other) || other is PuzzleDTOImage && - other.title == title && - other.description == description && - other.resourceId == resourceId && - other.resourceUrl == resourceUrl && - other.order == order && - other.resourceType == resourceType; + bool operator ==(Object other) => + identical(this, other) || + other is PuzzleDTOImage && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; @override int get hashCode => - // ignore: unnecessary_parenthesis - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode); + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); @override - String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + String toString() => + 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; Map toJson() { final json = {}; @@ -114,8 +117,10 @@ class PuzzleDTOImage { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "PuzzleDTOImage[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "PuzzleDTOImage[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.'); }); return true; }()); @@ -132,7 +137,10 @@ class PuzzleDTOImage { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +168,24 @@ class PuzzleDTOImage { } // maps a json object with a list of PuzzleDTOImage-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = PuzzleDTOImage.listFromJson(entry.value, growable: growable,); + map[entry.key] = PuzzleDTOImage.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/question_dto.dart b/manager_api_new/lib/model/question_dto.dart similarity index 69% rename from manager_api/lib/model/question_dto.dart rename to manager_api_new/lib/model/question_dto.dart index 4eb1254..686d4f4 100644 --- a/manager_api/lib/model/question_dto.dart +++ b/manager_api_new/lib/model/question_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,6 +13,7 @@ part of openapi.api; class QuestionDTO { /// Returns a new [QuestionDTO] instance. QuestionDTO({ + this.id, this.label = const [], this.responses = const [], this.imageBackgroundResourceId, @@ -21,18 +22,20 @@ class QuestionDTO { this.order, }); - List? label; - - List? responses; - - String? imageBackgroundResourceId; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// + int? id; + + List? label; + + List? responses; + + String? imageBackgroundResourceId; + ResourceType? imageBackgroundResourceType; String? imageBackgroundResourceUrl; @@ -46,29 +49,45 @@ class QuestionDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is QuestionDTO && - other.label == label && - other.responses == responses && - other.imageBackgroundResourceId == imageBackgroundResourceId && - other.imageBackgroundResourceType == imageBackgroundResourceType && - other.imageBackgroundResourceUrl == imageBackgroundResourceUrl && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is QuestionDTO && + other.id == id && + _deepEquality.equals(other.label, label) && + _deepEquality.equals(other.responses, responses) && + other.imageBackgroundResourceId == imageBackgroundResourceId && + other.imageBackgroundResourceType == imageBackgroundResourceType && + other.imageBackgroundResourceUrl == imageBackgroundResourceUrl && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (responses == null ? 0 : responses!.hashCode) + - (imageBackgroundResourceId == null ? 0 : imageBackgroundResourceId!.hashCode) + - (imageBackgroundResourceType == null ? 0 : imageBackgroundResourceType!.hashCode) + - (imageBackgroundResourceUrl == null ? 0 : imageBackgroundResourceUrl!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (responses == null ? 0 : responses!.hashCode) + + (imageBackgroundResourceId == null + ? 0 + : imageBackgroundResourceId!.hashCode) + + (imageBackgroundResourceType == null + ? 0 + : imageBackgroundResourceType!.hashCode) + + (imageBackgroundResourceUrl == null + ? 0 + : imageBackgroundResourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'QuestionDTO[label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]'; + String toString() => + 'QuestionDTO[id=$id, label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]'; Map toJson() { final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } if (this.label != null) { json[r'label'] = this.label; } else { @@ -114,13 +133,16 @@ class QuestionDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuestionDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuestionDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuestionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuestionDTO[$key]" has a null value in JSON.'); }); return true; }()); return QuestionDTO( + id: mapValueOfType(json, r'id'), label: TranslationAndResourceDTO.listFromJson(json[r'label']), responses: ResponseDTO.listFromJson(json[r'responses']), imageBackgroundResourceId: mapValueOfType(json, r'imageBackgroundResourceId'), @@ -132,7 +154,10 @@ class QuestionDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +185,24 @@ class QuestionDTO { } // maps a json object with a list of QuestionDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuestionDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuestionDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/question_dto_image_background_resource_type.dart b/manager_api_new/lib/model/question_dto_image_background_resource_type.dart new file mode 100644 index 0000000..fae2816 --- /dev/null +++ b/manager_api_new/lib/model/question_dto_image_background_resource_type.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuestionDTOImageBackgroundResourceType { + /// Returns a new [QuestionDTOImageBackgroundResourceType] instance. + QuestionDTOImageBackgroundResourceType(); + + /* @override + bool operator ==(Object other) => identical(this, other) || other is QuestionDTOImageBackgroundResourceType && + + @override + int get hashCode =>*/ + // ignore: unnecessary_parenthesis + + @override + String toString() => 'QuestionDTOImageBackgroundResourceType[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [QuestionDTOImageBackgroundResourceType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuestionDTOImageBackgroundResourceType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QuestionDTOImageBackgroundResourceType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QuestionDTOImageBackgroundResourceType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuestionDTOImageBackgroundResourceType( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuestionDTOImageBackgroundResourceType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuestionDTOImageBackgroundResourceType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuestionDTOImageBackgroundResourceType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuestionDTOImageBackgroundResourceType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/quiz_dto.dart b/manager_api_new/lib/model/quiz_dto.dart new file mode 100644 index 0000000..62ba692 --- /dev/null +++ b/manager_api_new/lib/model/quiz_dto.dart @@ -0,0 +1,392 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizDTO { + /// Returns a new [QuizDTO] instance. + QuizDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.questions = const [], + this.badLevel = const [], + this.mediumLevel = const [], + this.goodLevel = const [], + this.greatLevel = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? questions; + + List? badLevel; + + List? mediumLevel; + + List? goodLevel; + + List? greatLevel; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.questions, questions) && + _deepEquality.equals(other.badLevel, badLevel) && + _deepEquality.equals(other.mediumLevel, mediumLevel) && + _deepEquality.equals(other.goodLevel, goodLevel) && + _deepEquality.equals(other.greatLevel, greatLevel); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (questions == null ? 0 : questions!.hashCode) + + (badLevel == null ? 0 : badLevel!.hashCode) + + (mediumLevel == null ? 0 : mediumLevel!.hashCode) + + (goodLevel == null ? 0 : goodLevel!.hashCode) + + (greatLevel == null ? 0 : greatLevel!.hashCode); + + @override + String toString() => + 'QuizDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.questions != null) { + json[r'questions'] = this.questions; + } else { + json[r'questions'] = null; + } + if (this.badLevel != null) { + json[r'bad_level'] = this.badLevel; + } else { + json[r'bad_level'] = null; + } + if (this.mediumLevel != null) { + json[r'medium_level'] = this.mediumLevel; + } else { + json[r'medium_level'] = null; + } + if (this.goodLevel != null) { + json[r'good_level'] = this.goodLevel; + } else { + json[r'good_level'] = null; + } + if (this.greatLevel != null) { + json[r'great_level'] = this.greatLevel; + } else { + json[r'great_level'] = null; + } + return json; + } + + /// Returns a new [QuizDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + questions: QuestionDTO.listFromJson(json[r'questions']), + badLevel: TranslationAndResourceDTO.listFromJson(json[r'bad_level']), + mediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'medium_level']), + goodLevel: TranslationAndResourceDTO.listFromJson(json[r'good_level']), + greatLevel: + TranslationAndResourceDTO.listFromJson(json[r'great_level']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/quiz_question.dart b/manager_api_new/lib/model/quiz_question.dart new file mode 100644 index 0000000..5a34217 --- /dev/null +++ b/manager_api_new/lib/model/quiz_question.dart @@ -0,0 +1,199 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestion { + /// Returns a new [QuizQuestion] instance. + QuizQuestion({ + required this.id, + this.label = const [], + this.responses = const [], + this.resourceId, + this.resource, + this.order, + this.sectionQuizId, + this.sectionQuiz, + }); + + int id; + + List label; + + List responses; + + String? resourceId; + + Resource? resource; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? sectionQuizId; + + QuizQuestionSectionQuiz? sectionQuiz; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestion && + other.id == id && + _deepEquality.equals(other.label, label) && + _deepEquality.equals(other.responses, responses) && + other.resourceId == resourceId && + other.resource == resource && + other.order == order && + other.sectionQuizId == sectionQuizId && + other.sectionQuiz == sectionQuiz; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (responses.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (sectionQuizId == null ? 0 : sectionQuizId!.hashCode) + + (sectionQuiz == null ? 0 : sectionQuiz!.hashCode); + + @override + String toString() => + 'QuizQuestion[id=$id, label=$label, responses=$responses, resourceId=$resourceId, resource=$resource, order=$order, sectionQuizId=$sectionQuizId, sectionQuiz=$sectionQuiz]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'responses'] = this.responses; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resource != null) { + json[r'resource'] = this.resource; + } else { + json[r'resource'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.sectionQuizId != null) { + json[r'sectionQuizId'] = this.sectionQuizId; + } else { + json[r'sectionQuizId'] = null; + } + if (this.sectionQuiz != null) { + json[r'sectionQuiz'] = this.sectionQuiz; + } else { + json[r'sectionQuiz'] = null; + } + return json; + } + + /// Returns a new [QuizQuestion] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestion? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestion[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestion[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestion( + id: mapValueOfType(json, r'id')!, + label: TranslationAndResourceDTO.listFromJson(json[r'label']), + responses: ResponseDTO.listFromJson(json[r'responses']), + resourceId: mapValueOfType(json, r'resourceId'), + resource: Resource.fromJson(json[r'resource']), + order: mapValueOfType(json, r'order'), + sectionQuizId: mapValueOfType(json, r'sectionQuizId'), + sectionQuiz: QuizQuestionSectionQuiz.fromJson(json[r'sectionQuiz']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestion.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestion.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestion-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestion.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'responses', + }; +} diff --git a/manager_api_new/lib/model/quiz_question_resource.dart b/manager_api_new/lib/model/quiz_question_resource.dart new file mode 100644 index 0000000..84171ba --- /dev/null +++ b/manager_api_new/lib/model/quiz_question_resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestionResource { + /// Returns a new [QuizQuestionResource] instance. + QuizQuestionResource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestionResource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'QuizQuestionResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [QuizQuestionResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestionResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestionResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestionResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestionResource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestionResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestionResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestionResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestionResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api_new/lib/model/quiz_question_section_quiz.dart b/manager_api_new/lib/model/quiz_question_section_quiz.dart new file mode 100644 index 0000000..44c9be4 --- /dev/null +++ b/manager_api_new/lib/model/quiz_question_section_quiz.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuizQuestionSectionQuiz { + /// Returns a new [QuizQuestionSectionQuiz] instance. + QuizQuestionSectionQuiz({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.quizQuestions = const [], + this.quizBadLevel = const [], + this.quizMediumLevel = const [], + this.quizGoodLevel = const [], + this.quizGreatLevel = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List quizQuestions; + + List quizBadLevel; + + List quizMediumLevel; + + List quizGoodLevel; + + List quizGreatLevel; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is QuizQuestionSectionQuiz && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.quizQuestions, quizQuestions) && + _deepEquality.equals(other.quizBadLevel, quizBadLevel) && + _deepEquality.equals(other.quizMediumLevel, quizMediumLevel) && + _deepEquality.equals(other.quizGoodLevel, quizGoodLevel) && + _deepEquality.equals(other.quizGreatLevel, quizGreatLevel) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (quizQuestions.hashCode) + + (quizBadLevel.hashCode) + + (quizMediumLevel.hashCode) + + (quizGoodLevel.hashCode) + + (quizGreatLevel.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'QuizQuestionSectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'quizQuestions'] = this.quizQuestions; + json[r'quizBadLevel'] = this.quizBadLevel; + json[r'quizMediumLevel'] = this.quizMediumLevel; + json[r'quizGoodLevel'] = this.quizGoodLevel; + json[r'quizGreatLevel'] = this.quizGreatLevel; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [QuizQuestionSectionQuiz] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizQuestionSectionQuiz? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "QuizQuestionSectionQuiz[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizQuestionSectionQuiz[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizQuestionSectionQuiz( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), + quizBadLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']), + quizMediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']), + quizGoodLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']), + quizGreatLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuizQuestionSectionQuiz.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizQuestionSectionQuiz.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizQuestionSectionQuiz-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuizQuestionSectionQuiz.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'quizQuestions', + 'quizBadLevel', + 'quizMediumLevel', + 'quizGoodLevel', + 'quizGreatLevel', + }; +} diff --git a/manager_api/lib/model/quizz_dto.dart b/manager_api_new/lib/model/quizz_dto.dart similarity index 70% rename from manager_api/lib/model/quizz_dto.dart rename to manager_api_new/lib/model/quizz_dto.dart index 0a3b921..6daa28d 100644 --- a/manager_api/lib/model/quizz_dto.dart +++ b/manager_api_new/lib/model/quizz_dto.dart @@ -31,24 +31,27 @@ class QuizzDTO { LevelDTO? greatLevel; @override - bool operator ==(Object other) => identical(this, other) || other is QuizzDTO && - other.questions == questions && - other.badLevel == badLevel && - other.mediumLevel == mediumLevel && - other.goodLevel == goodLevel && - other.greatLevel == greatLevel; + bool operator ==(Object other) => + identical(this, other) || + other is QuizzDTO && + other.questions == questions && + other.badLevel == badLevel && + other.mediumLevel == mediumLevel && + other.goodLevel == goodLevel && + other.greatLevel == greatLevel; @override int get hashCode => - // ignore: unnecessary_parenthesis - (questions == null ? 0 : questions!.hashCode) + - (badLevel == null ? 0 : badLevel!.hashCode) + - (mediumLevel == null ? 0 : mediumLevel!.hashCode) + - (goodLevel == null ? 0 : goodLevel!.hashCode) + - (greatLevel == null ? 0 : greatLevel!.hashCode); + // ignore: unnecessary_parenthesis + (questions == null ? 0 : questions!.hashCode) + + (badLevel == null ? 0 : badLevel!.hashCode) + + (mediumLevel == null ? 0 : mediumLevel!.hashCode) + + (goodLevel == null ? 0 : goodLevel!.hashCode) + + (greatLevel == null ? 0 : greatLevel!.hashCode); @override - String toString() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; + String toString() => + 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; Map toJson() { final json = {}; @@ -92,14 +95,16 @@ class QuizzDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuizzDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuizzDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuizzDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizzDTO[$key]" has a null value in JSON.'); }); return true; }()); return QuizzDTO( - questions: QuestionDTO.listFromJson(json[r'questions']), + questions: QuestionDTO.listFromJson(json[r'questions']) ?? const [], badLevel: LevelDTO.fromJson(json[r'bad_level']), mediumLevel: LevelDTO.fromJson(json[r'medium_level']), goodLevel: LevelDTO.fromJson(json[r'good_level']), @@ -109,7 +114,10 @@ class QuizzDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -137,20 +145,24 @@ class QuizzDTO { } // maps a json object with a list of QuizzDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuizzDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuizzDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/quizz_dto_bad_level.dart b/manager_api_new/lib/model/quizz_dto_bad_level.dart similarity index 76% rename from manager_api/lib/model/quizz_dto_bad_level.dart rename to manager_api_new/lib/model/quizz_dto_bad_level.dart index 3e2fee2..4a44df1 100644 --- a/manager_api/lib/model/quizz_dto_bad_level.dart +++ b/manager_api_new/lib/model/quizz_dto_bad_level.dart @@ -19,13 +19,14 @@ class QuizzDTOBadLevel { List? label; @override - bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel && - other.label == label; + bool operator ==(Object other) => + identical(this, other) || + other is QuizzDTOBadLevel && other.label == label; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode); @override String toString() => 'QuizzDTOBadLevel[label=$label]'; @@ -52,8 +53,10 @@ class QuizzDTOBadLevel { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "QuizzDTOBadLevel[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "QuizzDTOBadLevel[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.'); }); return true; }()); @@ -65,7 +68,10 @@ class QuizzDTOBadLevel { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -93,20 +99,24 @@ class QuizzDTOBadLevel { } // maps a json object with a list of QuizzDTOBadLevel-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = QuizzDTOBadLevel.listFromJson(entry.value, growable: growable,); + map[entry.key] = QuizzDTOBadLevel.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/resource.dart b/manager_api_new/lib/model/resource.dart new file mode 100644 index 0000000..460c310 --- /dev/null +++ b/manager_api_new/lib/model/resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Resource { + /// Returns a new [Resource] instance. + Resource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Resource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'Resource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [Resource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Resource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "Resource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Resource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Resource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Resource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Resource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Resource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Resource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/resource_dto.dart b/manager_api_new/lib/model/resource_dto.dart similarity index 74% rename from manager_api/lib/model/resource_dto.dart rename to manager_api_new/lib/model/resource_dto.dart index 028b523..3f8386b 100644 --- a/manager_api/lib/model/resource_dto.dart +++ b/manager_api_new/lib/model/resource_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -46,26 +46,29 @@ class ResourceDTO { String? instanceId; @override - bool operator ==(Object other) => identical(this, other) || other is ResourceDTO && - other.id == id && - other.type == type && - other.label == label && - other.url == url && - other.dateCreation == dateCreation && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is ResourceDTO && + other.id == id && + other.type == type && + other.label == label && + other.url == url && + other.dateCreation == dateCreation && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (url == null ? 0 : url!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (url == null ? 0 : url!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => + 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -114,8 +117,10 @@ class ResourceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ResourceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ResourceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ResourceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -125,14 +130,17 @@ class ResourceDTO { type: ResourceType.fromJson(json[r'type']), label: mapValueOfType(json, r'label'), url: mapValueOfType(json, r'url'), - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,20 +168,24 @@ class ResourceDTO { } // maps a json object with a list of ResourceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ResourceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ResourceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/resource_type.dart b/manager_api_new/lib/model/resource_type.dart similarity index 99% rename from manager_api/lib/model/resource_type.dart rename to manager_api_new/lib/model/resource_type.dart index cfde41e..b42ec0c 100644 --- a/manager_api/lib/model/resource_type.dart +++ b/manager_api_new/lib/model/resource_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first diff --git a/manager_api/lib/model/response_dto.dart b/manager_api_new/lib/model/response_dto.dart similarity index 76% rename from manager_api/lib/model/response_dto.dart rename to manager_api_new/lib/model/response_dto.dart index 6963754..d9e8dc3 100644 --- a/manager_api/lib/model/response_dto.dart +++ b/manager_api_new/lib/model/response_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -37,20 +37,23 @@ class ResponseDTO { int? order; @override - bool operator ==(Object other) => identical(this, other) || other is ResponseDTO && - other.label == label && - other.isGood == isGood && - other.order == order; + bool operator ==(Object other) => + identical(this, other) || + other is ResponseDTO && + _deepEquality.equals(other.label, label) && + other.isGood == isGood && + other.order == order; @override int get hashCode => - // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (isGood == null ? 0 : isGood!.hashCode) + - (order == null ? 0 : order!.hashCode); + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode) + + (isGood == null ? 0 : isGood!.hashCode) + + (order == null ? 0 : order!.hashCode); @override - String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; + String toString() => + 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; Map toJson() { final json = {}; @@ -84,8 +87,10 @@ class ResponseDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "ResponseDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "ResponseDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "ResponseDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "ResponseDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -99,7 +104,10 @@ class ResponseDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,20 +135,24 @@ class ResponseDTO { } // maps a json object with a list of ResponseDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = ResponseDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = ResponseDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/section.dart b/manager_api_new/lib/model/section.dart new file mode 100644 index 0000000..43f6ebe --- /dev/null +++ b/manager_api_new/lib/model/section.dart @@ -0,0 +1,309 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Section { + /// Returns a new [Section] instance. + Section({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Section && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'Section[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [Section] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Section? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "Section[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "Section[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Section( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List
listFromJson( + dynamic json, { + bool growable = false, + }) { + final result =
[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Section.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Section.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Section-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Section.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/section_dto.dart b/manager_api_new/lib/model/section_dto.dart similarity index 72% rename from manager_api/lib/model/section_dto.dart rename to manager_api_new/lib/model/section_dto.dart index b3c097e..d03c3c7 100644 --- a/manager_api/lib/model/section_dto.dart +++ b/manager_api_new/lib/model/section_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -23,7 +23,6 @@ class SectionDTO { this.isSubSection, this.parentId, this.type, - this.data, this.dateCreation, this.order, this.instanceId, @@ -66,8 +65,6 @@ class SectionDTO { /// SectionType? type; - String? data; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -97,52 +94,53 @@ class SectionDTO { int? beaconId; @override - bool operator ==(Object other) => identical(this, other) || other is SectionDTO && - other.id == id && - other.label == label && - other.title == title && - other.description == description && - other.imageId == imageId && - other.imageSource == imageSource && - other.configurationId == configurationId && - other.isSubSection == isSubSection && - other.parentId == parentId && - other.type == type && - other.data == data && - other.dateCreation == dateCreation && - other.order == order && - other.instanceId == instanceId && - other.latitude == latitude && - other.longitude == longitude && - other.meterZoneGPS == meterZoneGPS && - other.isBeacon == isBeacon && - other.beaconId == beaconId; + bool operator ==(Object other) => + identical(this, other) || + other is SectionDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (label == null ? 0 : label!.hashCode) + - (title == null ? 0 : title!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (imageId == null ? 0 : imageId!.hashCode) + - (imageSource == null ? 0 : imageSource!.hashCode) + - (configurationId == null ? 0 : configurationId!.hashCode) + - (isSubSection == null ? 0 : isSubSection!.hashCode) + - (parentId == null ? 0 : parentId!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (data == null ? 0 : data!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + - (isBeacon == null ? 0 : isBeacon!.hashCode) + - (beaconId == null ? 0 : beaconId!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode); @override - String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]'; + String toString() => + 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]'; Map toJson() { final json = {}; @@ -196,11 +194,6 @@ class SectionDTO { } else { json[r'type'] = null; } - if (this.data != null) { - json[r'data'] = this.data; - } else { - json[r'data'] = null; - } if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { @@ -256,8 +249,10 @@ class SectionDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "SectionDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "SectionDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "SectionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -273,8 +268,7 @@ class SectionDTO { isSubSection: mapValueOfType(json, r'isSubSection'), parentId: mapValueOfType(json, r'parentId'), type: SectionType.fromJson(json[r'type']), - data: mapValueOfType(json, r'data'), - dateCreation: mapDateTime(json, r'dateCreation', ''), + dateCreation: mapDateTime(json, r'dateCreation', r''), order: mapValueOfType(json, r'order'), instanceId: mapValueOfType(json, r'instanceId'), latitude: mapValueOfType(json, r'latitude'), @@ -287,7 +281,10 @@ class SectionDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -315,20 +312,24 @@ class SectionDTO { } // maps a json object with a list of SectionDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = SectionDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/section_map.dart b/manager_api_new/lib/model/section_map.dart new file mode 100644 index 0000000..770b757 --- /dev/null +++ b/manager_api_new/lib/model/section_map.dart @@ -0,0 +1,424 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMap { + /// Returns a new [SectionMap] instance. + SectionMap({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.mapCategories = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.mapZoom, + this.mapMapType, + this.mapTypeMapbox, + this.mapMapProvider, + this.mapPoints = const [], + this.mapResourceId, + this.mapResource, + this.mapCenterLatitude, + this.mapCenterLongitude, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List mapCategories; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? mapZoom; + + SectionMapAllOfMapMapType? mapMapType; + + SectionMapAllOfMapTypeMapbox? mapTypeMapbox; + + SectionMapAllOfMapMapProvider? mapMapProvider; + + List? mapPoints; + + String? mapResourceId; + + SectionMapAllOfMapResource? mapResource; + + String? mapCenterLatitude; + + String? mapCenterLongitude; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionMap && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.mapCategories, mapCategories) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.mapZoom == mapZoom && + other.mapMapType == mapMapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapMapProvider == mapMapProvider && + _deepEquality.equals(other.mapPoints, mapPoints) && + other.mapResourceId == mapResourceId && + other.mapResource == mapResource && + other.mapCenterLatitude == mapCenterLatitude && + other.mapCenterLongitude == mapCenterLongitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (mapCategories.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (mapZoom == null ? 0 : mapZoom!.hashCode) + + (mapMapType == null ? 0 : mapMapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapMapProvider == null ? 0 : mapMapProvider!.hashCode) + + (mapPoints == null ? 0 : mapPoints!.hashCode) + + (mapResourceId == null ? 0 : mapResourceId!.hashCode) + + (mapResource == null ? 0 : mapResource!.hashCode) + + (mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) + + (mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode); + + @override + String toString() => + 'SectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'mapCategories'] = this.mapCategories; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.mapZoom != null) { + json[r'mapZoom'] = this.mapZoom; + } else { + json[r'mapZoom'] = null; + } + if (this.mapMapType != null) { + json[r'mapMapType'] = this.mapMapType; + } else { + json[r'mapMapType'] = null; + } + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; + } + if (this.mapMapProvider != null) { + json[r'mapMapProvider'] = this.mapMapProvider; + } else { + json[r'mapMapProvider'] = null; + } + if (this.mapPoints != null) { + json[r'mapPoints'] = this.mapPoints; + } else { + json[r'mapPoints'] = null; + } + if (this.mapResourceId != null) { + json[r'mapResourceId'] = this.mapResourceId; + } else { + json[r'mapResourceId'] = null; + } + if (this.mapResource != null) { + json[r'mapResource'] = this.mapResource; + } else { + json[r'mapResource'] = null; + } + if (this.mapCenterLatitude != null) { + json[r'mapCenterLatitude'] = this.mapCenterLatitude; + } else { + json[r'mapCenterLatitude'] = null; + } + if (this.mapCenterLongitude != null) { + json[r'mapCenterLongitude'] = this.mapCenterLongitude; + } else { + json[r'mapCenterLongitude'] = null; + } + return json; + } + + /// Returns a new [SectionMap] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMap? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionMap[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionMap[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMap( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + mapZoom: mapValueOfType(json, r'mapZoom'), + mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']), + mapTypeMapbox: + SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']), + mapMapProvider: + SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']), + mapPoints: GeoPoint.listFromJson(json[r'mapPoints']), + mapResourceId: mapValueOfType(json, r'mapResourceId'), + mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']), + mapCenterLatitude: mapValueOfType(json, r'mapCenterLatitude'), + mapCenterLongitude: mapValueOfType(json, r'mapCenterLongitude'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMap.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMap.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMap-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMap.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'mapCategories', + }; +} diff --git a/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart b/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart new file mode 100644 index 0000000..1ba2900 --- /dev/null +++ b/manager_api_new/lib/model/section_map_all_of_map_map_provider.dart @@ -0,0 +1,100 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapAllOfMapMapProvider { + /// Returns a new [SectionMapAllOfMapMapProvider] instance. + SectionMapAllOfMapMapProvider(); + + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapProvider && + + @override + int get hashCode => + // ignore: unnecessary_parenthesis +*/ + @override + String toString() => 'SectionMapAllOfMapMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [SectionMapAllOfMapMapProvider] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMapAllOfMapMapProvider? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMapAllOfMapMapProvider( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMapAllOfMapMapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMapAllOfMapMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMapAllOfMapMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMapAllOfMapMapProvider.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/slider_dto.dart b/manager_api_new/lib/model/section_map_all_of_map_map_type.dart similarity index 56% rename from manager_api/lib/model/slider_dto.dart rename to manager_api_new/lib/model/section_map_all_of_map_map_type.dart index 837fb7a..2bf4aeb 100644 --- a/manager_api/lib/model/slider_dto.dart +++ b/manager_api_new/lib/model/section_map_all_of_map_map_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class SliderDTO { - /// Returns a new [SliderDTO] instance. - SliderDTO({ - this.contents = const [], - }); +class SectionMapAllOfMapMapType { + /// Returns a new [SectionMapAllOfMapMapType] instance. + SectionMapAllOfMapMapType(); - List? contents; - - @override - bool operator ==(Object other) => identical(this, other) || other is SliderDTO && - other.contents == contents; + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapType && @override int get hashCode => // ignore: unnecessary_parenthesis - (contents == null ? 0 : contents!.hashCode); - +*/ @override - String toString() => 'SliderDTO[contents=$contents]'; + String toString() => 'SectionMapAllOfMapMapType[]'; Map toJson() { final json = {}; - if (this.contents != null) { - json[r'contents'] = this.contents; - } else { - json[r'contents'] = null; - } return json; } - /// Returns a new [SliderDTO] instance and imports its values from + /// Returns a new [SectionMapAllOfMapMapType] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static SliderDTO? fromJson(dynamic value) { + static SectionMapAllOfMapMapType? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class SliderDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "SliderDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "SliderDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapMapType[$key]" has a null value in JSON.'); }); return true; }()); - return SliderDTO( - contents: ContentDTO.listFromJson(json[r'contents']), + return SectionMapAllOfMapMapType( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = SliderDTO.fromJson(row); + final value = SectionMapAllOfMapMapType.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class SliderDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = SliderDTO.fromJson(entry.value); + final value = SectionMapAllOfMapMapType.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class SliderDTO { return map; } - // maps a json object with a list of SliderDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of SectionMapAllOfMapMapType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = SliderDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionMapAllOfMapMapType.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api_new/lib/model/section_map_all_of_map_resource.dart b/manager_api_new/lib/model/section_map_all_of_map_resource.dart new file mode 100644 index 0000000..3caca1a --- /dev/null +++ b/manager_api_new/lib/model/section_map_all_of_map_resource.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionMapAllOfMapResource { + /// Returns a new [SectionMapAllOfMapResource] instance. + SectionMapAllOfMapResource({ + required this.id, + required this.type, + required this.label, + required this.instanceId, + this.dateCreation, + this.url, + }); + + String id; + + ResourceType type; + + String label; + + String instanceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + String? url; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionMapAllOfMapResource && + other.id == id && + other.type == type && + other.label == label && + other.instanceId == instanceId && + other.dateCreation == dateCreation && + other.url == url; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (label.hashCode) + + (instanceId.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (url == null ? 0 : url!.hashCode); + + @override + String toString() => + 'SectionMapAllOfMapResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'label'] = this.label; + json[r'instanceId'] = this.instanceId; + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; + } + return json; + } + + /// Returns a new [SectionMapAllOfMapResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionMapAllOfMapResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionMapAllOfMapResource[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionMapAllOfMapResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionMapAllOfMapResource( + id: mapValueOfType(json, r'id')!, + type: ResourceType.fromJson(json[r'type'])!, + label: mapValueOfType(json, r'label')!, + instanceId: mapValueOfType(json, r'instanceId')!, + dateCreation: mapDateTime(json, r'dateCreation', r''), + url: mapValueOfType(json, r'url'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionMapAllOfMapResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionMapAllOfMapResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionMapAllOfMapResource-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionMapAllOfMapResource.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'type', + 'label', + 'instanceId', + }; +} diff --git a/manager_api/lib/model/menu_dto.dart b/manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart similarity index 54% rename from manager_api/lib/model/menu_dto.dart rename to manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart index 0f47549..7a01593 100644 --- a/manager_api/lib/model/menu_dto.dart +++ b/manager_api_new/lib/model/section_map_all_of_map_type_mapbox.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,40 +10,29 @@ part of openapi.api; -class MenuDTO { - /// Returns a new [MenuDTO] instance. - MenuDTO({ - this.sections = const [], - }); +class SectionMapAllOfMapTypeMapbox { + /// Returns a new [SectionMapAllOfMapTypeMapbox] instance. + SectionMapAllOfMapTypeMapbox(); - List? sections; - - @override - bool operator ==(Object other) => identical(this, other) || other is MenuDTO && - other.sections == sections; + /*@override + bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapTypeMapbox && @override int get hashCode => // ignore: unnecessary_parenthesis - (sections == null ? 0 : sections!.hashCode); - +*/ @override - String toString() => 'MenuDTO[sections=$sections]'; + String toString() => 'SectionMapAllOfMapTypeMapbox[]'; Map toJson() { final json = {}; - if (this.sections != null) { - json[r'sections'] = this.sections; - } else { - json[r'sections'] = null; - } return json; } - /// Returns a new [MenuDTO] instance and imports its values from + /// Returns a new [SectionMapAllOfMapTypeMapbox] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods - static MenuDTO? fromJson(dynamic value) { + static SectionMapAllOfMapTypeMapbox? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); @@ -52,24 +41,23 @@ class MenuDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "MenuDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "MenuDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), 'Required key "SectionMapAllOfMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionMapAllOfMapTypeMapbox[$key]" has a null value in JSON.'); }); return true; }()); - return MenuDTO( - sections: SectionDTO.listFromJson(json[r'sections']), + return SectionMapAllOfMapTypeMapbox( ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { - final value = MenuDTO.fromJson(row); + final value = SectionMapAllOfMapTypeMapbox.fromJson(row); if (value != null) { result.add(value); } @@ -78,12 +66,12 @@ class MenuDTO { return result.toList(growable: growable); } - static Map mapFromJson(dynamic json) { - final map = {}; + static Map mapFromJson(dynamic json) { + final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { - final value = MenuDTO.fromJson(entry.value); + final value = SectionMapAllOfMapTypeMapbox.fromJson(entry.value); if (value != null) { map[entry.key] = value; } @@ -92,14 +80,14 @@ class MenuDTO { return map; } - // maps a json object with a list of MenuDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; + // maps a json object with a list of SectionMapAllOfMapTypeMapbox-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = MenuDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = SectionMapAllOfMapTypeMapbox.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api_new/lib/model/section_quiz.dart b/manager_api_new/lib/model/section_quiz.dart new file mode 100644 index 0000000..43861f1 --- /dev/null +++ b/manager_api_new/lib/model/section_quiz.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SectionQuiz { + /// Returns a new [SectionQuiz] instance. + SectionQuiz({ + required this.id, + required this.label, + this.title = const [], + required this.configurationId, + required this.type, + required this.isSubSection, + required this.instanceId, + this.quizQuestions = const [], + this.quizBadLevel = const [], + this.quizMediumLevel = const [], + this.quizGoodLevel = const [], + this.quizGreatLevel = const [], + this.description = const [], + this.order, + this.imageId, + this.imageSource, + this.parentId, + this.dateCreation, + this.isBeacon, + this.beaconId, + this.latitude, + this.longitude, + this.meterZoneGPS, + }); + + String id; + + String label; + + List title; + + String configurationId; + + SectionType type; + + bool isSubSection; + + String instanceId; + + List quizQuestions; + + List quizBadLevel; + + List quizMediumLevel; + + List quizGoodLevel; + + List quizGreatLevel; + + List? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + String? imageId; + + String? imageSource; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SectionQuiz && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + other.configurationId == configurationId && + other.type == type && + other.isSubSection == isSubSection && + other.instanceId == instanceId && + _deepEquality.equals(other.quizQuestions, quizQuestions) && + _deepEquality.equals(other.quizBadLevel, quizBadLevel) && + _deepEquality.equals(other.quizMediumLevel, quizMediumLevel) && + _deepEquality.equals(other.quizGoodLevel, quizGoodLevel) && + _deepEquality.equals(other.quizGreatLevel, quizGreatLevel) && + _deepEquality.equals(other.description, description) && + other.order == order && + other.imageId == imageId && + other.imageSource == imageSource && + other.parentId == parentId && + other.dateCreation == dateCreation && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (label.hashCode) + + (title.hashCode) + + (configurationId.hashCode) + + (type.hashCode) + + (isSubSection.hashCode) + + (instanceId.hashCode) + + (quizQuestions.hashCode) + + (quizBadLevel.hashCode) + + (quizMediumLevel.hashCode) + + (quizGoodLevel.hashCode) + + (quizGreatLevel.hashCode) + + (description == null ? 0 : description!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode); + + @override + String toString() => + 'SectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'label'] = this.label; + json[r'title'] = this.title; + json[r'configurationId'] = this.configurationId; + json[r'type'] = this.type; + json[r'isSubSection'] = this.isSubSection; + json[r'instanceId'] = this.instanceId; + json[r'quizQuestions'] = this.quizQuestions; + json[r'quizBadLevel'] = this.quizBadLevel; + json[r'quizMediumLevel'] = this.quizMediumLevel; + json[r'quizGoodLevel'] = this.quizGoodLevel; + json[r'quizGreatLevel'] = this.quizGreatLevel; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + return json; + } + + /// Returns a new [SectionQuiz] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionQuiz? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SectionQuiz[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SectionQuiz[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionQuiz( + id: mapValueOfType(json, r'id')!, + label: mapValueOfType(json, r'label')!, + title: TranslationDTO.listFromJson(json[r'title']), + configurationId: mapValueOfType(json, r'configurationId')!, + type: SectionType.fromJson(json[r'type'])!, + isSubSection: mapValueOfType(json, r'isSubSection')!, + instanceId: mapValueOfType(json, r'instanceId')!, + quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), + quizBadLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']), + quizMediumLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']), + quizGoodLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']), + quizGreatLevel: + TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']), + description: TranslationDTO.listFromJson(json[r'description']), + order: mapValueOfType(json, r'order'), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + parentId: mapValueOfType(json, r'parentId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionQuiz.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionQuiz.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionQuiz-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SectionQuiz.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'label', + 'title', + 'configurationId', + 'type', + 'isSubSection', + 'instanceId', + 'quizQuestions', + 'quizBadLevel', + 'quizMediumLevel', + 'quizGoodLevel', + 'quizGreatLevel', + }; +} diff --git a/manager_api/lib/model/section_type.dart b/manager_api_new/lib/model/section_type.dart similarity index 93% rename from manager_api/lib/model/section_type.dart rename to manager_api_new/lib/model/section_type.dart index 5a9cebe..ad229bc 100644 --- a/manager_api/lib/model/section_type.dart +++ b/manager_api_new/lib/model/section_type.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -10,7 +10,7 @@ part of openapi.api; -/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quizz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda 10 = Weather +/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quiz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda class SectionType { /// Instantiate a new enum with the provided [value]. const SectionType._(this.value); @@ -28,7 +28,7 @@ class SectionType { static const Video = SectionType._(2); static const Web = SectionType._(3); static const Menu = SectionType._(4); - static const Quizz = SectionType._(5); + static const Quiz = SectionType._(5); static const Article = SectionType._(6); static const Pdf = SectionType._(7); static const Puzzle = SectionType._(8); @@ -42,7 +42,7 @@ class SectionType { Video, Web, Menu, - Quizz, + Quiz, Article, Pdf, Puzzle, @@ -92,7 +92,7 @@ class SectionTypeTypeTransformer { case r'Video': return SectionType.Video; case r'Web': return SectionType.Web; case r'Menu': return SectionType.Menu; - case r'Quizz': return SectionType.Quizz; + case r'Quiz': return SectionType.Quiz; case r'Article': return SectionType.Article; case r'PDF': return SectionType.Pdf; case r'Puzzle': return SectionType.Puzzle; @@ -111,7 +111,7 @@ class SectionTypeTypeTransformer { case 2: return SectionType.Video; case 3: return SectionType.Web; case 4: return SectionType.Menu; - case 5: return SectionType.Quizz; + case 5: return SectionType.Quiz; case 6: return SectionType.Article; case 7: return SectionType.Pdf; case 8: return SectionType.Puzzle; diff --git a/manager_api_new/lib/model/slider_dto.dart b/manager_api_new/lib/model/slider_dto.dart new file mode 100644 index 0000000..87c5f1c --- /dev/null +++ b/manager_api_new/lib/model/slider_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SliderDTO { + /// Returns a new [SliderDTO] instance. + SliderDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.contents = const [], + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + List? contents; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SliderDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + _deepEquality.equals(other.contents, contents); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (contents == null ? 0 : contents!.hashCode); + + @override + String toString() => + 'SliderDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, contents=$contents]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; + } + return json; + } + + /// Returns a new [SliderDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SliderDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "SliderDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "SliderDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SliderDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + contents: ContentDTO.listFromJson(json[r'contents']), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SliderDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SliderDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SliderDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SliderDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api/lib/model/token_dto.dart b/manager_api_new/lib/model/token_dto.dart similarity index 71% rename from manager_api/lib/model/token_dto.dart rename to manager_api_new/lib/model/token_dto.dart index 1c9ceb5..be65209 100644 --- a/manager_api/lib/model/token_dto.dart +++ b/manager_api_new/lib/model/token_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -49,33 +49,36 @@ class TokenDTO { String? instanceId; - int? pinCode; + String? pinCode; @override - bool operator ==(Object other) => identical(this, other) || other is TokenDTO && - other.accessToken == accessToken && - other.refreshToken == refreshToken && - other.scope == scope && - other.tokenType == tokenType && - other.expiresIn == expiresIn && - other.expiration == expiration && - other.instanceId == instanceId && - other.pinCode == pinCode; + bool operator ==(Object other) => + identical(this, other) || + other is TokenDTO && + other.accessToken == accessToken && + other.refreshToken == refreshToken && + other.scope == scope && + other.tokenType == tokenType && + other.expiresIn == expiresIn && + other.expiration == expiration && + other.instanceId == instanceId && + other.pinCode == pinCode; @override int get hashCode => - // ignore: unnecessary_parenthesis - (accessToken == null ? 0 : accessToken!.hashCode) + - (refreshToken == null ? 0 : refreshToken!.hashCode) + - (scope == null ? 0 : scope!.hashCode) + - (tokenType == null ? 0 : tokenType!.hashCode) + - (expiresIn == null ? 0 : expiresIn!.hashCode) + - (expiration == null ? 0 : expiration!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + // ignore: unnecessary_parenthesis + (accessToken == null ? 0 : accessToken!.hashCode) + + (refreshToken == null ? 0 : refreshToken!.hashCode) + + (scope == null ? 0 : scope!.hashCode) + + (tokenType == null ? 0 : tokenType!.hashCode) + + (expiresIn == null ? 0 : expiresIn!.hashCode) + + (expiration == null ? 0 : expiration!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; + String toString() => + 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; Map toJson() { final json = {}; @@ -134,8 +137,10 @@ class TokenDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TokenDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TokenDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TokenDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TokenDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -146,15 +151,18 @@ class TokenDTO { scope: mapValueOfType(json, r'scope'), tokenType: mapValueOfType(json, r'token_type'), expiresIn: mapValueOfType(json, r'expires_in'), - expiration: mapDateTime(json, r'expiration', ''), + expiration: mapDateTime(json, r'expiration', r''), instanceId: mapValueOfType(json, r'instanceId'), - pinCode: mapValueOfType(json, r'pinCode'), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -182,20 +190,24 @@ class TokenDTO { } // maps a json object with a list of TokenDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TokenDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TokenDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/translation_and_resource_dto.dart b/manager_api_new/lib/model/translation_and_resource_dto.dart similarity index 61% rename from manager_api/lib/model/translation_and_resource_dto.dart rename to manager_api_new/lib/model/translation_and_resource_dto.dart index f365b2e..3fa9192 100644 --- a/manager_api/lib/model/translation_and_resource_dto.dart +++ b/manager_api_new/lib/model/translation_and_resource_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -16,8 +16,7 @@ class TranslationAndResourceDTO { this.language, this.value, this.resourceId, - this.resourceType, - this.resourceUrl, + this.resource, }); String? language; @@ -26,35 +25,28 @@ class TranslationAndResourceDTO { String? resourceId; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - ResourceType? resourceType; - - String? resourceUrl; + ResourceDTO? resource; @override - bool operator ==(Object other) => identical(this, other) || other is TranslationAndResourceDTO && - other.language == language && - other.value == value && - other.resourceId == resourceId && - other.resourceType == resourceType && - other.resourceUrl == resourceUrl; + bool operator ==(Object other) => + identical(this, other) || + other is TranslationAndResourceDTO && + other.language == language && + other.value == value && + other.resourceId == resourceId && + other.resource == resource; @override int get hashCode => - // ignore: unnecessary_parenthesis - (language == null ? 0 : language!.hashCode) + - (value == null ? 0 : value!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (resourceType == null ? 0 : resourceType!.hashCode) + - (resourceUrl == null ? 0 : resourceUrl!.hashCode); + // ignore: unnecessary_parenthesis + (language == null ? 0 : language!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resource == null ? 0 : resource!.hashCode); @override - String toString() => 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]'; + String toString() => + 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resource=$resource]'; Map toJson() { final json = {}; @@ -73,15 +65,10 @@ class TranslationAndResourceDTO { } else { json[r'resourceId'] = null; } - if (this.resourceType != null) { - json[r'resourceType'] = this.resourceType; + if (this.resource != null) { + json[r'resource'] = this.resource; } else { - json[r'resourceType'] = null; - } - if (this.resourceUrl != null) { - json[r'resourceUrl'] = this.resourceUrl; - } else { - json[r'resourceUrl'] = null; + json[r'resource'] = null; } return json; } @@ -98,8 +85,10 @@ class TranslationAndResourceDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -108,14 +97,16 @@ class TranslationAndResourceDTO { language: mapValueOfType(json, r'language'), value: mapValueOfType(json, r'value'), resourceId: mapValueOfType(json, r'resourceId'), - resourceType: ResourceType.fromJson(json[r'resourceType']), - resourceUrl: mapValueOfType(json, r'resourceUrl'), + resource: ResourceDTO.fromJson(json[r'resource']), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -143,20 +134,24 @@ class TranslationAndResourceDTO { } // maps a json object with a list of TranslationAndResourceDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TranslationAndResourceDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TranslationAndResourceDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/translation_dto.dart b/manager_api_new/lib/model/translation_dto.dart similarity index 75% rename from manager_api/lib/model/translation_dto.dart rename to manager_api_new/lib/model/translation_dto.dart index 4e324c2..798ab21 100644 --- a/manager_api/lib/model/translation_dto.dart +++ b/manager_api_new/lib/model/translation_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -22,15 +22,17 @@ class TranslationDTO { String? value; @override - bool operator ==(Object other) => identical(this, other) || other is TranslationDTO && - other.language == language && - other.value == value; + bool operator ==(Object other) => + identical(this, other) || + other is TranslationDTO && + other.language == language && + other.value == value; @override int get hashCode => - // ignore: unnecessary_parenthesis - (language == null ? 0 : language!.hashCode) + - (value == null ? 0 : value!.hashCode); + // ignore: unnecessary_parenthesis + (language == null ? 0 : language!.hashCode) + + (value == null ? 0 : value!.hashCode); @override String toString() => 'TranslationDTO[language=$language, value=$value]'; @@ -62,8 +64,10 @@ class TranslationDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "TranslationDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "TranslationDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "TranslationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "TranslationDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -76,7 +80,10 @@ class TranslationDTO { return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -104,20 +111,24 @@ class TranslationDTO { } // maps a json object with a list of TranslationDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = TranslationDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = TranslationDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api/lib/model/user.dart b/manager_api_new/lib/model/user.dart similarity index 52% rename from manager_api/lib/model/user.dart rename to manager_api_new/lib/model/user.dart index c3d7aad..14698a7 100644 --- a/manager_api/lib/model/user.dart +++ b/manager_api_new/lib/model/user.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -13,28 +13,30 @@ part of openapi.api; class User { /// Returns a new [User] instance. User({ - this.id, - this.email, - this.password, + required this.id, + required this.email, + required this.password, + required this.lastName, + required this.token, + required this.instanceId, this.firstName, - this.lastName, - this.token, this.dateCreation, - this.instanceId, }); - String? id; + String id; - String? email; + String email; - String? password; + String password; + + String lastName; + + String token; + + String instanceId; String? firstName; - String? lastName; - - String? token; - /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -43,76 +45,53 @@ class User { /// DateTime? dateCreation; - String? instanceId; - @override - bool operator ==(Object other) => identical(this, other) || other is User && - other.id == id && - other.email == email && - other.password == password && - other.firstName == firstName && - other.lastName == lastName && - other.token == token && - other.dateCreation == dateCreation && - other.instanceId == instanceId; + bool operator ==(Object other) => + identical(this, other) || + other is User && + other.id == id && + other.email == email && + other.password == password && + other.lastName == lastName && + other.token == token && + other.instanceId == instanceId && + other.firstName == firstName && + other.dateCreation == dateCreation; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode) + - (token == null ? 0 : token!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + // ignore: unnecessary_parenthesis + (id.hashCode) + + (email.hashCode) + + (password.hashCode) + + (lastName.hashCode) + + (token.hashCode) + + (instanceId.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode); @override - String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => + 'User[id=$id, email=$email, password=$password, lastName=$lastName, token=$token, instanceId=$instanceId, firstName=$firstName, dateCreation=$dateCreation]'; Map toJson() { final json = {}; - if (this.id != null) { - json[r'id'] = this.id; - } else { - json[r'id'] = null; - } - if (this.email != null) { - json[r'email'] = this.email; - } else { - json[r'email'] = null; - } - if (this.password != null) { - json[r'password'] = this.password; - } else { - json[r'password'] = null; - } + json[r'id'] = this.id; + json[r'email'] = this.email; + json[r'password'] = this.password; + json[r'lastName'] = this.lastName; + json[r'token'] = this.token; + json[r'instanceId'] = this.instanceId; if (this.firstName != null) { json[r'firstName'] = this.firstName; } else { json[r'firstName'] = null; } - if (this.lastName != null) { - json[r'lastName'] = this.lastName; - } else { - json[r'lastName'] = null; - } - if (this.token != null) { - json[r'token'] = this.token; - } else { - json[r'token'] = null; - } if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); } else { json[r'dateCreation'] = null; } - if (this.instanceId != null) { - json[r'instanceId'] = this.instanceId; - } else { - json[r'instanceId'] = null; - } return json; } @@ -128,27 +107,32 @@ class User { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "User[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "User[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "User[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "User[$key]" has a null value in JSON.'); }); return true; }()); return User( - id: mapValueOfType(json, r'id'), - email: mapValueOfType(json, r'email'), - password: mapValueOfType(json, r'password'), + id: mapValueOfType(json, r'id')!, + email: mapValueOfType(json, r'email')!, + password: mapValueOfType(json, r'password')!, + lastName: mapValueOfType(json, r'lastName')!, + token: mapValueOfType(json, r'token')!, + instanceId: mapValueOfType(json, r'instanceId')!, firstName: mapValueOfType(json, r'firstName'), - lastName: mapValueOfType(json, r'lastName'), - token: mapValueOfType(json, r'token'), - dateCreation: mapDateTime(json, r'dateCreation', ''), - instanceId: mapValueOfType(json, r'instanceId'), + dateCreation: mapDateTime(json, r'dateCreation', r''), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -176,13 +160,19 @@ class User { } // maps a json object with a list of User-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = User.listFromJson(entry.value, growable: growable,); + map[entry.key] = User.listFromJson( + entry.value, + growable: growable, + ); } } return map; @@ -190,6 +180,11 @@ class User { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'id', + 'email', + 'password', + 'lastName', + 'token', + 'instanceId', }; } - diff --git a/manager_api/lib/model/user_detail_dto.dart b/manager_api_new/lib/model/user_detail_dto.dart similarity index 66% rename from manager_api/lib/model/user_detail_dto.dart rename to manager_api_new/lib/model/user_detail_dto.dart index d0ce9cf..fb48547 100644 --- a/manager_api/lib/model/user_detail_dto.dart +++ b/manager_api_new/lib/model/user_detail_dto.dart @@ -1,7 +1,7 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.12 +// @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first @@ -17,6 +17,7 @@ class UserDetailDTO { this.email, this.firstName, this.lastName, + this.instanceId, }); String? id; @@ -27,23 +28,30 @@ class UserDetailDTO { String? lastName; + String? instanceId; + @override - bool operator ==(Object other) => identical(this, other) || other is UserDetailDTO && - other.id == id && - other.email == email && - other.firstName == firstName && - other.lastName == lastName; + bool operator ==(Object other) => + identical(this, other) || + other is UserDetailDTO && + other.id == id && + other.email == email && + other.firstName == firstName && + other.lastName == lastName && + other.instanceId == instanceId; @override int get hashCode => - // ignore: unnecessary_parenthesis - (id == null ? 0 : id!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode); + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; + String toString() => + 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -67,6 +75,11 @@ class UserDetailDTO { } else { json[r'lastName'] = null; } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } return json; } @@ -82,8 +95,10 @@ class UserDetailDTO { // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "UserDetailDTO[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "UserDetailDTO[$key]" has a null value in JSON.'); + assert(json.containsKey(key), + 'Required key "UserDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "UserDetailDTO[$key]" has a null value in JSON.'); }); return true; }()); @@ -93,12 +108,16 @@ class UserDetailDTO { email: mapValueOfType(json, r'email'), firstName: mapValueOfType(json, r'firstName'), lastName: mapValueOfType(json, r'lastName'), + instanceId: mapValueOfType(json, r'instanceId'), ); } return null; } - static List listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson( + dynamic json, { + bool growable = false, + }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -126,20 +145,24 @@ class UserDetailDTO { } // maps a json object with a list of UserDetailDTO-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { - map[entry.key] = UserDetailDTO.listFromJson(entry.value, growable: growable,); + map[entry.key] = UserDetailDTO.listFromJson( + entry.value, + growable: growable, + ); } } return map; } /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; + static const requiredKeys = {}; } - diff --git a/manager_api_new/lib/model/video_dto.dart b/manager_api_new/lib/model/video_dto.dart new file mode 100644 index 0000000..8cf9e0c --- /dev/null +++ b/manager_api_new/lib/model/video_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VideoDTO { + /// Returns a new [VideoDTO] instance. + VideoDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.source_, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? source_; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is VideoDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => + 'VideoDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, source_=$source_]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; + } + return json; + } + + /// Returns a new [VideoDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VideoDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "VideoDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "VideoDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VideoDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + source_: mapValueOfType(json, r'source'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VideoDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VideoDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VideoDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VideoDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/weather_dto.dart b/manager_api_new/lib/model/weather_dto.dart new file mode 100644 index 0000000..342a85c --- /dev/null +++ b/manager_api_new/lib/model/weather_dto.dart @@ -0,0 +1,368 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeatherDTO { + /// Returns a new [WeatherDTO] instance. + WeatherDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.city, + this.updatedDate, + this.result, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? city; + + DateTime? updatedDate; + + String? result; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is WeatherDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.city == city && + other.updatedDate == updatedDate && + other.result == result; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (city == null ? 0 : city!.hashCode) + + (updatedDate == null ? 0 : updatedDate!.hashCode) + + (result == null ? 0 : result!.hashCode); + + @override + String toString() => + 'WeatherDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, city=$city, updatedDate=$updatedDate, result=$result]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.city != null) { + json[r'city'] = this.city; + } else { + json[r'city'] = null; + } + if (this.updatedDate != null) { + json[r'updatedDate'] = this.updatedDate!.toUtc().toIso8601String(); + } else { + json[r'updatedDate'] = null; + } + if (this.result != null) { + json[r'result'] = this.result; + } else { + json[r'result'] = null; + } + return json; + } + + /// Returns a new [WeatherDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeatherDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "WeatherDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "WeatherDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeatherDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + city: mapValueOfType(json, r'city'), + updatedDate: mapDateTime(json, r'updatedDate', r''), + result: mapValueOfType(json, r'result'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeatherDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeatherDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeatherDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeatherDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/lib/model/web_dto.dart b/manager_api_new/lib/model/web_dto.dart new file mode 100644 index 0000000..1189110 --- /dev/null +++ b/manager_api_new/lib/model/web_dto.dart @@ -0,0 +1,346 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WebDTO { + /// Returns a new [WebDTO] instance. + WebDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.dateCreation, + this.order, + this.instanceId, + this.latitude, + this.longitude, + this.meterZoneGPS, + this.isBeacon, + this.beaconId, + this.source_, + }); + + String? id; + + String? label; + + List? title; + + List? description; + + String? imageId; + + String? imageSource; + + String? configurationId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSubSection; + + String? parentId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SectionType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? dateCreation; + + int? order; + + String? instanceId; + + String? latitude; + + String? longitude; + + int? meterZoneGPS; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isBeacon; + + int? beaconId; + + String? source_; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is WebDTO && + other.id == id && + other.label == label && + _deepEquality.equals(other.title, title) && + _deepEquality.equals(other.description, description) && + other.imageId == imageId && + other.imageSource == imageSource && + other.configurationId == configurationId && + other.isSubSection == isSubSection && + other.parentId == parentId && + other.type == type && + other.dateCreation == dateCreation && + other.order == order && + other.instanceId == instanceId && + other.latitude == latitude && + other.longitude == longitude && + other.meterZoneGPS == meterZoneGPS && + other.isBeacon == isBeacon && + other.beaconId == beaconId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (imageId == null ? 0 : imageId!.hashCode) + + (imageSource == null ? 0 : imageSource!.hashCode) + + (configurationId == null ? 0 : configurationId!.hashCode) + + (isSubSection == null ? 0 : isSubSection!.hashCode) + + (parentId == null ? 0 : parentId!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode) + + (meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) + + (isBeacon == null ? 0 : isBeacon!.hashCode) + + (beaconId == null ? 0 : beaconId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => + 'WebDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, source_=$source_]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; + } + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; + } + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; + } + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; + } + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; + } + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; + } + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; + } + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; + } + return json; + } + + /// Returns a new [WebDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WebDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), + 'Required key "WebDTO[$key]" is missing from JSON.'); + assert(json[key] != null, + 'Required key "WebDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WebDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + imageId: mapValueOfType(json, r'imageId'), + imageSource: mapValueOfType(json, r'imageSource'), + configurationId: mapValueOfType(json, r'configurationId'), + isSubSection: mapValueOfType(json, r'isSubSection'), + parentId: mapValueOfType(json, r'parentId'), + type: SectionType.fromJson(json[r'type']), + dateCreation: mapDateTime(json, r'dateCreation', r''), + order: mapValueOfType(json, r'order'), + instanceId: mapValueOfType(json, r'instanceId'), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), + meterZoneGPS: mapValueOfType(json, r'meterZoneGPS'), + isBeacon: mapValueOfType(json, r'isBeacon'), + beaconId: mapValueOfType(json, r'beaconId'), + source_: mapValueOfType(json, r'source'), + ); + } + return null; + } + + static List listFromJson( + dynamic json, { + bool growable = false, + }) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WebDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WebDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WebDTO-objects as value to a dart map + static Map> mapListFromJson( + dynamic json, { + bool growable = false, + }) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WebDTO.listFromJson( + entry.value, + growable: growable, + ); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = {}; +} diff --git a/manager_api_new/pubspec.yaml b/manager_api_new/pubspec.yaml new file mode 100644 index 0000000..1da4fa4 --- /dev/null +++ b/manager_api_new/pubspec.yaml @@ -0,0 +1,17 @@ +# +# AUTO-GENERATED FILE, DO NOT MODIFY! +# + +name: 'manager_api_new' +version: '1.0.0' +description: 'OpenAPI API client' +homepage: 'homepage' +environment: + sdk: '>=2.12.0 <4.0.0' +dependencies: + collection: '>=1.17.0 <2.0.0' + http: '>=0.13.0 <2.0.0' + intl: any + meta: '>=1.1.8 <2.0.0' +dev_dependencies: + test: '>=1.21.6 <1.22.0' diff --git a/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart b/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart new file mode 100644 index 0000000..a37da45 --- /dev/null +++ b/manager_api_new/test/agenda_dto_all_of_agenda_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for AgendaDTOAllOfAgendaMapProvider +void main() { + // final instance = AgendaDTOAllOfAgendaMapProvider(); + + group('test AgendaDTOAllOfAgendaMapProvider', () {}); +} diff --git a/manager_api/test/agenda_dto_test.dart b/manager_api_new/test/agenda_dto_test.dart similarity index 77% rename from manager_api/test/agenda_dto_test.dart rename to manager_api_new/test/agenda_dto_test.dart index 60aa589..21a544e 100644 --- a/manager_api/test/agenda_dto_test.dart +++ b/manager_api_new/test/agenda_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for AgendaDTO @@ -16,12 +16,9 @@ void main() { // final instance = AgendaDTO(); group('test AgendaDTO', () { - // String source_ - test('to test the property `source_`', () async { + // String resourceId + test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/article_dto_test.dart b/manager_api_new/test/article_dto_test.dart similarity index 88% rename from manager_api/test/article_dto_test.dart rename to manager_api_new/test/article_dto_test.dart index 7be3235..a8dcca3 100644 --- a/manager_api/test/article_dto_test.dart +++ b/manager_api_new/test/article_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ArticleDTO @@ -21,6 +21,11 @@ void main() { // TODO }); + // String qrCode + test('to test the property `qrCode`', () async { + // TODO + }); + // bool isContentTop test('to test the property `isContentTop`', () async { // TODO @@ -40,8 +45,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/authentication_api_test.dart b/manager_api_new/test/authentication_api_test.dart similarity index 95% rename from manager_api/test/authentication_api_test.dart rename to manager_api_new/test/authentication_api_test.dart index ef083f1..0d16e2a 100644 --- a/manager_api/test/authentication_api_test.dart +++ b/manager_api_new/test/authentication_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for AuthenticationApi void main() { // final instance = AuthenticationApi(); @@ -26,6 +25,5 @@ void main() { test('test authenticationAuthenticateWithJson', () async { // TODO }); - }); } diff --git a/manager_api/test/categorie_dto_test.dart b/manager_api_new/test/categorie_dto_test.dart similarity index 93% rename from manager_api/test/categorie_dto_test.dart rename to manager_api_new/test/categorie_dto_test.dart index 4c81425..43d8523 100644 --- a/manager_api/test/categorie_dto_test.dart +++ b/manager_api_new/test/categorie_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for CategorieDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/configuration_api_test.dart b/manager_api_new/test/configuration_api_test.dart similarity index 97% rename from manager_api/test/configuration_api_test.dart rename to manager_api_new/test/configuration_api_test.dart index 4844853..0146ce3 100644 --- a/manager_api/test/configuration_api_test.dart +++ b/manager_api_new/test/configuration_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for ConfigurationApi void main() { // final instance = ConfigurationApi(); @@ -51,6 +50,5 @@ void main() { test('test configurationUpdate', () async { // TODO }); - }); } diff --git a/manager_api/test/configuration_dto_test.dart b/manager_api_new/test/configuration_dto_test.dart similarity index 97% rename from manager_api/test/configuration_dto_test.dart rename to manager_api_new/test/configuration_dto_test.dart index 5c4461f..7c2cbe4 100644 --- a/manager_api/test/configuration_dto_test.dart +++ b/manager_api_new/test/configuration_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ConfigurationDTO @@ -80,8 +80,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/content_dto_resource_test.dart b/manager_api_new/test/content_dto_resource_test.dart new file mode 100644 index 0000000..1a1000c --- /dev/null +++ b/manager_api_new/test/content_dto_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for ContentDTOResource +void main() { + // final instance = ContentDTOResource(); + + group('test ContentDTOResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/content_dto_test.dart b/manager_api_new/test/content_dto_test.dart similarity index 96% rename from manager_api/test/content_dto_test.dart rename to manager_api_new/test/content_dto_test.dart index 99e909b..41ccfb6 100644 --- a/manager_api/test/content_dto_test.dart +++ b/manager_api_new/test/content_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ContentDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `resourceType`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/content_geo_point_test.dart b/manager_api_new/test/content_geo_point_test.dart similarity index 95% rename from manager_api/test/content_geo_point_test.dart rename to manager_api_new/test/content_geo_point_test.dart index b24df45..976901c 100644 --- a/manager_api/test/content_geo_point_test.dart +++ b/manager_api_new/test/content_geo_point_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ContentGeoPoint @@ -35,8 +35,5 @@ void main() { test('to test the property `latitude`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_api_test.dart b/manager_api_new/test/device_api_test.dart similarity index 96% rename from manager_api/test/device_api_test.dart rename to manager_api_new/test/device_api_test.dart index acdb174..8cf1066 100644 --- a/manager_api/test/device_api_test.dart +++ b/manager_api_new/test/device_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for DeviceApi void main() { // final instance = DeviceApi(); @@ -46,6 +45,5 @@ void main() { test('test deviceUpdateMainInfos', () async { // TODO }); - }); } diff --git a/manager_api/test/device_detail_dto_all_of_test.dart b/manager_api_new/test/device_detail_dto_all_of_test.dart similarity index 95% rename from manager_api/test/device_detail_dto_all_of_test.dart rename to manager_api_new/test/device_detail_dto_all_of_test.dart index 9839d16..0fb3beb 100644 --- a/manager_api/test/device_detail_dto_all_of_test.dart +++ b/manager_api_new/test/device_detail_dto_all_of_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTOAllOf @@ -35,8 +35,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_detail_dto_test.dart b/manager_api_new/test/device_detail_dto_test.dart similarity index 97% rename from manager_api/test/device_detail_dto_test.dart rename to manager_api_new/test/device_detail_dto_test.dart index 9732639..20ff017 100644 --- a/manager_api/test/device_detail_dto_test.dart +++ b/manager_api_new/test/device_detail_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTO @@ -90,8 +90,5 @@ void main() { test('to test the property `lastBatteryLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/device_dto_test.dart b/manager_api_new/test/device_dto_test.dart similarity index 97% rename from manager_api/test/device_dto_test.dart rename to manager_api_new/test/device_dto_test.dart index 7e02aa0..d854620 100644 --- a/manager_api/test/device_dto_test.dart +++ b/manager_api_new/test/device_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDTO @@ -70,8 +70,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/export_configuration_dto_all_of_test.dart b/manager_api_new/test/export_configuration_dto_all_of_test.dart similarity index 94% rename from manager_api/test/export_configuration_dto_all_of_test.dart rename to manager_api_new/test/export_configuration_dto_all_of_test.dart index 5967e3f..f80ca79 100644 --- a/manager_api/test/export_configuration_dto_all_of_test.dart +++ b/manager_api_new/test/export_configuration_dto_all_of_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTOAllOf @@ -25,8 +25,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/export_configuration_dto_test.dart b/manager_api_new/test/export_configuration_dto_test.dart similarity index 98% rename from manager_api/test/export_configuration_dto_test.dart rename to manager_api_new/test/export_configuration_dto_test.dart index 222334d..ce0a09c 100644 --- a/manager_api/test/export_configuration_dto_test.dart +++ b/manager_api_new/test/export_configuration_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTO @@ -90,8 +90,5 @@ void main() { test('to test the property `resources`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/geo_point_dto_categorie_test.dart b/manager_api_new/test/geo_point_dto_categorie_test.dart similarity index 93% rename from manager_api/test/geo_point_dto_categorie_test.dart rename to manager_api_new/test/geo_point_dto_categorie_test.dart index 03c380e..a1c9d4b 100644 --- a/manager_api/test/geo_point_dto_categorie_test.dart +++ b/manager_api_new/test/geo_point_dto_categorie_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for GeoPointDTOCategorie @@ -25,8 +25,5 @@ void main() { test('to test the property `icon`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/geo_point_dto_test.dart b/manager_api_new/test/geo_point_dto_test.dart similarity index 96% rename from manager_api/test/geo_point_dto_test.dart rename to manager_api_new/test/geo_point_dto_test.dart index b04737e..36a4653 100644 --- a/manager_api/test/geo_point_dto_test.dart +++ b/manager_api_new/test/geo_point_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for GeoPointDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `longitude`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/geo_point_section_map_test.dart b/manager_api_new/test/geo_point_section_map_test.dart new file mode 100644 index 0000000..4f80ed1 --- /dev/null +++ b/manager_api_new/test/geo_point_section_map_test.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for GeoPointSectionMap +void main() { + // final instance = GeoPointSectionMap(); + + group('test GeoPointSectionMap', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List mapCategories (default value: const []) + test('to test the property `mapCategories`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // int mapZoom + test('to test the property `mapZoom`', () async { + // TODO + }); + + // SectionMapAllOfMapMapType mapMapType + test('to test the property `mapMapType`', () async { + // TODO + }); + + // SectionMapAllOfMapTypeMapbox mapTypeMapbox + test('to test the property `mapTypeMapbox`', () async { + // TODO + }); + + // SectionMapAllOfMapMapProvider mapMapProvider + test('to test the property `mapMapProvider`', () async { + // TODO + }); + + // List mapPoints (default value: const []) + test('to test the property `mapPoints`', () async { + // TODO + }); + + // String mapResourceId + test('to test the property `mapResourceId`', () async { + // TODO + }); + + // SectionMapAllOfMapResource mapResource + test('to test the property `mapResource`', () async { + // TODO + }); + + // String mapCenterLatitude + test('to test the property `mapCenterLatitude`', () async { + // TODO + }); + + // String mapCenterLongitude + test('to test the property `mapCenterLongitude`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/geo_point_test.dart b/manager_api_new/test/geo_point_test.dart new file mode 100644 index 0000000..27900b9 --- /dev/null +++ b/manager_api_new/test/geo_point_test.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for GeoPoint +void main() { + // final instance = GeoPoint(); + + group('test GeoPoint', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // List contents (default value: const []) + test('to test the property `contents`', () async { + // TODO + }); + + // List schedules (default value: const []) + test('to test the property `schedules`', () async { + // TODO + }); + + // List prices (default value: const []) + test('to test the property `prices`', () async { + // TODO + }); + + // List phone (default value: const []) + test('to test the property `phone`', () async { + // TODO + }); + + // List email (default value: const []) + test('to test the property `email`', () async { + // TODO + }); + + // List site (default value: const []) + test('to test the property `site`', () async { + // TODO + }); + + // int categorieId + test('to test the property `categorieId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // String imageResourceId + test('to test the property `imageResourceId`', () async { + // TODO + }); + + // String imageUrl + test('to test the property `imageUrl`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/image_dto_test.dart b/manager_api_new/test/image_dto_test.dart similarity index 95% rename from manager_api/test/image_dto_test.dart rename to manager_api_new/test/image_dto_test.dart index 01be4eb..b1eb80c 100644 --- a/manager_api/test/image_dto_test.dart +++ b/manager_api_new/test/image_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/image_geo_point_test.dart b/manager_api_new/test/image_geo_point_test.dart similarity index 93% rename from manager_api/test/image_geo_point_test.dart rename to manager_api_new/test/image_geo_point_test.dart index 58988c5..43b3852 100644 --- a/manager_api/test/image_geo_point_test.dart +++ b/manager_api_new/test/image_geo_point_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageGeoPoint @@ -25,8 +25,5 @@ void main() { test('to test the property `imageSource`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/instance_api_test.dart b/manager_api_new/test/instance_api_test.dart similarity index 96% rename from manager_api/test/instance_api_test.dart rename to manager_api_new/test/instance_api_test.dart index d603922..78bdf14 100644 --- a/manager_api/test/instance_api_test.dart +++ b/manager_api_new/test/instance_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for InstanceApi void main() { // final instance = InstanceApi(); @@ -41,6 +40,5 @@ void main() { test('test instanceUpdateinstance', () async { // TODO }); - }); } diff --git a/manager_api/test/instance_dto_test.dart b/manager_api_new/test/instance_dto_test.dart similarity index 94% rename from manager_api/test/instance_dto_test.dart rename to manager_api_new/test/instance_dto_test.dart index e8c6878..745777f 100644 --- a/manager_api/test/instance_dto_test.dart +++ b/manager_api_new/test/instance_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for InstanceDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/instance_test.dart b/manager_api_new/test/instance_test.dart similarity index 94% rename from manager_api/test/instance_test.dart rename to manager_api_new/test/instance_test.dart index 9133f85..8a78243 100644 --- a/manager_api/test/instance_test.dart +++ b/manager_api_new/test/instance_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for Instance @@ -30,8 +30,5 @@ void main() { test('to test the property `dateCreation`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/level_dto_test.dart b/manager_api_new/test/level_dto_test.dart similarity index 94% rename from manager_api/test/level_dto_test.dart rename to manager_api_new/test/level_dto_test.dart index b75bfe3..bca1bd3 100644 --- a/manager_api/test/level_dto_test.dart +++ b/manager_api_new/test/level_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LevelDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/login_dto_test.dart b/manager_api_new/test/login_dto_test.dart similarity index 93% rename from manager_api/test/login_dto_test.dart rename to manager_api_new/test/login_dto_test.dart index cc59980..5b39eaf 100644 --- a/manager_api/test/login_dto_test.dart +++ b/manager_api_new/test/login_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LoginDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `password`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/map_dto_all_of_map_provider_test.dart b/manager_api_new/test/map_dto_all_of_map_provider_test.dart new file mode 100644 index 0000000..499cd8d --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapProvider +void main() { + // final instance = MapDTOAllOfMapProvider(); + + group('test MapDTOAllOfMapProvider', () {}); +} diff --git a/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart b/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart new file mode 100644 index 0000000..54c03d4 --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_type_mapbox_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapTypeMapbox +void main() { + // final instance = MapDTOAllOfMapTypeMapbox(); + + group('test MapDTOAllOfMapTypeMapbox', () {}); +} diff --git a/manager_api_new/test/map_dto_all_of_map_type_test.dart b/manager_api_new/test/map_dto_all_of_map_type_test.dart new file mode 100644 index 0000000..9384293 --- /dev/null +++ b/manager_api_new/test/map_dto_all_of_map_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOAllOfMapType +void main() { + // final instance = MapDTOAllOfMapType(); + + group('test MapDTOAllOfMapType', () {}); +} diff --git a/manager_api/test/map_dto_map_provider_test.dart b/manager_api_new/test/map_dto_map_provider_test.dart similarity index 82% rename from manager_api/test/map_dto_map_provider_test.dart rename to manager_api_new/test/map_dto_map_provider_test.dart index 59fba41..fa2f46d 100644 --- a/manager_api/test/map_dto_map_provider_test.dart +++ b/manager_api_new/test/map_dto_map_provider_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapProvider void main() { // final instance = MapDTOMapProvider(); - group('test MapDTOMapProvider', () { - - }); - + group('test MapDTOMapProvider', () {}); } diff --git a/manager_api/test/map_dto_map_type_mapbox_test.dart b/manager_api_new/test/map_dto_map_type_mapbox_test.dart similarity index 81% rename from manager_api/test/map_dto_map_type_mapbox_test.dart rename to manager_api_new/test/map_dto_map_type_mapbox_test.dart index 163b689..8d50d5d 100644 --- a/manager_api/test/map_dto_map_type_mapbox_test.dart +++ b/manager_api_new/test/map_dto_map_type_mapbox_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapTypeMapbox void main() { // final instance = MapDTOMapTypeMapbox(); - group('test MapDTOMapTypeMapbox', () { - - }); - + group('test MapDTOMapTypeMapbox', () {}); } diff --git a/manager_api/test/map_dto_map_type_test.dart b/manager_api_new/test/map_dto_map_type_test.dart similarity index 82% rename from manager_api/test/map_dto_map_type_test.dart rename to manager_api_new/test/map_dto_map_type_test.dart index 2856e00..f6b4cc3 100644 --- a/manager_api/test/map_dto_map_type_test.dart +++ b/manager_api_new/test/map_dto_map_type_test.dart @@ -8,15 +8,12 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTOMapType void main() { // final instance = MapDTOMapType(); - group('test MapDTOMapType', () { - - }); - + group('test MapDTOMapType', () {}); } diff --git a/manager_api/test/map_dto_test.dart b/manager_api_new/test/map_dto_test.dart similarity index 95% rename from manager_api/test/map_dto_test.dart rename to manager_api_new/test/map_dto_test.dart index 6045184..46714d5 100644 --- a/manager_api/test/map_dto_test.dart +++ b/manager_api_new/test/map_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `iconSource`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/map_provider_test.dart b/manager_api_new/test/map_provider_test.dart similarity index 80% rename from manager_api/test/map_provider_test.dart rename to manager_api_new/test/map_provider_test.dart index 3dac549..809db34 100644 --- a/manager_api/test/map_provider_test.dart +++ b/manager_api_new/test/map_provider_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapProvider void main() { - - group('test MapProvider', () { - - }); - + group('test MapProvider', () {}); } diff --git a/manager_api/test/map_type_app_test.dart b/manager_api_new/test/map_type_app_test.dart similarity index 80% rename from manager_api/test/map_type_app_test.dart rename to manager_api_new/test/map_type_app_test.dart index 891c231..b3cf91b 100644 --- a/manager_api/test/map_type_app_test.dart +++ b/manager_api_new/test/map_type_app_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapTypeApp void main() { - - group('test MapTypeApp', () { - - }); - + group('test MapTypeApp', () {}); } diff --git a/manager_api/test/map_type_map_box_test.dart b/manager_api_new/test/map_type_map_box_test.dart similarity index 80% rename from manager_api/test/map_type_map_box_test.dart rename to manager_api_new/test/map_type_map_box_test.dart index b2ce7e4..f5e68b5 100644 --- a/manager_api/test/map_type_map_box_test.dart +++ b/manager_api_new/test/map_type_map_box_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapTypeMapBox void main() { - - group('test MapTypeMapBox', () { - - }); - + group('test MapTypeMapBox', () {}); } diff --git a/manager_api/test/menu_dto_test.dart b/manager_api_new/test/menu_dto_test.dart similarity index 92% rename from manager_api/test/menu_dto_test.dart rename to manager_api_new/test/menu_dto_test.dart index a1233e6..d056934 100644 --- a/manager_api/test/menu_dto_test.dart +++ b/manager_api_new/test/menu_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MenuDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `sections`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/ordered_translation_and_resource_dto_test.dart b/manager_api_new/test/ordered_translation_and_resource_dto_test.dart new file mode 100644 index 0000000..e69f718 --- /dev/null +++ b/manager_api_new/test/ordered_translation_and_resource_dto_test.dart @@ -0,0 +1,29 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for OrderedTranslationAndResourceDTO +void main() { + // final instance = OrderedTranslationAndResourceDTO(); + + group('test OrderedTranslationAndResourceDTO', () { + // List translationAndResourceDTOs (default value: const []) + test('to test the property `translationAndResourceDTOs`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/pdf_dto_test.dart b/manager_api_new/test/pdf_dto_test.dart similarity index 77% rename from manager_api/test/pdf_dto_test.dart rename to manager_api_new/test/pdf_dto_test.dart index 4165d35..8bb540e 100644 --- a/manager_api/test/pdf_dto_test.dart +++ b/manager_api_new/test/pdf_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PdfDTO @@ -16,12 +16,9 @@ void main() { // final instance = PdfDTO(); group('test PdfDTO', () { - // String source_ - test('to test the property `source_`', () async { + // String resourceId + test('to test the property `resourceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/pdf_file_dto_test.dart b/manager_api_new/test/pdf_file_dto_test.dart similarity index 81% rename from manager_api/test/pdf_file_dto_test.dart rename to manager_api_new/test/pdf_file_dto_test.dart index 258f2d5..393189a 100644 --- a/manager_api/test/pdf_file_dto_test.dart +++ b/manager_api_new/test/pdf_file_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PDFFileDTO @@ -20,13 +20,5 @@ void main() { test('to test the property `pdfFilesAndTitles`', () async { // TODO }); - - // int order - test('to test the property `order`', () async { - // TODO - }); - - }); - } diff --git a/manager_api/test/player_message_dto_test.dart b/manager_api_new/test/player_message_dto_test.dart similarity index 93% rename from manager_api/test/player_message_dto_test.dart rename to manager_api_new/test/player_message_dto_test.dart index 08639bf..de37e33 100644 --- a/manager_api/test/player_message_dto_test.dart +++ b/manager_api_new/test/player_message_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PlayerMessageDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `isDeleted`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart b/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart new file mode 100644 index 0000000..872049b --- /dev/null +++ b/manager_api_new/test/puzzle_dto_all_of_puzzle_image_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for PuzzleDTOAllOfPuzzleImage +void main() { + // final instance = PuzzleDTOAllOfPuzzleImage(); + + group('test PuzzleDTOAllOfPuzzleImage', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/puzzle_dto_image_test.dart b/manager_api_new/test/puzzle_dto_image_test.dart similarity index 87% rename from manager_api/test/puzzle_dto_image_test.dart rename to manager_api_new/test/puzzle_dto_image_test.dart index 5695e08..7aacc6e 100644 --- a/manager_api/test/puzzle_dto_image_test.dart +++ b/manager_api_new/test/puzzle_dto_image_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PuzzleDTOImage @@ -41,7 +41,9 @@ void main() { // TODO }); - + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); }); - } diff --git a/manager_api/test/puzzle_dto_test.dart b/manager_api_new/test/puzzle_dto_test.dart similarity index 94% rename from manager_api/test/puzzle_dto_test.dart rename to manager_api_new/test/puzzle_dto_test.dart index f6a83f9..7a5948d 100644 --- a/manager_api/test/puzzle_dto_test.dart +++ b/manager_api_new/test/puzzle_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PuzzleDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `image`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/question_dto_image_background_resource_type_test.dart b/manager_api_new/test/question_dto_image_background_resource_type_test.dart new file mode 100644 index 0000000..14b7fe0 --- /dev/null +++ b/manager_api_new/test/question_dto_image_background_resource_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuestionDTOImageBackgroundResourceType +void main() { + // final instance = QuestionDTOImageBackgroundResourceType(); + + group('test QuestionDTOImageBackgroundResourceType', () {}); +} diff --git a/manager_api/test/question_dto_test.dart b/manager_api_new/test/question_dto_test.dart similarity index 95% rename from manager_api/test/question_dto_test.dart rename to manager_api_new/test/question_dto_test.dart index 6f46cbd..2c8e074 100644 --- a/manager_api/test/question_dto_test.dart +++ b/manager_api_new/test/question_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuestionDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/quiz_dto_test.dart b/manager_api_new/test/quiz_dto_test.dart new file mode 100644 index 0000000..fcf449e --- /dev/null +++ b/manager_api_new/test/quiz_dto_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizDTO +void main() { + // final instance = QuizDTO(); + + group('test QuizDTO', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // List questions (default value: const []) + test('to test the property `questions`', () async { + // TODO + }); + + // List badLevel (default value: const []) + test('to test the property `badLevel`', () async { + // TODO + }); + + // List mediumLevel (default value: const []) + test('to test the property `mediumLevel`', () async { + // TODO + }); + + // List goodLevel (default value: const []) + test('to test the property `goodLevel`', () async { + // TODO + }); + + // List greatLevel (default value: const []) + test('to test the property `greatLevel`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_resource_test.dart b/manager_api_new/test/quiz_question_resource_test.dart new file mode 100644 index 0000000..daef4a9 --- /dev/null +++ b/manager_api_new/test/quiz_question_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestionResource +void main() { + // final instance = QuizQuestionResource(); + + group('test QuizQuestionResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_section_quiz_test.dart b/manager_api_new/test/quiz_question_section_quiz_test.dart new file mode 100644 index 0000000..5f47a87 --- /dev/null +++ b/manager_api_new/test/quiz_question_section_quiz_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestionSectionQuiz +void main() { + // final instance = QuizQuestionSectionQuiz(); + + group('test QuizQuestionSectionQuiz', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List quizQuestions (default value: const []) + test('to test the property `quizQuestions`', () async { + // TODO + }); + + // List quizBadLevel (default value: const []) + test('to test the property `quizBadLevel`', () async { + // TODO + }); + + // List quizMediumLevel (default value: const []) + test('to test the property `quizMediumLevel`', () async { + // TODO + }); + + // List quizGoodLevel (default value: const []) + test('to test the property `quizGoodLevel`', () async { + // TODO + }); + + // List quizGreatLevel (default value: const []) + test('to test the property `quizGreatLevel`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/quiz_question_test.dart b/manager_api_new/test/quiz_question_test.dart new file mode 100644 index 0000000..df28dd9 --- /dev/null +++ b/manager_api_new/test/quiz_question_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizQuestion +void main() { + // final instance = QuizQuestion(); + + group('test QuizQuestion', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // List label (default value: const []) + test('to test the property `label`', () async { + // TODO + }); + + // List responses (default value: const []) + test('to test the property `responses`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // QuizQuestionResource resource + test('to test the property `resource`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/quizz_dto_bad_level_test.dart b/manager_api_new/test/quizz_dto_bad_level_test.dart similarity index 94% rename from manager_api/test/quizz_dto_bad_level_test.dart rename to manager_api_new/test/quizz_dto_bad_level_test.dart index 9055db6..46b452c 100644 --- a/manager_api/test/quizz_dto_bad_level_test.dart +++ b/manager_api_new/test/quizz_dto_bad_level_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuizzDTOBadLevel @@ -30,8 +30,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/quizz_dto_test.dart b/manager_api_new/test/quizz_dto_test.dart similarity index 95% rename from manager_api/test/quizz_dto_test.dart rename to manager_api_new/test/quizz_dto_test.dart index 837e987..765440b 100644 --- a/manager_api/test/quizz_dto_test.dart +++ b/manager_api_new/test/quizz_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuizzDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `greatLevel`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/resource_api_test.dart b/manager_api_new/test/resource_api_test.dart similarity index 97% rename from manager_api/test/resource_api_test.dart rename to manager_api_new/test/resource_api_test.dart index b28bd40..64baaf7 100644 --- a/manager_api/test/resource_api_test.dart +++ b/manager_api_new/test/resource_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for ResourceApi void main() { // final instance = ResourceApi(); @@ -51,6 +50,5 @@ void main() { test('test resourceUpload', () async { // TODO }); - }); } diff --git a/manager_api/test/resource_dto_test.dart b/manager_api_new/test/resource_dto_test.dart similarity index 95% rename from manager_api/test/resource_dto_test.dart rename to manager_api_new/test/resource_dto_test.dart index 5943a30..18ba5df 100644 --- a/manager_api/test/resource_dto_test.dart +++ b/manager_api_new/test/resource_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResourceDTO @@ -45,8 +45,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api_new/test/resource_test.dart b/manager_api_new/test/resource_test.dart new file mode 100644 index 0000000..f85fd02 --- /dev/null +++ b/manager_api_new/test/resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for Resource +void main() { + // final instance = Resource(); + + group('test Resource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/resource_type_test.dart b/manager_api_new/test/resource_type_test.dart similarity index 80% rename from manager_api/test/resource_type_test.dart rename to manager_api_new/test/resource_type_test.dart index 9315f53..db9ec15 100644 --- a/manager_api/test/resource_type_test.dart +++ b/manager_api_new/test/resource_type_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResourceType void main() { - - group('test ResourceType', () { - - }); - + group('test ResourceType', () {}); } diff --git a/manager_api/test/response_dto_test.dart b/manager_api_new/test/response_dto_test.dart similarity index 94% rename from manager_api/test/response_dto_test.dart rename to manager_api_new/test/response_dto_test.dart index bb1b970..3459297 100644 --- a/manager_api/test/response_dto_test.dart +++ b/manager_api_new/test/response_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResponseDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `order`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/section_api_test.dart b/manager_api_new/test/section_api_test.dart similarity index 98% rename from manager_api/test/section_api_test.dart rename to manager_api_new/test/section_api_test.dart index 0d98fba..71623d5 100644 --- a/manager_api/test/section_api_test.dart +++ b/manager_api_new/test/section_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for SectionApi void main() { // final instance = SectionApi(); @@ -101,6 +100,5 @@ void main() { test('test sectionUpdateOrder', () async { // TODO }); - }); } diff --git a/manager_api/test/section_dto_test.dart b/manager_api_new/test/section_dto_test.dart similarity index 77% rename from manager_api/test/section_dto_test.dart rename to manager_api_new/test/section_dto_test.dart index 5c6177e..8400519 100644 --- a/manager_api/test/section_dto_test.dart +++ b/manager_api_new/test/section_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionDTO @@ -85,33 +85,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - // String latitude - test('to test the property `latitude`', () async { - // TODO - }); - - // String longitude - test('to test the property `longitude`', () async { - // TODO - }); - - // int meterZoneGPS - test('to test the property `meterZoneGPS`', () async { - // TODO - }); - - // bool isBeacon - test('to test the property `isBeacon`', () async { - // TODO - }); - - // String beaconId - test('to test the property `beaconId`', () async { - // TODO - }); - - }); - } diff --git a/manager_api_new/test/section_map_all_of_map_map_provider_test.dart b/manager_api_new/test/section_map_all_of_map_map_provider_test.dart new file mode 100644 index 0000000..ad07407 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_map_provider_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapMapProvider +void main() { + // final instance = SectionMapAllOfMapMapProvider(); + + group('test SectionMapAllOfMapMapProvider', () {}); +} diff --git a/manager_api_new/test/section_map_all_of_map_map_type_test.dart b/manager_api_new/test/section_map_all_of_map_map_type_test.dart new file mode 100644 index 0000000..da26fa4 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_map_type_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapMapType +void main() { + // final instance = SectionMapAllOfMapMapType(); + + group('test SectionMapAllOfMapMapType', () {}); +} diff --git a/manager_api_new/test/section_map_all_of_map_resource_test.dart b/manager_api_new/test/section_map_all_of_map_resource_test.dart new file mode 100644 index 0000000..20067cb --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_resource_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapResource +void main() { + // final instance = SectionMapAllOfMapResource(); + + group('test SectionMapAllOfMapResource', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // ResourceType type + test('to test the property `type`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // String url + test('to test the property `url`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart b/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart new file mode 100644 index 0000000..f715967 --- /dev/null +++ b/manager_api_new/test/section_map_all_of_map_type_mapbox_test.dart @@ -0,0 +1,19 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMapAllOfMapTypeMapbox +void main() { + // final instance = SectionMapAllOfMapTypeMapbox(); + + group('test SectionMapAllOfMapTypeMapbox', () {}); +} diff --git a/manager_api_new/test/section_map_api_test.dart b/manager_api_new/test/section_map_api_test.dart new file mode 100644 index 0000000..b7de8ed --- /dev/null +++ b/manager_api_new/test/section_map_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +/// tests for SectionMapApi +void main() { + // final instance = SectionMapApi(); + + group('tests for SectionMapApi', () { + //Future sectionMapCreate(String sectionId, GeoPointDTO geoPointDTO) async + test('test sectionMapCreate', () async { + // TODO + }); + + //Future sectionMapDelete(int geoPointId) async + test('test sectionMapDelete', () async { + // TODO + }); + + //Future> sectionMapGetAllGeoPointsFromSection(String sectionId) async + test('test sectionMapGetAllGeoPointsFromSection', () async { + // TODO + }); + + //Future sectionMapUpdate(GeoPointDTO geoPointDTO) async + test('test sectionMapUpdate', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_map_test.dart b/manager_api_new/test/section_map_test.dart new file mode 100644 index 0000000..72f7812 --- /dev/null +++ b/manager_api_new/test/section_map_test.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionMap +void main() { + // final instance = SectionMap(); + + group('test SectionMap', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List mapCategories (default value: const []) + test('to test the property `mapCategories`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // int mapZoom + test('to test the property `mapZoom`', () async { + // TODO + }); + + // SectionMapAllOfMapMapType mapMapType + test('to test the property `mapMapType`', () async { + // TODO + }); + + // SectionMapAllOfMapTypeMapbox mapTypeMapbox + test('to test the property `mapTypeMapbox`', () async { + // TODO + }); + + // SectionMapAllOfMapMapProvider mapMapProvider + test('to test the property `mapMapProvider`', () async { + // TODO + }); + + // List mapPoints (default value: const []) + test('to test the property `mapPoints`', () async { + // TODO + }); + + // String mapResourceId + test('to test the property `mapResourceId`', () async { + // TODO + }); + + // SectionMapAllOfMapResource mapResource + test('to test the property `mapResource`', () async { + // TODO + }); + + // String mapCenterLatitude + test('to test the property `mapCenterLatitude`', () async { + // TODO + }); + + // String mapCenterLongitude + test('to test the property `mapCenterLongitude`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_quiz_api_test.dart b/manager_api_new/test/section_quiz_api_test.dart new file mode 100644 index 0000000..d14cf12 --- /dev/null +++ b/manager_api_new/test/section_quiz_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +/// tests for SectionQuizApi +void main() { + // final instance = SectionQuizApi(); + + group('tests for SectionQuizApi', () { + //Future sectionQuizCreate(String sectionId, QuestionDTO questionDTO) async + test('test sectionQuizCreate', () async { + // TODO + }); + + //Future sectionQuizDelete(int quizQuestionId) async + test('test sectionQuizDelete', () async { + // TODO + }); + + //Future> sectionQuizGetAllQuizQuestionFromSection(String sectionId) async + test('test sectionQuizGetAllQuizQuestionFromSection', () async { + // TODO + }); + + //Future sectionQuizUpdate(QuestionDTO questionDTO) async + test('test sectionQuizUpdate', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_quiz_test.dart b/manager_api_new/test/section_quiz_test.dart new file mode 100644 index 0000000..4712839 --- /dev/null +++ b/manager_api_new/test/section_quiz_test.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for SectionQuiz +void main() { + // final instance = SectionQuiz(); + + group('test SectionQuiz', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List quizQuestions (default value: const []) + test('to test the property `quizQuestions`', () async { + // TODO + }); + + // List quizBadLevel (default value: const []) + test('to test the property `quizBadLevel`', () async { + // TODO + }); + + // List quizMediumLevel (default value: const []) + test('to test the property `quizMediumLevel`', () async { + // TODO + }); + + // List quizGoodLevel (default value: const []) + test('to test the property `quizGoodLevel`', () async { + // TODO + }); + + // List quizGreatLevel (default value: const []) + test('to test the property `quizGreatLevel`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api_new/test/section_test.dart b/manager_api_new/test/section_test.dart new file mode 100644 index 0000000..73d3667 --- /dev/null +++ b/manager_api_new/test/section_test.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for Section +void main() { + // final instance = Section(); + + group('test Section', () { + // String id + test('to test the property `id`', () async { + // TODO + }); + + // String label + test('to test the property `label`', () async { + // TODO + }); + + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String configurationId + test('to test the property `configurationId`', () async { + // TODO + }); + + // SectionType type + test('to test the property `type`', () async { + // TODO + }); + + // bool isSubSection + test('to test the property `isSubSection`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + + // String parentId + test('to test the property `parentId`', () async { + // TODO + }); + + // DateTime dateCreation + test('to test the property `dateCreation`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // int beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + }); +} diff --git a/manager_api/test/section_type_test.dart b/manager_api_new/test/section_type_test.dart similarity index 80% rename from manager_api/test/section_type_test.dart rename to manager_api_new/test/section_type_test.dart index 0a2e8ee..31c1f85 100644 --- a/manager_api/test/section_type_test.dart +++ b/manager_api_new/test/section_type_test.dart @@ -8,14 +8,10 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionType void main() { - - group('test SectionType', () { - - }); - + group('test SectionType', () {}); } diff --git a/manager_api/test/slider_dto_test.dart b/manager_api_new/test/slider_dto_test.dart similarity index 92% rename from manager_api/test/slider_dto_test.dart rename to manager_api_new/test/slider_dto_test.dart index 3a67b30..7625d8f 100644 --- a/manager_api/test/slider_dto_test.dart +++ b/manager_api_new/test/slider_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SliderDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `images`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/token_dto_test.dart b/manager_api_new/test/token_dto_test.dart similarity index 96% rename from manager_api/test/token_dto_test.dart rename to manager_api_new/test/token_dto_test.dart index 6b83f0b..7c69682 100644 --- a/manager_api/test/token_dto_test.dart +++ b/manager_api_new/test/token_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TokenDTO @@ -50,8 +50,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/translation_and_resource_dto_test.dart b/manager_api_new/test/translation_and_resource_dto_test.dart similarity index 95% rename from manager_api/test/translation_and_resource_dto_test.dart rename to manager_api_new/test/translation_and_resource_dto_test.dart index 9eccea6..58ca673 100644 --- a/manager_api/test/translation_and_resource_dto_test.dart +++ b/manager_api_new/test/translation_and_resource_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TranslationAndResourceDTO @@ -40,8 +40,5 @@ void main() { test('to test the property `resourceUrl`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/translation_dto_test.dart b/manager_api_new/test/translation_dto_test.dart similarity index 93% rename from manager_api/test/translation_dto_test.dart rename to manager_api_new/test/translation_dto_test.dart index 44f45c2..2f54b36 100644 --- a/manager_api/test/translation_dto_test.dart +++ b/manager_api_new/test/translation_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TranslationDTO @@ -25,8 +25,5 @@ void main() { test('to test the property `value`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/user_api_test.dart b/manager_api_new/test/user_api_test.dart similarity index 95% rename from manager_api/test/user_api_test.dart rename to manager_api_new/test/user_api_test.dart index dd6ecc2..4e866ff 100644 --- a/manager_api/test/user_api_test.dart +++ b/manager_api_new/test/user_api_test.dart @@ -8,10 +8,9 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; - /// tests for UserApi void main() { // final instance = UserApi(); @@ -41,6 +40,5 @@ void main() { test('test userUpdateUser', () async { // TODO }); - }); } diff --git a/manager_api/test/user_detail_dto_test.dart b/manager_api_new/test/user_detail_dto_test.dart similarity index 94% rename from manager_api/test/user_detail_dto_test.dart rename to manager_api_new/test/user_detail_dto_test.dart index a8b4bd9..56efe08 100644 --- a/manager_api/test/user_detail_dto_test.dart +++ b/manager_api_new/test/user_detail_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for UserDetailDTO @@ -35,8 +35,5 @@ void main() { test('to test the property `lastName`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/user_test.dart b/manager_api_new/test/user_test.dart similarity index 96% rename from manager_api/test/user_test.dart rename to manager_api_new/test/user_test.dart index a80a97d..ce9fb95 100644 --- a/manager_api/test/user_test.dart +++ b/manager_api_new/test/user_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for User @@ -55,8 +55,5 @@ void main() { test('to test the property `instanceId`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/video_dto_test.dart b/manager_api_new/test/video_dto_test.dart similarity index 92% rename from manager_api/test/video_dto_test.dart rename to manager_api_new/test/video_dto_test.dart index 298cf4d..dc86b92 100644 --- a/manager_api/test/video_dto_test.dart +++ b/manager_api_new/test/video_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for VideoDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/weather_dto_test.dart b/manager_api_new/test/weather_dto_test.dart similarity index 94% rename from manager_api/test/weather_dto_test.dart rename to manager_api_new/test/weather_dto_test.dart index dabee61..43cb003 100644 --- a/manager_api/test/weather_dto_test.dart +++ b/manager_api_new/test/weather_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for WeatherDTO @@ -30,8 +30,5 @@ void main() { test('to test the property `result`', () async { // TODO }); - - }); - } diff --git a/manager_api/test/web_dto_test.dart b/manager_api_new/test/web_dto_test.dart similarity index 92% rename from manager_api/test/web_dto_test.dart rename to manager_api_new/test/web_dto_test.dart index d3b4bec..9479441 100644 --- a/manager_api/test/web_dto_test.dart +++ b/manager_api_new/test/web_dto_test.dart @@ -8,7 +8,7 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars -import 'package:manager_api/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for WebDTO @@ -20,8 +20,5 @@ void main() { test('to test the property `source_`', () async { // TODO }); - - }); - } diff --git a/pubspec.yaml b/pubspec.yaml index feecba0..b435e82 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,8 +79,8 @@ dependencies: cupertino_icons: ^1.0.6 #win32: ^4.1.2 #archive: ^3.6.1 - manager_api: - path: manager_api + manager_api_new: + path: manager_api_new dev_dependencies: flutter_test: