Map done !

This commit is contained in:
Thomas Fransolet 2025-05-15 15:11:21 +02:00
parent e644cd487f
commit e16e898140
62 changed files with 4049 additions and 288 deletions

View File

@ -1,6 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
@ -117,7 +117,7 @@ class _AudioInputContainerState extends State<AudioInputContainer> {
return Center(
child: Container(
height: size.height * 0.1,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -1,16 +1,16 @@
import 'package:flutter/material.dart';
import 'package:manager_app/constants.dart';
class LoadingCommon extends StatefulWidget {
class CommonLoader extends StatefulWidget {
double? iconSize;
LoadingCommon({Key? key, this.iconSize}) : super(key: key);
CommonLoader({Key? key, this.iconSize}) : super(key: key);
@override
State<LoadingCommon> createState() => _LoadingCommonState();
State<CommonLoader> createState() => _CommonLoaderState();
}
class _LoadingCommonState extends State<LoadingCommon> with TickerProviderStateMixin {
class _CommonLoaderState extends State<CommonLoader> with TickerProviderStateMixin {
AnimationController? _controller;
@override

View File

@ -1,7 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:location_picker_flutter_map/location_picker_flutter_map.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/rounded_input_field.dart';
@ -78,7 +78,7 @@ class _GeolocInputContainerState extends State<GeolocInputContainer> {
color: kPrimaryColor,
size: 50,
),
loadingWidget: LoadingCommon(iconSize: 40.0),
loadingWidget: CommonLoader(iconSize: 40.0),
searchBarHintColor: kPrimaryColor,
mapLoadingBackgroundColor: kSecond,
zoomButtonsBackgroundColor: kPrimaryColor,

View File

@ -1,6 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
@ -136,7 +136,7 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
return Center(
child: Container(
height: size.height * 0.1,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:video_player/video_player.dart';
import '../../constants.dart';
@ -55,7 +55,7 @@ class _VideoViewer extends State<VideoViewer> {
)
: Center(
child: Container(
child: LoadingCommon()
child: CommonLoader()
)
),
),

View File

@ -2,7 +2,10 @@ import 'package:diacritic/diacritic.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:location_picker_flutter_map/location_picker_flutter_map.dart';
import 'package:manager_app/Components/confirmation_dialog.dart';
import 'package:manager_app/Components/geoloc_input_container.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/multi_select_dropdown_language_container.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/category_input_container.dart';
@ -16,6 +19,7 @@ import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/showNewOrUpdateGeoPoint.dart';
import 'package:html/parser.dart' show parse;
import 'package:manager_app/app_context.dart';
import 'package:manager_app/client.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import 'dart:convert';
@ -41,42 +45,21 @@ class MapConfig extends StatefulWidget {
class _MapConfigState extends State<MapConfig> {
late MapDTO mapDTO;
late List<GeoPointDTO> pointsToShow;
List<String>? selectedCategories = [];
late List<GeoPointDTO> pointsToShow = [];
//List<String>? selectedCategories = [];
String mapType= "hybrid";
String mapTypeMapBox= "standard";
String filterSearch = '';
final ValueNotifier<List<int>?> selectedCategoriesNotifier = ValueNotifier([]);
final ValueNotifier<String?> searchNotifier = ValueNotifier("");
@override
void initState() {
super.initState();
//mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!;
mapDTO = widget.initialValue;
pointsToShow = new List<GeoPointDTO>.from(mapDTO.points!);
mapDTO.points = pointsToShow;
pointsToShow.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
//selectedCategories = mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList();
selectedCategories = mapDTO.categories!.map((categorie) => categorie.id!.toString()).toList();
pointsToShow.forEach((pts) {
/*if(pts.categorieId == null && pts.categorie != null && mapDTO.categories!.any((e) => e.order == pts.categorie!.order)) {
print("SET CATEGORIE ID FOR CAT");
print(pts.categorie);
var testCat = mapDTO.categories!.where((c) => c.label![0].value == pts.categorie!.label![0].value);
if(testCat.isNotEmpty) {
pts.categorieId = testCat.first.id;
pts.categorie!.id = testCat.first.id;
} else {
pts.categorie = null; // Categorie no more existing so we can reset cat
}
print(pts.categorieId);
}*/
});
print(pointsToShow);
if(mapDTO.mapType != null) {
switch(mapDTO.mapType!.value) {
@ -310,7 +293,20 @@ class _MapConfigState extends State<MapConfig> {
],
),
),
Padding(
FutureBuilder(
future: getGeoPoints((appContext.getContext() as ManagerAppContext).clientAPI!),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(child: CommonLoader());
} else {
if(snapshot.connectionState == ConnectionState.done)
{
mapDTO.points = snapshot.data;
pointsToShow = mapDTO.points!;
pointsToShow.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
selectedCategoriesNotifier.value = mapDTO.categories!.map((categorie) => categorie.id!).toList();
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
@ -323,7 +319,21 @@ class _MapConfigState extends State<MapConfig> {
constraints: BoxConstraints(minHeight: 100),
child: Padding(
padding: const EdgeInsets.only(top: 95, left: 10, right: 10, bottom: 10),
child: GridView.builder(
child: ValueListenableBuilder<String?>(
valueListenable: searchNotifier,
builder: (context, searchValue, child) {
return ValueListenableBuilder<List<int>?>(
valueListenable: selectedCategoriesNotifier,
builder: (context, selectedCategories, child) {
if(selectedCategories == null || selectedCategories.length == 0) {
pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList();
} else {
pointsToShow = mapDTO.points!.where((point) => selectedCategories.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
}
pointsToShow = searchValue != null && searchValue.trim().isNotEmpty ? pointsToShow.where((GeoPointDTO pointGeo) => removeDiacritics(pointGeo.title!.firstWhere((t) => t.language == "FR").value!.toUpperCase()).contains(removeDiacritics(searchValue.toUpperCase()))).toList() : pointsToShow;
return GridView.builder(
shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 8),
itemCount: pointsToShow.length,
@ -336,6 +346,10 @@ class _MapConfigState extends State<MapConfig> {
child: getElement(index, pointsToShow[index], size, appContext),
);
}
);
}
);
}
),
),
),
@ -354,22 +368,13 @@ class _MapConfigState extends State<MapConfig> {
label: null,
color: kSecond,
width: size.width * 0.45,
initialValue: selectedCategories!,
initialValue: mapDTO.categories!.where((cat) => selectedCategoriesNotifier.value!.contains(cat.id)).map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList(),
isMultiple: true,
isHTMLLabel : true,
values: mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList(),
onChanged: (value) {
var tempOutput = new List<String>.from(value);
setState(() {
selectedCategories = tempOutput;
if(selectedCategories == null || selectedCategories!.length == 0) {
//pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList();
} else {
//pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
}
});
selectedCategoriesNotifier.value = mapDTO.categories!.where((c) => tempOutput.contains(c.label!.firstWhere((element) => element.language == 'FR').value!)).map((cat) => cat.id!).toList();
},
)
),
@ -385,10 +390,7 @@ class _MapConfigState extends State<MapConfig> {
fontSize: 15,
fontSizeText: 15,
onChanged: (String value) {
setState(() {
filterSearch = value;
filterPoints();
});
searchNotifier.value = value;
},
),
),
@ -402,24 +404,32 @@ class _MapConfigState extends State<MapConfig> {
mapDTO,
null,
(GeoPointDTO geoPoint) async {
setState(() {
/*setState(() {
mapDTO.points!.add(geoPoint);
mapDTO.points!.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
if(selectedCategories == null || selectedCategories!.length == 0) {
if(selectedCategoriesNotifier.value == null || selectedCategoriesNotifier.value!.length == 0) {
//pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList();
} else {
//pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
pointsToShow = mapDTO.points!.where((point) => selectedCategoriesNotifier.value!.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
}
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
});
});*/
try {
await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionMapApi!.sectionMapCreate(mapDTO.id!, geoPoint);
// TODO refresh points list
showNotification(kSuccess, kWhite, 'Le point géographique a été créé avec succès', context, null);
setState(() {
// refresh ui
print("Refresh UI");
});
} catch(e) {
showNotification(kError, kWhite, 'Une erreur est survenue lors de la création du point géographique', context, null);
}
},
appContext,
context);
@ -450,12 +460,23 @@ class _MapConfigState extends State<MapConfig> {
)
]),
),
);
} else {
return Center(child: Text("Une erreur est survenue lors de la récupération des points géographiques"),);
}
}
}
),
],
),
);
}
Future<List<GeoPointDTO>?> getGeoPoints(Client client) async {
List<GeoPointDTO>? geoPoints = await client.sectionMapApi!.sectionMapGetAllGeoPointsFromSection(widget.initialValue.id!);
return geoPoints ?? [];
}
getElement(int index, GeoPointDTO? point, Size size, AppContext appContext) {
return Container(
width: double.infinity,
@ -492,8 +513,19 @@ class _MapConfigState extends State<MapConfig> {
showNewOrUpdateGeoPoint(
mapDTO,
pointsToShow[index],
(GeoPointDTO geoPoint) {
(GeoPointDTO geoPoint) async {
try {
await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionMapApi!.sectionMapUpdate(geoPoint);
showNotification(kSuccess, kWhite, 'Le point géographique a été mis à jour avec succès', context, null);
setState(() {
// refresh ui
print("Refresh UI");
});
} catch(e) {
showNotification(kError, kWhite, 'Une erreur est survenue lors de la mise à jour du point géographique', context, null);
}
/*setState(() {
var pointToUpdate = pointsToShow[index];
var pointToUpdateMapDTOPoints = mapDTO.points!.firstWhere((p) => p.longitude == pointToUpdate.longitude && p.latitude == pointToUpdate.latitude);
var mapDTOPointsIndex = mapDTO.points!.indexOf(pointToUpdateMapDTOPoints);
@ -502,7 +534,7 @@ class _MapConfigState extends State<MapConfig> {
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
});
});*/
},
appContext,
context);
@ -518,15 +550,26 @@ class _MapConfigState extends State<MapConfig> {
bottom: 0,
right: 0,
child: InkWell(
onTap: () {
setState(() {
var pointToRemove = pointsToShow[index];
mapDTO.points = mapDTO.points!.where((p) => p.longitude != pointToRemove.longitude && p.latitude != pointToRemove.latitude).toList();
pointsToShow.removeAt(index);
});
onTap: () async {
showConfirmationDialog(
"Êtes-vous sûr de vouloir supprimer ce point géographique ?",
() {},
() async {
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
try {
var pointToRemove = pointsToShow[index];
(appContext.getContext() as ManagerAppContext).clientAPI!.sectionMapApi!.sectionMapDelete(pointToRemove.id!);
showNotification(kSuccess, kWhite, 'Le point géographique a été supprimé avec succès', context, null);
// refresh UI
setState(() {
print("Refresh UI");
});
} catch(e) {
showNotification(kError, kWhite, 'Une erreur est survenue lors de la suppression du point géographique', context, null);
}
},
context
);
},
child: Icon(
Icons.delete,
@ -539,10 +582,6 @@ class _MapConfigState extends State<MapConfig> {
),
);
}
void filterPoints() {
pointsToShow = filterSearch.isEmpty ? mapDTO.points! : mapDTO.points!.where((GeoPointDTO pointGeo) => removeDiacritics(pointGeo.title!.firstWhere((t) => t.language == "FR").value!.toUpperCase()).contains(removeDiacritics(filterSearch.toUpperCase()))).toList();
}
}

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:location_picker_flutter_map/location_picker_flutter_map.dart';
import 'package:manager_app/Components/dropDown_input_container_categories.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/rounded_button.dart';
@ -59,7 +59,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
color: kPrimaryColor,
size: 50,
),
loadingWidget: LoadingCommon(iconSize: 40.0),
loadingWidget: CommonLoader(iconSize: 40.0),
searchBarHintColor: kPrimaryColor,
mapLoadingBackgroundColor: kSecond,
zoomButtonsBackgroundColor: kPrimaryColor,

View File

@ -8,7 +8,7 @@ import 'package:manager_app/Components/check_input_container.dart';
import 'package:manager_app/Components/confirmation_dialog.dart';
import 'package:manager_app/Components/fetch_section_icon.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:manager_app/Components/number_input_container.dart';
@ -90,7 +90,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -9,7 +9,7 @@ import 'package:manager_app/Components/color_picker_input_container.dart';
import 'package:manager_app/Components/confirmation_dialog.dart';
import 'package:manager_app/Components/number_input_container.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/multi_select_dropdown_language_container.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
@ -55,7 +55,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}
@ -418,7 +418,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
return Center(
child: Container(
height: size.height * 0.15,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -1,6 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Configurations/configuration_detail_screen.dart';
@ -51,7 +51,7 @@ class _ConfigurationsScreenState extends State<ConfigurationsScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -1,6 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Devices/device_element.dart';
import 'package:manager_app/app_context.dart';
@ -67,7 +67,7 @@ class _DevicesScreenState extends State<DevicesScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -2,7 +2,7 @@ import 'dart:html' as html;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/app_context.dart';
import 'package:provider/provider.dart';
@ -53,7 +53,7 @@ class _PolicyScreenState extends State<PolicyScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -3,7 +3,7 @@ import 'package:file_picker/file_picker.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Resources/new_resource_popup.dart';
@ -125,7 +125,7 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
return Center(
child: Container(
height: size.height * 0.2,
child: LoadingCommon()
child: CommonLoader()
)
);
}

View File

@ -180,7 +180,7 @@ Future<void> delete(ResourceDTO resourceDTO, AppContext appContext, context) asy
appContext.setContext(managerAppContext);
Navigator.of(context).pop();
showNotification(Colors.green, kWhite, 'La ressource a été supprimée avec succès', context, null);
showNotification(kSuccess, kWhite, 'La ressource a été supprimée avec succès', context, null);
},
context
);

View File

@ -3,7 +3,7 @@ import 'dart:html';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/common_loader.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/rounded_input_field.dart';
@ -377,7 +377,7 @@ class _LoginScreenState extends State<LoginScreen> {
},
): Container(
height: size.height * 0.1,
child: LoadingCommon(iconSize: 40)
child: CommonLoader(iconSize: 40)
),
],
)

