Updated generation (game etc)

This commit is contained in:
Thomas Fransolet 2025-11-27 15:47:21 +01:00
parent 1de0e2ec27
commit 5c318b39dd
43 changed files with 2194 additions and 185 deletions

View File

@ -19,12 +19,14 @@ IconData getSectionIcon(elementType) {
return Icons.article_outlined;
case SectionType.Pdf:
return Icons.picture_as_pdf_outlined;
case SectionType.Puzzle:
return Icons.extension;
case SectionType.Game:
return Icons.sports_esports;
case SectionType.Agenda:
return Icons.calendar_month_outlined;
case SectionType.Weather:
return Icons.sunny;
case SectionType.Event:
return Icons.event;
}
return Icons.question_mark;
}

View File

@ -42,15 +42,28 @@ class MultiStringInputContainer extends StatelessWidget {
final appContext = Provider.of<AppContext>(context);
final managerAppContext = appContext.getContext();
return FormField<List<TranslationDTO>>(
initialValue: initialValue,
builder: (state) {
return InputDecorator(
decoration: InputDecoration(
labelText: label,
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
contentPadding: EdgeInsets.symmetric(horizontal: 25, vertical: 20),
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
label,
style: const TextStyle(
fontWeight: FontWeight.w400,
fontSize: 16,
),
),
),
const SizedBox(height: 8, width: 10),
Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
/*decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.grey.shade400, width: 1.2),
),*/
child: InkWell(
onTap: () {
List<TranslationDTO> newValues = [];
@ -95,20 +108,24 @@ class MultiStringInputContainer extends StatelessWidget {
},
child: Container(
height: 50,
width: 180,
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(50),
),
alignment: Alignment.center,
child: AutoSizeText(
child: Text(
resourceTypes == null ? "Changer traductions" : "Changer ressources",
style: TextStyle(color: kWhite, fontSize: fontSize),
maxLines: 1,
style: const TextStyle(
color: kWhite,
fontWeight: FontWeight.w400,
fontSize: 16,
),
),
),
),
);
},
)
),
],
);
}
}

View File

