diff --git a/.gitignore b/.gitignore index 0fa6b67..a1345d0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,6 @@ /build/ # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols diff --git a/lib/Components/audio_input_container.dart b/lib/Components/audio_input_container.dart index f03e49e..63bc28b 100644 --- a/lib/Components/audio_input_container.dart +++ b/lib/Components/audio_input_container.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Components/loading_common.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_app/Screens/Resources/select_resource_modal.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class AudioInputContainer extends StatefulWidget { @@ -67,7 +67,7 @@ class _AudioInputContainerState extends State { var result = await showSelectResourceModal( "Sélectionner une ressource", 1, - [ResourceType.audio], + [ResourceType.Audio], context ); diff --git a/lib/Components/audio_player.dart b/lib/Components/audio_player.dart index f19a379..227cef4 100644 --- a/lib/Components/audio_player.dart +++ b/lib/Components/audio_player.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:http/http.dart' as http; diff --git a/lib/Components/fetch_resource_icon.dart b/lib/Components/fetch_resource_icon.dart index 68c0bc6..1d3fa6f 100644 --- a/lib/Components/fetch_resource_icon.dart +++ b/lib/Components/fetch_resource_icon.dart @@ -1,21 +1,21 @@ import 'package:flutter/material.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; IconData getResourceIcon(elementType) { switch(elementType) { - case ResourceType.image: + case ResourceType.Image: return Icons.image; break; - case ResourceType.imageUrl: + case ResourceType.ImageUrl: return Icons.image_search; // art_track break; - case ResourceType.audio: + case ResourceType.Audio: return Icons.audiotrack; // art_track break; - case ResourceType.video: + case ResourceType.Video: return Icons.slow_motion_video; break; - case ResourceType.videoUrl: + case ResourceType.VideoUrl: return Icons.ondemand_video_sharp; break; } diff --git a/lib/Components/fetch_section_icon.dart b/lib/Components/fetch_section_icon.dart index 88280b0..e5fafad 100644 --- a/lib/Components/fetch_section_icon.dart +++ b/lib/Components/fetch_section_icon.dart @@ -1,27 +1,27 @@ import 'package:flutter/material.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; IconData getSectionIcon(elementType) { switch(elementType) { - case SectionType.map: + case SectionType.Map: return Icons.location_on; break; - case SectionType.slider: + case SectionType.Slider: return Icons.collections; // art_track break; - case SectionType.video: + case SectionType.Video: return Icons.ondemand_video_rounded; break; - case SectionType.web: + case SectionType.Web: return Icons.web; break; - case SectionType.menu: + case SectionType.Menu: return Icons.apps_sharp; break; - case SectionType.quizz: + case SectionType.Quizz: return Icons.question_answer; break; - case SectionType.article: + case SectionType.Article: return Icons.article_outlined; break; } diff --git a/lib/Components/image_input_container.dart b/lib/Components/image_input_container.dart index c794a69..d8de679 100644 --- a/lib/Components/image_input_container.dart +++ b/lib/Components/image_input_container.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Components/loading_common.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_app/Screens/Resources/select_resource_modal.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class ImageInputContainer extends StatefulWidget { @@ -67,7 +67,7 @@ class _ImageInputContainerState extends State { var result = await showSelectResourceModal( "Sélectionner une ressource", 1, - [ResourceType.image, ResourceType.imageUrl], + [ResourceType.Image, ResourceType.ImageUrl], context ); @@ -149,7 +149,7 @@ class _ImageInputContainerState extends State { image: new DecorationImage( fit: widget.imageFit, image: resourceDTO.type != null ? new NetworkImage( - resourceDTO.type == ResourceType.image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDTO.id : resourceDTO.data, + resourceDTO.type == ResourceType.Image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDTO.id : resourceDTO.data, ) : null, ), boxShadow: [ diff --git a/lib/Components/multi_input_modal.dart b/lib/Components/multi_input_modal.dart index 5a8b0ac..ca6148e 100644 --- a/lib/Components/multi_input_modal.dart +++ b/lib/Components/multi_input_modal.dart @@ -8,7 +8,7 @@ import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Resources/select_resource_modal.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:collection/collection.dart'; import 'package:provider/provider.dart'; diff --git a/lib/Components/multi_string_input_container.dart b/lib/Components/multi_string_input_container.dart index 6ed7a01..d61fd05 100644 --- a/lib/Components/multi_string_input_container.dart +++ b/lib/Components/multi_string_input_container.dart @@ -4,7 +4,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/Components/multi_input_modal.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class MultiStringContainer extends StatelessWidget { final Color color; diff --git a/lib/Components/resource_tab.dart b/lib/Components/resource_tab.dart index 9179d61..3fbc104 100644 --- a/lib/Components/resource_tab.dart +++ b/lib/Components/resource_tab.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Components/upload_audio_container.dart'; import 'package:manager_app/Components/upload_image_container.dart'; import 'package:manager_app/Components/upload_online_resources_container.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class ResourceTab extends StatefulWidget { final ResourceDTO resourceDTO; final Function onFileUpload; @@ -71,19 +71,19 @@ class _ResourceTabState extends State with SingleTickerProviderStat case 0: setState(() { widget.resourceDTO.data = null; - widget.resourceDTO.type = ResourceType.image; + widget.resourceDTO.type = ResourceType.Image; }); break; case 1: setState(() { widget.resourceDTO.data = null; - widget.resourceDTO.type = ResourceType.imageUrl; + widget.resourceDTO.type = ResourceType.ImageUrl; }); break; case 2: setState(() { widget.resourceDTO.data = null; - widget.resourceDTO.type = ResourceType.audio; + widget.resourceDTO.type = ResourceType.Audio; }); break; } @@ -100,11 +100,11 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload child: UploadImageContainer( onChanged: (List files) { onFileUpload(files); - resourceDTO.type = ResourceType.image; + resourceDTO.type = ResourceType.Image; }, onChangedWeb: (List files) { onFileUploadWeb(files); - resourceDTO.type = ResourceType.image; + resourceDTO.type = ResourceType.Image; }, ), ) @@ -116,7 +116,7 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16), child: UploadOnlineResourceContainer( resourceDTO: resourceDTO, - onChanged: (ResourceDTO value) { + onChanged: (ResourceDTO value) { resourceDTO = value; }, ), @@ -130,11 +130,11 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload child: UploadAudioContainer( onChanged: (List files) { onFileUpload(files); - resourceDTO.type = ResourceType.audio; + resourceDTO.type = ResourceType.Audio; }, onChangedWeb: (List files) { onFileUploadWeb(files); - resourceDTO.type = ResourceType.audio; + resourceDTO.type = ResourceType.Audio; }, ), ) diff --git a/lib/Components/translation_tab.dart b/lib/Components/translation_tab.dart index 259d045..e9737e4 100644 --- a/lib/Components/translation_tab.dart +++ b/lib/Components/translation_tab.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class TranslationTab extends StatefulWidget { final List translations; final int maxLines; diff --git a/lib/Components/upload_online_resources_container.dart b/lib/Components/upload_online_resources_container.dart index 7ef709b..a72de1e 100644 --- a/lib/Components/upload_online_resources_container.dart +++ b/lib/Components/upload_online_resources_container.dart @@ -1,6 +1,6 @@ import 'package:manager_app/Components/rounded_input_field.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:flutter/material.dart'; class UploadOnlineResourceContainer extends StatefulWidget { @@ -32,7 +32,7 @@ class _UploadOnlineResourceContainerState extends StatevCGrj3T8]yG6E'); diff --git a/lib/Helpers/PDFHelper.dart b/lib/Helpers/PDFHelper.dart index e55b820..be7f03c 100644 --- a/lib/Helpers/PDFHelper.dart +++ b/lib/Helpers/PDFHelper.dart @@ -1,5 +1,5 @@ import 'package:flutter/services.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart' as pw; @@ -7,7 +7,7 @@ import 'dart:html' as html; class PDFHelper { static downloadPDF(List sections) async { - var sectionsArticle = sections.where((section) => section.type == SectionType.article); + var sectionsArticle = sections.where((section) => section.type == SectionType.Article); if(sectionsArticle.length > 0) { //final font = await rootBundle.load("fonts/OpenSans-Medium.ttf"); //Uint8List byteData = new File("fonts/OpenSans-Medium.ttf").readAsBytesSync(); diff --git a/lib/Models/managerContext.dart b/lib/Models/managerContext.dart index c494e85..4b5fff1 100644 --- a/lib/Models/managerContext.dart +++ b/lib/Models/managerContext.dart @@ -1,24 +1,24 @@ import 'package:flutter/material.dart'; import 'package:manager_app/client.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class ManagerAppContext with ChangeNotifier{ String email; String instanceId; String host; - TokenDTO token; + String accessToken; Client clientAPI; String currentRoute; ConfigurationDTO selectedConfiguration; SectionDTO selectedSection; bool isLoading = false; - ManagerAppContext({this.email, this.token, this.currentRoute}); + ManagerAppContext({this.email, this.accessToken, this.currentRoute}); // Implement toString to make it easier to see information about @override String toString() { - return 'ManagerAppContext{email: $email, host: $host, token: $token, currentRoute: $currentRoute}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}'; + return 'ManagerAppContext{email: $email, host: $host, token: $accessToken, instanceId: $instanceId, currentRoute: $currentRoute}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}'; } } \ No newline at end of file diff --git a/lib/Models/resourceTypeModel.dart b/lib/Models/resourceTypeModel.dart index dc31615..c9b83eb 100644 --- a/lib/Models/resourceTypeModel.dart +++ b/lib/Models/resourceTypeModel.dart @@ -1,4 +1,4 @@ -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class ResourceTypeModel { String label; diff --git a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart index 523a0fe..30309d9 100644 --- a/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Article/article_config.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/lis import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:provider/provider.dart'; diff --git a/lib/Screens/Configurations/Section/SubSection/Article/download_pdf.dart b/lib/Screens/Configurations/Section/SubSection/Article/download_pdf.dart index b110488..4c42953 100644 --- a/lib/Screens/Configurations/Section/SubSection/Article/download_pdf.dart +++ b/lib/Screens/Configurations/Section/SubSection/Article/download_pdf.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Helpers/PDFHelper.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class DownloadPDF extends StatefulWidget { final List sections; diff --git a/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart b/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart index c7257b2..8cfb3b4 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart @@ -3,7 +3,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/listVi import 'package:manager_app/Screens/Resources/select_resource_modal.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class GeoPointImageList extends StatefulWidget { @@ -91,12 +91,12 @@ class _GeoPointImageListState extends State { var result = await showSelectResourceModal( "Sélectionner une ressource", 1, - [ResourceType.image, ResourceType.imageUrl], + [ResourceType.Image, ResourceType.ImageUrl], context ); if (result != null) { setState(() { - ImageGeoPoint newImage = new ImageGeoPoint(imageResourceId: result.id, imageSource: result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id); + ImageGeoPoint newImage = new ImageGeoPoint(imageResourceId: result.id, imageSource: result.type == ResourceType.ImageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id); //print("REULT IMAGES = "); //print(newImage); imagesGeo.add(newImage); diff --git a/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart b/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart index 9e31873..c025cff 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/listView_card_geoPoint_images.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class ListViewCardGeoPointImages extends StatefulWidget { diff --git a/lib/Screens/Configurations/Section/SubSection/Map/map_config.dart b/lib/Screens/Configurations/Section/SubSection/Map/map_config.dart index a2b4f8b..73c1147 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/map_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/map_config.dart @@ -7,7 +7,7 @@ import 'package:manager_app/Components/slider_input_container.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:provider/provider.dart'; @@ -66,7 +66,7 @@ class _MapConfigState extends State { color: kPrimaryColor, imageFit: BoxFit.contain, onChanged: (ResourceDTO resource) { - mapDTO.iconSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; + mapDTO.iconSource = resource.type == ResourceType.ImageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; mapDTO.iconResourceId = resource.id; widget.onChanged(jsonEncode(mapDTO).toString()); }, @@ -202,7 +202,7 @@ class _MapConfigState extends State { top: 0, right: 0, child: Icon( - getSectionIcon(SectionType.map), + getSectionIcon(SectionType.Map), color: kSecond, size: 18.0, ), diff --git a/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart b/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart index f323768..a74a4ce 100644 --- a/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart +++ b/lib/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart @@ -7,7 +7,7 @@ import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/geopoint_image_list.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; void showNewOrUpdateGeoPoint(GeoPointDTO inputGeoPointDTO, Function getResult, AppContext appContext, BuildContext context) { GeoPointDTO geoPointDTO = new GeoPointDTO(); diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/listView_card_subSection.dart b/lib/Screens/Configurations/Section/SubSection/Menu/listView_card_subSection.dart index 6091dd4..d41dd13 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/listView_card_subSection.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/listView_card_subSection.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Components/fetch_section_icon.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class ListViewCardSubSection extends StatefulWidget { diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart b/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart index c6132b0..4fab589 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/menu_config.dart @@ -5,7 +5,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Menu/listV import 'package:manager_app/Screens/Configurations/new_section_popup.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:provider/provider.dart'; diff --git a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart index a81efc8..1af9144 100644 --- a/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart +++ b/lib/Screens/Configurations/Section/SubSection/Menu/showEditSubSection.dart @@ -9,7 +9,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/sli import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import '../Map/map_config.dart'; import 'menu_config.dart'; @@ -47,7 +47,7 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext color: kPrimaryColor, onChanged: (ResourceDTO resource) { subSectionDTO.imageId = resource.id; - subSectionDTO.imageSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; + subSectionDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; }, isSmall: true, ), @@ -125,7 +125,7 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appContext) { switch(sectionDTO.type) { - case SectionType.map: + case SectionType.Map: return MapConfig( initialValue: sectionDTO.data, onChanged: (String data) { @@ -134,7 +134,7 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte sectionDTO.data = data; }, ); - case SectionType.slider: + case SectionType.Slider: return Container( width: MediaQuery.of(context).size.width * 0.5, height: MediaQuery.of(context).size.height * 0.5, @@ -147,16 +147,16 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte }, ), ); - case SectionType.video: - case SectionType.web: + case SectionType.Video: + case SectionType.Web: return WebOrVideoConfig( - label: sectionDTO.type == SectionType.video ? "Url de la vidéo:": "Url du site web:", + label: sectionDTO.type == SectionType.Video ? "Url de la vidéo:": "Url du site web:", initialValue: sectionDTO.data, onChanged: (String data) { sectionDTO.data = data; }, ); - case SectionType.menu: + case SectionType.Menu: return MenuConfig( initialValue: sectionDTO.data, onChanged: (String data) { diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_question_quizz.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_question_quizz.dart index b633b5b..a21e442 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_question_quizz.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_question_quizz.dart @@ -8,7 +8,7 @@ import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Quizz/quizz_answer_list.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; Future showNewOrUpdateQuestionQuizz(QuestionDTO inputQuestionDTO, AppContext appContext, BuildContext context, String text) async { QuestionDTO questionDTO = new QuestionDTO(); @@ -55,7 +55,7 @@ Future showNewOrUpdateQuestionQuizz(QuestionDTO inputQuestionDTO, A color: kPrimaryColor, onChanged: (ResourceDTO resource) { var result = resource; - questionDTO.source_ = result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; + questionDTO.source_ = result.type == ResourceType.ImageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; questionDTO.resourceId = result.id; }, isSmall: true diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_response_quizz.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_response_quizz.dart index 5e5a767..10a4519 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_response_quizz.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_response_quizz.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Components/text_form_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; Future showNewOrUpdateResponseQuizz(ResponseDTO inputResponseDTO, AppContext appContext, BuildContext context, String text) async { ResponseDTO responseDTO = new ResponseDTO(); diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz.dart index 4870c56..6b8e9e1 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/new_update_score_quizz.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Components/text_form_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; Future showNewOrUpdateScoreQuizz(LevelDTO inputLevelDTO, AppContext appContext, BuildContext context, String text) async { LevelDTO levelDTO = new LevelDTO(); @@ -49,7 +49,7 @@ Future showNewOrUpdateScoreQuizz(LevelDTO inputLevelDTO, AppContext ap color: kPrimaryColor, onChanged: (ResourceDTO resource) { var result = resource; - levelDTO.source_ = result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; + levelDTO.source_ = result.type == ResourceType.ImageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; levelDTO.resourceId = result.id; }, isSmall: true diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_answer_list.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_answer_list.dart index acf1099..b8f673a 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_answer_list.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_answer_list.dart @@ -2,7 +2,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'new_update_response_quizz.dart'; diff --git a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart index e83673c..074645f 100644 --- a/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Components/rounded_button.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:provider/provider.dart'; diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart index 17c82c6..ad0aa14 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class ListViewCardImage extends StatefulWidget { final int index; diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart b/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart index 936c0b6..501edeb 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Components/text_form_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; Future showNewOrUpdateImageSlider(ImageDTO inputImageDTO, AppContext appContext, BuildContext context, bool showTitle, bool showDescription) async { ImageDTO imageDTO = new ImageDTO(); @@ -55,7 +55,7 @@ Future showNewOrUpdateImageSlider(ImageDTO inputImageDTO, AppContext a color: kPrimaryColor, onChanged: (ResourceDTO resource) { var result = resource; - imageDTO.source_ = result.type == ResourceType.imageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; + imageDTO.source_ = result.type == ResourceType.ImageUrl ? result.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ result.id; imageDTO.resourceId = result.id; }, isSmall: true diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart b/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart index d0a44f3..72280b7 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart @@ -3,7 +3,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/lis import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; import 'package:provider/provider.dart'; diff --git a/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart b/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart index a7c05cd..4f49895 100644 --- a/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart +++ b/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/Components/string_input_container.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dart:convert'; class WebOrVideoConfig extends StatefulWidget { diff --git a/lib/Screens/Configurations/Section/section_detail_screen.dart b/lib/Screens/Configurations/Section/section_detail_screen.dart index 541f788..dfccada 100644 --- a/lib/Screens/Configurations/Section/section_detail_screen.dart +++ b/lib/Screens/Configurations/Section/section_detail_screen.dart @@ -13,7 +13,7 @@ import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo import 'package:manager_app/app_context.dart'; import 'package:manager_app/client.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:intl/intl.dart'; @@ -100,7 +100,7 @@ class _SectionDetailScreenState extends State { ), ), Text(sectionDTO != null ? sectionDTO.label : "", style: TextStyle(fontSize: 30, fontWeight: FontWeight.w400)), - if(sectionDTO.type == SectionType.article) + if(sectionDTO.type == SectionType.Article) DownloadPDF(sections: [sectionDTO]), ], ), @@ -148,7 +148,7 @@ class _SectionDetailScreenState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - if(sectionDTO.type == SectionType.article) + if(sectionDTO.type == SectionType.Article) Container( width: size.width *0.1, height: 125, @@ -183,7 +183,7 @@ class _SectionDetailScreenState extends State { maxLines: 1, isTitle: true, ), - if(sectionDTO.type != SectionType.article) + if(sectionDTO.type != SectionType.Article) MultiStringContainer( label: "Description affichée:", modalLabel: "Description", @@ -210,7 +210,7 @@ class _SectionDetailScreenState extends State { color: kPrimaryColor, onChanged: (ResourceDTO resource) { sectionDTO.imageId = resource.id; - sectionDTO.imageSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; + sectionDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; }, ), ], @@ -329,7 +329,7 @@ class _SectionDetailScreenState extends State { getSpecificData(SectionDTO sectionDTO, AppContext appContext) { switch(sectionDTO.type) { - case SectionType.map: + case SectionType.Map: return MapConfig( initialValue: sectionDTO.data, onChanged: (String data) { @@ -337,7 +337,7 @@ class _SectionDetailScreenState extends State { //save(false, sectionDTO, appContext); }, ); - case SectionType.slider: + case SectionType.Slider: return SliderConfig( initialValue: sectionDTO.data, onChanged: (String data) { @@ -345,16 +345,16 @@ class _SectionDetailScreenState extends State { save(false, sectionDTO, appContext); }, ); - case SectionType.video: - case SectionType.web: + case SectionType.Video: + case SectionType.Web: return WebOrVideoConfig( - label: sectionDTO.type == SectionType.video ? "Url de la vidéo:": "Url du site web:", + label: sectionDTO.type == SectionType.Video ? "Url de la vidéo:": "Url du site web:", initialValue: sectionDTO.data, onChanged: (String data) { sectionDTO.data = data; }, ); - case SectionType.menu: + case SectionType.Menu: return MenuConfig( initialValue: sectionDTO.data, onChanged: (String data) { @@ -363,7 +363,7 @@ class _SectionDetailScreenState extends State { sectionDTO.data = data; }, ); - case SectionType.quizz: + case SectionType.Quizz: return QuizzConfig( initialValue: sectionDTO.data, onChanged: (String data) { @@ -372,7 +372,7 @@ class _SectionDetailScreenState extends State { sectionDTO.data = data; }, ); - case SectionType.article: + case SectionType.Article: return ArticleConfig( initialValue: sectionDTO.data, onChanged: (String data) { diff --git a/lib/Screens/Configurations/configuration_detail_screen.dart b/lib/Screens/Configurations/configuration_detail_screen.dart index 5e05a22..dea9d81 100644 --- a/lib/Screens/Configurations/configuration_detail_screen.dart +++ b/lib/Screens/Configurations/configuration_detail_screen.dart @@ -21,7 +21,7 @@ import 'package:manager_app/Screens/Configurations/section_reorderList.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/client.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:intl/intl.dart'; import 'dart:html' as html; @@ -287,7 +287,7 @@ class _ConfigurationDetailScreenState extends State { color: kPrimaryColor, onChanged: (ResourceDTO resource) { configurationDTO.imageId = resource.id; - configurationDTO.imageSource = resource.type == ResourceType.imageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; + configurationDTO.imageSource = resource.type == ResourceType.ImageUrl ? resource.data : appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resource.id; }, ), ]) diff --git a/lib/Screens/Configurations/configurations_screen.dart b/lib/Screens/Configurations/configurations_screen.dart index 0ae5b7a..bf03adc 100644 --- a/lib/Screens/Configurations/configurations_screen.dart +++ b/lib/Screens/Configurations/configurations_screen.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Screens/Configurations/configuration_detail_screen.d import 'package:manager_app/Screens/Configurations/new_configuration_popup.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:intl/intl.dart'; diff --git a/lib/Screens/Configurations/listView_card_section.dart b/lib/Screens/Configurations/listView_card_section.dart index 56ddb25..131623f 100644 --- a/lib/Screens/Configurations/listView_card_section.dart +++ b/lib/Screens/Configurations/listView_card_section.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Components/fetch_section_icon.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class ListViewCardSections extends StatefulWidget { diff --git a/lib/Screens/Configurations/new_configuration_popup.dart b/lib/Screens/Configurations/new_configuration_popup.dart index a5ae2db..1cba4e4 100644 --- a/lib/Screens/Configurations/new_configuration_popup.dart +++ b/lib/Screens/Configurations/new_configuration_popup.dart @@ -8,7 +8,7 @@ import 'package:manager_app/Helpers/FileHelper.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; void showNewConfiguration(AppContext appContext, ValueChanged isImport, BuildContext context, BuildContext mainContext) { ConfigurationDTO configurationDTO = new ConfigurationDTO(); diff --git a/lib/Screens/Configurations/new_section_popup.dart b/lib/Screens/Configurations/new_section_popup.dart index 7ba11a2..8ec174e 100644 --- a/lib/Screens/Configurations/new_section_popup.dart +++ b/lib/Screens/Configurations/new_section_popup.dart @@ -6,7 +6,7 @@ import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; void showNewSection(String configurationId, AppContext appContext, BuildContext contextBuild, bool isSubSection, Function sendSubSection, bool isMobile) { SectionDTO sectionDTO = new SectionDTO(); @@ -14,7 +14,7 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext sectionDTO.isSubSection = isSubSection; sectionDTO.parentId = isSubSection ? appContext.getContext().selectedSection.id : null; Size size = MediaQuery.of(contextBuild).size; - sectionDTO.type = isMobile ? SectionType.article : SectionType.map; + sectionDTO.type = isMobile ? SectionType.Article : SectionType.Map; showDialog( builder: (BuildContext context) => AlertDialog( diff --git a/lib/Screens/Configurations/section_reorderList.dart b/lib/Screens/Configurations/section_reorderList.dart index 0e42188..bec33dd 100644 --- a/lib/Screens/Configurations/section_reorderList.dart +++ b/lib/Screens/Configurations/section_reorderList.dart @@ -5,7 +5,7 @@ import 'package:manager_app/Screens/Configurations/listView_card_section.dart'; import 'package:manager_app/Screens/Configurations/new_section_popup.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class SectionReorderList extends StatefulWidget { diff --git a/lib/Screens/Devices/change_device_info_modal.dart b/lib/Screens/Devices/change_device_info_modal.dart index 41037cb..ab4ae7a 100644 --- a/lib/Screens/Devices/change_device_info_modal.dart +++ b/lib/Screens/Devices/change_device_info_modal.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'dropDown_configuration.dart'; diff --git a/lib/Screens/Devices/device_element.dart b/lib/Screens/Devices/device_element.dart index c0d6b9c..3d927a2 100644 --- a/lib/Screens/Devices/device_element.dart +++ b/lib/Screens/Devices/device_element.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Devices/change_device_info_modal.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class DeviceElement extends StatefulWidget { diff --git a/lib/Screens/Devices/devices_screen.dart b/lib/Screens/Devices/devices_screen.dart index 6502f86..dd06b5f 100644 --- a/lib/Screens/Devices/devices_screen.dart +++ b/lib/Screens/Devices/devices_screen.dart @@ -4,7 +4,7 @@ import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Devices/device_element.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class DevicesScreen extends StatefulWidget { diff --git a/lib/Screens/Devices/dropDown_configuration.dart b/lib/Screens/Devices/dropDown_configuration.dart index c6e49bc..7227a72 100644 --- a/lib/Screens/Devices/dropDown_configuration.dart +++ b/lib/Screens/Devices/dropDown_configuration.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; class DropDownConfig extends StatefulWidget { final List configurations; diff --git a/lib/Screens/Main/components/body.dart b/lib/Screens/Main/components/body.dart index f6be36c..484f5b6 100644 --- a/lib/Screens/Main/components/body.dart +++ b/lib/Screens/Main/components/body.dart @@ -13,7 +13,7 @@ import 'package:manager_app/Screens/login_screen.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; import 'package:manager_app/main.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; @@ -139,7 +139,7 @@ class _BodyState extends State { Storage localStorage = window.localStorage; localStorage.clear(); ManagerAppContext managerAppContext = appContext.getContext(); - managerAppContext.token = null; + managerAppContext.accessToken = null; appContext.setContext(managerAppContext); Navigator.pushAndRemoveUntil( @@ -197,9 +197,9 @@ class _BodyState extends State { padding: const EdgeInsets.all(8.0), child: ResourcesScreen( resourceTypes: [ - ResourceType.audio, - ResourceType.image, - ResourceType.imageUrl + ResourceType.Audio, + ResourceType.Image, + ResourceType.ImageUrl ] ) ); diff --git a/lib/Screens/Resources/get_element_for_resource.dart b/lib/Screens/Resources/get_element_for_resource.dart index df80357..3b2c06a 100644 --- a/lib/Screens/Resources/get_element_for_resource.dart +++ b/lib/Screens/Resources/get_element_for_resource.dart @@ -1,12 +1,12 @@ import 'package:manager_app/Components/audio_player.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:flutter/material.dart'; getElementForResource(dynamic resourceDTO, AppContext appContext) { switch(resourceDTO.type) { - case ResourceType.image: + case ResourceType.Image: return Image.network( appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDTO.id, fit:BoxFit.fill, @@ -27,7 +27,7 @@ getElementForResource(dynamic resourceDTO, AppContext appContext) { }, ); break; - case ResourceType.imageUrl: + case ResourceType.ImageUrl: return Image.network( resourceDTO.data, fit:BoxFit.fill, @@ -48,14 +48,14 @@ getElementForResource(dynamic resourceDTO, AppContext appContext) { }, ); break; - case ResourceType.audio: + case ResourceType.Audio: //return AudioPlayerContainer(resourceDTO: resourceDTO, isAuto: true); return Text("Fichier audio - aucune visualisation possible"); break; - case ResourceType.video: + case ResourceType.Video: return Text("Vidéo locale - aucune visualisation possible"); break; - case ResourceType.videoUrl: + case ResourceType.VideoUrl: return Text(resourceDTO.data); break; } diff --git a/lib/Screens/Resources/new_resource_popup.dart b/lib/Screens/Resources/new_resource_popup.dart index a013302..a746518 100644 --- a/lib/Screens/Resources/new_resource_popup.dart +++ b/lib/Screens/Resources/new_resource_popup.dart @@ -9,7 +9,7 @@ import 'package:manager_app/Components/rounded_button.dart'; import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; dynamic showNewResource(AppContext appContext, BuildContext context) async { ResourceDTO resourceDetailDTO = new ResourceDTO(); diff --git a/lib/Screens/Resources/resource_body_grid.dart b/lib/Screens/Resources/resource_body_grid.dart index 2a3bccb..abce823 100644 --- a/lib/Screens/Resources/resource_body_grid.dart +++ b/lib/Screens/Resources/resource_body_grid.dart @@ -5,7 +5,7 @@ import 'package:manager_app/Components/multi_select_container.dart'; import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; class ResourceBodyGrid extends StatefulWidget { @@ -193,11 +193,11 @@ boxDecoration(dynamic resourceDetailDTO, appContext) { color: resourceDetailDTO.id == null ? kSuccess : kBackgroundColor, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(30.0), - image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.image || resourceDetailDTO.type == ResourceType.imageUrl) ? new DecorationImage( + image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.Image || resourceDetailDTO.type == ResourceType.ImageUrl) ? new DecorationImage( fit: BoxFit.cover, colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop), image: new NetworkImage( - resourceDetailDTO.type == ResourceType.image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDetailDTO.id : resourceDetailDTO.data, + resourceDetailDTO.type == ResourceType.Image ? appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/"+ resourceDetailDTO.id : resourceDetailDTO.data, ), ) : null, boxShadow: [ diff --git a/lib/Screens/Resources/resources_screen.dart b/lib/Screens/Resources/resources_screen.dart index 181871d..2ef6050 100644 --- a/lib/Screens/Resources/resources_screen.dart +++ b/lib/Screens/Resources/resources_screen.dart @@ -9,7 +9,7 @@ import 'package:manager_app/Screens/Resources/resource_body_grid.dart'; import 'package:manager_app/Screens/Resources/show_resource_popup.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:http/http.dart' as http; import 'package:flutter/foundation.dart' show kIsWeb; @@ -51,7 +51,7 @@ class _ResourcesScreenState extends State { // tempOutput.add(ResourceDTO(id: null)); return ResourceBodyGrid( resources: tempOutput, - resourceTypesIn: widget.isImage ? resource_types.where((rt) => rt.type == ResourceType.image || rt.type == ResourceType.imageUrl).map((rt) => rt.type).toList() : widget.resourceTypes, + resourceTypesIn: widget.isImage ? resource_types.where((rt) => rt.type == ResourceType.Image || rt.type == ResourceType.ImageUrl).map((rt) => rt.type).toList() : widget.resourceTypes, isAddButton: widget.isAddButton, onSelect: (value) async { if (widget.onGetResult == null) { @@ -93,16 +93,16 @@ Future getResources(Function onGetResult, bool isImage, AppContext appCont types = types != null ? types : []; List resources = await (appContext.getContext() as ManagerAppContext).clientAPI.resourceApi.resourceGet(instanceId: (appContext.getContext() as ManagerAppContext).instanceId, types: types); if (onGetResult != null && isImage) { - resources = resources.where((element) => element.type == ResourceType.image || element.type == ResourceType.imageUrl || element.type == ResourceType.audio).toList(); + resources = resources.where((element) => element.type == ResourceType.Image || element.type == ResourceType.ImageUrl || element.type == ResourceType.Audio).toList(); } return resources; } Future create(ResourceDTO resourceDTO, List files, List filesWeb, AppContext appContext, context) async { switch(resourceDTO.type) { - case ResourceType.audio: - case ResourceType.image: - case ResourceType.video: + case ResourceType.Audio: + case ResourceType.Image: + case ResourceType.Video: var request = http.MultipartRequest('POST', Uri.parse(appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/upload")); @@ -130,7 +130,7 @@ Future create(ResourceDTO resourceDTO, List files, List create(ResourceDTO resourceDTO, List files, List resourceTypes, BuildContext mainContext) async { /*Function onSelect,*/ Size size = MediaQuery.of(mainContext).size; diff --git a/lib/Screens/Resources/show_resource_popup.dart b/lib/Screens/Resources/show_resource_popup.dart index 6932bb6..28d84fb 100644 --- a/lib/Screens/Resources/show_resource_popup.dart +++ b/lib/Screens/Resources/show_resource_popup.dart @@ -5,7 +5,7 @@ import 'package:manager_app/Components/rounded_button.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'get_element_for_resource.dart'; diff --git a/lib/Screens/login_screen.dart b/lib/Screens/login_screen.dart index d7b7ffa..9635883 100644 --- a/lib/Screens/login_screen.dart +++ b/lib/Screens/login_screen.dart @@ -15,7 +15,7 @@ import 'package:manager_app/Screens/Main/main_screen.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/client.dart'; import 'package:manager_app/constants.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:provider/provider.dart'; import 'package:flutter/foundation.dart' show kIsWeb; @@ -36,9 +36,10 @@ class _LoginScreenState extends State { bool isRememberMe = false; String pageTitle = "MyMuseum"; String token; + String instanceId; Storage localStorage = window.localStorage; - void authenticateTRY(dynamic appContext) async { + void authenticateTRY(dynamic appContext, bool fromClick) async { //print("try auth.. "); /*this.host = "http://localhost:5000"; @@ -51,27 +52,36 @@ class _LoginScreenState extends State { // if () {} // Add if token exist and not null + not expired try { - setState(() { - isLoading = true; - }); + if(fromClick) { + setState(() { + isLoading = true; + }); + } /*print(email); print(password);*/ - LoginDTO loginDTO = new LoginDTO(email: email, password: password); - TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); - setAccessToken(token.accessToken); + var accessToken = this.token; + var instanceId = this.instanceId; + if(accessToken == null) { + LoginDTO loginDTO = new LoginDTO(email: email, password: password); + TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO); + accessToken = token.accessToken; + instanceId = token.instanceId; - if(!isRememberMe) { - localStorage.clear(); - } else { + showNotification(kSuccess, kWhite, 'Connexion réussie', context, null); - if(!localStorage.containsKey("remember")) { - localStorage.addEntries({"remember": "true"}.entries); - } + if(isRememberMe) { + if(!localStorage.containsKey("remember")) { + localStorage.addEntries({"remember": "true"}.entries); + } - if(!localStorage.containsKey("email") && !localStorage.containsKey("token")) { - localStorage.addEntries({"email": email}.entries); - localStorage.addEntries({"token": token.accessToken}.entries); + if(!localStorage.containsKey("email") && !localStorage.containsKey("token")) { + localStorage.addEntries({"email": email}.entries); + localStorage.addEntries({"token": token.accessToken}.entries); + localStorage.addEntries({"instanceId": token.instanceId}.entries); + } + } else { + localStorage.clear(); } } // Desktop @@ -81,8 +91,6 @@ class _LoginScreenState extends State { FileHelper().writeSession(updatedSession); }*/ - showNotification(kSuccess, kWhite, 'Connexion réussie', context, null); - ManagerAppContext managerAppContext = appContext.getContext(); // Set the appContext if (managerAppContext == null) { @@ -92,16 +100,19 @@ class _LoginScreenState extends State { // store user info locally managerAppContext.email = email; managerAppContext.host = host; - managerAppContext.instanceId = token.instanceId; - managerAppContext.token = token; + managerAppContext.instanceId = instanceId; + managerAppContext.accessToken = accessToken; managerAppContext.clientAPI = clientAPI; + setAccessToken(accessToken); //print(managerAppContext); appContext.setContext(managerAppContext); - setState(() { - isLoading = false; - }); + if(fromClick) { + setState(() { + isLoading = false; + }); + } //Navigator.pushNamed(context, '/main'); @@ -118,27 +129,33 @@ class _LoginScreenState extends State { return MainScreen(); }, ), - (Route route) => false // For pushAndRemoveUntil + (Route route) => false // For pushAndRemoveUntil ); } catch (e) { - //print("error auth"); - //print(e); - showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null); - - setState(() { - isLoading = false; - }); + print("error auth"); + print(e); + if(fromClick) { + showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null); + setState(() { + isLoading = false; + }); + } } } } void setAccessToken(String accessToken) { - clientAPI.apiApi.authentications.forEach((key, auth) { + //clientAPI.resourceApi.apiClient.addDefaultHeader('authorization', 'Bearer '+accessToken); + clientAPI.apiApi.addDefaultHeader('authorization', 'Bearer '+accessToken); + //clientAPI.resourceApi.addDefaultHeader('Bearer', accessToken); + //clientAPI.apiApi.authentication.applyToParams([], Map.from({'Bearer': accessToken})); + + /*clientAPI.apiApi.authentications.forEach((key, auth) { if (auth is OAuth) { auth.accessToken = accessToken; } - }); + });*/ } @override @@ -155,6 +172,10 @@ class _LoginScreenState extends State { } if(localStorage.containsKey("token")) { this.token = localStorage.entries.where((element) => element.key == "token").first.value; + this.password = "AnythingAsWeAlreadyHaveAccessToken"; + } + if(localStorage.containsKey("instanceId")) { + this.instanceId = localStorage.entries.where((element) => element.key == "instanceId").first.value; } } super.initState(); @@ -193,10 +214,11 @@ class _LoginScreenState extends State { initInstance(appContext.getContext()); - if(mounted && appContext != null && this.token != null) + // ==> We need to work with route or something else like pop-up (pop up is nice) to make it works ! + /*if(mounted && appContext != null && this.token != null) { - this.authenticateTRY(appContext); - } + this.authenticateTRY(appContext, false); + }*/ return Scaffold( body: Center( @@ -306,7 +328,7 @@ class _LoginScreenState extends State { horizontal: 45, press: () { TextInput.finishAutofillContext(); - authenticateTRY(appContext); + authenticateTRY(appContext, true); }, ): Container( height: size.height * 0.1, diff --git a/lib/api/openApiTest.dart b/lib/api/openApiTest.dart new file mode 100644 index 0000000..1e1b816 --- /dev/null +++ b/lib/api/openApiTest.dart @@ -0,0 +1,15 @@ +import 'package:openapi_generator_annotations/openapi_generator_annotations.dart'; + +@Openapi( + additionalProperties: + AdditionalProperties(pubName: 'manager_api_new', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), + inputSpecFile: 'lib/api/swagger.yaml', + generatorName: Generator.dart, + alwaysRun: true, + outputDirectory: 'manager_api_new') +class Example extends OpenapiGeneratorConfig {} + +/* + RUN + >flutter pub run build_runner build --delete-conflicting-outputs +*/ \ No newline at end of file diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml new file mode 100644 index 0000000..6601444 --- /dev/null +++ b/lib/api/swagger.yaml @@ -0,0 +1,3540 @@ +{ + "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.mymuseum.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/{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 + } + ], + "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/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" + } + } + } + } + }, + "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": { + "$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/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/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 + } + } + }, + "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" + }, + "instanceId": { + "type": "string", + "nullable": true + } + } + }, + "SectionType": { + "type": "integer", + "description": "0 = Map\n1 = Slider\n2 = Video\n3 = Web\n4 = Menu\n5 = Quizz\n6 = Article", + "x-enumNames": [ + "Map", + "Slider", + "Video", + "Web", + "Menu", + "Quizz", + "Article" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + "ResourceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ResourceType" + }, + "label": { + "type": "string", + "nullable": true + }, + "data": { + "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", + "x-enumNames": [ + "Image", + "Video", + "ImageUrl", + "VideoUrl", + "Audio" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "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" + } + } + }, + "InstanceDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "dateCreation": { + "type": "string", + "format": "date-time" + } + } + }, + "MapDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "zoom": { + "type": "integer", + "format": "int32" + }, + "mapType": { + "$ref": "#/components/schemas/MapTypeApp" + }, + "points": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/GeoPointDTO" + } + }, + "iconResourceId": { + "type": "string", + "nullable": true + }, + "iconSource": { + "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 + ] + }, + "GeoPointDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "description": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "images": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ImageGeoPoint" + } + }, + "latitude": { + "type": "string", + "nullable": true + }, + "longitude": { + "type": "string", + "nullable": true + } + } + }, + "ImageGeoPoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "imageResourceId": { + "type": "string", + "nullable": true + }, + "imageSource": { + "type": "string", + "nullable": true + } + } + }, + "SliderDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "images": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ImageDTO" + } + } + } + }, + "ImageDTO": { + "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 + }, + "source": { + "type": "string", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "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/TranslationDTO" + } + }, + "responses": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResponseDTO" + } + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "ResponseDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "isGood": { + "type": "boolean" + }, + "order": { + "type": "integer", + "format": "int32" + } + } + }, + "LevelDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + } + } + }, + "ArticleDTO": { + "type": "object", + "additionalProperties": false, + "properties": { + "content": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "qrCode": { + "type": "string", + "nullable": true + }, + "isContentTop": { + "type": "boolean" + }, + "audioIds": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TranslationDTO" + } + }, + "isReadAudioAuto": { + "type": "boolean" + }, + "images": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ImageDTO" + } + } + } + }, + "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 + } + } + }, + "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" + } + ] +} \ No newline at end of file diff --git a/manager_api/swagger.yaml.bak0 b/lib/api/swagger.yaml.bak0 similarity index 100% rename from manager_api/swagger.yaml.bak0 rename to lib/api/swagger.yaml.bak0 diff --git a/manager_api/swagger.yaml.bak1 b/lib/api/swagger.yaml.bak1 similarity index 100% rename from manager_api/swagger.yaml.bak1 rename to lib/api/swagger.yaml.bak1 diff --git a/manager_api/swagger.yaml b/lib/api/swagger.yaml.bak2 similarity index 86% rename from manager_api/swagger.yaml rename to lib/api/swagger.yaml.bak2 index 71513eb..2dadf26 100644 --- a/manager_api/swagger.yaml +++ b/lib/api/swagger.yaml.bak2 @@ -12,13 +12,6 @@ paths: tags: - Configuration operationId: Configuration_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 responses: '200': description: '' @@ -273,13 +266,6 @@ paths: tags: - Device operationId: Device_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 responses: '200': description: '' @@ -491,201 +477,11 @@ paths: 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/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: '' @@ -901,9 +697,6 @@ paths: type: type: string nullable: true - instanceId: - type: string - nullable: true responses: '200': description: '' @@ -930,13 +723,6 @@ paths: tags: - Section operationId: Section_Get - parameters: - - name: instanceId - in: query - schema: - type: string - nullable: true - x-position: 1 responses: '200': description: '' @@ -1418,8 +1204,6 @@ paths: application/json: schema: type: string - security: - - bearer: [] put: tags: - User @@ -1651,9 +1435,6 @@ components: type: boolean isOffline: type: boolean - instanceId: - type: string - nullable: true TranslationDTO: type: object additionalProperties: false @@ -1725,19 +1506,9 @@ components: order: type: integer format: int32 - instanceId: - type: string - nullable: true SectionType: - type: integer - description: |- - 0 = Map - 1 = Slider - 2 = Video - 3 = Web - 4 = Menu - 5 = Quizz - 6 = Article + type: string + description: '' x-enumNames: - Map - Slider @@ -1747,13 +1518,13 @@ components: - Quizz - Article enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 + - Map + - Slider + - Video + - Web + - Menu + - Quizz + - Article ResourceDTO: type: object additionalProperties: false @@ -1766,35 +1537,25 @@ components: label: type: string nullable: true - data: - type: string - nullable: true dateCreation: type: string format: date-time - instanceId: + data: type: string nullable: true ResourceType: - type: integer - description: |- - 0 = Image - 1 = Video - 2 = ImageUrl - 3 = VideoUrl - 4 = Audio + type: string + description: '' x-enumNames: - Image - Video - ImageUrl - VideoUrl - - Audio enum: - - 0 - - 1 - - 2 - - 3 - - 4 + - Image + - Video + - ImageUrl + - VideoUrl DeviceDTO: type: object additionalProperties: false @@ -1828,9 +1589,6 @@ components: dateUpdate: type: string format: date-time - instanceId: - type: string - nullable: true DeviceDetailDTO: allOf: - $ref: '#/components/schemas/DeviceDTO' @@ -1849,32 +1607,6 @@ components: 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 - InstanceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - dateCreation: - type: string - format: date-time MapDTO: type: object additionalProperties: false @@ -1896,13 +1628,8 @@ components: type: string nullable: true MapTypeApp: - type: integer - description: |- - 0 = none - 1 = normal - 2 = satellite - 3 = terrain - 4 = hybrid + type: string + description: '' x-enumNames: - none - normal @@ -1910,11 +1637,11 @@ components: - terrain - hybrid enum: - - 0 - - 1 - - 2 - - 3 - - 4 + - none + - normal + - satellite + - terrain + - hybrid GeoPointDTO: type: object additionalProperties: false @@ -2107,11 +1834,9 @@ components: nullable: true isContentTop: type: boolean - audioIds: - type: array + audioId: + type: string nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' isReadAudioAuto: type: boolean images: @@ -2144,9 +1869,6 @@ components: dateCreation: type: string format: date-time - instanceId: - type: string - nullable: true UserDetailDTO: type: object additionalProperties: false @@ -2185,9 +1907,6 @@ components: expiration: type: string format: date-time - instanceId: - type: string - nullable: true LoginDTO: type: object additionalProperties: false @@ -2215,8 +1934,6 @@ tags: description: Configuration management - name: Device description: Device management - - name: Instance - description: Instance management - name: Resource description: Resource management - name: Section diff --git a/lib/client.dart b/lib/client.dart index 3f8c72b..36a4f0d 100644 --- a/lib/client.dart +++ b/lib/client.dart @@ -1,4 +1,4 @@ -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; //import 'package:openapi_dart_common/openapi.dart'; class Client { diff --git a/lib/constants.dart b/lib/constants.dart index e1fb78f..faeceb1 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Models/resourceTypeModel.dart'; -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; // Colors - TO FILL WIT CORRECT COLOR //const kBackgroundColor = Color(0xFFFFFFFF); @@ -20,9 +20,9 @@ const List section_types = ["Map", "Slider", "Video", "Web", "Menu", "Qu const List map_types = ["none", "normal", "satellite", "terrain", "hybrid"]; const List languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL"]; List resource_types = [ - ResourceTypeModel(label: "image", type: ResourceType.image), - ResourceTypeModel(label: "image url", type: ResourceType.imageUrl), - ResourceTypeModel(label: "audio", type: ResourceType.audio) + ResourceTypeModel(label: "image", type: ResourceType.Image), + ResourceTypeModel(label: "image url", type: ResourceType.ImageUrl), + ResourceTypeModel(label: "audio", type: ResourceType.Audio) ]; // "video url" , "video", {"label": "image"}, "image url", "audio" /* diff --git a/manager_api/.gitignore b/manager_api/.gitignore deleted file mode 100644 index 7c28044..0000000 --- a/manager_api/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# See https://www.dartlang.org/tools/private-files.html - -# Files and directories created by pub -.buildlog -.packages -.project -.pub/ -build/ -**/packages/ - -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc -doc/api/ - -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock diff --git a/manager_api/.openapi-generator/VERSION b/manager_api/.openapi-generator/VERSION deleted file mode 100644 index acf69b4..0000000 --- a/manager_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.1.0 \ No newline at end of file diff --git a/manager_api/doc/DisplayApi.md b/manager_api/doc/DisplayApi.md deleted file mode 100644 index 34d761e..0000000 --- a/manager_api/doc/DisplayApi.md +++ /dev/null @@ -1,229 +0,0 @@ -# managerapi.api.DisplayApi - -## Load the API package -```dart -import 'package:managerapi/api.dart'; -``` - -All URIs are relative to *https://localhost:44339* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**displayCreate**](DisplayApi.md#displaycreate) | **POST** /api/Display | -[**displayDelete**](DisplayApi.md#displaydelete) | **DELETE** /api/Display/{id} | -[**displayGet**](DisplayApi.md#displayget) | **GET** /api/Display | -[**displayGetDetail**](DisplayApi.md#displaygetdetail) | **GET** /api/Display/{id} | -[**displayUpdate**](DisplayApi.md#displayupdate) | **PUT** /api/Display | - - -# **displayCreate** -> RessourceDetailDTO displayCreate(displayDTO) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = DisplayApi(); -final displayDTO = DisplayDTO(); // DisplayDTO | - -try { - final result = api_instance.displayCreate(displayDTO); - print(result); -} catch (e) { - print('Exception when calling DisplayApi->displayCreate: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **displayDTO** | [**DisplayDTO**](DisplayDTO.md)| | - -### Return type - -[**RessourceDetailDTO**](RessourceDetailDTO.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) - -# **displayDelete** -> String displayDelete(id) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = DisplayApi(); -final id = id_example; // String | - -try { - final result = api_instance.displayDelete(id); - print(result); -} catch (e) { - print('Exception when calling DisplayApi->displayDelete: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### 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) - -# **displayGet** -> List displayGet() - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = DisplayApi(); - -try { - final result = api_instance.displayGet(); - print(result); -} catch (e) { - print('Exception when calling DisplayApi->displayGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List**](DisplayDTO.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) - -# **displayGetDetail** -> DisplayDTO displayGetDetail(id) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = DisplayApi(); -final id = id_example; // String | - -try { - final result = api_instance.displayGetDetail(id); - print(result); -} catch (e) { - print('Exception when calling DisplayApi->displayGetDetail: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### Return type - -[**DisplayDTO**](DisplayDTO.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) - -# **displayUpdate** -> DisplayDTO displayUpdate(displayDTO) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = DisplayApi(); -final displayDTO = DisplayDTO(); // DisplayDTO | - -try { - final result = api_instance.displayUpdate(displayDTO); - print(result); -} catch (e) { - print('Exception when calling DisplayApi->displayUpdate: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **displayDTO** | [**DisplayDTO**](DisplayDTO.md)| | - -### Return type - -[**DisplayDTO**](DisplayDTO.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/DisplayDTO.md b/manager_api/doc/DisplayDTO.md deleted file mode 100644 index 8897f22..0000000 --- a/manager_api/doc/DisplayDTO.md +++ /dev/null @@ -1,21 +0,0 @@ -# managerapi.model.DisplayDTO - -## Load the model package -```dart -import 'package:managerapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**label** | **String** | | [optional] -**sectionIds** | **List** | | [optional] [default to const []] -**primaryColor** | **String** | | [optional] -**secondaryColor** | **String** | | [optional] -**languages** | **List** | | [optional] [default to const []] -**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/ResourceDetailDTO.md b/manager_api/doc/ResourceDetailDTO.md deleted file mode 100644 index 12a7f7d..0000000 --- a/manager_api/doc/ResourceDetailDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# managerapi.model.ResourceDetailDTO - -## Load the model package -```dart -import 'package:managerapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**type** | [**ResourceType**](ResourceType.md) | | [optional] -**label** | **String** | | [optional] -**dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**data** | **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/RessourceApi.md b/manager_api/doc/RessourceApi.md deleted file mode 100644 index 070554b..0000000 --- a/manager_api/doc/RessourceApi.md +++ /dev/null @@ -1,273 +0,0 @@ -# managerapi.api.RessourceApi - -## Load the API package -```dart -import 'package:managerapi/api.dart'; -``` - -All URIs are relative to *http://192.168.31.96* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ressourceCreate**](RessourceApi.md#ressourcecreate) | **POST** /api/Ressource | -[**ressourceDelete**](RessourceApi.md#ressourcedelete) | **DELETE** /api/Ressource/{id} | -[**ressourceGet**](RessourceApi.md#ressourceget) | **GET** /api/Ressource | -[**ressourceGetDetail**](RessourceApi.md#ressourcegetdetail) | **GET** /api/Ressource/{id}/detail | -[**ressourceShow**](RessourceApi.md#ressourceshow) | **GET** /api/Ressource/{id} | -[**ressourceUpdate**](RessourceApi.md#ressourceupdate) | **PUT** /api/Ressource | - - -# **ressourceCreate** -> RessourceDetailDTO ressourceCreate(ressourceDetailDTO) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); -final ressourceDetailDTO = RessourceDetailDTO(); // RessourceDetailDTO | - -try { - final result = api_instance.ressourceCreate(ressourceDetailDTO); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceCreate: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ressourceDetailDTO** | [**RessourceDetailDTO**](RessourceDetailDTO.md)| | - -### Return type - -[**RessourceDetailDTO**](RessourceDetailDTO.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) - -# **ressourceDelete** -> String ressourceDelete(id) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); -final id = id_example; // String | - -try { - final result = api_instance.ressourceDelete(id); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceDelete: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### 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) - -# **ressourceGet** -> List ressourceGet() - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); - -try { - final result = api_instance.ressourceGet(); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceGet: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List**](RessourceDTO.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) - -# **ressourceGetDetail** -> RessourceDetailDTO ressourceGetDetail(id) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); -final id = id_example; // String | - -try { - final result = api_instance.ressourceGetDetail(id); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceGetDetail: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### Return type - -[**RessourceDetailDTO**](RessourceDetailDTO.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) - -# **ressourceShow** -> MultipartFile ressourceShow(id) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); -final id = id_example; // String | - -try { - final result = api_instance.ressourceShow(id); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceShow: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - -### Return type - -[**MultipartFile**](MultipartFile.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, 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) - -# **ressourceUpdate** -> RessourceDetailDTO ressourceUpdate(ressourceDetailDTO) - - - -### Example -```dart -import 'package:managerapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: bearer -//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; - -final api_instance = RessourceApi(); -final ressourceDetailDTO = RessourceDetailDTO(); // RessourceDetailDTO | - -try { - final result = api_instance.ressourceUpdate(ressourceDetailDTO); - print(result); -} catch (e) { - print('Exception when calling RessourceApi->ressourceUpdate: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ressourceDetailDTO** | [**RessourceDetailDTO**](RessourceDetailDTO.md)| | - -### Return type - -[**RessourceDetailDTO**](RessourceDetailDTO.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/RessourceDTO.md b/manager_api/doc/RessourceDTO.md deleted file mode 100644 index 6d5ef47..0000000 --- a/manager_api/doc/RessourceDTO.md +++ /dev/null @@ -1,17 +0,0 @@ -# managerapi.model.RessourceDTO - -## Load the model package -```dart -import 'package:managerapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**type** | [**RessourceType**](RessourceType.md) | | [optional] -**label** | **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/RessourceDetailDTO.md b/manager_api/doc/RessourceDetailDTO.md deleted file mode 100644 index d34489e..0000000 --- a/manager_api/doc/RessourceDetailDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# managerapi.model.RessourceDetailDTO - -## Load the model package -```dart -import 'package:managerapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**type** | [**RessourceType**](RessourceType.md) | | [optional] -**label** | **String** | | [optional] -**dateCreation** | [**DateTime**](DateTime.md) | | [optional] -**data** | **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/RessourceType.md b/manager_api/doc/RessourceType.md deleted file mode 100644 index c54025f..0000000 --- a/manager_api/doc/RessourceType.md +++ /dev/null @@ -1,14 +0,0 @@ -# managerapi.model.RessourceType - -## Load the model package -```dart -import 'package:managerapi/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/lib/api/authentication_api.dart b/manager_api/lib/api/authentication_api.dart deleted file mode 100644 index 8868812..0000000 --- a/manager_api/lib/api/authentication_api.dart +++ /dev/null @@ -1,191 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AuthenticationApi { - AuthenticationApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Authentication/Token' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] grantType: - /// - /// * [String] username: - /// - /// * [String] password: - /// - /// * [String] clientId: - /// - /// * [String] clientSecret: - Future authenticationAuthenticateWithFormWithHttpInfo({ String grantType, String username, String password, String clientId, String clientSecret }) async { - // Verify required params are set. - - final path = r'/api/Authentication/Token'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['multipart/form-data']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (grantType != null) { - hasFields = true; - mp.fields[r'grant_type'] = parameterToString(grantType); - } - if (username != null) { - hasFields = true; - mp.fields[r'username'] = parameterToString(username); - } - if (password != null) { - hasFields = true; - mp.fields[r'password'] = parameterToString(password); - } - if (clientId != null) { - hasFields = true; - mp.fields[r'client_id'] = parameterToString(clientId); - } - if (clientSecret != null) { - hasFields = true; - mp.fields[r'client_secret'] = parameterToString(clientSecret); - } - if (hasFields) { - postBody = mp; - } - } else { - if (grantType != null) { - formParams[r'grant_type'] = parameterToString(grantType); - } - if (username != null) { - formParams[r'username'] = parameterToString(username); - } - if (password != null) { - formParams[r'password'] = parameterToString(password); - } - if (clientId != null) { - formParams[r'client_id'] = parameterToString(clientId); - } - if (clientSecret != null) { - formParams[r'client_secret'] = parameterToString(clientSecret); - } - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] grantType: - /// - /// * [String] username: - /// - /// * [String] password: - /// - /// * [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 ); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'TokenDTO') as TokenDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'POST /api/Authentication/Authenticate' operation and returns the [Response]. - /// Parameters: - /// - /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO) async { - // Verify required params are set. - if (loginDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: loginDTO'); - } - - final path = r'/api/Authentication/Authenticate'; - - Object postBody = loginDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [LoginDTO] loginDTO (required): - Future authenticationAuthenticateWithJson(LoginDTO loginDTO) async { - final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'TokenDTO') as TokenDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/configuration_api.dart b/manager_api/lib/api/configuration_api.dart deleted file mode 100644 index 9fe998e..0000000 --- a/manager_api/lib/api/configuration_api.dart +++ /dev/null @@ -1,464 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ConfigurationApi { - ConfigurationApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Configuration' operation and returns the [Response]. - /// Parameters: - /// - /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO) async { - // Verify required params are set. - if (configurationDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: configurationDTO'); - } - - final path = r'/api/Configuration'; - - Object postBody = configurationDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [ConfigurationDTO] configurationDTO (required): - Future configurationCreate(ConfigurationDTO configurationDTO) async { - final response = await configurationCreateWithHttpInfo(configurationDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ConfigurationDTO') as ConfigurationDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Configuration/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future configurationDeleteWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Configuration/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future configurationDelete(String id) async { - final response = await configurationDeleteWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Configuration/{id}/export' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future configurationExportWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Configuration/{id}/export' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future configurationExport(String id) async { - final response = await configurationExportWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ExportConfigurationDTO') as ExportConfigurationDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] instanceId: - Future configurationGetWithHttpInfo({ String instanceId }) async { - // Verify required params are set. - - final path = r'/api/Configuration'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (instanceId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId)); - } - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] instanceId: - Future> configurationGet({ String instanceId }) async { - final response = await configurationGetWithHttpInfo( instanceId: instanceId ); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future configurationGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Configuration/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future configurationGetDetail(String id) async { - final response = await configurationGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ConfigurationDTO') as ConfigurationDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'POST /api/Configuration/import' operation and returns the [Response]. - /// Parameters: - /// - /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO) async { - // Verify required params are set. - if (exportConfigurationDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: exportConfigurationDTO'); - } - - final path = r'/api/Configuration/import'; - - Object postBody = exportConfigurationDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [ExportConfigurationDTO] exportConfigurationDTO (required): - Future configurationImport(ExportConfigurationDTO exportConfigurationDTO) async { - final response = await configurationImportWithHttpInfo(exportConfigurationDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Configuration' operation and returns the [Response]. - /// Parameters: - /// - /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO) async { - // Verify required params are set. - if (configurationDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: configurationDTO'); - } - - final path = r'/api/Configuration'; - - Object postBody = configurationDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [ConfigurationDTO] configurationDTO (required): - Future configurationUpdate(ConfigurationDTO configurationDTO) async { - final response = await configurationUpdateWithHttpInfo(configurationDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ConfigurationDTO') as ConfigurationDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/device_api.dart b/manager_api/lib/api/device_api.dart deleted file mode 100644 index 63317d7..0000000 --- a/manager_api/lib/api/device_api.dart +++ /dev/null @@ -1,400 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DeviceApi { - DeviceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Device' operation and returns the [Response]. - /// Parameters: - /// - /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO) async { - // Verify required params are set. - if (deviceDetailDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDetailDTO'); - } - - final path = r'/api/Device'; - - Object postBody = deviceDetailDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceCreate(DeviceDetailDTO deviceDetailDTO) async { - final response = await deviceCreateWithHttpInfo(deviceDetailDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Device/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future deviceDeleteWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Device/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future deviceDelete(String id) async { - final response = await deviceDeleteWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Device' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] instanceId: - Future deviceGetWithHttpInfo({ String instanceId }) async { - // Verify required params are set. - - final path = r'/api/Device'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (instanceId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId)); - } - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] instanceId: - Future> deviceGet({ String instanceId }) async { - final response = await deviceGetWithHttpInfo( instanceId: instanceId ); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Device/{id}/detail' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future deviceGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Device/{id}/detail' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future deviceGetDetail(String id) async { - final response = await deviceGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Device' operation and returns the [Response]. - /// Parameters: - /// - /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdateWithHttpInfo(DeviceDetailDTO deviceDetailDTO) async { - // Verify required params are set. - if (deviceDetailDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDetailDTO'); - } - - final path = r'/api/Device'; - - Object postBody = deviceDetailDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [DeviceDetailDTO] deviceDetailDTO (required): - Future deviceUpdate(DeviceDetailDTO deviceDetailDTO) async { - final response = await deviceUpdateWithHttpInfo(deviceDetailDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDetailDTO') as DeviceDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Device/mainInfos' operation and returns the [Response]. - /// Parameters: - /// - /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO) async { - // Verify required params are set. - if (deviceDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: deviceDTO'); - } - - final path = r'/api/Device/mainInfos'; - - Object postBody = deviceDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [DeviceDTO] deviceDTO (required): - Future deviceUpdateMainInfos(DeviceDTO deviceDTO) async { - final response = await deviceUpdateMainInfosWithHttpInfo(deviceDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'DeviceDTO') as DeviceDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/instance_api.dart b/manager_api/lib/api/instance_api.dart deleted file mode 100644 index 8d2c092..0000000 --- a/manager_api/lib/api/instance_api.dart +++ /dev/null @@ -1,325 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class InstanceApi { - 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 { - // Verify required params are set. - if (instance == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: instance'); - } - - final path = r'/api/Instance'; - - Object postBody = instance; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [Instance] instance (required): - Future instanceCreateInstance(Instance instance) async { - final response = await instanceCreateInstanceWithHttpInfo(instance); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'InstanceDTO') as InstanceDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Instance/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future instanceDeleteInstanceWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Instance/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future instanceDeleteInstance(String id) async { - final response = await instanceDeleteInstanceWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Instance' operation and returns the [Response]. - Future instanceGetWithHttpInfo() async { - final path = r'/api/Instance'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future> instanceGet() async { - final response = await instanceGetWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Instance/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future instanceGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Instance/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future instanceGetDetail(String id) async { - final response = await instanceGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'InstanceDTO') as InstanceDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response]. - /// Parameters: - /// - /// * [Instance] instance (required): - Future instanceUpdateinstanceWithHttpInfo(Instance instance) async { - // Verify required params are set. - if (instance == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: instance'); - } - - final path = r'/api/Instance'; - - Object postBody = instance; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [Instance] instance (required): - Future instanceUpdateinstance(Instance instance) async { - final response = await instanceUpdateinstanceWithHttpInfo(instance); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'InstanceDTO') as InstanceDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/resource_api.dart b/manager_api/lib/api/resource_api.dart deleted file mode 100644 index 899f961..0000000 --- a/manager_api/lib/api/resource_api.dart +++ /dev/null @@ -1,497 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ResourceApi { - ResourceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Resource' operation and returns the [Response]. - /// Parameters: - /// - /// * [ResourceDTO] resourceDTO (required): - Future resourceCreateWithHttpInfo(ResourceDTO resourceDTO) async { - // Verify required params are set. - if (resourceDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: resourceDTO'); - } - - final path = r'/api/Resource'; - - Object postBody = resourceDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [ResourceDTO] resourceDTO (required): - Future resourceCreate(ResourceDTO resourceDTO) async { - final response = await resourceCreateWithHttpInfo(resourceDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ResourceDTO') as ResourceDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Resource/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future resourceDeleteWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Resource/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future resourceDelete(String id) async { - final response = await resourceDeleteWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Resource' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] instanceId: - /// - /// * [List] types: - Future resourceGetWithHttpInfo({ String instanceId, List types }) async { - // Verify required params are set. - - final path = r'/api/Resource'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (instanceId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId)); - } - if (types != null) { - queryParams.addAll(_convertParametersForCollectionFormat('multi', 'types', types)); - } - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] instanceId: - /// - /// * [List] 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, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Resource/{id}/detail' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future resourceGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Resource/{id}/detail' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future resourceGetDetail(String id) async { - final response = await resourceGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ResourceDTO') as ResourceDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Resource/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future resourceShowWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Resource/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future resourceShow(String id) async { - final response = await resourceShowWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Resource' operation and returns the [Response]. - /// Parameters: - /// - /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdateWithHttpInfo(ResourceDTO resourceDTO) async { - // Verify required params are set. - if (resourceDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: resourceDTO'); - } - - final path = r'/api/Resource'; - - Object postBody = resourceDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [ResourceDTO] resourceDTO (required): - Future resourceUpdate(ResourceDTO resourceDTO) async { - final response = await resourceUpdateWithHttpInfo(resourceDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ResourceDTO') as ResourceDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'POST /api/Resource/upload' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] label: - /// - /// * [String] type: - /// - /// * [String] instanceId: - Future resourceUploadWithHttpInfo({ String label, String type, String instanceId }) async { - // Verify required params are set. - - final path = r'/api/Resource/upload'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['multipart/form-data']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (label != null) { - hasFields = true; - mp.fields[r'label'] = parameterToString(label); - } - if (type != null) { - hasFields = true; - mp.fields[r'type'] = parameterToString(type); - } - if (instanceId != null) { - hasFields = true; - mp.fields[r'instanceId'] = parameterToString(instanceId); - } - if (hasFields) { - postBody = mp; - } - } else { - if (label != null) { - formParams[r'label'] = parameterToString(label); - } - if (type != null) { - formParams[r'type'] = parameterToString(type); - } - if (instanceId != null) { - formParams[r'instanceId'] = parameterToString(instanceId); - } - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] label: - /// - /// * [String] type: - /// - /// * [String] 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, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/ressource_api.dart b/manager_api/lib/api/ressource_api.dart deleted file mode 100644 index ae15b26..0000000 --- a/manager_api/lib/api/ressource_api.dart +++ /dev/null @@ -1,389 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class RessourceApi { - RessourceApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Ressource' operation and returns the [Response]. - /// Parameters: - /// - /// * [RessourceDetailDTO] ressourceDetailDTO (required): - Future ressourceCreateWithHttpInfo(RessourceDetailDTO ressourceDetailDTO) async { - // Verify required params are set. - if (ressourceDetailDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: ressourceDetailDTO'); - } - - final path = r'/api/Ressource'; - - Object postBody = ressourceDetailDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [RessourceDetailDTO] ressourceDetailDTO (required): - Future ressourceCreate(RessourceDetailDTO ressourceDetailDTO) async { - final response = await ressourceCreateWithHttpInfo(ressourceDetailDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'RessourceDetailDTO') as RessourceDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Ressource/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future ressourceDeleteWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Ressource/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future ressourceDelete(String id) async { - final response = await ressourceDeleteWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Ressource' operation and returns the [Response]. - Future ressourceGetWithHttpInfo() async { - final path = r'/api/Ressource'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future> ressourceGet() async { - final response = await ressourceGetWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Ressource/{id}/detail' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future ressourceGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Ressource/{id}/detail' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future ressourceGetDetail(String id) async { - final response = await ressourceGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'RessourceDetailDTO') as RessourceDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Ressource/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future ressourceShowWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Ressource/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future ressourceShow(String id) async { - final response = await ressourceShowWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'MultipartFile') as MultipartFile; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Ressource' operation and returns the [Response]. - /// Parameters: - /// - /// * [RessourceDetailDTO] ressourceDetailDTO (required): - Future ressourceUpdateWithHttpInfo(RessourceDetailDTO ressourceDetailDTO) async { - // Verify required params are set. - if (ressourceDetailDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: ressourceDetailDTO'); - } - - final path = r'/api/Ressource'; - - Object postBody = ressourceDetailDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [RessourceDetailDTO] ressourceDetailDTO (required): - Future ressourceUpdate(RessourceDetailDTO ressourceDetailDTO) async { - final response = await ressourceUpdateWithHttpInfo(ressourceDetailDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'RessourceDetailDTO') as RessourceDetailDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/section_api.dart b/manager_api/lib/api/section_api.dart deleted file mode 100644 index 9a12d13..0000000 --- a/manager_api/lib/api/section_api.dart +++ /dev/null @@ -1,1012 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SectionApi { - SectionApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/Section' operation and returns the [Response]. - /// Parameters: - /// - /// * [SectionDTO] sectionDTO (required): - Future sectionCreateWithHttpInfo(SectionDTO sectionDTO) async { - // Verify required params are set. - if (sectionDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: sectionDTO'); - } - - final path = r'/api/Section'; - - Object postBody = sectionDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [SectionDTO] sectionDTO (required): - Future sectionCreate(SectionDTO sectionDTO) async { - final response = await sectionCreateWithHttpInfo(sectionDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'SectionDTO') as SectionDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Section/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future sectionDeleteWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Section/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future sectionDelete(String id) async { - final response = await sectionDeleteWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/Section/configuration/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future sectionDeleteAllForConfigurationWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Section/configuration/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future sectionDeleteAllForConfiguration(String id) async { - final response = await sectionDeleteAllForConfigurationWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] instanceId: - Future sectionGetWithHttpInfo({ String instanceId }) async { - // Verify required params are set. - - final path = r'/api/Section'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (instanceId != null) { - queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId)); - } - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] instanceId: - Future> sectionGet({ String instanceId }) async { - final response = await sectionGetWithHttpInfo( instanceId: instanceId ); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Section/{id}/subsections' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future sectionGetAllSectionSubSectionsWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Section/{id}/subsections' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future> sectionGetAllSectionSubSections(String id) async { - final response = await sectionGetAllSectionSubSectionsWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Section/ArticleDTO' operation and returns the [Response]. - Future sectionGetArticleDTOWithHttpInfo() async { - final path = r'/api/Section/ArticleDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetArticleDTO() async { - final response = await sectionGetArticleDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'ArticleDTO') as ArticleDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future sectionGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Section/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future sectionGetDetail(String id) async { - final response = await sectionGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'SectionDTO') as SectionDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/configuration/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future sectionGetFromConfigurationWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/Section/configuration/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future> sectionGetFromConfiguration(String id) async { - final response = await sectionGetFromConfigurationWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/Section/MapDTO' operation and returns the [Response]. - Future sectionGetMapDTOWithHttpInfo() async { - final path = r'/api/Section/MapDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetMapDTO() async { - final response = await sectionGetMapDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'MapDTO') as MapDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/MenuDTO' operation and returns the [Response]. - Future sectionGetMenuDTOWithHttpInfo() async { - final path = r'/api/Section/MenuDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetMenuDTO() async { - final response = await sectionGetMenuDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'MenuDTO') as MenuDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response]. - Future sectionGetQuizzDTOWithHttpInfo() async { - final path = r'/api/Section/QuizzDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetQuizzDTO() async { - final response = await sectionGetQuizzDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'QuizzDTO') as QuizzDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/SliderDTO' operation and returns the [Response]. - Future sectionGetSliderDTOWithHttpInfo() async { - final path = r'/api/Section/SliderDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetSliderDTO() async { - final response = await sectionGetSliderDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'SliderDTO') as SliderDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/VideoDTO' operation and returns the [Response]. - Future sectionGetVideoDTOWithHttpInfo() async { - final path = r'/api/Section/VideoDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetVideoDTO() async { - final response = await sectionGetVideoDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'VideoDTO') as VideoDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/WebDTO' operation and returns the [Response]. - Future sectionGetWebDTOWithHttpInfo() async { - final path = r'/api/Section/WebDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionGetWebDTO() async { - final response = await sectionGetWebDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'WebDTO') as WebDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/Section/PlayerMessageDTO' operation and returns the [Response]. - Future sectionPlayerMessageDTOWithHttpInfo() async { - final path = r'/api/Section/PlayerMessageDTO'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future sectionPlayerMessageDTO() async { - final response = await sectionPlayerMessageDTOWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'PlayerMessageDTO') as PlayerMessageDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Section' operation and returns the [Response]. - /// Parameters: - /// - /// * [SectionDTO] sectionDTO (required): - Future sectionUpdateWithHttpInfo(SectionDTO sectionDTO) async { - // Verify required params are set. - if (sectionDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: sectionDTO'); - } - - final path = r'/api/Section'; - - Object postBody = sectionDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [SectionDTO] sectionDTO (required): - Future sectionUpdate(SectionDTO sectionDTO) async { - final response = await sectionUpdateWithHttpInfo(sectionDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'SectionDTO') as SectionDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/Section/order' operation and returns the [Response]. - /// Parameters: - /// - /// * [List] sectionDTO (required): - Future sectionUpdateOrderWithHttpInfo(List sectionDTO) async { - // Verify required params are set. - if (sectionDTO == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: sectionDTO'); - } - - final path = r'/api/Section/order'; - - Object postBody = sectionDTO; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [List] sectionDTO (required): - Future sectionUpdateOrder(List sectionDTO) async { - final response = await sectionUpdateOrderWithHttpInfo(sectionDTO); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api/user_api.dart b/manager_api/lib/api/user_api.dart deleted file mode 100644 index ba77f88..0000000 --- a/manager_api/lib/api/user_api.dart +++ /dev/null @@ -1,325 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class UserApi { - UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /api/User' operation and returns the [Response]. - /// Parameters: - /// - /// * [User] user (required): - Future userCreateUserWithHttpInfo(User user) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - - final path = r'/api/User'; - - Object postBody = user; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [User] user (required): - Future userCreateUser(User user) async { - final response = await userCreateUserWithHttpInfo(user); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'UserDetailDTO') as UserDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'DELETE /api/User/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future userDeleteUserWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/User/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future userDeleteUser(String id) async { - final response = await userDeleteUserWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String; - } - return Future.value(null); - } - - /// Performs an HTTP 'GET /api/User' operation and returns the [Response]. - Future userGetWithHttpInfo() async { - final path = r'/api/User'; - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - Future> userGet() async { - final response = await userGetWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .cast() - .toList(growable: false); - } - return Future>.value(null); - } - - /// Performs an HTTP 'GET /api/User/{id}' operation and returns the [Response]. - /// Parameters: - /// - /// * [String] id (required): - Future userGetDetailWithHttpInfo(String id) async { - // Verify required params are set. - if (id == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: id'); - } - - final path = r'/api/User/{id}' - .replaceAll('{' + 'id' + '}', id.toString()); - - Object postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = []; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [String] id (required): - Future userGetDetail(String id) async { - final response = await userGetDetailWithHttpInfo(id); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'UserDetailDTO') as UserDetailDTO; - } - return Future.value(null); - } - - /// Performs an HTTP 'PUT /api/User' operation and returns the [Response]. - /// Parameters: - /// - /// * [User] user (required): - Future userUpdateUserWithHttpInfo(User user) async { - // Verify required params are set. - if (user == null) { - throw ApiException(HttpStatus.badRequest, 'Missing required param: user'); - } - - final path = r'/api/User'; - - Object postBody = user; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - final contentTypes = ['application/json']; - final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; - final authNames = ['bearer']; - - if ( - nullableContentType != null && - nullableContentType.toLowerCase().startsWith('multipart/form-data') - ) { - bool hasFields = false; - final mp = MultipartRequest(null, null); - if (hasFields) { - postBody = mp; - } - } else { - } - - return await apiClient.invokeAPI( - path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - nullableContentType, - authNames, - ); - } - - /// Parameters: - /// - /// * [User] user (required): - Future userUpdateUser(User user) async { - final response = await userUpdateUserWithHttpInfo(user); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) { - return apiClient.deserialize(_decodeBodyBytes(response), 'UserDetailDTO') as UserDetailDTO; - } - return Future.value(null); - } -} diff --git a/manager_api/lib/api_helper.dart b/manager_api/lib/api_helper.dart deleted file mode 100644 index 1f73cef..0000000 --- a/manager_api/lib/api_helper.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueryParam { - const QueryParam(this.name, this.value); - - final String name; - final String value; - - @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; -} - -// Ported from the Java version. -Iterable _convertParametersForCollectionFormat( - String collectionFormat, - String name, - dynamic value, -) { - final params = []; - - // preconditions - if (name != null && !name.isEmpty && value != null) { - if (value is List) { - // get the collection format, default: csv - collectionFormat = (collectionFormat == null || collectionFormat.isEmpty) - ? 'csv' - : collectionFormat; - - if (collectionFormat == 'multi') { - return value.map((v) => QueryParam(name, parameterToString(v))); - } - - final delimiter = _delimiters[collectionFormat] ?? ','; - - params.add(QueryParam(name, value.map((v) => parameterToString(v)).join(delimiter))); - } else { - params.add(QueryParam(name, parameterToString(value))); - } - } - - return params; -} - -/// Format the given parameter object into a [String]. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } - if (value is DateTime) { - return value.toUtc().toIso8601String(); - } - if (value is MapTypeApp) { - return MapTypeAppTypeTransformer().encode(value).toString(); - } - if (value is ResourceType) { - return ResourceTypeTypeTransformer().encode(value).toString(); - } - if (value is SectionType) { - return SectionTypeTypeTransformer().encode(value).toString(); - } - return value.toString(); -} - -/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' -/// content type. Otherwise, returns the decoded body as decoded by dart:http package. -String _decodeBodyBytes(Response response) { - final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes == null ? null : utf8.decode(response.bodyBytes) - : response.body; -} diff --git a/manager_api/lib/auth/api_key_auth.dart b/manager_api/lib/auth/api_key_auth.dart deleted file mode 100644 index 41a4afd..0000000 --- a/manager_api/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,35 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyAuth implements Authentication { - ApiKeyAuth(this.location, this.paramName); - - final String location; - final String paramName; - - String apiKeyPrefix; - String apiKey; - - @override - void applyToParams(List queryParams, Map headerParams) { - final value = apiKeyPrefix == null ? apiKey : '$apiKeyPrefix $apiKey'; - - if (location == 'query' && value != null) { - queryParams.add(QueryParam(paramName, value)); - } else if (location == 'header' && value != null) { - headerParams[paramName] = value; - } else if (location == 'cookie' && value != null) { - headerParams.update('Cookie', (String existingCookie) { - return '$existingCookie; $paramName=$value'; - }, ifAbsent: () => '$paramName=$value'); - } - } -} diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart deleted file mode 100644 index 9c898d5..0000000 --- a/manager_api/lib/model/article_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ArticleDTO { - /// Returns a new [ArticleDTO] instance. - ArticleDTO({ - this.content, - this.qrCode, - this.isContentTop, - this.audioIds, - this.isReadAudioAuto, - this.images, - }); - - List content; - - String qrCode; - - bool isContentTop; - - List audioIds; - - bool isReadAudioAuto; - - List images; - - @override - bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && - other.content == content && - other.qrCode == qrCode && - other.isContentTop == isContentTop && - other.audioIds == audioIds && - other.isReadAudioAuto == isReadAudioAuto && - other.images == images; - - @override - int get hashCode => - (content == null ? 0 : content.hashCode) + - (qrCode == null ? 0 : qrCode.hashCode) + - (isContentTop == null ? 0 : isContentTop.hashCode) + - (audioIds == null ? 0 : audioIds.hashCode) + - (isReadAudioAuto == null ? 0 : isReadAudioAuto.hashCode) + - (images == null ? 0 : images.hashCode); - - @override - String toString() => 'ArticleDTO[content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]'; - - Map toJson() { - final json = {}; - if (content != null) { - json[r'content'] = content; - } - if (qrCode != null) { - json[r'qrCode'] = qrCode; - } - if (isContentTop != null) { - json[r'isContentTop'] = isContentTop; - } - if (audioIds != null) { - json[r'audioIds'] = audioIds; - } - if (isReadAudioAuto != null) { - json[r'isReadAudioAuto'] = isReadAudioAuto; - } - if (images != null) { - json[r'images'] = images; - } - return json; - } - - /// Returns a new [ArticleDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ArticleDTO fromJson(Map json) => json == null - ? null - : ArticleDTO( - content: TranslationDTO.listFromJson(json[r'content']), - qrCode: json[r'qrCode'], - isContentTop: json[r'isContentTop'], - audioIds: TranslationDTO.listFromJson(json[r'audioIds']), - isReadAudioAuto: json[r'isReadAudioAuto'], - images: ImageDTO.listFromJson(json[r'images']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ArticleDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ArticleDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api/lib/model/configuration_dto.dart deleted file mode 100644 index ea2eb1e..0000000 --- a/manager_api/lib/model/configuration_dto.dart +++ /dev/null @@ -1,183 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ConfigurationDTO { - /// Returns a new [ConfigurationDTO] instance. - ConfigurationDTO({ - this.id, - this.label, - this.title, - this.imageId, - this.imageSource, - this.primaryColor, - this.secondaryColor, - this.languages, - this.dateCreation, - this.isMobile, - this.isTablet, - this.isOffline, - this.instanceId, - }); - - String id; - - String label; - - List title; - - String imageId; - - String imageSource; - - String primaryColor; - - String secondaryColor; - - List languages; - - DateTime dateCreation; - - bool isMobile; - - bool isTablet; - - bool isOffline; - - String instanceId; - - @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; - - @override - int get hashCode => - (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); - - @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]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (label != null) { - json[r'label'] = label; - } - if (title != null) { - json[r'title'] = title; - } - if (imageId != null) { - json[r'imageId'] = imageId; - } - if (imageSource != null) { - json[r'imageSource'] = imageSource; - } - if (primaryColor != null) { - json[r'primaryColor'] = primaryColor; - } - if (secondaryColor != null) { - json[r'secondaryColor'] = secondaryColor; - } - if (languages != null) { - json[r'languages'] = languages; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (isMobile != null) { - json[r'isMobile'] = isMobile; - } - if (isTablet != null) { - json[r'isTablet'] = isTablet; - } - if (isOffline != null) { - json[r'isOffline'] = isOffline; - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [ConfigurationDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ConfigurationDTO fromJson(Map json) => json == null - ? null - : ConfigurationDTO( - id: json[r'id'], - label: json[r'label'], - title: TranslationDTO.listFromJson(json[r'title']), - imageId: json[r'imageId'], - imageSource: json[r'imageSource'], - primaryColor: json[r'primaryColor'], - secondaryColor: json[r'secondaryColor'], - languages: json[r'languages'] == null - ? null - : (json[r'languages'] as List).cast(), - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - isMobile: json[r'isMobile'], - isTablet: json[r'isTablet'], - isOffline: json[r'isOffline'], - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ConfigurationDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ConfigurationDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/device_detail_dto.dart b/manager_api/lib/model/device_detail_dto.dart deleted file mode 100644 index a4883a0..0000000 --- a/manager_api/lib/model/device_detail_dto.dart +++ /dev/null @@ -1,205 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DeviceDetailDTO { - /// Returns a new [DeviceDetailDTO] instance. - DeviceDetailDTO({ - this.id, - this.identifier, - this.name, - this.ipAddressWLAN, - this.ipAddressETH, - this.configurationId, - this.configuration, - this.connected, - this.dateCreation, - this.dateUpdate, - this.instanceId, - this.connectionLevel, - this.lastConnectionLevel, - this.batteryLevel, - this.lastBatteryLevel, - }); - - String id; - - String identifier; - - String name; - - String ipAddressWLAN; - - String ipAddressETH; - - String configurationId; - - String configuration; - - bool connected; - - DateTime dateCreation; - - DateTime dateUpdate; - - String instanceId; - - String connectionLevel; - - DateTime lastConnectionLevel; - - String batteryLevel; - - 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; - - @override - int get hashCode => - (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]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (identifier != null) { - json[r'identifier'] = identifier; - } - if (name != null) { - json[r'name'] = name; - } - if (ipAddressWLAN != null) { - json[r'ipAddressWLAN'] = ipAddressWLAN; - } - if (ipAddressETH != null) { - json[r'ipAddressETH'] = ipAddressETH; - } - if (configurationId != null) { - json[r'configurationId'] = configurationId; - } - if (configuration != null) { - json[r'configuration'] = configuration; - } - if (connected != null) { - json[r'connected'] = connected; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (dateUpdate != null) { - json[r'dateUpdate'] = dateUpdate.toUtc().toIso8601String(); - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - if (connectionLevel != null) { - json[r'connectionLevel'] = connectionLevel; - } - if (lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = lastConnectionLevel.toUtc().toIso8601String(); - } - if (batteryLevel != null) { - json[r'batteryLevel'] = batteryLevel; - } - if (lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = lastBatteryLevel.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [DeviceDetailDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static DeviceDetailDTO fromJson(Map json) => json == null - ? null - : DeviceDetailDTO( - id: json[r'id'], - identifier: json[r'identifier'], - name: json[r'name'], - ipAddressWLAN: json[r'ipAddressWLAN'], - ipAddressETH: json[r'ipAddressETH'], - configurationId: json[r'configurationId'], - configuration: json[r'configuration'], - connected: json[r'connected'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - dateUpdate: json[r'dateUpdate'] == null - ? null - : DateTime.parse(json[r'dateUpdate']), - instanceId: json[r'instanceId'], - connectionLevel: json[r'connectionLevel'], - lastConnectionLevel: json[r'lastConnectionLevel'] == null - ? null - : DateTime.parse(json[r'lastConnectionLevel']), - batteryLevel: json[r'batteryLevel'], - lastBatteryLevel: json[r'lastBatteryLevel'] == null - ? null - : DateTime.parse(json[r'lastBatteryLevel']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => DeviceDetailDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = DeviceDetailDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of DeviceDetailDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = DeviceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/device_detail_dto_all_of.dart b/manager_api/lib/model/device_detail_dto_all_of.dart deleted file mode 100644 index 9025552..0000000 --- a/manager_api/lib/model/device_detail_dto_all_of.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DeviceDetailDTOAllOf { - /// Returns a new [DeviceDetailDTOAllOf] instance. - DeviceDetailDTOAllOf({ - this.connectionLevel, - this.lastConnectionLevel, - this.batteryLevel, - this.lastBatteryLevel, - }); - - String connectionLevel; - - DateTime lastConnectionLevel; - - String batteryLevel; - - 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; - - @override - int get hashCode => - (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]'; - - Map toJson() { - final json = {}; - if (connectionLevel != null) { - json[r'connectionLevel'] = connectionLevel; - } - if (lastConnectionLevel != null) { - json[r'lastConnectionLevel'] = lastConnectionLevel.toUtc().toIso8601String(); - } - if (batteryLevel != null) { - json[r'batteryLevel'] = batteryLevel; - } - if (lastBatteryLevel != null) { - json[r'lastBatteryLevel'] = lastBatteryLevel.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [DeviceDetailDTOAllOf] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static DeviceDetailDTOAllOf fromJson(Map json) => json == null - ? null - : DeviceDetailDTOAllOf( - connectionLevel: json[r'connectionLevel'], - lastConnectionLevel: json[r'lastConnectionLevel'] == null - ? null - : DateTime.parse(json[r'lastConnectionLevel']), - batteryLevel: json[r'batteryLevel'], - lastBatteryLevel: json[r'lastBatteryLevel'] == null - ? null - : DateTime.parse(json[r'lastBatteryLevel']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => DeviceDetailDTOAllOf.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = DeviceDetailDTOAllOf.fromJson(v)); - } - return map; - } - - // maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = DeviceDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/device_dto.dart b/manager_api/lib/model/device_dto.dart deleted file mode 100644 index e90f033..0000000 --- a/manager_api/lib/model/device_dto.dart +++ /dev/null @@ -1,165 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DeviceDTO { - /// Returns a new [DeviceDTO] instance. - DeviceDTO({ - this.id, - this.identifier, - this.name, - this.ipAddressWLAN, - this.ipAddressETH, - this.configurationId, - this.configuration, - this.connected, - this.dateCreation, - this.dateUpdate, - this.instanceId, - }); - - String id; - - String identifier; - - String name; - - String ipAddressWLAN; - - String ipAddressETH; - - String configurationId; - - String configuration; - - bool connected; - - DateTime dateCreation; - - 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; - - @override - int get hashCode => - (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]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (identifier != null) { - json[r'identifier'] = identifier; - } - if (name != null) { - json[r'name'] = name; - } - if (ipAddressWLAN != null) { - json[r'ipAddressWLAN'] = ipAddressWLAN; - } - if (ipAddressETH != null) { - json[r'ipAddressETH'] = ipAddressETH; - } - if (configurationId != null) { - json[r'configurationId'] = configurationId; - } - if (configuration != null) { - json[r'configuration'] = configuration; - } - if (connected != null) { - json[r'connected'] = connected; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (dateUpdate != null) { - json[r'dateUpdate'] = dateUpdate.toUtc().toIso8601String(); - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [DeviceDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static DeviceDTO fromJson(Map json) => json == null - ? null - : DeviceDTO( - id: json[r'id'], - identifier: json[r'identifier'], - name: json[r'name'], - ipAddressWLAN: json[r'ipAddressWLAN'], - ipAddressETH: json[r'ipAddressETH'], - configurationId: json[r'configurationId'], - configuration: json[r'configuration'], - connected: json[r'connected'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - dateUpdate: json[r'dateUpdate'] == null - ? null - : DateTime.parse(json[r'dateUpdate']), - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => DeviceDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = DeviceDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of DeviceDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = DeviceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/display_dto.dart b/manager_api/lib/model/display_dto.dart deleted file mode 100644 index 97b7429..0000000 --- a/manager_api/lib/model/display_dto.dart +++ /dev/null @@ -1,131 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DisplayDTO { - /// Returns a new [DisplayDTO] instance. - DisplayDTO({ - this.id, - this.label, - this.sectionIds, - this.primaryColor, - this.secondaryColor, - this.languages, - this.dateCreation, - }); - - String id; - - String label; - - List sectionIds; - - String primaryColor; - - String secondaryColor; - - List languages; - - DateTime dateCreation; - - @override - bool operator ==(Object other) => identical(this, other) || other is DisplayDTO && - other.id == id && - other.label == label && - other.sectionIds == sectionIds && - other.primaryColor == primaryColor && - other.secondaryColor == secondaryColor && - other.languages == languages && - other.dateCreation == dateCreation; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (label == null ? 0 : label.hashCode) + - (sectionIds == null ? 0 : sectionIds.hashCode) + - (primaryColor == null ? 0 : primaryColor.hashCode) + - (secondaryColor == null ? 0 : secondaryColor.hashCode) + - (languages == null ? 0 : languages.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode); - - @override - String toString() => 'DisplayDTO[id=$id, label=$label, sectionIds=$sectionIds, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (label != null) { - json[r'label'] = label; - } - if (sectionIds != null) { - json[r'sectionIds'] = sectionIds; - } - if (primaryColor != null) { - json[r'primaryColor'] = primaryColor; - } - if (secondaryColor != null) { - json[r'secondaryColor'] = secondaryColor; - } - if (languages != null) { - json[r'languages'] = languages; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [DisplayDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static DisplayDTO fromJson(Map json) => json == null - ? null - : DisplayDTO( - id: json[r'id'], - label: json[r'label'], - sectionIds: json[r'sectionIds'] == null - ? null - : (json[r'sectionIds'] as List).cast(), - primaryColor: json[r'primaryColor'], - secondaryColor: json[r'secondaryColor'], - languages: json[r'languages'] == null - ? null - : (json[r'languages'] as List).cast(), - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => DisplayDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = DisplayDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of DisplayDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = DisplayDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api/lib/model/export_configuration_dto.dart deleted file mode 100644 index 226e864..0000000 --- a/manager_api/lib/model/export_configuration_dto.dart +++ /dev/null @@ -1,201 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ExportConfigurationDTO { - /// Returns a new [ExportConfigurationDTO] instance. - ExportConfigurationDTO({ - this.id, - this.label, - this.title, - this.imageId, - this.imageSource, - this.primaryColor, - this.secondaryColor, - this.languages, - this.dateCreation, - this.isMobile, - this.isTablet, - this.isOffline, - this.instanceId, - this.sections, - this.resources, - }); - - String id; - - String label; - - List title; - - String imageId; - - String imageSource; - - String primaryColor; - - String secondaryColor; - - List languages; - - DateTime dateCreation; - - bool isMobile; - - bool isTablet; - - bool isOffline; - - String instanceId; - - List sections; - - 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.sections == sections && - other.resources == resources; - - @override - int get hashCode => - (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) + - (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, sections=$sections, resources=$resources]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (label != null) { - json[r'label'] = label; - } - if (title != null) { - json[r'title'] = title; - } - if (imageId != null) { - json[r'imageId'] = imageId; - } - if (imageSource != null) { - json[r'imageSource'] = imageSource; - } - if (primaryColor != null) { - json[r'primaryColor'] = primaryColor; - } - if (secondaryColor != null) { - json[r'secondaryColor'] = secondaryColor; - } - if (languages != null) { - json[r'languages'] = languages; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (isMobile != null) { - json[r'isMobile'] = isMobile; - } - if (isTablet != null) { - json[r'isTablet'] = isTablet; - } - if (isOffline != null) { - json[r'isOffline'] = isOffline; - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - if (sections != null) { - json[r'sections'] = sections; - } - if (resources != null) { - json[r'resources'] = resources; - } - return json; - } - - /// Returns a new [ExportConfigurationDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ExportConfigurationDTO fromJson(Map json) => json == null - ? null - : ExportConfigurationDTO( - id: json[r'id'], - label: json[r'label'], - title: TranslationDTO.listFromJson(json[r'title']), - imageId: json[r'imageId'], - imageSource: json[r'imageSource'], - primaryColor: json[r'primaryColor'], - secondaryColor: json[r'secondaryColor'], - languages: json[r'languages'] == null - ? null - : (json[r'languages'] as List).cast(), - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - isMobile: json[r'isMobile'], - isTablet: json[r'isTablet'], - isOffline: json[r'isOffline'], - instanceId: json[r'instanceId'], - sections: SectionDTO.listFromJson(json[r'sections']), - resources: ResourceDTO.listFromJson(json[r'resources']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ExportConfigurationDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ExportConfigurationDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ExportConfigurationDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ExportConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/export_configuration_dto_all_of.dart b/manager_api/lib/model/export_configuration_dto_all_of.dart deleted file mode 100644 index 4d93a48..0000000 --- a/manager_api/lib/model/export_configuration_dto_all_of.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ExportConfigurationDTOAllOf { - /// Returns a new [ExportConfigurationDTOAllOf] instance. - ExportConfigurationDTOAllOf({ - this.sections, - this.resources, - }); - - List sections; - - List resources; - - @override - bool operator ==(Object other) => identical(this, other) || other is ExportConfigurationDTOAllOf && - other.sections == sections && - other.resources == resources; - - @override - int get hashCode => - (sections == null ? 0 : sections.hashCode) + - (resources == null ? 0 : resources.hashCode); - - @override - String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; - - Map toJson() { - final json = {}; - if (sections != null) { - json[r'sections'] = sections; - } - if (resources != null) { - json[r'resources'] = resources; - } - return json; - } - - /// Returns a new [ExportConfigurationDTOAllOf] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ExportConfigurationDTOAllOf fromJson(Map json) => json == null - ? null - : ExportConfigurationDTOAllOf( - sections: SectionDTO.listFromJson(json[r'sections']), - resources: ResourceDTO.listFromJson(json[r'resources']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ExportConfigurationDTOAllOf.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ExportConfigurationDTOAllOf.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ExportConfigurationDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/geo_point_dto.dart b/manager_api/lib/model/geo_point_dto.dart deleted file mode 100644 index 15363a1..0000000 --- a/manager_api/lib/model/geo_point_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class GeoPointDTO { - /// Returns a new [GeoPointDTO] instance. - GeoPointDTO({ - this.id, - this.title, - this.description, - this.images, - this.latitude, - this.longitude, - }); - - int id; - - List title; - - List description; - - List images; - - String latitude; - - String longitude; - - @override - bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO && - other.id == id && - other.title == title && - other.description == description && - other.images == images && - other.latitude == latitude && - other.longitude == longitude; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (title == null ? 0 : title.hashCode) + - (description == null ? 0 : description.hashCode) + - (images == null ? 0 : images.hashCode) + - (latitude == null ? 0 : latitude.hashCode) + - (longitude == null ? 0 : longitude.hashCode); - - @override - String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (title != null) { - json[r'title'] = title; - } - if (description != null) { - json[r'description'] = description; - } - if (images != null) { - json[r'images'] = images; - } - if (latitude != null) { - json[r'latitude'] = latitude; - } - if (longitude != null) { - json[r'longitude'] = longitude; - } - return json; - } - - /// Returns a new [GeoPointDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static GeoPointDTO fromJson(Map json) => json == null - ? null - : GeoPointDTO( - id: json[r'id'], - title: TranslationDTO.listFromJson(json[r'title']), - description: TranslationDTO.listFromJson(json[r'description']), - images: ImageGeoPoint.listFromJson(json[r'images']), - latitude: json[r'latitude'], - longitude: json[r'longitude'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => GeoPointDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = GeoPointDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of GeoPointDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = GeoPointDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/image_dto.dart b/manager_api/lib/model/image_dto.dart deleted file mode 100644 index 8ea812c..0000000 --- a/manager_api/lib/model/image_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ImageDTO { - /// Returns a new [ImageDTO] instance. - ImageDTO({ - this.title, - this.description, - this.resourceId, - this.source_, - this.order, - }); - - List title; - - List description; - - String resourceId; - - String source_; - - 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; - - @override - int get hashCode => - (title == null ? 0 : title.hashCode) + - (description == null ? 0 : description.hashCode) + - (resourceId == null ? 0 : resourceId.hashCode) + - (source_ == null ? 0 : source_.hashCode) + - (order == null ? 0 : order.hashCode); - - @override - String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; - - Map toJson() { - final json = {}; - if (title != null) { - json[r'title'] = title; - } - if (description != null) { - json[r'description'] = description; - } - if (resourceId != null) { - json[r'resourceId'] = resourceId; - } - if (source_ != null) { - json[r'source'] = source_; - } - if (order != null) { - json[r'order'] = order; - } - return json; - } - - /// Returns a new [ImageDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ImageDTO fromJson(Map json) => json == null - ? null - : ImageDTO( - title: TranslationDTO.listFromJson(json[r'title']), - description: TranslationDTO.listFromJson(json[r'description']), - resourceId: json[r'resourceId'], - source_: json[r'source'], - order: json[r'order'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ImageDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ImageDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ImageDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ImageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/image_geo_point.dart b/manager_api/lib/model/image_geo_point.dart deleted file mode 100644 index 923877f..0000000 --- a/manager_api/lib/model/image_geo_point.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ImageGeoPoint { - /// Returns a new [ImageGeoPoint] instance. - ImageGeoPoint({ - this.imageResourceId, - this.imageSource, - }); - - String imageResourceId; - - String imageSource; - - @override - bool operator ==(Object other) => identical(this, other) || other is ImageGeoPoint && - other.imageResourceId == imageResourceId && - other.imageSource == imageSource; - - @override - int get hashCode => - (imageResourceId == null ? 0 : imageResourceId.hashCode) + - (imageSource == null ? 0 : imageSource.hashCode); - - @override - String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; - - Map toJson() { - final json = {}; - if (imageResourceId != null) { - json[r'imageResourceId'] = imageResourceId; - } - if (imageSource != null) { - json[r'imageSource'] = imageSource; - } - return json; - } - - /// Returns a new [ImageGeoPoint] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ImageGeoPoint fromJson(Map json) => json == null - ? null - : ImageGeoPoint( - imageResourceId: json[r'imageResourceId'], - imageSource: json[r'imageSource'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ImageGeoPoint.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ImageGeoPoint.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ImageGeoPoint-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ImageGeoPoint.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/instance.dart b/manager_api/lib/model/instance.dart deleted file mode 100644 index b398ea8..0000000 --- a/manager_api/lib/model/instance.dart +++ /dev/null @@ -1,91 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class Instance { - /// Returns a new [Instance] instance. - Instance({ - this.id, - this.name, - this.dateCreation, - }); - - String id; - - String name; - - DateTime dateCreation; - - @override - bool operator ==(Object other) => identical(this, other) || other is Instance && - other.id == id && - other.name == name && - other.dateCreation == dateCreation; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode); - - @override - String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (name != null) { - json[r'name'] = name; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [Instance] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static Instance fromJson(Map json) => json == null - ? null - : Instance( - id: json[r'id'], - name: json[r'name'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => Instance.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = Instance.fromJson(v)); - } - return map; - } - - // maps a json object with a list of Instance-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = Instance.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/instance_dto.dart b/manager_api/lib/model/instance_dto.dart deleted file mode 100644 index d39a6f3..0000000 --- a/manager_api/lib/model/instance_dto.dart +++ /dev/null @@ -1,91 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class InstanceDTO { - /// Returns a new [InstanceDTO] instance. - InstanceDTO({ - this.id, - this.name, - this.dateCreation, - }); - - String id; - - String name; - - DateTime dateCreation; - - @override - bool operator ==(Object other) => identical(this, other) || other is InstanceDTO && - other.id == id && - other.name == name && - other.dateCreation == dateCreation; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (name == null ? 0 : name.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode); - - @override - String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (name != null) { - json[r'name'] = name; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [InstanceDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static InstanceDTO fromJson(Map json) => json == null - ? null - : InstanceDTO( - id: json[r'id'], - name: json[r'name'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => InstanceDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = InstanceDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of InstanceDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = InstanceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/level_dto.dart b/manager_api/lib/model/level_dto.dart deleted file mode 100644 index c9a5f17..0000000 --- a/manager_api/lib/model/level_dto.dart +++ /dev/null @@ -1,89 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LevelDTO { - /// Returns a new [LevelDTO] instance. - LevelDTO({ - this.label, - this.resourceId, - this.source_, - }); - - List label; - - String resourceId; - - String source_; - - @override - bool operator ==(Object other) => identical(this, other) || other is LevelDTO && - other.label == label && - other.resourceId == resourceId && - other.source_ == source_; - - @override - int get hashCode => - (label == null ? 0 : label.hashCode) + - (resourceId == null ? 0 : resourceId.hashCode) + - (source_ == null ? 0 : source_.hashCode); - - @override - String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]'; - - Map toJson() { - final json = {}; - if (label != null) { - json[r'label'] = label; - } - if (resourceId != null) { - json[r'resourceId'] = resourceId; - } - if (source_ != null) { - json[r'source'] = source_; - } - return json; - } - - /// Returns a new [LevelDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static LevelDTO fromJson(Map json) => json == null - ? null - : LevelDTO( - label: TranslationDTO.listFromJson(json[r'label']), - resourceId: json[r'resourceId'], - source_: json[r'source'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => LevelDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = LevelDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of LevelDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = LevelDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/login_dto.dart b/manager_api/lib/model/login_dto.dart deleted file mode 100644 index ff0bed5..0000000 --- a/manager_api/lib/model/login_dto.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LoginDTO { - /// Returns a new [LoginDTO] instance. - LoginDTO({ - this.email, - this.password, - }); - - String email; - - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginDTO && - other.email == email && - other.password == password; - - @override - int get hashCode => - (email == null ? 0 : email.hashCode) + - (password == null ? 0 : password.hashCode); - - @override - String toString() => 'LoginDTO[email=$email, password=$password]'; - - Map toJson() { - final json = {}; - if (email != null) { - json[r'email'] = email; - } - if (password != null) { - json[r'password'] = password; - } - return json; - } - - /// Returns a new [LoginDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static LoginDTO fromJson(Map json) => json == null - ? null - : LoginDTO( - email: json[r'email'], - password: json[r'password'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => LoginDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = LoginDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of LoginDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = LoginDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/map_dto.dart b/manager_api/lib/model/map_dto.dart deleted file mode 100644 index f8e229d..0000000 --- a/manager_api/lib/model/map_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// 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.points, - this.iconResourceId, - this.iconSource, - }); - - int zoom; - - MapTypeApp mapType; - - List points; - - String iconResourceId; - - String iconSource; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapDTO && - other.zoom == zoom && - other.mapType == mapType && - other.points == points && - other.iconResourceId == iconResourceId && - other.iconSource == iconSource; - - @override - int get hashCode => - (zoom == null ? 0 : zoom.hashCode) + - (mapType == null ? 0 : mapType.hashCode) + - (points == null ? 0 : points.hashCode) + - (iconResourceId == null ? 0 : iconResourceId.hashCode) + - (iconSource == null ? 0 : iconSource.hashCode); - - @override - String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]'; - - Map toJson() { - final json = {}; - if (zoom != null) { - json[r'zoom'] = zoom; - } - if (mapType != null) { - json[r'mapType'] = mapType; - } - if (points != null) { - json[r'points'] = points; - } - if (iconResourceId != null) { - json[r'iconResourceId'] = iconResourceId; - } - if (iconSource != null) { - json[r'iconSource'] = iconSource; - } - return json; - } - - /// Returns a new [MapDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static MapDTO fromJson(Map json) => json == null - ? null - : MapDTO( - zoom: json[r'zoom'], - mapType: MapTypeApp.fromJson(json[r'mapType']), - points: GeoPointDTO.listFromJson(json[r'points']), - iconResourceId: json[r'iconResourceId'], - iconSource: json[r'iconSource'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = MapDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of MapDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/map_type.dart b/manager_api/lib/model/map_type.dart deleted file mode 100644 index e59e94b..0000000 --- a/manager_api/lib/model/map_type.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MapType { - /// Instantiate a new enum with the provided [value]. - const MapType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const none = MapType._(r'none'); - static const normal = MapType._(r'normal'); - static const satellite = MapType._(r'satellite'); - static const terrain = MapType._(r'terrain'); - static const hybrid = MapType._(r'hybrid'); - - /// List of all possible values in this [enum][MapType]. - static const values = [ - none, - normal, - satellite, - terrain, - hybrid, - ]; - - static MapType fromJson(dynamic value) => - MapTypeTypeTransformer().decode(value); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json - .map((value) => MapType.fromJson(value)) - .toList(growable: true == growable); -} - -/// Transformation class that can [encode] an instance of [MapType] to String, -/// and [decode] dynamic data back to [MapType]. -class MapTypeTypeTransformer { - const MapTypeTypeTransformer._(); - - factory MapTypeTypeTransformer() => _instance ??= MapTypeTypeTransformer._(); - - String encode(MapType data) => data.value; - - /// Decodes a [dynamic value][data] to a MapType. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// 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. - MapType decode(dynamic data, {bool allowNull}) { - switch (data) { - case r'none': return MapType.none; - case r'normal': return MapType.normal; - case r'satellite': return MapType.satellite; - case r'terrain': return MapType.terrain; - case r'hybrid': return MapType.hybrid; - default: - if (allowNull == false) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - return null; - } - - /// Singleton [MapTypeTypeTransformer] instance. - static MapTypeTypeTransformer _instance; -} diff --git a/manager_api/lib/model/map_type_app.dart b/manager_api/lib/model/map_type_app.dart deleted file mode 100644 index 893968e..0000000 --- a/manager_api/lib/model/map_type_app.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MapTypeApp { - /// Instantiate a new enum with the provided [value]. - const MapTypeApp._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const none = MapTypeApp._(r'none'); - static const normal = MapTypeApp._(r'normal'); - static const satellite = MapTypeApp._(r'satellite'); - static const terrain = MapTypeApp._(r'terrain'); - static const hybrid = MapTypeApp._(r'hybrid'); - - /// List of all possible values in this [enum][MapTypeApp]. - static const values = [ - none, - normal, - satellite, - terrain, - hybrid, - ]; - - static MapTypeApp fromJson(dynamic value) => - MapTypeAppTypeTransformer().decode(value); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json - .map((value) => MapTypeApp.fromJson(value)) - .toList(growable: true == growable); -} - -/// Transformation class that can [encode] an instance of [MapTypeApp] to String, -/// and [decode] dynamic data back to [MapTypeApp]. -class MapTypeAppTypeTransformer { - const MapTypeAppTypeTransformer._(); - - factory MapTypeAppTypeTransformer() => _instance ??= MapTypeAppTypeTransformer._(); - - String encode(MapTypeApp data) => data.value; - - /// Decodes a [dynamic value][data] to a MapTypeApp. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// 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}) { - switch (data) { - 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 == false) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - return null; - } - - /// Singleton [MapTypeAppTypeTransformer] instance. - static MapTypeAppTypeTransformer _instance; -} diff --git a/manager_api/lib/model/menu_dto.dart b/manager_api/lib/model/menu_dto.dart deleted file mode 100644 index bcde011..0000000 --- a/manager_api/lib/model/menu_dto.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MenuDTO { - /// Returns a new [MenuDTO] instance. - MenuDTO({ - this.sections, - }); - - List sections; - - @override - bool operator ==(Object other) => identical(this, other) || other is MenuDTO && - other.sections == sections; - - @override - int get hashCode => - (sections == null ? 0 : sections.hashCode); - - @override - String toString() => 'MenuDTO[sections=$sections]'; - - Map toJson() { - final json = {}; - if (sections != null) { - json[r'sections'] = sections; - } - return json; - } - - /// Returns a new [MenuDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static MenuDTO fromJson(Map json) => json == null - ? null - : MenuDTO( - sections: SectionDTO.listFromJson(json[r'sections']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => MenuDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = MenuDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of MenuDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = MenuDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/player_message_dto.dart b/manager_api/lib/model/player_message_dto.dart deleted file mode 100644 index 0341a99..0000000 --- a/manager_api/lib/model/player_message_dto.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PlayerMessageDTO { - /// Returns a new [PlayerMessageDTO] instance. - PlayerMessageDTO({ - this.configChanged, - this.isDeleted, - }); - - bool configChanged; - - bool isDeleted; - - @override - bool operator ==(Object other) => identical(this, other) || other is PlayerMessageDTO && - other.configChanged == configChanged && - other.isDeleted == isDeleted; - - @override - int get hashCode => - (configChanged == null ? 0 : configChanged.hashCode) + - (isDeleted == null ? 0 : isDeleted.hashCode); - - @override - String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; - - Map toJson() { - final json = {}; - if (configChanged != null) { - json[r'configChanged'] = configChanged; - } - if (isDeleted != null) { - json[r'isDeleted'] = isDeleted; - } - return json; - } - - /// Returns a new [PlayerMessageDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static PlayerMessageDTO fromJson(Map json) => json == null - ? null - : PlayerMessageDTO( - configChanged: json[r'configChanged'], - isDeleted: json[r'isDeleted'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => PlayerMessageDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = PlayerMessageDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of PlayerMessageDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = PlayerMessageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/question_dto.dart b/manager_api/lib/model/question_dto.dart deleted file mode 100644 index 0584111..0000000 --- a/manager_api/lib/model/question_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QuestionDTO { - /// Returns a new [QuestionDTO] instance. - QuestionDTO({ - this.label, - this.responses, - this.resourceId, - this.source_, - this.order, - }); - - List label; - - List responses; - - String resourceId; - - String source_; - - int order; - - @override - bool operator ==(Object other) => identical(this, other) || other is QuestionDTO && - other.label == label && - other.responses == responses && - other.resourceId == resourceId && - other.source_ == source_ && - other.order == order; - - @override - int get hashCode => - (label == null ? 0 : label.hashCode) + - (responses == null ? 0 : responses.hashCode) + - (resourceId == null ? 0 : resourceId.hashCode) + - (source_ == null ? 0 : source_.hashCode) + - (order == null ? 0 : order.hashCode); - - @override - String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]'; - - Map toJson() { - final json = {}; - if (label != null) { - json[r'label'] = label; - } - if (responses != null) { - json[r'responses'] = responses; - } - if (resourceId != null) { - json[r'resourceId'] = resourceId; - } - if (source_ != null) { - json[r'source'] = source_; - } - if (order != null) { - json[r'order'] = order; - } - return json; - } - - /// Returns a new [QuestionDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static QuestionDTO fromJson(Map json) => json == null - ? null - : QuestionDTO( - label: TranslationDTO.listFromJson(json[r'label']), - responses: ResponseDTO.listFromJson(json[r'responses']), - resourceId: json[r'resourceId'], - source_: json[r'source'], - order: json[r'order'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => QuestionDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = QuestionDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of QuestionDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = QuestionDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/quizz_dto.dart b/manager_api/lib/model/quizz_dto.dart deleted file mode 100644 index 20c22f2..0000000 --- a/manager_api/lib/model/quizz_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QuizzDTO { - /// Returns a new [QuizzDTO] instance. - QuizzDTO({ - this.questions, - this.badLevel, - this.mediumLevel, - this.goodLevel, - this.greatLevel, - }); - - List questions; - - LevelDTO badLevel; - - LevelDTO mediumLevel; - - LevelDTO goodLevel; - - 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; - - @override - int get 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() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; - - Map toJson() { - final json = {}; - if (questions != null) { - json[r'questions'] = questions; - } - if (badLevel != null) { - json[r'bad_level'] = badLevel; - } - if (mediumLevel != null) { - json[r'medium_level'] = mediumLevel; - } - if (goodLevel != null) { - json[r'good_level'] = goodLevel; - } - if (greatLevel != null) { - json[r'great_level'] = greatLevel; - } - return json; - } - - /// Returns a new [QuizzDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static QuizzDTO fromJson(Map json) => json == null - ? null - : QuizzDTO( - questions: QuestionDTO.listFromJson(json[r'questions']), - badLevel: LevelDTO.fromJson(json[r'bad_level']), - mediumLevel: LevelDTO.fromJson(json[r'medium_level']), - goodLevel: LevelDTO.fromJson(json[r'good_level']), - greatLevel: LevelDTO.fromJson(json[r'great_level']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => QuizzDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = QuizzDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of QuizzDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = QuizzDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/resource_detail_dto.dart b/manager_api/lib/model/resource_detail_dto.dart deleted file mode 100644 index 106fc52..0000000 --- a/manager_api/lib/model/resource_detail_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ResourceDetailDTO { - /// Returns a new [ResourceDetailDTO] instance. - ResourceDetailDTO({ - this.id, - this.type, - this.label, - this.dateCreation, - this.data, - }); - - String id; - - ResourceType type; - - String label; - - DateTime dateCreation; - - String data; - - @override - bool operator ==(Object other) => identical(this, other) || other is ResourceDetailDTO && - other.id == id && - other.type == type && - other.label == label && - other.dateCreation == dateCreation && - other.data == data; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (type == null ? 0 : type.hashCode) + - (label == null ? 0 : label.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode) + - (data == null ? 0 : data.hashCode); - - @override - String toString() => 'ResourceDetailDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (type != null) { - json[r'type'] = type; - } - if (label != null) { - json[r'label'] = label; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (data != null) { - json[r'data'] = data; - } - return json; - } - - /// Returns a new [ResourceDetailDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ResourceDetailDTO fromJson(Map json) => json == null - ? null - : ResourceDetailDTO( - id: json[r'id'], - type: ResourceType.fromJson(json[r'type']), - label: json[r'label'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - data: json[r'data'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ResourceDetailDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ResourceDetailDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ResourceDetailDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ResourceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/resource_dto.dart b/manager_api/lib/model/resource_dto.dart deleted file mode 100644 index 8907d2f..0000000 --- a/manager_api/lib/model/resource_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ResourceDTO { - /// Returns a new [ResourceDTO] instance. - ResourceDTO({ - this.id, - this.type, - this.label, - this.dateCreation, - this.data, - this.instanceId, - }); - - String id; - - ResourceType type; - - String label; - - DateTime dateCreation; - - String data; - - String instanceId; - - @override - bool operator ==(Object other) => identical(this, other) || other is ResourceDTO && - other.id == id && - other.type == type && - other.label == label && - other.dateCreation == dateCreation && - other.data == data && - other.instanceId == instanceId; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (type == null ? 0 : type.hashCode) + - (label == null ? 0 : label.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode) + - (data == null ? 0 : data.hashCode) + - (instanceId == null ? 0 : instanceId.hashCode); - - @override - String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data, instanceId=$instanceId]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (type != null) { - json[r'type'] = type; - } - if (label != null) { - json[r'label'] = label; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (data != null) { - json[r'data'] = data; - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [ResourceDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ResourceDTO fromJson(Map json) => json == null - ? null - : ResourceDTO( - id: json[r'id'], - type: ResourceType.fromJson(json[r'type']), - label: json[r'label'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - data: json[r'data'], - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ResourceDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ResourceDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ResourceDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ResourceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/resource_type.dart b/manager_api/lib/model/resource_type.dart deleted file mode 100644 index a1b28dc..0000000 --- a/manager_api/lib/model/resource_type.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ResourceType { - /// Instantiate a new enum with the provided [value]. - const ResourceType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const image = ResourceType._(r'Image'); - static const video = ResourceType._(r'Video'); - static const imageUrl = ResourceType._(r'ImageUrl'); - static const videoUrl = ResourceType._(r'VideoUrl'); - static const audio = ResourceType._(r'Audio'); - - /// List of all possible values in this [enum][ResourceType]. - static const values = [ - image, - video, - imageUrl, - videoUrl, - audio - ]; - - static ResourceType fromJson(dynamic value) => - ResourceTypeTypeTransformer().decode(value); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json - .map((value) => ResourceType.fromJson(value)) - .toList(growable: true == growable); -} - -/// Transformation class that can [encode] an instance of [ResourceType] to String, -/// and [decode] dynamic data back to [ResourceType]. -class ResourceTypeTypeTransformer { - const ResourceTypeTypeTransformer._(); - - factory ResourceTypeTypeTransformer() => _instance ??= ResourceTypeTypeTransformer._(); - - String encode(ResourceType data) => data.value; - - /// Decodes a [dynamic value][data] to a ResourceType. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// 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. - ResourceType decode(dynamic data, {bool allowNull}) { - switch (data) { - case r'Image': return ResourceType.image; - case r'Video': return ResourceType.video; - case r'ImageUrl': return ResourceType.imageUrl; - case r'VideoUrl': return ResourceType.videoUrl; - case r'Audio': return ResourceType.audio; - default: - if (allowNull == false) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - return null; - } - - /// Singleton [ResourceTypeTypeTransformer] instance. - static ResourceTypeTypeTransformer _instance; -} diff --git a/manager_api/lib/model/response_dto.dart b/manager_api/lib/model/response_dto.dart deleted file mode 100644 index 1415493..0000000 --- a/manager_api/lib/model/response_dto.dart +++ /dev/null @@ -1,89 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ResponseDTO { - /// Returns a new [ResponseDTO] instance. - ResponseDTO({ - this.label, - this.isGood, - this.order, - }); - - List label; - - bool isGood; - - int order; - - @override - bool operator ==(Object other) => identical(this, other) || other is ResponseDTO && - other.label == label && - other.isGood == isGood && - other.order == order; - - @override - int get hashCode => - (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]'; - - Map toJson() { - final json = {}; - if (label != null) { - json[r'label'] = label; - } - if (isGood != null) { - json[r'isGood'] = isGood; - } - if (order != null) { - json[r'order'] = order; - } - return json; - } - - /// Returns a new [ResponseDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static ResponseDTO fromJson(Map json) => json == null - ? null - : ResponseDTO( - label: TranslationDTO.listFromJson(json[r'label']), - isGood: json[r'isGood'], - order: json[r'order'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => ResponseDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = ResponseDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of ResponseDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = ResponseDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/ressource_detail_dto.dart b/manager_api/lib/model/ressource_detail_dto.dart deleted file mode 100644 index 550073d..0000000 --- a/manager_api/lib/model/ressource_detail_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RessourceDetailDTO { - /// Returns a new [RessourceDetailDTO] instance. - RessourceDetailDTO({ - this.id, - this.type, - this.label, - this.dateCreation, - this.data, - }); - - String id; - - RessourceType type; - - String label; - - DateTime dateCreation; - - String data; - - @override - bool operator ==(Object other) => identical(this, other) || other is RessourceDetailDTO && - other.id == id && - other.type == type && - other.label == label && - other.dateCreation == dateCreation && - other.data == data; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (type == null ? 0 : type.hashCode) + - (label == null ? 0 : label.hashCode) + - (dateCreation == null ? 0 : dateCreation.hashCode) + - (data == null ? 0 : data.hashCode); - - @override - String toString() => 'RessourceDetailDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (type != null) { - json[r'type'] = type; - } - if (label != null) { - json[r'label'] = label; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (data != null) { - json[r'data'] = data; - } - return json; - } - - /// Returns a new [RessourceDetailDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static RessourceDetailDTO fromJson(Map json) => json == null - ? null - : RessourceDetailDTO( - id: json[r'id'], - type: RessourceType.fromJson(json[r'type']), - label: json[r'label'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - data: json[r'data'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => RessourceDetailDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = RessourceDetailDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of RessourceDetailDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = RessourceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/ressource_dto.dart b/manager_api/lib/model/ressource_dto.dart deleted file mode 100644 index c7c6abe..0000000 --- a/manager_api/lib/model/ressource_dto.dart +++ /dev/null @@ -1,89 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RessourceDTO { - /// Returns a new [RessourceDTO] instance. - RessourceDTO({ - this.id, - this.type, - this.label, - }); - - String id; - - RessourceType type; - - String label; - - @override - bool operator ==(Object other) => identical(this, other) || other is RessourceDTO && - other.id == id && - other.type == type && - other.label == label; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (type == null ? 0 : type.hashCode) + - (label == null ? 0 : label.hashCode); - - @override - String toString() => 'RessourceDTO[id=$id, type=$type, label=$label]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (type != null) { - json[r'type'] = type; - } - if (label != null) { - json[r'label'] = label; - } - return json; - } - - /// Returns a new [RessourceDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static RessourceDTO fromJson(Map json) => json == null - ? null - : RessourceDTO( - id: json[r'id'], - type: RessourceType.fromJson(json[r'type']), - label: json[r'label'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => RessourceDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = RessourceDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of RessourceDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = RessourceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/ressource_type.dart b/manager_api/lib/model/ressource_type.dart deleted file mode 100644 index 736e4af..0000000 --- a/manager_api/lib/model/ressource_type.dart +++ /dev/null @@ -1,82 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class RessourceType { - /// Instantiate a new enum with the provided [value]. - const RessourceType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const image = RessourceType._(r'Image'); - static const video = RessourceType._(r'Video'); - static const imageUrl = RessourceType._(r'ImageUrl'); - static const videoUrl = RessourceType._(r'VideoUrl'); - - /// List of all possible values in this [enum][RessourceType]. - static const values = [ - image, - video, - imageUrl, - videoUrl, - ]; - - static RessourceType fromJson(dynamic value) => - RessourceTypeTypeTransformer().decode(value); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json - .map((value) => RessourceType.fromJson(value)) - .toList(growable: true == growable); -} - -/// Transformation class that can [encode] an instance of [RessourceType] to String, -/// and [decode] dynamic data back to [RessourceType]. -class RessourceTypeTypeTransformer { - const RessourceTypeTypeTransformer._(); - - factory RessourceTypeTypeTransformer() => _instance ??= RessourceTypeTypeTransformer._(); - - String encode(RessourceType data) => data.value; - - /// Decodes a [dynamic value][data] to a RessourceType. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// 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. - RessourceType decode(dynamic data, {bool allowNull}) { - switch (data) { - case r'Image': return RessourceType.image; - case r'Video': return RessourceType.video; - case r'ImageUrl': return RessourceType.imageUrl; - case r'VideoUrl': return RessourceType.videoUrl; - default: - if (allowNull == false) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - return null; - } - - /// Singleton [RessourceTypeTypeTransformer] instance. - static RessourceTypeTypeTransformer _instance; -} diff --git a/manager_api/lib/model/section_dto.dart b/manager_api/lib/model/section_dto.dart deleted file mode 100644 index 882db87..0000000 --- a/manager_api/lib/model/section_dto.dart +++ /dev/null @@ -1,190 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SectionDTO { - /// Returns a new [SectionDTO] instance. - SectionDTO({ - this.id, - this.label, - this.title, - this.description, - this.imageId, - this.imageSource, - this.configurationId, - this.isSubSection, - this.parentId, - this.type, - this.data, - this.dateCreation, - this.order, - this.instanceId, - }); - - String id; - - String label; - - List title; - - List description; - - String imageId; - - String imageSource; - - String configurationId; - - bool isSubSection; - - String parentId; - - SectionType type; - - String data; - - DateTime dateCreation; - - int order; - - String instanceId; - - @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; - - @override - int get hashCode => - (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); - - @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]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (label != null) { - json[r'label'] = label; - } - if (title != null) { - json[r'title'] = title; - } - if (description != null) { - json[r'description'] = description; - } - if (imageId != null) { - json[r'imageId'] = imageId; - } - if (imageSource != null) { - json[r'imageSource'] = imageSource; - } - if (configurationId != null) { - json[r'configurationId'] = configurationId; - } - if (isSubSection != null) { - json[r'isSubSection'] = isSubSection; - } - if (parentId != null) { - json[r'parentId'] = parentId; - } - if (type != null) { - json[r'type'] = type; - } - if (data != null) { - json[r'data'] = data; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (order != null) { - json[r'order'] = order; - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [SectionDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static SectionDTO fromJson(Map json) => json == null - ? null - : SectionDTO( - id: json[r'id'], - label: json[r'label'], - title: TranslationDTO.listFromJson(json[r'title']), - description: TranslationDTO.listFromJson(json[r'description']), - imageId: json[r'imageId'], - imageSource: json[r'imageSource'], - configurationId: json[r'configurationId'], - isSubSection: json[r'isSubSection'], - parentId: json[r'parentId'], - type: SectionType.fromJson(json[r'type']), - data: json[r'data'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - order: json[r'order'], - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => SectionDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = SectionDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of SectionDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = SectionDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/section_type.dart b/manager_api/lib/model/section_type.dart deleted file mode 100644 index 0858912..0000000 --- a/manager_api/lib/model/section_type.dart +++ /dev/null @@ -1,91 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SectionType { - /// Instantiate a new enum with the provided [value]. - const SectionType._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const map = SectionType._(r'Map'); - static const slider = SectionType._(r'Slider'); - static const video = SectionType._(r'Video'); - static const web = SectionType._(r'Web'); - static const menu = SectionType._(r'Menu'); - static const quizz = SectionType._(r'Quizz'); - static const article = SectionType._(r'Article'); - - /// List of all possible values in this [enum][SectionType]. - static const values = [ - map, - slider, - video, - web, - menu, - quizz, - article - ]; - - static SectionType fromJson(dynamic value) => - SectionTypeTypeTransformer().decode(value); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json - .map((value) => SectionType.fromJson(value)) - .toList(growable: true == growable); -} - -/// Transformation class that can [encode] an instance of [SectionType] to String, -/// and [decode] dynamic data back to [SectionType]. -class SectionTypeTypeTransformer { - const SectionTypeTypeTransformer._(); - - factory SectionTypeTypeTransformer() => _instance ??= SectionTypeTypeTransformer._(); - - String encode(SectionType data) => data.value; - - /// Decodes a [dynamic value][data] to a SectionType. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// 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. - SectionType decode(dynamic data, {bool allowNull}) { - switch (data) { - case r'Map': return SectionType.map; - case r'Slider': return SectionType.slider; - 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'Article': return SectionType.article; - default: - if (allowNull == false) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - return null; - } - - /// Singleton [SectionTypeTypeTransformer] instance. - static SectionTypeTypeTransformer _instance; -} diff --git a/manager_api/lib/model/slider_dto.dart b/manager_api/lib/model/slider_dto.dart deleted file mode 100644 index fd714c7..0000000 --- a/manager_api/lib/model/slider_dto.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SliderDTO { - /// Returns a new [SliderDTO] instance. - SliderDTO({ - this.images, - }); - - List images; - - @override - bool operator ==(Object other) => identical(this, other) || other is SliderDTO && - other.images == images; - - @override - int get hashCode => - (images == null ? 0 : images.hashCode); - - @override - String toString() => 'SliderDTO[images=$images]'; - - Map toJson() { - final json = {}; - if (images != null) { - json[r'images'] = images; - } - return json; - } - - /// Returns a new [SliderDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static SliderDTO fromJson(Map json) => json == null - ? null - : SliderDTO( - images: ImageDTO.listFromJson(json[r'images']), - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => SliderDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = SliderDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of SliderDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = SliderDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/token_dto.dart b/manager_api/lib/model/token_dto.dart deleted file mode 100644 index dc7b798..0000000 --- a/manager_api/lib/model/token_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TokenDTO { - /// Returns a new [TokenDTO] instance. - TokenDTO({ - this.accessToken, - this.refreshToken, - this.scope, - this.tokenType, - this.expiresIn, - this.expiration, - this.instanceId, - }); - - String accessToken; - - String refreshToken; - - String scope; - - String tokenType; - - int expiresIn; - - DateTime expiration; - - String instanceId; - - @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; - - @override - int get hashCode => - (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); - - @override - String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId]'; - - Map toJson() { - final json = {}; - if (accessToken != null) { - json[r'access_token'] = accessToken; - } - if (refreshToken != null) { - json[r'refresh_token'] = refreshToken; - } - if (scope != null) { - json[r'scope'] = scope; - } - if (tokenType != null) { - json[r'token_type'] = tokenType; - } - if (expiresIn != null) { - json[r'expires_in'] = expiresIn; - } - if (expiration != null) { - json[r'expiration'] = expiration.toUtc().toIso8601String(); - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [TokenDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static TokenDTO fromJson(Map json) => json == null - ? null - : TokenDTO( - accessToken: json[r'access_token'], - refreshToken: json[r'refresh_token'], - scope: json[r'scope'], - tokenType: json[r'token_type'], - expiresIn: json[r'expires_in'], - expiration: json[r'expiration'] == null - ? null - : DateTime.parse(json[r'expiration']), - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => TokenDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = TokenDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of TokenDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = TokenDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/translation_dto.dart b/manager_api/lib/model/translation_dto.dart deleted file mode 100644 index 186d9c1..0000000 --- a/manager_api/lib/model/translation_dto.dart +++ /dev/null @@ -1,80 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TranslationDTO { - /// Returns a new [TranslationDTO] instance. - TranslationDTO({ - this.language, - this.value, - }); - - String language; - - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is TranslationDTO && - other.language == language && - other.value == value; - - @override - int get hashCode => - (language == null ? 0 : language.hashCode) + - (value == null ? 0 : value.hashCode); - - @override - String toString() => 'TranslationDTO[language=$language, value=$value]'; - - Map toJson() { - final json = {}; - if (language != null) { - json[r'language'] = language; - } - if (value != null) { - json[r'value'] = value; - } - return json; - } - - /// Returns a new [TranslationDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static TranslationDTO fromJson(Map json) => json == null - ? null - : TranslationDTO( - language: json[r'language'], - value: json[r'value'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => TranslationDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = TranslationDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of TranslationDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = TranslationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/user.dart b/manager_api/lib/model/user.dart deleted file mode 100644 index a5918f3..0000000 --- a/manager_api/lib/model/user.dart +++ /dev/null @@ -1,136 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class User { - /// Returns a new [User] instance. - User({ - this.id, - this.email, - this.password, - this.firstName, - this.lastName, - this.token, - this.dateCreation, - this.instanceId, - }); - - String id; - - String email; - - String password; - - String firstName; - - String lastName; - - String token; - - 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; - - @override - int get hashCode => - (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); - - @override - String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (email != null) { - json[r'email'] = email; - } - if (password != null) { - json[r'password'] = password; - } - if (firstName != null) { - json[r'firstName'] = firstName; - } - if (lastName != null) { - json[r'lastName'] = lastName; - } - if (token != null) { - json[r'token'] = token; - } - if (dateCreation != null) { - json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); - } - if (instanceId != null) { - json[r'instanceId'] = instanceId; - } - return json; - } - - /// Returns a new [User] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static User fromJson(Map json) => json == null - ? null - : User( - id: json[r'id'], - email: json[r'email'], - password: json[r'password'], - firstName: json[r'firstName'], - lastName: json[r'lastName'], - token: json[r'token'], - dateCreation: json[r'dateCreation'] == null - ? null - : DateTime.parse(json[r'dateCreation']), - instanceId: json[r'instanceId'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => User.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = User.fromJson(v)); - } - return map; - } - - // maps a json object with a list of User-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = User.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/user_detail_dto.dart b/manager_api/lib/model/user_detail_dto.dart deleted file mode 100644 index 0b67418..0000000 --- a/manager_api/lib/model/user_detail_dto.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserDetailDTO { - /// Returns a new [UserDetailDTO] instance. - UserDetailDTO({ - this.id, - this.email, - this.firstName, - this.lastName, - }); - - String id; - - String email; - - String firstName; - - String lastName; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserDetailDTO && - other.id == id && - other.email == email && - other.firstName == firstName && - other.lastName == lastName; - - @override - int get hashCode => - (id == null ? 0 : id.hashCode) + - (email == null ? 0 : email.hashCode) + - (firstName == null ? 0 : firstName.hashCode) + - (lastName == null ? 0 : lastName.hashCode); - - @override - String toString() => 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; - - Map toJson() { - final json = {}; - if (id != null) { - json[r'id'] = id; - } - if (email != null) { - json[r'email'] = email; - } - if (firstName != null) { - json[r'firstName'] = firstName; - } - if (lastName != null) { - json[r'lastName'] = lastName; - } - return json; - } - - /// Returns a new [UserDetailDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static UserDetailDTO fromJson(Map json) => json == null - ? null - : UserDetailDTO( - id: json[r'id'], - email: json[r'email'], - firstName: json[r'firstName'], - lastName: json[r'lastName'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => UserDetailDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = UserDetailDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of UserDetailDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = UserDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/video_dto.dart b/manager_api/lib/model/video_dto.dart deleted file mode 100644 index 339d04b..0000000 --- a/manager_api/lib/model/video_dto.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class VideoDTO { - /// Returns a new [VideoDTO] instance. - VideoDTO({ - this.source_, - }); - - String source_; - - @override - bool operator ==(Object other) => identical(this, other) || other is VideoDTO && - other.source_ == source_; - - @override - int get hashCode => - (source_ == null ? 0 : source_.hashCode); - - @override - String toString() => 'VideoDTO[source_=$source_]'; - - Map toJson() { - final json = {}; - if (source_ != null) { - json[r'source'] = source_; - } - return json; - } - - /// Returns a new [VideoDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static VideoDTO fromJson(Map json) => json == null - ? null - : VideoDTO( - source_: json[r'source'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => VideoDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = VideoDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of VideoDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = VideoDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/lib/model/web_dto.dart b/manager_api/lib/model/web_dto.dart deleted file mode 100644 index 5dc905b..0000000 --- a/manager_api/lib/model/web_dto.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WebDTO { - /// Returns a new [WebDTO] instance. - WebDTO({ - this.source_, - }); - - String source_; - - @override - bool operator ==(Object other) => identical(this, other) || other is WebDTO && - other.source_ == source_; - - @override - int get hashCode => - (source_ == null ? 0 : source_.hashCode); - - @override - String toString() => 'WebDTO[source_=$source_]'; - - Map toJson() { - final json = {}; - if (source_ != null) { - json[r'source'] = source_; - } - return json; - } - - /// Returns a new [WebDTO] instance and imports its values from - /// [json] if it's non-null, null if [json] is null. - static WebDTO fromJson(Map json) => json == null - ? null - : WebDTO( - source_: json[r'source'], - ); - - static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => - json == null || json.isEmpty - ? true == emptyIsNull ? null : [] - : json.map((v) => WebDTO.fromJson(v)).toList(growable: true == growable); - - static Map mapFromJson(Map json) { - final map = {}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) => map[key] = WebDTO.fromJson(v)); - } - return map; - } - - // maps a json object with a list of WebDTO-objects as value to a dart map - static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { - final map = >{}; - if (json != null && json.isNotEmpty) { - json.forEach((String key, dynamic v) { - map[key] = WebDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); - }); - } - return map; - } -} - diff --git a/manager_api/openapi-dart-generator-4.2.jar b/manager_api/openapi-dart-generator-4.2.jar deleted file mode 100644 index 327d008..0000000 Binary files a/manager_api/openapi-dart-generator-4.2.jar and /dev/null differ diff --git a/manager_api/openapi-generator-cli-5.1.0.jar b/manager_api/openapi-generator-cli-5.1.0.jar deleted file mode 100644 index 693779b..0000000 Binary files a/manager_api/openapi-generator-cli-5.1.0.jar and /dev/null differ diff --git a/manager_api/pubspec.yaml b/manager_api/pubspec.yaml deleted file mode 100644 index 8a6a2bc..0000000 --- a/manager_api/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'managerapi' -version: '1.0.0' -description: 'OpenAPI API client' -authors: - - 'Author ' -homepage: 'homepage' -environment: - sdk: '>=2.0.0 <3.0.0' -dependencies: - http: '>=0.12.0 <0.13.0' - intl: '^0.16.1' - meta: '^1.1.8' - -dev_dependencies: - test: '>=1.3.0 <1.16.0' - diff --git a/manager_api/test/display_api_test.dart b/manager_api/test/display_api_test.dart deleted file mode 100644 index 97458ab..0000000 --- a/manager_api/test/display_api_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - - -/// tests for DisplayApi -void main() { - final instance = DisplayApi(); - - group('tests for DisplayApi', () { - //Future displayCreate(DisplayDTO displayDTO) async - test('test displayCreate', () async { - // TODO - }); - - //Future displayDelete(String id) async - test('test displayDelete', () async { - // TODO - }); - - //Future> displayGet() async - test('test displayGet', () async { - // TODO - }); - - //Future displayGetDetail(String id) async - test('test displayGetDetail', () async { - // TODO - }); - - //Future displayUpdate(DisplayDTO displayDTO) async - test('test displayUpdate', () async { - // TODO - }); - - }); -} diff --git a/manager_api/test/display_dto_test.dart b/manager_api/test/display_dto_test.dart deleted file mode 100644 index be0dea4..0000000 --- a/manager_api/test/display_dto_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for DisplayDTO -void main() { - final instance = DisplayDTO(); - - group('test DisplayDTO', () { - // String id - test('to test the property `id`', () async { - // TODO - }); - - // String label - test('to test the property `label`', () async { - // TODO - }); - - // List sectionIds (default value: const []) - test('to test the property `sectionIds`', () async { - // TODO - }); - - // String primaryColor - test('to test the property `primaryColor`', () async { - // TODO - }); - - // String secondaryColor - test('to test the property `secondaryColor`', () async { - // TODO - }); - - // List languages (default value: const []) - test('to test the property `languages`', () async { - // TODO - }); - - // DateTime dateCreation - test('to test the property `dateCreation`', () async { - // TODO - }); - - - }); - -} diff --git a/manager_api/test/map_type_test.dart b/manager_api/test/map_type_test.dart deleted file mode 100644 index 45cc587..0000000 --- a/manager_api/test/map_type_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for MapType -void main() { - - group('test MapType', () { - - }); - -} diff --git a/manager_api/test/resource_detail_dto_test.dart b/manager_api/test/resource_detail_dto_test.dart deleted file mode 100644 index 4f2b4fe..0000000 --- a/manager_api/test/resource_detail_dto_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for ResourceDetailDTO -void main() { - final instance = ResourceDetailDTO(); - - group('test ResourceDetailDTO', () { - // String id - test('to test the property `id`', () async { - // TODO - }); - - // RessourceType type - test('to test the property `type`', () async { - // TODO - }); - - // String label - test('to test the property `label`', () async { - // TODO - }); - - // DateTime dateCreation - test('to test the property `dateCreation`', () async { - // TODO - }); - - // String data - test('to test the property `data`', () async { - // TODO - }); - - - }); - -} diff --git a/manager_api/test/resource_dto_test.dart b/manager_api/test/resource_dto_test.dart deleted file mode 100644 index e48820d..0000000 --- a/manager_api/test/resource_dto_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for ResourceDTO -void main() { - final instance = ResourceDTO(); - - group('test ResourceDTO', () { - // String id - test('to test the property `id`', () async { - // TODO - }); - - // RessourceType type - test('to test the property `type`', () async { - // TODO - }); - - // String label - test('to test the property `label`', () async { - // TODO - }); - - - }); - -} diff --git a/manager_api/test/ressource_api_test.dart b/manager_api/test/ressource_api_test.dart deleted file mode 100644 index 1b59e79..0000000 --- a/manager_api/test/ressource_api_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - - -/// tests for RessourceApi -void main() { - final instance = RessourceApi(); - - group('tests for RessourceApi', () { - //Future ressourceCreate(RessourceDetailDTO ressourceDetailDTO) async - test('test ressourceCreate', () async { - // TODO - }); - - //Future ressourceDelete(String id) async - test('test ressourceDelete', () async { - // TODO - }); - - //Future> ressourceGet() async - test('test ressourceGet', () async { - // TODO - }); - - //Future ressourceGetDetail(String id) async - test('test ressourceGetDetail', () async { - // TODO - }); - - //Future ressourceShow(String id) async - test('test ressourceShow', () async { - // TODO - }); - - //Future ressourceUpdate(RessourceDetailDTO ressourceDetailDTO) async - test('test ressourceUpdate', () async { - // TODO - }); - - }); -} diff --git a/manager_api/test/ressource_dto_test.dart b/manager_api/test/ressource_dto_test.dart deleted file mode 100644 index f3ee88d..0000000 --- a/manager_api/test/ressource_dto_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for RessourceDTO -void main() { - final instance = RessourceDTO(); - - group('test RessourceDTO', () { - // String id - test('to test the property `id`', () async { - // TODO - }); - - // RessourceType type - test('to test the property `type`', () async { - // TODO - }); - - // String label - test('to test the property `label`', () async { - // TODO - }); - - - }); - -} diff --git a/manager_api/test/ressource_type_test.dart b/manager_api/test/ressource_type_test.dart deleted file mode 100644 index 35a65c3..0000000 --- a/manager_api/test/ressource_type_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - -// tests for RessourceType -void main() { - - group('test RessourceType', () { - - }); - -} diff --git a/manager_api/test/section_api_test.dart b/manager_api/test/section_api_test.dart deleted file mode 100644 index 9925f12..0000000 --- a/manager_api/test/section_api_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.0 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: lines_longer_than_80_chars - -import 'package:managerapi/api.dart'; -import 'package:test/test.dart'; - - -/// tests for SectionApi -void main() { - final instance = SectionApi(); - - group('tests for SectionApi', () { - //Future sectionCreate(SectionDTO sectionDTO) async - test('test sectionCreate', () async { - // TODO - }); - - //Future sectionDelete(String id) async - test('test sectionDelete', () async { - // TODO - }); - - //Future> sectionGet() async - test('test sectionGet', () async { - // TODO - }); - - //Future> sectionGetAllSectionSubSections(String id) async - test('test sectionGetAllSectionSubSections', () async { - // TODO - }); - - //Future sectionGetDetail(String id) async - test('test sectionGetDetail', () async { - // TODO - }); - - //Future sectionUpdate(SectionDTO sectionDTO) async - test('test sectionUpdate', () async { - // TODO - }); - - }); -} diff --git a/manager_api_new/.gitignore b/manager_api_new/.gitignore new file mode 100644 index 0000000..1be28ce --- /dev/null +++ b/manager_api_new/.gitignore @@ -0,0 +1,17 @@ +# See https://dart.dev/guides/libraries/private-files + +.dart_tool/ +.packages +build/ +pubspec.lock # Except for application packages + +doc/api/ + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store 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 96% rename from manager_api/.openapi-generator/FILES rename to manager_api_new/.openapi-generator/FILES index 6536543..ca166c6 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api_new/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore .travis.yml README.md +analysis_options.yaml doc/ArticleDTO.md doc/AuthenticationApi.md doc/ConfigurationApi.md @@ -25,6 +26,7 @@ doc/MenuDTO.md doc/PlayerMessageDTO.md doc/QuestionDTO.md doc/QuizzDTO.md +doc/QuizzDTOBadLevel.md doc/ResourceApi.md doc/ResourceDTO.md doc/ResourceType.md @@ -77,6 +79,7 @@ lib/model/menu_dto.dart lib/model/player_message_dto.dart lib/model/question_dto.dart lib/model/quizz_dto.dart +lib/model/quizz_dto_bad_level.dart lib/model/resource_dto.dart lib/model/resource_type.dart lib/model/response_dto.dart diff --git a/manager_api_new/.openapi-generator/VERSION b/manager_api_new/.openapi-generator/VERSION new file mode 100644 index 0000000..717311e --- /dev/null +++ b/manager_api_new/.openapi-generator/VERSION @@ -0,0 +1 @@ +unset \ No newline at end of file diff --git a/manager_api/.travis.yml b/manager_api_new/.travis.yml similarity index 95% rename from manager_api/.travis.yml rename to manager_api_new/.travis.yml index 1a3af66..2774ccb 100644 --- a/manager_api/.travis.yml +++ b/manager_api_new/.travis.yml @@ -6,7 +6,7 @@ language: dart dart: # Install a specific stable release -- "2.2.0" +- "2.12" install: - pub get diff --git a/manager_api/README.md b/manager_api_new/README.md similarity index 97% rename from manager_api/README.md rename to manager_api_new/README.md index 0d14cb7..32e4dec 100644 --- a/manager_api/README.md +++ b/manager_api_new/README.md @@ -1,4 +1,4 @@ -# managerapi +# manager_api_new API Manager Service This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -8,7 +8,7 @@ This Dart package is automatically generated by the [OpenAPI Generator](https:// ## Requirements -Dart 2.0 or later +Dart 2.12 or later ## Installation & Usage @@ -16,7 +16,7 @@ Dart 2.0 or later If this Dart package is published to Github, add the following dependency to your pubspec.yaml ``` dependencies: - managerapi: + manager_api_new: git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` @@ -24,8 +24,8 @@ dependencies: To use the package in your local drive, add the following dependency to your pubspec.yaml ``` dependencies: - managerapi: - path: /path/to/managerapi + manager_api_new: + path: /path/to/manager_api_new ``` ## Tests @@ -37,7 +37,7 @@ TODO Please follow the [installation procedure](#installation--usage) and then run the following: ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -60,7 +60,7 @@ try { ## Documentation for API Endpoints -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -137,6 +137,7 @@ Class | Method | HTTP request | Description - [PlayerMessageDTO](doc\/PlayerMessageDTO.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) @@ -167,4 +168,3 @@ Class | Method | HTTP request | Description - diff --git a/manager_api_new/analysis_options.yaml b/manager_api_new/analysis_options.yaml new file mode 100644 index 0000000..e69de29 diff --git a/manager_api/doc/ArticleDTO.md b/manager_api_new/doc/ArticleDTO.md similarity index 90% rename from manager_api/doc/ArticleDTO.md rename to manager_api_new/doc/ArticleDTO.md index c17a87a..5fb0d43 100644 --- a/manager_api/doc/ArticleDTO.md +++ b/manager_api_new/doc/ArticleDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ArticleDTO +# manager_api_new.model.ArticleDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api_new/doc/AuthenticationApi.md similarity index 92% rename from manager_api/doc/AuthenticationApi.md rename to manager_api_new/doc/AuthenticationApi.md index b304348..db6c1f1 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api_new/doc/AuthenticationApi.md @@ -1,11 +1,11 @@ -# managerapi.api.AuthenticationApi +# manager_api_new.api.AuthenticationApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -18,9 +18,9 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -31,7 +31,7 @@ final password = password_example; // String | final clientId = clientId_example; // String | final clientSecret = clientSecret_example; // String | -try { +try { final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret); print(result); } catch (e) { @@ -69,16 +69,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = AuthenticationApi(); final loginDTO = LoginDTO(); // LoginDTO | -try { +try { final result = api_instance.authenticationAuthenticateWithJson(loginDTO); print(result); } catch (e) { diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api_new/doc/ConfigurationApi.md similarity index 92% rename from manager_api/doc/ConfigurationApi.md rename to manager_api_new/doc/ConfigurationApi.md index ae1c366..48a8397 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api_new/doc/ConfigurationApi.md @@ -1,11 +1,11 @@ -# managerapi.api.ConfigurationApi +# manager_api_new.api.ConfigurationApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,16 +23,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 configurationDTO = ConfigurationDTO(); // ConfigurationDTO | -try { +try { final result = api_instance.configurationCreate(configurationDTO); print(result); } catch (e) { @@ -66,16 +66,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.configurationDelete(id); print(result); } catch (e) { @@ -105,20 +105,20 @@ 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) # **configurationExport** -> ExportConfigurationDTO configurationExport(id) +> MultipartFile configurationExport(id) -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.configurationExport(id); print(result); } catch (e) { @@ -134,7 +134,7 @@ Name | Type | Description | Notes ### Return type -[**ExportConfigurationDTO**](ExportConfigurationDTO.md) +[**MultipartFile**](MultipartFile.md) ### Authorization @@ -143,7 +143,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: application/octet-stream, 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) @@ -152,16 +152,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 instanceId = instanceId_example; // String | -try { +try { final result = api_instance.configurationGet(instanceId); print(result); } catch (e) { @@ -195,16 +195,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.configurationGetDetail(id); print(result); } catch (e) { @@ -238,16 +238,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 exportConfigurationDTO = ExportConfigurationDTO(); // ExportConfigurationDTO | -try { +try { final result = api_instance.configurationImport(exportConfigurationDTO); print(result); } catch (e) { @@ -281,16 +281,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 configurationDTO = ConfigurationDTO(); // ConfigurationDTO | -try { +try { final result = api_instance.configurationUpdate(configurationDTO); print(result); } catch (e) { diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api_new/doc/ConfigurationDTO.md similarity index 92% rename from manager_api/doc/ConfigurationDTO.md rename to manager_api_new/doc/ConfigurationDTO.md index c387e92..ad17394 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api_new/doc/ConfigurationDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ConfigurationDTO +# manager_api_new.model.ConfigurationDTO ## Load the model package ```dart -import 'package:managerapi/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 93% rename from manager_api/doc/DeviceApi.md rename to manager_api_new/doc/DeviceApi.md index 8fb5e6c..e43a287 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api_new/doc/DeviceApi.md @@ -1,11 +1,11 @@ -# managerapi.api.DeviceApi +# manager_api_new.api.DeviceApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -22,16 +22,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final deviceDetailDTO = DeviceDetailDTO(); // DeviceDetailDTO | -try { +try { final result = api_instance.deviceCreate(deviceDetailDTO); print(result); } catch (e) { @@ -65,16 +65,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final id = id_example; // String | -try { +try { final result = api_instance.deviceDelete(id); print(result); } catch (e) { @@ -108,16 +108,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final instanceId = instanceId_example; // String | -try { +try { final result = api_instance.deviceGet(instanceId); print(result); } catch (e) { @@ -151,16 +151,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final id = id_example; // String | -try { +try { final result = api_instance.deviceGetDetail(id); print(result); } catch (e) { @@ -194,16 +194,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final deviceDetailDTO = DeviceDetailDTO(); // DeviceDetailDTO | -try { +try { final result = api_instance.deviceUpdate(deviceDetailDTO); print(result); } catch (e) { @@ -237,16 +237,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = DeviceApi(); final deviceDTO = DeviceDTO(); // DeviceDTO | -try { +try { final result = api_instance.deviceUpdateMainInfos(deviceDTO); print(result); } catch (e) { 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 0b4501b..d2c0be2 100644 --- a/manager_api/doc/DeviceDTO.md +++ b/manager_api_new/doc/DeviceDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.DeviceDTO +# manager_api_new.model.DeviceDTO ## Load the model package ```dart -import 'package:managerapi/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 314498f..2899936 100644 --- a/manager_api/doc/DeviceDetailDTO.md +++ b/manager_api_new/doc/DeviceDetailDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.DeviceDetailDTO +# manager_api_new.model.DeviceDetailDTO ## Load the model package ```dart -import 'package:managerapi/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 0cc0886..0b6c098 100644 --- a/manager_api/doc/DeviceDetailDTOAllOf.md +++ b/manager_api_new/doc/DeviceDetailDTOAllOf.md @@ -1,8 +1,8 @@ -# managerapi.model.DeviceDetailDTOAllOf +# manager_api_new.model.DeviceDetailDTOAllOf ## Load the model package ```dart -import 'package:managerapi/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 92% rename from manager_api/doc/ExportConfigurationDTO.md rename to manager_api_new/doc/ExportConfigurationDTO.md index 4560fef..a345669 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api_new/doc/ExportConfigurationDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ExportConfigurationDTO +# manager_api_new.model.ExportConfigurationDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties 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 e369543..6e8eeff 100644 --- a/manager_api/doc/ExportConfigurationDTOAllOf.md +++ b/manager_api_new/doc/ExportConfigurationDTOAllOf.md @@ -1,8 +1,8 @@ -# managerapi.model.ExportConfigurationDTOAllOf +# manager_api_new.model.ExportConfigurationDTOAllOf ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/GeoPointDTO.md b/manager_api_new/doc/GeoPointDTO.md similarity index 90% rename from manager_api/doc/GeoPointDTO.md rename to manager_api_new/doc/GeoPointDTO.md index bb5d545..f1cc161 100644 --- a/manager_api/doc/GeoPointDTO.md +++ b/manager_api_new/doc/GeoPointDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.GeoPointDTO +# manager_api_new.model.GeoPointDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/ImageDTO.md b/manager_api_new/doc/ImageDTO.md similarity index 89% rename from manager_api/doc/ImageDTO.md rename to manager_api_new/doc/ImageDTO.md index 1f2c7b5..5e90d0a 100644 --- a/manager_api/doc/ImageDTO.md +++ b/manager_api_new/doc/ImageDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ImageDTO +# manager_api_new.model.ImageDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties 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 e290427..7460899 100644 --- a/manager_api/doc/ImageGeoPoint.md +++ b/manager_api_new/doc/ImageGeoPoint.md @@ -1,8 +1,8 @@ -# managerapi.model.ImageGeoPoint +# manager_api_new.model.ImageGeoPoint ## Load the model package ```dart -import 'package:managerapi/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 85% rename from manager_api/doc/Instance.md rename to manager_api_new/doc/Instance.md index 35094f1..3322bf1 100644 --- a/manager_api/doc/Instance.md +++ b/manager_api_new/doc/Instance.md @@ -1,8 +1,8 @@ -# managerapi.model.Instance +# manager_api_new.model.Instance ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/InstanceApi.md b/manager_api_new/doc/InstanceApi.md similarity index 92% rename from manager_api/doc/InstanceApi.md rename to manager_api_new/doc/InstanceApi.md index fbd914e..206a7f3 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api_new/doc/InstanceApi.md @@ -1,11 +1,11 @@ -# managerapi.api.InstanceApi +# manager_api_new.api.InstanceApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -21,16 +21,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.instanceCreateInstance(instance); print(result); } catch (e) { @@ -64,16 +64,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.instanceDeleteInstance(id); print(result); } catch (e) { @@ -107,15 +107,15 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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(); -try { +try { final result = api_instance.instanceGet(); print(result); } catch (e) { @@ -146,16 +146,16 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.instanceGetDetail(id); print(result); } catch (e) { @@ -189,16 +189,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.instanceUpdateinstance(instance); print(result); } catch (e) { diff --git a/manager_api/doc/InstanceDTO.md b/manager_api_new/doc/InstanceDTO.md similarity index 85% rename from manager_api/doc/InstanceDTO.md rename to manager_api_new/doc/InstanceDTO.md index 1e241f5..f2aae93 100644 --- a/manager_api/doc/InstanceDTO.md +++ b/manager_api_new/doc/InstanceDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.InstanceDTO +# manager_api_new.model.InstanceDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/LevelDTO.md b/manager_api_new/doc/LevelDTO.md similarity index 86% rename from manager_api/doc/LevelDTO.md rename to manager_api_new/doc/LevelDTO.md index af91156..d919264 100644 --- a/manager_api/doc/LevelDTO.md +++ b/manager_api_new/doc/LevelDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.LevelDTO +# manager_api_new.model.LevelDTO ## Load the model package ```dart -import 'package:managerapi/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 c5d85da..a07728f 100644 --- a/manager_api/doc/LoginDTO.md +++ b/manager_api_new/doc/LoginDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.LoginDTO +# manager_api_new.model.LoginDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MapDTO.md b/manager_api_new/doc/MapDTO.md similarity index 88% rename from manager_api/doc/MapDTO.md rename to manager_api_new/doc/MapDTO.md index 656bd08..2dce0e4 100644 --- a/manager_api/doc/MapDTO.md +++ b/manager_api_new/doc/MapDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.MapDTO +# manager_api_new.model.MapDTO ## Load the model package ```dart -import 'package:managerapi/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 4d1d1a4..4aaf681 100644 --- a/manager_api/doc/MapTypeApp.md +++ b/manager_api_new/doc/MapTypeApp.md @@ -1,8 +1,8 @@ -# managerapi.model.MapTypeApp +# manager_api_new.model.MapTypeApp ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/MenuDTO.md b/manager_api_new/doc/MenuDTO.md similarity index 84% rename from manager_api/doc/MenuDTO.md rename to manager_api_new/doc/MenuDTO.md index 960de2c..89d2690 100644 --- a/manager_api/doc/MenuDTO.md +++ b/manager_api_new/doc/MenuDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.MenuDTO +# manager_api_new.model.MenuDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties 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 0f07218..4e6ac89 100644 --- a/manager_api/doc/PlayerMessageDTO.md +++ b/manager_api_new/doc/PlayerMessageDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.PlayerMessageDTO +# manager_api_new.model.PlayerMessageDTO ## Load the model package ```dart -import 'package:managerapi/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 88% rename from manager_api/doc/QuestionDTO.md rename to manager_api_new/doc/QuestionDTO.md index 1827076..74f2893 100644 --- a/manager_api/doc/QuestionDTO.md +++ b/manager_api_new/doc/QuestionDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.QuestionDTO +# manager_api_new.model.QuestionDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/QuizzDTO.md b/manager_api_new/doc/QuizzDTO.md similarity index 51% rename from manager_api/doc/QuizzDTO.md rename to manager_api_new/doc/QuizzDTO.md index 953a3d7..c359720 100644 --- a/manager_api/doc/QuizzDTO.md +++ b/manager_api_new/doc/QuizzDTO.md @@ -1,18 +1,18 @@ -# managerapi.model.QuizzDTO +# manager_api_new.model.QuizzDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **questions** | [**List**](QuestionDTO.md) | | [optional] [default to const []] -**badLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional] -**mediumLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional] -**goodLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional] -**greatLevel** | [**OneOfLevelDTO**](OneOfLevelDTO.md) | | [optional] +**badLevel** | [**QuizzDTOBadLevel**](QuizzDTOBadLevel.md) | | [optional] +**mediumLevel** | [**QuizzDTOBadLevel**](QuizzDTOBadLevel.md) | | [optional] +**goodLevel** | [**QuizzDTOBadLevel**](QuizzDTOBadLevel.md) | | [optional] +**greatLevel** | [**QuizzDTOBadLevel**](QuizzDTOBadLevel.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/MapType.md b/manager_api_new/doc/QuizzDTOBadLevel.md similarity index 54% rename from manager_api/doc/MapType.md rename to manager_api_new/doc/QuizzDTOBadLevel.md index 31651b0..ffd04e8 100644 --- a/manager_api/doc/MapType.md +++ b/manager_api_new/doc/QuizzDTOBadLevel.md @@ -1,13 +1,16 @@ -# managerapi.model.MapType +# manager_api_new.model.QuizzDTOBadLevel ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**resourceId** | **String** | | [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/doc/ResourceApi.md b/manager_api_new/doc/ResourceApi.md similarity index 93% rename from manager_api/doc/ResourceApi.md rename to manager_api_new/doc/ResourceApi.md index 204d1e5..4ec3857 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api_new/doc/ResourceApi.md @@ -1,11 +1,11 @@ -# managerapi.api.ResourceApi +# manager_api_new.api.ResourceApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,16 +23,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 = ResourceApi(); final resourceDTO = ResourceDTO(); // ResourceDTO | -try { +try { final result = api_instance.resourceCreate(resourceDTO); print(result); } catch (e) { @@ -66,16 +66,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = ResourceApi(); final id = id_example; // String | -try { +try { final result = api_instance.resourceDelete(id); print(result); } catch (e) { @@ -109,9 +109,9 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; // TODO Configure OAuth2 access token for authorization: bearer //defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; @@ -119,7 +119,7 @@ final api_instance = ResourceApi(); final instanceId = instanceId_example; // String | final types = []; // List | -try { +try { final result = api_instance.resourceGet(instanceId, types); print(result); } catch (e) { @@ -154,16 +154,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = ResourceApi(); final id = id_example; // String | -try { +try { final result = api_instance.resourceGetDetail(id); print(result); } catch (e) { @@ -197,16 +197,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = ResourceApi(); final id = id_example; // String | -try { +try { final result = api_instance.resourceShow(id); print(result); } catch (e) { @@ -240,16 +240,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = ResourceApi(); final resourceDTO = ResourceDTO(); // ResourceDTO | -try { +try { final result = api_instance.resourceUpdate(resourceDTO); print(result); } catch (e) { @@ -283,9 +283,9 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 +294,7 @@ final label = label_example; // String | final type = type_example; // String | final instanceId = instanceId_example; // String | -try { +try { final result = api_instance.resourceUpload(label, type, instanceId); print(result); } catch (e) { 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 97271f8..1795c95 100644 --- a/manager_api/doc/ResourceDTO.md +++ b/manager_api_new/doc/ResourceDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ResourceDTO +# manager_api_new.model.ResourceDTO ## Load the model package ```dart -import 'package:managerapi/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 05e673f..ef72cc8 100644 --- a/manager_api/doc/ResourceType.md +++ b/manager_api_new/doc/ResourceType.md @@ -1,8 +1,8 @@ -# managerapi.model.ResourceType +# manager_api_new.model.ResourceType ## Load the model package ```dart -import 'package:managerapi/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 4b5334a..6e4f0a1 100644 --- a/manager_api/doc/ResponseDTO.md +++ b/manager_api_new/doc/ResponseDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.ResponseDTO +# manager_api_new.model.ResponseDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/SectionApi.md b/manager_api_new/doc/SectionApi.md similarity index 93% rename from manager_api/doc/SectionApi.md rename to manager_api_new/doc/SectionApi.md index 4fe095b..b7befe1 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api_new/doc/SectionApi.md @@ -1,11 +1,11 @@ -# managerapi.api.SectionApi +# manager_api_new.api.SectionApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -33,16 +33,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.sectionCreate(sectionDTO); print(result); } catch (e) { @@ -76,16 +76,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.sectionDelete(id); print(result); } catch (e) { @@ -119,16 +119,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.sectionDeleteAllForConfiguration(id); print(result); } catch (e) { @@ -162,16 +162,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 instanceId = instanceId_example; // String | -try { +try { final result = api_instance.sectionGet(instanceId); print(result); } catch (e) { @@ -205,16 +205,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.sectionGetAllSectionSubSections(id); print(result); } catch (e) { @@ -248,15 +248,15 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetArticleDTO(); print(result); } catch (e) { @@ -287,16 +287,16 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.sectionGetDetail(id); print(result); } catch (e) { @@ -330,16 +330,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.sectionGetFromConfiguration(id); print(result); } catch (e) { @@ -373,15 +373,15 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetMapDTO(); print(result); } catch (e) { @@ -412,15 +412,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetMenuDTO(); print(result); } catch (e) { @@ -451,15 +451,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetQuizzDTO(); print(result); } catch (e) { @@ -490,15 +490,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetSliderDTO(); print(result); } catch (e) { @@ -529,15 +529,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetVideoDTO(); print(result); } catch (e) { @@ -568,15 +568,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionGetWebDTO(); print(result); } catch (e) { @@ -607,15 +607,15 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 { +try { final result = api_instance.sectionPlayerMessageDTO(); print(result); } catch (e) { @@ -646,16 +646,16 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.sectionUpdate(sectionDTO); print(result); } catch (e) { @@ -689,16 +689,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 = [List()]; // List | -try { +try { final result = api_instance.sectionUpdateOrder(sectionDTO); print(result); } catch (e) { diff --git a/manager_api/doc/SectionDTO.md b/manager_api_new/doc/SectionDTO.md similarity index 93% rename from manager_api/doc/SectionDTO.md rename to manager_api_new/doc/SectionDTO.md index e14ebea..f05150a 100644 --- a/manager_api/doc/SectionDTO.md +++ b/manager_api_new/doc/SectionDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.SectionDTO +# manager_api_new.model.SectionDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties 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 c192bbd..586ae2d 100644 --- a/manager_api/doc/SectionType.md +++ b/manager_api_new/doc/SectionType.md @@ -1,8 +1,8 @@ -# managerapi.model.SectionType +# manager_api_new.model.SectionType ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/SliderDTO.md b/manager_api_new/doc/SliderDTO.md similarity index 83% rename from manager_api/doc/SliderDTO.md rename to manager_api_new/doc/SliderDTO.md index a5df1e8..7c6e562 100644 --- a/manager_api/doc/SliderDTO.md +++ b/manager_api_new/doc/SliderDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.SliderDTO +# manager_api_new.model.SliderDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/TokenDTO.md b/manager_api_new/doc/TokenDTO.md similarity index 89% rename from manager_api/doc/TokenDTO.md rename to manager_api_new/doc/TokenDTO.md index 1a5e23f..3d91013 100644 --- a/manager_api/doc/TokenDTO.md +++ b/manager_api_new/doc/TokenDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.TokenDTO +# manager_api_new.model.TokenDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties 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 fef92bf..c9e67be 100644 --- a/manager_api/doc/TranslationDTO.md +++ b/manager_api_new/doc/TranslationDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.TranslationDTO +# manager_api_new.model.TranslationDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/User.md b/manager_api_new/doc/User.md similarity index 90% rename from manager_api/doc/User.md rename to manager_api_new/doc/User.md index 02a0be1..aa258fb 100644 --- a/manager_api/doc/User.md +++ b/manager_api_new/doc/User.md @@ -1,8 +1,8 @@ -# managerapi.model.User +# manager_api_new.model.User ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/UserApi.md b/manager_api_new/doc/UserApi.md similarity index 92% rename from manager_api/doc/UserApi.md rename to manager_api_new/doc/UserApi.md index 42edc96..ac33309 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api_new/doc/UserApi.md @@ -1,11 +1,11 @@ -# managerapi.api.UserApi +# manager_api_new.api.UserApi ## Load the API package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -21,16 +21,16 @@ Method | HTTP request | Description -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.userCreateUser(user); print(result); } catch (e) { @@ -64,16 +64,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.userDeleteUser(id); print(result); } catch (e) { @@ -107,15 +107,15 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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(); -try { +try { final result = api_instance.userGet(); print(result); } catch (e) { @@ -146,16 +146,16 @@ This endpoint does not need any parameter. -### Example +### Example ```dart -import 'package:managerapi/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 id = id_example; // String | -try { +try { final result = api_instance.userGetDetail(id); print(result); } catch (e) { @@ -189,16 +189,16 @@ Name | Type | Description | Notes -### Example +### Example ```dart -import 'package:managerapi/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 | -try { +try { final result = api_instance.userUpdateUser(user); print(result); } catch (e) { diff --git a/manager_api/doc/UserDetailDTO.md b/manager_api_new/doc/UserDetailDTO.md similarity index 85% rename from manager_api/doc/UserDetailDTO.md rename to manager_api_new/doc/UserDetailDTO.md index 6b1a0e9..b60d678 100644 --- a/manager_api/doc/UserDetailDTO.md +++ b/manager_api_new/doc/UserDetailDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.UserDetailDTO +# manager_api_new.model.UserDetailDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/VideoDTO.md b/manager_api_new/doc/VideoDTO.md similarity index 82% rename from manager_api/doc/VideoDTO.md rename to manager_api_new/doc/VideoDTO.md index 08c8315..651c805 100644 --- a/manager_api/doc/VideoDTO.md +++ b/manager_api_new/doc/VideoDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.VideoDTO +# manager_api_new.model.VideoDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/doc/WebDTO.md b/manager_api_new/doc/WebDTO.md similarity index 82% rename from manager_api/doc/WebDTO.md rename to manager_api_new/doc/WebDTO.md index 3b26ea1..64b79a2 100644 --- a/manager_api/doc/WebDTO.md +++ b/manager_api_new/doc/WebDTO.md @@ -1,8 +1,8 @@ -# managerapi.model.WebDTO +# manager_api_new.model.WebDTO ## Load the model package ```dart -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; ``` ## Properties diff --git a/manager_api/git_push.sh b/manager_api_new/git_push.sh similarity index 87% rename from manager_api/git_push.sh rename to manager_api_new/git_push.sh index ced3be2..f53a75d 100644 --- a/manager_api/git_push.sh +++ b/manager_api_new/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/manager_api/lib/api.dart b/manager_api_new/lib/api.dart similarity index 95% rename from manager_api/lib/api.dart rename to manager_api_new/lib/api.dart index cc29d1f..3d214e5 100644 --- a/manager_api/lib/api.dart +++ b/manager_api_new/lib/api.dart @@ -1,10 +1,11 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 library openapi.api; @@ -15,7 +16,6 @@ import 'dart:io'; import 'package:http/http.dart'; import 'package:intl/intl.dart'; - import 'package:meta/meta.dart'; part 'api_client.dart'; @@ -55,6 +55,7 @@ part 'model/menu_dto.dart'; part 'model/player_message_dto.dart'; part 'model/question_dto.dart'; part 'model/quizz_dto.dart'; +part 'model/quizz_dto_bad_level.dart'; part 'model/resource_dto.dart'; part 'model/resource_type.dart'; part 'model/response_dto.dart'; diff --git a/manager_api_new/lib/api/authentication_api.dart b/manager_api_new/lib/api/authentication_api.dart new file mode 100644 index 0000000..e8647e9 --- /dev/null +++ b/manager_api_new/lib/api/authentication_api.dart @@ -0,0 +1,153 @@ +// +// 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 AuthenticationApi { + AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/Authentication/Token' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] grantType: + /// + /// * [String] username: + /// + /// * [String] password: + /// + /// * [String] clientId: + /// + /// * [String] clientSecret: + Future authenticationAuthenticateWithFormWithHttpInfo({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Authentication/Token'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['multipart/form-data']; + + bool hasFields = false; + final mp = MultipartRequest('POST', Uri.parse(path)); + if (grantType != null) { + hasFields = true; + mp.fields[r'grant_type'] = parameterToString(grantType); + } + if (username != null) { + hasFields = true; + mp.fields[r'username'] = parameterToString(username); + } + if (password != null) { + hasFields = true; + mp.fields[r'password'] = parameterToString(password); + } + if (clientId != null) { + hasFields = true; + mp.fields[r'client_id'] = parameterToString(clientId); + } + if (clientSecret != null) { + hasFields = true; + mp.fields[r'client_secret'] = parameterToString(clientSecret); + } + if (hasFields) { + postBody = mp; + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] grantType: + /// + /// * [String] username: + /// + /// * [String] password: + /// + /// * [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, ); + 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; + + } + return null; + } + + /// Performs an HTTP 'POST /api/Authentication/Authenticate' operation and returns the [Response]. + /// Parameters: + /// + /// * [LoginDTO] loginDTO (required): + Future authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Authentication/Authenticate'; + + // ignore: prefer_final_locals + Object? postBody = loginDTO; + + 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: + /// + /// * [LoginDTO] loginDTO (required): + 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/configuration_api.dart b/manager_api_new/lib/api/configuration_api.dart new file mode 100644 index 0000000..4ea7b7f --- /dev/null +++ b/manager_api_new/lib/api/configuration_api.dart @@ -0,0 +1,357 @@ +// +// 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 ConfigurationApi { + ConfigurationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/Configuration' operation and returns the [Response]. + /// Parameters: + /// + /// * [ConfigurationDTO] configurationDTO (required): + Future configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration'; + + // ignore: prefer_final_locals + Object? postBody = configurationDTO; + + 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: + /// + /// * [ConfigurationDTO] configurationDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Configuration/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future configurationDeleteWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Configuration/{id}/export' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future configurationExportWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration/{id}/export' + .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 configurationExport(String id,) async { + final response = await configurationExportWithHttpInfo(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), 'ExportConfigurationDTO',) as ExportConfigurationDTO; + + } + return Future.value(null); + } + + /// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] instanceId: + Future configurationGetWithHttpInfo({ String? instanceId, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (instanceId != null) { + queryParams.addAll(_queryParams('', 'instanceId', instanceId)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future configurationGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration/{id}' + .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 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; + + } + return null; + } + + /// Performs an HTTP 'POST /api/Configuration/import' operation and returns the [Response]. + /// Parameters: + /// + /// * [ExportConfigurationDTO] exportConfigurationDTO (required): + Future configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration/import'; + + // ignore: prefer_final_locals + Object? postBody = exportConfigurationDTO; + + 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: + /// + /// * [ExportConfigurationDTO] exportConfigurationDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Configuration' operation and returns the [Response]. + /// Parameters: + /// + /// * [ConfigurationDTO] configurationDTO (required): + Future configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration'; + + // ignore: prefer_final_locals + Object? postBody = configurationDTO; + + 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: + /// + /// * [ConfigurationDTO] configurationDTO (required): + 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/device_api.dart b/manager_api_new/lib/api/device_api.dart new file mode 100644 index 0000000..7bb84ed --- /dev/null +++ b/manager_api_new/lib/api/device_api.dart @@ -0,0 +1,309 @@ +// +// 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 DeviceApi { + DeviceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/Device' operation and returns the [Response]. + /// Parameters: + /// + /// * [DeviceDetailDTO] deviceDetailDTO (required): + Future deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Device'; + + // ignore: prefer_final_locals + Object? postBody = deviceDetailDTO; + + 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: + /// + /// * [DeviceDetailDTO] deviceDetailDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Device/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future deviceDeleteWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Device/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Device' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] instanceId: + Future deviceGetWithHttpInfo({ String? instanceId, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Device'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (instanceId != null) { + queryParams.addAll(_queryParams('', 'instanceId', instanceId)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Device/{id}/detail' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future deviceGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Device/{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 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Device' operation and returns the [Response]. + /// Parameters: + /// + /// * [DeviceDetailDTO] deviceDetailDTO (required): + Future deviceUpdateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Device'; + + // ignore: prefer_final_locals + Object? postBody = deviceDetailDTO; + + 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: + /// + /// * [DeviceDetailDTO] deviceDetailDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Device/mainInfos' operation and returns the [Response]. + /// Parameters: + /// + /// * [DeviceDTO] deviceDTO (required): + Future deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Device/mainInfos'; + + // ignore: prefer_final_locals + Object? postBody = deviceDTO; + + 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: + /// + /// * [DeviceDTO] deviceDTO (required): + 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/instance_api.dart b/manager_api_new/lib/api/instance_api.dart new file mode 100644 index 0000000..ef652ce --- /dev/null +++ b/manager_api_new/lib/api/instance_api.dart @@ -0,0 +1,252 @@ +// +// 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 InstanceApi { + 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 { + // ignore: prefer_const_declarations + final path = r'/api/Instance'; + + // ignore: prefer_final_locals + Object? postBody = instance; + + 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: + /// + /// * [Instance] instance (required): + Future instanceCreateInstance(Instance instance,) async { + final response = await instanceCreateInstanceWithHttpInfo(instance,); + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Instance/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future instanceDeleteInstanceWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Instance/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Instance' operation and returns the [Response]. + Future instanceGetWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Instance'; + + // 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, + ); + } + + Future?> instanceGet() async { + final response = await instanceGetWithHttpInfo(); + 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(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Instance/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future instanceGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Instance/{id}' + .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 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response]. + /// Parameters: + /// + /// * [Instance] instance (required): + Future instanceUpdateinstanceWithHttpInfo(Instance instance,) async { + // ignore: prefer_const_declarations + final path = r'/api/Instance'; + + // ignore: prefer_final_locals + Object? postBody = instance; + + 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: + /// + /// * [Instance] instance (required): + Future instanceUpdateinstance(Instance instance,) async { + final response = await instanceUpdateinstanceWithHttpInfo(instance,); + 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/resource_api.dart b/manager_api_new/lib/api/resource_api.dart new file mode 100644 index 0000000..bb0ea9d --- /dev/null +++ b/manager_api_new/lib/api/resource_api.dart @@ -0,0 +1,389 @@ +// +// 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 ResourceApi { + ResourceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/Resource' operation and returns the [Response]. + /// Parameters: + /// + /// * [ResourceDTO] resourceDTO (required): + Future resourceCreateWithHttpInfo(ResourceDTO resourceDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource'; + + // ignore: prefer_final_locals + Object? postBody = resourceDTO; + + 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: + /// + /// * [ResourceDTO] resourceDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Resource/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future resourceDeleteWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Resource' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] instanceId: + /// + /// * [List] types: + Future resourceGetWithHttpInfo({ String? instanceId, List? types, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (instanceId != null) { + queryParams.addAll(_queryParams('', 'instanceId', instanceId)); + } + if (types != null) { + queryParams.addAll(_queryParams('multi', 'types', types)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] instanceId: + /// + /// * [List] 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Resource/{id}/detail' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future resourceGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource/{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 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Resource/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future resourceShowWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource/{id}' + .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 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Resource' operation and returns the [Response]. + /// Parameters: + /// + /// * [ResourceDTO] resourceDTO (required): + Future resourceUpdateWithHttpInfo(ResourceDTO resourceDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource'; + + // ignore: prefer_final_locals + Object? postBody = resourceDTO; + + 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: + /// + /// * [ResourceDTO] resourceDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'POST /api/Resource/upload' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] label: + /// + /// * [String] type: + /// + /// * [String] instanceId: + Future resourceUploadWithHttpInfo({ String? label, String? type, String? instanceId, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Resource/upload'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['multipart/form-data']; + + bool hasFields = false; + final mp = MultipartRequest('POST', Uri.parse(path)); + if (label != null) { + hasFields = true; + mp.fields[r'label'] = parameterToString(label); + } + if (type != null) { + hasFields = true; + mp.fields[r'type'] = parameterToString(type); + } + if (instanceId != null) { + hasFields = true; + mp.fields[r'instanceId'] = parameterToString(instanceId); + } + if (hasFields) { + postBody = mp; + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] label: + /// + /// * [String] type: + /// + /// * [String] 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/section_api.dart b/manager_api_new/lib/api/section_api.dart new file mode 100644 index 0000000..cb2897c --- /dev/null +++ b/manager_api_new/lib/api/section_api.dart @@ -0,0 +1,787 @@ +// +// 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 SectionApi { + SectionApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/Section' operation and returns the [Response]. + /// Parameters: + /// + /// * [SectionDTO] sectionDTO (required): + Future sectionCreateWithHttpInfo(SectionDTO sectionDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section'; + + // ignore: prefer_final_locals + Object? postBody = sectionDTO; + + 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: + /// + /// * [SectionDTO] sectionDTO (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Section/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionDeleteWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/Section/configuration/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionDeleteAllForConfigurationWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/configuration/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] instanceId: + Future sectionGetWithHttpInfo({ String? instanceId, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Section'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (instanceId != null) { + queryParams.addAll(_queryParams('', 'instanceId', instanceId)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/{id}/subsections' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetAllSectionSubSectionsWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/{id}/subsections' + .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?> 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(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/ArticleDTO' operation and returns the [Response]. + Future sectionGetArticleDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/ArticleDTO'; + + // 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, + ); + } + + Future sectionGetArticleDTO() async { + final response = await sectionGetArticleDTOWithHttpInfo(); + 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), 'ArticleDTO',) as ArticleDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/{id}' + .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 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/configuration/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future sectionGetFromConfigurationWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/configuration/{id}' + .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?> 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/MapDTO' operation and returns the [Response]. + Future sectionGetMapDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/MapDTO'; + + // 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, + ); + } + + Future sectionGetMapDTO() async { + final response = await sectionGetMapDTOWithHttpInfo(); + 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), 'MapDTO',) as MapDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/MenuDTO' operation and returns the [Response]. + Future sectionGetMenuDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/MenuDTO'; + + // 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, + ); + } + + Future sectionGetMenuDTO() async { + final response = await sectionGetMenuDTOWithHttpInfo(); + 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), 'MenuDTO',) as MenuDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response]. + Future sectionGetQuizzDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/QuizzDTO'; + + // 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, + ); + } + + Future sectionGetQuizzDTO() async { + final response = await sectionGetQuizzDTOWithHttpInfo(); + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/SliderDTO' operation and returns the [Response]. + Future sectionGetSliderDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/SliderDTO'; + + // 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, + ); + } + + Future sectionGetSliderDTO() async { + final response = await sectionGetSliderDTOWithHttpInfo(); + 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), 'SliderDTO',) as SliderDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/VideoDTO' operation and returns the [Response]. + Future sectionGetVideoDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/VideoDTO'; + + // 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, + ); + } + + Future sectionGetVideoDTO() async { + final response = await sectionGetVideoDTOWithHttpInfo(); + 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), 'VideoDTO',) as VideoDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/WebDTO' operation and returns the [Response]. + Future sectionGetWebDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/WebDTO'; + + // 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, + ); + } + + Future sectionGetWebDTO() async { + final response = await sectionGetWebDTOWithHttpInfo(); + 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), 'WebDTO',) as WebDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/PlayerMessageDTO' operation and returns the [Response]. + Future sectionPlayerMessageDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/PlayerMessageDTO'; + + // 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, + ); + } + + Future sectionPlayerMessageDTO() async { + final response = await sectionPlayerMessageDTOWithHttpInfo(); + 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), 'PlayerMessageDTO',) as PlayerMessageDTO; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Section' operation and returns the [Response]. + /// Parameters: + /// + /// * [SectionDTO] sectionDTO (required): + Future sectionUpdateWithHttpInfo(SectionDTO sectionDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section'; + + // ignore: prefer_final_locals + Object? postBody = sectionDTO; + + 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: + /// + /// * [SectionDTO] sectionDTO (required): + Future sectionUpdate(SectionDTO sectionDTO,) async { + final response = await sectionUpdateWithHttpInfo(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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/Section/order' operation and returns the [Response]. + /// Parameters: + /// + /// * [List] sectionDTO (required): + Future sectionUpdateOrderWithHttpInfo(List sectionDTO,) async { + // ignore: prefer_const_declarations + final path = r'/api/Section/order'; + + // ignore: prefer_final_locals + Object? postBody = sectionDTO; + + 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: + /// + /// * [List] sectionDTO (required): + 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; + + } + return null; + } +} diff --git a/manager_api_new/lib/api/user_api.dart b/manager_api_new/lib/api/user_api.dart new file mode 100644 index 0000000..989b146 --- /dev/null +++ b/manager_api_new/lib/api/user_api.dart @@ -0,0 +1,252 @@ +// +// 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 UserApi { + UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'POST /api/User' operation and returns the [Response]. + /// Parameters: + /// + /// * [User] user (required): + Future userCreateUserWithHttpInfo(User user,) async { + // ignore: prefer_const_declarations + final path = r'/api/User'; + + // ignore: prefer_final_locals + Object? postBody = user; + + 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: + /// + /// * [User] user (required): + Future userCreateUser(User user,) async { + final response = await userCreateUserWithHttpInfo(user,); + 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; + + } + return null; + } + + /// Performs an HTTP 'DELETE /api/User/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future userDeleteUserWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/User/{id}' + .replaceAll('{id}', id); + + // 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: + /// + /// * [String] id (required): + 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; + + } + return null; + } + + /// Performs an HTTP 'GET /api/User' operation and returns the [Response]. + Future userGetWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/User'; + + // 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, + ); + } + + Future?> userGet() async { + final response = await userGetWithHttpInfo(); + 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(); + + } + return null; + } + + /// Performs an HTTP 'GET /api/User/{id}' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] id (required): + Future userGetDetailWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/User/{id}' + .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 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; + + } + return null; + } + + /// Performs an HTTP 'PUT /api/User' operation and returns the [Response]. + /// Parameters: + /// + /// * [User] user (required): + Future userUpdateUserWithHttpInfo(User user,) async { + // ignore: prefer_const_declarations + final path = r'/api/User'; + + // ignore: prefer_final_locals + Object? postBody = user; + + 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: + /// + /// * [User] user (required): + Future userUpdateUser(User user,) async { + final response = await userUpdateUserWithHttpInfo(user,); + 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; + + } + return null; + } +} diff --git a/manager_api/lib/api_client.dart b/manager_api_new/lib/api_client.dart similarity index 50% rename from manager_api/lib/api_client.dart rename to manager_api_new/lib/api_client.dart index 0f57dda..70d5cce 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api_new/lib/api_client.dart @@ -1,19 +1,17 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 ApiClient { - ApiClient({this.basePath = 'http://localhost:5000'}) { - // Setup authentications (key: authentication name, value: authentication). - _authentications[r'bearer'] = OAuth(); - } + ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication}); final String basePath; @@ -25,17 +23,12 @@ class ApiClient { Client get client => _client; /// Requests to use a new HTTP [Client] in this class. - /// - /// If the [newClient] is null, an [ArgumentError] is thrown. set client(Client newClient) { - if (newClient == null) { - throw ArgumentError('New client instance cannot be null.'); - } _client = newClient; } final _defaultHeaderMap = {}; - final _authentications = {}; + final Authentication? authentication; void addDefaultHeader(String key, String value) { _defaultHeaderMap[key] = value; @@ -43,59 +36,42 @@ class ApiClient { Map get defaultHeaderMap => _defaultHeaderMap; - /// returns an unmodifiable view of the authentications, since none should be added - /// nor deleted - Map get authentications => - Map.unmodifiable(_authentications); - - T getAuthentication(String name) { - final authentication = _authentications[name]; - return authentication is T ? authentication : null; - } - - // We don’t use a Map for queryParams. + // We don't use a Map for queryParams. // If collectionFormat is 'multi', a key might appear multiple times. Future invokeAPI( String path, String method, - Iterable queryParams, - Object body, + List queryParams, + Object? body, Map headerParams, Map formParams, - String nullableContentType, - List authNames, + String? contentType, ) async { - _updateParamsForAuth(authNames, queryParams, headerParams); + _updateParamsForAuth(queryParams, headerParams); headerParams.addAll(_defaultHeaderMap); - - final urlEncodedQueryParams = queryParams - .where((param) => param.value != null) - .map((param) => '$param'); - - final queryString = urlEncodedQueryParams.isNotEmpty - ? '?${urlEncodedQueryParams.join('&')}' - : ''; - - final url = '$basePath$path$queryString'; - - if (nullableContentType != null) { - headerParams['Content-Type'] = nullableContentType; + if (contentType != null) { + headerParams['Content-Type'] = contentType; } + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + 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'. + // Special case for uploading a single file which isn't a 'multipart/form-data'. if ( - body is MultipartFile && (nullableContentType == null || - !nullableContentType.toLowerCase().startsWith('multipart/form-data')) + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) ) { - final request = StreamedRequest(method, Uri.parse(url)); + final request = StreamedRequest(method, uri); request.headers.addAll(headerParams); request.contentLength = body.length; body.finalize().listen( request.sink.add, onDone: request.sink.close, - onError: (error, trace) => 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); @@ -103,7 +79,7 @@ class ApiClient { } if (body is MultipartRequest) { - final request = MultipartRequest(method, Uri.parse(url)); + final request = MultipartRequest(method, uri); request.fields.addAll(body.fields); request.files.addAll(body.files); request.headers.addAll(body.headers); @@ -112,50 +88,108 @@ class ApiClient { return Response.fromStream(response); } - final msgBody = nullableContentType == 'application/x-www-form-urlencoded' + final msgBody = contentType == 'application/x-www-form-urlencoded' ? formParams - : serialize(body); + : await serializeAsync(body); final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; switch(method) { - case 'POST': return await _client.post(url, headers: nullableHeaderParams, body: msgBody,); - case 'PUT': return await _client.put(url, headers: nullableHeaderParams, body: msgBody,); - case 'DELETE': return await _client.delete(url, headers: nullableHeaderParams,); - case 'PATCH': return await _client.patch(url, headers: nullableHeaderParams, body: msgBody,); - case 'HEAD': return await _client.head(url, headers: nullableHeaderParams,); - case 'GET': return await _client.get(url, headers: nullableHeaderParams,); + 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 (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Socket operation failed: $method $path', e, trace,); - } on TlsException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'TLS/SSL communication failed: $method $path', e, trace,); - } on IOException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'I/O operation failed: $method $path', e, trace,); - } on ClientException catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'HTTP connection failed: $method $path', e, trace,); - } on Exception catch (e, trace) { - throw ApiException.withInner(HttpStatus.badRequest, 'Exception occurred: $method $path', e, trace,); + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); } - throw ApiException(HttpStatus.badRequest, 'Invalid HTTP operation: $method $path',); + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); } - dynamic _deserialize(dynamic value, String targetType, {bool growable}) { + Future deserializeAsync(String json, String targetType, {bool growable = false,}) async => + // ignore: deprecated_member_use_from_same_package + deserialize(json, targetType, growable: growable); + + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') + dynamic deserialize(String json, String targetType, {bool growable = false,}) { + // Remove all spaces. Necessary for regular expressions as well. + 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); + } + + // 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.') + String serialize(Object? value) => value == null ? '' : json.encode(value); + + /// Update query and header parameters based on authentication settings. + void _updateParamsForAuth( + List queryParams, + Map headerParams, + ) { + if (authentication != null) { + authentication!.applyToParams(queryParams, headerParams); + } + } + + static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { try { switch (targetType) { case 'String': - return '$value'; + return value is String ? value : value.toString(); case 'int': return value is int ? value : int.parse('$value'); + case 'double': + return value is double ? value : double.parse('$value'); case 'bool': if (value is bool) { return value; } final valueString = '$value'.toLowerCase(); return valueString == 'true' || valueString == '1'; - break; - case 'double': - return value is double ? value : double.parse('$value'); case 'ArticleDTO': return ArticleDTO.fromJson(value); case 'ConfigurationDTO': @@ -188,7 +222,6 @@ class ApiClient { return MapDTO.fromJson(value); case 'MapTypeApp': return MapTypeAppTypeTransformer().decode(value); - case 'MenuDTO': return MenuDTO.fromJson(value); case 'PlayerMessageDTO': @@ -197,18 +230,18 @@ class ApiClient { return QuestionDTO.fromJson(value); case 'QuizzDTO': return QuizzDTO.fromJson(value); + case 'QuizzDTOBadLevel': + return QuizzDTOBadLevel.fromJson(value); case 'ResourceDTO': return ResourceDTO.fromJson(value); case 'ResourceType': return ResourceTypeTypeTransformer().decode(value); - case 'ResponseDTO': return ResponseDTO.fromJson(value); case 'SectionDTO': return SectionDTO.fromJson(value); case 'SectionType': return SectionTypeTypeTransformer().decode(value); - case 'SliderDTO': return SliderDTO.fromJson(value); case 'TokenDTO': @@ -224,58 +257,63 @@ class ApiClient { case 'WebDTO': return WebDTO.fromJson(value); default: - Match match; - if (value is List && (match = _regList.firstMatch(targetType)) != null) { - final newTargetType = match[1]; + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { return value - .map((v) => _deserialize(v, newTargetType, growable: growable)) - .toList(growable: true == growable); + .map((dynamic v) => _deserialize(v, match, growable: growable,)) + .toList(growable: growable); } - if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { - final newTargetType = match[1]; + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { return value - .map((v) => _deserialize(v, newTargetType, growable: growable)) + .map((dynamic v) => _deserialize(v, match, growable: growable,)) .toSet(); } - if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { - final newTargetType = match[1]; - return Map.fromIterables( - value.keys, - value.values.map((v) => _deserialize(v, newTargetType, growable: growable)), + 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,)), ); } - break; } - } on Exception catch (e, stack) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', e, stack,); + } on Exception catch (error, trace) { + throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); } throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); } - - dynamic deserialize(String json, String targetType, {bool growable}) { - // Remove all spaces. Necessary for reg expressions as well. - targetType = targetType.replaceAll(' ', ''); - - return targetType == 'String' - ? json - : _deserialize(jsonDecode(json), targetType, growable: true == growable); - } - - String serialize(Object obj) => obj == null ? '' : json.encode(obj); - - /// Update query and header parameters based on authentication settings. - /// @param authNames The authentications to apply - void _updateParamsForAuth( - List authNames, - List queryParams, - Map headerParams, - ) { - authNames.forEach((authName) { - final auth = _authentications[authName]; - if (auth == null) { - throw ArgumentError('Authentication undefined: $authName'); - } - auth.applyToParams(queryParams, headerParams); - }); - } } + +/// Primarily intended for use in an isolate. +class DeserializationMessage { + const DeserializationMessage({ + required this.json, + required this.targetType, + this.growable = false, + }); + + /// The JSON value to deserialize. + final String json; + + /// Target type to deserialize to. + final String targetType; + + /// Whether to make deserialized lists or maps growable. + final bool growable; +} + +/// Primarily intended for use in an isolate. +Future deserializeAsync(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 + : ApiClient._deserialize( + jsonDecode(message.json), + targetType, + growable: message.growable, + ); +} + +/// Primarily intended for use in an isolate. +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 82% rename from manager_api/lib/api_exception.dart rename to manager_api_new/lib/api_exception.dart index 1537c97..796f7f7 100644 --- a/manager_api/lib/api_exception.dart +++ b/manager_api_new/lib/api_exception.dart @@ -1,10 +1,11 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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; @@ -15,10 +16,11 @@ class ApiException implements Exception { ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); int code = 0; - String message; - Exception innerException; - StackTrace stackTrace; + String? message; + Exception? innerException; + StackTrace? stackTrace; + @override String toString() { if (message == null) { return 'ApiException'; diff --git a/manager_api_new/lib/api_helper.dart b/manager_api_new/lib/api_helper.dart new file mode 100644 index 0000000..fbfe3c5 --- /dev/null +++ b/manager_api_new/lib/api_helper.dart @@ -0,0 +1,110 @@ +// +// 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 QueryParam { + const QueryParam(this.name, this.value); + + final String name; + final String value; + + @override + String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; +} + +// Ported from the Java version. +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + + final params = []; + + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } + + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } + + final delimiter = _delimiters[collectionFormat] ?? ','; + + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); + } + + return params; +} + +/// Format the given parameter object into a [String]. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } + if (value is DateTime) { + return value.toUtc().toIso8601String(); + } + if (value is MapTypeApp) { + return MapTypeAppTypeTransformer().encode(value).toString(); + } + if (value is ResourceType) { + return ResourceTypeTypeTransformer().encode(value).toString(); + } + if (value is SectionType) { + return SectionTypeTypeTransformer().encode(value).toString(); + } + return value.toString(); +} + +/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' +/// 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; +} + +/// Returns a valid [T] value found at the specified Map [key], null otherwise. +T? mapValueOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + return value is T ? value : null; +} + +/// Returns a valid Map found at the specified Map [key], null otherwise. +Map? mapCastOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + return value is Map ? value.cast() : null; +} + +/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { + final dynamic value = map is Map ? map[key] : null; + if (value != null) { + int? millis; + if (value is int) { + millis = value; + } else if (value is String) { + if (pattern == _dateEpochMarker) { + millis = int.tryParse(value); + } else { + return DateTime.tryParse(value); + } + } + if (millis != null) { + return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); + } + } + return null; +} diff --git a/manager_api_new/lib/auth/api_key_auth.dart b/manager_api_new/lib/auth/api_key_auth.dart new file mode 100644 index 0000000..e304eda --- /dev/null +++ b/manager_api_new/lib/auth/api_key_auth.dart @@ -0,0 +1,40 @@ +// +// 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 ApiKeyAuth implements Authentication { + ApiKeyAuth(this.location, this.paramName); + + final String location; + final String paramName; + + String apiKeyPrefix = ''; + String apiKey = ''; + + @override + void applyToParams(List queryParams, Map headerParams) { + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; + + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } + } + } +} diff --git a/manager_api/lib/auth/authentication.dart b/manager_api_new/lib/auth/authentication.dart similarity index 81% rename from manager_api/lib/auth/authentication.dart rename to manager_api_new/lib/auth/authentication.dart index 5ca198d..49baf7c 100644 --- a/manager_api/lib/auth/authentication.dart +++ b/manager_api_new/lib/auth/authentication.dart @@ -1,14 +1,16 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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; +// ignore: one_member_abstracts abstract class Authentication { /// Apply authentication settings to header and query params. void 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 56% rename from manager_api/lib/auth/http_basic_auth.dart rename to manager_api_new/lib/auth/http_basic_auth.dart index 6dc36a1..81abd71 100644 --- a/manager_api/lib/auth/http_basic_auth.dart +++ b/manager_api_new/lib/auth/http_basic_auth.dart @@ -1,21 +1,26 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + String username; String password; @override void applyToParams(List queryParams, Map headerParams) { - final credentials = (username ?? '') + ':' + (password ?? ''); - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + 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 62% rename from manager_api/lib/auth/http_bearer_auth.dart rename to manager_api_new/lib/auth/http_bearer_auth.dart index a23b65f..213f348 100644 --- a/manager_api/lib/auth/http_bearer_auth.dart +++ b/manager_api_new/lib/auth/http_bearer_auth.dart @@ -1,10 +1,11 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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; @@ -20,19 +21,29 @@ class HttpBearerAuth implements Authentication { set accessToken(dynamic accessToken) { if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + throw ArgumentError('accessToken value must be either a String or a String Function().'); } - this._accessToken = accessToken; + _accessToken = accessToken; } @override void applyToParams(List queryParams, Map headerParams) { + if (_accessToken == null) { + return; + } + + String accessToken; + if (_accessToken is String) { - headerParams['Authorization'] = 'Bearer $_accessToken'; + accessToken = _accessToken; } else if (_accessToken is HttpBearerAuthProvider) { - headerParams['Authorization'] = 'Bearer ${_accessToken()}'; + accessToken = _accessToken!(); } else { - throw ArgumentError('Type of Bearer accessToken should be a String or a String Function().'); + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; } } } diff --git a/manager_api/lib/auth/oauth.dart b/manager_api_new/lib/auth/oauth.dart similarity index 78% rename from manager_api/lib/auth/oauth.dart rename to manager_api_new/lib/auth/oauth.dart index c0463ad..e9b87cf 100644 --- a/manager_api/lib/auth/oauth.dart +++ b/manager_api_new/lib/auth/oauth.dart @@ -1,22 +1,23 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 OAuth implements Authentication { - OAuth({this.accessToken}); + OAuth({this.accessToken = ''}); String accessToken; @override void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { + if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } } 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..5656ebc --- /dev/null +++ b/manager_api_new/lib/model/article_dto.dart @@ -0,0 +1,169 @@ +// +// 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.qrCode, + this.isContentTop, + this.audioIds = const [], + this.isReadAudioAuto, + this.images = const [], + }); + + List? content; + + String? qrCode; + + /// + /// Please note: 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? images; + + @override + bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && + other.content == content && + other.qrCode == qrCode && + other.isContentTop == isContentTop && + other.audioIds == audioIds && + other.isReadAudioAuto == isReadAudioAuto && + other.images == images; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (content == null ? 0 : content!.hashCode) + + (qrCode == null ? 0 : qrCode!.hashCode) + + (isContentTop == null ? 0 : isContentTop!.hashCode) + + (audioIds == null ? 0 : audioIds!.hashCode) + + (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + + (images == null ? 0 : images!.hashCode); + + @override + String toString() => 'ArticleDTO[content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]'; + + Map toJson() { + final _json = {}; + if (content != null) { + _json[r'content'] = content; + } + if (qrCode != null) { + _json[r'qrCode'] = qrCode; + } + if (isContentTop != null) { + _json[r'isContentTop'] = isContentTop; + } + if (audioIds != null) { + _json[r'audioIds'] = audioIds; + } + if (isReadAudioAuto != null) { + _json[r'isReadAudioAuto'] = isReadAudioAuto; + } + if (images != null) { + _json[r'images'] = images; + } + 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']) ?? const [], + qrCode: mapValueOfType(json, r'qrCode'), + isContentTop: mapValueOfType(json, r'isContentTop'), + audioIds: TranslationDTO.listFromJson(json[r'audioIds']) ?? const [], + isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), + images: ImageDTO.listFromJson(json[r'images']) ?? const [], + ); + } + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArticleDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/configuration_dto.dart b/manager_api_new/lib/model/configuration_dto.dart new file mode 100644 index 0000000..5b29c23 --- /dev/null +++ b/manager_api_new/lib/model/configuration_dto.dart @@ -0,0 +1,246 @@ +// +// 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 ConfigurationDTO { + /// Returns a new [ConfigurationDTO] instance. + ConfigurationDTO({ + this.id, + this.label, + this.title = const [], + this.imageId, + this.imageSource, + this.primaryColor, + this.secondaryColor, + this.languages = const [], + this.dateCreation, + this.isMobile, + this.isTablet, + this.isOffline, + this.instanceId, + }); + + String? id; + + String? label; + + List? title; + + String? imageId; + + String? imageSource; + + String? primaryColor; + + String? secondaryColor; + + List? languages; + + /// + /// Please note: 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? isMobile; + + /// + /// Please note: 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? isTablet; + + /// + /// Please note: 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? isOffline; + + String? instanceId; + + @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; + + @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); + + @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]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (label != null) { + _json[r'label'] = label; + } + if (title != null) { + _json[r'title'] = title; + } + if (imageId != null) { + _json[r'imageId'] = imageId; + } + if (imageSource != null) { + _json[r'imageSource'] = imageSource; + } + if (primaryColor != null) { + _json[r'primaryColor'] = primaryColor; + } + if (secondaryColor != null) { + _json[r'secondaryColor'] = secondaryColor; + } + if (languages != null) { + _json[r'languages'] = languages; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (isMobile != null) { + _json[r'isMobile'] = isMobile; + } + if (isTablet != null) { + _json[r'isTablet'] = isTablet; + } + if (isOffline != null) { + _json[r'isOffline'] = isOffline; + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [ConfigurationDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ConfigurationDTO? 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 "ConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ConfigurationDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ConfigurationDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + imageId: mapValueOfType(json, r'imageId'), + 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() + : const [], + dateCreation: mapDateTime(json, r'dateCreation', ''), + isMobile: mapValueOfType(json, r'isMobile'), + isTablet: mapValueOfType(json, r'isTablet'), + isOffline: mapValueOfType(json, r'isOffline'), + 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 = ConfigurationDTO.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 = ConfigurationDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ConfigurationDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ConfigurationDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/device_detail_dto.dart b/manager_api_new/lib/model/device_detail_dto.dart new file mode 100644 index 0000000..88ec18f --- /dev/null +++ b/manager_api_new/lib/model/device_detail_dto.dart @@ -0,0 +1,268 @@ +// +// 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 DeviceDetailDTO { + /// Returns a new [DeviceDetailDTO] instance. + DeviceDetailDTO({ + this.id, + this.identifier, + this.name, + this.ipAddressWLAN, + this.ipAddressETH, + this.configurationId, + this.configuration, + this.connected, + this.dateCreation, + this.dateUpdate, + this.instanceId, + this.connectionLevel, + this.lastConnectionLevel, + this.batteryLevel, + this.lastBatteryLevel, + }); + + String? id; + + String? identifier; + + String? name; + + String? ipAddressWLAN; + + String? ipAddressETH; + + String? configurationId; + + String? configuration; + + /// + /// Please note: 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? 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; + + String? connectionLevel; + + /// + /// Please note: 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? lastConnectionLevel; + + String? batteryLevel; + + /// + /// Please note: 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? 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; + + @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); + + @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]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (identifier != null) { + _json[r'identifier'] = identifier; + } + if (name != null) { + _json[r'name'] = name; + } + if (ipAddressWLAN != null) { + _json[r'ipAddressWLAN'] = ipAddressWLAN; + } + if (ipAddressETH != null) { + _json[r'ipAddressETH'] = ipAddressETH; + } + if (configurationId != null) { + _json[r'configurationId'] = configurationId; + } + if (configuration != null) { + _json[r'configuration'] = configuration; + } + if (connected != null) { + _json[r'connected'] = connected; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (dateUpdate != null) { + _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + if (connectionLevel != null) { + _json[r'connectionLevel'] = connectionLevel; + } + if (lastConnectionLevel != null) { + _json[r'lastConnectionLevel'] = lastConnectionLevel!.toUtc().toIso8601String(); + } + if (batteryLevel != null) { + _json[r'batteryLevel'] = batteryLevel; + } + if (lastBatteryLevel != null) { + _json[r'lastBatteryLevel'] = lastBatteryLevel!.toUtc().toIso8601String(); + } + return _json; + } + + /// Returns a new [DeviceDetailDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DeviceDetailDTO? 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 "DeviceDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DeviceDetailDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DeviceDetailDTO( + id: mapValueOfType(json, r'id'), + identifier: mapValueOfType(json, r'identifier'), + name: mapValueOfType(json, r'name'), + ipAddressWLAN: mapValueOfType(json, r'ipAddressWLAN'), + ipAddressETH: mapValueOfType(json, r'ipAddressETH'), + 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', ''), + instanceId: mapValueOfType(json, r'instanceId'), + connectionLevel: mapValueOfType(json, r'connectionLevel'), + lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''), + batteryLevel: mapValueOfType(json, r'batteryLevel'), + lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', ''), + ); + } + 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 = DeviceDetailDTO.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 = DeviceDetailDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DeviceDetailDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeviceDetailDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/device_detail_dto_all_of.dart b/manager_api_new/lib/model/device_detail_dto_all_of.dart new file mode 100644 index 0000000..cc7cfb6 --- /dev/null +++ b/manager_api_new/lib/model/device_detail_dto_all_of.dart @@ -0,0 +1,151 @@ +// +// 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 DeviceDetailDTOAllOf { + /// Returns a new [DeviceDetailDTOAllOf] instance. + DeviceDetailDTOAllOf({ + this.connectionLevel, + this.lastConnectionLevel, + this.batteryLevel, + this.lastBatteryLevel, + }); + + String? connectionLevel; + + /// + /// Please note: 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? lastConnectionLevel; + + String? batteryLevel; + + /// + /// Please note: 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? lastBatteryLevel; + + @override + 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); + + @override + String toString() => 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; + + Map toJson() { + final _json = {}; + if (connectionLevel != null) { + _json[r'connectionLevel'] = connectionLevel; + } + if (lastConnectionLevel != null) { + _json[r'lastConnectionLevel'] = lastConnectionLevel!.toUtc().toIso8601String(); + } + if (batteryLevel != null) { + _json[r'batteryLevel'] = batteryLevel; + } + if (lastBatteryLevel != null) { + _json[r'lastBatteryLevel'] = lastBatteryLevel!.toUtc().toIso8601String(); + } + return _json; + } + + /// Returns a new [DeviceDetailDTOAllOf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DeviceDetailDTOAllOf? 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 "DeviceDetailDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DeviceDetailDTOAllOf( + connectionLevel: mapValueOfType(json, r'connectionLevel'), + lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''), + batteryLevel: mapValueOfType(json, r'batteryLevel'), + lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', ''), + ); + } + 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 = DeviceDetailDTOAllOf.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 = DeviceDetailDTOAllOf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeviceDetailDTOAllOf.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/device_dto.dart b/manager_api_new/lib/model/device_dto.dart new file mode 100644 index 0000000..7915fb8 --- /dev/null +++ b/manager_api_new/lib/model/device_dto.dart @@ -0,0 +1,220 @@ +// +// 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 DeviceDTO { + /// Returns a new [DeviceDTO] instance. + DeviceDTO({ + this.id, + this.identifier, + this.name, + this.ipAddressWLAN, + this.ipAddressETH, + this.configurationId, + this.configuration, + this.connected, + this.dateCreation, + this.dateUpdate, + this.instanceId, + }); + + String? id; + + String? identifier; + + String? name; + + String? ipAddressWLAN; + + String? ipAddressETH; + + String? configurationId; + + String? configuration; + + /// + /// Please note: 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? 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; + + @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); + + @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]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (identifier != null) { + _json[r'identifier'] = identifier; + } + if (name != null) { + _json[r'name'] = name; + } + if (ipAddressWLAN != null) { + _json[r'ipAddressWLAN'] = ipAddressWLAN; + } + if (ipAddressETH != null) { + _json[r'ipAddressETH'] = ipAddressETH; + } + if (configurationId != null) { + _json[r'configurationId'] = configurationId; + } + if (configuration != null) { + _json[r'configuration'] = configuration; + } + if (connected != null) { + _json[r'connected'] = connected; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (dateUpdate != null) { + _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [DeviceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DeviceDTO? 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 "DeviceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DeviceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DeviceDTO( + id: mapValueOfType(json, r'id'), + identifier: mapValueOfType(json, r'identifier'), + name: mapValueOfType(json, r'name'), + ipAddressWLAN: mapValueOfType(json, r'ipAddressWLAN'), + ipAddressETH: mapValueOfType(json, r'ipAddressETH'), + 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', ''), + 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 = DeviceDTO.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 = DeviceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DeviceDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeviceDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/export_configuration_dto.dart b/manager_api_new/lib/model/export_configuration_dto.dart new file mode 100644 index 0000000..ac75edc --- /dev/null +++ b/manager_api_new/lib/model/export_configuration_dto.dart @@ -0,0 +1,264 @@ +// +// 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 ExportConfigurationDTO { + /// Returns a new [ExportConfigurationDTO] instance. + ExportConfigurationDTO({ + this.id, + this.label, + this.title = const [], + this.imageId, + this.imageSource, + this.primaryColor, + this.secondaryColor, + this.languages = const [], + this.dateCreation, + this.isMobile, + this.isTablet, + this.isOffline, + this.instanceId, + this.sections = const [], + this.resources = const [], + }); + + String? id; + + String? label; + + List? title; + + String? imageId; + + String? imageSource; + + String? primaryColor; + + String? secondaryColor; + + List? languages; + + /// + /// Please note: 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? isMobile; + + /// + /// Please note: 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? isTablet; + + /// + /// Please note: 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? isOffline; + + String? instanceId; + + List? sections; + + 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.sections == sections && + 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) + + (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, sections=$sections, resources=$resources]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (label != null) { + _json[r'label'] = label; + } + if (title != null) { + _json[r'title'] = title; + } + if (imageId != null) { + _json[r'imageId'] = imageId; + } + if (imageSource != null) { + _json[r'imageSource'] = imageSource; + } + if (primaryColor != null) { + _json[r'primaryColor'] = primaryColor; + } + if (secondaryColor != null) { + _json[r'secondaryColor'] = secondaryColor; + } + if (languages != null) { + _json[r'languages'] = languages; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (isMobile != null) { + _json[r'isMobile'] = isMobile; + } + if (isTablet != null) { + _json[r'isTablet'] = isTablet; + } + if (isOffline != null) { + _json[r'isOffline'] = isOffline; + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + if (sections != null) { + _json[r'sections'] = sections; + } + if (resources != null) { + _json[r'resources'] = resources; + } + return _json; + } + + /// Returns a new [ExportConfigurationDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ExportConfigurationDTO? 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 "ExportConfigurationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ExportConfigurationDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ExportConfigurationDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + imageId: mapValueOfType(json, r'imageId'), + 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() + : const [], + dateCreation: mapDateTime(json, r'dateCreation', ''), + isMobile: mapValueOfType(json, r'isMobile'), + isTablet: mapValueOfType(json, r'isTablet'), + isOffline: mapValueOfType(json, r'isOffline'), + instanceId: mapValueOfType(json, r'instanceId'), + sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], + resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [], + ); + } + 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 = ExportConfigurationDTO.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 = ExportConfigurationDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ExportConfigurationDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ExportConfigurationDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/export_configuration_dto_all_of.dart b/manager_api_new/lib/model/export_configuration_dto_all_of.dart new file mode 100644 index 0000000..28c86a7 --- /dev/null +++ b/manager_api_new/lib/model/export_configuration_dto_all_of.dart @@ -0,0 +1,121 @@ +// +// 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 ExportConfigurationDTOAllOf { + /// Returns a new [ExportConfigurationDTOAllOf] instance. + ExportConfigurationDTOAllOf({ + this.sections = const [], + this.resources = const [], + }); + + List? sections; + + List? resources; + + @override + 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); + + @override + String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; + + Map toJson() { + final _json = {}; + if (sections != null) { + _json[r'sections'] = sections; + } + if (resources != null) { + _json[r'resources'] = resources; + } + return _json; + } + + /// Returns a new [ExportConfigurationDTOAllOf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ExportConfigurationDTOAllOf? 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 "ExportConfigurationDTOAllOf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ExportConfigurationDTOAllOf( + sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], + resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [], + ); + } + 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 = ExportConfigurationDTOAllOf.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 = ExportConfigurationDTOAllOf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ExportConfigurationDTOAllOf.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/geo_point_dto.dart b/manager_api_new/lib/model/geo_point_dto.dart new file mode 100644 index 0000000..28600c5 --- /dev/null +++ b/manager_api_new/lib/model/geo_point_dto.dart @@ -0,0 +1,163 @@ +// +// 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 GeoPointDTO { + /// Returns a new [GeoPointDTO] instance. + GeoPointDTO({ + this.id, + this.title = const [], + this.description = const [], + this.images = 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? id; + + List? title; + + List? description; + + List? images; + + String? latitude; + + String? longitude; + + @override + bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO && + other.id == id && + other.title == title && + other.description == description && + other.images == images && + other.latitude == latitude && + other.longitude == longitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (images == null ? 0 : images!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode); + + @override + String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (title != null) { + _json[r'title'] = title; + } + if (description != null) { + _json[r'description'] = description; + } + if (images != null) { + _json[r'images'] = images; + } + if (latitude != null) { + _json[r'latitude'] = latitude; + } + if (longitude != null) { + _json[r'longitude'] = longitude; + } + return _json; + } + + /// Returns a new [GeoPointDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPointDTO? 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 "GeoPointDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GeoPointDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPointDTO( + id: mapValueOfType(json, r'id'), + title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + description: TranslationDTO.listFromJson(json[r'description']) ?? const [], + images: ImageGeoPoint.listFromJson(json[r'images']) ?? const [], + 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 = GeoPointDTO.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 = GeoPointDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPointDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPointDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/image_dto.dart b/manager_api_new/lib/model/image_dto.dart new file mode 100644 index 0000000..b72c787 --- /dev/null +++ b/manager_api_new/lib/model/image_dto.dart @@ -0,0 +1,154 @@ +// +// 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 ImageDTO { + /// Returns a new [ImageDTO] instance. + ImageDTO({ + this.title = const [], + this.description = const [], + this.resourceId, + this.source_, + this.order, + }); + + List? title; + + List? description; + + String? resourceId; + + String? source_; + + /// + /// Please note: 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 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); + + @override + String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; + + Map toJson() { + final _json = {}; + if (title != null) { + _json[r'title'] = title; + } + if (description != null) { + _json[r'description'] = description; + } + if (resourceId != null) { + _json[r'resourceId'] = resourceId; + } + if (source_ != null) { + _json[r'source'] = source_; + } + if (order != null) { + _json[r'order'] = order; + } + return _json; + } + + /// Returns a new [ImageDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ImageDTO? 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 "ImageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ImageDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ImageDTO( + title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + description: TranslationDTO.listFromJson(json[r'description']) ?? const [], + resourceId: mapValueOfType(json, r'resourceId'), + source_: mapValueOfType(json, r'source'), + 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 = ImageDTO.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 = ImageDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ImageDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ImageDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/image_geo_point.dart b/manager_api_new/lib/model/image_geo_point.dart new file mode 100644 index 0000000..8291c85 --- /dev/null +++ b/manager_api_new/lib/model/image_geo_point.dart @@ -0,0 +1,121 @@ +// +// 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 ImageGeoPoint { + /// Returns a new [ImageGeoPoint] instance. + ImageGeoPoint({ + this.imageResourceId, + this.imageSource, + }); + + String? imageResourceId; + + String? imageSource; + + @override + 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); + + @override + String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; + + Map toJson() { + final _json = {}; + if (imageResourceId != null) { + _json[r'imageResourceId'] = imageResourceId; + } + if (imageSource != null) { + _json[r'imageSource'] = imageSource; + } + return _json; + } + + /// Returns a new [ImageGeoPoint] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ImageGeoPoint? 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 "ImageGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ImageGeoPoint[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ImageGeoPoint( + imageResourceId: mapValueOfType(json, r'imageResourceId'), + imageSource: mapValueOfType(json, r'imageSource'), + ); + } + 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 = ImageGeoPoint.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 = ImageGeoPoint.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ImageGeoPoint-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ImageGeoPoint.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/instance.dart b/manager_api_new/lib/model/instance.dart new file mode 100644 index 0000000..74e7ca8 --- /dev/null +++ b/manager_api_new/lib/model/instance.dart @@ -0,0 +1,136 @@ +// +// 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 Instance { + /// Returns a new [Instance] instance. + Instance({ + this.id, + this.name, + this.dateCreation, + }); + + String? id; + + 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; + + @override + bool operator ==(Object other) => identical(this, other) || other is Instance && + other.id == id && + other.name == name && + other.dateCreation == dateCreation; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode); + + @override + String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (name != null) { + _json[r'name'] = name; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + return _json; + } + + /// Returns a new [Instance] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Instance? 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 "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', ''), + ); + } + 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 = Instance.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 = Instance.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Instance-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Instance.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/instance_dto.dart b/manager_api_new/lib/model/instance_dto.dart new file mode 100644 index 0000000..a1d77a7 --- /dev/null +++ b/manager_api_new/lib/model/instance_dto.dart @@ -0,0 +1,136 @@ +// +// 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 InstanceDTO { + /// Returns a new [InstanceDTO] instance. + InstanceDTO({ + this.id, + this.name, + this.dateCreation, + }); + + String? id; + + 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; + + @override + bool operator ==(Object other) => identical(this, other) || other is InstanceDTO && + other.id == id && + other.name == name && + other.dateCreation == dateCreation; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode); + + @override + String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (name != null) { + _json[r'name'] = name; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + return _json; + } + + /// Returns a new [InstanceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static InstanceDTO? 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 "InstanceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "InstanceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return InstanceDTO( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + dateCreation: mapDateTime(json, r'dateCreation', ''), + ); + } + 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 = InstanceDTO.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 = InstanceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of InstanceDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = InstanceDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/level_dto.dart b/manager_api_new/lib/model/level_dto.dart new file mode 100644 index 0000000..58cfe04 --- /dev/null +++ b/manager_api_new/lib/model/level_dto.dart @@ -0,0 +1,130 @@ +// +// 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 LevelDTO { + /// Returns a new [LevelDTO] instance. + LevelDTO({ + this.label = const [], + this.resourceId, + this.source_, + }); + + List? label; + + String? resourceId; + + String? source_; + + @override + bool operator ==(Object other) => identical(this, other) || other is LevelDTO && + other.label == label && + other.resourceId == resourceId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]'; + + Map toJson() { + final _json = {}; + if (label != null) { + _json[r'label'] = label; + } + if (resourceId != null) { + _json[r'resourceId'] = resourceId; + } + if (source_ != null) { + _json[r'source'] = source_; + } + return _json; + } + + /// Returns a new [LevelDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static LevelDTO? 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 "LevelDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "LevelDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return LevelDTO( + label: TranslationDTO.listFromJson(json[r'label']) ?? const [], + resourceId: mapValueOfType(json, r'resourceId'), + 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 = LevelDTO.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 = LevelDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of LevelDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = LevelDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/login_dto.dart b/manager_api_new/lib/model/login_dto.dart new file mode 100644 index 0000000..e5543ec --- /dev/null +++ b/manager_api_new/lib/model/login_dto.dart @@ -0,0 +1,121 @@ +// +// 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 LoginDTO { + /// Returns a new [LoginDTO] instance. + LoginDTO({ + this.email, + this.password, + }); + + String? email; + + String? password; + + @override + 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); + + @override + String toString() => 'LoginDTO[email=$email, password=$password]'; + + Map toJson() { + final _json = {}; + if (email != null) { + _json[r'email'] = email; + } + if (password != null) { + _json[r'password'] = password; + } + return _json; + } + + /// Returns a new [LoginDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static LoginDTO? 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 "LoginDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "LoginDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return LoginDTO( + email: mapValueOfType(json, r'email'), + password: mapValueOfType(json, r'password'), + ); + } + 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 = LoginDTO.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 = LoginDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of LoginDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = LoginDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/map_dto.dart b/manager_api_new/lib/model/map_dto.dart new file mode 100644 index 0000000..8a283e6 --- /dev/null +++ b/manager_api_new/lib/model/map_dto.dart @@ -0,0 +1,160 @@ +// +// 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.points = const [], + this.iconResourceId, + this.iconSource, + }); + + /// + /// Please note: 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; + + /// + /// Please note: 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. + /// + MapTypeApp? mapType; + + List? points; + + String? iconResourceId; + + String? iconSource; + + @override + bool operator ==(Object other) => identical(this, other) || other is MapDTO && + other.zoom == zoom && + other.mapType == mapType && + other.points == points && + other.iconResourceId == iconResourceId && + other.iconSource == iconSource; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (zoom == null ? 0 : zoom!.hashCode) + + (mapType == null ? 0 : mapType!.hashCode) + + (points == null ? 0 : points!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconSource == null ? 0 : iconSource!.hashCode); + + @override + String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]'; + + Map toJson() { + final _json = {}; + if (zoom != null) { + _json[r'zoom'] = zoom; + } + if (mapType != null) { + _json[r'mapType'] = mapType; + } + if (points != null) { + _json[r'points'] = points; + } + if (iconResourceId != null) { + _json[r'iconResourceId'] = iconResourceId; + } + if (iconSource != null) { + _json[r'iconSource'] = iconSource; + } + 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']), + points: GeoPointDTO.listFromJson(json[r'points']) ?? const [], + iconResourceId: mapValueOfType(json, r'iconResourceId'), + iconSource: mapValueOfType(json, r'iconSource'), + ); + } + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/lib/model/map_type_app.dart b/manager_api_new/lib/model/map_type_app.dart new file mode 100644 index 0000000..803ece4 --- /dev/null +++ b/manager_api_new/lib/model/map_type_app.dart @@ -0,0 +1,94 @@ +// +// 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; + +/// 0 = none 1 = normal 2 = satellite 3 = terrain 4 = hybrid +class MapTypeApp { + /// Instantiate a new enum with the provided [value]. + const MapTypeApp._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + 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); + + /// List of all possible values in this [enum][MapTypeApp]. + static const values = [ + none, + normal, + satellite, + terrain, + hybrid, + ]; + + static MapTypeApp? fromJson(dynamic value) => MapTypeAppTypeTransformer().decode(value); + + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTypeApp.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// 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._(); + + const MapTypeAppTypeTransformer._(); + + int encode(MapTypeApp data) => data.value; + + /// Decodes a [dynamic value][data] to a MapTypeApp. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// 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) { + case "none": return MapTypeApp.none; + case "normal": return MapTypeApp.normal; + case "satellite": return MapTypeApp.satellite; + case "terrain": return MapTypeApp.terrain; + case "hybrid": return MapTypeApp.hybrid; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [MapTypeAppTypeTransformer] instance. + static MapTypeAppTypeTransformer? _instance; +} + diff --git a/manager_api_new/lib/model/menu_dto.dart b/manager_api_new/lib/model/menu_dto.dart new file mode 100644 index 0000000..feb29a8 --- /dev/null +++ b/manager_api_new/lib/model/menu_dto.dart @@ -0,0 +1,112 @@ +// +// 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 MenuDTO { + /// Returns a new [MenuDTO] instance. + MenuDTO({ + this.sections = const [], + }); + + List? sections; + + @override + bool operator ==(Object other) => identical(this, other) || other is MenuDTO && + other.sections == sections; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (sections == null ? 0 : sections!.hashCode); + + @override + String toString() => 'MenuDTO[sections=$sections]'; + + Map toJson() { + final _json = {}; + if (sections != null) { + _json[r'sections'] = sections; + } + 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( + sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], + ); + } + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MenuDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/player_message_dto.dart b/manager_api_new/lib/model/player_message_dto.dart new file mode 100644 index 0000000..c51ce09 --- /dev/null +++ b/manager_api_new/lib/model/player_message_dto.dart @@ -0,0 +1,133 @@ +// +// 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 PlayerMessageDTO { + /// Returns a new [PlayerMessageDTO] instance. + PlayerMessageDTO({ + this.configChanged, + this.isDeleted, + }); + + /// + /// Please note: 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? configChanged; + + /// + /// Please note: 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? isDeleted; + + @override + 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); + + @override + String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; + + Map toJson() { + final _json = {}; + if (configChanged != null) { + _json[r'configChanged'] = configChanged; + } + if (isDeleted != null) { + _json[r'isDeleted'] = isDeleted; + } + return _json; + } + + /// Returns a new [PlayerMessageDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PlayerMessageDTO? 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 "PlayerMessageDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PlayerMessageDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PlayerMessageDTO( + configChanged: mapValueOfType(json, r'configChanged'), + isDeleted: mapValueOfType(json, r'isDeleted'), + ); + } + 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 = PlayerMessageDTO.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 = PlayerMessageDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PlayerMessageDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PlayerMessageDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/question_dto.dart b/manager_api_new/lib/model/question_dto.dart new file mode 100644 index 0000000..0e7f86b --- /dev/null +++ b/manager_api_new/lib/model/question_dto.dart @@ -0,0 +1,154 @@ +// +// 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 QuestionDTO { + /// Returns a new [QuestionDTO] instance. + QuestionDTO({ + this.label = const [], + this.responses = const [], + this.resourceId, + this.source_, + this.order, + }); + + List? label; + + List? responses; + + String? resourceId; + + String? source_; + + /// + /// Please note: 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 QuestionDTO && + other.label == label && + other.responses == responses && + other.resourceId == resourceId && + other.source_ == source_ && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode) + + (responses == null ? 0 : responses!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]'; + + Map toJson() { + final _json = {}; + if (label != null) { + _json[r'label'] = label; + } + if (responses != null) { + _json[r'responses'] = responses; + } + if (resourceId != null) { + _json[r'resourceId'] = resourceId; + } + if (source_ != null) { + _json[r'source'] = source_; + } + if (order != null) { + _json[r'order'] = order; + } + return _json; + } + + /// Returns a new [QuestionDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuestionDTO? 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 "QuestionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QuestionDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuestionDTO( + label: TranslationDTO.listFromJson(json[r'label']) ?? const [], + responses: ResponseDTO.listFromJson(json[r'responses']) ?? const [], + resourceId: mapValueOfType(json, r'resourceId'), + source_: mapValueOfType(json, r'source'), + 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 = QuestionDTO.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 = QuestionDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuestionDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuestionDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/quizz_dto.dart b/manager_api_new/lib/model/quizz_dto.dart new file mode 100644 index 0000000..e9e8ded --- /dev/null +++ b/manager_api_new/lib/model/quizz_dto.dart @@ -0,0 +1,148 @@ +// +// 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 QuizzDTO { + /// Returns a new [QuizzDTO] instance. + QuizzDTO({ + this.questions = const [], + this.badLevel, + this.mediumLevel, + this.goodLevel, + this.greatLevel, + }); + + List? questions; + + LevelDTO? badLevel; + + LevelDTO? mediumLevel; + + LevelDTO? goodLevel; + + 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; + + @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); + + @override + String toString() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; + + Map toJson() { + final _json = {}; + if (questions != null) { + _json[r'questions'] = questions; + } + if (badLevel != null) { + _json[r'bad_level'] = badLevel; + } + if (mediumLevel != null) { + _json[r'medium_level'] = mediumLevel; + } + if (goodLevel != null) { + _json[r'good_level'] = goodLevel; + } + if (greatLevel != null) { + _json[r'great_level'] = greatLevel; + } + return _json; + } + + /// Returns a new [QuizzDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizzDTO? 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 "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']) ?? const [], + badLevel: LevelDTO.fromJson(json[r'bad_level']), + mediumLevel: LevelDTO.fromJson(json[r'medium_level']), + goodLevel: LevelDTO.fromJson(json[r'good_level']), + greatLevel: LevelDTO.fromJson(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 = QuizzDTO.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 = QuizzDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizzDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizzDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/quizz_dto_bad_level.dart b/manager_api_new/lib/model/quizz_dto_bad_level.dart new file mode 100644 index 0000000..f18f478 --- /dev/null +++ b/manager_api_new/lib/model/quizz_dto_bad_level.dart @@ -0,0 +1,130 @@ +// +// 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 QuizzDTOBadLevel { + /// Returns a new [QuizzDTOBadLevel] instance. + QuizzDTOBadLevel({ + this.label = const [], + this.resourceId, + this.source_, + }); + + List? label; + + String? resourceId; + + String? source_; + + @override + bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel && + other.label == label && + other.resourceId == resourceId && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (label == null ? 0 : label!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, source_=$source_]'; + + Map toJson() { + final _json = {}; + if (label != null) { + _json[r'label'] = label; + } + if (resourceId != null) { + _json[r'resourceId'] = resourceId; + } + if (source_ != null) { + _json[r'source'] = source_; + } + return _json; + } + + /// Returns a new [QuizzDTOBadLevel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuizzDTOBadLevel? 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 "QuizzDTOBadLevel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuizzDTOBadLevel( + label: TranslationDTO.listFromJson(json[r'label']) ?? const [], + resourceId: mapValueOfType(json, r'resourceId'), + 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 = QuizzDTOBadLevel.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 = QuizzDTOBadLevel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuizzDTOBadLevel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuizzDTOBadLevel.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/resource_dto.dart b/manager_api_new/lib/model/resource_dto.dart new file mode 100644 index 0000000..72a3f52 --- /dev/null +++ b/manager_api_new/lib/model/resource_dto.dart @@ -0,0 +1,169 @@ +// +// 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 ResourceDTO { + /// Returns a new [ResourceDTO] instance. + ResourceDTO({ + this.id, + this.type, + this.label, + this.data, + 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? 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 + /// 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 ResourceDTO && + other.id == id && + other.type == type && + other.label == label && + other.data == data && + 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) + + (data == null ? 0 : data!.hashCode) + + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (instanceId == null ? 0 : instanceId!.hashCode); + + @override + String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, data=$data, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (type != null) { + _json[r'type'] = type; + } + if (label != null) { + _json[r'label'] = label; + } + if (data != null) { + _json[r'data'] = data; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [ResourceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ResourceDTO? 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 "ResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ResourceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ResourceDTO( + id: mapValueOfType(json, r'id'), + type: ResourceType.fromJson(json[r'type']), + label: mapValueOfType(json, r'label'), + data: mapValueOfType(json, r'data'), + dateCreation: mapDateTime(json, r'dateCreation', ''), + 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 = ResourceDTO.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 = ResourceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ResourceDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ResourceDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/resource_type.dart b/manager_api_new/lib/model/resource_type.dart new file mode 100644 index 0000000..a6bb08b --- /dev/null +++ b/manager_api_new/lib/model/resource_type.dart @@ -0,0 +1,94 @@ +// +// 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; + +/// 0 = Image 1 = Video 2 = ImageUrl 3 = VideoUrl +class ResourceType { + /// Instantiate a new enum with the provided [value]. + const ResourceType._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const Image = ResourceType._(0); + static const Video = ResourceType._(1); + static const ImageUrl = ResourceType._(2); + static const VideoUrl = ResourceType._(3); + static const Audio = ResourceType._(4); + + /// List of all possible values in this [enum][ResourceType]. + static const values = [ + Image, + Video, + ImageUrl, + VideoUrl, + Audio + ]; + + static ResourceType? fromJson(dynamic value) => ResourceTypeTypeTransformer().decode(value); + + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ResourceType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ResourceType] to int, +/// and [decode] dynamic data back to [ResourceType]. +class ResourceTypeTypeTransformer { + factory ResourceTypeTypeTransformer() => _instance ??= const ResourceTypeTypeTransformer._(); + + const ResourceTypeTypeTransformer._(); + + int encode(ResourceType data) => data.value; + + /// Decodes a [dynamic value][data] to a ResourceType. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// 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. + ResourceType? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case "Image": return ResourceType.Image; + case "Video": return ResourceType.Video; + case "ImageUrl": return ResourceType.ImageUrl; + case "VideoUrl": return ResourceType.VideoUrl; + case "Audio": return ResourceType.Audio; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ResourceTypeTypeTransformer] instance. + static ResourceTypeTypeTransformer? _instance; +} + diff --git a/manager_api_new/lib/model/response_dto.dart b/manager_api_new/lib/model/response_dto.dart new file mode 100644 index 0000000..266f6a9 --- /dev/null +++ b/manager_api_new/lib/model/response_dto.dart @@ -0,0 +1,142 @@ +// +// 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 ResponseDTO { + /// Returns a new [ResponseDTO] instance. + ResponseDTO({ + this.label = const [], + this.isGood, + this.order, + }); + + List? label; + + /// + /// Please note: 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? isGood; + + /// + /// Please note: 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 ResponseDTO && + 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); + + @override + String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; + + Map toJson() { + final _json = {}; + if (label != null) { + _json[r'label'] = label; + } + if (isGood != null) { + _json[r'isGood'] = isGood; + } + if (order != null) { + _json[r'order'] = order; + } + return _json; + } + + /// Returns a new [ResponseDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ResponseDTO? 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 "ResponseDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ResponseDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ResponseDTO( + label: TranslationDTO.listFromJson(json[r'label']) ?? const [], + isGood: mapValueOfType(json, r'isGood'), + 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 = ResponseDTO.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 = ResponseDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ResponseDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ResponseDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/section_dto.dart b/manager_api_new/lib/model/section_dto.dart new file mode 100644 index 0000000..4ba32aa --- /dev/null +++ b/manager_api_new/lib/model/section_dto.dart @@ -0,0 +1,253 @@ +// +// 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 SectionDTO { + /// Returns a new [SectionDTO] instance. + SectionDTO({ + this.id, + this.label, + this.title = const [], + this.description = const [], + this.imageId, + this.imageSource, + this.configurationId, + this.isSubSection, + this.parentId, + this.type, + this.data, + this.dateCreation, + this.order, + this.instanceId, + }); + + 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; + + 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 + /// 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. + /// + int? order; + + String? instanceId; + + @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; + + @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); + + @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]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (label != null) { + _json[r'label'] = label; + } + if (title != null) { + _json[r'title'] = title; + } + if (description != null) { + _json[r'description'] = description; + } + if (imageId != null) { + _json[r'imageId'] = imageId; + } + if (imageSource != null) { + _json[r'imageSource'] = imageSource; + } + if (configurationId != null) { + _json[r'configurationId'] = configurationId; + } + if (isSubSection != null) { + _json[r'isSubSection'] = isSubSection; + } + if (parentId != null) { + _json[r'parentId'] = parentId; + } + if (type != null) { + _json[r'type'] = type; + } + if (data != null) { + _json[r'data'] = data; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (order != null) { + _json[r'order'] = order; + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [SectionDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SectionDTO? 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 "SectionDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SectionDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SectionDTO( + id: mapValueOfType(json, r'id'), + label: mapValueOfType(json, r'label'), + title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + description: TranslationDTO.listFromJson(json[r'description']) ?? const [], + 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']), + data: mapValueOfType(json, r'data'), + dateCreation: mapDateTime(json, r'dateCreation', ''), + order: mapValueOfType(json, r'order'), + 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 = SectionDTO.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 = SectionDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SectionDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SectionDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/section_type.dart b/manager_api_new/lib/model/section_type.dart new file mode 100644 index 0000000..3441269 --- /dev/null +++ b/manager_api_new/lib/model/section_type.dart @@ -0,0 +1,100 @@ +// +// 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; + +/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quizz 6 = Article +class SectionType { + /// Instantiate a new enum with the provided [value]. + const SectionType._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const Map = SectionType._(0); + static const Slider = SectionType._(1); + static const Video = SectionType._(2); + static const Web = SectionType._(3); + static const Menu = SectionType._(4); + static const Quizz = SectionType._(5); + static const Article = SectionType._(6); + + /// List of all possible values in this [enum][SectionType]. + static const values = [ + Map, + Slider, + Video, + Web, + Menu, + Quizz, + Article + ]; + + static SectionType? fromJson(dynamic value) => SectionTypeTypeTransformer().decode(value); + + static List? listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SectionType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SectionType] to int, +/// and [decode] dynamic data back to [SectionType]. +class SectionTypeTypeTransformer { + factory SectionTypeTypeTransformer() => _instance ??= const SectionTypeTypeTransformer._(); + + const SectionTypeTypeTransformer._(); + + int encode(SectionType data) => data.value; + + /// Decodes a [dynamic value][data] to a SectionType. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// 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. + SectionType? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Map': return SectionType.Map; + case 'Slider': return SectionType.Slider; + case 'Video': return SectionType.Video; + case 'Web': return SectionType.Web; + case 'Menu': return SectionType.Menu; + case 'Quizz': return SectionType.Quizz; + case 'Article': return SectionType.Article; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SectionTypeTypeTransformer] instance. + static SectionTypeTypeTransformer? _instance; +} + 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..f6ab5ec --- /dev/null +++ b/manager_api_new/lib/model/slider_dto.dart @@ -0,0 +1,112 @@ +// +// 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 SliderDTO { + /// Returns a new [SliderDTO] instance. + SliderDTO({ + this.images = const [], + }); + + List? images; + + @override + bool operator ==(Object other) => identical(this, other) || other is SliderDTO && + other.images == images; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (images == null ? 0 : images!.hashCode); + + @override + String toString() => 'SliderDTO[images=$images]'; + + Map toJson() { + final _json = {}; + if (images != null) { + _json[r'images'] = images; + } + 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( + images: ImageDTO.listFromJson(json[r'images']) ?? const [], + ); + } + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SliderDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/token_dto.dart b/manager_api_new/lib/model/token_dto.dart new file mode 100644 index 0000000..5f89ba2 --- /dev/null +++ b/manager_api_new/lib/model/token_dto.dart @@ -0,0 +1,178 @@ +// +// 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 TokenDTO { + /// Returns a new [TokenDTO] instance. + TokenDTO({ + this.accessToken, + this.refreshToken, + this.scope, + this.tokenType, + this.expiresIn, + this.expiration, + this.instanceId, + }); + + String? accessToken; + + String? refreshToken; + + String? scope; + + String? tokenType; + + /// + /// Please note: 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? expiresIn; + + /// + /// Please note: 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? expiration; + + String? instanceId; + + @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; + + @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); + + @override + String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId]'; + + Map toJson() { + final _json = {}; + if (accessToken != null) { + _json[r'access_token'] = accessToken; + } + if (refreshToken != null) { + _json[r'refresh_token'] = refreshToken; + } + if (scope != null) { + _json[r'scope'] = scope; + } + if (tokenType != null) { + _json[r'token_type'] = tokenType; + } + if (expiresIn != null) { + _json[r'expires_in'] = expiresIn; + } + if (expiration != null) { + _json[r'expiration'] = expiration!.toUtc().toIso8601String(); + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [TokenDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TokenDTO? 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 "TokenDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TokenDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TokenDTO( + accessToken: mapValueOfType(json, r'access_token'), + refreshToken: mapValueOfType(json, r'refresh_token'), + scope: mapValueOfType(json, r'scope'), + tokenType: mapValueOfType(json, r'token_type'), + expiresIn: mapValueOfType(json, r'expires_in'), + expiration: mapDateTime(json, r'expiration', ''), + 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 = TokenDTO.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 = TokenDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TokenDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TokenDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/translation_dto.dart b/manager_api_new/lib/model/translation_dto.dart new file mode 100644 index 0000000..bc4c2da --- /dev/null +++ b/manager_api_new/lib/model/translation_dto.dart @@ -0,0 +1,121 @@ +// +// 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 TranslationDTO { + /// Returns a new [TranslationDTO] instance. + TranslationDTO({ + this.language, + this.value, + }); + + String? language; + + String? value; + + @override + 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); + + @override + String toString() => 'TranslationDTO[language=$language, value=$value]'; + + Map toJson() { + final _json = {}; + if (language != null) { + _json[r'language'] = language; + } + if (value != null) { + _json[r'value'] = value; + } + return _json; + } + + /// Returns a new [TranslationDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TranslationDTO? 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 "TranslationDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TranslationDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TranslationDTO( + language: mapValueOfType(json, r'language'), + value: mapValueOfType(json, r'value'), + ); + } + 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 = TranslationDTO.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 = TranslationDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TranslationDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TranslationDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/user.dart b/manager_api_new/lib/model/user.dart new file mode 100644 index 0000000..e50ca10 --- /dev/null +++ b/manager_api_new/lib/model/user.dart @@ -0,0 +1,181 @@ +// +// 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 User { + /// Returns a new [User] instance. + User({ + this.id, + this.email, + this.password, + this.firstName, + this.lastName, + this.token, + this.dateCreation, + this.instanceId, + }); + + String? id; + + String? email; + + String? password; + + 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 + /// 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 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; + + @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); + + @override + String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (email != null) { + _json[r'email'] = email; + } + if (password != null) { + _json[r'password'] = password; + } + if (firstName != null) { + _json[r'firstName'] = firstName; + } + if (lastName != null) { + _json[r'lastName'] = lastName; + } + if (token != null) { + _json[r'token'] = token; + } + if (dateCreation != null) { + _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + } + if (instanceId != null) { + _json[r'instanceId'] = instanceId; + } + return _json; + } + + /// Returns a new [User] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static User? 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 "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'), + 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'), + ); + } + 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 = User.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 = User.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of User-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/user_detail_dto.dart b/manager_api_new/lib/model/user_detail_dto.dart new file mode 100644 index 0000000..33727ba --- /dev/null +++ b/manager_api_new/lib/model/user_detail_dto.dart @@ -0,0 +1,139 @@ +// +// 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 UserDetailDTO { + /// Returns a new [UserDetailDTO] instance. + UserDetailDTO({ + this.id, + this.email, + this.firstName, + this.lastName, + }); + + String? id; + + String? email; + + String? firstName; + + String? lastName; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserDetailDTO && + other.id == id && + other.email == email && + other.firstName == firstName && + other.lastName == lastName; + + @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); + + @override + String toString() => 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; + + Map toJson() { + final _json = {}; + if (id != null) { + _json[r'id'] = id; + } + if (email != null) { + _json[r'email'] = email; + } + if (firstName != null) { + _json[r'firstName'] = firstName; + } + if (lastName != null) { + _json[r'lastName'] = lastName; + } + return _json; + } + + /// Returns a new [UserDetailDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserDetailDTO? 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 "UserDetailDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserDetailDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserDetailDTO( + id: mapValueOfType(json, r'id'), + email: mapValueOfType(json, r'email'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), + ); + } + 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 = UserDetailDTO.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 = UserDetailDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserDetailDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserDetailDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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/video_dto.dart b/manager_api_new/lib/model/video_dto.dart new file mode 100644 index 0000000..49bceae --- /dev/null +++ b/manager_api_new/lib/model/video_dto.dart @@ -0,0 +1,112 @@ +// +// 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 VideoDTO { + /// Returns a new [VideoDTO] instance. + VideoDTO({ + this.source_, + }); + + String? source_; + + @override + bool operator ==(Object other) => identical(this, other) || other is VideoDTO && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => 'VideoDTO[source_=$source_]'; + + Map toJson() { + final _json = {}; + if (source_ != null) { + _json[r'source'] = source_; + } + 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( + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VideoDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + 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..f5d6fa7 --- /dev/null +++ b/manager_api_new/lib/model/web_dto.dart @@ -0,0 +1,112 @@ +// +// 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 WebDTO { + /// Returns a new [WebDTO] instance. + WebDTO({ + this.source_, + }); + + String? source_; + + @override + bool operator ==(Object other) => identical(this, other) || other is WebDTO && + other.source_ == source_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (source_ == null ? 0 : source_!.hashCode); + + @override + String toString() => 'WebDTO[source_=$source_]'; + + Map toJson() { + final _json = {}; + if (source_ != null) { + _json[r'source'] = source_; + } + 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( + 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) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WebDTO.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api_new/pubspec.lock b/manager_api_new/pubspec.lock new file mode 100644 index 0000000..ddf1cd7 --- /dev/null +++ b/manager_api_new/pubspec.lock @@ -0,0 +1,355 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "31.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.10.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.5" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.17.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + http: + dependency: "direct main" + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.5" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.5" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + meta: + dependency: "direct main" + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.3" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.11" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.17.12" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.3" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "7.5.0" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" +sdks: + dart: ">=2.18.0 <3.0.0" diff --git a/manager_api_new/pubspec.yaml b/manager_api_new/pubspec.yaml new file mode 100644 index 0000000..8d1f8f0 --- /dev/null +++ b/manager_api_new/pubspec.yaml @@ -0,0 +1,16 @@ +# +# 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 <3.0.0' +dependencies: + http: '>=0.13.0 <0.14.0' + intl: '^0.17.0' + meta: +dev_dependencies: + test: '>=1.16.0 <1.18.0' diff --git a/manager_api/test/article_dto_test.dart b/manager_api_new/test/article_dto_test.dart similarity index 67% rename from manager_api/test/article_dto_test.dart rename to manager_api_new/test/article_dto_test.dart index 87b00b4..b2d72c1 100644 --- a/manager_api/test/article_dto_test.dart +++ b/manager_api_new/test/article_dto_test.dart @@ -1,30 +1,21 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ArticleDTO void main() { - final instance = ArticleDTO(); + // final instance = ArticleDTO(); group('test ArticleDTO', () { - // 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 content (default value: const []) test('to test the property `content`', () async { // TODO @@ -40,8 +31,8 @@ void main() { // TODO }); - // String audioId - test('to test the property `audioId`', () async { + // List audioIds (default value: const []) + test('to test the property `audioIds`', () async { // TODO }); diff --git a/manager_api/test/authentication_api_test.dart b/manager_api_new/test/authentication_api_test.dart similarity index 83% rename from manager_api/test/authentication_api_test.dart rename to manager_api_new/test/authentication_api_test.dart index 36facc7..f2b9750 100644 --- a/manager_api/test/authentication_api_test.dart +++ b/manager_api_new/test/authentication_api_test.dart @@ -1,19 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for AuthenticationApi void main() { - final instance = AuthenticationApi(); + // final instance = AuthenticationApi(); group('tests for AuthenticationApi', () { //Future authenticationAuthenticateWithForm({ String grantType, String username, String password, String clientId, String clientSecret }) async diff --git a/manager_api/test/configuration_api_test.dart b/manager_api_new/test/configuration_api_test.dart similarity index 59% rename from manager_api/test/configuration_api_test.dart rename to manager_api_new/test/configuration_api_test.dart index e9bc7e6..af1bfdb 100644 --- a/manager_api/test/configuration_api_test.dart +++ b/manager_api_new/test/configuration_api_test.dart @@ -1,22 +1,23 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for ConfigurationApi void main() { - final instance = ConfigurationApi(); + // final instance = ConfigurationApi(); group('tests for ConfigurationApi', () { - //Future configurationCreate(ConfigurationDTO configurationDTO) async + //Future configurationCreate(ConfigurationDTO configurationDTO) async test('test configurationCreate', () async { // TODO }); @@ -26,7 +27,12 @@ void main() { // TODO }); - //Future> configurationGet() async + //Future configurationExport(String id) async + test('test configurationExport', () async { + // TODO + }); + + //Future> configurationGet({ String instanceId }) async test('test configurationGet', () async { // TODO }); @@ -36,6 +42,11 @@ void main() { // TODO }); + //Future configurationImport(ExportConfigurationDTO exportConfigurationDTO) async + test('test configurationImport', () async { + // TODO + }); + //Future configurationUpdate(ConfigurationDTO configurationDTO) async 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 53% rename from manager_api/test/configuration_dto_test.dart rename to manager_api_new/test/configuration_dto_test.dart index 05d5f70..f04c07b 100644 --- a/manager_api/test/configuration_dto_test.dart +++ b/manager_api_new/test/configuration_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ConfigurationDTO void main() { - final instance = ConfigurationDTO(); + // final instance = ConfigurationDTO(); group('test ConfigurationDTO', () { // String id @@ -25,8 +26,18 @@ void main() { // TODO }); - // List sectionIds (default value: const []) - test('to test the property `sectionIds`', () async { + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { // TODO }); @@ -50,6 +61,26 @@ void main() { // TODO }); + // bool isMobile + test('to test the property `isMobile`', () async { + // TODO + }); + + // bool isTablet + test('to test the property `isTablet`', () async { + // TODO + }); + + // bool isOffline + test('to test the property `isOffline`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/device_api_test.dart b/manager_api_new/test/device_api_test.dart similarity index 72% rename from manager_api/test/device_api_test.dart rename to manager_api_new/test/device_api_test.dart index 5589d95..8c16a8a 100644 --- a/manager_api/test/device_api_test.dart +++ b/manager_api_new/test/device_api_test.dart @@ -1,19 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for DeviceApi void main() { - final instance = DeviceApi(); + // final instance = DeviceApi(); group('tests for DeviceApi', () { //Future deviceCreate(DeviceDetailDTO deviceDetailDTO) async @@ -26,7 +27,7 @@ void main() { // TODO }); - //Future> deviceGet() async + //Future> deviceGet({ String instanceId }) async test('test deviceGet', () async { // TODO }); @@ -41,5 +42,10 @@ void main() { // TODO }); + //Future deviceUpdateMainInfos(DeviceDTO deviceDTO) async + 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 84% 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 52e846c..db6c424 100644 --- a/manager_api/test/device_detail_dto_all_of_test.dart +++ b/manager_api_new/test/device_detail_dto_all_of_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTOAllOf void main() { - final instance = DeviceDetailDTOAllOf(); + // final instance = DeviceDetailDTOAllOf(); group('test DeviceDetailDTOAllOf', () { // String connectionLevel diff --git a/manager_api/test/device_detail_dto_test.dart b/manager_api_new/test/device_detail_dto_test.dart similarity index 63% rename from manager_api/test/device_detail_dto_test.dart rename to manager_api_new/test/device_detail_dto_test.dart index b9daed5..cf64e42 100644 --- a/manager_api/test/device_detail_dto_test.dart +++ b/manager_api_new/test/device_detail_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDetailDTO void main() { - final instance = DeviceDetailDTO(); + // final instance = DeviceDetailDTO(); group('test DeviceDetailDTO', () { // String id @@ -20,13 +21,23 @@ void main() { // TODO }); + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + // String name test('to test the property `name`', () async { // TODO }); - // String ipAddress - test('to test the property `ipAddress`', () async { + // String ipAddressWLAN + test('to test the property `ipAddressWLAN`', () async { + // TODO + }); + + // String ipAddressETH + test('to test the property `ipAddressETH`', () async { // TODO }); @@ -35,6 +46,11 @@ void main() { // TODO }); + // String configuration + test('to test the property `configuration`', () async { + // TODO + }); + // bool connected test('to test the property `connected`', () async { // TODO @@ -45,6 +61,16 @@ void main() { // TODO }); + // DateTime dateUpdate + test('to test the property `dateUpdate`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + // String connectionLevel test('to test the property `connectionLevel`', () async { // TODO diff --git a/manager_api/test/device_dto_test.dart b/manager_api_new/test/device_dto_test.dart similarity index 52% rename from manager_api/test/device_dto_test.dart rename to manager_api_new/test/device_dto_test.dart index 269d22e..d75af40 100644 --- a/manager_api/test/device_dto_test.dart +++ b/manager_api_new/test/device_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for DeviceDTO void main() { - final instance = DeviceDTO(); + // final instance = DeviceDTO(); group('test DeviceDTO', () { // String id @@ -20,13 +21,23 @@ void main() { // TODO }); + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + // String name test('to test the property `name`', () async { // TODO }); - // String ipAddress - test('to test the property `ipAddress`', () async { + // String ipAddressWLAN + test('to test the property `ipAddressWLAN`', () async { + // TODO + }); + + // String ipAddressETH + test('to test the property `ipAddressETH`', () async { // TODO }); @@ -35,6 +46,11 @@ void main() { // TODO }); + // String configuration + test('to test the property `configuration`', () async { + // TODO + }); + // bool connected test('to test the property `connected`', () async { // TODO @@ -45,6 +61,16 @@ void main() { // TODO }); + // DateTime dateUpdate + test('to test the property `dateUpdate`', () async { + // TODO + }); + + // String instanceId + 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 80% 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 b497052..67cbcec 100644 --- a/manager_api/test/export_configuration_dto_all_of_test.dart +++ b/manager_api_new/test/export_configuration_dto_all_of_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTOAllOf void main() { - final instance = ExportConfigurationDTOAllOf(); + // final instance = ExportConfigurationDTOAllOf(); group('test ExportConfigurationDTOAllOf', () { // List sections (default value: const []) diff --git a/manager_api/test/export_configuration_dto_test.dart b/manager_api_new/test/export_configuration_dto_test.dart similarity index 58% rename from manager_api/test/export_configuration_dto_test.dart rename to manager_api_new/test/export_configuration_dto_test.dart index adc2fb5..ef54c54 100644 --- a/manager_api/test/export_configuration_dto_test.dart +++ b/manager_api_new/test/export_configuration_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ExportConfigurationDTO void main() { - final instance = ExportConfigurationDTO(); + // final instance = ExportConfigurationDTO(); group('test ExportConfigurationDTO', () { // String id @@ -25,6 +26,21 @@ void main() { // TODO }); + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + // String primaryColor test('to test the property `primaryColor`', () async { // TODO @@ -45,6 +61,26 @@ void main() { // TODO }); + // bool isMobile + test('to test the property `isMobile`', () async { + // TODO + }); + + // bool isTablet + test('to test the property `isTablet`', () async { + // TODO + }); + + // bool isOffline + test('to test the property `isOffline`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + // List sections (default value: const []) test('to test the property `sections`', () 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 70% rename from manager_api/test/geo_point_dto_test.dart rename to manager_api_new/test/geo_point_dto_test.dart index 68ccd1d..df14c31 100644 --- a/manager_api/test/geo_point_dto_test.dart +++ b/manager_api_new/test/geo_point_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for GeoPointDTO void main() { - final instance = GeoPointDTO(); + // final instance = GeoPointDTO(); group('test GeoPointDTO', () { // int id @@ -30,18 +31,8 @@ void main() { // TODO }); - // String image - test('to test the property `image`', () async { - // TODO - }); - - // String imageType - test('to test the property `imageType`', () async { - // TODO - }); - - // List text (default value: const []) - test('to test the property `text`', () async { + // List images (default value: const []) + test('to test the property `images`', () async { // TODO }); diff --git a/manager_api/test/image_dto_test.dart b/manager_api_new/test/image_dto_test.dart similarity index 67% rename from manager_api/test/image_dto_test.dart rename to manager_api_new/test/image_dto_test.dart index 5972183..0c1a1fd 100644 --- a/manager_api/test/image_dto_test.dart +++ b/manager_api_new/test/image_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageDTO void main() { - final instance = ImageDTO(); + // final instance = ImageDTO(); group('test ImageDTO', () { // List title (default value: const []) @@ -25,11 +26,21 @@ void main() { // TODO }); + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + // String source_ test('to test the property `source_`', () async { // TODO }); + // int order + 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 75% rename from manager_api/test/image_geo_point_test.dart rename to manager_api_new/test/image_geo_point_test.dart index 59f20bb..dd3523c 100644 --- a/manager_api/test/image_geo_point_test.dart +++ b/manager_api_new/test/image_geo_point_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ImageGeoPoint void main() { - final instance = ImageGeoPoint(); + // final instance = ImageGeoPoint(); group('test ImageGeoPoint', () { // String imageResourceId @@ -25,11 +26,6 @@ void main() { // TODO }); - // int order - test('to test the property `order`', () async { - // TODO - }); - }); diff --git a/manager_api/test/instance_api_test.dart b/manager_api_new/test/instance_api_test.dart similarity index 87% rename from manager_api/test/instance_api_test.dart rename to manager_api_new/test/instance_api_test.dart index ccd4e96..f52a871 100644 --- a/manager_api/test/instance_api_test.dart +++ b/manager_api_new/test/instance_api_test.dart @@ -1,19 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for InstanceApi void main() { - final instance = InstanceApi(); + // final instance = InstanceApi(); group('tests for InstanceApi', () { //Future instanceCreateInstance(Instance instance) async diff --git a/manager_api/test/instance_dto_test.dart b/manager_api_new/test/instance_dto_test.dart similarity index 81% rename from manager_api/test/instance_dto_test.dart rename to manager_api_new/test/instance_dto_test.dart index 0778f21..5790d8f 100644 --- a/manager_api/test/instance_dto_test.dart +++ b/manager_api_new/test/instance_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for InstanceDTO void main() { - final instance = InstanceDTO(); + // final instance = InstanceDTO(); group('test InstanceDTO', () { // String id diff --git a/manager_api/test/instance_test.dart b/manager_api_new/test/instance_test.dart similarity index 81% rename from manager_api/test/instance_test.dart rename to manager_api_new/test/instance_test.dart index d27e00b..412363b 100644 --- a/manager_api/test/instance_test.dart +++ b/manager_api_new/test/instance_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for Instance void main() { - final instance = Instance(); + // final instance = Instance(); group('test Instance', () { // String id diff --git a/manager_api/test/level_dto_test.dart b/manager_api_new/test/level_dto_test.dart similarity index 82% rename from manager_api/test/level_dto_test.dart rename to manager_api_new/test/level_dto_test.dart index 9120f3b..96b3e17 100644 --- a/manager_api/test/level_dto_test.dart +++ b/manager_api_new/test/level_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LevelDTO void main() { - final instance = LevelDTO(); + // final instance = LevelDTO(); group('test LevelDTO', () { // List label (default value: const []) diff --git a/manager_api/test/login_dto_test.dart b/manager_api_new/test/login_dto_test.dart similarity index 78% rename from manager_api/test/login_dto_test.dart rename to manager_api_new/test/login_dto_test.dart index b313772..491ef54 100644 --- a/manager_api/test/login_dto_test.dart +++ b/manager_api_new/test/login_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for LoginDTO void main() { - final instance = LoginDTO(); + // final instance = LoginDTO(); group('test LoginDTO', () { // String email diff --git a/manager_api/test/map_dto_test.dart b/manager_api_new/test/map_dto_test.dart similarity index 64% rename from manager_api/test/map_dto_test.dart rename to manager_api_new/test/map_dto_test.dart index ffd4b49..26ab1b6 100644 --- a/manager_api/test/map_dto_test.dart +++ b/manager_api_new/test/map_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapDTO void main() { - final instance = MapDTO(); + // final instance = MapDTO(); group('test MapDTO', () { // int zoom @@ -20,7 +21,7 @@ void main() { // TODO }); - // MapType mapType + // MapTypeApp mapType test('to test the property `mapType`', () async { // TODO }); @@ -30,8 +31,13 @@ void main() { // TODO }); - // String icon - test('to test the property `icon`', () async { + // String iconResourceId + test('to test the property `iconResourceId`', () async { + // TODO + }); + + // String iconSource + test('to test the property `iconSource`', () async { // TODO }); diff --git a/manager_api/test/map_type_app_test.dart b/manager_api_new/test/map_type_app_test.dart similarity index 75% rename from manager_api/test/map_type_app_test.dart rename to manager_api_new/test/map_type_app_test.dart index 4145313..035c8d8 100644 --- a/manager_api/test/map_type_app_test.dart +++ b/manager_api_new/test/map_type_app_test.dart @@ -1,13 +1,14 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MapTypeApp diff --git a/manager_api/test/menu_dto_test.dart b/manager_api_new/test/menu_dto_test.dart similarity index 76% rename from manager_api/test/menu_dto_test.dart rename to manager_api_new/test/menu_dto_test.dart index 9414c07..cfd036b 100644 --- a/manager_api/test/menu_dto_test.dart +++ b/manager_api_new/test/menu_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for MenuDTO void main() { - final instance = MenuDTO(); + // final instance = MenuDTO(); group('test MenuDTO', () { // List sections (default value: const []) diff --git a/manager_api/test/player_message_dto_test.dart b/manager_api_new/test/player_message_dto_test.dart similarity index 78% rename from manager_api/test/player_message_dto_test.dart rename to manager_api_new/test/player_message_dto_test.dart index c5d631c..fdbe131 100644 --- a/manager_api/test/player_message_dto_test.dart +++ b/manager_api_new/test/player_message_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for PlayerMessageDTO void main() { - final instance = PlayerMessageDTO(); + // final instance = PlayerMessageDTO(); group('test PlayerMessageDTO', () { // bool configChanged diff --git a/manager_api/test/question_dto_test.dart b/manager_api_new/test/question_dto_test.dart similarity index 77% rename from manager_api/test/question_dto_test.dart rename to manager_api_new/test/question_dto_test.dart index c258fb0..b5b8375 100644 --- a/manager_api/test/question_dto_test.dart +++ b/manager_api_new/test/question_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuestionDTO void main() { - final instance = QuestionDTO(); + // final instance = QuestionDTO(); group('test QuestionDTO', () { // List label (default value: const []) @@ -35,6 +36,11 @@ void main() { // TODO }); + // int order + test('to test the property `order`', () async { + // TODO + }); + }); diff --git a/manager_api_new/test/quizz_dto_bad_level_test.dart b/manager_api_new/test/quizz_dto_bad_level_test.dart new file mode 100644 index 0000000..f5f5e0c --- /dev/null +++ b/manager_api_new/test/quizz_dto_bad_level_test.dart @@ -0,0 +1,37 @@ +// +// 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 + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + +// tests for QuizzDTOBadLevel +void main() { + // final instance = QuizzDTOBadLevel(); + + group('test QuizzDTOBadLevel', () { + // List label (default value: const []) + test('to test the property `label`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // String source_ + 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 73% rename from manager_api/test/quizz_dto_test.dart rename to manager_api_new/test/quizz_dto_test.dart index e30067d..6453fdd 100644 --- a/manager_api/test/quizz_dto_test.dart +++ b/manager_api_new/test/quizz_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for QuizzDTO void main() { - final instance = QuizzDTO(); + // final instance = QuizzDTO(); group('test QuizzDTO', () { // List questions (default value: const []) @@ -20,22 +21,22 @@ void main() { // TODO }); - // OneOfLevelDTO badLevel + // QuizzDTOBadLevel badLevel test('to test the property `badLevel`', () async { // TODO }); - // OneOfLevelDTO mediumLevel + // QuizzDTOBadLevel mediumLevel test('to test the property `mediumLevel`', () async { // TODO }); - // OneOfLevelDTO goodLevel + // QuizzDTOBadLevel goodLevel test('to test the property `goodLevel`', () async { // TODO }); - // OneOfLevelDTO greatLevel + // QuizzDTOBadLevel greatLevel 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 62% rename from manager_api/test/resource_api_test.dart rename to manager_api_new/test/resource_api_test.dart index 802d665..997ee7a 100644 --- a/manager_api/test/resource_api_test.dart +++ b/manager_api_new/test/resource_api_test.dart @@ -1,22 +1,23 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for ResourceApi void main() { - final instance = ResourceApi(); + // final instance = ResourceApi(); group('tests for ResourceApi', () { - //Future resourceCreate(ResourceDetailDTO resourceDetailDTO) async + //Future resourceCreate(ResourceDTO resourceDTO) async test('test resourceCreate', () async { // TODO }); @@ -26,12 +27,12 @@ void main() { // TODO }); - //Future> resourceGet() async + //Future> resourceGet({ String instanceId, List types }) async test('test resourceGet', () async { // TODO }); - //Future resourceGetDetail(String id) async + //Future resourceGetDetail(String id) async test('test resourceGetDetail', () async { // TODO }); @@ -41,12 +42,12 @@ void main() { // TODO }); - //Future resourceUpdate(ResourceDetailDTO resourceDetailDTO) async + //Future resourceUpdate(ResourceDTO resourceDTO) async test('test resourceUpdate', () async { // TODO }); - //Future resourceUpload(ResourceDetailDTO resourceDetailDTO) async + //Future resourceUpload({ String label, String type, String instanceId }) async test('test resourceUpload', () async { // TODO }); diff --git a/manager_api/test/ressource_detail_dto_test.dart b/manager_api_new/test/resource_dto_test.dart similarity index 68% rename from manager_api/test/ressource_detail_dto_test.dart rename to manager_api_new/test/resource_dto_test.dart index da89d09..4e4649a 100644 --- a/manager_api/test/ressource_detail_dto_test.dart +++ b/manager_api_new/test/resource_dto_test.dart @@ -1,26 +1,27 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; -// tests for RessourceDetailDTO +// tests for ResourceDTO void main() { - final instance = RessourceDetailDTO(); + // final instance = ResourceDTO(); - group('test RessourceDetailDTO', () { + group('test ResourceDTO', () { // String id test('to test the property `id`', () async { // TODO }); - // RessourceType type + // ResourceType type test('to test the property `type`', () async { // TODO }); @@ -30,13 +31,18 @@ void main() { // TODO }); + // String data + test('to test the property `data`', () async { + // TODO + }); + // DateTime dateCreation test('to test the property `dateCreation`', () async { // TODO }); - // String data - test('to test the property `data`', () async { + // String instanceId + test('to test the property `instanceId`', () async { // TODO }); diff --git a/manager_api/test/resource_type_test.dart b/manager_api_new/test/resource_type_test.dart similarity index 75% rename from manager_api/test/resource_type_test.dart rename to manager_api_new/test/resource_type_test.dart index d96076b..6b5329e 100644 --- a/manager_api/test/resource_type_test.dart +++ b/manager_api_new/test/resource_type_test.dart @@ -1,13 +1,14 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResourceType diff --git a/manager_api/test/response_dto_test.dart b/manager_api_new/test/response_dto_test.dart similarity index 70% rename from manager_api/test/response_dto_test.dart rename to manager_api_new/test/response_dto_test.dart index 6bc06d4..2c0b90b 100644 --- a/manager_api/test/response_dto_test.dart +++ b/manager_api_new/test/response_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for ResponseDTO void main() { - final instance = ResponseDTO(); + // final instance = ResponseDTO(); group('test ResponseDTO', () { // List label (default value: const []) @@ -25,6 +26,11 @@ void main() { // TODO }); + // int order + test('to test the property `order`', () async { + // TODO + }); + }); diff --git a/manager_api_new/test/section_api_test.dart b/manager_api_new/test/section_api_test.dart new file mode 100644 index 0000000..2900ff5 --- /dev/null +++ b/manager_api_new/test/section_api_test.dart @@ -0,0 +1,106 @@ +// +// 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 + +import 'package:manager_api_new/api.dart'; +import 'package:test/test.dart'; + + +/// tests for SectionApi +void main() { + // final instance = SectionApi(); + + group('tests for SectionApi', () { + //Future sectionCreate(SectionDTO sectionDTO) async + test('test sectionCreate', () async { + // TODO + }); + + //Future sectionDelete(String id) async + test('test sectionDelete', () async { + // TODO + }); + + //Future sectionDeleteAllForConfiguration(String id) async + test('test sectionDeleteAllForConfiguration', () async { + // TODO + }); + + //Future> sectionGet({ String instanceId }) async + test('test sectionGet', () async { + // TODO + }); + + //Future> sectionGetAllSectionSubSections(String id) async + test('test sectionGetAllSectionSubSections', () async { + // TODO + }); + + //Future sectionGetArticleDTO() async + test('test sectionGetArticleDTO', () async { + // TODO + }); + + //Future sectionGetDetail(String id) async + test('test sectionGetDetail', () async { + // TODO + }); + + //Future> sectionGetFromConfiguration(String id) async + test('test sectionGetFromConfiguration', () async { + // TODO + }); + + //Future sectionGetMapDTO() async + test('test sectionGetMapDTO', () async { + // TODO + }); + + //Future sectionGetMenuDTO() async + test('test sectionGetMenuDTO', () async { + // TODO + }); + + //Future sectionGetQuizzDTO() async + test('test sectionGetQuizzDTO', () async { + // TODO + }); + + //Future sectionGetSliderDTO() async + test('test sectionGetSliderDTO', () async { + // TODO + }); + + //Future sectionGetVideoDTO() async + test('test sectionGetVideoDTO', () async { + // TODO + }); + + //Future sectionGetWebDTO() async + test('test sectionGetWebDTO', () async { + // TODO + }); + + //Future sectionPlayerMessageDTO() async + test('test sectionPlayerMessageDTO', () async { + // TODO + }); + + //Future sectionUpdate(SectionDTO sectionDTO) async + test('test sectionUpdate', () async { + // TODO + }); + + //Future sectionUpdateOrder(List sectionDTO) async + 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 61% rename from manager_api/test/section_dto_test.dart rename to manager_api_new/test/section_dto_test.dart index 34e6c3c..9e9ca03 100644 --- a/manager_api/test/section_dto_test.dart +++ b/manager_api_new/test/section_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionDTO void main() { - final instance = SectionDTO(); + // final instance = SectionDTO(); group('test SectionDTO', () { // String id @@ -25,7 +26,12 @@ void main() { // TODO }); - // String description + // 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 }); @@ -35,6 +41,16 @@ void main() { // 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 @@ -60,6 +76,16 @@ void main() { // TODO }); + // int order + test('to test the property `order`', () async { + // TODO + }); + + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/section_type_test.dart b/manager_api_new/test/section_type_test.dart similarity index 75% rename from manager_api/test/section_type_test.dart rename to manager_api_new/test/section_type_test.dart index f0b8fb6..2ff05e3 100644 --- a/manager_api/test/section_type_test.dart +++ b/manager_api_new/test/section_type_test.dart @@ -1,13 +1,14 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SectionType diff --git a/manager_api/test/slider_dto_test.dart b/manager_api_new/test/slider_dto_test.dart similarity index 76% rename from manager_api/test/slider_dto_test.dart rename to manager_api_new/test/slider_dto_test.dart index 19da350..ebfebce 100644 --- a/manager_api/test/slider_dto_test.dart +++ b/manager_api_new/test/slider_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for SliderDTO void main() { - final instance = SliderDTO(); + // final instance = SliderDTO(); group('test SliderDTO', () { // List images (default value: const []) diff --git a/manager_api/test/token_dto_test.dart b/manager_api_new/test/token_dto_test.dart similarity index 79% rename from manager_api/test/token_dto_test.dart rename to manager_api_new/test/token_dto_test.dart index df90e8c..e38a606 100644 --- a/manager_api/test/token_dto_test.dart +++ b/manager_api_new/test/token_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TokenDTO void main() { - final instance = TokenDTO(); + // final instance = TokenDTO(); group('test TokenDTO', () { // String accessToken @@ -45,6 +46,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/translation_dto_test.dart b/manager_api_new/test/translation_dto_test.dart similarity index 78% rename from manager_api/test/translation_dto_test.dart rename to manager_api_new/test/translation_dto_test.dart index 46f0c5e..9c42ba7 100644 --- a/manager_api/test/translation_dto_test.dart +++ b/manager_api_new/test/translation_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for TranslationDTO void main() { - final instance = TranslationDTO(); + // final instance = TranslationDTO(); group('test TranslationDTO', () { // String language diff --git a/manager_api/test/user_api_test.dart b/manager_api_new/test/user_api_test.dart similarity index 87% rename from manager_api/test/user_api_test.dart rename to manager_api_new/test/user_api_test.dart index 9edeebe..3f1de63 100644 --- a/manager_api/test/user_api_test.dart +++ b/manager_api_new/test/user_api_test.dart @@ -1,19 +1,20 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; /// tests for UserApi void main() { - final instance = UserApi(); + // final instance = UserApi(); group('tests for UserApi', () { //Future userCreateUser(User user) async diff --git a/manager_api/test/user_detail_dto_test.dart b/manager_api_new/test/user_detail_dto_test.dart similarity index 83% rename from manager_api/test/user_detail_dto_test.dart rename to manager_api_new/test/user_detail_dto_test.dart index c52b019..02f80ad 100644 --- a/manager_api/test/user_detail_dto_test.dart +++ b/manager_api_new/test/user_detail_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for UserDetailDTO void main() { - final instance = UserDetailDTO(); + // final instance = UserDetailDTO(); group('test UserDetailDTO', () { // String id diff --git a/manager_api/test/user_test.dart b/manager_api_new/test/user_test.dart similarity index 80% rename from manager_api/test/user_test.dart rename to manager_api_new/test/user_test.dart index 6b22208..425265a 100644 --- a/manager_api/test/user_test.dart +++ b/manager_api_new/test/user_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for User void main() { - final instance = User(); + // final instance = User(); group('test User', () { // String id @@ -50,6 +51,11 @@ void main() { // TODO }); + // String instanceId + 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 75% rename from manager_api/test/video_dto_test.dart rename to manager_api_new/test/video_dto_test.dart index ac0e810..dc18ec3 100644 --- a/manager_api/test/video_dto_test.dart +++ b/manager_api_new/test/video_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for VideoDTO void main() { - final instance = VideoDTO(); + // final instance = VideoDTO(); group('test VideoDTO', () { // String source_ diff --git a/manager_api/test/web_dto_test.dart b/manager_api_new/test/web_dto_test.dart similarity index 75% rename from manager_api/test/web_dto_test.dart rename to manager_api_new/test/web_dto_test.dart index cdbc614..c5317fb 100644 --- a/manager_api/test/web_dto_test.dart +++ b/manager_api_new/test/web_dto_test.dart @@ -1,18 +1,19 @@ // // AUTO-GENERATED FILE, DO NOT MODIFY! // -// @dart=2.0 +// @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 -import 'package:managerapi/api.dart'; +import 'package:manager_api_new/api.dart'; import 'package:test/test.dart'; // tests for WebDTO void main() { - final instance = WebDTO(); + // final instance = WebDTO(); group('test WebDTO', () { // String source_ diff --git a/pubspec.lock b/pubspec.lock index c62f14f..dc2f14b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,20 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "48.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" archive: dependency: transitive description: @@ -28,7 +42,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" audioplayers: dependency: "direct main" description: @@ -57,27 +71,90 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.3" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.7" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "8.4.2" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: + version: "1.2.1" + checked_yaml: dependency: transitive description: - name: charcode + name: checked_yaml url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "2.0.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "4.4.0" collection: dependency: "direct main" description: @@ -99,13 +176,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.2" - csslib: - dependency: transitive - description: - name: csslib - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.2" cupertino_icons: dependency: "direct main" description: @@ -113,6 +183,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.5" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.4" drag_and_drop_lists: dependency: "direct main" description: @@ -133,7 +210,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -155,6 +232,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.6.1" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" flare_flutter: dependency: "direct main" description: @@ -180,7 +264,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -191,27 +275,48 @@ packages: description: flutter source: sdk version: "0.0.0" - html: + frontend_server_client: dependency: transitive description: - name: html + name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "0.15.0" + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" http: dependency: transitive description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.2" + version: "0.13.5" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "4.0.2" image: dependency: transitive description: @@ -225,7 +330,14 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" js: dependency: transitive description: @@ -233,10 +345,24 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.4" - managerapi: + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.7.0" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + manager_api_new: dependency: "direct main" description: - path: manager_api + path: manager_api_new relative: true source: path version: "1.0.0" @@ -246,14 +372,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" material_segmented_control: dependency: "direct main" description: @@ -267,7 +393,14 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" multi_select_flutter: dependency: "direct main" description: @@ -289,6 +422,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" + openapi_generator: + dependency: "direct dev" + description: + name: openapi_generator + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + openapi_generator_annotations: + dependency: transitive + description: + name: openapi_generator_annotations + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + openapi_generator_cli: + dependency: transitive + description: + name: openapi_generator_cli + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" password_credential: dependency: "direct main" description: @@ -302,7 +463,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_parsing: dependency: transitive description: @@ -366,13 +527,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" petitparser: dependency: transitive description: @@ -401,6 +555,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.6.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" process: dependency: transitive description: @@ -415,6 +576,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.0.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" qr: dependency: transitive description: @@ -436,18 +611,39 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.22.0" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.6" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -462,27 +658,41 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" typed_data: dependency: transitive description: @@ -504,41 +714,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" - video_player: - dependency: "direct main" - description: - name: video_player - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.5" - video_player_android: + watcher: dependency: transitive description: - name: video_player_android + name: watcher url: "https://pub.dartlang.org" source: hosted - version: "2.3.6" - video_player_avfoundation: + version: "1.0.2" + web_socket_channel: dependency: transitive description: - name: video_player_avfoundation + name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.3.5" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.3" - video_player_web: - dependency: transitive - description: - name: video_player_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" + version: "2.2.0" win32: dependency: transitive description: @@ -560,6 +749,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.3.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=2.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9704578..6737f6d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,15 +18,15 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.7.0 <3.0.1" dependencies: flutter: sdk: flutter - rxdart: 0.22.0 - provider: ^5.0.0 - auto_size_text: ^2.1.0 + rxdart: + provider: + auto_size_text: flutter_colorpicker: ^0.6.0 multiselect_formfield: ^0.1.6 material_segmented_control: ^3.1.2 @@ -36,7 +36,7 @@ dependencies: file_picker: ^4.5.1 flare_flutter: ^3.0.1 #dart_vlc: ^0.0.6 - video_player: ^2.1.1 + #video_player: ^2.1.1 drag_and_drop_lists: ^0.3.2 #path_provider: ^2.0.2 encrypt: ^5.0.0 @@ -51,8 +51,8 @@ dependencies: # path: plugins/window_size # ref: 927f8cbc09b35d85245c095f2db8df9b186f6618 password_credential: ^0.3.1 - managerapi: - path: manager_api + manager_api_new: + path: manager_api_new # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -61,6 +61,8 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + build_runner: + openapi_generator: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -71,6 +73,7 @@ flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. + #generate: true uses-material-design: true # To add assets to your application, add an assets section, like this: