Update openapi generation .. + update code + fix issue on authenticate try on build
This commit is contained in:
parent
294a1a3b40
commit
ed9c4bfc15
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,7 +32,6 @@
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
@ -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<AudioInputContainer> {
|
||||
var result = await showSelectResourceModal(
|
||||
"Sélectionner une ressource",
|
||||
1,
|
||||
[ResourceType.audio],
|
||||
[ResourceType.Audio],
|
||||
context
|
||||
);
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<ImageInputContainer> {
|
||||
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<ImageInputContainer> {
|
||||
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: [
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<ResourceTab> 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<File> files) {
|
||||
onFileUpload(files);
|
||||
resourceDTO.type = ResourceType.image;
|
||||
resourceDTO.type = ResourceType.Image;
|
||||
},
|
||||
onChangedWeb: (List<PlatformFile> files) {
|
||||
onFileUploadWeb(files);
|
||||
resourceDTO.type = ResourceType.image;
|
||||
resourceDTO.type = ResourceType.Image;
|
||||
},
|
||||
),
|
||||
)
|
||||
@ -130,11 +130,11 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUpload
|
||||
child: UploadAudioContainer(
|
||||
onChanged: (List<File> files) {
|
||||
onFileUpload(files);
|
||||
resourceDTO.type = ResourceType.audio;
|
||||
resourceDTO.type = ResourceType.Audio;
|
||||
},
|
||||
onChangedWeb: (List<PlatformFile> files) {
|
||||
onFileUploadWeb(files);
|
||||
resourceDTO.type = ResourceType.audio;
|
||||
resourceDTO.type = ResourceType.Audio;
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
@ -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<TranslationDTO> translations;
|
||||
final int maxLines;
|
||||
|
||||
@ -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 State<UploadOnlineResourceCont
|
||||
}
|
||||
|
||||
showFile() {
|
||||
if (widget.resourceDTO.type == ResourceType.videoUrl || widget.resourceDTO.type == ResourceType.video) {
|
||||
if (widget.resourceDTO.type == ResourceType.VideoUrl || widget.resourceDTO.type == ResourceType.Video) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@ -105,8 +105,8 @@ class _UploadOnlineResourceContainerState extends State<UploadOnlineResourceCont
|
||||
child: Container(
|
||||
width: size.width *0.35, // TODO GET SIZE
|
||||
child: RoundedInputField(
|
||||
hintText: widget.resourceDTO.type == ResourceType.imageUrl ? "Url de l'image" : "Url de la vidéo",
|
||||
icon: widget.resourceDTO.type == ResourceType.imageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
||||
hintText: widget.resourceDTO.type == ResourceType.ImageUrl ? "Url de l'image" : "Url de la vidéo",
|
||||
icon: widget.resourceDTO.type == ResourceType.ImageUrl ? Icons.image : Icons.ondemand_video, // TODO: TBD
|
||||
onChanged: (String text) {
|
||||
//print("onchanged url");
|
||||
widget.resourceDTO.data = text;
|
||||
|
||||
@ -7,7 +7,7 @@ import 'package:manager_app/Components/message_notification.dart';
|
||||
import 'package:manager_app/Models/session.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';
|
||||
|
||||
class FileHelper {
|
||||
final key = Key.fromUtf8('aVs:ZMe3EK-yS<y:;k>vCGrj3T8]yG6E');
|
||||
|
||||
@ -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<SectionDTO> 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();
|
||||
|
||||
@ -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}';
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import 'package:managerapi/api.dart';
|
||||
import 'package:manager_api_new/api.dart';
|
||||
|
||||
class ResourceTypeModel {
|
||||
String label;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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<SectionDTO> sections;
|
||||
|
||||
@ -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<GeoPointImageList> {
|
||||
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);
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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<MapConfig> {
|
||||
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<MapConfig> {
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: Icon(
|
||||
getSectionIcon(SectionType.map),
|
||||
getSectionIcon(SectionType.Map),
|
||||
color: kSecond,
|
||||
size: 18.0,
|
||||
),
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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<QuestionDTO> showNewOrUpdateQuestionQuizz(QuestionDTO inputQuestionDTO, AppContext appContext, BuildContext context, String text) async {
|
||||
QuestionDTO questionDTO = new QuestionDTO();
|
||||
@ -55,7 +55,7 @@ Future<QuestionDTO> 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
|
||||
|
||||
@ -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<ResponseDTO> showNewOrUpdateResponseQuizz(ResponseDTO inputResponseDTO, AppContext appContext, BuildContext context, String text) async {
|
||||
ResponseDTO responseDTO = new ResponseDTO();
|
||||
|
||||
@ -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<LevelDTO> showNewOrUpdateScoreQuizz(LevelDTO inputLevelDTO, AppContext appContext, BuildContext context, String text) async {
|
||||
LevelDTO levelDTO = new LevelDTO();
|
||||
@ -49,7 +49,7 @@ Future<LevelDTO> 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
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<ImageDTO> showNewOrUpdateImageSlider(ImageDTO inputImageDTO, AppContext appContext, BuildContext context, bool showTitle, bool showDescription) async {
|
||||
ImageDTO imageDTO = new ImageDTO();
|
||||
@ -55,7 +55,7 @@ Future<ImageDTO> 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
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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<SectionDetailScreen> {
|
||||
),
|
||||
),
|
||||
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<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
|
||||
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<SectionDetailScreen> {
|
||||
//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<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
sectionDTO.data = data;
|
||||
},
|
||||
);
|
||||
case SectionType.article:
|
||||
case SectionType.Article:
|
||||
return ArticleConfig(
|
||||
initialValue: sectionDTO.data,
|
||||
onChanged: (String data) {
|
||||
|
||||
@ -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<ConfigurationDetailScreen> {
|
||||
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;
|
||||
},
|
||||
),
|
||||
])
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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<bool> isImport, BuildContext context, BuildContext mainContext) {
|
||||
ConfigurationDTO configurationDTO = new ConfigurationDTO();
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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<ConfigurationDTO> configurations;
|
||||
|
||||
@ -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<Body> {
|
||||
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<Body> {
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ResourcesScreen(
|
||||
resourceTypes: [
|
||||
ResourceType.audio,
|
||||
ResourceType.image,
|
||||
ResourceType.imageUrl
|
||||
ResourceType.Audio,
|
||||
ResourceType.Image,
|
||||
ResourceType.ImageUrl
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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: [
|
||||
|
||||
@ -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<ResourcesScreen> {
|
||||
// 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<void> getResources(Function onGetResult, bool isImage, AppContext appCont
|
||||
types = types != null ? types : [];
|
||||
List<ResourceDTO> 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<ResourceDTO> create(ResourceDTO resourceDTO, List<File> files, List<PlatformFile> 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<ResourceDTO> create(ResourceDTO resourceDTO, List<File> files, List<Platf
|
||||
}
|
||||
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
request.headers["authorization"]="Bearer ${managerAppContext.token.accessToken}";
|
||||
request.headers["authorization"]="Bearer ${managerAppContext.accessToken}";
|
||||
request.fields['label'] = resourceDTO.label;
|
||||
request.fields['type'] = resourceDTO.type.toString();
|
||||
request.fields['instanceId'] = managerAppContext.instanceId;
|
||||
@ -145,8 +145,8 @@ Future<ResourceDTO> create(ResourceDTO resourceDTO, List<File> files, List<Platf
|
||||
showNotification(kPrimaryColor, kWhite, 'Erreur, attention, la taille de la ressource doit être inférieure à 2Mb', context, null);
|
||||
}
|
||||
break;
|
||||
case ResourceType.imageUrl:
|
||||
case ResourceType.videoUrl:
|
||||
case ResourceType.ImageUrl:
|
||||
case ResourceType.VideoUrl:
|
||||
if (resourceDTO.data != null) {
|
||||
// test if Correct url
|
||||
bool _validURL = Uri.parse(resourceDTO.data).isAbsolute;
|
||||
|
||||
@ -3,7 +3,7 @@ import 'package:manager_app/Components/rounded_button.dart';
|
||||
import 'package:manager_app/Components/string_input_container.dart';
|
||||
import 'package:manager_app/Screens/Resources/resources_screen.dart';
|
||||
import 'package:manager_app/constants.dart';
|
||||
import 'package:managerapi/api.dart';
|
||||
import 'package:manager_api_new/api.dart';
|
||||
|
||||
dynamic showSelectResourceModal (String text, int maxLines, List<ResourceType> resourceTypes, BuildContext mainContext) async { /*Function onSelect,*/
|
||||
Size size = MediaQuery.of(mainContext).size;
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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<LoginScreen> {
|
||||
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,20 +52,25 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
// if () {} // Add if token exist and not null + not expired
|
||||
try {
|
||||
if(fromClick) {
|
||||
setState(() {
|
||||
isLoading = true;
|
||||
});
|
||||
}
|
||||
/*print(email);
|
||||
print(password);*/
|
||||
|
||||
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);
|
||||
setAccessToken(token.accessToken);
|
||||
accessToken = token.accessToken;
|
||||
instanceId = token.instanceId;
|
||||
|
||||
if(!isRememberMe) {
|
||||
localStorage.clear();
|
||||
} else {
|
||||
showNotification(kSuccess, kWhite, 'Connexion réussie', context, null);
|
||||
|
||||
if(isRememberMe) {
|
||||
if(!localStorage.containsKey("remember")) {
|
||||
localStorage.addEntries({"remember": "true"}.entries);
|
||||
}
|
||||
@ -72,6 +78,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
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<LoginScreen> {
|
||||
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<LoginScreen> {
|
||||
// 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);
|
||||
|
||||
if(fromClick) {
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
//Navigator.pushNamed(context, '/main');
|
||||
|
||||
@ -122,23 +133,29 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
);
|
||||
}
|
||||
catch (e) {
|
||||
//print("error auth");
|
||||
//print(e);
|
||||
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<LoginScreen> {
|
||||
}
|
||||
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<LoginScreen> {
|
||||
|
||||
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<LoginScreen> {
|
||||
horizontal: 45,
|
||||
press: () {
|
||||
TextInput.finishAutofillContext();
|
||||
authenticateTRY(appContext);
|
||||
authenticateTRY(appContext, true);
|
||||
},
|
||||
): Container(
|
||||
height: size.height * 0.1,
|
||||
|
||||
15
lib/api/openApiTest.dart
Normal file
15
lib/api/openApiTest.dart
Normal file
@ -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
|
||||
*/
|
||||
3540
lib/api/swagger.yaml
Normal file
3540
lib/api/swagger.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
@ -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 {
|
||||
|
||||
@ -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<String> section_types = ["Map", "Slider", "Video", "Web", "Menu", "Qu
|
||||
const List<String> map_types = ["none", "normal", "satellite", "terrain", "hybrid"];
|
||||
const List<String> languages = ["FR", "NL", "EN", "DE", "IT", "ES", "CN", "PL"];
|
||||
List<ResourceTypeModel> 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"
|
||||
|
||||
/*
|
||||
|
||||
27
manager_api/.gitignore
vendored
27
manager_api/.gitignore
vendored
@ -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
|
||||
@ -1 +0,0 @@
|
||||
5.1.0
|
||||
@ -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<OAuth>('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<OAuth>('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<DisplayDTO> displayGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('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>**](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<OAuth>('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<OAuth>('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)
|
||||
|
||||
@ -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<String>** | | [optional] [default to const []]
|
||||
**primaryColor** | **String** | | [optional]
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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<OAuth>('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<OAuth>('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<RessourceDTO> ressourceGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:managerapi/api.dart';
|
||||
// TODO Configure OAuth2 access token for authorization: bearer
|
||||
//defaultApiClient.getAuthentication<OAuth>('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>**](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<OAuth>('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<OAuth>('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<OAuth>('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)
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['multipart/form-data'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<TokenDTO> 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<TokenDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Authentication/Authenticate' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [LoginDTO] loginDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<TokenDTO> 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<TokenDTO>.value(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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ConfigurationDTO> 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<ConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Configuration/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration/{id}/export' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ExportConfigurationDTO> 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<ExportConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] instanceId:
|
||||
Future<Response> configurationGetWithHttpInfo({ String instanceId }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Configuration';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (instanceId != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<List<ConfigurationDTO>> 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<ConfigurationDTO>') as List)
|
||||
.cast<ConfigurationDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<ConfigurationDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ConfigurationDTO> 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<ConfigurationDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Configuration/import' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ExportConfigurationDTO] exportConfigurationDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Configuration' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ConfigurationDTO] configurationDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ConfigurationDTO> 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<ConfigurationDTO>.value(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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<DeviceDetailDTO> 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<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Device/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Device' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] instanceId:
|
||||
Future<Response> deviceGetWithHttpInfo({ String instanceId }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Device';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (instanceId != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<List<DeviceDTO>> 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<DeviceDTO>') as List)
|
||||
.cast<DeviceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<DeviceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Device/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<DeviceDetailDTO> 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<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Device' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDetailDTO] deviceDetailDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<DeviceDetailDTO> 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<DeviceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Device/mainInfos' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DeviceDTO] deviceDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<DeviceDTO> 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<DeviceDTO>.value(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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<InstanceDTO> 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<InstanceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Instance/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Instance' operation and returns the [Response].
|
||||
Future<Response> instanceGetWithHttpInfo() async {
|
||||
final path = r'/api/Instance';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<List<Instance>> 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<Instance>') as List)
|
||||
.cast<Instance>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<Instance>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Instance/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<InstanceDTO> 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<InstanceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [Instance] instance (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<InstanceDTO> 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<InstanceDTO>.value(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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ResourceDTO> 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<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Resource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] instanceId:
|
||||
///
|
||||
/// * [List<ResourceType>] types:
|
||||
Future<Response> resourceGetWithHttpInfo({ String instanceId, List<ResourceType> types }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Resource';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (instanceId != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('', 'instanceId', instanceId));
|
||||
}
|
||||
if (types != null) {
|
||||
queryParams.addAll(_convertParametersForCollectionFormat('multi', 'types', types));
|
||||
}
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ResourceType>] types:
|
||||
Future<List<ResourceDTO>> resourceGet({ String instanceId, List<ResourceType> 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<ResourceDTO>') as List)
|
||||
.cast<ResourceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<ResourceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ResourceDTO> 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<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Resource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<MultipartFile> 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<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Resource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ResourceDTO] resourceDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<ResourceDTO> 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<ResourceDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /api/Resource/upload' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] label:
|
||||
///
|
||||
/// * [String] type:
|
||||
///
|
||||
/// * [String] instanceId:
|
||||
Future<Response> resourceUploadWithHttpInfo({ String label, String type, String instanceId }) async {
|
||||
// Verify required params are set.
|
||||
|
||||
final path = r'/api/Resource/upload';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['multipart/form-data'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<RessourceDetailDTO> 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<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/Ressource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource' operation and returns the [Response].
|
||||
Future<Response> ressourceGetWithHttpInfo() async {
|
||||
final path = r'/api/Ressource';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<List<RessourceDTO>> 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<RessourceDTO>') as List)
|
||||
.cast<RessourceDTO>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<RessourceDTO>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource/{id}/detail' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<RessourceDetailDTO> 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<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/Ressource/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<MultipartFile> 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<MultipartFile>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/Ressource' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RessourceDetailDTO] ressourceDetailDTO (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<RessourceDetailDTO> 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<RessourceDetailDTO>.value(null);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -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<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<UserDetailDTO> 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<UserDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /api/User/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<String> 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<String>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/User' operation and returns the [Response].
|
||||
Future<Response> userGetWithHttpInfo() async {
|
||||
final path = r'/api/User';
|
||||
|
||||
Object postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<List<User>> 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<User>') as List)
|
||||
.cast<User>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
return Future<List<User>>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /api/User/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>[];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<UserDetailDTO> 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<UserDetailDTO>.value(null);
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /api/User' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [User] user (required):
|
||||
Future<Response> 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 = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
final contentTypes = <String>['application/json'];
|
||||
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
|
||||
final authNames = <String>['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<UserDetailDTO> 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<UserDetailDTO>.value(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<QueryParam> _convertParametersForCollectionFormat(
|
||||
String collectionFormat,
|
||||
String name,
|
||||
dynamic value,
|
||||
) {
|
||||
final params = <QueryParam>[];
|
||||
|
||||
// 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;
|
||||
}
|
||||
@ -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<QueryParam> queryParams, Map<String, String> 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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<TranslationDTO> content;
|
||||
|
||||
String qrCode;
|
||||
|
||||
bool isContentTop;
|
||||
|
||||
List<TranslationDTO> audioIds;
|
||||
|
||||
bool isReadAudioAuto;
|
||||
|
||||
List<ImageDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<ArticleDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ArticleDTO>[]
|
||||
: json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ArticleDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ArticleDTO>{};
|
||||
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<String, List<ArticleDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ArticleDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> title;
|
||||
|
||||
String imageId;
|
||||
|
||||
String imageSource;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<String>(),
|
||||
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<ConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ConfigurationDTO>[]
|
||||
: json.map((v) => ConfigurationDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ConfigurationDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ConfigurationDTO>{};
|
||||
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<String, List<ConfigurationDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ConfigurationDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<DeviceDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDetailDTO>[]
|
||||
: json.map((v) => DeviceDetailDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDetailDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDetailDTO>{};
|
||||
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<String, List<DeviceDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDetailDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<DeviceDetailDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDetailDTOAllOf>[]
|
||||
: json.map((v) => DeviceDetailDTOAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDetailDTOAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDetailDTOAllOf>{};
|
||||
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<String, List<DeviceDetailDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDetailDTOAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<DeviceDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeviceDTO>[]
|
||||
: json.map((v) => DeviceDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeviceDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeviceDTO>{};
|
||||
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<String, List<DeviceDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeviceDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DeviceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String> sectionIds;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<String>(),
|
||||
primaryColor: json[r'primaryColor'],
|
||||
secondaryColor: json[r'secondaryColor'],
|
||||
languages: json[r'languages'] == null
|
||||
? null
|
||||
: (json[r'languages'] as List).cast<String>(),
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
);
|
||||
|
||||
static List<DisplayDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DisplayDTO>[]
|
||||
: json.map((v) => DisplayDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DisplayDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DisplayDTO>{};
|
||||
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<String, List<DisplayDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DisplayDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = DisplayDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> title;
|
||||
|
||||
String imageId;
|
||||
|
||||
String imageSource;
|
||||
|
||||
String primaryColor;
|
||||
|
||||
String secondaryColor;
|
||||
|
||||
List<String> languages;
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
bool isMobile;
|
||||
|
||||
bool isTablet;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
String instanceId;
|
||||
|
||||
List<SectionDTO> sections;
|
||||
|
||||
List<ResourceDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<String>(),
|
||||
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<ExportConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ExportConfigurationDTO>[]
|
||||
: json.map((v) => ExportConfigurationDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ExportConfigurationDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ExportConfigurationDTO>{};
|
||||
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<String, List<ExportConfigurationDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ExportConfigurationDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ExportConfigurationDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<SectionDTO> sections;
|
||||
|
||||
List<ResourceDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ExportConfigurationDTOAllOf(
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
||||
);
|
||||
|
||||
static List<ExportConfigurationDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ExportConfigurationDTOAllOf>[]
|
||||
: json.map((v) => ExportConfigurationDTOAllOf.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ExportConfigurationDTOAllOf> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ExportConfigurationDTOAllOf>{};
|
||||
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<String, List<ExportConfigurationDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ExportConfigurationDTOAllOf>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ExportConfigurationDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> title;
|
||||
|
||||
List<TranslationDTO> description;
|
||||
|
||||
List<ImageGeoPoint> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<GeoPointDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <GeoPointDTO>[]
|
||||
: json.map((v) => GeoPointDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, GeoPointDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, GeoPointDTO>{};
|
||||
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<String, List<GeoPointDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<GeoPointDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = GeoPointDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> title;
|
||||
|
||||
List<TranslationDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<ImageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ImageDTO>[]
|
||||
: json.map((v) => ImageDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ImageDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ImageDTO>{};
|
||||
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<String, List<ImageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ImageDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ImageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ImageGeoPoint(
|
||||
imageResourceId: json[r'imageResourceId'],
|
||||
imageSource: json[r'imageSource'],
|
||||
);
|
||||
|
||||
static List<ImageGeoPoint> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ImageGeoPoint>[]
|
||||
: json.map((v) => ImageGeoPoint.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ImageGeoPoint> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ImageGeoPoint>{};
|
||||
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<String, List<ImageGeoPoint>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ImageGeoPoint>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = ImageGeoPoint.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<Instance> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <Instance>[]
|
||||
: json.map((v) => Instance.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, Instance> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, Instance>{};
|
||||
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<String, List<Instance>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<Instance>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = Instance.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<InstanceDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <InstanceDTO>[]
|
||||
: json.map((v) => InstanceDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, InstanceDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, InstanceDTO>{};
|
||||
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<String, List<InstanceDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<InstanceDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = InstanceDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: LevelDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
resourceId: json[r'resourceId'],
|
||||
source_: json[r'source'],
|
||||
);
|
||||
|
||||
static List<LevelDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <LevelDTO>[]
|
||||
: json.map((v) => LevelDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, LevelDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, LevelDTO>{};
|
||||
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<String, List<LevelDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<LevelDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = LevelDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: LoginDTO(
|
||||
email: json[r'email'],
|
||||
password: json[r'password'],
|
||||
);
|
||||
|
||||
static List<LoginDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <LoginDTO>[]
|
||||
: json.map((v) => LoginDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, LoginDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, LoginDTO>{};
|
||||
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<String, List<LoginDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<LoginDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = LoginDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<GeoPointDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<MapDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapDTO>[]
|
||||
: json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MapDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MapDTO>{};
|
||||
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<String, List<MapDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MapDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 = <MapType>[
|
||||
none,
|
||||
normal,
|
||||
satellite,
|
||||
terrain,
|
||||
hybrid,
|
||||
];
|
||||
|
||||
static MapType fromJson(dynamic value) =>
|
||||
MapTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<MapType> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapType>[]
|
||||
: 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;
|
||||
}
|
||||
@ -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 = <MapTypeApp>[
|
||||
none,
|
||||
normal,
|
||||
satellite,
|
||||
terrain,
|
||||
hybrid,
|
||||
];
|
||||
|
||||
static MapTypeApp fromJson(dynamic value) =>
|
||||
MapTypeAppTypeTransformer().decode(value);
|
||||
|
||||
static List<MapTypeApp> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MapTypeApp>[]
|
||||
: 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;
|
||||
}
|
||||
@ -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<SectionDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: MenuDTO(
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
);
|
||||
|
||||
static List<MenuDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <MenuDTO>[]
|
||||
: json.map((v) => MenuDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, MenuDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, MenuDTO>{};
|
||||
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<String, List<MenuDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<MenuDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = MenuDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> json) => json == null
|
||||
? null
|
||||
: PlayerMessageDTO(
|
||||
configChanged: json[r'configChanged'],
|
||||
isDeleted: json[r'isDeleted'],
|
||||
);
|
||||
|
||||
static List<PlayerMessageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <PlayerMessageDTO>[]
|
||||
: json.map((v) => PlayerMessageDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, PlayerMessageDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, PlayerMessageDTO>{};
|
||||
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<String, List<PlayerMessageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<PlayerMessageDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = PlayerMessageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<TranslationDTO> label;
|
||||
|
||||
List<ResponseDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<QuestionDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <QuestionDTO>[]
|
||||
: json.map((v) => QuestionDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, QuestionDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, QuestionDTO>{};
|
||||
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<String, List<QuestionDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<QuestionDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = QuestionDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<QuestionDTO> 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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic> 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<QuizzDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <QuizzDTO>[]
|
||||
: json.map((v) => QuizzDTO.fromJson(v)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, QuizzDTO> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, QuizzDTO>{};
|
||||
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<String, List<QuizzDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<QuizzDTO>>{};
|
||||
if (json != null && json.isNotEmpty) {
|
||||
json.forEach((String key, dynamic v) {
|
||||
map[key] = QuizzDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user