View File

@ -1,4 +1,4 @@
// Openapi Generator last run: : 2025-05-07T14:31:51.428558
// Openapi Generator last run: : 2025-05-15T14:44:57.478150
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(

View File

@ -4,11 +4,11 @@
"info": {
"title": "Manager Service",
"description": "API Manager Service",
"version": "Version Alpha 0"
"version": "Version Alpha"
},
"servers": [
{
"url": "https://localhost:5001"
"url": "http://localhost:5000"
}
],
"paths": {
@ -2631,7 +2631,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GeoPoint"
"$ref": "#/components/schemas/GeoPointDTO"
}
}
}
@ -4671,6 +4671,221 @@
"items": {
"$ref": "#/components/schemas/TranslationDTO"
}
},
"sectionMapId": {
"type": "string",
"nullable": true
},
"sectionMap": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/SectionMap"
}
]
}
}
},
"SectionMap": {
"allOf": [
{
"$ref": "#/components/schemas/Section"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"mapCategories"
],
"properties": {
"mapZoom": {
"type": "integer",
"format": "int32"
},
"mapMapType": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/MapTypeApp"
}
]
},
"mapTypeMapbox": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/MapTypeMapBox"
}
]
},
"mapMapProvider": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/MapProvider"
}
]
},
"mapPoints": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/GeoPoint"
}
},
"mapResourceId": {
"type": "string",
"nullable": true
},
"mapResource": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/Resource"
}
]
},
"mapCategories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CategorieDTO"
}
},
"mapCenterLatitude": {
"type": "string",
"nullable": true
},
"mapCenterLongitude": {
"type": "string",
"nullable": true
}
}
}
]
},
"Resource": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"type",
"label",
"instanceId"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"type": {
"$ref": "#/components/schemas/ResourceType"
},
"label": {
"type": "string",
"minLength": 1
},
"dateCreation": {
"type": "string",
"format": "date-time"
},
"instanceId": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"nullable": true
}
}
},
"Section": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"label",
"title",
"configurationId",
"type",
"isSubSection",
"instanceId"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"title": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationDTO"
}
},
"description": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/TranslationDTO"
}
},
"order": {
"type": "integer",
"format": "int32"
},
"configurationId": {
"type": "string",
"minLength": 1
},
"imageId": {
"type": "string",
"nullable": true
},
"imageSource": {
"type": "string",
"nullable": true
},
"type": {
"$ref": "#/components/schemas/SectionType"
},
"isSubSection": {
"type": "boolean"
},
"parentId": {
"type": "string",
"nullable": true
},
"dateCreation": {
"type": "string",
"format": "date-time"
},
"instanceId": {
"type": "string",
"minLength": 1
},
"isBeacon": {
"type": "boolean"
},
"beaconId": {
"type": "integer",
"format": "int32",
"nullable": true
},
"latitude": {
"type": "string",
"nullable": true
},
"longitude": {
"type": "string",
"nullable": true
},
"meterZoneGPS": {
"type": "integer",
"format": "int32",
"nullable": true
}
}
},
@ -4714,43 +4929,70 @@
"items": {
"$ref": "#/components/schemas/ResponseDTO"
}
},
"sectionQuizId": {
"type": "string",
"nullable": true
},
"sectionQuiz": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/SectionQuiz"
}
]
}
}
},
"Resource": {
"SectionQuiz": {
"allOf": [
{
"$ref": "#/components/schemas/Section"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"id",
"type",
"label",
"instanceId"
"quizQuestions",
"quizBadLevel",
"quizMediumLevel",
"quizGoodLevel",
"quizGreatLevel"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
"quizQuestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QuizQuestion"
}
},
"type": {
"$ref": "#/components/schemas/ResourceType"
"quizBadLevel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
},
"label": {
"type": "string",
"minLength": 1
"quizMediumLevel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
},
"dateCreation": {
"type": "string",
"format": "date-time"
"quizGoodLevel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
},
"instanceId": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"nullable": true
"quizGreatLevel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
}
}
}
]
},
"User": {
"type": "object",

View File

@ -17,6 +17,7 @@ doc/DeviceDetailDTO.md
doc/ExportConfigurationDTO.md
doc/GeoPoint.md
doc/GeoPointDTO.md
doc/GeoPointSectionMap.md
doc/Instance.md
doc/InstanceApi.md
doc/InstanceDTO.md
@ -38,15 +39,22 @@ doc/QuestionDTO.md
doc/QuestionDTOImageBackgroundResourceType.md
doc/QuizDTO.md
doc/QuizQuestion.md
doc/QuizQuestionResource.md
doc/QuizQuestionSectionQuiz.md
doc/Resource.md
doc/ResourceApi.md
doc/ResourceDTO.md
doc/ResourceType.md
doc/ResponseDTO.md
doc/Section.md
doc/SectionApi.md
doc/SectionDTO.md
doc/SectionMap.md
doc/SectionMapAllOfMapMapProvider.md
doc/SectionMapAllOfMapMapType.md
doc/SectionMapAllOfMapResource.md
doc/SectionMapAllOfMapTypeMapbox.md
doc/SectionMapApi.md
doc/SectionQuiz.md
doc/SectionQuizApi.md
doc/SectionType.md
doc/SliderDTO.md
@ -90,6 +98,7 @@ lib/model/device_dto.dart
lib/model/export_configuration_dto.dart
lib/model/geo_point.dart
lib/model/geo_point_dto.dart
lib/model/geo_point_section_map.dart
lib/model/instance.dart
lib/model/instance_dto.dart
lib/model/login_dto.dart
@ -110,12 +119,19 @@ lib/model/question_dto.dart
lib/model/question_dto_image_background_resource_type.dart
lib/model/quiz_dto.dart
lib/model/quiz_question.dart
lib/model/quiz_question_resource.dart
lib/model/quiz_question_section_quiz.dart
lib/model/resource.dart
lib/model/resource_dto.dart
lib/model/resource_type.dart
lib/model/response_dto.dart
lib/model/section.dart
lib/model/section_dto.dart
lib/model/section_map.dart
lib/model/section_map_all_of_map_map_provider.dart
lib/model/section_map_all_of_map_map_type.dart
lib/model/section_map_all_of_map_resource.dart
lib/model/section_map_all_of_map_type_mapbox.dart
lib/model/section_quiz.dart
lib/model/section_type.dart
lib/model/slider_dto.dart
lib/model/token_dto.dart
@ -127,18 +143,12 @@ lib/model/video_dto.dart
lib/model/weather_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/agenda_dto_all_of_agenda_map_provider_test.dart
test/content_dto_resource_test.dart
test/geo_point_test.dart
test/map_dto_all_of_map_provider_test.dart
test/map_dto_all_of_map_type_mapbox_test.dart
test/map_dto_all_of_map_type_test.dart
test/ordered_translation_and_resource_dto_test.dart
test/puzzle_dto_all_of_puzzle_image_test.dart
test/question_dto_image_background_resource_type_test.dart
test/quiz_dto_test.dart
test/quiz_question_resource_test.dart
test/quiz_question_test.dart
test/resource_test.dart
test/section_map_api_test.dart
test/section_quiz_api_test.dart
test/geo_point_section_map_test.dart
test/quiz_question_section_quiz_test.dart
test/section_map_all_of_map_map_provider_test.dart
test/section_map_all_of_map_map_type_test.dart
test/section_map_all_of_map_resource_test.dart
test/section_map_all_of_map_type_mapbox_test.dart
test/section_map_test.dart
test/section_quiz_test.dart
test/section_test.dart

View File

@ -3,7 +3,7 @@ API Manager Service
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: Version Alpha 0
- API version: Version Alpha
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
@ -61,7 +61,7 @@ try {
## Documentation for API Endpoints
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
@ -145,6 +145,7 @@ Class | Method | HTTP request | Description
- [ExportConfigurationDTO](doc//ExportConfigurationDTO.md)
- [GeoPoint](doc//GeoPoint.md)
- [GeoPointDTO](doc//GeoPointDTO.md)
- [GeoPointSectionMap](doc//GeoPointSectionMap.md)
- [Instance](doc//Instance.md)
- [InstanceDTO](doc//InstanceDTO.md)
- [LoginDTO](doc//LoginDTO.md)
@ -165,12 +166,19 @@ Class | Method | HTTP request | Description
- [QuestionDTOImageBackgroundResourceType](doc//QuestionDTOImageBackgroundResourceType.md)
- [QuizDTO](doc//QuizDTO.md)
- [QuizQuestion](doc//QuizQuestion.md)
- [QuizQuestionResource](doc//QuizQuestionResource.md)
- [QuizQuestionSectionQuiz](doc//QuizQuestionSectionQuiz.md)
- [Resource](doc//Resource.md)
- [ResourceDTO](doc//ResourceDTO.md)
- [ResourceType](doc//ResourceType.md)
- [ResponseDTO](doc//ResponseDTO.md)
- [Section](doc//Section.md)
- [SectionDTO](doc//SectionDTO.md)
- [SectionMap](doc//SectionMap.md)
- [SectionMapAllOfMapMapProvider](doc//SectionMapAllOfMapMapProvider.md)
- [SectionMapAllOfMapMapType](doc//SectionMapAllOfMapMapType.md)
- [SectionMapAllOfMapResource](doc//SectionMapAllOfMapResource.md)
- [SectionMapAllOfMapTypeMapbox](doc//SectionMapAllOfMapTypeMapbox.md)
- [SectionQuiz](doc//SectionQuiz.md)
- [SectionType](doc//SectionType.md)
- [SliderDTO](doc//SliderDTO.md)
- [TokenDTO](doc//TokenDTO.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -22,6 +22,8 @@ Name | Type | Description | Notes
**longitude** | **String** | | [optional]
**imageResourceId** | **String** | | [optional]
**imageUrl** | **String** | | [optional]
**sectionMapId** | **String** | | [optional]
**sectionMap** | [**GeoPointSectionMap**](GeoPointSectionMap.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,42 @@
# manager_api_new.model.GeoPointSectionMap
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**label** | **String** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**configurationId** | **String** | |
**type** | [**SectionType**](SectionType.md) | |
**isSubSection** | **bool** | |
**instanceId** | **String** | |
**mapCategories** | [**List<CategorieDTO>**](CategorieDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**parentId** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**mapZoom** | **int** | | [optional]
**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional]
**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional]
**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional]
**mapPoints** | [**List<GeoPoint>**](GeoPoint.md) | | [optional] [default to const []]
**mapResourceId** | **String** | | [optional]
**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional]
**mapCenterLatitude** | **String** | | [optional]
**mapCenterLongitude** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -12,8 +12,10 @@ Name | Type | Description | Notes
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [default to const []]
**resourceId** | **String** | | [optional]
**resource** | [**QuizQuestionResource**](QuizQuestionResource.md) | | [optional]
**resource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional]
**order** | **int** | | [optional]
**sectionQuizId** | **String** | | [optional]
**sectionQuiz** | [**QuizQuestionSectionQuiz**](QuizQuestionSectionQuiz.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# manager_api_new.model.QuizQuestionSectionQuiz
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**label** | **String** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**configurationId** | **String** | |
**type** | [**SectionType**](SectionType.md) | |
**isSubSection** | **bool** | |
**instanceId** | **String** | |
**quizQuestions** | [**List<QuizQuestion>**](QuizQuestion.md) | | [default to const []]
**quizBadLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizMediumLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizGoodLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizGreatLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**parentId** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -0,0 +1,32 @@
# manager_api_new.model.Section
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**label** | **String** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**configurationId** | **String** | |
**type** | [**SectionType**](SectionType.md) | |
**isSubSection** | **bool** | |
**instanceId** | **String** | |
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**parentId** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -0,0 +1,42 @@
# manager_api_new.model.SectionMap
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**label** | **String** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**configurationId** | **String** | |
**type** | [**SectionType**](SectionType.md) | |
**isSubSection** | **bool** | |
**instanceId** | **String** | |
**mapCategories** | [**List<CategorieDTO>**](CategorieDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**parentId** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**mapZoom** | **int** | | [optional]
**mapMapType** | [**SectionMapAllOfMapMapType**](SectionMapAllOfMapMapType.md) | | [optional]
**mapTypeMapbox** | [**SectionMapAllOfMapTypeMapbox**](SectionMapAllOfMapTypeMapbox.md) | | [optional]
**mapMapProvider** | [**SectionMapAllOfMapMapProvider**](SectionMapAllOfMapMapProvider.md) | | [optional]
**mapPoints** | [**List<GeoPoint>**](GeoPoint.md) | | [optional] [default to const []]
**mapResourceId** | **String** | | [optional]
**mapResource** | [**SectionMapAllOfMapResource**](SectionMapAllOfMapResource.md) | | [optional]
**mapCenterLatitude** | **String** | | [optional]
**mapCenterLongitude** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.SectionMapAllOfMapMapProvider
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.SectionMapAllOfMapMapType
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# manager_api_new.model.SectionMapAllOfMapResource
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**type** | [**ResourceType**](ResourceType.md) | |
**label** | **String** | |
**instanceId** | **String** | |
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**url** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.SectionMapAllOfMapTypeMapbox
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -16,7 +16,7 @@ Method | HTTP request | Description
# **sectionMapCreate**
> GeoPoint sectionMapCreate(sectionId, geoPointDTO)
> GeoPointDTO sectionMapCreate(sectionId, geoPointDTO)
@ -47,7 +47,7 @@ Name | Type | Description | Notes
### Return type
[**GeoPoint**](GeoPoint.md)
[**GeoPointDTO**](GeoPointDTO.md)
### Authorization

View File

@ -0,0 +1,37 @@
# manager_api_new.model.SectionQuiz
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**label** | **String** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**configurationId** | **String** | |
**type** | [**SectionType**](SectionType.md) | |
**isSubSection** | **bool** | |
**instanceId** | **String** | |
**quizQuestions** | [**List<QuizQuestion>**](QuizQuestion.md) | | [default to const []]
**quizBadLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizMediumLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizGoodLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**quizGreatLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**parentId** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
All URIs are relative to *http://localhost:5000*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -50,6 +50,7 @@ part 'model/device_detail_dto.dart';
part 'model/export_configuration_dto.dart';
part 'model/geo_point.dart';
part 'model/geo_point_dto.dart';
part 'model/geo_point_section_map.dart';
part 'model/instance.dart';
part 'model/instance_dto.dart';
part 'model/login_dto.dart';
@ -70,12 +71,19 @@ part 'model/question_dto.dart';
part 'model/question_dto_image_background_resource_type.dart';
part 'model/quiz_dto.dart';
part 'model/quiz_question.dart';
part 'model/quiz_question_resource.dart';
part 'model/quiz_question_section_quiz.dart';
part 'model/resource.dart';
part 'model/resource_dto.dart';
part 'model/resource_type.dart';
part 'model/response_dto.dart';
part 'model/section.dart';
part 'model/section_dto.dart';
part 'model/section_map.dart';
part 'model/section_map_all_of_map_map_provider.dart';
part 'model/section_map_all_of_map_map_type.dart';
part 'model/section_map_all_of_map_resource.dart';
part 'model/section_map_all_of_map_type_mapbox.dart';
part 'model/section_quiz.dart';
part 'model/section_type.dart';
part 'model/slider_dto.dart';
part 'model/token_dto.dart';

View File

@ -55,7 +55,7 @@ class SectionMapApi {
/// * [String] sectionId (required):
///
/// * [GeoPointDTO] geoPointDTO (required):
Future<GeoPoint?> sectionMapCreate(
Future<GeoPointDTO?> sectionMapCreate(
String sectionId,
GeoPointDTO geoPointDTO,
) async {
@ -73,8 +73,8 @@ class SectionMapApi {
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GeoPoint',
) as GeoPoint;
'GeoPointDTO',
) as GeoPointDTO;
}
return null;
}

View File

@ -12,7 +12,7 @@ part of openapi.api;
class ApiClient {
ApiClient({
this.basePath = 'https://localhost:5001',
this.basePath = 'http://localhost:5000',
this.authentication,
});
@ -253,6 +253,8 @@ class ApiClient {
return GeoPoint.fromJson(value);
case 'GeoPointDTO':
return GeoPointDTO.fromJson(value);
case 'GeoPointSectionMap':
return GeoPointSectionMap.fromJson(value);
case 'Instance':
return Instance.fromJson(value);
case 'InstanceDTO':
@ -293,8 +295,8 @@ class ApiClient {
return QuizDTO.fromJson(value);
case 'QuizQuestion':
return QuizQuestion.fromJson(value);
case 'QuizQuestionResource':
return QuizQuestionResource.fromJson(value);
case 'QuizQuestionSectionQuiz':
return QuizQuestionSectionQuiz.fromJson(value);
case 'Resource':
return Resource.fromJson(value);
case 'ResourceDTO':
@ -303,8 +305,22 @@ class ApiClient {
return ResourceTypeTypeTransformer().decode(value);
case 'ResponseDTO':
return ResponseDTO.fromJson(value);
case 'Section':
return Section.fromJson(value);
case 'SectionDTO':
return SectionDTO.fromJson(value);
case 'SectionMap':
return SectionMap.fromJson(value);
case 'SectionMapAllOfMapMapProvider':
return SectionMapAllOfMapMapProvider.fromJson(value);
case 'SectionMapAllOfMapMapType':
return SectionMapAllOfMapMapType.fromJson(value);
case 'SectionMapAllOfMapResource':
return SectionMapAllOfMapResource.fromJson(value);
case 'SectionMapAllOfMapTypeMapbox':
return SectionMapAllOfMapTypeMapbox.fromJson(value);
case 'SectionQuiz':
return SectionQuiz.fromJson(value);
case 'SectionType':
return SectionTypeTypeTransformer().decode(value);
case 'SliderDTO':

View File

@ -27,6 +27,8 @@ class GeoPoint {
this.longitude,
this.imageResourceId,
this.imageUrl,
this.sectionMapId,
this.sectionMap,
});
int id;
@ -57,6 +59,10 @@ class GeoPoint {
String? imageUrl;
String? sectionMapId;
GeoPointSectionMap? sectionMap;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -74,7 +80,9 @@ class GeoPoint {
other.latitude == latitude &&
other.longitude == longitude &&
other.imageResourceId == imageResourceId &&
other.imageUrl == imageUrl;
other.imageUrl == imageUrl &&
other.sectionMapId == sectionMapId &&
other.sectionMap == sectionMap;
@override
int get hashCode =>
@ -92,11 +100,13 @@ class GeoPoint {
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
(imageUrl == null ? 0 : imageUrl!.hashCode);
(imageUrl == null ? 0 : imageUrl!.hashCode) +
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
(sectionMap == null ? 0 : sectionMap!.hashCode);
@override
String toString() =>
'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl]';
'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -134,6 +144,16 @@ class GeoPoint {
} else {
json[r'imageUrl'] = null;
}
if (this.sectionMapId != null) {
json[r'sectionMapId'] = this.sectionMapId;
} else {
json[r'sectionMapId'] = null;
}
if (this.sectionMap != null) {
json[r'sectionMap'] = this.sectionMap;
} else {
json[r'sectionMap'] = null;
}
return json;
}
@ -172,6 +192,8 @@ class GeoPoint {
longitude: mapValueOfType<String>(json, r'longitude'),
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
sectionMap: GeoPointSectionMap.fromJson(json[r'sectionMap']),
);
}
return null;

View File

@ -0,0 +1,424 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class GeoPointSectionMap {
/// Returns a new [GeoPointSectionMap] instance.
GeoPointSectionMap({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.mapCategories = const [],
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.mapZoom,
this.mapMapType,
this.mapTypeMapbox,
this.mapMapProvider,
this.mapPoints = const [],
this.mapResourceId,
this.mapResource,
this.mapCenterLatitude,
this.mapCenterLongitude,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<CategorieDTO> mapCategories;
List<TranslationDTO>? description;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? order;
String? imageId;
String? imageSource;
String? parentId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isBeacon;
int? beaconId;
String? latitude;
String? longitude;
int? meterZoneGPS;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? mapZoom;
SectionMapAllOfMapMapType? mapMapType;
SectionMapAllOfMapTypeMapbox? mapTypeMapbox;
SectionMapAllOfMapMapProvider? mapMapProvider;
List<GeoPoint>? mapPoints;
String? mapResourceId;
SectionMapAllOfMapResource? mapResource;
String? mapCenterLatitude;
String? mapCenterLongitude;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is GeoPointSectionMap &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
other.configurationId == configurationId &&
other.type == type &&
other.isSubSection == isSubSection &&
other.instanceId == instanceId &&
_deepEquality.equals(other.mapCategories, mapCategories) &&
_deepEquality.equals(other.description, description) &&
other.order == order &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.parentId == parentId &&
other.dateCreation == dateCreation &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS &&
other.mapZoom == mapZoom &&
other.mapMapType == mapMapType &&
other.mapTypeMapbox == mapTypeMapbox &&
other.mapMapProvider == mapMapProvider &&
_deepEquality.equals(other.mapPoints, mapPoints) &&
other.mapResourceId == mapResourceId &&
other.mapResource == mapResource &&
other.mapCenterLatitude == mapCenterLatitude &&
other.mapCenterLongitude == mapCenterLongitude;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(mapCategories.hashCode) +
(description == null ? 0 : description!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
(mapZoom == null ? 0 : mapZoom!.hashCode) +
(mapMapType == null ? 0 : mapMapType!.hashCode) +
(mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) +
(mapMapProvider == null ? 0 : mapMapProvider!.hashCode) +
(mapPoints == null ? 0 : mapPoints!.hashCode) +
(mapResourceId == null ? 0 : mapResourceId!.hashCode) +
(mapResource == null ? 0 : mapResource!.hashCode) +
(mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) +
(mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode);
@override
String toString() =>
'GeoPointSectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'label'] = this.label;
json[r'title'] = this.title;
json[r'configurationId'] = this.configurationId;
json[r'type'] = this.type;
json[r'isSubSection'] = this.isSubSection;
json[r'instanceId'] = this.instanceId;
json[r'mapCategories'] = this.mapCategories;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
if (this.mapZoom != null) {
json[r'mapZoom'] = this.mapZoom;
} else {
json[r'mapZoom'] = null;
}
if (this.mapMapType != null) {
json[r'mapMapType'] = this.mapMapType;
} else {
json[r'mapMapType'] = null;
}
if (this.mapTypeMapbox != null) {
json[r'mapTypeMapbox'] = this.mapTypeMapbox;
} else {
json[r'mapTypeMapbox'] = null;
}
if (this.mapMapProvider != null) {
json[r'mapMapProvider'] = this.mapMapProvider;
} else {
json[r'mapMapProvider'] = null;
}
if (this.mapPoints != null) {
json[r'mapPoints'] = this.mapPoints;
} else {
json[r'mapPoints'] = null;
}
if (this.mapResourceId != null) {
json[r'mapResourceId'] = this.mapResourceId;
} else {
json[r'mapResourceId'] = null;
}
if (this.mapResource != null) {
json[r'mapResource'] = this.mapResource;
} else {
json[r'mapResource'] = null;
}
if (this.mapCenterLatitude != null) {
json[r'mapCenterLatitude'] = this.mapCenterLatitude;
} else {
json[r'mapCenterLatitude'] = null;
}
if (this.mapCenterLongitude != null) {
json[r'mapCenterLongitude'] = this.mapCenterLongitude;
} else {
json[r'mapCenterLongitude'] = null;
}
return json;
}
/// Returns a new [GeoPointSectionMap] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GeoPointSectionMap? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "GeoPointSectionMap[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "GeoPointSectionMap[$key]" has a null value in JSON.');
});
return true;
}());
return GeoPointSectionMap(
id: mapValueOfType<String>(json, r'id')!,
label: mapValueOfType<String>(json, r'label')!,
title: TranslationDTO.listFromJson(json[r'title']),
configurationId: mapValueOfType<String>(json, r'configurationId')!,
type: SectionType.fromJson(json[r'type'])!,
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']),
description: TranslationDTO.listFromJson(json[r'description']),
order: mapValueOfType<int>(json, r'order'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
parentId: mapValueOfType<String>(json, r'parentId'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
mapZoom: mapValueOfType<int>(json, r'mapZoom'),
mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']),
mapTypeMapbox:
SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']),
mapMapProvider:
SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']),
mapPoints: GeoPoint.listFromJson(json[r'mapPoints']),
mapResourceId: mapValueOfType<String>(json, r'mapResourceId'),
mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']),
mapCenterLatitude: mapValueOfType<String>(json, r'mapCenterLatitude'),
mapCenterLongitude: mapValueOfType<String>(json, r'mapCenterLongitude'),
);
}
return null;
}
static List<GeoPointSectionMap> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <GeoPointSectionMap>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GeoPointSectionMap.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GeoPointSectionMap> mapFromJson(dynamic json) {
final map = <String, GeoPointSectionMap>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GeoPointSectionMap.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GeoPointSectionMap-objects as value to a dart map
static Map<String, List<GeoPointSectionMap>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<GeoPointSectionMap>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GeoPointSectionMap.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'label',
'title',
'configurationId',
'type',
'isSubSection',
'instanceId',
'mapCategories',
};
}

View File

@ -19,6 +19,8 @@ class QuizQuestion {
this.resourceId,
this.resource,
this.order,
this.sectionQuizId,
this.sectionQuiz,
});
int id;
@ -29,7 +31,7 @@ class QuizQuestion {
String? resourceId;
QuizQuestionResource? resource;
Resource? resource;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -39,6 +41,10 @@ class QuizQuestion {
///
int? order;
String? sectionQuizId;
QuizQuestionSectionQuiz? sectionQuiz;
@override
bool operator ==(Object other) =>
identical(this, other) ||
@ -48,7 +54,9 @@ class QuizQuestion {
_deepEquality.equals(other.responses, responses) &&
other.resourceId == resourceId &&
other.resource == resource &&
other.order == order;
other.order == order &&
other.sectionQuizId == sectionQuizId &&
other.sectionQuiz == sectionQuiz;
@override
int get hashCode =>
@ -58,11 +66,13 @@ class QuizQuestion {
(responses.hashCode) +
(resourceId == null ? 0 : resourceId!.hashCode) +
(resource == null ? 0 : resource!.hashCode) +
(order == null ? 0 : order!.hashCode);
(order == null ? 0 : order!.hashCode) +
(sectionQuizId == null ? 0 : sectionQuizId!.hashCode) +
(sectionQuiz == null ? 0 : sectionQuiz!.hashCode);
@override
String toString() =>
'QuizQuestion[id=$id, label=$label, responses=$responses, resourceId=$resourceId, resource=$resource, order=$order]';
'QuizQuestion[id=$id, label=$label, responses=$responses, resourceId=$resourceId, resource=$resource, order=$order, sectionQuizId=$sectionQuizId, sectionQuiz=$sectionQuiz]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -84,6 +94,16 @@ class QuizQuestion {
} else {
json[r'order'] = null;
}
if (this.sectionQuizId != null) {
json[r'sectionQuizId'] = this.sectionQuizId;
} else {
json[r'sectionQuizId'] = null;
}
if (this.sectionQuiz != null) {
json[r'sectionQuiz'] = this.sectionQuiz;
} else {
json[r'sectionQuiz'] = null;
}
return json;
}
@ -112,8 +132,10 @@ class QuizQuestion {
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
responses: ResponseDTO.listFromJson(json[r'responses']),
resourceId: mapValueOfType<String>(json, r'resourceId'),
resource: QuizQuestionResource.fromJson(json[r'resource']),
resource: Resource.fromJson(json[r'resource']),
order: mapValueOfType<int>(json, r'order'),
sectionQuizId: mapValueOfType<String>(json, r'sectionQuizId'),
sectionQuiz: QuizQuestionSectionQuiz.fromJson(json[r'sectionQuiz']),
);
}
return null;

View File

@ -0,0 +1,353 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class QuizQuestionSectionQuiz {
/// Returns a new [QuizQuestionSectionQuiz] instance.
QuizQuestionSectionQuiz({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.quizQuestions = const [],
this.quizBadLevel = const [],
this.quizMediumLevel = const [],
this.quizGoodLevel = const [],
this.quizGreatLevel = const [],
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<QuizQuestion> quizQuestions;
List<TranslationAndResourceDTO> quizBadLevel;
List<TranslationAndResourceDTO> quizMediumLevel;
List<TranslationAndResourceDTO> quizGoodLevel;
List<TranslationAndResourceDTO> quizGreatLevel;
List<TranslationDTO>? description;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? order;
String? imageId;
String? imageSource;
String? parentId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isBeacon;
int? beaconId;
String? latitude;
String? longitude;
int? meterZoneGPS;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is QuizQuestionSectionQuiz &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
other.configurationId == configurationId &&
other.type == type &&
other.isSubSection == isSubSection &&
other.instanceId == instanceId &&
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
_deepEquality.equals(other.quizBadLevel, quizBadLevel) &&
_deepEquality.equals(other.quizMediumLevel, quizMediumLevel) &&
_deepEquality.equals(other.quizGoodLevel, quizGoodLevel) &&
_deepEquality.equals(other.quizGreatLevel, quizGreatLevel) &&
_deepEquality.equals(other.description, description) &&
other.order == order &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.parentId == parentId &&
other.dateCreation == dateCreation &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(quizQuestions.hashCode) +
(quizBadLevel.hashCode) +
(quizMediumLevel.hashCode) +
(quizGoodLevel.hashCode) +
(quizGreatLevel.hashCode) +
(description == null ? 0 : description!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode);
@override
String toString() =>
'QuizQuestionSectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'label'] = this.label;
json[r'title'] = this.title;
json[r'configurationId'] = this.configurationId;
json[r'type'] = this.type;
json[r'isSubSection'] = this.isSubSection;
json[r'instanceId'] = this.instanceId;
json[r'quizQuestions'] = this.quizQuestions;
json[r'quizBadLevel'] = this.quizBadLevel;
json[r'quizMediumLevel'] = this.quizMediumLevel;
json[r'quizGoodLevel'] = this.quizGoodLevel;
json[r'quizGreatLevel'] = this.quizGreatLevel;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
return json;
}
/// Returns a new [QuizQuestionSectionQuiz] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static QuizQuestionSectionQuiz? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "QuizQuestionSectionQuiz[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "QuizQuestionSectionQuiz[$key]" has a null value in JSON.');
});
return true;
}());
return QuizQuestionSectionQuiz(
id: mapValueOfType<String>(json, r'id')!,
label: mapValueOfType<String>(json, r'label')!,
title: TranslationDTO.listFromJson(json[r'title']),
configurationId: mapValueOfType<String>(json, r'configurationId')!,
type: SectionType.fromJson(json[r'type'])!,
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
quizBadLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']),
quizMediumLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']),
quizGoodLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']),
quizGreatLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']),
description: TranslationDTO.listFromJson(json[r'description']),
order: mapValueOfType<int>(json, r'order'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
parentId: mapValueOfType<String>(json, r'parentId'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
);
}
return null;
}
static List<QuizQuestionSectionQuiz> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <QuizQuestionSectionQuiz>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = QuizQuestionSectionQuiz.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, QuizQuestionSectionQuiz> mapFromJson(dynamic json) {
final map = <String, QuizQuestionSectionQuiz>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = QuizQuestionSectionQuiz.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of QuizQuestionSectionQuiz-objects as value to a dart map
static Map<String, List<QuizQuestionSectionQuiz>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<QuizQuestionSectionQuiz>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = QuizQuestionSectionQuiz.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'label',
'title',
'configurationId',
'type',
'isSubSection',
'instanceId',
'quizQuestions',
'quizBadLevel',
'quizMediumLevel',
'quizGoodLevel',
'quizGreatLevel',
};
}

View File

@ -0,0 +1,309 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class Section {
/// Returns a new [Section] instance.
Section({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<TranslationDTO>? description;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? order;
String? imageId;
String? imageSource;
String? parentId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isBeacon;
int? beaconId;
String? latitude;
String? longitude;
int? meterZoneGPS;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Section &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
other.configurationId == configurationId &&
other.type == type &&
other.isSubSection == isSubSection &&
other.instanceId == instanceId &&
_deepEquality.equals(other.description, description) &&
other.order == order &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.parentId == parentId &&
other.dateCreation == dateCreation &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(description == null ? 0 : description!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode);
@override
String toString() =>
'Section[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'label'] = this.label;
json[r'title'] = this.title;
json[r'configurationId'] = this.configurationId;
json[r'type'] = this.type;
json[r'isSubSection'] = this.isSubSection;
json[r'instanceId'] = this.instanceId;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
return json;
}
/// Returns a new [Section] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static Section? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "Section[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "Section[$key]" has a null value in JSON.');
});
return true;
}());
return Section(
id: mapValueOfType<String>(json, r'id')!,
label: mapValueOfType<String>(json, r'label')!,
title: TranslationDTO.listFromJson(json[r'title']),
configurationId: mapValueOfType<String>(json, r'configurationId')!,
type: SectionType.fromJson(json[r'type'])!,
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
description: TranslationDTO.listFromJson(json[r'description']),
order: mapValueOfType<int>(json, r'order'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
parentId: mapValueOfType<String>(json, r'parentId'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
);
}
return null;
}
static List<Section> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <Section>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Section.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Section> mapFromJson(dynamic json) {
final map = <String, Section>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Section.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of Section-objects as value to a dart map
static Map<String, List<Section>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<Section>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = Section.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'label',
'title',
'configurationId',
'type',
'isSubSection',
'instanceId',
};
}

View File

@ -0,0 +1,424 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMap {
/// Returns a new [SectionMap] instance.
SectionMap({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.mapCategories = const [],
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.mapZoom,
this.mapMapType,
this.mapTypeMapbox,
this.mapMapProvider,
this.mapPoints = const [],
this.mapResourceId,
this.mapResource,
this.mapCenterLatitude,
this.mapCenterLongitude,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<CategorieDTO> mapCategories;
List<TranslationDTO>? description;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? order;
String? imageId;
String? imageSource;
String? parentId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isBeacon;
int? beaconId;
String? latitude;
String? longitude;
int? meterZoneGPS;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? mapZoom;
SectionMapAllOfMapMapType? mapMapType;
SectionMapAllOfMapTypeMapbox? mapTypeMapbox;
SectionMapAllOfMapMapProvider? mapMapProvider;
List<GeoPoint>? mapPoints;
String? mapResourceId;
SectionMapAllOfMapResource? mapResource;
String? mapCenterLatitude;
String? mapCenterLongitude;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SectionMap &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
other.configurationId == configurationId &&
other.type == type &&
other.isSubSection == isSubSection &&
other.instanceId == instanceId &&
_deepEquality.equals(other.mapCategories, mapCategories) &&
_deepEquality.equals(other.description, description) &&
other.order == order &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.parentId == parentId &&
other.dateCreation == dateCreation &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS &&
other.mapZoom == mapZoom &&
other.mapMapType == mapMapType &&
other.mapTypeMapbox == mapTypeMapbox &&
other.mapMapProvider == mapMapProvider &&
_deepEquality.equals(other.mapPoints, mapPoints) &&
other.mapResourceId == mapResourceId &&
other.mapResource == mapResource &&
other.mapCenterLatitude == mapCenterLatitude &&
other.mapCenterLongitude == mapCenterLongitude;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(mapCategories.hashCode) +
(description == null ? 0 : description!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
(mapZoom == null ? 0 : mapZoom!.hashCode) +
(mapMapType == null ? 0 : mapMapType!.hashCode) +
(mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) +
(mapMapProvider == null ? 0 : mapMapProvider!.hashCode) +
(mapPoints == null ? 0 : mapPoints!.hashCode) +
(mapResourceId == null ? 0 : mapResourceId!.hashCode) +
(mapResource == null ? 0 : mapResource!.hashCode) +
(mapCenterLatitude == null ? 0 : mapCenterLatitude!.hashCode) +
(mapCenterLongitude == null ? 0 : mapCenterLongitude!.hashCode);
@override
String toString() =>
'SectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'label'] = this.label;
json[r'title'] = this.title;
json[r'configurationId'] = this.configurationId;
json[r'type'] = this.type;
json[r'isSubSection'] = this.isSubSection;
json[r'instanceId'] = this.instanceId;
json[r'mapCategories'] = this.mapCategories;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
if (this.mapZoom != null) {
json[r'mapZoom'] = this.mapZoom;
} else {
json[r'mapZoom'] = null;
}
if (this.mapMapType != null) {
json[r'mapMapType'] = this.mapMapType;
} else {
json[r'mapMapType'] = null;
}
if (this.mapTypeMapbox != null) {
json[r'mapTypeMapbox'] = this.mapTypeMapbox;
} else {
json[r'mapTypeMapbox'] = null;
}
if (this.mapMapProvider != null) {
json[r'mapMapProvider'] = this.mapMapProvider;
} else {
json[r'mapMapProvider'] = null;
}
if (this.mapPoints != null) {
json[r'mapPoints'] = this.mapPoints;
} else {
json[r'mapPoints'] = null;
}
if (this.mapResourceId != null) {
json[r'mapResourceId'] = this.mapResourceId;
} else {
json[r'mapResourceId'] = null;
}
if (this.mapResource != null) {
json[r'mapResource'] = this.mapResource;
} else {
json[r'mapResource'] = null;
}
if (this.mapCenterLatitude != null) {
json[r'mapCenterLatitude'] = this.mapCenterLatitude;
} else {
json[r'mapCenterLatitude'] = null;
}
if (this.mapCenterLongitude != null) {
json[r'mapCenterLongitude'] = this.mapCenterLongitude;
} else {
json[r'mapCenterLongitude'] = null;
}
return json;
}
/// Returns a new [SectionMap] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionMap? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "SectionMap[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "SectionMap[$key]" has a null value in JSON.');
});
return true;
}());
return SectionMap(
id: mapValueOfType<String>(json, r'id')!,
label: mapValueOfType<String>(json, r'label')!,
title: TranslationDTO.listFromJson(json[r'title']),
configurationId: mapValueOfType<String>(json, r'configurationId')!,
type: SectionType.fromJson(json[r'type'])!,
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
mapCategories: CategorieDTO.listFromJson(json[r'mapCategories']),
description: TranslationDTO.listFromJson(json[r'description']),
order: mapValueOfType<int>(json, r'order'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
parentId: mapValueOfType<String>(json, r'parentId'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
mapZoom: mapValueOfType<int>(json, r'mapZoom'),
mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']),
mapTypeMapbox:
SectionMapAllOfMapTypeMapbox.fromJson(json[r'mapTypeMapbox']),
mapMapProvider:
SectionMapAllOfMapMapProvider.fromJson(json[r'mapMapProvider']),
mapPoints: GeoPoint.listFromJson(json[r'mapPoints']),
mapResourceId: mapValueOfType<String>(json, r'mapResourceId'),
mapResource: SectionMapAllOfMapResource.fromJson(json[r'mapResource']),
mapCenterLatitude: mapValueOfType<String>(json, r'mapCenterLatitude'),
mapCenterLongitude: mapValueOfType<String>(json, r'mapCenterLongitude'),
);
}
return null;
}
static List<SectionMap> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <SectionMap>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionMap.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionMap> mapFromJson(dynamic json) {
final map = <String, SectionMap>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionMap.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionMap-objects as value to a dart map
static Map<String, List<SectionMap>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<SectionMap>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionMap.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'label',
'title',
'configurationId',
'type',
'isSubSection',
'instanceId',
'mapCategories',
};
}

View File

@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMapAllOfMapMapProvider {
/// Returns a new [SectionMapAllOfMapMapProvider] instance.
SectionMapAllOfMapMapProvider();
/*@override
bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapProvider &&
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
*/
@override
String toString() => 'SectionMapAllOfMapMapProvider[]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
return json;
}
/// Returns a new [SectionMapAllOfMapMapProvider] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionMapAllOfMapMapProvider? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapProvider[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SectionMapAllOfMapMapProvider[$key]" has a null value in JSON.');
});
return true;
}());
return SectionMapAllOfMapMapProvider(
);
}
return null;
}
static List<SectionMapAllOfMapMapProvider> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SectionMapAllOfMapMapProvider>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionMapAllOfMapMapProvider.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionMapAllOfMapMapProvider> mapFromJson(dynamic json) {
final map = <String, SectionMapAllOfMapMapProvider>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionMapAllOfMapMapProvider.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionMapAllOfMapMapProvider-objects as value to a dart map
static Map<String, List<SectionMapAllOfMapMapProvider>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SectionMapAllOfMapMapProvider>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionMapAllOfMapMapProvider.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMapAllOfMapMapType {
/// Returns a new [SectionMapAllOfMapMapType] instance.
SectionMapAllOfMapMapType();
/*@override
bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapMapType &&
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
*/
@override
String toString() => 'SectionMapAllOfMapMapType[]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
return json;
}
/// Returns a new [SectionMapAllOfMapMapType] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionMapAllOfMapMapType? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SectionMapAllOfMapMapType[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SectionMapAllOfMapMapType[$key]" has a null value in JSON.');
});
return true;
}());
return SectionMapAllOfMapMapType(
);
}
return null;
}
static List<SectionMapAllOfMapMapType> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SectionMapAllOfMapMapType>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionMapAllOfMapMapType.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionMapAllOfMapMapType> mapFromJson(dynamic json) {
final map = <String, SectionMapAllOfMapMapType>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionMapAllOfMapMapType.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionMapAllOfMapMapType-objects as value to a dart map
static Map<String, List<SectionMapAllOfMapMapType>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SectionMapAllOfMapMapType>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionMapAllOfMapMapType.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,174 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMapAllOfMapResource {
/// Returns a new [SectionMapAllOfMapResource] instance.
SectionMapAllOfMapResource({
required this.id,
required this.type,
required this.label,
required this.instanceId,
this.dateCreation,
this.url,
});
String id;
ResourceType type;
String label;
String instanceId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
String? url;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SectionMapAllOfMapResource &&
other.id == id &&
other.type == type &&
other.label == label &&
other.instanceId == instanceId &&
other.dateCreation == dateCreation &&
other.url == url;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(type.hashCode) +
(label.hashCode) +
(instanceId.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(url == null ? 0 : url!.hashCode);
@override
String toString() =>
'SectionMapAllOfMapResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'type'] = this.type;
json[r'label'] = this.label;
json[r'instanceId'] = this.instanceId;
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.url != null) {
json[r'url'] = this.url;
} else {
json[r'url'] = null;
}
return json;
}
/// Returns a new [SectionMapAllOfMapResource] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionMapAllOfMapResource? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "SectionMapAllOfMapResource[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "SectionMapAllOfMapResource[$key]" has a null value in JSON.');
});
return true;
}());
return SectionMapAllOfMapResource(
id: mapValueOfType<String>(json, r'id')!,
type: ResourceType.fromJson(json[r'type'])!,
label: mapValueOfType<String>(json, r'label')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
dateCreation: mapDateTime(json, r'dateCreation', r''),
url: mapValueOfType<String>(json, r'url'),
);
}
return null;
}
static List<SectionMapAllOfMapResource> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <SectionMapAllOfMapResource>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionMapAllOfMapResource.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionMapAllOfMapResource> mapFromJson(dynamic json) {
final map = <String, SectionMapAllOfMapResource>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionMapAllOfMapResource.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionMapAllOfMapResource-objects as value to a dart map
static Map<String, List<SectionMapAllOfMapResource>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<SectionMapAllOfMapResource>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionMapAllOfMapResource.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'type',
'label',
'instanceId',
};
}

View File

@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMapAllOfMapTypeMapbox {
/// Returns a new [SectionMapAllOfMapTypeMapbox] instance.
SectionMapAllOfMapTypeMapbox();
/*@override
bool operator ==(Object other) => identical(this, other) || other is SectionMapAllOfMapTypeMapbox &&
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
*/
@override
String toString() => 'SectionMapAllOfMapTypeMapbox[]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
return json;
}
/// Returns a new [SectionMapAllOfMapTypeMapbox] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionMapAllOfMapTypeMapbox? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SectionMapAllOfMapTypeMapbox[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SectionMapAllOfMapTypeMapbox[$key]" has a null value in JSON.');
});
return true;
}());
return SectionMapAllOfMapTypeMapbox(
);
}
return null;
}
static List<SectionMapAllOfMapTypeMapbox> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SectionMapAllOfMapTypeMapbox>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionMapAllOfMapTypeMapbox.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionMapAllOfMapTypeMapbox> mapFromJson(dynamic json) {
final map = <String, SectionMapAllOfMapTypeMapbox>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionMapAllOfMapTypeMapbox.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionMapAllOfMapTypeMapbox-objects as value to a dart map
static Map<String, List<SectionMapAllOfMapTypeMapbox>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SectionMapAllOfMapTypeMapbox>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionMapAllOfMapTypeMapbox.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,353 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionQuiz {
/// Returns a new [SectionQuiz] instance.
SectionQuiz({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.quizQuestions = const [],
this.quizBadLevel = const [],
this.quizMediumLevel = const [],
this.quizGoodLevel = const [],
this.quizGreatLevel = const [],
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<QuizQuestion> quizQuestions;
List<TranslationAndResourceDTO> quizBadLevel;
List<TranslationAndResourceDTO> quizMediumLevel;
List<TranslationAndResourceDTO> quizGoodLevel;
List<TranslationAndResourceDTO> quizGreatLevel;
List<TranslationDTO>? description;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? order;
String? imageId;
String? imageSource;
String? parentId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isBeacon;
int? beaconId;
String? latitude;
String? longitude;
int? meterZoneGPS;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SectionQuiz &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
other.configurationId == configurationId &&
other.type == type &&
other.isSubSection == isSubSection &&
other.instanceId == instanceId &&
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
_deepEquality.equals(other.quizBadLevel, quizBadLevel) &&
_deepEquality.equals(other.quizMediumLevel, quizMediumLevel) &&
_deepEquality.equals(other.quizGoodLevel, quizGoodLevel) &&
_deepEquality.equals(other.quizGreatLevel, quizGreatLevel) &&
_deepEquality.equals(other.description, description) &&
other.order == order &&
other.imageId == imageId &&
other.imageSource == imageSource &&
other.parentId == parentId &&
other.dateCreation == dateCreation &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(quizQuestions.hashCode) +
(quizBadLevel.hashCode) +
(quizMediumLevel.hashCode) +
(quizGoodLevel.hashCode) +
(quizGreatLevel.hashCode) +
(description == null ? 0 : description!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(imageId == null ? 0 : imageId!.hashCode) +
(imageSource == null ? 0 : imageSource!.hashCode) +
(parentId == null ? 0 : parentId!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode);
@override
String toString() =>
'SectionQuiz[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, quizQuestions=$quizQuestions, quizBadLevel=$quizBadLevel, quizMediumLevel=$quizMediumLevel, quizGoodLevel=$quizGoodLevel, quizGreatLevel=$quizGreatLevel, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'label'] = this.label;
json[r'title'] = this.title;
json[r'configurationId'] = this.configurationId;
json[r'type'] = this.type;
json[r'isSubSection'] = this.isSubSection;
json[r'instanceId'] = this.instanceId;
json[r'quizQuestions'] = this.quizQuestions;
json[r'quizBadLevel'] = this.quizBadLevel;
json[r'quizMediumLevel'] = this.quizMediumLevel;
json[r'quizGoodLevel'] = this.quizGoodLevel;
json[r'quizGreatLevel'] = this.quizGreatLevel;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.imageId != null) {
json[r'imageId'] = this.imageId;
} else {
json[r'imageId'] = null;
}
if (this.imageSource != null) {
json[r'imageSource'] = this.imageSource;
} else {
json[r'imageSource'] = null;
}
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = null;
}
if (this.dateCreation != null) {
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
} else {
json[r'dateCreation'] = null;
}
if (this.isBeacon != null) {
json[r'isBeacon'] = this.isBeacon;
} else {
json[r'isBeacon'] = null;
}
if (this.beaconId != null) {
json[r'beaconId'] = this.beaconId;
} else {
json[r'beaconId'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
json[r'longitude'] = null;
}
if (this.meterZoneGPS != null) {
json[r'meterZoneGPS'] = this.meterZoneGPS;
} else {
json[r'meterZoneGPS'] = null;
}
return json;
}
/// Returns a new [SectionQuiz] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionQuiz? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "SectionQuiz[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "SectionQuiz[$key]" has a null value in JSON.');
});
return true;
}());
return SectionQuiz(
id: mapValueOfType<String>(json, r'id')!,
label: mapValueOfType<String>(json, r'label')!,
title: TranslationDTO.listFromJson(json[r'title']),
configurationId: mapValueOfType<String>(json, r'configurationId')!,
type: SectionType.fromJson(json[r'type'])!,
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
instanceId: mapValueOfType<String>(json, r'instanceId')!,
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
quizBadLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizBadLevel']),
quizMediumLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizMediumLevel']),
quizGoodLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizGoodLevel']),
quizGreatLevel:
TranslationAndResourceDTO.listFromJson(json[r'quizGreatLevel']),
description: TranslationDTO.listFromJson(json[r'description']),
order: mapValueOfType<int>(json, r'order'),
imageId: mapValueOfType<String>(json, r'imageId'),
imageSource: mapValueOfType<String>(json, r'imageSource'),
parentId: mapValueOfType<String>(json, r'parentId'),
dateCreation: mapDateTime(json, r'dateCreation', r''),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'),
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
);
}
return null;
}
static List<SectionQuiz> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <SectionQuiz>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionQuiz.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionQuiz> mapFromJson(dynamic json) {
final map = <String, SectionQuiz>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionQuiz.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionQuiz-objects as value to a dart map
static Map<String, List<SectionQuiz>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<SectionQuiz>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionQuiz.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'label',
'title',
'configurationId',
'type',
'isSubSection',
'instanceId',
'quizQuestions',
'quizBadLevel',
'quizMediumLevel',
'quizGoodLevel',
'quizGreatLevel',
};
}