@ -35,12 +35,12 @@ class StringInputContainer extends StatelessWidget {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: AutoSizeText(
child: Text(
label,
style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.w300),
maxLines: 2,
maxFontSize: fontSize,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.w400,
fontSize: 16,
),
),
),
Padding(

View File

@ -8,12 +8,12 @@ import 'dart:convert';
import 'package:manager_app/constants.dart';
class PuzzleConfig extends StatefulWidget {
class GameConfig extends StatefulWidget {
final String? color;
final String? label;
final PuzzleDTO initialValue;
final ValueChanged<PuzzleDTO> onChanged;
const PuzzleConfig({
final GameDTO initialValue;
final ValueChanged<GameDTO> onChanged;
const GameConfig({
Key? key,
this.color,
this.label,
@ -22,21 +22,21 @@ class PuzzleConfig extends StatefulWidget {
}) : super(key: key);
@override
_PuzzleConfigState createState() => _PuzzleConfigState();
_GameConfigState createState() => _GameConfigState();
}
class _PuzzleConfigState extends State<PuzzleConfig> {
late PuzzleDTO puzzleDTO;
class _GameConfigState extends State<GameConfig> {
late GameDTO gameDTO;
@override
void initState() {
PuzzleDTO test = widget.initialValue;
GameDTO test = widget.initialValue;
/*if(test.puzzleImage == null) {
test.puzzleImage = ResourceDTO();
}*/
puzzleDTO = test;
puzzleDTO.rows = puzzleDTO.rows == null ? 3 : puzzleDTO.rows;
puzzleDTO.cols = puzzleDTO.cols == null ? 3 : puzzleDTO.cols;
gameDTO = test;
gameDTO.rows = gameDTO.rows == null ? 3 : gameDTO.rows;
gameDTO.cols = gameDTO.cols == null ? 3 : gameDTO.cols;
super.initState();
}
@ -52,18 +52,18 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
children: [
ResourceInputContainer(
label: "Image du puzzle :",
initialValue: puzzleDTO.puzzleImageId == null ? '': puzzleDTO.puzzleImageId,
initialValue: gameDTO.puzzleImageId == null ? '': gameDTO.puzzleImageId,
onChanged: (ResourceDTO resourceDTO) {
setState(() {
if(resourceDTO.id == null)
{
puzzleDTO.puzzleImageId = null;
puzzleDTO.puzzleImage = null;
gameDTO.puzzleImageId = null;
gameDTO.puzzleImage = null;
} else {
puzzleDTO.puzzleImageId = resourceDTO.id;
puzzleDTO.puzzleImage = resourceDTO;
gameDTO.puzzleImageId = resourceDTO.id;
gameDTO.puzzleImage = resourceDTO;
}
widget.onChanged(puzzleDTO);
widget.onChanged(gameDTO);
});
}
),
@ -74,13 +74,13 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
modalLabel: "Message départ",
fontSize: 20,
color: kPrimaryColor,
initialValue: puzzleDTO.messageDebut != null ? puzzleDTO.messageDebut! : [],
initialValue: gameDTO.messageDebut != null ? gameDTO.messageDebut! : [],
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.VideoUrl, ResourceType.Video, ResourceType.Audio],
onGetResult: (value) {
if (puzzleDTO.messageDebut != value) {
if (gameDTO.messageDebut != value) {
setState(() {
puzzleDTO.messageDebut = value;
widget.onChanged(puzzleDTO);
gameDTO.messageDebut = value;
widget.onChanged(gameDTO);
});
}
},
@ -95,13 +95,13 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
modalLabel: "Message fin",
fontSize: 20,
color: kPrimaryColor,
initialValue: puzzleDTO.messageFin != null ? puzzleDTO.messageFin! : [],
initialValue: gameDTO.messageFin != null ? gameDTO.messageFin! : [],
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.VideoUrl, ResourceType.Video, ResourceType.Audio],
onGetResult: (value) {
if (puzzleDTO.messageFin != value) {
if (gameDTO.messageFin != value) {
setState(() {
puzzleDTO.messageFin = value;
widget.onChanged(puzzleDTO);
gameDTO.messageFin = value;
widget.onChanged(gameDTO);
});
}
},
@ -118,14 +118,14 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
height: 100,
child: NumberInputContainer(
label: "Nombre de lignes :",
initialValue: puzzleDTO.rows!,
initialValue: gameDTO.rows!,
isSmall: true,
maxLength: 2,
onChanged: (value) {
try {
puzzleDTO.rows = int.parse(value);
gameDTO.rows = int.parse(value);
setState(() {
widget.onChanged(puzzleDTO);
widget.onChanged(gameDTO);
});
} catch (e) {
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);
@ -137,14 +137,14 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
height: 100,
child: NumberInputContainer(
label: "Nombre de colonnes :",
initialValue: puzzleDTO.cols!,
initialValue: gameDTO.cols!,
isSmall: true,
maxLength: 2,
onChanged: (value) {
try {
puzzleDTO.cols = int.parse(value);
gameDTO.cols = int.parse(value);
setState(() {
widget.onChanged(puzzleDTO);
widget.onChanged(gameDTO);
});
} catch (e) {
showNotification(Colors.orange, kWhite, 'Cela doit être un chiffre', context, null);

View File

@ -158,12 +158,12 @@ class _MapConfigState extends State<MapConfig> {
),
GeolocInputContainer(
label: "Point de centrage:",
initialValue: mapDTO.latitude != null && mapDTO.longitude != null ? LatLong(double.parse(mapDTO.latitude!), double.parse(mapDTO.longitude!)) : null,
initialValue: mapDTO.centerLatitude != null && mapDTO.centerLongitude != null ? LatLong(double.parse(mapDTO.centerLatitude!), double.parse(mapDTO.centerLongitude!)) : null,
color: kPrimaryColor,
onChanged: (LatLong? localisation) {
if(localisation != null) {
mapDTO.longitude = localisation.longitude.toString();
mapDTO.latitude = localisation.latitude.toString();
mapDTO.centerLongitude = localisation.longitude.toString();
mapDTO.centerLatitude = localisation.latitude.toString();
}
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);

View File

@ -210,8 +210,8 @@ class _ListViewCardSubSection extends State<ListViewCardSubSection> {
case SectionType.Pdf:
castedDetail = sectionDetailDTO is PdfDTO ? sectionDetailDTO : PdfDTO.fromJson(sectionDetailDTO)!;
break;
case SectionType.Puzzle:
castedDetail = sectionDetailDTO is PuzzleDTO ? sectionDetailDTO : PuzzleDTO.fromJson(sectionDetailDTO)!;
case SectionType.Game:
castedDetail = sectionDetailDTO is GameDTO ? sectionDetailDTO : GameDTO.fromJson(sectionDetailDTO)!;
break;
case SectionType.Agenda:
castedDetail = sectionDetailDTO is AgendaDTO ? sectionDetailDTO : AgendaDTO.fromJson(sectionDetailDTO)!;

View File

@ -5,8 +5,9 @@ import 'package:manager_app/Components/rounded_button.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Agenda/agenda_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Article/article_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Game/game_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Map/map_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/PDF/PDF_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Puzzle/puzzle_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Quizz/quizz_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/slider_config.dart';
import 'package:manager_app/Screens/Configurations/Section/SubSection/Video/video_config.dart';
@ -16,7 +17,6 @@ import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
import '../Map/map_config.dart';
import 'menu_config.dart';
void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext appContext, BuildContext context, Object rawSubSectionData) {
@ -251,13 +251,13 @@ getSpecificData(SectionDTO subSectionDTO, Object? rawSectionData, Object section
onChanged(changedPDF);
},
);
case SectionType.Puzzle:
PuzzleDTO puzzleDTO = PuzzleDTO.fromJson(rawSectionData)!;
sectionDetailDTO = puzzleDTO;
return PuzzleConfig(
initialValue: puzzleDTO,
onChanged: (PuzzleDTO updatedPuzzle) {
onChanged(updatedPuzzle);
case SectionType.Game:
GameDTO gameDTO = GameDTO.fromJson(rawSectionData)!;
sectionDetailDTO = gameDTO;
return GameConfig(
initialValue: gameDTO,
onChanged: (GameDTO updatedGame) {
onChanged(updatedGame);
},
);
case SectionType.Agenda:

View File

@ -30,7 +30,7 @@ import 'SubSection/Article/download_pdf.dart';
import 'SubSection/Map/map_config.dart';
import 'SubSection/Menu/menu_config.dart';
import 'SubSection/PDF/PDF_config.dart';
import 'SubSection/Puzzle/puzzle_config.dart';
import 'SubSection/Game/game_config.dart';
import 'SubSection/Quizz/quizz_config.dart';
import 'SubSection/Slider/slider_config.dart';
import 'package:qr_flutter/qr_flutter.dart';
@ -252,20 +252,23 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
},
),
),
MultiStringInputContainer(
label: "Titre affiché:",
modalLabel: "Titre",
color: kPrimaryColor,
initialValue: sectionDTO.title!,
onGetResult: (value) {
if (sectionDTO.title! != value) {
sectionDTO.title = value;
save(true, appContext);
}
},
maxLines: 1,
isHTML: true,
isTitle: true,
SizedBox(
height: 100,
child: MultiStringInputContainer(
label: "Titre affiché:",
modalLabel: "Titre",
color: kPrimaryColor,
initialValue: sectionDTO.title!,
onGetResult: (value) {
if (sectionDTO.title! != value) {
sectionDTO.title = value;
save(true, appContext);
}
},
maxLines: 1,
isHTML: true,
isTitle: true,
),
),
/*if(!(appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
MultiStringInputContainer(
@ -500,13 +503,13 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
sectionDetailDTO = changedPDF;
},
);
case SectionType.Puzzle:
PuzzleDTO puzzleDTO = PuzzleDTO.fromJson(rawSectionData)!;
sectionDetailDTO = puzzleDTO;
return PuzzleConfig(
initialValue: puzzleDTO,
onChanged: (PuzzleDTO updatedPuzzle) {
sectionDetailDTO = updatedPuzzle;
case SectionType.Game:
GameDTO gameDTO = GameDTO.fromJson(rawSectionData)!;
sectionDetailDTO = gameDTO;
return GameConfig(
initialValue: gameDTO,
onChanged: (GameDTO updatedGame) {
sectionDetailDTO = updatedGame;
},
);
case SectionType.Agenda:
@ -693,25 +696,25 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
(sectionDetailDTO as PdfDTO).longitude = sectionDTO.longitude;
(sectionDetailDTO as PdfDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
break;
case SectionType.Puzzle:
(sectionDetailDTO as PuzzleDTO).id = sectionDTO.id;
(sectionDetailDTO as PuzzleDTO).order = sectionDTO.order;
(sectionDetailDTO as PuzzleDTO).dateCreation = sectionDTO.dateCreation;
(sectionDetailDTO as PuzzleDTO).type = sectionDTO.type;
(sectionDetailDTO as PuzzleDTO).instanceId = sectionDTO.instanceId;
(sectionDetailDTO as PuzzleDTO).configurationId = sectionDTO.configurationId;
(sectionDetailDTO as PuzzleDTO).isSubSection = sectionDTO.isSubSection;
(sectionDetailDTO as PuzzleDTO).parentId = sectionDTO.parentId;
(sectionDetailDTO as PuzzleDTO).label = sectionDTO.label;
(sectionDetailDTO as PuzzleDTO).title = sectionDTO.title;
(sectionDetailDTO as PuzzleDTO).description = sectionDTO.description;
(sectionDetailDTO as PuzzleDTO).imageId = sectionDTO.imageId;
(sectionDetailDTO as PuzzleDTO).imageSource = sectionDTO.imageSource;
(sectionDetailDTO as PuzzleDTO).isBeacon = sectionDTO.isBeacon;
(sectionDetailDTO as PuzzleDTO).beaconId = sectionDTO.beaconId;
(sectionDetailDTO as PuzzleDTO).latitude = sectionDTO.latitude;
(sectionDetailDTO as PuzzleDTO).longitude = sectionDTO.longitude;
(sectionDetailDTO as PuzzleDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
case SectionType.Game:
(sectionDetailDTO as GameDTO).id = sectionDTO.id;
(sectionDetailDTO as GameDTO).order = sectionDTO.order;
(sectionDetailDTO as GameDTO).dateCreation = sectionDTO.dateCreation;
(sectionDetailDTO as GameDTO).type = sectionDTO.type;
(sectionDetailDTO as GameDTO).instanceId = sectionDTO.instanceId;
(sectionDetailDTO as GameDTO).configurationId = sectionDTO.configurationId;
(sectionDetailDTO as GameDTO).isSubSection = sectionDTO.isSubSection;
(sectionDetailDTO as GameDTO).parentId = sectionDTO.parentId;
(sectionDetailDTO as GameDTO).label = sectionDTO.label;
(sectionDetailDTO as GameDTO).title = sectionDTO.title;
(sectionDetailDTO as GameDTO).description = sectionDTO.description;
(sectionDetailDTO as GameDTO).imageId = sectionDTO.imageId;
(sectionDetailDTO as GameDTO).imageSource = sectionDTO.imageSource;
(sectionDetailDTO as GameDTO).isBeacon = sectionDTO.isBeacon;
(sectionDetailDTO as GameDTO).beaconId = sectionDTO.beaconId;
(sectionDetailDTO as GameDTO).latitude = sectionDTO.latitude;
(sectionDetailDTO as GameDTO).longitude = sectionDTO.longitude;
(sectionDetailDTO as GameDTO).meterZoneGPS = sectionDTO.meterZoneGPS;
break;
case SectionType.Agenda:
(sectionDetailDTO as AgendaDTO).id = sectionDTO.id;

View File

@ -1,4 +1,4 @@
// Openapi Generator last run: : 2025-09-18T22:38:26.708661
// Openapi Generator last run: : 2025-11-21T15:08:31.489558
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(

View File

@ -4,7 +4,7 @@
"info": {
"title": "Manager Service",
"description": "API Manager Service",
"version": "Version Alpha 1.1"
"version": "Version Alpha"
},
"servers": [
{
@ -3558,7 +3558,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PuzzleDTO"
"$ref": "#/components/schemas/GameDTO"
}
}
}
@ -6847,7 +6847,7 @@
},
"SectionType": {
"type": "integer",
"description": "0 = Map\n1 = Slider\n2 = Video\n3 = Web\n4 = Menu\n5 = Quiz\n6 = Article\n7 = PDF\n8 = Puzzle\n9 = Agenda\n10 = Weather\n11 = Event",
"description": "0 = Map\n1 = Slider\n2 = Video\n3 = Web\n4 = Menu\n5 = Quiz\n6 = Article\n7 = PDF\n8 = Game\n9 = Agenda\n10 = Weather\n11 = Event",
"x-enumNames": [
"Map",
"Slider",
@ -6857,7 +6857,7 @@
"Quiz",
"Article",
"PDF",
"Puzzle",
"Game",
"Agenda",
"Weather",
"Event"
@ -8202,7 +8202,7 @@
}
}
},
"PuzzleDTO": {
"GameDTO": {
"allOf": [
{
"$ref": "#/components/schemas/SectionDTO"
@ -8244,11 +8244,28 @@
"cols": {
"type": "integer",
"format": "int32"
},
"gameType": {
"$ref": "#/components/schemas/GameTypes"
}
}
}
]
},
"GameTypes": {
"type": "integer",
"description": "0 = Puzzle\n1 = SlidingPuzzle\n2 = Escape",
"x-enumNames": [
"Puzzle",
"SlidingPuzzle",
"Escape"
],
"enum": [
0,
1,
2
]
},
"AgendaDTO": {
"allOf": [
{
@ -8755,6 +8772,18 @@
}
]
},
"sectionGameId": {
"type": "string",
"nullable": true
},
"sectionGame": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/SectionGame"
}
]
},
"isLinear": {
"type": "boolean"
},
@ -8972,6 +9001,60 @@
}
}
},
"SectionGame": {
"allOf": [
{
"$ref": "#/components/schemas/Section"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"gameMessageDebut",
"gameMessageFin",
"gamePuzzleRows",
"gamePuzzleCols"
],
"properties": {
"gameMessageDebut": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
},
"gameMessageFin": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TranslationAndResourceDTO"
}
},
"gamePuzzleImageId": {
"type": "string",
"nullable": true
},
"gamePuzzleImage": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/Resource"
}
]
},
"gamePuzzleRows": {
"type": "integer",
"format": "int32"
},
"gamePuzzleCols": {
"type": "integer",
"format": "int32"
},
"gameType": {
"$ref": "#/components/schemas/GameTypes"
}
}
}
]
},
"QuestionType": {
"type": "integer",
"description": "0 = Simple\n1 = MultipleChoice\n2 = Puzzle",

View File

@ -40,6 +40,9 @@ doc/EventAgendaDTO.md
doc/EventAgendaDTOAddress.md
doc/EventAgendaDTOResource.md
doc/ExportConfigurationDTO.md
doc/GameDTO.md
doc/GameDTOAllOfPuzzleImage.md
doc/GameTypes.md
doc/GeoPoint.md
doc/GeoPointDTO.md
doc/Geometry.md
@ -53,6 +56,7 @@ doc/GeometryPrecisionModel.md
doc/GeometryType.md
doc/GuidedPath.md
doc/GuidedPathDTO.md
doc/GuidedPathSectionGame.md
doc/GuidedPathSectionMap.md
doc/GuidedStep.md
doc/GuidedStepDTO.md
@ -92,8 +96,6 @@ doc/PrecisionModel.md
doc/PrecisionModels.md
doc/ProgrammeBlock.md
doc/ProgrammeBlockDTO.md
doc/PuzzleDTO.md
doc/PuzzleDTOAllOfPuzzleImage.md
doc/QuestionDTO.md
doc/QuestionDTOImageBackgroundResourceType.md
doc/QuestionType.md
@ -113,6 +115,8 @@ doc/SectionDTO.md
doc/SectionEvent.md
doc/SectionEventApi.md
doc/SectionEventDTO.md
doc/SectionGame.md
doc/SectionGameAllOfGamePuzzleImage.md
doc/SectionMap.md
doc/SectionMapAllOfMapMapProvider.md
doc/SectionMapAllOfMapMapType.md
@ -188,6 +192,9 @@ lib/model/event_agenda_dto.dart
lib/model/event_agenda_dto_address.dart
lib/model/event_agenda_dto_resource.dart
lib/model/export_configuration_dto.dart
lib/model/game_dto.dart
lib/model/game_dto_all_of_puzzle_image.dart
lib/model/game_types.dart
lib/model/geo_point.dart
lib/model/geo_point_dto.dart
lib/model/geometry.dart
@ -201,6 +208,7 @@ lib/model/geometry_precision_model.dart
lib/model/geometry_type.dart
lib/model/guided_path.dart
lib/model/guided_path_dto.dart
lib/model/guided_path_section_game.dart
lib/model/guided_path_section_map.dart
lib/model/guided_step.dart
lib/model/guided_step_dto.dart
@ -239,8 +247,6 @@ lib/model/precision_model.dart
lib/model/precision_models.dart
lib/model/programme_block.dart
lib/model/programme_block_dto.dart
lib/model/puzzle_dto.dart
lib/model/puzzle_dto_all_of_puzzle_image.dart
lib/model/question_dto.dart
lib/model/question_dto_image_background_resource_type.dart
lib/model/question_type.dart
@ -256,6 +262,8 @@ lib/model/section.dart
lib/model/section_dto.dart
lib/model/section_event.dart
lib/model/section_event_dto.dart
lib/model/section_game.dart
lib/model/section_game_all_of_game_puzzle_image.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
@ -273,3 +281,9 @@ lib/model/video_dto.dart
lib/model/weather_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/game_dto_all_of_puzzle_image_test.dart
test/game_dto_test.dart
test/game_types_test.dart
test/guided_path_section_game_test.dart
test/section_game_all_of_game_puzzle_image_test.dart
test/section_game_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 1.1
- API version: Version Alpha
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
@ -197,6 +197,9 @@ Class | Method | HTTP request | Description
- [EventAgendaDTOAddress](doc//EventAgendaDTOAddress.md)
- [EventAgendaDTOResource](doc//EventAgendaDTOResource.md)
- [ExportConfigurationDTO](doc//ExportConfigurationDTO.md)
- [GameDTO](doc//GameDTO.md)
- [GameDTOAllOfPuzzleImage](doc//GameDTOAllOfPuzzleImage.md)
- [GameTypes](doc//GameTypes.md)
- [GeoPoint](doc//GeoPoint.md)
- [GeoPointDTO](doc//GeoPointDTO.md)
- [Geometry](doc//Geometry.md)
@ -210,6 +213,7 @@ Class | Method | HTTP request | Description
- [GeometryType](doc//GeometryType.md)
- [GuidedPath](doc//GuidedPath.md)
- [GuidedPathDTO](doc//GuidedPathDTO.md)
- [GuidedPathSectionGame](doc//GuidedPathSectionGame.md)
- [GuidedPathSectionMap](doc//GuidedPathSectionMap.md)
- [GuidedStep](doc//GuidedStep.md)
- [GuidedStepDTO](doc//GuidedStepDTO.md)
@ -248,8 +252,6 @@ Class | Method | HTTP request | Description
- [PrecisionModels](doc//PrecisionModels.md)
- [ProgrammeBlock](doc//ProgrammeBlock.md)
- [ProgrammeBlockDTO](doc//ProgrammeBlockDTO.md)
- [PuzzleDTO](doc//PuzzleDTO.md)
- [PuzzleDTOAllOfPuzzleImage](doc//PuzzleDTOAllOfPuzzleImage.md)
- [QuestionDTO](doc//QuestionDTO.md)
- [QuestionDTOImageBackgroundResourceType](doc//QuestionDTOImageBackgroundResourceType.md)
- [QuestionType](doc//QuestionType.md)
@ -265,6 +267,8 @@ Class | Method | HTTP request | Description
- [SectionDTO](doc//SectionDTO.md)
- [SectionEvent](doc//SectionEvent.md)
- [SectionEventDTO](doc//SectionEventDTO.md)
- [SectionGame](doc//SectionGame.md)
- [SectionGameAllOfGamePuzzleImage](doc//SectionGameAllOfGamePuzzleImage.md)
- [SectionMap](doc//SectionMap.md)
- [SectionMapAllOfMapMapProvider](doc//SectionMapAllOfMapMapProvider.md)
- [SectionMapAllOfMapMapType](doc//SectionMapAllOfMapMapType.md)

View File

@ -0,0 +1,40 @@
# manager_api_new.model.GameDTO
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**isActive** | **bool** | | [optional]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**messageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**messageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**puzzleImage** | [**GameDTOAllOfPuzzleImage**](GameDTOAllOfPuzzleImage.md) | | [optional]
**puzzleImageId** | **String** | | [optional]
**rows** | **int** | | [optional]
**cols** | **int** | | [optional]
**gameType** | [**GameTypes**](GameTypes.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,20 @@
# manager_api_new.model.GameDTOAllOfPuzzleImage
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**type** | [**ResourceType**](ResourceType.md) | | [optional]
**label** | **String** | | [optional]
**url** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.GameTypes
## 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

@ -16,6 +16,8 @@ Name | Type | Description | Notes
**sectionMap** | [**GuidedPathSectionMap**](GuidedPathSectionMap.md) | | [optional]
**sectionEventId** | **String** | | [optional]
**sectionEvent** | [**ApplicationInstanceSectionEvent**](ApplicationInstanceSectionEvent.md) | | [optional]
**sectionGameId** | **String** | | [optional]
**sectionGame** | [**GuidedPathSectionGame**](GuidedPathSectionGame.md) | | [optional]
**isLinear** | **bool** | | [optional]
**requireSuccessToAdvance** | **bool** | | [optional]
**hideNextStepsUntilComplete** | **bool** | | [optional]

View File

@ -0,0 +1,40 @@
# manager_api_new.model.GuidedPathSectionGame
## 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** | |
**gameMessageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**gameMessageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**gamePuzzleRows** | **int** | |
**gamePuzzleCols** | **int** | |
**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]
**isActive** | **bool** | | [optional]
**gamePuzzleImageId** | **String** | | [optional]
**gamePuzzleImage** | [**SectionGameAllOfGamePuzzleImage**](SectionGameAllOfGamePuzzleImage.md) | | [optional]
**gameType** | [**GameTypes**](GameTypes.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

@ -16,6 +16,8 @@ Name | Type | Description | Notes
**sectionMap** | [**GuidedPathSectionMap**](GuidedPathSectionMap.md) | | [optional]
**sectionEventId** | **String** | | [optional]
**sectionEvent** | [**ApplicationInstanceSectionEvent**](ApplicationInstanceSectionEvent.md) | | [optional]
**sectionGameId** | **String** | | [optional]
**sectionGame** | [**GuidedPathSectionGame**](GuidedPathSectionGame.md) | | [optional]
**isLinear** | **bool** | | [optional]
**requireSuccessToAdvance** | **bool** | | [optional]
**hideNextStepsUntilComplete** | **bool** | | [optional]

View File

@ -16,7 +16,7 @@ Name | Type | Description | Notes
**polyColor** | **String** | | [optional]
**icon** | **String** | | [optional]
**iconResourceId** | **String** | | [optional]
**iconResource** | [**PuzzleDTOAllOfPuzzleImage**](PuzzleDTOAllOfPuzzleImage.md) | | [optional]
**iconResource** | [**GameDTOAllOfPuzzleImage**](GameDTOAllOfPuzzleImage.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

@ -704,7 +704,7 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetPuzzleDTO**
> PuzzleDTO sectionGetPuzzleDTO()
> GameDTO sectionGetPuzzleDTO()
@ -729,7 +729,7 @@ This endpoint does not need any parameter.
### Return type
[**PuzzleDTO**](PuzzleDTO.md)
[**GameDTO**](GameDTO.md)
### Authorization

View File

@ -0,0 +1,40 @@
# manager_api_new.model.SectionGame
## 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** | |
**gameMessageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**gameMessageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**gamePuzzleRows** | **int** | |
**gamePuzzleCols** | **int** | |
**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]
**isActive** | **bool** | | [optional]
**gamePuzzleImageId** | **String** | | [optional]
**gamePuzzleImage** | [**SectionGameAllOfGamePuzzleImage**](SectionGameAllOfGamePuzzleImage.md) | | [optional]
**gameType** | [**GameTypes**](GameTypes.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,20 @@
# manager_api_new.model.SectionGameAllOfGamePuzzleImage
## 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

@ -75,6 +75,9 @@ part 'model/event_agenda_dto.dart';
part 'model/event_agenda_dto_address.dart';
part 'model/event_agenda_dto_resource.dart';
part 'model/export_configuration_dto.dart';
part 'model/game_dto.dart';
part 'model/game_dto_all_of_puzzle_image.dart';
part 'model/game_types.dart';
part 'model/geo_point.dart';
part 'model/geo_point_dto.dart';
part 'model/geometry.dart';
@ -88,6 +91,7 @@ part 'model/geometry_precision_model.dart';
part 'model/geometry_type.dart';
part 'model/guided_path.dart';
part 'model/guided_path_dto.dart';
part 'model/guided_path_section_game.dart';
part 'model/guided_path_section_map.dart';
part 'model/guided_step.dart';
part 'model/guided_step_dto.dart';
@ -126,8 +130,6 @@ part 'model/precision_model.dart';
part 'model/precision_models.dart';
part 'model/programme_block.dart';
part 'model/programme_block_dto.dart';
part 'model/puzzle_dto.dart';
part 'model/puzzle_dto_all_of_puzzle_image.dart';
part 'model/question_dto.dart';
part 'model/question_dto_image_background_resource_type.dart';
part 'model/question_type.dart';
@ -143,6 +145,8 @@ part 'model/section.dart';
part 'model/section_dto.dart';
part 'model/section_event.dart';
part 'model/section_event_dto.dart';
part 'model/section_game.dart';
part 'model/section_game_all_of_game_puzzle_image.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';

View File

@ -882,7 +882,7 @@ class SectionApi {
);
}
Future<PuzzleDTO?> sectionGetPuzzleDTO() async {
Future<GameDTO?> sectionGetPuzzleDTO() async {
final response = await sectionGetPuzzleDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
@ -894,8 +894,8 @@ class SectionApi {
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PuzzleDTO',
) as PuzzleDTO;
'GameDTO',
) as GameDTO;
}
return null;
}

View File

@ -297,6 +297,12 @@ class ApiClient {
return EventAgendaDTOResource.fromJson(value);
case 'ExportConfigurationDTO':
return ExportConfigurationDTO.fromJson(value);
case 'GameDTO':
return GameDTO.fromJson(value);
case 'GameDTOAllOfPuzzleImage':
return GameDTOAllOfPuzzleImage.fromJson(value);
case 'GameTypes':
return GameTypesTypeTransformer().decode(value);
case 'GeoPoint':
return GeoPoint.fromJson(value);
case 'GeoPointDTO':
@ -323,6 +329,8 @@ class ApiClient {
return GuidedPath.fromJson(value);
case 'GuidedPathDTO':
return GuidedPathDTO.fromJson(value);
case 'GuidedPathSectionGame':
return GuidedPathSectionGame.fromJson(value);
case 'GuidedPathSectionMap':
return GuidedPathSectionMap.fromJson(value);
case 'GuidedStep':
@ -399,10 +407,6 @@ class ApiClient {
return ProgrammeBlock.fromJson(value);
case 'ProgrammeBlockDTO':
return ProgrammeBlockDTO.fromJson(value);
case 'PuzzleDTO':
return PuzzleDTO.fromJson(value);
case 'PuzzleDTOAllOfPuzzleImage':
return PuzzleDTOAllOfPuzzleImage.fromJson(value);
case 'QuestionDTO':
return QuestionDTO.fromJson(value);
case 'QuestionDTOImageBackgroundResourceType':
@ -433,6 +437,10 @@ class ApiClient {
return SectionEvent.fromJson(value);
case 'SectionEventDTO':
return SectionEventDTO.fromJson(value);
case 'SectionGame':
return SectionGame.fromJson(value);
case 'SectionGameAllOfGamePuzzleImage':
return SectionGameAllOfGamePuzzleImage.fromJson(value);
case 'SectionMap':
return SectionMap.fromJson(value);
case 'SectionMapAllOfMapMapProvider':

View File

@ -71,6 +71,9 @@ String parameterToString(dynamic value) {
if (value is Dimension) {
return DimensionTypeTransformer().encode(value).toString();
}
if (value is GameTypes) {
return GameTypesTypeTransformer().encode(value).toString();
}
if (value is GeometryType) {
return GeometryTypeTypeTransformer().encode(value).toString();
}

View File

@ -10,9 +10,9 @@
part of openapi.api;
class PuzzleDTO {
/// Returns a new [PuzzleDTO] instance.
PuzzleDTO({
class GameDTO {
/// Returns a new [GameDTO] instance.
GameDTO({
this.id,
this.label,
this.title = const [],
@ -38,6 +38,7 @@ class PuzzleDTO {
this.puzzleImageId,
this.rows,
this.cols,
this.gameType,
});
String? id;
@ -126,10 +127,18 @@ class PuzzleDTO {
///
int? cols;
///
/// 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.
///
GameTypes? gameType;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is PuzzleDTO &&
other is GameDTO &&
other.id == id &&
other.label == label &&
_deepEquality.equals(other.title, title) &&
@ -154,7 +163,8 @@ class PuzzleDTO {
other.puzzleImage == puzzleImage &&
other.puzzleImageId == puzzleImageId &&
other.rows == rows &&
other.cols == cols;
other.cols == cols &&
other.gameType == gameType;
@override
int get hashCode =>
@ -183,11 +193,12 @@ class PuzzleDTO {
(puzzleImage == null ? 0 : puzzleImage!.hashCode) +
(puzzleImageId == null ? 0 : puzzleImageId!.hashCode) +
(rows == null ? 0 : rows!.hashCode) +
(cols == null ? 0 : cols!.hashCode);
(cols == null ? 0 : cols!.hashCode) +
(gameType == null ? 0 : gameType!.hashCode);
@override
String toString() =>
'PuzzleDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols]';
'GameDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, messageDebut=$messageDebut, messageFin=$messageFin, puzzleImage=$puzzleImage, puzzleImageId=$puzzleImageId, rows=$rows, cols=$cols, gameType=$gameType]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -316,13 +327,18 @@ class PuzzleDTO {
} else {
json[r'cols'] = null;
}
if (this.gameType != null) {
json[r'gameType'] = this.gameType;
} else {
json[r'gameType'] = null;
}
return json;
}
/// Returns a new [PuzzleDTO] instance and imports its values from
/// Returns a new [GameDTO] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static PuzzleDTO? fromJson(dynamic value) {
static GameDTO? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
@ -332,14 +348,14 @@ class PuzzleDTO {
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "PuzzleDTO[$key]" is missing from JSON.');
'Required key "GameDTO[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "PuzzleDTO[$key]" has a null value in JSON.');
'Required key "GameDTO[$key]" has a null value in JSON.');
});
return true;
}());
return PuzzleDTO(
return GameDTO(
id: mapValueOfType<String>(json, r'id'),
label: mapValueOfType<String>(json, r'label'),
title: TranslationDTO.listFromJson(json[r'title']),
@ -366,19 +382,20 @@ class PuzzleDTO {
puzzleImageId: mapValueOfType<String>(json, r'puzzleImageId'),
rows: mapValueOfType<int>(json, r'rows'),
cols: mapValueOfType<int>(json, r'cols'),
gameType: GameTypes.fromJson(json[r'gameType']),
);
}
return null;
}
static List<PuzzleDTO> listFromJson(
static List<GameDTO> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <PuzzleDTO>[];
final result = <GameDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = PuzzleDTO.fromJson(row);
final value = GameDTO.fromJson(row);
if (value != null) {
result.add(value);
}
@ -387,12 +404,12 @@ class PuzzleDTO {
return result.toList(growable: growable);
}
static Map<String, PuzzleDTO> mapFromJson(dynamic json) {
final map = <String, PuzzleDTO>{};
static Map<String, GameDTO> mapFromJson(dynamic json) {
final map = <String, GameDTO>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = PuzzleDTO.fromJson(entry.value);
final value = GameDTO.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@ -401,17 +418,17 @@ class PuzzleDTO {
return map;
}
// maps a json object with a list of PuzzleDTO-objects as value to a dart map
static Map<String, List<PuzzleDTO>> mapListFromJson(
// maps a json object with a list of GameDTO-objects as value to a dart map
static Map<String, List<GameDTO>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<PuzzleDTO>>{};
final map = <String, List<GameDTO>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = PuzzleDTO.listFromJson(
map[entry.key] = GameDTO.listFromJson(
entry.value,
growable: growable,
);

View File

@ -10,9 +10,9 @@
part of openapi.api;
class PuzzleDTOAllOfPuzzleImage {
/// Returns a new [PuzzleDTOAllOfPuzzleImage] instance.
PuzzleDTOAllOfPuzzleImage({
class GameDTOAllOfPuzzleImage {
/// Returns a new [GameDTOAllOfPuzzleImage] instance.
GameDTOAllOfPuzzleImage({
this.id,
this.type,
this.label,
@ -48,7 +48,7 @@ class PuzzleDTOAllOfPuzzleImage {
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is PuzzleDTOAllOfPuzzleImage &&
other is GameDTOAllOfPuzzleImage &&
other.id == id &&
other.type == type &&
other.label == label &&
@ -68,7 +68,7 @@ class PuzzleDTOAllOfPuzzleImage {
@override
String toString() =>
'PuzzleDTOAllOfPuzzleImage[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]';
'GameDTOAllOfPuzzleImage[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -105,10 +105,10 @@ class PuzzleDTOAllOfPuzzleImage {
return json;
}
/// Returns a new [PuzzleDTOAllOfPuzzleImage] instance and imports its values from
/// Returns a new [GameDTOAllOfPuzzleImage] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static PuzzleDTOAllOfPuzzleImage? fromJson(dynamic value) {
static GameDTOAllOfPuzzleImage? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
@ -118,14 +118,14 @@ class PuzzleDTOAllOfPuzzleImage {
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "PuzzleDTOAllOfPuzzleImage[$key]" is missing from JSON.');
'Required key "GameDTOAllOfPuzzleImage[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "PuzzleDTOAllOfPuzzleImage[$key]" has a null value in JSON.');
'Required key "GameDTOAllOfPuzzleImage[$key]" has a null value in JSON.');
});
return true;
}());
return PuzzleDTOAllOfPuzzleImage(
return GameDTOAllOfPuzzleImage(
id: mapValueOfType<String>(json, r'id'),
type: ResourceType.fromJson(json[r'type']),
label: mapValueOfType<String>(json, r'label'),
@ -137,14 +137,14 @@ class PuzzleDTOAllOfPuzzleImage {
return null;
}
static List<PuzzleDTOAllOfPuzzleImage> listFromJson(
static List<GameDTOAllOfPuzzleImage> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <PuzzleDTOAllOfPuzzleImage>[];
final result = <GameDTOAllOfPuzzleImage>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = PuzzleDTOAllOfPuzzleImage.fromJson(row);
final value = GameDTOAllOfPuzzleImage.fromJson(row);
if (value != null) {
result.add(value);
}
@ -153,12 +153,12 @@ class PuzzleDTOAllOfPuzzleImage {
return result.toList(growable: growable);
}
static Map<String, PuzzleDTOAllOfPuzzleImage> mapFromJson(dynamic json) {
final map = <String, PuzzleDTOAllOfPuzzleImage>{};
static Map<String, GameDTOAllOfPuzzleImage> mapFromJson(dynamic json) {
final map = <String, GameDTOAllOfPuzzleImage>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = PuzzleDTOAllOfPuzzleImage.fromJson(entry.value);
final value = GameDTOAllOfPuzzleImage.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@ -167,17 +167,17 @@ class PuzzleDTOAllOfPuzzleImage {
return map;
}
// maps a json object with a list of PuzzleDTOAllOfPuzzleImage-objects as value to a dart map
static Map<String, List<PuzzleDTOAllOfPuzzleImage>> mapListFromJson(
// maps a json object with a list of GameDTOAllOfPuzzleImage-objects as value to a dart map
static Map<String, List<GameDTOAllOfPuzzleImage>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<PuzzleDTOAllOfPuzzleImage>>{};
final map = <String, List<GameDTOAllOfPuzzleImage>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = PuzzleDTOAllOfPuzzleImage.listFromJson(
map[entry.key] = GameDTOAllOfPuzzleImage.listFromJson(
entry.value,
growable: growable,
);

View File

@ -0,0 +1,95 @@
//
// 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;
/// 0 = Puzzle 1 = SlidingPuzzle 2 = Escape
class GameTypes {
/// Instantiate a new enum with the provided [value].
const GameTypes._(this.value);
/// The underlying value of this enum member.
final int value;
@override
String toString() => value.toString();
int toJson() => value;
static const number0 = GameTypes._(0);
static const number1 = GameTypes._(1);
static const number2 = GameTypes._(2);
/// List of all possible values in this [enum][GameTypes].
static const values = <GameTypes>[
number0,
number1,
number2,
];
static GameTypes? fromJson(dynamic value) =>
GameTypesTypeTransformer().decode(value);
static List<GameTypes> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <GameTypes>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GameTypes.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [GameTypes] to int,
/// and [decode] dynamic data back to [GameTypes].
class GameTypesTypeTransformer {
factory GameTypesTypeTransformer() =>
_instance ??= const GameTypesTypeTransformer._();
const GameTypesTypeTransformer._();
int encode(GameTypes data) => data.value;
/// Decodes a [dynamic value][data] to a GameTypes.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
GameTypes? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case 0:
return GameTypes.number0;
case 1:
return GameTypes.number1;
case 2:
return GameTypes.number2;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [GameTypesTypeTransformer] instance.
static GameTypesTypeTransformer? _instance;
}

View File

@ -55,7 +55,7 @@ class GeoPointDTO {
List<TranslationDTO>? site;
EventAddressDTOGeometry? geometry;
GeometryDTO? geometry;
String? polyColor;
@ -226,7 +226,7 @@ class GeoPointDTO {
phone: TranslationDTO.listFromJson(json[r'phone']),
email: TranslationDTO.listFromJson(json[r'email']),
site: TranslationDTO.listFromJson(json[r'site']),
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
geometry: GeometryDTO.fromJson(json[r'geometry']),
polyColor: mapValueOfType<String>(json, r'polyColor'),
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),

View File

@ -21,6 +21,8 @@ class GuidedPath {
this.sectionMap,
this.sectionEventId,
this.sectionEvent,
this.sectionGameId,
this.sectionGame,
this.isLinear,
this.requireSuccessToAdvance,
this.hideNextStepsUntilComplete,
@ -44,6 +46,10 @@ class GuidedPath {
ApplicationInstanceSectionEvent? sectionEvent;
String? sectionGameId;
GuidedPathSectionGame? sectionGame;
///
/// 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
@ -90,6 +96,8 @@ class GuidedPath {
other.sectionMap == sectionMap &&
other.sectionEventId == sectionEventId &&
other.sectionEvent == sectionEvent &&
other.sectionGameId == sectionGameId &&
other.sectionGame == sectionGame &&
other.isLinear == isLinear &&
other.requireSuccessToAdvance == requireSuccessToAdvance &&
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
@ -107,6 +115,8 @@ class GuidedPath {
(sectionMap == null ? 0 : sectionMap!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
(sectionEvent == null ? 0 : sectionEvent!.hashCode) +
(sectionGameId == null ? 0 : sectionGameId!.hashCode) +
(sectionGame == null ? 0 : sectionGame!.hashCode) +
(isLinear == null ? 0 : isLinear!.hashCode) +
(requireSuccessToAdvance == null
? 0
@ -119,7 +129,7 @@ class GuidedPath {
@override
String toString() =>
'GuidedPath[instanceId=$instanceId, title=$title, id=$id, description=$description, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
'GuidedPath[instanceId=$instanceId, title=$title, id=$id, description=$description, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent, sectionGameId=$sectionGameId, sectionGame=$sectionGame, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -155,6 +165,16 @@ class GuidedPath {
} else {
json[r'sectionEvent'] = null;
}
if (this.sectionGameId != null) {
json[r'sectionGameId'] = this.sectionGameId;
} else {
json[r'sectionGameId'] = null;
}
if (this.sectionGame != null) {
json[r'sectionGame'] = this.sectionGame;
} else {
json[r'sectionGame'] = null;
}
if (this.isLinear != null) {
json[r'isLinear'] = this.isLinear;
} else {
@ -213,6 +233,8 @@ class GuidedPath {
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
sectionEvent:
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
sectionGameId: mapValueOfType<String>(json, r'sectionGameId'),
sectionGame: GuidedPathSectionGame.fromJson(json[r'sectionGame']),
isLinear: mapValueOfType<bool>(json, r'isLinear'),
requireSuccessToAdvance:
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),

View File

@ -0,0 +1,400 @@
//
// 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 GuidedPathSectionGame {
/// Returns a new [GuidedPathSectionGame] instance.
GuidedPathSectionGame({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.gameMessageDebut = const [],
this.gameMessageFin = const [],
required this.gamePuzzleRows,
required this.gamePuzzleCols,
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.isActive,
this.gamePuzzleImageId,
this.gamePuzzleImage,
this.gameType,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<TranslationAndResourceDTO> gameMessageDebut;
List<TranslationAndResourceDTO> gameMessageFin;
int gamePuzzleRows;
int gamePuzzleCols;
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.
///
bool? isActive;
String? gamePuzzleImageId;
SectionGameAllOfGamePuzzleImage? gamePuzzleImage;
///
/// 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.
///
GameTypes? gameType;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is GuidedPathSectionGame &&
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.gameMessageDebut, gameMessageDebut) &&
_deepEquality.equals(other.gameMessageFin, gameMessageFin) &&
other.gamePuzzleRows == gamePuzzleRows &&
other.gamePuzzleCols == gamePuzzleCols &&
_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.isActive == isActive &&
other.gamePuzzleImageId == gamePuzzleImageId &&
other.gamePuzzleImage == gamePuzzleImage &&
other.gameType == gameType;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(gameMessageDebut.hashCode) +
(gameMessageFin.hashCode) +
(gamePuzzleRows.hashCode) +
(gamePuzzleCols.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) +
(isActive == null ? 0 : isActive!.hashCode) +
(gamePuzzleImageId == null ? 0 : gamePuzzleImageId!.hashCode) +
(gamePuzzleImage == null ? 0 : gamePuzzleImage!.hashCode) +
(gameType == null ? 0 : gameType!.hashCode);
@override
String toString() =>
'GuidedPathSectionGame[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, gameMessageDebut=$gameMessageDebut, gameMessageFin=$gameMessageFin, gamePuzzleRows=$gamePuzzleRows, gamePuzzleCols=$gamePuzzleCols, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, gamePuzzleImageId=$gamePuzzleImageId, gamePuzzleImage=$gamePuzzleImage, gameType=$gameType]';
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'gameMessageDebut'] = this.gameMessageDebut;
json[r'gameMessageFin'] = this.gameMessageFin;
json[r'gamePuzzleRows'] = this.gamePuzzleRows;
json[r'gamePuzzleCols'] = this.gamePuzzleCols;
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.isActive != null) {
json[r'isActive'] = this.isActive;
} else {
json[r'isActive'] = null;
}
if (this.gamePuzzleImageId != null) {
json[r'gamePuzzleImageId'] = this.gamePuzzleImageId;
} else {
json[r'gamePuzzleImageId'] = null;
}
if (this.gamePuzzleImage != null) {
json[r'gamePuzzleImage'] = this.gamePuzzleImage;
} else {
json[r'gamePuzzleImage'] = null;
}
if (this.gameType != null) {
json[r'gameType'] = this.gameType;
} else {
json[r'gameType'] = null;
}
return json;
}
/// Returns a new [GuidedPathSectionGame] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GuidedPathSectionGame? 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 "GuidedPathSectionGame[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "GuidedPathSectionGame[$key]" has a null value in JSON.');
});
return true;
}());
return GuidedPathSectionGame(
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')!,
gameMessageDebut:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageDebut']),
gameMessageFin:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageFin']),
gamePuzzleRows: mapValueOfType<int>(json, r'gamePuzzleRows')!,
gamePuzzleCols: mapValueOfType<int>(json, r'gamePuzzleCols')!,
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'),
isActive: mapValueOfType<bool>(json, r'isActive'),
gamePuzzleImageId: mapValueOfType<String>(json, r'gamePuzzleImageId'),
gamePuzzleImage:
SectionGameAllOfGamePuzzleImage.fromJson(json[r'gamePuzzleImage']),
gameType: GameTypes.fromJson(json[r'gameType']),
);
}
return null;
}
static List<GuidedPathSectionGame> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <GuidedPathSectionGame>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GuidedPathSectionGame.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GuidedPathSectionGame> mapFromJson(dynamic json) {
final map = <String, GuidedPathSectionGame>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GuidedPathSectionGame.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GuidedPathSectionGame-objects as value to a dart map
static Map<String, List<GuidedPathSectionGame>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<GuidedPathSectionGame>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GuidedPathSectionGame.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',
'gameMessageDebut',
'gameMessageFin',
'gamePuzzleRows',
'gamePuzzleCols',
};
}

View File

@ -21,6 +21,8 @@ class GuidedStepGuidedPath {
this.sectionMap,
this.sectionEventId,
this.sectionEvent,
this.sectionGameId,
this.sectionGame,
this.isLinear,
this.requireSuccessToAdvance,
this.hideNextStepsUntilComplete,
@ -44,6 +46,10 @@ class GuidedStepGuidedPath {
ApplicationInstanceSectionEvent? sectionEvent;
String? sectionGameId;
GuidedPathSectionGame? sectionGame;
///
/// 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
@ -90,6 +96,8 @@ class GuidedStepGuidedPath {
other.sectionMap == sectionMap &&
other.sectionEventId == sectionEventId &&
other.sectionEvent == sectionEvent &&
other.sectionGameId == sectionGameId &&
other.sectionGame == sectionGame &&
other.isLinear == isLinear &&
other.requireSuccessToAdvance == requireSuccessToAdvance &&
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
@ -107,6 +115,8 @@ class GuidedStepGuidedPath {
(sectionMap == null ? 0 : sectionMap!.hashCode) +
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
(sectionEvent == null ? 0 : sectionEvent!.hashCode) +
(sectionGameId == null ? 0 : sectionGameId!.hashCode) +
(sectionGame == null ? 0 : sectionGame!.hashCode) +
(isLinear == null ? 0 : isLinear!.hashCode) +
(requireSuccessToAdvance == null
? 0
@ -119,7 +129,7 @@ class GuidedStepGuidedPath {
@override
String toString() =>
'GuidedStepGuidedPath[instanceId=$instanceId, title=$title, id=$id, description=$description, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
'GuidedStepGuidedPath[instanceId=$instanceId, title=$title, id=$id, description=$description, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent, sectionGameId=$sectionGameId, sectionGame=$sectionGame, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -155,6 +165,16 @@ class GuidedStepGuidedPath {
} else {
json[r'sectionEvent'] = null;
}
if (this.sectionGameId != null) {
json[r'sectionGameId'] = this.sectionGameId;
} else {
json[r'sectionGameId'] = null;
}
if (this.sectionGame != null) {
json[r'sectionGame'] = this.sectionGame;
} else {
json[r'sectionGame'] = null;
}
if (this.isLinear != null) {
json[r'isLinear'] = this.isLinear;
} else {
@ -213,6 +233,8 @@ class GuidedStepGuidedPath {
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
sectionEvent:
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
sectionGameId: mapValueOfType<String>(json, r'sectionGameId'),
sectionGame: GuidedPathSectionGame.fromJson(json[r'sectionGame']),
isLinear: mapValueOfType<bool>(json, r'isLinear'),
requireSuccessToAdvance:
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),

View File

@ -46,7 +46,7 @@ class MapAnnotationDTO {
String? iconResourceId;
PuzzleDTOAllOfPuzzleImage? iconResource;
GameDTOAllOfPuzzleImage? iconResource;
@override
bool operator ==(Object other) =>
@ -158,7 +158,7 @@ class MapAnnotationDTO {
polyColor: mapValueOfType<String>(json, r'polyColor'),
icon: mapValueOfType<String>(json, r'icon'),
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
iconResource: PuzzleDTOAllOfPuzzleImage.fromJson(json[r'iconResource']),
iconResource: GameDTOAllOfPuzzleImage.fromJson(json[r'iconResource']),
);
}
return null;

View File

@ -0,0 +1,400 @@
//
// 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 SectionGame {
/// Returns a new [SectionGame] instance.
SectionGame({
required this.id,
required this.label,
this.title = const [],
required this.configurationId,
required this.type,
required this.isSubSection,
required this.instanceId,
this.gameMessageDebut = const [],
this.gameMessageFin = const [],
required this.gamePuzzleRows,
required this.gamePuzzleCols,
this.description = const [],
this.order,
this.imageId,
this.imageSource,
this.parentId,
this.dateCreation,
this.isBeacon,
this.beaconId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.isActive,
this.gamePuzzleImageId,
this.gamePuzzleImage,
this.gameType,
});
String id;
String label;
List<TranslationDTO> title;
String configurationId;
SectionType type;
bool isSubSection;
String instanceId;
List<TranslationAndResourceDTO> gameMessageDebut;
List<TranslationAndResourceDTO> gameMessageFin;
int gamePuzzleRows;
int gamePuzzleCols;
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.
///
bool? isActive;
String? gamePuzzleImageId;
SectionGameAllOfGamePuzzleImage? gamePuzzleImage;
///
/// 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.
///
GameTypes? gameType;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SectionGame &&
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.gameMessageDebut, gameMessageDebut) &&
_deepEquality.equals(other.gameMessageFin, gameMessageFin) &&
other.gamePuzzleRows == gamePuzzleRows &&
other.gamePuzzleCols == gamePuzzleCols &&
_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.isActive == isActive &&
other.gamePuzzleImageId == gamePuzzleImageId &&
other.gamePuzzleImage == gamePuzzleImage &&
other.gameType == gameType;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(label.hashCode) +
(title.hashCode) +
(configurationId.hashCode) +
(type.hashCode) +
(isSubSection.hashCode) +
(instanceId.hashCode) +
(gameMessageDebut.hashCode) +
(gameMessageFin.hashCode) +
(gamePuzzleRows.hashCode) +
(gamePuzzleCols.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) +
(isActive == null ? 0 : isActive!.hashCode) +
(gamePuzzleImageId == null ? 0 : gamePuzzleImageId!.hashCode) +
(gamePuzzleImage == null ? 0 : gamePuzzleImage!.hashCode) +
(gameType == null ? 0 : gameType!.hashCode);
@override
String toString() =>
'SectionGame[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, gameMessageDebut=$gameMessageDebut, gameMessageFin=$gameMessageFin, gamePuzzleRows=$gamePuzzleRows, gamePuzzleCols=$gamePuzzleCols, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, gamePuzzleImageId=$gamePuzzleImageId, gamePuzzleImage=$gamePuzzleImage, gameType=$gameType]';
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'gameMessageDebut'] = this.gameMessageDebut;
json[r'gameMessageFin'] = this.gameMessageFin;
json[r'gamePuzzleRows'] = this.gamePuzzleRows;
json[r'gamePuzzleCols'] = this.gamePuzzleCols;
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.isActive != null) {
json[r'isActive'] = this.isActive;
} else {
json[r'isActive'] = null;
}
if (this.gamePuzzleImageId != null) {
json[r'gamePuzzleImageId'] = this.gamePuzzleImageId;
} else {
json[r'gamePuzzleImageId'] = null;
}
if (this.gamePuzzleImage != null) {
json[r'gamePuzzleImage'] = this.gamePuzzleImage;
} else {
json[r'gamePuzzleImage'] = null;
}
if (this.gameType != null) {
json[r'gameType'] = this.gameType;
} else {
json[r'gameType'] = null;
}
return json;
}
/// Returns a new [SectionGame] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionGame? 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 "SectionGame[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "SectionGame[$key]" has a null value in JSON.');
});
return true;
}());
return SectionGame(
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')!,
gameMessageDebut:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageDebut']),
gameMessageFin:
TranslationAndResourceDTO.listFromJson(json[r'gameMessageFin']),
gamePuzzleRows: mapValueOfType<int>(json, r'gamePuzzleRows')!,
gamePuzzleCols: mapValueOfType<int>(json, r'gamePuzzleCols')!,
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'),
isActive: mapValueOfType<bool>(json, r'isActive'),
gamePuzzleImageId: mapValueOfType<String>(json, r'gamePuzzleImageId'),
gamePuzzleImage:
SectionGameAllOfGamePuzzleImage.fromJson(json[r'gamePuzzleImage']),
gameType: GameTypes.fromJson(json[r'gameType']),
);
}
return null;
}
static List<SectionGame> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <SectionGame>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionGame.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionGame> mapFromJson(dynamic json) {
final map = <String, SectionGame>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionGame.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionGame-objects as value to a dart map
static Map<String, List<SectionGame>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<SectionGame>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionGame.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',
'gameMessageDebut',
'gameMessageFin',
'gamePuzzleRows',
'gamePuzzleCols',
};
}

View File

@ -0,0 +1,175 @@
//
// 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 SectionGameAllOfGamePuzzleImage {
/// Returns a new [SectionGameAllOfGamePuzzleImage] instance.
SectionGameAllOfGamePuzzleImage({
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 SectionGameAllOfGamePuzzleImage &&
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() =>
'SectionGameAllOfGamePuzzleImage[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 [SectionGameAllOfGamePuzzleImage] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SectionGameAllOfGamePuzzleImage? 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 "SectionGameAllOfGamePuzzleImage[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "SectionGameAllOfGamePuzzleImage[$key]" has a null value in JSON.');
});
return true;
}());
return SectionGameAllOfGamePuzzleImage(
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<SectionGameAllOfGamePuzzleImage> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <SectionGameAllOfGamePuzzleImage>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SectionGameAllOfGamePuzzleImage.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SectionGameAllOfGamePuzzleImage> mapFromJson(
dynamic json) {
final map = <String, SectionGameAllOfGamePuzzleImage>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SectionGameAllOfGamePuzzleImage.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SectionGameAllOfGamePuzzleImage-objects as value to a dart map
static Map<String, List<SectionGameAllOfGamePuzzleImage>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<SectionGameAllOfGamePuzzleImage>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SectionGameAllOfGamePuzzleImage.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

@ -10,7 +10,7 @@
part of openapi.api;
/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quiz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda 10 = Event
/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quiz 6 = Article 7 = PDF 8 = Game 9 = Agenda 10 = Event
class SectionType {
/// Instantiate a new enum with the provided [value].
const SectionType._(this.value);
@ -31,7 +31,7 @@ class SectionType {
static const Quiz = SectionType._(5);
static const Article = SectionType._(6);
static const Pdf = SectionType._(7);
static const Puzzle = SectionType._(8);
static const Game = SectionType._(8);
static const Agenda = SectionType._(9);
static const Weather = SectionType._(10);
static const Event = SectionType._(11);
@ -46,7 +46,7 @@ class SectionType {
Quiz,
Article,
Pdf,
Puzzle,
Game,
Agenda,
Weather,
Event
@ -97,7 +97,7 @@ class SectionTypeTypeTransformer {
case r'Quiz': return SectionType.Quiz;
case r'Article': return SectionType.Article;
case r'PDF': return SectionType.Pdf;
case r'Puzzle': return SectionType.Puzzle;
case r'Game': return SectionType.Game;
case r'Agenda': return SectionType.Agenda;
case r'Weather': return SectionType.Weather;
case r'Event': return SectionType.Event;
@ -117,7 +117,7 @@ class SectionTypeTypeTransformer {
case 5: return SectionType.Quiz;
case 6: return SectionType.Article;
case 7: return SectionType.Pdf;
case 8: return SectionType.Puzzle;
case 8: return SectionType.Game;
case 9: return SectionType.Agenda;
case 10: return SectionType.Weather;
case 11: return SectionType.Event;

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 GameDTOAllOfPuzzleImage
void main() {
// final instance = GameDTOAllOfPuzzleImage();
group('test GameDTOAllOfPuzzleImage', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// ResourceType type
test('to test the property `type`', () async {
// TODO
});
// String label
test('to test the property `label`', () async {
// TODO
});
// String url
test('to test the property `url`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,149 @@
//
// 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 GameDTO
void main() {
// final instance = GameDTO();
group('test GameDTO', () {
// 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
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// bool isActive
test('to test the property `isActive`', () async {
// TODO
});
// String imageId
test('to test the property `imageId`', () async {
// TODO
});
// String imageSource
test('to test the property `imageSource`', () async {
// TODO
});
// String configurationId
test('to test the property `configurationId`', () async {
// TODO
});
// bool isSubSection
test('to test the property `isSubSection`', () async {
// TODO
});
// String parentId
test('to test the property `parentId`', () async {
// TODO
});
// SectionType type
test('to test the property `type`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
// int order
test('to test the property `order`', () async {
// TODO
});
// String instanceId
test('to test the property `instanceId`', () async {
// TODO
});
// String latitude
test('to test the property `latitude`', () async {
// TODO
});
// String longitude
test('to test the property `longitude`', () async {
// TODO
});
// int meterZoneGPS
test('to test the property `meterZoneGPS`', () async {
// TODO
});
// bool isBeacon
test('to test the property `isBeacon`', () async {
// TODO
});
// int beaconId
test('to test the property `beaconId`', () async {
// TODO
});
// List<TranslationAndResourceDTO> messageDebut (default value: const [])
test('to test the property `messageDebut`', () async {
// TODO
});
// List<TranslationAndResourceDTO> messageFin (default value: const [])
test('to test the property `messageFin`', () async {
// TODO
});
// GameDTOAllOfPuzzleImage puzzleImage
test('to test the property `puzzleImage`', () async {
// TODO
});
// String puzzleImageId
test('to test the property `puzzleImageId`', () async {
// TODO
});
// int rows
test('to test the property `rows`', () async {
// TODO
});
// int cols
test('to test the property `cols`', () async {
// TODO
});
// GameTypes gameType
test('to test the property `gameType`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,17 @@
//
// 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 GameTypes
void main() {
group('test GameTypes', () {});
}

View File

@ -0,0 +1,149 @@
//
// 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 GuidedPathSectionGame
void main() {
// final instance = GuidedPathSectionGame();
group('test GuidedPathSectionGame', () {
// 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<TranslationAndResourceDTO> gameMessageDebut (default value: const [])
test('to test the property `gameMessageDebut`', () async {
// TODO
});
// List<TranslationAndResourceDTO> gameMessageFin (default value: const [])
test('to test the property `gameMessageFin`', () async {
// TODO
});
// int gamePuzzleRows
test('to test the property `gamePuzzleRows`', () async {
// TODO
});
// int gamePuzzleCols
test('to test the property `gamePuzzleCols`', () 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
});
// bool isActive
test('to test the property `isActive`', () async {
// TODO
});
// String gamePuzzleImageId
test('to test the property `gamePuzzleImageId`', () async {
// TODO
});
// SectionGameAllOfGamePuzzleImage gamePuzzleImage
test('to test the property `gamePuzzleImage`', () async {
// TODO
});
// GameTypes gameType
test('to test the property `gameType`', () async {
// TODO
});
});
}

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 SectionGameAllOfGamePuzzleImage
void main() {
// final instance = SectionGameAllOfGamePuzzleImage();
group('test SectionGameAllOfGamePuzzleImage', () {
// 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,149 @@
//
// 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 SectionGame
void main() {
// final instance = SectionGame();
group('test SectionGame', () {
// 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<TranslationAndResourceDTO> gameMessageDebut (default value: const [])
test('to test the property `gameMessageDebut`', () async {
// TODO
});
// List<TranslationAndResourceDTO> gameMessageFin (default value: const [])
test('to test the property `gameMessageFin`', () async {
// TODO
});
// int gamePuzzleRows
test('to test the property `gamePuzzleRows`', () async {
// TODO
});
// int gamePuzzleCols
test('to test the property `gamePuzzleCols`', () 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
});
// bool isActive
test('to test the property `isActive`', () async {
// TODO
});
// String gamePuzzleImageId
test('to test the property `gamePuzzleImageId`', () async {
// TODO
});
// SectionGameAllOfGamePuzzleImage gamePuzzleImage
test('to test the property `gamePuzzleImage`', () async {
// TODO
});
// GameTypes gameType
test('to test the property `gameType`', () async {
// TODO
});
});
}