View File

@ -0,0 +1,159 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for GeoPointSectionMap
void main() {
// final instance = GeoPointSectionMap();
group('test GeoPointSectionMap', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// List<CategorieDTO> mapCategories (default value: const [])
test('to test the property `mapCategories`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
// int mapZoom
test('to test the property `mapZoom`', () async {
// TODO
});
// SectionMapAllOfMapMapType mapMapType
test('to test the property `mapMapType`', () async {
// TODO
});
// SectionMapAllOfMapTypeMapbox mapTypeMapbox
test('to test the property `mapTypeMapbox`', () async {
// TODO
});
// SectionMapAllOfMapMapProvider mapMapProvider
test('to test the property `mapMapProvider`', () async {
// TODO
});
// List<GeoPoint> mapPoints (default value: const [])
test('to test the property `mapPoints`', () async {
// TODO
});
// String mapResourceId
test('to test the property `mapResourceId`', () async {
// TODO
});
// SectionMapAllOfMapResource mapResource
test('to test the property `mapResource`', () async {
// TODO
});
// String mapCenterLatitude
test('to test the property `mapCenterLatitude`', () async {
// TODO
});
// String mapCenterLongitude
test('to test the property `mapCenterLongitude`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,134 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for QuizQuestionSectionQuiz
void main() {
// final instance = QuizQuestionSectionQuiz();
group('test QuizQuestionSectionQuiz', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// List<QuizQuestion> quizQuestions (default value: const [])
test('to test the property `quizQuestions`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizBadLevel (default value: const [])
test('to test the property `quizBadLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizMediumLevel (default value: const [])
test('to test the property `quizMediumLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizGoodLevel (default value: const [])
test('to test the property `quizGoodLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizGreatLevel (default value: const [])
test('to test the property `quizGreatLevel`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,19 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionMapAllOfMapMapProvider
void main() {
// final instance = SectionMapAllOfMapMapProvider();
group('test SectionMapAllOfMapMapProvider', () {});
}

View File

@ -0,0 +1,19 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionMapAllOfMapMapType
void main() {
// final instance = SectionMapAllOfMapMapType();
group('test SectionMapAllOfMapMapType', () {});
}

View File

@ -0,0 +1,49 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionMapAllOfMapResource
void main() {
// final instance = SectionMapAllOfMapResource();
group('test SectionMapAllOfMapResource', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// ResourceType type
test('to test the property `type`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// String url
test('to test the property `url`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,19 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionMapAllOfMapTypeMapbox
void main() {
// final instance = SectionMapAllOfMapTypeMapbox();
group('test SectionMapAllOfMapTypeMapbox', () {});
}

View File

@ -0,0 +1,159 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionMap
void main() {
// final instance = SectionMap();
group('test SectionMap', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// List<CategorieDTO> mapCategories (default value: const [])
test('to test the property `mapCategories`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
// int mapZoom
test('to test the property `mapZoom`', () async {
// TODO
});
// SectionMapAllOfMapMapType mapMapType
test('to test the property `mapMapType`', () async {
// TODO
});
// SectionMapAllOfMapTypeMapbox mapTypeMapbox
test('to test the property `mapTypeMapbox`', () async {
// TODO
});
// SectionMapAllOfMapMapProvider mapMapProvider
test('to test the property `mapMapProvider`', () async {
// TODO
});
// List<GeoPoint> mapPoints (default value: const [])
test('to test the property `mapPoints`', () async {
// TODO
});
// String mapResourceId
test('to test the property `mapResourceId`', () async {
// TODO
});
// SectionMapAllOfMapResource mapResource
test('to test the property `mapResource`', () async {
// TODO
});
// String mapCenterLatitude
test('to test the property `mapCenterLatitude`', () async {
// TODO
});
// String mapCenterLongitude
test('to test the property `mapCenterLongitude`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,134 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for SectionQuiz
void main() {
// final instance = SectionQuiz();
group('test SectionQuiz', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// List<QuizQuestion> quizQuestions (default value: const [])
test('to test the property `quizQuestions`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizBadLevel (default value: const [])
test('to test the property `quizBadLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizMediumLevel (default value: const [])
test('to test the property `quizMediumLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizGoodLevel (default value: const [])
test('to test the property `quizGoodLevel`', () async {
// TODO
});
// List<TranslationAndResourceDTO> quizGreatLevel (default value: const [])
test('to test the property `quizGreatLevel`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,109 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api_new/api.dart';
import 'package:test/test.dart';
// tests for Section
void main() {
// final instance = Section();
group('test Section', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
});
}