service generation compiling
This commit is contained in:
parent
986bb7fab2
commit
edd34ae849
@ -7,7 +7,7 @@ import 'dart:html' as html;
|
|||||||
|
|
||||||
class PDFHelper {
|
class PDFHelper {
|
||||||
static downloadPDF(ManagerAppContext managerAppContext, List<SectionDTO> sections) async {
|
static downloadPDF(ManagerAppContext managerAppContext, List<SectionDTO> sections) async {
|
||||||
var sectionsArticle = sections.where((section) => section.type == SectionType.Article || section.type == SectionType.Quiz); // TODO HERE Support more section types
|
var sectionsArticle = sections;
|
||||||
if(sectionsArticle.length > 0) {
|
if(sectionsArticle.length > 0) {
|
||||||
//final font = await rootBundle.load("fonts/OpenSans-Medium.ttf");
|
//final font = await rootBundle.load("fonts/OpenSans-Medium.ttf");
|
||||||
//Uint8List byteData = new File("fonts/OpenSans-Medium.ttf").readAsBytesSync();
|
//Uint8List byteData = new File("fonts/OpenSans-Medium.ttf").readAsBytesSync();
|
||||||
|
|||||||
@ -51,7 +51,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
|
|||||||
height: 350,
|
height: 350,
|
||||||
child: FlutterLocationPicker(
|
child: FlutterLocationPicker(
|
||||||
initZoom: 14,
|
initZoom: 14,
|
||||||
initPosition: geoPointDTO.latitude == null && geoPointDTO.longitude == null ? LatLong(50.429333, 4.891434) : LatLong(double.parse(geoPointDTO.latitude!), double.parse(geoPointDTO.longitude!)),
|
initPosition: /*geoPointDTO.latitude == null && geoPointDTO.longitude == null ?*/ LatLong(50.429333, 4.891434) /*: LatLong(double.parse(geoPointDTO.latitude!), double.parse(geoPointDTO.longitude!))*/,
|
||||||
minZoomLevel: 0,
|
minZoomLevel: 0,
|
||||||
maxZoomLevel: 17,
|
maxZoomLevel: 17,
|
||||||
markerIcon: const Icon(
|
markerIcon: const Icon(
|
||||||
@ -78,8 +78,9 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
|
|||||||
onError: (e) => print(e),
|
onError: (e) => print(e),
|
||||||
selectLocationButtonLeadingIcon: const Icon(Icons.check, color: kPrimaryColor),
|
selectLocationButtonLeadingIcon: const Icon(Icons.check, color: kPrimaryColor),
|
||||||
onPicked: (pickedData) {
|
onPicked: (pickedData) {
|
||||||
geoPointDTO.latitude = pickedData.latLong.latitude.toString();
|
print("TODO !");
|
||||||
geoPointDTO.longitude = pickedData.latLong.longitude.toString();
|
/*geoPointDTO.latitude = pickedData.latLong.latitude.toString();
|
||||||
|
geoPointDTO.longitude = pickedData.latLong.longitude.toString();*/
|
||||||
},
|
},
|
||||||
onChanged: (pickedData) {
|
onChanged: (pickedData) {
|
||||||
/*print("onChanged");
|
/*print("onChanged");
|
||||||
@ -352,10 +353,11 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
|
|||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
textColor: kWhite,
|
textColor: kWhite,
|
||||||
press: () {
|
press: () {
|
||||||
if (geoPointDTO.latitude != null && geoPointDTO.longitude != null) {
|
print("TODO");
|
||||||
|
/*if (geoPointDTO.latitude != null && geoPointDTO.longitude != null) {
|
||||||
getResult(geoPointDTO);
|
getResult(geoPointDTO);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
}
|
}*/
|
||||||
},
|
},
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(sectionDTO.label!, style: TextStyle(fontSize: 30, fontWeight: FontWeight.w400)),
|
Text(sectionDTO.label!, style: TextStyle(fontSize: 30, fontWeight: FontWeight.w400)),
|
||||||
if((appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
//if((appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
||||||
DownloadPDF(sections: [sectionDTO]),
|
DownloadPDF(sections: [sectionDTO]),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -180,7 +180,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
if((appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
//if((appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -267,7 +267,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
isHTML: true,
|
isHTML: true,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),
|
||||||
if(!(appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
/*if(!(appContext.getContext() as ManagerAppContext).selectedConfiguration!.isMobile!)
|
||||||
MultiStringInputContainer(
|
MultiStringInputContainer(
|
||||||
label: "Description affichée:",
|
label: "Description affichée:",
|
||||||
modalLabel: "Description",
|
modalLabel: "Description",
|
||||||
@ -283,7 +283,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
},
|
},
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if(configurationDTO.isTablet!)
|
/*if(configurationDTO.isTablet!)
|
||||||
CheckInputContainer(
|
CheckInputContainer(
|
||||||
icon: Icons.image,
|
icon: Icons.image,
|
||||||
label: "Fond pour les images des sections :",
|
label: "Fond pour les images des sections :",
|
||||||
@ -214,7 +214,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
configurationDTO.isSectionImageBackground = value;
|
configurationDTO.isSectionImageBackground = value;
|
||||||
},
|
},
|
||||||
),
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
@ -230,7 +230,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
configurationDTO.isOffline = value;
|
configurationDTO.isOffline = value;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
CheckInputContainer(
|
/*CheckInputContainer(
|
||||||
icon: Icons.tablet,
|
icon: Icons.tablet,
|
||||||
label: "Tablette :",
|
label: "Tablette :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -239,8 +239,8 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
configurationDTO.isTablet = value;
|
configurationDTO.isTablet = value;
|
||||||
save(configurationDTO, appContext);
|
save(configurationDTO, appContext);
|
||||||
},
|
},
|
||||||
),
|
),*/
|
||||||
CheckInputContainer(
|
/*CheckInputContainer(
|
||||||
icon: Icons.phone_android,
|
icon: Icons.phone_android,
|
||||||
label: "Mobile :",
|
label: "Mobile :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -249,8 +249,8 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
configurationDTO.isMobile = value;
|
configurationDTO.isMobile = value;
|
||||||
save(configurationDTO, appContext);
|
save(configurationDTO, appContext);
|
||||||
},
|
},
|
||||||
),
|
),*/
|
||||||
if(configurationDTO.isMobile != null && configurationDTO.isMobile!)
|
/*if(configurationDTO.isMobile != null && configurationDTO.isMobile!)
|
||||||
RoundedButton(
|
RoundedButton(
|
||||||
text: "Télécharger les QRCodes",
|
text: "Télécharger les QRCodes",
|
||||||
icon: Icons.qr_code,
|
icon: Icons.qr_code,
|
||||||
@ -280,14 +280,14 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
configurationDTO.isHour = value;
|
configurationDTO.isHour = value;
|
||||||
},
|
},
|
||||||
),
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if(!configurationDTO.isMobile!)
|
/*if(!configurationDTO.isMobile!)
|
||||||
ColorPickerInputContainer(
|
ColorPickerInputContainer(
|
||||||
label: "Couleur fond d'écran :",
|
label: "Couleur fond d'écran :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -295,8 +295,8 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
configurationDTO.secondaryColor = value;
|
configurationDTO.secondaryColor = value;
|
||||||
},
|
},
|
||||||
),
|
),*/
|
||||||
if(!configurationDTO.isMobile!)
|
/*if(!configurationDTO.isMobile!)
|
||||||
ColorPickerInputContainer(
|
ColorPickerInputContainer(
|
||||||
label: "Couleur principale :",
|
label: "Couleur principale :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -323,7 +323,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),
|
||||||
),
|
),*/
|
||||||
ResourceInputContainer(
|
ResourceInputContainer(
|
||||||
label: "Image fond d'écran :",
|
label: "Image fond d'écran :",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -339,7 +339,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if(configurationDTO.isTablet!)
|
/*if(configurationDTO.isTablet!)
|
||||||
Container(
|
Container(
|
||||||
height: 100,
|
height: 100,
|
||||||
child: NumberInputContainer(
|
child: NumberInputContainer(
|
||||||
@ -374,7 +374,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),*/
|
||||||
// It's a section now
|
// It's a section now
|
||||||
/*SizedBox(
|
/*SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
@ -404,12 +404,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
|
|||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done)
|
if (snapshot.connectionState == ConnectionState.done)
|
||||||
{
|
{
|
||||||
if(configurationDTO.isMobile!) {
|
|
||||||
// Only see Article and Quiz type
|
|
||||||
sections = new List<SectionDTO>.from(snapshot.data).where((section) => !section.isSubSection! && (section.type == SectionType.Article || section.type == SectionType.Quiz)).toList();
|
|
||||||
} else {
|
|
||||||
sections = new List<SectionDTO>.from(snapshot.data).where((section) => !section.isSubSection!).toList();
|
sections = new List<SectionDTO>.from(snapshot.data).where((section) => !section.isSubSection!).toList();
|
||||||
}
|
|
||||||
return bodyGrid(configurationDTO, size, appContext);
|
return bodyGrid(configurationDTO, size, appContext);
|
||||||
}
|
}
|
||||||
else if (snapshot.connectionState == ConnectionState.none) {
|
else if (snapshot.connectionState == ConnectionState.none) {
|
||||||
|
|||||||
@ -81,12 +81,12 @@ class _ConfigurationsScreenState extends State<ConfigurationsScreen> {
|
|||||||
if(configurationToCreate != null) {
|
if(configurationToCreate != null) {
|
||||||
if (configurationToCreate.label != null) {
|
if (configurationToCreate.label != null) {
|
||||||
configurationToCreate.dateCreation = DateTime.now();
|
configurationToCreate.dateCreation = DateTime.now();
|
||||||
configurationToCreate.isMobile = false;
|
/*configurationToCreate.isMobile = false;
|
||||||
configurationToCreate.isTablet = false;
|
configurationToCreate.isTablet = false;*/
|
||||||
configurationToCreate.isOffline = false;
|
configurationToCreate.isOffline = false;
|
||||||
configurationToCreate.isDate = false;
|
/*configurationToCreate.isDate = false;
|
||||||
configurationToCreate.isHour = false;
|
configurationToCreate.isHour = false;
|
||||||
configurationToCreate.isSectionImageBackground = false;
|
configurationToCreate.isSectionImageBackground = false;*/
|
||||||
configurationToCreate.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
|
configurationToCreate.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
|
||||||
await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationToCreate);
|
await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationToCreate);
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
|
|||||||
@ -82,7 +82,8 @@ class _SectionReorderListState extends State<SectionReorderList> {
|
|||||||
sections,
|
sections,
|
||||||
index,
|
index,
|
||||||
Key('$index'),
|
Key('$index'),
|
||||||
currentConfiguration.isMobile!,
|
false,
|
||||||
|
//currentConfiguration.isMobile!,
|
||||||
appContext,
|
appContext,
|
||||||
(section) {
|
(section) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -147,7 +148,7 @@ class _SectionReorderListState extends State<SectionReorderList> {
|
|||||||
right: 10,
|
right: 10,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var sectionToCreate = await showNewSection(widget.configurationId, appContext, context, false, currentConfiguration.isMobile!);
|
var sectionToCreate = await showNewSection(widget.configurationId, appContext, context, false, false/*currentConfiguration.isMobile!*/);
|
||||||
if(sectionToCreate != null)
|
if(sectionToCreate != null)
|
||||||
{
|
{
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class LoginScreen extends StatefulWidget {
|
|||||||
class _LoginScreenState extends State<LoginScreen> {
|
class _LoginScreenState extends State<LoginScreen> {
|
||||||
String email = ""; // DEV "test@email.be"
|
String email = ""; // DEV "test@email.be"
|
||||||
String password = ""; // DEV = "kljqsdkljqsd"
|
String password = ""; // DEV = "kljqsdkljqsd"
|
||||||
String? host = "https://api.mymuseum.be"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
|
String? host = "http://localhost:5000"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
|
||||||
Client? clientAPI;
|
Client? clientAPI;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
bool isRememberMe = false;
|
bool isRememberMe = false;
|
||||||
@ -178,7 +178,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
//this.isRememberMe = widget.session.rememberMe;
|
//this.isRememberMe = widget.session.rememberMe;
|
||||||
this.host = "https://api.mymuseum.be"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
|
this.host = "http://localhost:5000"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
|
||||||
//this.email = "test@email.be"; //widget.session.email;
|
//this.email = "test@email.be"; //widget.session.email;
|
||||||
//this.password = "kljqsdkljqsd"; //widget.session.password;
|
//this.password = "kljqsdkljqsd"; //widget.session.password;
|
||||||
|
|
||||||
|
|||||||
@ -12,16 +12,15 @@ part of openapi.api;
|
|||||||
|
|
||||||
class CoordinateEqualityComparer {
|
class CoordinateEqualityComparer {
|
||||||
/// Returns a new [CoordinateEqualityComparer] instance.
|
/// Returns a new [CoordinateEqualityComparer] instance.
|
||||||
CoordinateEqualityComparer({
|
CoordinateEqualityComparer();
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is CoordinateEqualityComparer &&
|
bool operator ==(Object other) => identical(this, other) || other is CoordinateEqualityComparer;
|
||||||
|
|
||||||
@override
|
/*@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
|
*/
|
||||||
@override
|
@override
|
||||||
String toString() => 'CoordinateEqualityComparer[]';
|
String toString() => 'CoordinateEqualityComparer[]';
|
||||||
|
|
||||||
|
|||||||
@ -1,171 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class DeviceDetailDTOAllOf {
|
|
||||||
/// Returns a new [DeviceDetailDTOAllOf] instance.
|
|
||||||
DeviceDetailDTOAllOf({
|
|
||||||
this.connectionLevel,
|
|
||||||
this.lastConnectionLevel,
|
|
||||||
this.batteryLevel,
|
|
||||||
this.lastBatteryLevel,
|
|
||||||
});
|
|
||||||
|
|
||||||
String? connectionLevel;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
DateTime? lastConnectionLevel;
|
|
||||||
|
|
||||||
String? batteryLevel;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
DateTime? lastBatteryLevel;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is DeviceDetailDTOAllOf &&
|
|
||||||
other.connectionLevel == connectionLevel &&
|
|
||||||
other.lastConnectionLevel == lastConnectionLevel &&
|
|
||||||
other.batteryLevel == batteryLevel &&
|
|
||||||
other.lastBatteryLevel == lastBatteryLevel;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(connectionLevel == null ? 0 : connectionLevel!.hashCode) +
|
|
||||||
(lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) +
|
|
||||||
(batteryLevel == null ? 0 : batteryLevel!.hashCode) +
|
|
||||||
(lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.connectionLevel != null) {
|
|
||||||
json[r'connectionLevel'] = this.connectionLevel;
|
|
||||||
} else {
|
|
||||||
json[r'connectionLevel'] = null;
|
|
||||||
}
|
|
||||||
if (this.lastConnectionLevel != null) {
|
|
||||||
json[r'lastConnectionLevel'] =
|
|
||||||
this.lastConnectionLevel!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'lastConnectionLevel'] = null;
|
|
||||||
}
|
|
||||||
if (this.batteryLevel != null) {
|
|
||||||
json[r'batteryLevel'] = this.batteryLevel;
|
|
||||||
} else {
|
|
||||||
json[r'batteryLevel'] = null;
|
|
||||||
}
|
|
||||||
if (this.lastBatteryLevel != null) {
|
|
||||||
json[r'lastBatteryLevel'] =
|
|
||||||
this.lastBatteryLevel!.toUtc().toIso8601String();
|
|
||||||
} else {
|
|
||||||
json[r'lastBatteryLevel'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [DeviceDetailDTOAllOf] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static DeviceDetailDTOAllOf? fromJson(dynamic value) {
|
|
||||||
if (value is Map) {
|
|
||||||
final json = value.cast<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 "DeviceDetailDTOAllOf[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "DeviceDetailDTOAllOf[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return DeviceDetailDTOAllOf(
|
|
||||||
connectionLevel: mapValueOfType<String>(json, r'connectionLevel'),
|
|
||||||
lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''),
|
|
||||||
batteryLevel: mapValueOfType<String>(json, r'batteryLevel'),
|
|
||||||
lastBatteryLevel: mapDateTime(json, r'lastBatteryLevel', ''),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<DeviceDetailDTOAllOf> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <DeviceDetailDTOAllOf>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = DeviceDetailDTOAllOf.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, DeviceDetailDTOAllOf> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, DeviceDetailDTOAllOf>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = DeviceDetailDTOAllOf.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of DeviceDetailDTOAllOf-objects as value to a dart map
|
|
||||||
static Map<String, List<DeviceDetailDTOAllOf>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<DeviceDetailDTOAllOf>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = DeviceDetailDTOAllOf.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class ExportConfigurationDTOAllOf {
|
|
||||||
/// Returns a new [ExportConfigurationDTOAllOf] instance.
|
|
||||||
ExportConfigurationDTOAllOf({
|
|
||||||
this.sections = const [],
|
|
||||||
this.resources = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
List<SectionDTO>? sections;
|
|
||||||
|
|
||||||
List<ResourceDTO>? resources;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is ExportConfigurationDTOAllOf &&
|
|
||||||
other.sections == sections &&
|
|
||||||
other.resources == resources;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(sections == null ? 0 : sections!.hashCode) +
|
|
||||||
(resources == null ? 0 : resources!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.sections != null) {
|
|
||||||
json[r'sections'] = this.sections;
|
|
||||||
} else {
|
|
||||||
json[r'sections'] = null;
|
|
||||||
}
|
|
||||||
if (this.resources != null) {
|
|
||||||
json[r'resources'] = this.resources;
|
|
||||||
} else {
|
|
||||||
json[r'resources'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [ExportConfigurationDTOAllOf] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static ExportConfigurationDTOAllOf? fromJson(dynamic value) {
|
|
||||||
if (value is Map) {
|
|
||||||
final json = value.cast<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 "ExportConfigurationDTOAllOf[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "ExportConfigurationDTOAllOf[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ExportConfigurationDTOAllOf(
|
|
||||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
|
||||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<ExportConfigurationDTOAllOf> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <ExportConfigurationDTOAllOf>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ExportConfigurationDTOAllOf.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ExportConfigurationDTOAllOf> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, ExportConfigurationDTOAllOf>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = ExportConfigurationDTOAllOf.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of ExportConfigurationDTOAllOf-objects as value to a dart map
|
|
||||||
static Map<String, List<ExportConfigurationDTOAllOf>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<ExportConfigurationDTOAllOf>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = ExportConfigurationDTOAllOf.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
@ -23,12 +23,14 @@ class GeoPoint {
|
|||||||
this.email = const [],
|
this.email = const [],
|
||||||
this.site = const [],
|
this.site = const [],
|
||||||
this.categorieId,
|
this.categorieId,
|
||||||
this.latitude,
|
this.geometry,
|
||||||
this.longitude,
|
this.polyColor,
|
||||||
this.imageResourceId,
|
this.imageResourceId,
|
||||||
this.imageUrl,
|
this.imageUrl,
|
||||||
this.sectionMapId,
|
this.sectionMapId,
|
||||||
this.sectionMap,
|
this.sectionMap,
|
||||||
|
this.sectionEventId,
|
||||||
|
this.sectionEvent,
|
||||||
});
|
});
|
||||||
|
|
||||||
int id;
|
int id;
|
||||||
@ -51,9 +53,9 @@ class GeoPoint {
|
|||||||
|
|
||||||
int? categorieId;
|
int? categorieId;
|
||||||
|
|
||||||
String? latitude;
|
PointAllOfBoundary? geometry;
|
||||||
|
|
||||||
String? longitude;
|
String? polyColor;
|
||||||
|
|
||||||
String? imageResourceId;
|
String? imageResourceId;
|
||||||
|
|
||||||
@ -61,7 +63,11 @@ class GeoPoint {
|
|||||||
|
|
||||||
String? sectionMapId;
|
String? sectionMapId;
|
||||||
|
|
||||||
GeoPointSectionMap? sectionMap;
|
GuidedPathSectionMap? sectionMap;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
ApplicationInstanceSectionEvent? sectionEvent;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
@ -77,12 +83,14 @@ class GeoPoint {
|
|||||||
_deepEquality.equals(other.email, email) &&
|
_deepEquality.equals(other.email, email) &&
|
||||||
_deepEquality.equals(other.site, site) &&
|
_deepEquality.equals(other.site, site) &&
|
||||||
other.categorieId == categorieId &&
|
other.categorieId == categorieId &&
|
||||||
other.latitude == latitude &&
|
other.geometry == geometry &&
|
||||||
other.longitude == longitude &&
|
other.polyColor == polyColor &&
|
||||||
other.imageResourceId == imageResourceId &&
|
other.imageResourceId == imageResourceId &&
|
||||||
other.imageUrl == imageUrl &&
|
other.imageUrl == imageUrl &&
|
||||||
other.sectionMapId == sectionMapId &&
|
other.sectionMapId == sectionMapId &&
|
||||||
other.sectionMap == sectionMap;
|
other.sectionMap == sectionMap &&
|
||||||
|
other.sectionEventId == sectionEventId &&
|
||||||
|
other.sectionEvent == sectionEvent;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -97,16 +105,18 @@ class GeoPoint {
|
|||||||
(email.hashCode) +
|
(email.hashCode) +
|
||||||
(site.hashCode) +
|
(site.hashCode) +
|
||||||
(categorieId == null ? 0 : categorieId!.hashCode) +
|
(categorieId == null ? 0 : categorieId!.hashCode) +
|
||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
(longitude == null ? 0 : longitude!.hashCode) +
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
||||||
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
(sectionMap == null ? 0 : sectionMap!.hashCode);
|
(sectionMap == null ? 0 : sectionMap!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||||
|
(sectionEvent == null ? 0 : sectionEvent!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap]';
|
'GeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, geometry=$geometry, polyColor=$polyColor, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -124,15 +134,15 @@ class GeoPoint {
|
|||||||
} else {
|
} else {
|
||||||
json[r'categorieId'] = null;
|
json[r'categorieId'] = null;
|
||||||
}
|
}
|
||||||
if (this.latitude != null) {
|
if (this.geometry != null) {
|
||||||
json[r'latitude'] = this.latitude;
|
json[r'geometry'] = this.geometry;
|
||||||
} else {
|
} else {
|
||||||
json[r'latitude'] = null;
|
json[r'geometry'] = null;
|
||||||
}
|
}
|
||||||
if (this.longitude != null) {
|
if (this.polyColor != null) {
|
||||||
json[r'longitude'] = this.longitude;
|
json[r'polyColor'] = this.polyColor;
|
||||||
} else {
|
} else {
|
||||||
json[r'longitude'] = null;
|
json[r'polyColor'] = null;
|
||||||
}
|
}
|
||||||
if (this.imageResourceId != null) {
|
if (this.imageResourceId != null) {
|
||||||
json[r'imageResourceId'] = this.imageResourceId;
|
json[r'imageResourceId'] = this.imageResourceId;
|
||||||
@ -154,6 +164,16 @@ class GeoPoint {
|
|||||||
} else {
|
} else {
|
||||||
json[r'sectionMap'] = null;
|
json[r'sectionMap'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEvent != null) {
|
||||||
|
json[r'sectionEvent'] = this.sectionEvent;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEvent'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,12 +208,15 @@ class GeoPoint {
|
|||||||
email: TranslationDTO.listFromJson(json[r'email']),
|
email: TranslationDTO.listFromJson(json[r'email']),
|
||||||
site: TranslationDTO.listFromJson(json[r'site']),
|
site: TranslationDTO.listFromJson(json[r'site']),
|
||||||
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
||||||
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
sectionMap: GeoPointSectionMap.fromJson(json[r'sectionMap']),
|
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
sectionEvent:
|
||||||
|
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -18,8 +18,6 @@ class GeoPointDTO {
|
|||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.contents = const [],
|
this.contents = const [],
|
||||||
this.categorieId,
|
this.categorieId,
|
||||||
this.latitude,
|
|
||||||
this.longitude,
|
|
||||||
this.imageResourceId,
|
this.imageResourceId,
|
||||||
this.imageUrl,
|
this.imageUrl,
|
||||||
this.schedules = const [],
|
this.schedules = const [],
|
||||||
@ -27,6 +25,10 @@ class GeoPointDTO {
|
|||||||
this.phone = const [],
|
this.phone = const [],
|
||||||
this.email = const [],
|
this.email = const [],
|
||||||
this.site = const [],
|
this.site = const [],
|
||||||
|
this.geometry,
|
||||||
|
this.polyColor,
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionEventId,
|
||||||
});
|
});
|
||||||
|
|
||||||
int? id;
|
int? id;
|
||||||
@ -39,10 +41,6 @@ class GeoPointDTO {
|
|||||||
|
|
||||||
int? categorieId;
|
int? categorieId;
|
||||||
|
|
||||||
String? latitude;
|
|
||||||
|
|
||||||
String? longitude;
|
|
||||||
|
|
||||||
String? imageResourceId;
|
String? imageResourceId;
|
||||||
|
|
||||||
String? imageUrl;
|
String? imageUrl;
|
||||||
@ -57,6 +55,14 @@ class GeoPointDTO {
|
|||||||
|
|
||||||
List<TranslationDTO>? site;
|
List<TranslationDTO>? site;
|
||||||
|
|
||||||
|
EventAddressDTOGeometry? geometry;
|
||||||
|
|
||||||
|
String? polyColor;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
@ -66,15 +72,17 @@ class GeoPointDTO {
|
|||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
_deepEquality.equals(other.contents, contents) &&
|
_deepEquality.equals(other.contents, contents) &&
|
||||||
other.categorieId == categorieId &&
|
other.categorieId == categorieId &&
|
||||||
other.latitude == latitude &&
|
|
||||||
other.longitude == longitude &&
|
|
||||||
other.imageResourceId == imageResourceId &&
|
other.imageResourceId == imageResourceId &&
|
||||||
other.imageUrl == imageUrl &&
|
other.imageUrl == imageUrl &&
|
||||||
_deepEquality.equals(other.schedules, schedules) &&
|
_deepEquality.equals(other.schedules, schedules) &&
|
||||||
_deepEquality.equals(other.prices, prices) &&
|
_deepEquality.equals(other.prices, prices) &&
|
||||||
_deepEquality.equals(other.phone, phone) &&
|
_deepEquality.equals(other.phone, phone) &&
|
||||||
_deepEquality.equals(other.email, email) &&
|
_deepEquality.equals(other.email, email) &&
|
||||||
_deepEquality.equals(other.site, site);
|
_deepEquality.equals(other.site, site) &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.polyColor == polyColor &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionEventId == sectionEventId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -84,19 +92,21 @@ class GeoPointDTO {
|
|||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(contents == null ? 0 : contents!.hashCode) +
|
(contents == null ? 0 : contents!.hashCode) +
|
||||||
(categorieId == null ? 0 : categorieId!.hashCode) +
|
(categorieId == null ? 0 : categorieId!.hashCode) +
|
||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
|
||||||
(longitude == null ? 0 : longitude!.hashCode) +
|
|
||||||
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
||||||
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
(schedules == null ? 0 : schedules!.hashCode) +
|
(schedules == null ? 0 : schedules!.hashCode) +
|
||||||
(prices == null ? 0 : prices!.hashCode) +
|
(prices == null ? 0 : prices!.hashCode) +
|
||||||
(phone == null ? 0 : phone!.hashCode) +
|
(phone == null ? 0 : phone!.hashCode) +
|
||||||
(email == null ? 0 : email!.hashCode) +
|
(email == null ? 0 : email!.hashCode) +
|
||||||
(site == null ? 0 : site!.hashCode);
|
(site == null ? 0 : site!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]';
|
'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, geometry=$geometry, polyColor=$polyColor, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -125,16 +135,6 @@ class GeoPointDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'categorieId'] = null;
|
json[r'categorieId'] = null;
|
||||||
}
|
}
|
||||||
if (this.latitude != null) {
|
|
||||||
json[r'latitude'] = this.latitude;
|
|
||||||
} else {
|
|
||||||
json[r'latitude'] = null;
|
|
||||||
}
|
|
||||||
if (this.longitude != null) {
|
|
||||||
json[r'longitude'] = this.longitude;
|
|
||||||
} else {
|
|
||||||
json[r'longitude'] = null;
|
|
||||||
}
|
|
||||||
if (this.imageResourceId != null) {
|
if (this.imageResourceId != null) {
|
||||||
json[r'imageResourceId'] = this.imageResourceId;
|
json[r'imageResourceId'] = this.imageResourceId;
|
||||||
} else {
|
} else {
|
||||||
@ -170,6 +170,26 @@ class GeoPointDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'site'] = null;
|
json[r'site'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.polyColor != null) {
|
||||||
|
json[r'polyColor'] = this.polyColor;
|
||||||
|
} else {
|
||||||
|
json[r'polyColor'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,8 +219,6 @@ class GeoPointDTO {
|
|||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
contents: ContentDTO.listFromJson(json[r'contents']),
|
contents: ContentDTO.listFromJson(json[r'contents']),
|
||||||
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
|
||||||
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
||||||
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
schedules: TranslationDTO.listFromJson(json[r'schedules']),
|
schedules: TranslationDTO.listFromJson(json[r'schedules']),
|
||||||
@ -208,6 +226,10 @@ class GeoPointDTO {
|
|||||||
phone: TranslationDTO.listFromJson(json[r'phone']),
|
phone: TranslationDTO.listFromJson(json[r'phone']),
|
||||||
email: TranslationDTO.listFromJson(json[r'email']),
|
email: TranslationDTO.listFromJson(json[r'email']),
|
||||||
site: TranslationDTO.listFromJson(json[r'site']),
|
site: TranslationDTO.listFromJson(json[r'site']),
|
||||||
|
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
|
||||||
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -1,179 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class GeoPointDTOCategorie {
|
|
||||||
/// Returns a new [GeoPointDTOCategorie] instance.
|
|
||||||
GeoPointDTOCategorie({
|
|
||||||
this.id,
|
|
||||||
this.label = const [],
|
|
||||||
this.icon,
|
|
||||||
this.iconResourceId,
|
|
||||||
this.iconUrl,
|
|
||||||
this.order,
|
|
||||||
});
|
|
||||||
|
|
||||||
int? id;
|
|
||||||
|
|
||||||
List<TranslationDTO>? label;
|
|
||||||
|
|
||||||
String? icon;
|
|
||||||
|
|
||||||
String? iconResourceId;
|
|
||||||
|
|
||||||
String? iconUrl;
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is GeoPointDTOCategorie &&
|
|
||||||
other.id == id &&
|
|
||||||
other.label == label &&
|
|
||||||
other.icon == icon &&
|
|
||||||
other.iconResourceId == iconResourceId &&
|
|
||||||
other.iconUrl == iconUrl &&
|
|
||||||
other.order == order;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(id == null ? 0 : id!.hashCode) +
|
|
||||||
(label == null ? 0 : label!.hashCode) +
|
|
||||||
(icon == null ? 0 : icon!.hashCode) +
|
|
||||||
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
|
||||||
(iconUrl == null ? 0 : iconUrl!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.id != null) {
|
|
||||||
json[r'id'] = this.id;
|
|
||||||
} else {
|
|
||||||
json[r'id'] = null;
|
|
||||||
}
|
|
||||||
if (this.label != null) {
|
|
||||||
json[r'label'] = this.label;
|
|
||||||
} else {
|
|
||||||
json[r'label'] = null;
|
|
||||||
}
|
|
||||||
if (this.icon != null) {
|
|
||||||
json[r'icon'] = this.icon;
|
|
||||||
} else {
|
|
||||||
json[r'icon'] = null;
|
|
||||||
}
|
|
||||||
if (this.iconResourceId != null) {
|
|
||||||
json[r'iconResourceId'] = this.iconResourceId;
|
|
||||||
} else {
|
|
||||||
json[r'iconResourceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.iconUrl != null) {
|
|
||||||
json[r'iconUrl'] = this.iconUrl;
|
|
||||||
} else {
|
|
||||||
json[r'iconUrl'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
|
||||||
json[r'order'] = this.order;
|
|
||||||
} else {
|
|
||||||
json[r'order'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [GeoPointDTOCategorie] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static GeoPointDTOCategorie? 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 "GeoPointDTOCategorie[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return GeoPointDTOCategorie(
|
|
||||||
id: mapValueOfType<int>(json, r'id'),
|
|
||||||
label: TranslationDTO.listFromJson(json[r'label']),
|
|
||||||
icon: mapValueOfType<String>(json, r'icon'),
|
|
||||||
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
|
||||||
iconUrl: mapValueOfType<String>(json, r'iconUrl'),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<GeoPointDTOCategorie> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <GeoPointDTOCategorie>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = GeoPointDTOCategorie.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, GeoPointDTOCategorie> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, GeoPointDTOCategorie>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = GeoPointDTOCategorie.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map
|
|
||||||
static Map<String, List<GeoPointDTOCategorie>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<GeoPointDTOCategorie>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = GeoPointDTOCategorie.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
322
manager_api_new/lib/model/geometry.dart
Normal file
322
manager_api_new/lib/model/geometry.dart
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
//
|
||||||
|
// 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 Geometry {
|
||||||
|
/// Returns a new [Geometry] instance.
|
||||||
|
Geometry({
|
||||||
|
this.factory_,
|
||||||
|
this.userData,
|
||||||
|
this.srid,
|
||||||
|
this.precisionModel,
|
||||||
|
this.numGeometries,
|
||||||
|
this.isSimple,
|
||||||
|
this.isValid,
|
||||||
|
this.area,
|
||||||
|
this.length,
|
||||||
|
this.centroid,
|
||||||
|
this.interiorPoint,
|
||||||
|
this.pointOnSurface,
|
||||||
|
this.envelope,
|
||||||
|
this.envelopeInternal,
|
||||||
|
this.isRectangle,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryFactory? factory_;
|
||||||
|
|
||||||
|
Object? userData;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numGeometries;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isSimple;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? length;
|
||||||
|
|
||||||
|
GeometryCentroid? centroid;
|
||||||
|
|
||||||
|
GeometryCentroid? interiorPoint;
|
||||||
|
|
||||||
|
GeometryCentroid? pointOnSurface;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? envelope;
|
||||||
|
|
||||||
|
GeometryEnvelopeInternal? envelopeInternal;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is Geometry &&
|
||||||
|
other.factory_ == factory_ &&
|
||||||
|
other.userData == userData &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.numGeometries == numGeometries &&
|
||||||
|
other.isSimple == isSimple &&
|
||||||
|
other.isValid == isValid &&
|
||||||
|
other.area == area &&
|
||||||
|
other.length == length &&
|
||||||
|
other.centroid == centroid &&
|
||||||
|
other.interiorPoint == interiorPoint &&
|
||||||
|
other.pointOnSurface == pointOnSurface &&
|
||||||
|
other.envelope == envelope &&
|
||||||
|
other.envelopeInternal == envelopeInternal &&
|
||||||
|
other.isRectangle == isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
||||||
|
(userData == null ? 0 : userData!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
||||||
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(length == null ? 0 : length!.hashCode) +
|
||||||
|
(centroid == null ? 0 : centroid!.hashCode) +
|
||||||
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
||||||
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
||||||
|
(envelope == null ? 0 : envelope!.hashCode) +
|
||||||
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
||||||
|
(isRectangle == null ? 0 : isRectangle!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'Geometry[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.factory_ != null) {
|
||||||
|
json[r'factory'] = this.factory_;
|
||||||
|
} else {
|
||||||
|
json[r'factory'] = null;
|
||||||
|
}
|
||||||
|
if (this.userData != null) {
|
||||||
|
json[r'userData'] = this.userData;
|
||||||
|
} else {
|
||||||
|
json[r'userData'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.numGeometries != null) {
|
||||||
|
json[r'numGeometries'] = this.numGeometries;
|
||||||
|
} else {
|
||||||
|
json[r'numGeometries'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSimple != null) {
|
||||||
|
json[r'isSimple'] = this.isSimple;
|
||||||
|
} else {
|
||||||
|
json[r'isSimple'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.length != null) {
|
||||||
|
json[r'length'] = this.length;
|
||||||
|
} else {
|
||||||
|
json[r'length'] = null;
|
||||||
|
}
|
||||||
|
if (this.centroid != null) {
|
||||||
|
json[r'centroid'] = this.centroid;
|
||||||
|
} else {
|
||||||
|
json[r'centroid'] = null;
|
||||||
|
}
|
||||||
|
if (this.interiorPoint != null) {
|
||||||
|
json[r'interiorPoint'] = this.interiorPoint;
|
||||||
|
} else {
|
||||||
|
json[r'interiorPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.pointOnSurface != null) {
|
||||||
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
||||||
|
} else {
|
||||||
|
json[r'pointOnSurface'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelope != null) {
|
||||||
|
json[r'envelope'] = this.envelope;
|
||||||
|
} else {
|
||||||
|
json[r'envelope'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelopeInternal != null) {
|
||||||
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
||||||
|
} else {
|
||||||
|
json[r'envelopeInternal'] = null;
|
||||||
|
}
|
||||||
|
if (this.isRectangle != null) {
|
||||||
|
json[r'isRectangle'] = this.isRectangle;
|
||||||
|
} else {
|
||||||
|
json[r'isRectangle'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [Geometry] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static Geometry? 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 "Geometry[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "Geometry[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return Geometry(
|
||||||
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
||||||
|
userData: mapValueOfType<Object>(json, r'userData'),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
||||||
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
length: mapValueOfType<double>(json, r'length'),
|
||||||
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
||||||
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
||||||
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
||||||
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
||||||
|
envelopeInternal:
|
||||||
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
||||||
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Geometry> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <Geometry>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = Geometry.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, Geometry> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, Geometry>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = Geometry.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of Geometry-objects as value to a dart map
|
||||||
|
static Map<String, List<Geometry>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<Geometry>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = Geometry.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
531
manager_api_new/lib/model/geometry_centroid.dart
Normal file
531
manager_api_new/lib/model/geometry_centroid.dart
Normal file
@ -0,0 +1,531 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryCentroid {
|
||||||
|
/// Returns a new [GeometryCentroid] instance.
|
||||||
|
GeometryCentroid({
|
||||||
|
this.factory_,
|
||||||
|
this.userData,
|
||||||
|
this.srid,
|
||||||
|
this.precisionModel,
|
||||||
|
this.numGeometries,
|
||||||
|
this.isSimple,
|
||||||
|
this.isValid,
|
||||||
|
this.area,
|
||||||
|
this.length,
|
||||||
|
this.centroid,
|
||||||
|
this.interiorPoint,
|
||||||
|
this.pointOnSurface,
|
||||||
|
this.envelope,
|
||||||
|
this.envelopeInternal,
|
||||||
|
this.isRectangle,
|
||||||
|
this.coordinateSequence,
|
||||||
|
this.coordinates = const [],
|
||||||
|
this.numPoints,
|
||||||
|
this.isEmpty,
|
||||||
|
this.dimension,
|
||||||
|
this.boundaryDimension,
|
||||||
|
this.x,
|
||||||
|
this.y,
|
||||||
|
this.coordinate,
|
||||||
|
this.geometryType,
|
||||||
|
this.ogcGeometryType,
|
||||||
|
this.boundary,
|
||||||
|
this.z,
|
||||||
|
this.m,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryFactory? factory_;
|
||||||
|
|
||||||
|
Object? userData;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numGeometries;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isSimple;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? length;
|
||||||
|
|
||||||
|
GeometryCentroid? centroid;
|
||||||
|
|
||||||
|
GeometryCentroid? interiorPoint;
|
||||||
|
|
||||||
|
GeometryCentroid? pointOnSurface;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? envelope;
|
||||||
|
|
||||||
|
GeometryEnvelopeInternal? envelopeInternal;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isRectangle;
|
||||||
|
|
||||||
|
PointAllOfCoordinateSequence? coordinateSequence;
|
||||||
|
|
||||||
|
List<Coordinate>? coordinates;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numPoints;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isEmpty;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Dimension? dimension;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Dimension? boundaryDimension;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? x;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? y;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? coordinate;
|
||||||
|
|
||||||
|
String? geometryType;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
OgcGeometryType? ogcGeometryType;
|
||||||
|
|
||||||
|
PointAllOfBoundary? boundary;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? z;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? m;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryCentroid &&
|
||||||
|
other.factory_ == factory_ &&
|
||||||
|
other.userData == userData &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.numGeometries == numGeometries &&
|
||||||
|
other.isSimple == isSimple &&
|
||||||
|
other.isValid == isValid &&
|
||||||
|
other.area == area &&
|
||||||
|
other.length == length &&
|
||||||
|
other.centroid == centroid &&
|
||||||
|
other.interiorPoint == interiorPoint &&
|
||||||
|
other.pointOnSurface == pointOnSurface &&
|
||||||
|
other.envelope == envelope &&
|
||||||
|
other.envelopeInternal == envelopeInternal &&
|
||||||
|
other.isRectangle == isRectangle &&
|
||||||
|
other.coordinateSequence == coordinateSequence &&
|
||||||
|
_deepEquality.equals(other.coordinates, coordinates) &&
|
||||||
|
other.numPoints == numPoints &&
|
||||||
|
other.isEmpty == isEmpty &&
|
||||||
|
other.dimension == dimension &&
|
||||||
|
other.boundaryDimension == boundaryDimension &&
|
||||||
|
other.x == x &&
|
||||||
|
other.y == y &&
|
||||||
|
other.coordinate == coordinate &&
|
||||||
|
other.geometryType == geometryType &&
|
||||||
|
other.ogcGeometryType == ogcGeometryType &&
|
||||||
|
other.boundary == boundary &&
|
||||||
|
other.z == z &&
|
||||||
|
other.m == m;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
||||||
|
(userData == null ? 0 : userData!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
||||||
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(length == null ? 0 : length!.hashCode) +
|
||||||
|
(centroid == null ? 0 : centroid!.hashCode) +
|
||||||
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
||||||
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
||||||
|
(envelope == null ? 0 : envelope!.hashCode) +
|
||||||
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
||||||
|
(isRectangle == null ? 0 : isRectangle!.hashCode) +
|
||||||
|
(coordinateSequence == null ? 0 : coordinateSequence!.hashCode) +
|
||||||
|
(coordinates == null ? 0 : coordinates!.hashCode) +
|
||||||
|
(numPoints == null ? 0 : numPoints!.hashCode) +
|
||||||
|
(isEmpty == null ? 0 : isEmpty!.hashCode) +
|
||||||
|
(dimension == null ? 0 : dimension!.hashCode) +
|
||||||
|
(boundaryDimension == null ? 0 : boundaryDimension!.hashCode) +
|
||||||
|
(x == null ? 0 : x!.hashCode) +
|
||||||
|
(y == null ? 0 : y!.hashCode) +
|
||||||
|
(coordinate == null ? 0 : coordinate!.hashCode) +
|
||||||
|
(geometryType == null ? 0 : geometryType!.hashCode) +
|
||||||
|
(ogcGeometryType == null ? 0 : ogcGeometryType!.hashCode) +
|
||||||
|
(boundary == null ? 0 : boundary!.hashCode) +
|
||||||
|
(z == null ? 0 : z!.hashCode) +
|
||||||
|
(m == null ? 0 : m!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryCentroid[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle, coordinateSequence=$coordinateSequence, coordinates=$coordinates, numPoints=$numPoints, isEmpty=$isEmpty, dimension=$dimension, boundaryDimension=$boundaryDimension, x=$x, y=$y, coordinate=$coordinate, geometryType=$geometryType, ogcGeometryType=$ogcGeometryType, boundary=$boundary, z=$z, m=$m]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.factory_ != null) {
|
||||||
|
json[r'factory'] = this.factory_;
|
||||||
|
} else {
|
||||||
|
json[r'factory'] = null;
|
||||||
|
}
|
||||||
|
if (this.userData != null) {
|
||||||
|
json[r'userData'] = this.userData;
|
||||||
|
} else {
|
||||||
|
json[r'userData'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.numGeometries != null) {
|
||||||
|
json[r'numGeometries'] = this.numGeometries;
|
||||||
|
} else {
|
||||||
|
json[r'numGeometries'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSimple != null) {
|
||||||
|
json[r'isSimple'] = this.isSimple;
|
||||||
|
} else {
|
||||||
|
json[r'isSimple'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.length != null) {
|
||||||
|
json[r'length'] = this.length;
|
||||||
|
} else {
|
||||||
|
json[r'length'] = null;
|
||||||
|
}
|
||||||
|
if (this.centroid != null) {
|
||||||
|
json[r'centroid'] = this.centroid;
|
||||||
|
} else {
|
||||||
|
json[r'centroid'] = null;
|
||||||
|
}
|
||||||
|
if (this.interiorPoint != null) {
|
||||||
|
json[r'interiorPoint'] = this.interiorPoint;
|
||||||
|
} else {
|
||||||
|
json[r'interiorPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.pointOnSurface != null) {
|
||||||
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
||||||
|
} else {
|
||||||
|
json[r'pointOnSurface'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelope != null) {
|
||||||
|
json[r'envelope'] = this.envelope;
|
||||||
|
} else {
|
||||||
|
json[r'envelope'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelopeInternal != null) {
|
||||||
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
||||||
|
} else {
|
||||||
|
json[r'envelopeInternal'] = null;
|
||||||
|
}
|
||||||
|
if (this.isRectangle != null) {
|
||||||
|
json[r'isRectangle'] = this.isRectangle;
|
||||||
|
} else {
|
||||||
|
json[r'isRectangle'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateSequence != null) {
|
||||||
|
json[r'coordinateSequence'] = this.coordinateSequence;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateSequence'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinates != null) {
|
||||||
|
json[r'coordinates'] = this.coordinates;
|
||||||
|
} else {
|
||||||
|
json[r'coordinates'] = null;
|
||||||
|
}
|
||||||
|
if (this.numPoints != null) {
|
||||||
|
json[r'numPoints'] = this.numPoints;
|
||||||
|
} else {
|
||||||
|
json[r'numPoints'] = null;
|
||||||
|
}
|
||||||
|
if (this.isEmpty != null) {
|
||||||
|
json[r'isEmpty'] = this.isEmpty;
|
||||||
|
} else {
|
||||||
|
json[r'isEmpty'] = null;
|
||||||
|
}
|
||||||
|
if (this.dimension != null) {
|
||||||
|
json[r'dimension'] = this.dimension;
|
||||||
|
} else {
|
||||||
|
json[r'dimension'] = null;
|
||||||
|
}
|
||||||
|
if (this.boundaryDimension != null) {
|
||||||
|
json[r'boundaryDimension'] = this.boundaryDimension;
|
||||||
|
} else {
|
||||||
|
json[r'boundaryDimension'] = null;
|
||||||
|
}
|
||||||
|
if (this.x != null) {
|
||||||
|
json[r'x'] = this.x;
|
||||||
|
} else {
|
||||||
|
json[r'x'] = null;
|
||||||
|
}
|
||||||
|
if (this.y != null) {
|
||||||
|
json[r'y'] = this.y;
|
||||||
|
} else {
|
||||||
|
json[r'y'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinate != null) {
|
||||||
|
json[r'coordinate'] = this.coordinate;
|
||||||
|
} else {
|
||||||
|
json[r'coordinate'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometryType != null) {
|
||||||
|
json[r'geometryType'] = this.geometryType;
|
||||||
|
} else {
|
||||||
|
json[r'geometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.ogcGeometryType != null) {
|
||||||
|
json[r'ogcGeometryType'] = this.ogcGeometryType;
|
||||||
|
} else {
|
||||||
|
json[r'ogcGeometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.boundary != null) {
|
||||||
|
json[r'boundary'] = this.boundary;
|
||||||
|
} else {
|
||||||
|
json[r'boundary'] = null;
|
||||||
|
}
|
||||||
|
if (this.z != null) {
|
||||||
|
json[r'z'] = this.z;
|
||||||
|
} else {
|
||||||
|
json[r'z'] = null;
|
||||||
|
}
|
||||||
|
if (this.m != null) {
|
||||||
|
json[r'm'] = this.m;
|
||||||
|
} else {
|
||||||
|
json[r'm'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryCentroid] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryCentroid? 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 "GeometryCentroid[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryCentroid[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryCentroid(
|
||||||
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
||||||
|
userData: mapValueOfType<Object>(json, r'userData'),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
||||||
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
length: mapValueOfType<double>(json, r'length'),
|
||||||
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
||||||
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
||||||
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
||||||
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
||||||
|
envelopeInternal:
|
||||||
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
||||||
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
||||||
|
coordinateSequence:
|
||||||
|
PointAllOfCoordinateSequence.fromJson(json[r'coordinateSequence']),
|
||||||
|
coordinates: Coordinate.listFromJson(json[r'coordinates']),
|
||||||
|
numPoints: mapValueOfType<int>(json, r'numPoints'),
|
||||||
|
isEmpty: mapValueOfType<bool>(json, r'isEmpty'),
|
||||||
|
dimension: Dimension.fromJson(json[r'dimension']),
|
||||||
|
boundaryDimension: Dimension.fromJson(json[r'boundaryDimension']),
|
||||||
|
x: mapValueOfType<double>(json, r'x'),
|
||||||
|
y: mapValueOfType<double>(json, r'y'),
|
||||||
|
coordinate: PointAllOfCoordinate.fromJson(json[r'coordinate']),
|
||||||
|
geometryType: mapValueOfType<String>(json, r'geometryType'),
|
||||||
|
ogcGeometryType: OgcGeometryType.fromJson(json[r'ogcGeometryType']),
|
||||||
|
boundary: PointAllOfBoundary.fromJson(json[r'boundary']),
|
||||||
|
z: mapValueOfType<double>(json, r'z'),
|
||||||
|
m: mapValueOfType<double>(json, r'm'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryCentroid> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryCentroid>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryCentroid.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryCentroid> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GeometryCentroid>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeometryCentroid.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryCentroid-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryCentroid>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryCentroid>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryCentroid.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
//
|
//
|
||||||
// @dart=2.12
|
// @dart=2.18
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
// ignore_for_file: unused_element, unused_import
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
@ -10,41 +10,52 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class QuizzDTOBadLevel {
|
class GeometryDTO {
|
||||||
/// Returns a new [QuizzDTOBadLevel] instance.
|
/// Returns a new [GeometryDTO] instance.
|
||||||
QuizzDTOBadLevel({
|
GeometryDTO({
|
||||||
this.label = const [],
|
this.type,
|
||||||
|
this.coordinates,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<TranslationAndResourceDTO>? label;
|
String? type;
|
||||||
|
|
||||||
|
Object? coordinates;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is QuizzDTOBadLevel && other.label == label;
|
other is GeometryDTO &&
|
||||||
|
other.type == type &&
|
||||||
|
other.coordinates == coordinates;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(label == null ? 0 : label!.hashCode);
|
(type == null ? 0 : type!.hashCode) +
|
||||||
|
(coordinates == null ? 0 : coordinates!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'QuizzDTOBadLevel[label=$label]';
|
String toString() => 'GeometryDTO[type=$type, coordinates=$coordinates]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
if (this.label != null) {
|
if (this.type != null) {
|
||||||
json[r'label'] = this.label;
|
json[r'type'] = this.type;
|
||||||
} else {
|
} else {
|
||||||
json[r'label'] = null;
|
json[r'type'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinates != null) {
|
||||||
|
json[r'coordinates'] = this.coordinates;
|
||||||
|
} else {
|
||||||
|
json[r'coordinates'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [QuizzDTOBadLevel] instance and imports its values from
|
/// Returns a new [GeometryDTO] instance and imports its values from
|
||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static QuizzDTOBadLevel? fromJson(dynamic value) {
|
static GeometryDTO? fromJson(dynamic value) {
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
@ -54,28 +65,29 @@ class QuizzDTOBadLevel {
|
|||||||
assert(() {
|
assert(() {
|
||||||
requiredKeys.forEach((key) {
|
requiredKeys.forEach((key) {
|
||||||
assert(json.containsKey(key),
|
assert(json.containsKey(key),
|
||||||
'Required key "QuizzDTOBadLevel[$key]" is missing from JSON.');
|
'Required key "GeometryDTO[$key]" is missing from JSON.');
|
||||||
assert(json[key] != null,
|
assert(json[key] != null,
|
||||||
'Required key "QuizzDTOBadLevel[$key]" has a null value in JSON.');
|
'Required key "GeometryDTO[$key]" has a null value in JSON.');
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
return QuizzDTOBadLevel(
|
return GeometryDTO(
|
||||||
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
type: mapValueOfType<String>(json, r'type'),
|
||||||
|
coordinates: mapValueOfType<Object>(json, r'coordinates'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<QuizzDTOBadLevel> listFromJson(
|
static List<GeometryDTO> listFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final result = <QuizzDTOBadLevel>[];
|
final result = <GeometryDTO>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
final value = QuizzDTOBadLevel.fromJson(row);
|
final value = GeometryDTO.fromJson(row);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
result.add(value);
|
result.add(value);
|
||||||
}
|
}
|
||||||
@ -84,12 +96,12 @@ class QuizzDTOBadLevel {
|
|||||||
return result.toList(growable: growable);
|
return result.toList(growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, QuizzDTOBadLevel> mapFromJson(dynamic json) {
|
static Map<String, GeometryDTO> mapFromJson(dynamic json) {
|
||||||
final map = <String, QuizzDTOBadLevel>{};
|
final map = <String, GeometryDTO>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = QuizzDTOBadLevel.fromJson(entry.value);
|
final value = GeometryDTO.fromJson(entry.value);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
map[entry.key] = value;
|
map[entry.key] = value;
|
||||||
}
|
}
|
||||||
@ -98,17 +110,17 @@ class QuizzDTOBadLevel {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maps a json object with a list of QuizzDTOBadLevel-objects as value to a dart map
|
// maps a json object with a list of GeometryDTO-objects as value to a dart map
|
||||||
static Map<String, List<QuizzDTOBadLevel>> mapListFromJson(
|
static Map<String, List<GeometryDTO>> mapListFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final map = <String, List<QuizzDTOBadLevel>>{};
|
final map = <String, List<GeometryDTO>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
json = json.cast<String, dynamic>();
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
map[entry.key] = QuizzDTOBadLevel.listFromJson(
|
map[entry.key] = GeometryDTO.listFromJson(
|
||||||
entry.value,
|
entry.value,
|
||||||
growable: growable,
|
growable: growable,
|
||||||
);
|
);
|
||||||
311
manager_api_new/lib/model/geometry_envelope_internal.dart
Normal file
311
manager_api_new/lib/model/geometry_envelope_internal.dart
Normal file
@ -0,0 +1,311 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryEnvelopeInternal {
|
||||||
|
/// Returns a new [GeometryEnvelopeInternal] instance.
|
||||||
|
GeometryEnvelopeInternal({
|
||||||
|
this.isNull,
|
||||||
|
this.width,
|
||||||
|
this.height,
|
||||||
|
this.diameter,
|
||||||
|
this.minX,
|
||||||
|
this.maxX,
|
||||||
|
this.minY,
|
||||||
|
this.maxY,
|
||||||
|
this.area,
|
||||||
|
this.minExtent,
|
||||||
|
this.maxExtent,
|
||||||
|
this.centre,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isNull;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? width;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? height;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? diameter;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? minX;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? maxX;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? minY;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? maxY;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? minExtent;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? maxExtent;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? centre;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryEnvelopeInternal &&
|
||||||
|
other.isNull == isNull &&
|
||||||
|
other.width == width &&
|
||||||
|
other.height == height &&
|
||||||
|
other.diameter == diameter &&
|
||||||
|
other.minX == minX &&
|
||||||
|
other.maxX == maxX &&
|
||||||
|
other.minY == minY &&
|
||||||
|
other.maxY == maxY &&
|
||||||
|
other.area == area &&
|
||||||
|
other.minExtent == minExtent &&
|
||||||
|
other.maxExtent == maxExtent &&
|
||||||
|
other.centre == centre;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(isNull == null ? 0 : isNull!.hashCode) +
|
||||||
|
(width == null ? 0 : width!.hashCode) +
|
||||||
|
(height == null ? 0 : height!.hashCode) +
|
||||||
|
(diameter == null ? 0 : diameter!.hashCode) +
|
||||||
|
(minX == null ? 0 : minX!.hashCode) +
|
||||||
|
(maxX == null ? 0 : maxX!.hashCode) +
|
||||||
|
(minY == null ? 0 : minY!.hashCode) +
|
||||||
|
(maxY == null ? 0 : maxY!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(minExtent == null ? 0 : minExtent!.hashCode) +
|
||||||
|
(maxExtent == null ? 0 : maxExtent!.hashCode) +
|
||||||
|
(centre == null ? 0 : centre!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryEnvelopeInternal[isNull=$isNull, width=$width, height=$height, diameter=$diameter, minX=$minX, maxX=$maxX, minY=$minY, maxY=$maxY, area=$area, minExtent=$minExtent, maxExtent=$maxExtent, centre=$centre]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.isNull != null) {
|
||||||
|
json[r'isNull'] = this.isNull;
|
||||||
|
} else {
|
||||||
|
json[r'isNull'] = null;
|
||||||
|
}
|
||||||
|
if (this.width != null) {
|
||||||
|
json[r'width'] = this.width;
|
||||||
|
} else {
|
||||||
|
json[r'width'] = null;
|
||||||
|
}
|
||||||
|
if (this.height != null) {
|
||||||
|
json[r'height'] = this.height;
|
||||||
|
} else {
|
||||||
|
json[r'height'] = null;
|
||||||
|
}
|
||||||
|
if (this.diameter != null) {
|
||||||
|
json[r'diameter'] = this.diameter;
|
||||||
|
} else {
|
||||||
|
json[r'diameter'] = null;
|
||||||
|
}
|
||||||
|
if (this.minX != null) {
|
||||||
|
json[r'minX'] = this.minX;
|
||||||
|
} else {
|
||||||
|
json[r'minX'] = null;
|
||||||
|
}
|
||||||
|
if (this.maxX != null) {
|
||||||
|
json[r'maxX'] = this.maxX;
|
||||||
|
} else {
|
||||||
|
json[r'maxX'] = null;
|
||||||
|
}
|
||||||
|
if (this.minY != null) {
|
||||||
|
json[r'minY'] = this.minY;
|
||||||
|
} else {
|
||||||
|
json[r'minY'] = null;
|
||||||
|
}
|
||||||
|
if (this.maxY != null) {
|
||||||
|
json[r'maxY'] = this.maxY;
|
||||||
|
} else {
|
||||||
|
json[r'maxY'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.minExtent != null) {
|
||||||
|
json[r'minExtent'] = this.minExtent;
|
||||||
|
} else {
|
||||||
|
json[r'minExtent'] = null;
|
||||||
|
}
|
||||||
|
if (this.maxExtent != null) {
|
||||||
|
json[r'maxExtent'] = this.maxExtent;
|
||||||
|
} else {
|
||||||
|
json[r'maxExtent'] = null;
|
||||||
|
}
|
||||||
|
if (this.centre != null) {
|
||||||
|
json[r'centre'] = this.centre;
|
||||||
|
} else {
|
||||||
|
json[r'centre'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryEnvelopeInternal] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryEnvelopeInternal? 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 "GeometryEnvelopeInternal[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryEnvelopeInternal[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryEnvelopeInternal(
|
||||||
|
isNull: mapValueOfType<bool>(json, r'isNull'),
|
||||||
|
width: mapValueOfType<double>(json, r'width'),
|
||||||
|
height: mapValueOfType<double>(json, r'height'),
|
||||||
|
diameter: mapValueOfType<double>(json, r'diameter'),
|
||||||
|
minX: mapValueOfType<double>(json, r'minX'),
|
||||||
|
maxX: mapValueOfType<double>(json, r'maxX'),
|
||||||
|
minY: mapValueOfType<double>(json, r'minY'),
|
||||||
|
maxY: mapValueOfType<double>(json, r'maxY'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
minExtent: mapValueOfType<double>(json, r'minExtent'),
|
||||||
|
maxExtent: mapValueOfType<double>(json, r'maxExtent'),
|
||||||
|
centre: PointAllOfCoordinate.fromJson(json[r'centre']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryEnvelopeInternal> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryEnvelopeInternal>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryEnvelopeInternal.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryEnvelopeInternal> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GeometryEnvelopeInternal>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeometryEnvelopeInternal.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryEnvelopeInternal-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryEnvelopeInternal>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryEnvelopeInternal>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryEnvelopeInternal.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
169
manager_api_new/lib/model/geometry_factory.dart
Normal file
169
manager_api_new/lib/model/geometry_factory.dart
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryFactory {
|
||||||
|
/// Returns a new [GeometryFactory] instance.
|
||||||
|
GeometryFactory({
|
||||||
|
this.precisionModel,
|
||||||
|
this.coordinateSequenceFactory,
|
||||||
|
this.srid,
|
||||||
|
this.geometryServices,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
GeometryFactoryCoordinateSequenceFactory? coordinateSequenceFactory;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryFactoryGeometryServices? geometryServices;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryFactory &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.coordinateSequenceFactory == coordinateSequenceFactory &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.geometryServices == geometryServices;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(coordinateSequenceFactory == null
|
||||||
|
? 0
|
||||||
|
: coordinateSequenceFactory!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(geometryServices == null ? 0 : geometryServices!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryFactory[precisionModel=$precisionModel, coordinateSequenceFactory=$coordinateSequenceFactory, srid=$srid, geometryServices=$geometryServices]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateSequenceFactory != null) {
|
||||||
|
json[r'coordinateSequenceFactory'] = this.coordinateSequenceFactory;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateSequenceFactory'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometryServices != null) {
|
||||||
|
json[r'geometryServices'] = this.geometryServices;
|
||||||
|
} else {
|
||||||
|
json[r'geometryServices'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryFactory] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryFactory? 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 "GeometryFactory[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryFactory[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryFactory(
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
coordinateSequenceFactory:
|
||||||
|
GeometryFactoryCoordinateSequenceFactory.fromJson(
|
||||||
|
json[r'coordinateSequenceFactory']),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
geometryServices:
|
||||||
|
GeometryFactoryGeometryServices.fromJson(json[r'geometryServices']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryFactory> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryFactory>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryFactory.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryFactory> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GeometryFactory>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeometryFactory.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryFactory-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryFactory>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryFactory>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryFactory.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -0,0 +1,133 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryFactoryCoordinateSequenceFactory {
|
||||||
|
/// Returns a new [GeometryFactoryCoordinateSequenceFactory] instance.
|
||||||
|
GeometryFactoryCoordinateSequenceFactory({
|
||||||
|
this.ordinates,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Ordinates? ordinates;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryFactoryCoordinateSequenceFactory &&
|
||||||
|
other.ordinates == ordinates;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(ordinates == null ? 0 : ordinates!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryFactoryCoordinateSequenceFactory[ordinates=$ordinates]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.ordinates != null) {
|
||||||
|
json[r'ordinates'] = this.ordinates;
|
||||||
|
} else {
|
||||||
|
json[r'ordinates'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryFactoryCoordinateSequenceFactory] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryFactoryCoordinateSequenceFactory? 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 "GeometryFactoryCoordinateSequenceFactory[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryFactoryCoordinateSequenceFactory[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryFactoryCoordinateSequenceFactory(
|
||||||
|
ordinates: Ordinates.fromJson(json[r'ordinates']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryFactoryCoordinateSequenceFactory> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryFactoryCoordinateSequenceFactory>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryFactoryCoordinateSequenceFactory.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryFactoryCoordinateSequenceFactory> mapFromJson(
|
||||||
|
dynamic json) {
|
||||||
|
final map = <String, GeometryFactoryCoordinateSequenceFactory>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value =
|
||||||
|
GeometryFactoryCoordinateSequenceFactory.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryFactoryCoordinateSequenceFactory-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryFactoryCoordinateSequenceFactory>>
|
||||||
|
mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryFactoryCoordinateSequenceFactory>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryFactoryCoordinateSequenceFactory.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -0,0 +1,187 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryFactoryGeometryServices {
|
||||||
|
/// Returns a new [GeometryFactoryGeometryServices] instance.
|
||||||
|
GeometryFactoryGeometryServices({
|
||||||
|
this.geometryOverlay,
|
||||||
|
this.coordinateEqualityComparer,
|
||||||
|
this.defaultSRID,
|
||||||
|
this.defaultCoordinateSequenceFactory,
|
||||||
|
this.defaultPrecisionModel,
|
||||||
|
});
|
||||||
|
|
||||||
|
NtsGeometryServicesGeometryOverlay? geometryOverlay;
|
||||||
|
|
||||||
|
NtsGeometryServicesCoordinateEqualityComparer? coordinateEqualityComparer;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? defaultSRID;
|
||||||
|
|
||||||
|
GeometryFactoryCoordinateSequenceFactory? defaultCoordinateSequenceFactory;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? defaultPrecisionModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryFactoryGeometryServices &&
|
||||||
|
other.geometryOverlay == geometryOverlay &&
|
||||||
|
other.coordinateEqualityComparer == coordinateEqualityComparer &&
|
||||||
|
other.defaultSRID == defaultSRID &&
|
||||||
|
other.defaultCoordinateSequenceFactory ==
|
||||||
|
defaultCoordinateSequenceFactory &&
|
||||||
|
other.defaultPrecisionModel == defaultPrecisionModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(geometryOverlay == null ? 0 : geometryOverlay!.hashCode) +
|
||||||
|
(coordinateEqualityComparer == null
|
||||||
|
? 0
|
||||||
|
: coordinateEqualityComparer!.hashCode) +
|
||||||
|
(defaultSRID == null ? 0 : defaultSRID!.hashCode) +
|
||||||
|
(defaultCoordinateSequenceFactory == null
|
||||||
|
? 0
|
||||||
|
: defaultCoordinateSequenceFactory!.hashCode) +
|
||||||
|
(defaultPrecisionModel == null ? 0 : defaultPrecisionModel!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryFactoryGeometryServices[geometryOverlay=$geometryOverlay, coordinateEqualityComparer=$coordinateEqualityComparer, defaultSRID=$defaultSRID, defaultCoordinateSequenceFactory=$defaultCoordinateSequenceFactory, defaultPrecisionModel=$defaultPrecisionModel]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.geometryOverlay != null) {
|
||||||
|
json[r'geometryOverlay'] = this.geometryOverlay;
|
||||||
|
} else {
|
||||||
|
json[r'geometryOverlay'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateEqualityComparer != null) {
|
||||||
|
json[r'coordinateEqualityComparer'] = this.coordinateEqualityComparer;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateEqualityComparer'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultSRID != null) {
|
||||||
|
json[r'defaultSRID'] = this.defaultSRID;
|
||||||
|
} else {
|
||||||
|
json[r'defaultSRID'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultCoordinateSequenceFactory != null) {
|
||||||
|
json[r'defaultCoordinateSequenceFactory'] =
|
||||||
|
this.defaultCoordinateSequenceFactory;
|
||||||
|
} else {
|
||||||
|
json[r'defaultCoordinateSequenceFactory'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultPrecisionModel != null) {
|
||||||
|
json[r'defaultPrecisionModel'] = this.defaultPrecisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'defaultPrecisionModel'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryFactoryGeometryServices] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryFactoryGeometryServices? 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 "GeometryFactoryGeometryServices[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryFactoryGeometryServices[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryFactoryGeometryServices(
|
||||||
|
geometryOverlay: NtsGeometryServicesGeometryOverlay.fromJson(
|
||||||
|
json[r'geometryOverlay']),
|
||||||
|
coordinateEqualityComparer:
|
||||||
|
NtsGeometryServicesCoordinateEqualityComparer.fromJson(
|
||||||
|
json[r'coordinateEqualityComparer']),
|
||||||
|
defaultSRID: mapValueOfType<int>(json, r'defaultSRID'),
|
||||||
|
defaultCoordinateSequenceFactory:
|
||||||
|
GeometryFactoryCoordinateSequenceFactory.fromJson(
|
||||||
|
json[r'defaultCoordinateSequenceFactory']),
|
||||||
|
defaultPrecisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'defaultPrecisionModel']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryFactoryGeometryServices> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryFactoryGeometryServices>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryFactoryGeometryServices.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryFactoryGeometryServices> mapFromJson(
|
||||||
|
dynamic json) {
|
||||||
|
final map = <String, GeometryFactoryGeometryServices>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeometryFactoryGeometryServices.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryFactoryGeometryServices-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryFactoryGeometryServices>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryFactoryGeometryServices>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryFactoryGeometryServices.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
202
manager_api_new/lib/model/geometry_precision_model.dart
Normal file
202
manager_api_new/lib/model/geometry_precision_model.dart
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
//
|
||||||
|
// 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 GeometryPrecisionModel {
|
||||||
|
/// Returns a new [GeometryPrecisionModel] instance.
|
||||||
|
GeometryPrecisionModel({
|
||||||
|
this.isFloating,
|
||||||
|
this.maximumSignificantDigits,
|
||||||
|
this.scale,
|
||||||
|
this.gridSize,
|
||||||
|
this.precisionModelType,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isFloating;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? maximumSignificantDigits;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? scale;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? gridSize;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
PrecisionModels? precisionModelType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GeometryPrecisionModel &&
|
||||||
|
other.isFloating == isFloating &&
|
||||||
|
other.maximumSignificantDigits == maximumSignificantDigits &&
|
||||||
|
other.scale == scale &&
|
||||||
|
other.gridSize == gridSize &&
|
||||||
|
other.precisionModelType == precisionModelType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(isFloating == null ? 0 : isFloating!.hashCode) +
|
||||||
|
(maximumSignificantDigits == null
|
||||||
|
? 0
|
||||||
|
: maximumSignificantDigits!.hashCode) +
|
||||||
|
(scale == null ? 0 : scale!.hashCode) +
|
||||||
|
(gridSize == null ? 0 : gridSize!.hashCode) +
|
||||||
|
(precisionModelType == null ? 0 : precisionModelType!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GeometryPrecisionModel[isFloating=$isFloating, maximumSignificantDigits=$maximumSignificantDigits, scale=$scale, gridSize=$gridSize, precisionModelType=$precisionModelType]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.isFloating != null) {
|
||||||
|
json[r'isFloating'] = this.isFloating;
|
||||||
|
} else {
|
||||||
|
json[r'isFloating'] = null;
|
||||||
|
}
|
||||||
|
if (this.maximumSignificantDigits != null) {
|
||||||
|
json[r'maximumSignificantDigits'] = this.maximumSignificantDigits;
|
||||||
|
} else {
|
||||||
|
json[r'maximumSignificantDigits'] = null;
|
||||||
|
}
|
||||||
|
if (this.scale != null) {
|
||||||
|
json[r'scale'] = this.scale;
|
||||||
|
} else {
|
||||||
|
json[r'scale'] = null;
|
||||||
|
}
|
||||||
|
if (this.gridSize != null) {
|
||||||
|
json[r'gridSize'] = this.gridSize;
|
||||||
|
} else {
|
||||||
|
json[r'gridSize'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModelType != null) {
|
||||||
|
json[r'precisionModelType'] = this.precisionModelType;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModelType'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GeometryPrecisionModel] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GeometryPrecisionModel? 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 "GeometryPrecisionModel[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GeometryPrecisionModel[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GeometryPrecisionModel(
|
||||||
|
isFloating: mapValueOfType<bool>(json, r'isFloating'),
|
||||||
|
maximumSignificantDigits:
|
||||||
|
mapValueOfType<int>(json, r'maximumSignificantDigits'),
|
||||||
|
scale: mapValueOfType<double>(json, r'scale'),
|
||||||
|
gridSize: mapValueOfType<double>(json, r'gridSize'),
|
||||||
|
precisionModelType:
|
||||||
|
PrecisionModels.fromJson(json[r'precisionModelType']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GeometryPrecisionModel> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryPrecisionModel>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryPrecisionModel.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GeometryPrecisionModel> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GeometryPrecisionModel>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GeometryPrecisionModel.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GeometryPrecisionModel-objects as value to a dart map
|
||||||
|
static Map<String, List<GeometryPrecisionModel>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GeometryPrecisionModel>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GeometryPrecisionModel.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
99
manager_api_new/lib/model/geometry_type.dart
Normal file
99
manager_api_new/lib/model/geometry_type.dart
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
//
|
||||||
|
// 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 = Point 1 = Polyline 2 = Circle 3 = Polygon
|
||||||
|
class GeometryType {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const GeometryType._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number0 = GeometryType._(0);
|
||||||
|
static const number1 = GeometryType._(1);
|
||||||
|
static const number2 = GeometryType._(2);
|
||||||
|
static const number3 = GeometryType._(3);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][GeometryType].
|
||||||
|
static const values = <GeometryType>[
|
||||||
|
number0,
|
||||||
|
number1,
|
||||||
|
number2,
|
||||||
|
number3,
|
||||||
|
];
|
||||||
|
|
||||||
|
static GeometryType? fromJson(dynamic value) =>
|
||||||
|
GeometryTypeTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<GeometryType> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GeometryType>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GeometryType.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [GeometryType] to int,
|
||||||
|
/// and [decode] dynamic data back to [GeometryType].
|
||||||
|
class GeometryTypeTypeTransformer {
|
||||||
|
factory GeometryTypeTypeTransformer() =>
|
||||||
|
_instance ??= const GeometryTypeTypeTransformer._();
|
||||||
|
|
||||||
|
const GeometryTypeTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(GeometryType data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a GeometryType.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
GeometryType? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 0:
|
||||||
|
return GeometryType.number0;
|
||||||
|
case 1:
|
||||||
|
return GeometryType.number1;
|
||||||
|
case 2:
|
||||||
|
return GeometryType.number2;
|
||||||
|
case 3:
|
||||||
|
return GeometryType.number3;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [GeometryTypeTypeTransformer] instance.
|
||||||
|
static GeometryTypeTypeTransformer? _instance;
|
||||||
|
}
|
||||||
282
manager_api_new/lib/model/guided_path.dart
Normal file
282
manager_api_new/lib/model/guided_path.dart
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedPath {
|
||||||
|
/// Returns a new [GuidedPath] instance.
|
||||||
|
GuidedPath({
|
||||||
|
required this.instanceId,
|
||||||
|
this.title = const [],
|
||||||
|
this.id,
|
||||||
|
this.description = const [],
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionMap,
|
||||||
|
this.sectionEventId,
|
||||||
|
this.sectionEvent,
|
||||||
|
this.isLinear,
|
||||||
|
this.requireSuccessToAdvance,
|
||||||
|
this.hideNextStepsUntilComplete,
|
||||||
|
this.order,
|
||||||
|
this.steps = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String instanceId;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
GuidedPathSectionMap? sectionMap;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
ApplicationInstanceSectionEvent? sectionEvent;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isLinear;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? requireSuccessToAdvance;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? hideNextStepsUntilComplete;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<GuidedStep>? steps;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedPath &&
|
||||||
|
other.instanceId == instanceId &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionMap == sectionMap &&
|
||||||
|
other.sectionEventId == sectionEventId &&
|
||||||
|
other.sectionEvent == sectionEvent &&
|
||||||
|
other.isLinear == isLinear &&
|
||||||
|
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
||||||
|
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.steps, steps);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(instanceId.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionMap == null ? 0 : sectionMap!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||||
|
(sectionEvent == null ? 0 : sectionEvent!.hashCode) +
|
||||||
|
(isLinear == null ? 0 : isLinear!.hashCode) +
|
||||||
|
(requireSuccessToAdvance == null
|
||||||
|
? 0
|
||||||
|
: requireSuccessToAdvance!.hashCode) +
|
||||||
|
(hideNextStepsUntilComplete == null
|
||||||
|
? 0
|
||||||
|
: hideNextStepsUntilComplete!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(steps == null ? 0 : steps!.hashCode);
|
||||||
|
|
||||||
|
@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]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'instanceId'] = this.instanceId;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMap != null) {
|
||||||
|
json[r'sectionMap'] = this.sectionMap;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMap'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEvent != null) {
|
||||||
|
json[r'sectionEvent'] = this.sectionEvent;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEvent'] = null;
|
||||||
|
}
|
||||||
|
if (this.isLinear != null) {
|
||||||
|
json[r'isLinear'] = this.isLinear;
|
||||||
|
} else {
|
||||||
|
json[r'isLinear'] = null;
|
||||||
|
}
|
||||||
|
if (this.requireSuccessToAdvance != null) {
|
||||||
|
json[r'requireSuccessToAdvance'] = this.requireSuccessToAdvance;
|
||||||
|
} else {
|
||||||
|
json[r'requireSuccessToAdvance'] = null;
|
||||||
|
}
|
||||||
|
if (this.hideNextStepsUntilComplete != null) {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = this.hideNextStepsUntilComplete;
|
||||||
|
} else {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.steps != null) {
|
||||||
|
json[r'steps'] = this.steps;
|
||||||
|
} else {
|
||||||
|
json[r'steps'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedPath] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedPath? 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 "GuidedPath[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedPath[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedPath(
|
||||||
|
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
sectionEvent:
|
||||||
|
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
||||||
|
isLinear: mapValueOfType<bool>(json, r'isLinear'),
|
||||||
|
requireSuccessToAdvance:
|
||||||
|
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
||||||
|
hideNextStepsUntilComplete:
|
||||||
|
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
steps: GuidedStep.listFromJson(json[r'steps']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedPath> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedPath>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedPath.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedPath> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedPath>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedPath.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedPath-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedPath>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedPath>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedPath.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'instanceId',
|
||||||
|
'title',
|
||||||
|
};
|
||||||
|
}
|
||||||
264
manager_api_new/lib/model/guided_path_dto.dart
Normal file
264
manager_api_new/lib/model/guided_path_dto.dart
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedPathDTO {
|
||||||
|
/// Returns a new [GuidedPathDTO] instance.
|
||||||
|
GuidedPathDTO({
|
||||||
|
this.id,
|
||||||
|
this.instanceId,
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionEventId,
|
||||||
|
this.isLinear,
|
||||||
|
this.requireSuccessToAdvance,
|
||||||
|
this.hideNextStepsUntilComplete,
|
||||||
|
this.order,
|
||||||
|
this.steps = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
String? instanceId;
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isLinear;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? requireSuccessToAdvance;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? hideNextStepsUntilComplete;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<GuidedStepDTO>? steps;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedPathDTO &&
|
||||||
|
other.id == id &&
|
||||||
|
other.instanceId == instanceId &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionEventId == sectionEventId &&
|
||||||
|
other.isLinear == isLinear &&
|
||||||
|
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
||||||
|
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.steps, steps);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||||
|
(isLinear == null ? 0 : isLinear!.hashCode) +
|
||||||
|
(requireSuccessToAdvance == null
|
||||||
|
? 0
|
||||||
|
: requireSuccessToAdvance!.hashCode) +
|
||||||
|
(hideNextStepsUntilComplete == null
|
||||||
|
? 0
|
||||||
|
: hideNextStepsUntilComplete!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(steps == null ? 0 : steps!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GuidedPathDTO[id=$id, instanceId=$instanceId, title=$title, description=$description, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.instanceId != null) {
|
||||||
|
json[r'instanceId'] = this.instanceId;
|
||||||
|
} else {
|
||||||
|
json[r'instanceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.title != null) {
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
} else {
|
||||||
|
json[r'title'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
if (this.isLinear != null) {
|
||||||
|
json[r'isLinear'] = this.isLinear;
|
||||||
|
} else {
|
||||||
|
json[r'isLinear'] = null;
|
||||||
|
}
|
||||||
|
if (this.requireSuccessToAdvance != null) {
|
||||||
|
json[r'requireSuccessToAdvance'] = this.requireSuccessToAdvance;
|
||||||
|
} else {
|
||||||
|
json[r'requireSuccessToAdvance'] = null;
|
||||||
|
}
|
||||||
|
if (this.hideNextStepsUntilComplete != null) {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = this.hideNextStepsUntilComplete;
|
||||||
|
} else {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.steps != null) {
|
||||||
|
json[r'steps'] = this.steps;
|
||||||
|
} else {
|
||||||
|
json[r'steps'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedPathDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedPathDTO? 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 "GuidedPathDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedPathDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedPathDTO(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
isLinear: mapValueOfType<bool>(json, r'isLinear'),
|
||||||
|
requireSuccessToAdvance:
|
||||||
|
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
||||||
|
hideNextStepsUntilComplete:
|
||||||
|
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
steps: GuidedStepDTO.listFromJson(json[r'steps']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedPathDTO> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedPathDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedPathDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedPathDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedPathDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedPathDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedPathDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedPathDTO>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedPathDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedPathDTO.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class GeoPointSectionMap {
|
class GuidedPathSectionMap {
|
||||||
/// Returns a new [GeoPointSectionMap] instance.
|
/// Returns a new [GuidedPathSectionMap] instance.
|
||||||
GeoPointSectionMap({
|
GuidedPathSectionMap({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.label,
|
required this.label,
|
||||||
this.title = const [],
|
this.title = const [],
|
||||||
@ -32,6 +32,7 @@ class GeoPointSectionMap {
|
|||||||
this.latitude,
|
this.latitude,
|
||||||
this.longitude,
|
this.longitude,
|
||||||
this.meterZoneGPS,
|
this.meterZoneGPS,
|
||||||
|
this.isActive,
|
||||||
this.mapZoom,
|
this.mapZoom,
|
||||||
this.mapMapType,
|
this.mapMapType,
|
||||||
this.mapTypeMapbox,
|
this.mapTypeMapbox,
|
||||||
@ -99,6 +100,14 @@ class GeoPointSectionMap {
|
|||||||
|
|
||||||
int? meterZoneGPS;
|
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;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
@ -126,7 +135,7 @@ class GeoPointSectionMap {
|
|||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is GeoPointSectionMap &&
|
other is GuidedPathSectionMap &&
|
||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
_deepEquality.equals(other.title, title) &&
|
_deepEquality.equals(other.title, title) &&
|
||||||
@ -146,6 +155,7 @@ class GeoPointSectionMap {
|
|||||||
other.latitude == latitude &&
|
other.latitude == latitude &&
|
||||||
other.longitude == longitude &&
|
other.longitude == longitude &&
|
||||||
other.meterZoneGPS == meterZoneGPS &&
|
other.meterZoneGPS == meterZoneGPS &&
|
||||||
|
other.isActive == isActive &&
|
||||||
other.mapZoom == mapZoom &&
|
other.mapZoom == mapZoom &&
|
||||||
other.mapMapType == mapMapType &&
|
other.mapMapType == mapMapType &&
|
||||||
other.mapTypeMapbox == mapTypeMapbox &&
|
other.mapTypeMapbox == mapTypeMapbox &&
|
||||||
@ -178,6 +188,7 @@ class GeoPointSectionMap {
|
|||||||
(latitude == null ? 0 : latitude!.hashCode) +
|
(latitude == null ? 0 : latitude!.hashCode) +
|
||||||
(longitude == null ? 0 : longitude!.hashCode) +
|
(longitude == null ? 0 : longitude!.hashCode) +
|
||||||
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
||||||
|
(isActive == null ? 0 : isActive!.hashCode) +
|
||||||
(mapZoom == null ? 0 : mapZoom!.hashCode) +
|
(mapZoom == null ? 0 : mapZoom!.hashCode) +
|
||||||
(mapMapType == null ? 0 : mapMapType!.hashCode) +
|
(mapMapType == null ? 0 : mapMapType!.hashCode) +
|
||||||
(mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) +
|
(mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) +
|
||||||
@ -190,7 +201,7 @@ class GeoPointSectionMap {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'GeoPointSectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]';
|
'GuidedPathSectionMap[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, mapCategories=$mapCategories, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, mapZoom=$mapZoom, mapMapType=$mapMapType, mapTypeMapbox=$mapTypeMapbox, mapMapProvider=$mapMapProvider, mapPoints=$mapPoints, mapResourceId=$mapResourceId, mapResource=$mapResource, mapCenterLatitude=$mapCenterLatitude, mapCenterLongitude=$mapCenterLongitude]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -257,6 +268,11 @@ class GeoPointSectionMap {
|
|||||||
} else {
|
} else {
|
||||||
json[r'meterZoneGPS'] = null;
|
json[r'meterZoneGPS'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.isActive != null) {
|
||||||
|
json[r'isActive'] = this.isActive;
|
||||||
|
} else {
|
||||||
|
json[r'isActive'] = null;
|
||||||
|
}
|
||||||
if (this.mapZoom != null) {
|
if (this.mapZoom != null) {
|
||||||
json[r'mapZoom'] = this.mapZoom;
|
json[r'mapZoom'] = this.mapZoom;
|
||||||
} else {
|
} else {
|
||||||
@ -305,10 +321,10 @@ class GeoPointSectionMap {
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [GeoPointSectionMap] instance and imports its values from
|
/// Returns a new [GuidedPathSectionMap] instance and imports its values from
|
||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static GeoPointSectionMap? fromJson(dynamic value) {
|
static GuidedPathSectionMap? fromJson(dynamic value) {
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
@ -318,14 +334,14 @@ class GeoPointSectionMap {
|
|||||||
assert(() {
|
assert(() {
|
||||||
requiredKeys.forEach((key) {
|
requiredKeys.forEach((key) {
|
||||||
assert(json.containsKey(key),
|
assert(json.containsKey(key),
|
||||||
'Required key "GeoPointSectionMap[$key]" is missing from JSON.');
|
'Required key "GuidedPathSectionMap[$key]" is missing from JSON.');
|
||||||
assert(json[key] != null,
|
assert(json[key] != null,
|
||||||
'Required key "GeoPointSectionMap[$key]" has a null value in JSON.');
|
'Required key "GuidedPathSectionMap[$key]" has a null value in JSON.');
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
return GeoPointSectionMap(
|
return GuidedPathSectionMap(
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
label: mapValueOfType<String>(json, r'label')!,
|
label: mapValueOfType<String>(json, r'label')!,
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
@ -345,6 +361,7 @@ class GeoPointSectionMap {
|
|||||||
latitude: mapValueOfType<String>(json, r'latitude'),
|
latitude: mapValueOfType<String>(json, r'latitude'),
|
||||||
longitude: mapValueOfType<String>(json, r'longitude'),
|
longitude: mapValueOfType<String>(json, r'longitude'),
|
||||||
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
||||||
|
isActive: mapValueOfType<bool>(json, r'isActive'),
|
||||||
mapZoom: mapValueOfType<int>(json, r'mapZoom'),
|
mapZoom: mapValueOfType<int>(json, r'mapZoom'),
|
||||||
mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']),
|
mapMapType: SectionMapAllOfMapMapType.fromJson(json[r'mapMapType']),
|
||||||
mapTypeMapbox:
|
mapTypeMapbox:
|
||||||
@ -361,14 +378,14 @@ class GeoPointSectionMap {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<GeoPointSectionMap> listFromJson(
|
static List<GuidedPathSectionMap> listFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final result = <GeoPointSectionMap>[];
|
final result = <GuidedPathSectionMap>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
final value = GeoPointSectionMap.fromJson(row);
|
final value = GuidedPathSectionMap.fromJson(row);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
result.add(value);
|
result.add(value);
|
||||||
}
|
}
|
||||||
@ -377,12 +394,12 @@ class GeoPointSectionMap {
|
|||||||
return result.toList(growable: growable);
|
return result.toList(growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, GeoPointSectionMap> mapFromJson(dynamic json) {
|
static Map<String, GuidedPathSectionMap> mapFromJson(dynamic json) {
|
||||||
final map = <String, GeoPointSectionMap>{};
|
final map = <String, GuidedPathSectionMap>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = GeoPointSectionMap.fromJson(entry.value);
|
final value = GuidedPathSectionMap.fromJson(entry.value);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
map[entry.key] = value;
|
map[entry.key] = value;
|
||||||
}
|
}
|
||||||
@ -391,17 +408,17 @@ class GeoPointSectionMap {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maps a json object with a list of GeoPointSectionMap-objects as value to a dart map
|
// maps a json object with a list of GuidedPathSectionMap-objects as value to a dart map
|
||||||
static Map<String, List<GeoPointSectionMap>> mapListFromJson(
|
static Map<String, List<GuidedPathSectionMap>> mapListFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final map = <String, List<GeoPointSectionMap>>{};
|
final map = <String, List<GuidedPathSectionMap>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
json = json.cast<String, dynamic>();
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
map[entry.key] = GeoPointSectionMap.listFromJson(
|
map[entry.key] = GuidedPathSectionMap.listFromJson(
|
||||||
entry.value,
|
entry.value,
|
||||||
growable: growable,
|
growable: growable,
|
||||||
);
|
);
|
||||||
321
manager_api_new/lib/model/guided_step.dart
Normal file
321
manager_api_new/lib/model/guided_step.dart
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedStep {
|
||||||
|
/// Returns a new [GuidedStep] instance.
|
||||||
|
GuidedStep({
|
||||||
|
required this.guidedPathId,
|
||||||
|
this.title = const [],
|
||||||
|
this.id,
|
||||||
|
this.guidedPath,
|
||||||
|
this.order,
|
||||||
|
this.description = const [],
|
||||||
|
this.geometry,
|
||||||
|
this.zoneRadiusMeters,
|
||||||
|
this.imageUrl,
|
||||||
|
this.triggerGeoPointId,
|
||||||
|
this.triggerGeoPoint,
|
||||||
|
this.isHiddenInitially,
|
||||||
|
this.quizQuestions = const [],
|
||||||
|
this.isStepTimer,
|
||||||
|
this.isStepLocked,
|
||||||
|
this.timerSeconds,
|
||||||
|
this.timerExpiredMessage = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String guidedPathId;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
GuidedStepGuidedPath? guidedPath;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
PointAllOfBoundary? geometry;
|
||||||
|
|
||||||
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
|
String? imageUrl;
|
||||||
|
|
||||||
|
int? triggerGeoPointId;
|
||||||
|
|
||||||
|
GuidedStepTriggerGeoPoint? triggerGeoPoint;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isHiddenInitially;
|
||||||
|
|
||||||
|
List<QuizQuestion>? quizQuestions;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepTimer;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepLocked;
|
||||||
|
|
||||||
|
int? timerSeconds;
|
||||||
|
|
||||||
|
List<TranslationDTO>? timerExpiredMessage;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedStep &&
|
||||||
|
other.guidedPathId == guidedPathId &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
other.id == id &&
|
||||||
|
other.guidedPath == guidedPath &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
|
other.imageUrl == imageUrl &&
|
||||||
|
other.triggerGeoPointId == triggerGeoPointId &&
|
||||||
|
other.triggerGeoPoint == triggerGeoPoint &&
|
||||||
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
|
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
||||||
|
other.isStepTimer == isStepTimer &&
|
||||||
|
other.isStepLocked == isStepLocked &&
|
||||||
|
other.timerSeconds == timerSeconds &&
|
||||||
|
_deepEquality.equals(other.timerExpiredMessage, timerExpiredMessage);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(guidedPathId.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(guidedPath == null ? 0 : guidedPath!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
|
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
||||||
|
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
||||||
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
||||||
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
|
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
|
||||||
|
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
|
||||||
|
(timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'guidedPathId'] = this.guidedPathId;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.guidedPath != null) {
|
||||||
|
json[r'guidedPath'] = this.guidedPath;
|
||||||
|
} else {
|
||||||
|
json[r'guidedPath'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.zoneRadiusMeters != null) {
|
||||||
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
|
} else {
|
||||||
|
json[r'zoneRadiusMeters'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageUrl != null) {
|
||||||
|
json[r'imageUrl'] = this.imageUrl;
|
||||||
|
} else {
|
||||||
|
json[r'imageUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPointId != null) {
|
||||||
|
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPointId'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPoint != null) {
|
||||||
|
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.isHiddenInitially != null) {
|
||||||
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
|
} else {
|
||||||
|
json[r'isHiddenInitially'] = null;
|
||||||
|
}
|
||||||
|
if (this.quizQuestions != null) {
|
||||||
|
json[r'quizQuestions'] = this.quizQuestions;
|
||||||
|
} else {
|
||||||
|
json[r'quizQuestions'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepTimer != null) {
|
||||||
|
json[r'isStepTimer'] = this.isStepTimer;
|
||||||
|
} else {
|
||||||
|
json[r'isStepTimer'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepLocked != null) {
|
||||||
|
json[r'isStepLocked'] = this.isStepLocked;
|
||||||
|
} else {
|
||||||
|
json[r'isStepLocked'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerSeconds != null) {
|
||||||
|
json[r'timerSeconds'] = this.timerSeconds;
|
||||||
|
} else {
|
||||||
|
json[r'timerSeconds'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerExpiredMessage != null) {
|
||||||
|
json[r'timerExpiredMessage'] = this.timerExpiredMessage;
|
||||||
|
} else {
|
||||||
|
json[r'timerExpiredMessage'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedStep] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedStep? 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 "GuidedStep[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedStep[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedStep(
|
||||||
|
guidedPathId: mapValueOfType<String>(json, r'guidedPathId')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
guidedPath: GuidedStepGuidedPath.fromJson(json[r'guidedPath']),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
|
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
||||||
|
triggerGeoPoint:
|
||||||
|
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
||||||
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
|
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
|
||||||
|
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
|
||||||
|
timerExpiredMessage:
|
||||||
|
TranslationDTO.listFromJson(json[r'timerExpiredMessage']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedStep> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedStep>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedStep.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedStep> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedStep>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedStep.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedStep-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedStep>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedStep>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedStep.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'guidedPathId',
|
||||||
|
'title',
|
||||||
|
};
|
||||||
|
}
|
||||||
316
manager_api_new/lib/model/guided_step_dto.dart
Normal file
316
manager_api_new/lib/model/guided_step_dto.dart
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedStepDTO {
|
||||||
|
/// Returns a new [GuidedStepDTO] instance.
|
||||||
|
GuidedStepDTO({
|
||||||
|
this.id,
|
||||||
|
this.guidedPathId,
|
||||||
|
this.order,
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.geometry,
|
||||||
|
this.zoneRadiusMeters,
|
||||||
|
this.imageUrl,
|
||||||
|
this.triggerGeoPointId,
|
||||||
|
this.triggerGeoPoint,
|
||||||
|
this.isHiddenInitially,
|
||||||
|
this.isStepTimer,
|
||||||
|
this.isStepLocked,
|
||||||
|
this.timerSeconds,
|
||||||
|
this.timerExpiredMessage = const [],
|
||||||
|
this.quizQuestions = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
String? guidedPathId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
EventAddressDTOGeometry? geometry;
|
||||||
|
|
||||||
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
|
String? imageUrl;
|
||||||
|
|
||||||
|
int? triggerGeoPointId;
|
||||||
|
|
||||||
|
GuidedStepDTOTriggerGeoPoint? triggerGeoPoint;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isHiddenInitially;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepTimer;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepLocked;
|
||||||
|
|
||||||
|
int? timerSeconds;
|
||||||
|
|
||||||
|
List<TranslationDTO>? timerExpiredMessage;
|
||||||
|
|
||||||
|
List<QuizQuestion>? quizQuestions;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedStepDTO &&
|
||||||
|
other.id == id &&
|
||||||
|
other.guidedPathId == guidedPathId &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
|
other.imageUrl == imageUrl &&
|
||||||
|
other.triggerGeoPointId == triggerGeoPointId &&
|
||||||
|
other.triggerGeoPoint == triggerGeoPoint &&
|
||||||
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
|
other.isStepTimer == isStepTimer &&
|
||||||
|
other.isStepLocked == isStepLocked &&
|
||||||
|
other.timerSeconds == timerSeconds &&
|
||||||
|
_deepEquality.equals(
|
||||||
|
other.timerExpiredMessage, timerExpiredMessage) &&
|
||||||
|
_deepEquality.equals(other.quizQuestions, quizQuestions);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(guidedPathId == null ? 0 : guidedPathId!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
|
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
||||||
|
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
||||||
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
|
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
|
||||||
|
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
|
||||||
|
(timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode) +
|
||||||
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GuidedStepDTO[id=$id, guidedPathId=$guidedPathId, order=$order, title=$title, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage, quizQuestions=$quizQuestions]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.guidedPathId != null) {
|
||||||
|
json[r'guidedPathId'] = this.guidedPathId;
|
||||||
|
} else {
|
||||||
|
json[r'guidedPathId'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.title != null) {
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
} else {
|
||||||
|
json[r'title'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.zoneRadiusMeters != null) {
|
||||||
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
|
} else {
|
||||||
|
json[r'zoneRadiusMeters'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageUrl != null) {
|
||||||
|
json[r'imageUrl'] = this.imageUrl;
|
||||||
|
} else {
|
||||||
|
json[r'imageUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPointId != null) {
|
||||||
|
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPointId'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPoint != null) {
|
||||||
|
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.isHiddenInitially != null) {
|
||||||
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
|
} else {
|
||||||
|
json[r'isHiddenInitially'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepTimer != null) {
|
||||||
|
json[r'isStepTimer'] = this.isStepTimer;
|
||||||
|
} else {
|
||||||
|
json[r'isStepTimer'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepLocked != null) {
|
||||||
|
json[r'isStepLocked'] = this.isStepLocked;
|
||||||
|
} else {
|
||||||
|
json[r'isStepLocked'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerSeconds != null) {
|
||||||
|
json[r'timerSeconds'] = this.timerSeconds;
|
||||||
|
} else {
|
||||||
|
json[r'timerSeconds'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerExpiredMessage != null) {
|
||||||
|
json[r'timerExpiredMessage'] = this.timerExpiredMessage;
|
||||||
|
} else {
|
||||||
|
json[r'timerExpiredMessage'] = null;
|
||||||
|
}
|
||||||
|
if (this.quizQuestions != null) {
|
||||||
|
json[r'quizQuestions'] = this.quizQuestions;
|
||||||
|
} else {
|
||||||
|
json[r'quizQuestions'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedStepDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedStepDTO? 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 "GuidedStepDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedStepDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedStepDTO(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
guidedPathId: mapValueOfType<String>(json, r'guidedPathId'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
|
||||||
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
|
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
||||||
|
triggerGeoPoint:
|
||||||
|
GuidedStepDTOTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
||||||
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
|
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
|
||||||
|
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
|
||||||
|
timerExpiredMessage:
|
||||||
|
TranslationDTO.listFromJson(json[r'timerExpiredMessage']),
|
||||||
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedStepDTO> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedStepDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedStepDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedStepDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedStepDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedStepDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedStepDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedStepDTO>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedStepDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedStepDTO.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
289
manager_api_new/lib/model/guided_step_dto_trigger_geo_point.dart
Normal file
289
manager_api_new/lib/model/guided_step_dto_trigger_geo_point.dart
Normal file
@ -0,0 +1,289 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedStepDTOTriggerGeoPoint {
|
||||||
|
/// Returns a new [GuidedStepDTOTriggerGeoPoint] instance.
|
||||||
|
GuidedStepDTOTriggerGeoPoint({
|
||||||
|
this.id,
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.contents = const [],
|
||||||
|
this.categorieId,
|
||||||
|
this.imageResourceId,
|
||||||
|
this.imageUrl,
|
||||||
|
this.schedules = const [],
|
||||||
|
this.prices = const [],
|
||||||
|
this.phone = const [],
|
||||||
|
this.email = const [],
|
||||||
|
this.site = const [],
|
||||||
|
this.geometry,
|
||||||
|
this.polyColor,
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionEventId,
|
||||||
|
});
|
||||||
|
|
||||||
|
int? id;
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
List<ContentDTO>? contents;
|
||||||
|
|
||||||
|
int? categorieId;
|
||||||
|
|
||||||
|
String? imageResourceId;
|
||||||
|
|
||||||
|
String? imageUrl;
|
||||||
|
|
||||||
|
List<TranslationDTO>? schedules;
|
||||||
|
|
||||||
|
List<TranslationDTO>? prices;
|
||||||
|
|
||||||
|
List<TranslationDTO>? phone;
|
||||||
|
|
||||||
|
List<TranslationDTO>? email;
|
||||||
|
|
||||||
|
List<TranslationDTO>? site;
|
||||||
|
|
||||||
|
EventAddressDTOGeometry? geometry;
|
||||||
|
|
||||||
|
String? polyColor;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedStepDTOTriggerGeoPoint &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
_deepEquality.equals(other.contents, contents) &&
|
||||||
|
other.categorieId == categorieId &&
|
||||||
|
other.imageResourceId == imageResourceId &&
|
||||||
|
other.imageUrl == imageUrl &&
|
||||||
|
_deepEquality.equals(other.schedules, schedules) &&
|
||||||
|
_deepEquality.equals(other.prices, prices) &&
|
||||||
|
_deepEquality.equals(other.phone, phone) &&
|
||||||
|
_deepEquality.equals(other.email, email) &&
|
||||||
|
_deepEquality.equals(other.site, site) &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.polyColor == polyColor &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionEventId == sectionEventId;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(contents == null ? 0 : contents!.hashCode) +
|
||||||
|
(categorieId == null ? 0 : categorieId!.hashCode) +
|
||||||
|
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
||||||
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
|
(schedules == null ? 0 : schedules!.hashCode) +
|
||||||
|
(prices == null ? 0 : prices!.hashCode) +
|
||||||
|
(phone == null ? 0 : phone!.hashCode) +
|
||||||
|
(email == null ? 0 : email!.hashCode) +
|
||||||
|
(site == null ? 0 : site!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GuidedStepDTOTriggerGeoPoint[id=$id, title=$title, description=$description, contents=$contents, categorieId=$categorieId, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, geometry=$geometry, polyColor=$polyColor, sectionMapId=$sectionMapId, sectionEventId=$sectionEventId]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.title != null) {
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
} else {
|
||||||
|
json[r'title'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.contents != null) {
|
||||||
|
json[r'contents'] = this.contents;
|
||||||
|
} else {
|
||||||
|
json[r'contents'] = null;
|
||||||
|
}
|
||||||
|
if (this.categorieId != null) {
|
||||||
|
json[r'categorieId'] = this.categorieId;
|
||||||
|
} else {
|
||||||
|
json[r'categorieId'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageResourceId != null) {
|
||||||
|
json[r'imageResourceId'] = this.imageResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'imageResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageUrl != null) {
|
||||||
|
json[r'imageUrl'] = this.imageUrl;
|
||||||
|
} else {
|
||||||
|
json[r'imageUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.schedules != null) {
|
||||||
|
json[r'schedules'] = this.schedules;
|
||||||
|
} else {
|
||||||
|
json[r'schedules'] = null;
|
||||||
|
}
|
||||||
|
if (this.prices != null) {
|
||||||
|
json[r'prices'] = this.prices;
|
||||||
|
} else {
|
||||||
|
json[r'prices'] = null;
|
||||||
|
}
|
||||||
|
if (this.phone != null) {
|
||||||
|
json[r'phone'] = this.phone;
|
||||||
|
} else {
|
||||||
|
json[r'phone'] = null;
|
||||||
|
}
|
||||||
|
if (this.email != null) {
|
||||||
|
json[r'email'] = this.email;
|
||||||
|
} else {
|
||||||
|
json[r'email'] = null;
|
||||||
|
}
|
||||||
|
if (this.site != null) {
|
||||||
|
json[r'site'] = this.site;
|
||||||
|
} else {
|
||||||
|
json[r'site'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.polyColor != null) {
|
||||||
|
json[r'polyColor'] = this.polyColor;
|
||||||
|
} else {
|
||||||
|
json[r'polyColor'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedStepDTOTriggerGeoPoint] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedStepDTOTriggerGeoPoint? 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 "GuidedStepDTOTriggerGeoPoint[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedStepDTOTriggerGeoPoint[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedStepDTOTriggerGeoPoint(
|
||||||
|
id: mapValueOfType<int>(json, r'id'),
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
contents: ContentDTO.listFromJson(json[r'contents']),
|
||||||
|
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
||||||
|
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
||||||
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
|
schedules: TranslationDTO.listFromJson(json[r'schedules']),
|
||||||
|
prices: TranslationDTO.listFromJson(json[r'prices']),
|
||||||
|
phone: TranslationDTO.listFromJson(json[r'phone']),
|
||||||
|
email: TranslationDTO.listFromJson(json[r'email']),
|
||||||
|
site: TranslationDTO.listFromJson(json[r'site']),
|
||||||
|
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
|
||||||
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedStepDTOTriggerGeoPoint> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedStepDTOTriggerGeoPoint>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedStepDTOTriggerGeoPoint.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedStepDTOTriggerGeoPoint> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedStepDTOTriggerGeoPoint>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedStepDTOTriggerGeoPoint.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedStepDTOTriggerGeoPoint-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedStepDTOTriggerGeoPoint>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedStepDTOTriggerGeoPoint>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedStepDTOTriggerGeoPoint.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
282
manager_api_new/lib/model/guided_step_guided_path.dart
Normal file
282
manager_api_new/lib/model/guided_step_guided_path.dart
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedStepGuidedPath {
|
||||||
|
/// Returns a new [GuidedStepGuidedPath] instance.
|
||||||
|
GuidedStepGuidedPath({
|
||||||
|
required this.instanceId,
|
||||||
|
this.title = const [],
|
||||||
|
this.id,
|
||||||
|
this.description = const [],
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionMap,
|
||||||
|
this.sectionEventId,
|
||||||
|
this.sectionEvent,
|
||||||
|
this.isLinear,
|
||||||
|
this.requireSuccessToAdvance,
|
||||||
|
this.hideNextStepsUntilComplete,
|
||||||
|
this.order,
|
||||||
|
this.steps = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String instanceId;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
GuidedPathSectionMap? sectionMap;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
ApplicationInstanceSectionEvent? sectionEvent;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isLinear;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? requireSuccessToAdvance;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? hideNextStepsUntilComplete;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<GuidedStep>? steps;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedStepGuidedPath &&
|
||||||
|
other.instanceId == instanceId &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionMap == sectionMap &&
|
||||||
|
other.sectionEventId == sectionEventId &&
|
||||||
|
other.sectionEvent == sectionEvent &&
|
||||||
|
other.isLinear == isLinear &&
|
||||||
|
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
||||||
|
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.steps, steps);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(instanceId.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionMap == null ? 0 : sectionMap!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||||
|
(sectionEvent == null ? 0 : sectionEvent!.hashCode) +
|
||||||
|
(isLinear == null ? 0 : isLinear!.hashCode) +
|
||||||
|
(requireSuccessToAdvance == null
|
||||||
|
? 0
|
||||||
|
: requireSuccessToAdvance!.hashCode) +
|
||||||
|
(hideNextStepsUntilComplete == null
|
||||||
|
? 0
|
||||||
|
: hideNextStepsUntilComplete!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(steps == null ? 0 : steps!.hashCode);
|
||||||
|
|
||||||
|
@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]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'instanceId'] = this.instanceId;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMap != null) {
|
||||||
|
json[r'sectionMap'] = this.sectionMap;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMap'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEvent != null) {
|
||||||
|
json[r'sectionEvent'] = this.sectionEvent;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEvent'] = null;
|
||||||
|
}
|
||||||
|
if (this.isLinear != null) {
|
||||||
|
json[r'isLinear'] = this.isLinear;
|
||||||
|
} else {
|
||||||
|
json[r'isLinear'] = null;
|
||||||
|
}
|
||||||
|
if (this.requireSuccessToAdvance != null) {
|
||||||
|
json[r'requireSuccessToAdvance'] = this.requireSuccessToAdvance;
|
||||||
|
} else {
|
||||||
|
json[r'requireSuccessToAdvance'] = null;
|
||||||
|
}
|
||||||
|
if (this.hideNextStepsUntilComplete != null) {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = this.hideNextStepsUntilComplete;
|
||||||
|
} else {
|
||||||
|
json[r'hideNextStepsUntilComplete'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.steps != null) {
|
||||||
|
json[r'steps'] = this.steps;
|
||||||
|
} else {
|
||||||
|
json[r'steps'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedStepGuidedPath] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedStepGuidedPath? 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 "GuidedStepGuidedPath[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedStepGuidedPath[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedStepGuidedPath(
|
||||||
|
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
sectionEvent:
|
||||||
|
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
||||||
|
isLinear: mapValueOfType<bool>(json, r'isLinear'),
|
||||||
|
requireSuccessToAdvance:
|
||||||
|
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
||||||
|
hideNextStepsUntilComplete:
|
||||||
|
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
steps: GuidedStep.listFromJson(json[r'steps']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedStepGuidedPath> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedStepGuidedPath>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedStepGuidedPath.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedStepGuidedPath> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedStepGuidedPath>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedStepGuidedPath.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedStepGuidedPath-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedStepGuidedPath>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedStepGuidedPath>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedStepGuidedPath.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'instanceId',
|
||||||
|
'title',
|
||||||
|
};
|
||||||
|
}
|
||||||
286
manager_api_new/lib/model/guided_step_trigger_geo_point.dart
Normal file
286
manager_api_new/lib/model/guided_step_trigger_geo_point.dart
Normal file
@ -0,0 +1,286 @@
|
|||||||
|
//
|
||||||
|
// 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 GuidedStepTriggerGeoPoint {
|
||||||
|
/// Returns a new [GuidedStepTriggerGeoPoint] instance.
|
||||||
|
GuidedStepTriggerGeoPoint({
|
||||||
|
required this.id,
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.contents = const [],
|
||||||
|
this.schedules = const [],
|
||||||
|
this.prices = const [],
|
||||||
|
this.phone = const [],
|
||||||
|
this.email = const [],
|
||||||
|
this.site = const [],
|
||||||
|
this.categorieId,
|
||||||
|
this.geometry,
|
||||||
|
this.polyColor,
|
||||||
|
this.imageResourceId,
|
||||||
|
this.imageUrl,
|
||||||
|
this.sectionMapId,
|
||||||
|
this.sectionMap,
|
||||||
|
this.sectionEventId,
|
||||||
|
this.sectionEvent,
|
||||||
|
});
|
||||||
|
|
||||||
|
int id;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
List<TranslationDTO> description;
|
||||||
|
|
||||||
|
List<ContentDTO> contents;
|
||||||
|
|
||||||
|
List<TranslationDTO> schedules;
|
||||||
|
|
||||||
|
List<TranslationDTO> prices;
|
||||||
|
|
||||||
|
List<TranslationDTO> phone;
|
||||||
|
|
||||||
|
List<TranslationDTO> email;
|
||||||
|
|
||||||
|
List<TranslationDTO> site;
|
||||||
|
|
||||||
|
int? categorieId;
|
||||||
|
|
||||||
|
PointAllOfBoundary? geometry;
|
||||||
|
|
||||||
|
String? polyColor;
|
||||||
|
|
||||||
|
String? imageResourceId;
|
||||||
|
|
||||||
|
String? imageUrl;
|
||||||
|
|
||||||
|
String? sectionMapId;
|
||||||
|
|
||||||
|
GuidedPathSectionMap? sectionMap;
|
||||||
|
|
||||||
|
String? sectionEventId;
|
||||||
|
|
||||||
|
ApplicationInstanceSectionEvent? sectionEvent;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is GuidedStepTriggerGeoPoint &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
_deepEquality.equals(other.contents, contents) &&
|
||||||
|
_deepEquality.equals(other.schedules, schedules) &&
|
||||||
|
_deepEquality.equals(other.prices, prices) &&
|
||||||
|
_deepEquality.equals(other.phone, phone) &&
|
||||||
|
_deepEquality.equals(other.email, email) &&
|
||||||
|
_deepEquality.equals(other.site, site) &&
|
||||||
|
other.categorieId == categorieId &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.polyColor == polyColor &&
|
||||||
|
other.imageResourceId == imageResourceId &&
|
||||||
|
other.imageUrl == imageUrl &&
|
||||||
|
other.sectionMapId == sectionMapId &&
|
||||||
|
other.sectionMap == sectionMap &&
|
||||||
|
other.sectionEventId == sectionEventId &&
|
||||||
|
other.sectionEvent == sectionEvent;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(description.hashCode) +
|
||||||
|
(contents.hashCode) +
|
||||||
|
(schedules.hashCode) +
|
||||||
|
(prices.hashCode) +
|
||||||
|
(phone.hashCode) +
|
||||||
|
(email.hashCode) +
|
||||||
|
(site.hashCode) +
|
||||||
|
(categorieId == null ? 0 : categorieId!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
|
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
||||||
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
||||||
|
(sectionMap == null ? 0 : sectionMap!.hashCode) +
|
||||||
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||||
|
(sectionEvent == null ? 0 : sectionEvent!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'GuidedStepTriggerGeoPoint[id=$id, title=$title, description=$description, contents=$contents, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site, categorieId=$categorieId, geometry=$geometry, polyColor=$polyColor, imageResourceId=$imageResourceId, imageUrl=$imageUrl, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
json[r'contents'] = this.contents;
|
||||||
|
json[r'schedules'] = this.schedules;
|
||||||
|
json[r'prices'] = this.prices;
|
||||||
|
json[r'phone'] = this.phone;
|
||||||
|
json[r'email'] = this.email;
|
||||||
|
json[r'site'] = this.site;
|
||||||
|
if (this.categorieId != null) {
|
||||||
|
json[r'categorieId'] = this.categorieId;
|
||||||
|
} else {
|
||||||
|
json[r'categorieId'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.polyColor != null) {
|
||||||
|
json[r'polyColor'] = this.polyColor;
|
||||||
|
} else {
|
||||||
|
json[r'polyColor'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageResourceId != null) {
|
||||||
|
json[r'imageResourceId'] = this.imageResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'imageResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageUrl != null) {
|
||||||
|
json[r'imageUrl'] = this.imageUrl;
|
||||||
|
} else {
|
||||||
|
json[r'imageUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMapId != null) {
|
||||||
|
json[r'sectionMapId'] = this.sectionMapId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMapId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionMap != null) {
|
||||||
|
json[r'sectionMap'] = this.sectionMap;
|
||||||
|
} else {
|
||||||
|
json[r'sectionMap'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEventId != null) {
|
||||||
|
json[r'sectionEventId'] = this.sectionEventId;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEventId'] = null;
|
||||||
|
}
|
||||||
|
if (this.sectionEvent != null) {
|
||||||
|
json[r'sectionEvent'] = this.sectionEvent;
|
||||||
|
} else {
|
||||||
|
json[r'sectionEvent'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [GuidedStepTriggerGeoPoint] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static GuidedStepTriggerGeoPoint? 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 "GuidedStepTriggerGeoPoint[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "GuidedStepTriggerGeoPoint[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return GuidedStepTriggerGeoPoint(
|
||||||
|
id: mapValueOfType<int>(json, r'id')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
contents: ContentDTO.listFromJson(json[r'contents']),
|
||||||
|
schedules: TranslationDTO.listFromJson(json[r'schedules']),
|
||||||
|
prices: TranslationDTO.listFromJson(json[r'prices']),
|
||||||
|
phone: TranslationDTO.listFromJson(json[r'phone']),
|
||||||
|
email: TranslationDTO.listFromJson(json[r'email']),
|
||||||
|
site: TranslationDTO.listFromJson(json[r'site']),
|
||||||
|
categorieId: mapValueOfType<int>(json, r'categorieId'),
|
||||||
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
|
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
||||||
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
||||||
|
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
|
||||||
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||||
|
sectionEvent:
|
||||||
|
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GuidedStepTriggerGeoPoint> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <GuidedStepTriggerGeoPoint>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = GuidedStepTriggerGeoPoint.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, GuidedStepTriggerGeoPoint> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, GuidedStepTriggerGeoPoint>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = GuidedStepTriggerGeoPoint.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of GuidedStepTriggerGeoPoint-objects as value to a dart map
|
||||||
|
static Map<String, List<GuidedStepTriggerGeoPoint>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<GuidedStepTriggerGeoPoint>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = GuidedStepTriggerGeoPoint.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'id',
|
||||||
|
'title',
|
||||||
|
'description',
|
||||||
|
'contents',
|
||||||
|
'schedules',
|
||||||
|
'prices',
|
||||||
|
'phone',
|
||||||
|
'email',
|
||||||
|
'site',
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,135 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class ImageGeoPoint {
|
|
||||||
/// Returns a new [ImageGeoPoint] instance.
|
|
||||||
ImageGeoPoint({
|
|
||||||
this.imageResourceId,
|
|
||||||
this.imageSource,
|
|
||||||
});
|
|
||||||
|
|
||||||
String? imageResourceId;
|
|
||||||
|
|
||||||
String? imageSource;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is ImageGeoPoint &&
|
|
||||||
other.imageResourceId == imageResourceId &&
|
|
||||||
other.imageSource == imageSource;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(imageResourceId == null ? 0 : imageResourceId!.hashCode) +
|
|
||||||
(imageSource == null ? 0 : imageSource!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.imageResourceId != null) {
|
|
||||||
json[r'imageResourceId'] = this.imageResourceId;
|
|
||||||
} else {
|
|
||||||
json[r'imageResourceId'] = null;
|
|
||||||
}
|
|
||||||
if (this.imageSource != null) {
|
|
||||||
json[r'imageSource'] = this.imageSource;
|
|
||||||
} else {
|
|
||||||
json[r'imageSource'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [ImageGeoPoint] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static ImageGeoPoint? fromJson(dynamic value) {
|
|
||||||
if (value is Map) {
|
|
||||||
final json = value.cast<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 "ImageGeoPoint[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "ImageGeoPoint[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return ImageGeoPoint(
|
|
||||||
imageResourceId: mapValueOfType<String>(json, r'imageResourceId'),
|
|
||||||
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<ImageGeoPoint> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <ImageGeoPoint>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = ImageGeoPoint.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ImageGeoPoint> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, ImageGeoPoint>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = ImageGeoPoint.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of ImageGeoPoint-objects as value to a dart map
|
|
||||||
static Map<String, List<ImageGeoPoint>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<ImageGeoPoint>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = ImageGeoPoint.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
91
manager_api_new/lib/model/layout_main_page_type.dart
Normal file
91
manager_api_new/lib/model/layout_main_page_type.dart
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
//
|
||||||
|
// 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 = SimpleGrid 1 = MasonryGrid
|
||||||
|
class LayoutMainPageType {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const LayoutMainPageType._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number0 = LayoutMainPageType._(0);
|
||||||
|
static const number1 = LayoutMainPageType._(1);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][LayoutMainPageType].
|
||||||
|
static const values = <LayoutMainPageType>[
|
||||||
|
number0,
|
||||||
|
number1,
|
||||||
|
];
|
||||||
|
|
||||||
|
static LayoutMainPageType? fromJson(dynamic value) =>
|
||||||
|
LayoutMainPageTypeTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<LayoutMainPageType> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <LayoutMainPageType>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = LayoutMainPageType.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [LayoutMainPageType] to int,
|
||||||
|
/// and [decode] dynamic data back to [LayoutMainPageType].
|
||||||
|
class LayoutMainPageTypeTypeTransformer {
|
||||||
|
factory LayoutMainPageTypeTypeTransformer() =>
|
||||||
|
_instance ??= const LayoutMainPageTypeTypeTransformer._();
|
||||||
|
|
||||||
|
const LayoutMainPageTypeTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(LayoutMainPageType data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a LayoutMainPageType.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
LayoutMainPageType? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 0:
|
||||||
|
return LayoutMainPageType.number0;
|
||||||
|
case 1:
|
||||||
|
return LayoutMainPageType.number1;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [LayoutMainPageTypeTypeTransformer] instance.
|
||||||
|
static LayoutMainPageTypeTypeTransformer? _instance;
|
||||||
|
}
|
||||||
218
manager_api_new/lib/model/map_annotation.dart
Normal file
218
manager_api_new/lib/model/map_annotation.dart
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
//
|
||||||
|
// 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 MapAnnotation {
|
||||||
|
/// Returns a new [MapAnnotation] instance.
|
||||||
|
MapAnnotation({
|
||||||
|
this.id,
|
||||||
|
this.type = const [],
|
||||||
|
this.label = const [],
|
||||||
|
this.geometryType,
|
||||||
|
this.geometry,
|
||||||
|
this.polyColor,
|
||||||
|
this.icon,
|
||||||
|
this.iconResourceId,
|
||||||
|
this.iconResource,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
List<TranslationDTO>? type;
|
||||||
|
|
||||||
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
GeometryType? geometryType;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? geometry;
|
||||||
|
|
||||||
|
String? polyColor;
|
||||||
|
|
||||||
|
String? icon;
|
||||||
|
|
||||||
|
String? iconResourceId;
|
||||||
|
|
||||||
|
MapAnnotationIconResource? iconResource;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is MapAnnotation &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.type, type) &&
|
||||||
|
_deepEquality.equals(other.label, label) &&
|
||||||
|
other.geometryType == geometryType &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.polyColor == polyColor &&
|
||||||
|
other.icon == icon &&
|
||||||
|
other.iconResourceId == iconResourceId &&
|
||||||
|
other.iconResource == iconResource;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(type == null ? 0 : type!.hashCode) +
|
||||||
|
(label == null ? 0 : label!.hashCode) +
|
||||||
|
(geometryType == null ? 0 : geometryType!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
|
(icon == null ? 0 : icon!.hashCode) +
|
||||||
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
|
(iconResource == null ? 0 : iconResource!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'MapAnnotation[id=$id, type=$type, label=$label, geometryType=$geometryType, geometry=$geometry, polyColor=$polyColor, icon=$icon, iconResourceId=$iconResourceId, iconResource=$iconResource]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.type != null) {
|
||||||
|
json[r'type'] = this.type;
|
||||||
|
} else {
|
||||||
|
json[r'type'] = null;
|
||||||
|
}
|
||||||
|
if (this.label != null) {
|
||||||
|
json[r'label'] = this.label;
|
||||||
|
} else {
|
||||||
|
json[r'label'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometryType != null) {
|
||||||
|
json[r'geometryType'] = this.geometryType;
|
||||||
|
} else {
|
||||||
|
json[r'geometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.polyColor != null) {
|
||||||
|
json[r'polyColor'] = this.polyColor;
|
||||||
|
} else {
|
||||||
|
json[r'polyColor'] = null;
|
||||||
|
}
|
||||||
|
if (this.icon != null) {
|
||||||
|
json[r'icon'] = this.icon;
|
||||||
|
} else {
|
||||||
|
json[r'icon'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconResourceId != null) {
|
||||||
|
json[r'iconResourceId'] = this.iconResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'iconResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconResource != null) {
|
||||||
|
json[r'iconResource'] = this.iconResource;
|
||||||
|
} else {
|
||||||
|
json[r'iconResource'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapAnnotation] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapAnnotation? 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 "MapAnnotation[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "MapAnnotation[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapAnnotation(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
type: TranslationDTO.listFromJson(json[r'type']),
|
||||||
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
|
geometryType: GeometryType.fromJson(json[r'geometryType']),
|
||||||
|
geometry: MapAnnotationGeometry.fromJson(json[r'geometry']),
|
||||||
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
|
iconResource: MapAnnotationIconResource.fromJson(json[r'iconResource']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapAnnotation> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <MapAnnotation>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapAnnotation.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapAnnotation> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapAnnotation>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapAnnotation.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapAnnotation-objects as value to a dart map
|
||||||
|
static Map<String, List<MapAnnotation>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<MapAnnotation>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapAnnotation.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
218
manager_api_new/lib/model/map_annotation_dto.dart
Normal file
218
manager_api_new/lib/model/map_annotation_dto.dart
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
//
|
||||||
|
// 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 MapAnnotationDTO {
|
||||||
|
/// Returns a new [MapAnnotationDTO] instance.
|
||||||
|
MapAnnotationDTO({
|
||||||
|
this.id,
|
||||||
|
this.type = const [],
|
||||||
|
this.label = const [],
|
||||||
|
this.geometryType,
|
||||||
|
this.geometry,
|
||||||
|
this.polyColor,
|
||||||
|
this.icon,
|
||||||
|
this.iconResourceId,
|
||||||
|
this.iconResource,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
List<TranslationDTO>? type;
|
||||||
|
|
||||||
|
List<TranslationDTO>? label;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
GeometryType? geometryType;
|
||||||
|
|
||||||
|
EventAddressDTOGeometry? geometry;
|
||||||
|
|
||||||
|
String? polyColor;
|
||||||
|
|
||||||
|
String? icon;
|
||||||
|
|
||||||
|
String? iconResourceId;
|
||||||
|
|
||||||
|
PuzzleDTOAllOfPuzzleImage? iconResource;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is MapAnnotationDTO &&
|
||||||
|
other.id == id &&
|
||||||
|
_deepEquality.equals(other.type, type) &&
|
||||||
|
_deepEquality.equals(other.label, label) &&
|
||||||
|
other.geometryType == geometryType &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.polyColor == polyColor &&
|
||||||
|
other.icon == icon &&
|
||||||
|
other.iconResourceId == iconResourceId &&
|
||||||
|
other.iconResource == iconResource;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(type == null ? 0 : type!.hashCode) +
|
||||||
|
(label == null ? 0 : label!.hashCode) +
|
||||||
|
(geometryType == null ? 0 : geometryType!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(polyColor == null ? 0 : polyColor!.hashCode) +
|
||||||
|
(icon == null ? 0 : icon!.hashCode) +
|
||||||
|
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||||
|
(iconResource == null ? 0 : iconResource!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'MapAnnotationDTO[id=$id, type=$type, label=$label, geometryType=$geometryType, geometry=$geometry, polyColor=$polyColor, icon=$icon, iconResourceId=$iconResourceId, iconResource=$iconResource]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.type != null) {
|
||||||
|
json[r'type'] = this.type;
|
||||||
|
} else {
|
||||||
|
json[r'type'] = null;
|
||||||
|
}
|
||||||
|
if (this.label != null) {
|
||||||
|
json[r'label'] = this.label;
|
||||||
|
} else {
|
||||||
|
json[r'label'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometryType != null) {
|
||||||
|
json[r'geometryType'] = this.geometryType;
|
||||||
|
} else {
|
||||||
|
json[r'geometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.polyColor != null) {
|
||||||
|
json[r'polyColor'] = this.polyColor;
|
||||||
|
} else {
|
||||||
|
json[r'polyColor'] = null;
|
||||||
|
}
|
||||||
|
if (this.icon != null) {
|
||||||
|
json[r'icon'] = this.icon;
|
||||||
|
} else {
|
||||||
|
json[r'icon'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconResourceId != null) {
|
||||||
|
json[r'iconResourceId'] = this.iconResourceId;
|
||||||
|
} else {
|
||||||
|
json[r'iconResourceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.iconResource != null) {
|
||||||
|
json[r'iconResource'] = this.iconResource;
|
||||||
|
} else {
|
||||||
|
json[r'iconResource'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapAnnotationDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapAnnotationDTO? 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 "MapAnnotationDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "MapAnnotationDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapAnnotationDTO(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
type: TranslationDTO.listFromJson(json[r'type']),
|
||||||
|
label: TranslationDTO.listFromJson(json[r'label']),
|
||||||
|
geometryType: GeometryType.fromJson(json[r'geometryType']),
|
||||||
|
geometry: EventAddressDTOGeometry.fromJson(json[r'geometry']),
|
||||||
|
polyColor: mapValueOfType<String>(json, r'polyColor'),
|
||||||
|
icon: mapValueOfType<String>(json, r'icon'),
|
||||||
|
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||||
|
iconResource: PuzzleDTOAllOfPuzzleImage.fromJson(json[r'iconResource']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapAnnotationDTO> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <MapAnnotationDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapAnnotationDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapAnnotationDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapAnnotationDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapAnnotationDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapAnnotationDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<MapAnnotationDTO>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<MapAnnotationDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapAnnotationDTO.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
322
manager_api_new/lib/model/map_annotation_geometry.dart
Normal file
322
manager_api_new/lib/model/map_annotation_geometry.dart
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
//
|
||||||
|
// 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 MapAnnotationGeometry {
|
||||||
|
/// Returns a new [MapAnnotationGeometry] instance.
|
||||||
|
MapAnnotationGeometry({
|
||||||
|
this.factory_,
|
||||||
|
this.userData,
|
||||||
|
this.srid,
|
||||||
|
this.precisionModel,
|
||||||
|
this.numGeometries,
|
||||||
|
this.isSimple,
|
||||||
|
this.isValid,
|
||||||
|
this.area,
|
||||||
|
this.length,
|
||||||
|
this.centroid,
|
||||||
|
this.interiorPoint,
|
||||||
|
this.pointOnSurface,
|
||||||
|
this.envelope,
|
||||||
|
this.envelopeInternal,
|
||||||
|
this.isRectangle,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryFactory? factory_;
|
||||||
|
|
||||||
|
Object? userData;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numGeometries;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isSimple;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? length;
|
||||||
|
|
||||||
|
GeometryCentroid? centroid;
|
||||||
|
|
||||||
|
GeometryCentroid? interiorPoint;
|
||||||
|
|
||||||
|
GeometryCentroid? pointOnSurface;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? envelope;
|
||||||
|
|
||||||
|
GeometryEnvelopeInternal? envelopeInternal;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is MapAnnotationGeometry &&
|
||||||
|
other.factory_ == factory_ &&
|
||||||
|
other.userData == userData &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.numGeometries == numGeometries &&
|
||||||
|
other.isSimple == isSimple &&
|
||||||
|
other.isValid == isValid &&
|
||||||
|
other.area == area &&
|
||||||
|
other.length == length &&
|
||||||
|
other.centroid == centroid &&
|
||||||
|
other.interiorPoint == interiorPoint &&
|
||||||
|
other.pointOnSurface == pointOnSurface &&
|
||||||
|
other.envelope == envelope &&
|
||||||
|
other.envelopeInternal == envelopeInternal &&
|
||||||
|
other.isRectangle == isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
||||||
|
(userData == null ? 0 : userData!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
||||||
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(length == null ? 0 : length!.hashCode) +
|
||||||
|
(centroid == null ? 0 : centroid!.hashCode) +
|
||||||
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
||||||
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
||||||
|
(envelope == null ? 0 : envelope!.hashCode) +
|
||||||
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
||||||
|
(isRectangle == null ? 0 : isRectangle!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'MapAnnotationGeometry[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.factory_ != null) {
|
||||||
|
json[r'factory'] = this.factory_;
|
||||||
|
} else {
|
||||||
|
json[r'factory'] = null;
|
||||||
|
}
|
||||||
|
if (this.userData != null) {
|
||||||
|
json[r'userData'] = this.userData;
|
||||||
|
} else {
|
||||||
|
json[r'userData'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.numGeometries != null) {
|
||||||
|
json[r'numGeometries'] = this.numGeometries;
|
||||||
|
} else {
|
||||||
|
json[r'numGeometries'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSimple != null) {
|
||||||
|
json[r'isSimple'] = this.isSimple;
|
||||||
|
} else {
|
||||||
|
json[r'isSimple'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.length != null) {
|
||||||
|
json[r'length'] = this.length;
|
||||||
|
} else {
|
||||||
|
json[r'length'] = null;
|
||||||
|
}
|
||||||
|
if (this.centroid != null) {
|
||||||
|
json[r'centroid'] = this.centroid;
|
||||||
|
} else {
|
||||||
|
json[r'centroid'] = null;
|
||||||
|
}
|
||||||
|
if (this.interiorPoint != null) {
|
||||||
|
json[r'interiorPoint'] = this.interiorPoint;
|
||||||
|
} else {
|
||||||
|
json[r'interiorPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.pointOnSurface != null) {
|
||||||
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
||||||
|
} else {
|
||||||
|
json[r'pointOnSurface'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelope != null) {
|
||||||
|
json[r'envelope'] = this.envelope;
|
||||||
|
} else {
|
||||||
|
json[r'envelope'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelopeInternal != null) {
|
||||||
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
||||||
|
} else {
|
||||||
|
json[r'envelopeInternal'] = null;
|
||||||
|
}
|
||||||
|
if (this.isRectangle != null) {
|
||||||
|
json[r'isRectangle'] = this.isRectangle;
|
||||||
|
} else {
|
||||||
|
json[r'isRectangle'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [MapAnnotationGeometry] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static MapAnnotationGeometry? 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 "MapAnnotationGeometry[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "MapAnnotationGeometry[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return MapAnnotationGeometry(
|
||||||
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
||||||
|
userData: mapValueOfType<Object>(json, r'userData'),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
||||||
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
length: mapValueOfType<double>(json, r'length'),
|
||||||
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
||||||
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
||||||
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
||||||
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
||||||
|
envelopeInternal:
|
||||||
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
||||||
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<MapAnnotationGeometry> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <MapAnnotationGeometry>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = MapAnnotationGeometry.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, MapAnnotationGeometry> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, MapAnnotationGeometry>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = MapAnnotationGeometry.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of MapAnnotationGeometry-objects as value to a dart map
|
||||||
|
static Map<String, List<MapAnnotationGeometry>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<MapAnnotationGeometry>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = MapAnnotationGeometry.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class QuizQuestionResource {
|
class MapAnnotationIconResource {
|
||||||
/// Returns a new [QuizQuestionResource] instance.
|
/// Returns a new [MapAnnotationIconResource] instance.
|
||||||
QuizQuestionResource({
|
MapAnnotationIconResource({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.type,
|
required this.type,
|
||||||
required this.label,
|
required this.label,
|
||||||
@ -42,7 +42,7 @@ class QuizQuestionResource {
|
|||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is QuizQuestionResource &&
|
other is MapAnnotationIconResource &&
|
||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.type == type &&
|
other.type == type &&
|
||||||
other.label == label &&
|
other.label == label &&
|
||||||
@ -62,7 +62,7 @@ class QuizQuestionResource {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'QuizQuestionResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]';
|
'MapAnnotationIconResource[id=$id, type=$type, label=$label, instanceId=$instanceId, dateCreation=$dateCreation, url=$url]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -83,10 +83,10 @@ class QuizQuestionResource {
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [QuizQuestionResource] instance and imports its values from
|
/// Returns a new [MapAnnotationIconResource] instance and imports its values from
|
||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static QuizQuestionResource? fromJson(dynamic value) {
|
static MapAnnotationIconResource? fromJson(dynamic value) {
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
@ -96,14 +96,14 @@ class QuizQuestionResource {
|
|||||||
assert(() {
|
assert(() {
|
||||||
requiredKeys.forEach((key) {
|
requiredKeys.forEach((key) {
|
||||||
assert(json.containsKey(key),
|
assert(json.containsKey(key),
|
||||||
'Required key "QuizQuestionResource[$key]" is missing from JSON.');
|
'Required key "MapAnnotationIconResource[$key]" is missing from JSON.');
|
||||||
assert(json[key] != null,
|
assert(json[key] != null,
|
||||||
'Required key "QuizQuestionResource[$key]" has a null value in JSON.');
|
'Required key "MapAnnotationIconResource[$key]" has a null value in JSON.');
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
return QuizQuestionResource(
|
return MapAnnotationIconResource(
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
type: ResourceType.fromJson(json[r'type'])!,
|
type: ResourceType.fromJson(json[r'type'])!,
|
||||||
label: mapValueOfType<String>(json, r'label')!,
|
label: mapValueOfType<String>(json, r'label')!,
|
||||||
@ -115,14 +115,14 @@ class QuizQuestionResource {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<QuizQuestionResource> listFromJson(
|
static List<MapAnnotationIconResource> listFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final result = <QuizQuestionResource>[];
|
final result = <MapAnnotationIconResource>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
final value = QuizQuestionResource.fromJson(row);
|
final value = MapAnnotationIconResource.fromJson(row);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
result.add(value);
|
result.add(value);
|
||||||
}
|
}
|
||||||
@ -131,12 +131,12 @@ class QuizQuestionResource {
|
|||||||
return result.toList(growable: growable);
|
return result.toList(growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, QuizQuestionResource> mapFromJson(dynamic json) {
|
static Map<String, MapAnnotationIconResource> mapFromJson(dynamic json) {
|
||||||
final map = <String, QuizQuestionResource>{};
|
final map = <String, MapAnnotationIconResource>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = QuizQuestionResource.fromJson(entry.value);
|
final value = MapAnnotationIconResource.fromJson(entry.value);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
map[entry.key] = value;
|
map[entry.key] = value;
|
||||||
}
|
}
|
||||||
@ -145,17 +145,17 @@ class QuizQuestionResource {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maps a json object with a list of QuizQuestionResource-objects as value to a dart map
|
// maps a json object with a list of MapAnnotationIconResource-objects as value to a dart map
|
||||||
static Map<String, List<QuizQuestionResource>> mapListFromJson(
|
static Map<String, List<MapAnnotationIconResource>> mapListFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final map = <String, List<QuizQuestionResource>>{};
|
final map = <String, List<MapAnnotationIconResource>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
json = json.cast<String, dynamic>();
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
map[entry.key] = QuizQuestionResource.listFromJson(
|
map[entry.key] = MapAnnotationIconResource.listFromJson(
|
||||||
entry.value,
|
entry.value,
|
||||||
growable: growable,
|
growable: growable,
|
||||||
);
|
);
|
||||||
@ -17,6 +17,7 @@ class MenuDTO {
|
|||||||
this.label,
|
this.label,
|
||||||
this.title = const [],
|
this.title = const [],
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
|
this.isActive,
|
||||||
this.imageId,
|
this.imageId,
|
||||||
this.imageSource,
|
this.imageSource,
|
||||||
this.configurationId,
|
this.configurationId,
|
||||||
@ -42,6 +43,14 @@ class MenuDTO {
|
|||||||
|
|
||||||
List<TranslationDTO>? description;
|
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.
|
||||||
|
///
|
||||||
|
bool? isActive;
|
||||||
|
|
||||||
String? imageId;
|
String? imageId;
|
||||||
|
|
||||||
String? imageSource;
|
String? imageSource;
|
||||||
@ -66,12 +75,6 @@ class MenuDTO {
|
|||||||
///
|
///
|
||||||
SectionType? type;
|
SectionType? type;
|
||||||
|
|
||||||
///
|
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
DateTime? dateCreation;
|
DateTime? dateCreation;
|
||||||
|
|
||||||
int? order;
|
int? order;
|
||||||
@ -104,6 +107,7 @@ class MenuDTO {
|
|||||||
other.label == label &&
|
other.label == label &&
|
||||||
_deepEquality.equals(other.title, title) &&
|
_deepEquality.equals(other.title, title) &&
|
||||||
_deepEquality.equals(other.description, description) &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.isActive == isActive &&
|
||||||
other.imageId == imageId &&
|
other.imageId == imageId &&
|
||||||
other.imageSource == imageSource &&
|
other.imageSource == imageSource &&
|
||||||
other.configurationId == configurationId &&
|
other.configurationId == configurationId &&
|
||||||
@ -127,6 +131,7 @@ class MenuDTO {
|
|||||||
(label == null ? 0 : label!.hashCode) +
|
(label == null ? 0 : label!.hashCode) +
|
||||||
(title == null ? 0 : title!.hashCode) +
|
(title == null ? 0 : title!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(isActive == null ? 0 : isActive!.hashCode) +
|
||||||
(imageId == null ? 0 : imageId!.hashCode) +
|
(imageId == null ? 0 : imageId!.hashCode) +
|
||||||
(imageSource == null ? 0 : imageSource!.hashCode) +
|
(imageSource == null ? 0 : imageSource!.hashCode) +
|
||||||
(configurationId == null ? 0 : configurationId!.hashCode) +
|
(configurationId == null ? 0 : configurationId!.hashCode) +
|
||||||
@ -145,7 +150,7 @@ class MenuDTO {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'MenuDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, sections=$sections]';
|
'MenuDTO[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, sections=$sections]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -169,6 +174,11 @@ class MenuDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
json[r'description'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.isActive != null) {
|
||||||
|
json[r'isActive'] = this.isActive;
|
||||||
|
} else {
|
||||||
|
json[r'isActive'] = null;
|
||||||
|
}
|
||||||
if (this.imageId != null) {
|
if (this.imageId != null) {
|
||||||
json[r'imageId'] = this.imageId;
|
json[r'imageId'] = this.imageId;
|
||||||
} else {
|
} else {
|
||||||
@ -272,6 +282,7 @@ class MenuDTO {
|
|||||||
label: mapValueOfType<String>(json, r'label'),
|
label: mapValueOfType<String>(json, r'label'),
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
isActive: mapValueOfType<bool>(json, r'isActive'),
|
||||||
imageId: mapValueOfType<String>(json, r'imageId'),
|
imageId: mapValueOfType<String>(json, r'imageId'),
|
||||||
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
||||||
configurationId: mapValueOfType<String>(json, r'configurationId'),
|
configurationId: mapValueOfType<String>(json, r'configurationId'),
|
||||||
|
|||||||
186
manager_api_new/lib/model/nts_geometry_services.dart
Normal file
186
manager_api_new/lib/model/nts_geometry_services.dart
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
//
|
||||||
|
// 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 NtsGeometryServices {
|
||||||
|
/// Returns a new [NtsGeometryServices] instance.
|
||||||
|
NtsGeometryServices({
|
||||||
|
this.geometryOverlay,
|
||||||
|
this.coordinateEqualityComparer,
|
||||||
|
this.defaultSRID,
|
||||||
|
this.defaultCoordinateSequenceFactory,
|
||||||
|
this.defaultPrecisionModel,
|
||||||
|
});
|
||||||
|
|
||||||
|
NtsGeometryServicesGeometryOverlay? geometryOverlay;
|
||||||
|
|
||||||
|
NtsGeometryServicesCoordinateEqualityComparer? coordinateEqualityComparer;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? defaultSRID;
|
||||||
|
|
||||||
|
GeometryFactoryCoordinateSequenceFactory? defaultCoordinateSequenceFactory;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? defaultPrecisionModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is NtsGeometryServices &&
|
||||||
|
other.geometryOverlay == geometryOverlay &&
|
||||||
|
other.coordinateEqualityComparer == coordinateEqualityComparer &&
|
||||||
|
other.defaultSRID == defaultSRID &&
|
||||||
|
other.defaultCoordinateSequenceFactory ==
|
||||||
|
defaultCoordinateSequenceFactory &&
|
||||||
|
other.defaultPrecisionModel == defaultPrecisionModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(geometryOverlay == null ? 0 : geometryOverlay!.hashCode) +
|
||||||
|
(coordinateEqualityComparer == null
|
||||||
|
? 0
|
||||||
|
: coordinateEqualityComparer!.hashCode) +
|
||||||
|
(defaultSRID == null ? 0 : defaultSRID!.hashCode) +
|
||||||
|
(defaultCoordinateSequenceFactory == null
|
||||||
|
? 0
|
||||||
|
: defaultCoordinateSequenceFactory!.hashCode) +
|
||||||
|
(defaultPrecisionModel == null ? 0 : defaultPrecisionModel!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'NtsGeometryServices[geometryOverlay=$geometryOverlay, coordinateEqualityComparer=$coordinateEqualityComparer, defaultSRID=$defaultSRID, defaultCoordinateSequenceFactory=$defaultCoordinateSequenceFactory, defaultPrecisionModel=$defaultPrecisionModel]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.geometryOverlay != null) {
|
||||||
|
json[r'geometryOverlay'] = this.geometryOverlay;
|
||||||
|
} else {
|
||||||
|
json[r'geometryOverlay'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateEqualityComparer != null) {
|
||||||
|
json[r'coordinateEqualityComparer'] = this.coordinateEqualityComparer;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateEqualityComparer'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultSRID != null) {
|
||||||
|
json[r'defaultSRID'] = this.defaultSRID;
|
||||||
|
} else {
|
||||||
|
json[r'defaultSRID'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultCoordinateSequenceFactory != null) {
|
||||||
|
json[r'defaultCoordinateSequenceFactory'] =
|
||||||
|
this.defaultCoordinateSequenceFactory;
|
||||||
|
} else {
|
||||||
|
json[r'defaultCoordinateSequenceFactory'] = null;
|
||||||
|
}
|
||||||
|
if (this.defaultPrecisionModel != null) {
|
||||||
|
json[r'defaultPrecisionModel'] = this.defaultPrecisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'defaultPrecisionModel'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [NtsGeometryServices] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static NtsGeometryServices? 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 "NtsGeometryServices[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "NtsGeometryServices[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return NtsGeometryServices(
|
||||||
|
geometryOverlay: NtsGeometryServicesGeometryOverlay.fromJson(
|
||||||
|
json[r'geometryOverlay']),
|
||||||
|
coordinateEqualityComparer:
|
||||||
|
NtsGeometryServicesCoordinateEqualityComparer.fromJson(
|
||||||
|
json[r'coordinateEqualityComparer']),
|
||||||
|
defaultSRID: mapValueOfType<int>(json, r'defaultSRID'),
|
||||||
|
defaultCoordinateSequenceFactory:
|
||||||
|
GeometryFactoryCoordinateSequenceFactory.fromJson(
|
||||||
|
json[r'defaultCoordinateSequenceFactory']),
|
||||||
|
defaultPrecisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'defaultPrecisionModel']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<NtsGeometryServices> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <NtsGeometryServices>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = NtsGeometryServices.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, NtsGeometryServices> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, NtsGeometryServices>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = NtsGeometryServices.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of NtsGeometryServices-objects as value to a dart map
|
||||||
|
static Map<String, List<NtsGeometryServices>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<NtsGeometryServices>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = NtsGeometryServices.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class NtsGeometryServicesCoordinateEqualityComparer {
|
||||||
|
/// Returns a new [NtsGeometryServicesCoordinateEqualityComparer] instance.
|
||||||
|
NtsGeometryServicesCoordinateEqualityComparer();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is NtsGeometryServicesCoordinateEqualityComparer;
|
||||||
|
|
||||||
|
/*@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
*/
|
||||||
|
@override
|
||||||
|
String toString() => 'NtsGeometryServicesCoordinateEqualityComparer[]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [NtsGeometryServicesCoordinateEqualityComparer] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static NtsGeometryServicesCoordinateEqualityComparer? 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 "NtsGeometryServicesCoordinateEqualityComparer[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "NtsGeometryServicesCoordinateEqualityComparer[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return NtsGeometryServicesCoordinateEqualityComparer(
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<NtsGeometryServicesCoordinateEqualityComparer> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <NtsGeometryServicesCoordinateEqualityComparer>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = NtsGeometryServicesCoordinateEqualityComparer.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, NtsGeometryServicesCoordinateEqualityComparer> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, NtsGeometryServicesCoordinateEqualityComparer>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = NtsGeometryServicesCoordinateEqualityComparer.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of NtsGeometryServicesCoordinateEqualityComparer-objects as value to a dart map
|
||||||
|
static Map<String, List<NtsGeometryServicesCoordinateEqualityComparer>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<NtsGeometryServicesCoordinateEqualityComparer>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = NtsGeometryServicesCoordinateEqualityComparer.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class NtsGeometryServicesGeometryOverlay {
|
||||||
|
/// Returns a new [NtsGeometryServicesGeometryOverlay] instance.
|
||||||
|
NtsGeometryServicesGeometryOverlay();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is NtsGeometryServicesGeometryOverlay;
|
||||||
|
|
||||||
|
/*@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
*/
|
||||||
|
@override
|
||||||
|
String toString() => 'NtsGeometryServicesGeometryOverlay[]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [NtsGeometryServicesGeometryOverlay] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static NtsGeometryServicesGeometryOverlay? 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 "NtsGeometryServicesGeometryOverlay[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null, 'Required key "NtsGeometryServicesGeometryOverlay[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return NtsGeometryServicesGeometryOverlay(
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<NtsGeometryServicesGeometryOverlay> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <NtsGeometryServicesGeometryOverlay>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = NtsGeometryServicesGeometryOverlay.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, NtsGeometryServicesGeometryOverlay> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, NtsGeometryServicesGeometryOverlay>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = NtsGeometryServicesGeometryOverlay.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of NtsGeometryServicesGeometryOverlay-objects as value to a dart map
|
||||||
|
static Map<String, List<NtsGeometryServicesGeometryOverlay>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<NtsGeometryServicesGeometryOverlay>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = NtsGeometryServicesGeometryOverlay.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
147
manager_api_new/lib/model/ogc_geometry_type.dart
Normal file
147
manager_api_new/lib/model/ogc_geometry_type.dart
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
//
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
/// 1 = Point 2 = LineString 3 = Polygon 4 = MultiPoint 5 = MultiLineString 6 = MultiPolygon 7 = GeometryCollection 8 = CircularString 9 = CompoundCurve 10 = CurvePolygon 11 = MultiCurve 12 = MultiSurface 13 = Curve 14 = Surface 15 = PolyhedralSurface 16 = TIN
|
||||||
|
class OgcGeometryType {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const OgcGeometryType._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number1 = OgcGeometryType._(1);
|
||||||
|
static const number2 = OgcGeometryType._(2);
|
||||||
|
static const number3 = OgcGeometryType._(3);
|
||||||
|
static const number4 = OgcGeometryType._(4);
|
||||||
|
static const number5 = OgcGeometryType._(5);
|
||||||
|
static const number6 = OgcGeometryType._(6);
|
||||||
|
static const number7 = OgcGeometryType._(7);
|
||||||
|
static const number8 = OgcGeometryType._(8);
|
||||||
|
static const number9 = OgcGeometryType._(9);
|
||||||
|
static const number10 = OgcGeometryType._(10);
|
||||||
|
static const number11 = OgcGeometryType._(11);
|
||||||
|
static const number12 = OgcGeometryType._(12);
|
||||||
|
static const number13 = OgcGeometryType._(13);
|
||||||
|
static const number14 = OgcGeometryType._(14);
|
||||||
|
static const number15 = OgcGeometryType._(15);
|
||||||
|
static const number16 = OgcGeometryType._(16);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][OgcGeometryType].
|
||||||
|
static const values = <OgcGeometryType>[
|
||||||
|
number1,
|
||||||
|
number2,
|
||||||
|
number3,
|
||||||
|
number4,
|
||||||
|
number5,
|
||||||
|
number6,
|
||||||
|
number7,
|
||||||
|
number8,
|
||||||
|
number9,
|
||||||
|
number10,
|
||||||
|
number11,
|
||||||
|
number12,
|
||||||
|
number13,
|
||||||
|
number14,
|
||||||
|
number15,
|
||||||
|
number16,
|
||||||
|
];
|
||||||
|
|
||||||
|
static OgcGeometryType? fromJson(dynamic value) =>
|
||||||
|
OgcGeometryTypeTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<OgcGeometryType> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <OgcGeometryType>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = OgcGeometryType.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [OgcGeometryType] to int,
|
||||||
|
/// and [decode] dynamic data back to [OgcGeometryType].
|
||||||
|
class OgcGeometryTypeTypeTransformer {
|
||||||
|
factory OgcGeometryTypeTypeTransformer() =>
|
||||||
|
_instance ??= const OgcGeometryTypeTypeTransformer._();
|
||||||
|
|
||||||
|
const OgcGeometryTypeTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(OgcGeometryType data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a OgcGeometryType.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
OgcGeometryType? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 1:
|
||||||
|
return OgcGeometryType.number1;
|
||||||
|
case 2:
|
||||||
|
return OgcGeometryType.number2;
|
||||||
|
case 3:
|
||||||
|
return OgcGeometryType.number3;
|
||||||
|
case 4:
|
||||||
|
return OgcGeometryType.number4;
|
||||||
|
case 5:
|
||||||
|
return OgcGeometryType.number5;
|
||||||
|
case 6:
|
||||||
|
return OgcGeometryType.number6;
|
||||||
|
case 7:
|
||||||
|
return OgcGeometryType.number7;
|
||||||
|
case 8:
|
||||||
|
return OgcGeometryType.number8;
|
||||||
|
case 9:
|
||||||
|
return OgcGeometryType.number9;
|
||||||
|
case 10:
|
||||||
|
return OgcGeometryType.number10;
|
||||||
|
case 11:
|
||||||
|
return OgcGeometryType.number11;
|
||||||
|
case 12:
|
||||||
|
return OgcGeometryType.number12;
|
||||||
|
case 13:
|
||||||
|
return OgcGeometryType.number13;
|
||||||
|
case 14:
|
||||||
|
return OgcGeometryType.number14;
|
||||||
|
case 15:
|
||||||
|
return OgcGeometryType.number15;
|
||||||
|
case 16:
|
||||||
|
return OgcGeometryType.number16;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [OgcGeometryTypeTypeTransformer] instance.
|
||||||
|
static OgcGeometryTypeTypeTransformer? _instance;
|
||||||
|
}
|
||||||
259
manager_api_new/lib/model/ordinates.dart
Normal file
259
manager_api_new/lib/model/ordinates.dart
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
//
|
||||||
|
// 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 = None 1 = X 1 = Spatial1 2 = Y 2 = Spatial2 3 = XY 4 = Z 4 = Spatial3 7 = XYZ 8 = Spatial4 16 = Spatial5 32 = Spatial6 64 = Spatial7 128 = Spatial8 256 = Spatial9 512 = Spatial10 1024 = Spatial11 2048 = Spatial12 4096 = Spatial13 8192 = Spatial14 16384 = Spatial15 32768 = Spatial16 65535 = AllSpatialOrdinates 65536 = M 65536 = Measure1 65539 = XYM 65543 = XYZM 131072 = Measure2 262144 = Measure3 524288 = Measure4 1048576 = Measure5 2097152 = Measure6 4194304 = Measure7 8388608 = Measure8 16777216 = Measure9 33554432 = Measure10 67108864 = Measure11 134217728 = Measure12 268435456 = Measure13 536870912 = Measure14 1073741824 = Measure15 -2147483648 = Measure16 -65536 = AllMeasureOrdinates -1 = AllOrdinates
|
||||||
|
class Ordinates {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const Ordinates._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number0 = Ordinates._(0);
|
||||||
|
static const number1 = Ordinates._(1);
|
||||||
|
static const number12 = Ordinates._(1);
|
||||||
|
static const number2 = Ordinates._(2);
|
||||||
|
static const number22 = Ordinates._(2);
|
||||||
|
static const number3 = Ordinates._(3);
|
||||||
|
static const number4 = Ordinates._(4);
|
||||||
|
static const number42 = Ordinates._(4);
|
||||||
|
static const number7 = Ordinates._(7);
|
||||||
|
static const number8 = Ordinates._(8);
|
||||||
|
static const number16 = Ordinates._(16);
|
||||||
|
static const number32 = Ordinates._(32);
|
||||||
|
static const number64 = Ordinates._(64);
|
||||||
|
static const number128 = Ordinates._(128);
|
||||||
|
static const number256 = Ordinates._(256);
|
||||||
|
static const number512 = Ordinates._(512);
|
||||||
|
static const number1024 = Ordinates._(1024);
|
||||||
|
static const number2048 = Ordinates._(2048);
|
||||||
|
static const number4096 = Ordinates._(4096);
|
||||||
|
static const number8192 = Ordinates._(8192);
|
||||||
|
static const number16384 = Ordinates._(16384);
|
||||||
|
static const number32768 = Ordinates._(32768);
|
||||||
|
static const number65535 = Ordinates._(65535);
|
||||||
|
static const number65536 = Ordinates._(65536);
|
||||||
|
static const number655362 = Ordinates._(65536);
|
||||||
|
static const number65539 = Ordinates._(65539);
|
||||||
|
static const number65543 = Ordinates._(65543);
|
||||||
|
static const number131072 = Ordinates._(131072);
|
||||||
|
static const number262144 = Ordinates._(262144);
|
||||||
|
static const number524288 = Ordinates._(524288);
|
||||||
|
static const number1048576 = Ordinates._(1048576);
|
||||||
|
static const number2097152 = Ordinates._(2097152);
|
||||||
|
static const number4194304 = Ordinates._(4194304);
|
||||||
|
static const number8388608 = Ordinates._(8388608);
|
||||||
|
static const number16777216 = Ordinates._(16777216);
|
||||||
|
static const number33554432 = Ordinates._(33554432);
|
||||||
|
static const number67108864 = Ordinates._(67108864);
|
||||||
|
static const number134217728 = Ordinates._(134217728);
|
||||||
|
static const number268435456 = Ordinates._(268435456);
|
||||||
|
static const number536870912 = Ordinates._(536870912);
|
||||||
|
static const number1073741824 = Ordinates._(1073741824);
|
||||||
|
static const numberNegative2147483648 = Ordinates._(-2147483648);
|
||||||
|
static const numberNegative65536 = Ordinates._(-65536);
|
||||||
|
static const numberNegative1 = Ordinates._(-1);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][Ordinates].
|
||||||
|
static const values = <Ordinates>[
|
||||||
|
number0,
|
||||||
|
number1,
|
||||||
|
number12,
|
||||||
|
number2,
|
||||||
|
number22,
|
||||||
|
number3,
|
||||||
|
number4,
|
||||||
|
number42,
|
||||||
|
number7,
|
||||||
|
number8,
|
||||||
|
number16,
|
||||||
|
number32,
|
||||||
|
number64,
|
||||||
|
number128,
|
||||||
|
number256,
|
||||||
|
number512,
|
||||||
|
number1024,
|
||||||
|
number2048,
|
||||||
|
number4096,
|
||||||
|
number8192,
|
||||||
|
number16384,
|
||||||
|
number32768,
|
||||||
|
number65535,
|
||||||
|
number65536,
|
||||||
|
number655362,
|
||||||
|
number65539,
|
||||||
|
number65543,
|
||||||
|
number131072,
|
||||||
|
number262144,
|
||||||
|
number524288,
|
||||||
|
number1048576,
|
||||||
|
number2097152,
|
||||||
|
number4194304,
|
||||||
|
number8388608,
|
||||||
|
number16777216,
|
||||||
|
number33554432,
|
||||||
|
number67108864,
|
||||||
|
number134217728,
|
||||||
|
number268435456,
|
||||||
|
number536870912,
|
||||||
|
number1073741824,
|
||||||
|
numberNegative2147483648,
|
||||||
|
numberNegative65536,
|
||||||
|
numberNegative1,
|
||||||
|
];
|
||||||
|
|
||||||
|
static Ordinates? fromJson(dynamic value) =>
|
||||||
|
OrdinatesTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<Ordinates> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <Ordinates>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = Ordinates.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [Ordinates] to int,
|
||||||
|
/// and [decode] dynamic data back to [Ordinates].
|
||||||
|
class OrdinatesTypeTransformer {
|
||||||
|
factory OrdinatesTypeTransformer() =>
|
||||||
|
_instance ??= const OrdinatesTypeTransformer._();
|
||||||
|
|
||||||
|
const OrdinatesTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(Ordinates data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a Ordinates.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
Ordinates? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 0:
|
||||||
|
return Ordinates.number0;
|
||||||
|
case 1:
|
||||||
|
return Ordinates.number1;
|
||||||
|
case 1:
|
||||||
|
return Ordinates.number12;
|
||||||
|
case 2:
|
||||||
|
return Ordinates.number2;
|
||||||
|
case 2:
|
||||||
|
return Ordinates.number22;
|
||||||
|
case 3:
|
||||||
|
return Ordinates.number3;
|
||||||
|
case 4:
|
||||||
|
return Ordinates.number4;
|
||||||
|
case 4:
|
||||||
|
return Ordinates.number42;
|
||||||
|
case 7:
|
||||||
|
return Ordinates.number7;
|
||||||
|
case 8:
|
||||||
|
return Ordinates.number8;
|
||||||
|
case 16:
|
||||||
|
return Ordinates.number16;
|
||||||
|
case 32:
|
||||||
|
return Ordinates.number32;
|
||||||
|
case 64:
|
||||||
|
return Ordinates.number64;
|
||||||
|
case 128:
|
||||||
|
return Ordinates.number128;
|
||||||
|
case 256:
|
||||||
|
return Ordinates.number256;
|
||||||
|
case 512:
|
||||||
|
return Ordinates.number512;
|
||||||
|
case 1024:
|
||||||
|
return Ordinates.number1024;
|
||||||
|
case 2048:
|
||||||
|
return Ordinates.number2048;
|
||||||
|
case 4096:
|
||||||
|
return Ordinates.number4096;
|
||||||
|
case 8192:
|
||||||
|
return Ordinates.number8192;
|
||||||
|
case 16384:
|
||||||
|
return Ordinates.number16384;
|
||||||
|
case 32768:
|
||||||
|
return Ordinates.number32768;
|
||||||
|
case 65535:
|
||||||
|
return Ordinates.number65535;
|
||||||
|
case 65536:
|
||||||
|
return Ordinates.number65536;
|
||||||
|
case 65536:
|
||||||
|
return Ordinates.number655362;
|
||||||
|
case 65539:
|
||||||
|
return Ordinates.number65539;
|
||||||
|
case 65543:
|
||||||
|
return Ordinates.number65543;
|
||||||
|
case 131072:
|
||||||
|
return Ordinates.number131072;
|
||||||
|
case 262144:
|
||||||
|
return Ordinates.number262144;
|
||||||
|
case 524288:
|
||||||
|
return Ordinates.number524288;
|
||||||
|
case 1048576:
|
||||||
|
return Ordinates.number1048576;
|
||||||
|
case 2097152:
|
||||||
|
return Ordinates.number2097152;
|
||||||
|
case 4194304:
|
||||||
|
return Ordinates.number4194304;
|
||||||
|
case 8388608:
|
||||||
|
return Ordinates.number8388608;
|
||||||
|
case 16777216:
|
||||||
|
return Ordinates.number16777216;
|
||||||
|
case 33554432:
|
||||||
|
return Ordinates.number33554432;
|
||||||
|
case 67108864:
|
||||||
|
return Ordinates.number67108864;
|
||||||
|
case 134217728:
|
||||||
|
return Ordinates.number134217728;
|
||||||
|
case 268435456:
|
||||||
|
return Ordinates.number268435456;
|
||||||
|
case 536870912:
|
||||||
|
return Ordinates.number536870912;
|
||||||
|
case 1073741824:
|
||||||
|
return Ordinates.number1073741824;
|
||||||
|
case -2147483648:
|
||||||
|
return Ordinates.numberNegative2147483648;
|
||||||
|
case -65536:
|
||||||
|
return Ordinates.numberNegative65536;
|
||||||
|
case -1:
|
||||||
|
return Ordinates.numberNegative1;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [OrdinatesTypeTransformer] instance.
|
||||||
|
static OrdinatesTypeTransformer? _instance;
|
||||||
|
}
|
||||||
@ -1,136 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class PDFFileDTO {
|
|
||||||
/// Returns a new [PDFFileDTO] instance.
|
|
||||||
PDFFileDTO({
|
|
||||||
this.pdfFilesAndTitles = const [],
|
|
||||||
this.order,
|
|
||||||
});
|
|
||||||
|
|
||||||
List<TranslationAndResourceDTO>? pdfFilesAndTitles;
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is PDFFileDTO &&
|
|
||||||
other.pdfFilesAndTitles == pdfFilesAndTitles &&
|
|
||||||
other.order == order;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) +
|
|
||||||
(order == null ? 0 : order!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.pdfFilesAndTitles != null) {
|
|
||||||
json[r'pdfFilesAndTitles'] = this.pdfFilesAndTitles;
|
|
||||||
} else {
|
|
||||||
json[r'pdfFilesAndTitles'] = null;
|
|
||||||
}
|
|
||||||
if (this.order != null) {
|
|
||||||
json[r'order'] = this.order;
|
|
||||||
} else {
|
|
||||||
json[r'order'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [PDFFileDTO] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static PDFFileDTO? 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 "PDFFileDTO[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "PDFFileDTO[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return PDFFileDTO(
|
|
||||||
pdfFilesAndTitles:
|
|
||||||
TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']),
|
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<PDFFileDTO> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <PDFFileDTO>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = PDFFileDTO.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, PDFFileDTO> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, PDFFileDTO>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = PDFFileDTO.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of PDFFileDTO-objects as value to a dart map
|
|
||||||
static Map<String, List<PDFFileDTO>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<PDFFileDTO>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = PDFFileDTO.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
531
manager_api_new/lib/model/point.dart
Normal file
531
manager_api_new/lib/model/point.dart
Normal file
@ -0,0 +1,531 @@
|
|||||||
|
//
|
||||||
|
// 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 Point {
|
||||||
|
/// Returns a new [Point] instance.
|
||||||
|
Point({
|
||||||
|
this.factory_,
|
||||||
|
this.userData,
|
||||||
|
this.srid,
|
||||||
|
this.precisionModel,
|
||||||
|
this.numGeometries,
|
||||||
|
this.isSimple,
|
||||||
|
this.isValid,
|
||||||
|
this.area,
|
||||||
|
this.length,
|
||||||
|
this.centroid,
|
||||||
|
this.interiorPoint,
|
||||||
|
this.pointOnSurface,
|
||||||
|
this.envelope,
|
||||||
|
this.envelopeInternal,
|
||||||
|
this.isRectangle,
|
||||||
|
this.coordinateSequence,
|
||||||
|
this.coordinates = const [],
|
||||||
|
this.numPoints,
|
||||||
|
this.isEmpty,
|
||||||
|
this.dimension,
|
||||||
|
this.boundaryDimension,
|
||||||
|
this.x,
|
||||||
|
this.y,
|
||||||
|
this.coordinate,
|
||||||
|
this.geometryType,
|
||||||
|
this.ogcGeometryType,
|
||||||
|
this.boundary,
|
||||||
|
this.z,
|
||||||
|
this.m,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryFactory? factory_;
|
||||||
|
|
||||||
|
Object? userData;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numGeometries;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isSimple;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? length;
|
||||||
|
|
||||||
|
GeometryCentroid? centroid;
|
||||||
|
|
||||||
|
GeometryCentroid? interiorPoint;
|
||||||
|
|
||||||
|
GeometryCentroid? pointOnSurface;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? envelope;
|
||||||
|
|
||||||
|
GeometryEnvelopeInternal? envelopeInternal;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isRectangle;
|
||||||
|
|
||||||
|
PointAllOfCoordinateSequence? coordinateSequence;
|
||||||
|
|
||||||
|
List<Coordinate>? coordinates;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numPoints;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isEmpty;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Dimension? dimension;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Dimension? boundaryDimension;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? x;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? y;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? coordinate;
|
||||||
|
|
||||||
|
String? geometryType;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
OgcGeometryType? ogcGeometryType;
|
||||||
|
|
||||||
|
PointAllOfBoundary? boundary;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? z;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? m;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is Point &&
|
||||||
|
other.factory_ == factory_ &&
|
||||||
|
other.userData == userData &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.numGeometries == numGeometries &&
|
||||||
|
other.isSimple == isSimple &&
|
||||||
|
other.isValid == isValid &&
|
||||||
|
other.area == area &&
|
||||||
|
other.length == length &&
|
||||||
|
other.centroid == centroid &&
|
||||||
|
other.interiorPoint == interiorPoint &&
|
||||||
|
other.pointOnSurface == pointOnSurface &&
|
||||||
|
other.envelope == envelope &&
|
||||||
|
other.envelopeInternal == envelopeInternal &&
|
||||||
|
other.isRectangle == isRectangle &&
|
||||||
|
other.coordinateSequence == coordinateSequence &&
|
||||||
|
_deepEquality.equals(other.coordinates, coordinates) &&
|
||||||
|
other.numPoints == numPoints &&
|
||||||
|
other.isEmpty == isEmpty &&
|
||||||
|
other.dimension == dimension &&
|
||||||
|
other.boundaryDimension == boundaryDimension &&
|
||||||
|
other.x == x &&
|
||||||
|
other.y == y &&
|
||||||
|
other.coordinate == coordinate &&
|
||||||
|
other.geometryType == geometryType &&
|
||||||
|
other.ogcGeometryType == ogcGeometryType &&
|
||||||
|
other.boundary == boundary &&
|
||||||
|
other.z == z &&
|
||||||
|
other.m == m;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
||||||
|
(userData == null ? 0 : userData!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
||||||
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(length == null ? 0 : length!.hashCode) +
|
||||||
|
(centroid == null ? 0 : centroid!.hashCode) +
|
||||||
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
||||||
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
||||||
|
(envelope == null ? 0 : envelope!.hashCode) +
|
||||||
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
||||||
|
(isRectangle == null ? 0 : isRectangle!.hashCode) +
|
||||||
|
(coordinateSequence == null ? 0 : coordinateSequence!.hashCode) +
|
||||||
|
(coordinates == null ? 0 : coordinates!.hashCode) +
|
||||||
|
(numPoints == null ? 0 : numPoints!.hashCode) +
|
||||||
|
(isEmpty == null ? 0 : isEmpty!.hashCode) +
|
||||||
|
(dimension == null ? 0 : dimension!.hashCode) +
|
||||||
|
(boundaryDimension == null ? 0 : boundaryDimension!.hashCode) +
|
||||||
|
(x == null ? 0 : x!.hashCode) +
|
||||||
|
(y == null ? 0 : y!.hashCode) +
|
||||||
|
(coordinate == null ? 0 : coordinate!.hashCode) +
|
||||||
|
(geometryType == null ? 0 : geometryType!.hashCode) +
|
||||||
|
(ogcGeometryType == null ? 0 : ogcGeometryType!.hashCode) +
|
||||||
|
(boundary == null ? 0 : boundary!.hashCode) +
|
||||||
|
(z == null ? 0 : z!.hashCode) +
|
||||||
|
(m == null ? 0 : m!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'Point[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle, coordinateSequence=$coordinateSequence, coordinates=$coordinates, numPoints=$numPoints, isEmpty=$isEmpty, dimension=$dimension, boundaryDimension=$boundaryDimension, x=$x, y=$y, coordinate=$coordinate, geometryType=$geometryType, ogcGeometryType=$ogcGeometryType, boundary=$boundary, z=$z, m=$m]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.factory_ != null) {
|
||||||
|
json[r'factory'] = this.factory_;
|
||||||
|
} else {
|
||||||
|
json[r'factory'] = null;
|
||||||
|
}
|
||||||
|
if (this.userData != null) {
|
||||||
|
json[r'userData'] = this.userData;
|
||||||
|
} else {
|
||||||
|
json[r'userData'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.numGeometries != null) {
|
||||||
|
json[r'numGeometries'] = this.numGeometries;
|
||||||
|
} else {
|
||||||
|
json[r'numGeometries'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSimple != null) {
|
||||||
|
json[r'isSimple'] = this.isSimple;
|
||||||
|
} else {
|
||||||
|
json[r'isSimple'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.length != null) {
|
||||||
|
json[r'length'] = this.length;
|
||||||
|
} else {
|
||||||
|
json[r'length'] = null;
|
||||||
|
}
|
||||||
|
if (this.centroid != null) {
|
||||||
|
json[r'centroid'] = this.centroid;
|
||||||
|
} else {
|
||||||
|
json[r'centroid'] = null;
|
||||||
|
}
|
||||||
|
if (this.interiorPoint != null) {
|
||||||
|
json[r'interiorPoint'] = this.interiorPoint;
|
||||||
|
} else {
|
||||||
|
json[r'interiorPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.pointOnSurface != null) {
|
||||||
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
||||||
|
} else {
|
||||||
|
json[r'pointOnSurface'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelope != null) {
|
||||||
|
json[r'envelope'] = this.envelope;
|
||||||
|
} else {
|
||||||
|
json[r'envelope'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelopeInternal != null) {
|
||||||
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
||||||
|
} else {
|
||||||
|
json[r'envelopeInternal'] = null;
|
||||||
|
}
|
||||||
|
if (this.isRectangle != null) {
|
||||||
|
json[r'isRectangle'] = this.isRectangle;
|
||||||
|
} else {
|
||||||
|
json[r'isRectangle'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateSequence != null) {
|
||||||
|
json[r'coordinateSequence'] = this.coordinateSequence;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateSequence'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinates != null) {
|
||||||
|
json[r'coordinates'] = this.coordinates;
|
||||||
|
} else {
|
||||||
|
json[r'coordinates'] = null;
|
||||||
|
}
|
||||||
|
if (this.numPoints != null) {
|
||||||
|
json[r'numPoints'] = this.numPoints;
|
||||||
|
} else {
|
||||||
|
json[r'numPoints'] = null;
|
||||||
|
}
|
||||||
|
if (this.isEmpty != null) {
|
||||||
|
json[r'isEmpty'] = this.isEmpty;
|
||||||
|
} else {
|
||||||
|
json[r'isEmpty'] = null;
|
||||||
|
}
|
||||||
|
if (this.dimension != null) {
|
||||||
|
json[r'dimension'] = this.dimension;
|
||||||
|
} else {
|
||||||
|
json[r'dimension'] = null;
|
||||||
|
}
|
||||||
|
if (this.boundaryDimension != null) {
|
||||||
|
json[r'boundaryDimension'] = this.boundaryDimension;
|
||||||
|
} else {
|
||||||
|
json[r'boundaryDimension'] = null;
|
||||||
|
}
|
||||||
|
if (this.x != null) {
|
||||||
|
json[r'x'] = this.x;
|
||||||
|
} else {
|
||||||
|
json[r'x'] = null;
|
||||||
|
}
|
||||||
|
if (this.y != null) {
|
||||||
|
json[r'y'] = this.y;
|
||||||
|
} else {
|
||||||
|
json[r'y'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinate != null) {
|
||||||
|
json[r'coordinate'] = this.coordinate;
|
||||||
|
} else {
|
||||||
|
json[r'coordinate'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometryType != null) {
|
||||||
|
json[r'geometryType'] = this.geometryType;
|
||||||
|
} else {
|
||||||
|
json[r'geometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.ogcGeometryType != null) {
|
||||||
|
json[r'ogcGeometryType'] = this.ogcGeometryType;
|
||||||
|
} else {
|
||||||
|
json[r'ogcGeometryType'] = null;
|
||||||
|
}
|
||||||
|
if (this.boundary != null) {
|
||||||
|
json[r'boundary'] = this.boundary;
|
||||||
|
} else {
|
||||||
|
json[r'boundary'] = null;
|
||||||
|
}
|
||||||
|
if (this.z != null) {
|
||||||
|
json[r'z'] = this.z;
|
||||||
|
} else {
|
||||||
|
json[r'z'] = null;
|
||||||
|
}
|
||||||
|
if (this.m != null) {
|
||||||
|
json[r'm'] = this.m;
|
||||||
|
} else {
|
||||||
|
json[r'm'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [Point] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static Point? 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 "Point[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "Point[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return Point(
|
||||||
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
||||||
|
userData: mapValueOfType<Object>(json, r'userData'),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
||||||
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
length: mapValueOfType<double>(json, r'length'),
|
||||||
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
||||||
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
||||||
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
||||||
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
||||||
|
envelopeInternal:
|
||||||
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
||||||
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
||||||
|
coordinateSequence:
|
||||||
|
PointAllOfCoordinateSequence.fromJson(json[r'coordinateSequence']),
|
||||||
|
coordinates: Coordinate.listFromJson(json[r'coordinates']),
|
||||||
|
numPoints: mapValueOfType<int>(json, r'numPoints'),
|
||||||
|
isEmpty: mapValueOfType<bool>(json, r'isEmpty'),
|
||||||
|
dimension: Dimension.fromJson(json[r'dimension']),
|
||||||
|
boundaryDimension: Dimension.fromJson(json[r'boundaryDimension']),
|
||||||
|
x: mapValueOfType<double>(json, r'x'),
|
||||||
|
y: mapValueOfType<double>(json, r'y'),
|
||||||
|
coordinate: PointAllOfCoordinate.fromJson(json[r'coordinate']),
|
||||||
|
geometryType: mapValueOfType<String>(json, r'geometryType'),
|
||||||
|
ogcGeometryType: OgcGeometryType.fromJson(json[r'ogcGeometryType']),
|
||||||
|
boundary: PointAllOfBoundary.fromJson(json[r'boundary']),
|
||||||
|
z: mapValueOfType<double>(json, r'z'),
|
||||||
|
m: mapValueOfType<double>(json, r'm'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Point> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <Point>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = Point.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, Point> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, Point>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = Point.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of Point-objects as value to a dart map
|
||||||
|
static Map<String, List<Point>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<Point>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = Point.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
322
manager_api_new/lib/model/point_all_of_boundary.dart
Normal file
322
manager_api_new/lib/model/point_all_of_boundary.dart
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
//
|
||||||
|
// 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 PointAllOfBoundary {
|
||||||
|
/// Returns a new [PointAllOfBoundary] instance.
|
||||||
|
PointAllOfBoundary({
|
||||||
|
this.factory_,
|
||||||
|
this.userData,
|
||||||
|
this.srid,
|
||||||
|
this.precisionModel,
|
||||||
|
this.numGeometries,
|
||||||
|
this.isSimple,
|
||||||
|
this.isValid,
|
||||||
|
this.area,
|
||||||
|
this.length,
|
||||||
|
this.centroid,
|
||||||
|
this.interiorPoint,
|
||||||
|
this.pointOnSurface,
|
||||||
|
this.envelope,
|
||||||
|
this.envelopeInternal,
|
||||||
|
this.isRectangle,
|
||||||
|
});
|
||||||
|
|
||||||
|
GeometryFactory? factory_;
|
||||||
|
|
||||||
|
Object? userData;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? srid;
|
||||||
|
|
||||||
|
GeometryPrecisionModel? precisionModel;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? numGeometries;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isSimple;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? area;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? length;
|
||||||
|
|
||||||
|
GeometryCentroid? centroid;
|
||||||
|
|
||||||
|
GeometryCentroid? interiorPoint;
|
||||||
|
|
||||||
|
GeometryCentroid? pointOnSurface;
|
||||||
|
|
||||||
|
MapAnnotationGeometry? envelope;
|
||||||
|
|
||||||
|
GeometryEnvelopeInternal? envelopeInternal;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PointAllOfBoundary &&
|
||||||
|
other.factory_ == factory_ &&
|
||||||
|
other.userData == userData &&
|
||||||
|
other.srid == srid &&
|
||||||
|
other.precisionModel == precisionModel &&
|
||||||
|
other.numGeometries == numGeometries &&
|
||||||
|
other.isSimple == isSimple &&
|
||||||
|
other.isValid == isValid &&
|
||||||
|
other.area == area &&
|
||||||
|
other.length == length &&
|
||||||
|
other.centroid == centroid &&
|
||||||
|
other.interiorPoint == interiorPoint &&
|
||||||
|
other.pointOnSurface == pointOnSurface &&
|
||||||
|
other.envelope == envelope &&
|
||||||
|
other.envelopeInternal == envelopeInternal &&
|
||||||
|
other.isRectangle == isRectangle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
||||||
|
(userData == null ? 0 : userData!.hashCode) +
|
||||||
|
(srid == null ? 0 : srid!.hashCode) +
|
||||||
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
||||||
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
||||||
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode) +
|
||||||
|
(area == null ? 0 : area!.hashCode) +
|
||||||
|
(length == null ? 0 : length!.hashCode) +
|
||||||
|
(centroid == null ? 0 : centroid!.hashCode) +
|
||||||
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
||||||
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
||||||
|
(envelope == null ? 0 : envelope!.hashCode) +
|
||||||
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
||||||
|
(isRectangle == null ? 0 : isRectangle!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'PointAllOfBoundary[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.factory_ != null) {
|
||||||
|
json[r'factory'] = this.factory_;
|
||||||
|
} else {
|
||||||
|
json[r'factory'] = null;
|
||||||
|
}
|
||||||
|
if (this.userData != null) {
|
||||||
|
json[r'userData'] = this.userData;
|
||||||
|
} else {
|
||||||
|
json[r'userData'] = null;
|
||||||
|
}
|
||||||
|
if (this.srid != null) {
|
||||||
|
json[r'srid'] = this.srid;
|
||||||
|
} else {
|
||||||
|
json[r'srid'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModel != null) {
|
||||||
|
json[r'precisionModel'] = this.precisionModel;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModel'] = null;
|
||||||
|
}
|
||||||
|
if (this.numGeometries != null) {
|
||||||
|
json[r'numGeometries'] = this.numGeometries;
|
||||||
|
} else {
|
||||||
|
json[r'numGeometries'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSimple != null) {
|
||||||
|
json[r'isSimple'] = this.isSimple;
|
||||||
|
} else {
|
||||||
|
json[r'isSimple'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
if (this.area != null) {
|
||||||
|
json[r'area'] = this.area;
|
||||||
|
} else {
|
||||||
|
json[r'area'] = null;
|
||||||
|
}
|
||||||
|
if (this.length != null) {
|
||||||
|
json[r'length'] = this.length;
|
||||||
|
} else {
|
||||||
|
json[r'length'] = null;
|
||||||
|
}
|
||||||
|
if (this.centroid != null) {
|
||||||
|
json[r'centroid'] = this.centroid;
|
||||||
|
} else {
|
||||||
|
json[r'centroid'] = null;
|
||||||
|
}
|
||||||
|
if (this.interiorPoint != null) {
|
||||||
|
json[r'interiorPoint'] = this.interiorPoint;
|
||||||
|
} else {
|
||||||
|
json[r'interiorPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.pointOnSurface != null) {
|
||||||
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
||||||
|
} else {
|
||||||
|
json[r'pointOnSurface'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelope != null) {
|
||||||
|
json[r'envelope'] = this.envelope;
|
||||||
|
} else {
|
||||||
|
json[r'envelope'] = null;
|
||||||
|
}
|
||||||
|
if (this.envelopeInternal != null) {
|
||||||
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
||||||
|
} else {
|
||||||
|
json[r'envelopeInternal'] = null;
|
||||||
|
}
|
||||||
|
if (this.isRectangle != null) {
|
||||||
|
json[r'isRectangle'] = this.isRectangle;
|
||||||
|
} else {
|
||||||
|
json[r'isRectangle'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PointAllOfBoundary] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PointAllOfBoundary? 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 "PointAllOfBoundary[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "PointAllOfBoundary[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PointAllOfBoundary(
|
||||||
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
||||||
|
userData: mapValueOfType<Object>(json, r'userData'),
|
||||||
|
srid: mapValueOfType<int>(json, r'srid'),
|
||||||
|
precisionModel:
|
||||||
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
||||||
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
||||||
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
area: mapValueOfType<double>(json, r'area'),
|
||||||
|
length: mapValueOfType<double>(json, r'length'),
|
||||||
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
||||||
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
||||||
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
||||||
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
||||||
|
envelopeInternal:
|
||||||
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
||||||
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PointAllOfBoundary> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <PointAllOfBoundary>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PointAllOfBoundary.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PointAllOfBoundary> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PointAllOfBoundary>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PointAllOfBoundary.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PointAllOfBoundary-objects as value to a dart map
|
||||||
|
static Map<String, List<PointAllOfBoundary>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<PointAllOfBoundary>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PointAllOfBoundary.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
210
manager_api_new/lib/model/point_all_of_coordinate.dart
Normal file
210
manager_api_new/lib/model/point_all_of_coordinate.dart
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
//
|
||||||
|
// 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 PointAllOfCoordinate {
|
||||||
|
/// Returns a new [PointAllOfCoordinate] instance.
|
||||||
|
PointAllOfCoordinate({
|
||||||
|
this.x,
|
||||||
|
this.y,
|
||||||
|
this.z,
|
||||||
|
this.m,
|
||||||
|
this.coordinateValue,
|
||||||
|
this.isValid,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? x;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? y;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? z;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? m;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? coordinateValue;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isValid;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PointAllOfCoordinate &&
|
||||||
|
other.x == x &&
|
||||||
|
other.y == y &&
|
||||||
|
other.z == z &&
|
||||||
|
other.m == m &&
|
||||||
|
other.coordinateValue == coordinateValue &&
|
||||||
|
other.isValid == isValid;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(x == null ? 0 : x!.hashCode) +
|
||||||
|
(y == null ? 0 : y!.hashCode) +
|
||||||
|
(z == null ? 0 : z!.hashCode) +
|
||||||
|
(m == null ? 0 : m!.hashCode) +
|
||||||
|
(coordinateValue == null ? 0 : coordinateValue!.hashCode) +
|
||||||
|
(isValid == null ? 0 : isValid!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'PointAllOfCoordinate[x=$x, y=$y, z=$z, m=$m, coordinateValue=$coordinateValue, isValid=$isValid]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.x != null) {
|
||||||
|
json[r'x'] = this.x;
|
||||||
|
} else {
|
||||||
|
json[r'x'] = null;
|
||||||
|
}
|
||||||
|
if (this.y != null) {
|
||||||
|
json[r'y'] = this.y;
|
||||||
|
} else {
|
||||||
|
json[r'y'] = null;
|
||||||
|
}
|
||||||
|
if (this.z != null) {
|
||||||
|
json[r'z'] = this.z;
|
||||||
|
} else {
|
||||||
|
json[r'z'] = null;
|
||||||
|
}
|
||||||
|
if (this.m != null) {
|
||||||
|
json[r'm'] = this.m;
|
||||||
|
} else {
|
||||||
|
json[r'm'] = null;
|
||||||
|
}
|
||||||
|
if (this.coordinateValue != null) {
|
||||||
|
json[r'coordinateValue'] = this.coordinateValue;
|
||||||
|
} else {
|
||||||
|
json[r'coordinateValue'] = null;
|
||||||
|
}
|
||||||
|
if (this.isValid != null) {
|
||||||
|
json[r'isValid'] = this.isValid;
|
||||||
|
} else {
|
||||||
|
json[r'isValid'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PointAllOfCoordinate] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PointAllOfCoordinate? 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 "PointAllOfCoordinate[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "PointAllOfCoordinate[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PointAllOfCoordinate(
|
||||||
|
x: mapValueOfType<double>(json, r'x'),
|
||||||
|
y: mapValueOfType<double>(json, r'y'),
|
||||||
|
z: mapValueOfType<double>(json, r'z'),
|
||||||
|
m: mapValueOfType<double>(json, r'm'),
|
||||||
|
coordinateValue:
|
||||||
|
PointAllOfCoordinate.fromJson(json[r'coordinateValue']),
|
||||||
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PointAllOfCoordinate> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <PointAllOfCoordinate>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PointAllOfCoordinate.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PointAllOfCoordinate> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PointAllOfCoordinate>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PointAllOfCoordinate.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PointAllOfCoordinate-objects as value to a dart map
|
||||||
|
static Map<String, List<PointAllOfCoordinate>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<PointAllOfCoordinate>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PointAllOfCoordinate.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
288
manager_api_new/lib/model/point_all_of_coordinate_sequence.dart
Normal file
288
manager_api_new/lib/model/point_all_of_coordinate_sequence.dart
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
//
|
||||||
|
// 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 PointAllOfCoordinateSequence {
|
||||||
|
/// Returns a new [PointAllOfCoordinateSequence] instance.
|
||||||
|
PointAllOfCoordinateSequence({
|
||||||
|
this.dimension,
|
||||||
|
this.measures,
|
||||||
|
this.spatial,
|
||||||
|
this.ordinates,
|
||||||
|
this.hasZ,
|
||||||
|
this.hasM,
|
||||||
|
this.zOrdinateIndex,
|
||||||
|
this.mOrdinateIndex,
|
||||||
|
this.first,
|
||||||
|
this.last,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? dimension;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? measures;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? spatial;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
Ordinates? ordinates;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? hasZ;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? hasM;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? zOrdinateIndex;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? mOrdinateIndex;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? first;
|
||||||
|
|
||||||
|
PointAllOfCoordinate? last;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? count;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PointAllOfCoordinateSequence &&
|
||||||
|
other.dimension == dimension &&
|
||||||
|
other.measures == measures &&
|
||||||
|
other.spatial == spatial &&
|
||||||
|
other.ordinates == ordinates &&
|
||||||
|
other.hasZ == hasZ &&
|
||||||
|
other.hasM == hasM &&
|
||||||
|
other.zOrdinateIndex == zOrdinateIndex &&
|
||||||
|
other.mOrdinateIndex == mOrdinateIndex &&
|
||||||
|
other.first == first &&
|
||||||
|
other.last == last &&
|
||||||
|
other.count == count;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(dimension == null ? 0 : dimension!.hashCode) +
|
||||||
|
(measures == null ? 0 : measures!.hashCode) +
|
||||||
|
(spatial == null ? 0 : spatial!.hashCode) +
|
||||||
|
(ordinates == null ? 0 : ordinates!.hashCode) +
|
||||||
|
(hasZ == null ? 0 : hasZ!.hashCode) +
|
||||||
|
(hasM == null ? 0 : hasM!.hashCode) +
|
||||||
|
(zOrdinateIndex == null ? 0 : zOrdinateIndex!.hashCode) +
|
||||||
|
(mOrdinateIndex == null ? 0 : mOrdinateIndex!.hashCode) +
|
||||||
|
(first == null ? 0 : first!.hashCode) +
|
||||||
|
(last == null ? 0 : last!.hashCode) +
|
||||||
|
(count == null ? 0 : count!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'PointAllOfCoordinateSequence[dimension=$dimension, measures=$measures, spatial=$spatial, ordinates=$ordinates, hasZ=$hasZ, hasM=$hasM, zOrdinateIndex=$zOrdinateIndex, mOrdinateIndex=$mOrdinateIndex, first=$first, last=$last, count=$count]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.dimension != null) {
|
||||||
|
json[r'dimension'] = this.dimension;
|
||||||
|
} else {
|
||||||
|
json[r'dimension'] = null;
|
||||||
|
}
|
||||||
|
if (this.measures != null) {
|
||||||
|
json[r'measures'] = this.measures;
|
||||||
|
} else {
|
||||||
|
json[r'measures'] = null;
|
||||||
|
}
|
||||||
|
if (this.spatial != null) {
|
||||||
|
json[r'spatial'] = this.spatial;
|
||||||
|
} else {
|
||||||
|
json[r'spatial'] = null;
|
||||||
|
}
|
||||||
|
if (this.ordinates != null) {
|
||||||
|
json[r'ordinates'] = this.ordinates;
|
||||||
|
} else {
|
||||||
|
json[r'ordinates'] = null;
|
||||||
|
}
|
||||||
|
if (this.hasZ != null) {
|
||||||
|
json[r'hasZ'] = this.hasZ;
|
||||||
|
} else {
|
||||||
|
json[r'hasZ'] = null;
|
||||||
|
}
|
||||||
|
if (this.hasM != null) {
|
||||||
|
json[r'hasM'] = this.hasM;
|
||||||
|
} else {
|
||||||
|
json[r'hasM'] = null;
|
||||||
|
}
|
||||||
|
if (this.zOrdinateIndex != null) {
|
||||||
|
json[r'zOrdinateIndex'] = this.zOrdinateIndex;
|
||||||
|
} else {
|
||||||
|
json[r'zOrdinateIndex'] = null;
|
||||||
|
}
|
||||||
|
if (this.mOrdinateIndex != null) {
|
||||||
|
json[r'mOrdinateIndex'] = this.mOrdinateIndex;
|
||||||
|
} else {
|
||||||
|
json[r'mOrdinateIndex'] = null;
|
||||||
|
}
|
||||||
|
if (this.first != null) {
|
||||||
|
json[r'first'] = this.first;
|
||||||
|
} else {
|
||||||
|
json[r'first'] = null;
|
||||||
|
}
|
||||||
|
if (this.last != null) {
|
||||||
|
json[r'last'] = this.last;
|
||||||
|
} else {
|
||||||
|
json[r'last'] = null;
|
||||||
|
}
|
||||||
|
if (this.count != null) {
|
||||||
|
json[r'count'] = this.count;
|
||||||
|
} else {
|
||||||
|
json[r'count'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PointAllOfCoordinateSequence] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PointAllOfCoordinateSequence? 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 "PointAllOfCoordinateSequence[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "PointAllOfCoordinateSequence[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PointAllOfCoordinateSequence(
|
||||||
|
dimension: mapValueOfType<int>(json, r'dimension'),
|
||||||
|
measures: mapValueOfType<int>(json, r'measures'),
|
||||||
|
spatial: mapValueOfType<int>(json, r'spatial'),
|
||||||
|
ordinates: Ordinates.fromJson(json[r'ordinates']),
|
||||||
|
hasZ: mapValueOfType<bool>(json, r'hasZ'),
|
||||||
|
hasM: mapValueOfType<bool>(json, r'hasM'),
|
||||||
|
zOrdinateIndex: mapValueOfType<int>(json, r'zOrdinateIndex'),
|
||||||
|
mOrdinateIndex: mapValueOfType<int>(json, r'mOrdinateIndex'),
|
||||||
|
first: PointAllOfCoordinate.fromJson(json[r'first']),
|
||||||
|
last: PointAllOfCoordinate.fromJson(json[r'last']),
|
||||||
|
count: mapValueOfType<int>(json, r'count'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PointAllOfCoordinateSequence> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <PointAllOfCoordinateSequence>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PointAllOfCoordinateSequence.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PointAllOfCoordinateSequence> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PointAllOfCoordinateSequence>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PointAllOfCoordinateSequence.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PointAllOfCoordinateSequence-objects as value to a dart map
|
||||||
|
static Map<String, List<PointAllOfCoordinateSequence>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<PointAllOfCoordinateSequence>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PointAllOfCoordinateSequence.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
202
manager_api_new/lib/model/precision_model.dart
Normal file
202
manager_api_new/lib/model/precision_model.dart
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
//
|
||||||
|
// 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 PrecisionModel {
|
||||||
|
/// Returns a new [PrecisionModel] instance.
|
||||||
|
PrecisionModel({
|
||||||
|
this.isFloating,
|
||||||
|
this.maximumSignificantDigits,
|
||||||
|
this.scale,
|
||||||
|
this.gridSize,
|
||||||
|
this.precisionModelType,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isFloating;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? maximumSignificantDigits;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? scale;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
double? gridSize;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
///
|
||||||
|
PrecisionModels? precisionModelType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PrecisionModel &&
|
||||||
|
other.isFloating == isFloating &&
|
||||||
|
other.maximumSignificantDigits == maximumSignificantDigits &&
|
||||||
|
other.scale == scale &&
|
||||||
|
other.gridSize == gridSize &&
|
||||||
|
other.precisionModelType == precisionModelType;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(isFloating == null ? 0 : isFloating!.hashCode) +
|
||||||
|
(maximumSignificantDigits == null
|
||||||
|
? 0
|
||||||
|
: maximumSignificantDigits!.hashCode) +
|
||||||
|
(scale == null ? 0 : scale!.hashCode) +
|
||||||
|
(gridSize == null ? 0 : gridSize!.hashCode) +
|
||||||
|
(precisionModelType == null ? 0 : precisionModelType!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'PrecisionModel[isFloating=$isFloating, maximumSignificantDigits=$maximumSignificantDigits, scale=$scale, gridSize=$gridSize, precisionModelType=$precisionModelType]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.isFloating != null) {
|
||||||
|
json[r'isFloating'] = this.isFloating;
|
||||||
|
} else {
|
||||||
|
json[r'isFloating'] = null;
|
||||||
|
}
|
||||||
|
if (this.maximumSignificantDigits != null) {
|
||||||
|
json[r'maximumSignificantDigits'] = this.maximumSignificantDigits;
|
||||||
|
} else {
|
||||||
|
json[r'maximumSignificantDigits'] = null;
|
||||||
|
}
|
||||||
|
if (this.scale != null) {
|
||||||
|
json[r'scale'] = this.scale;
|
||||||
|
} else {
|
||||||
|
json[r'scale'] = null;
|
||||||
|
}
|
||||||
|
if (this.gridSize != null) {
|
||||||
|
json[r'gridSize'] = this.gridSize;
|
||||||
|
} else {
|
||||||
|
json[r'gridSize'] = null;
|
||||||
|
}
|
||||||
|
if (this.precisionModelType != null) {
|
||||||
|
json[r'precisionModelType'] = this.precisionModelType;
|
||||||
|
} else {
|
||||||
|
json[r'precisionModelType'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [PrecisionModel] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static PrecisionModel? 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 "PrecisionModel[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "PrecisionModel[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return PrecisionModel(
|
||||||
|
isFloating: mapValueOfType<bool>(json, r'isFloating'),
|
||||||
|
maximumSignificantDigits:
|
||||||
|
mapValueOfType<int>(json, r'maximumSignificantDigits'),
|
||||||
|
scale: mapValueOfType<double>(json, r'scale'),
|
||||||
|
gridSize: mapValueOfType<double>(json, r'gridSize'),
|
||||||
|
precisionModelType:
|
||||||
|
PrecisionModels.fromJson(json[r'precisionModelType']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PrecisionModel> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <PrecisionModel>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PrecisionModel.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, PrecisionModel> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, PrecisionModel>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = PrecisionModel.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of PrecisionModel-objects as value to a dart map
|
||||||
|
static Map<String, List<PrecisionModel>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<PrecisionModel>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = PrecisionModel.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
95
manager_api_new/lib/model/precision_models.dart
Normal file
95
manager_api_new/lib/model/precision_models.dart
Normal 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 = Floating 1 = FloatingSingle 2 = Fixed
|
||||||
|
class PrecisionModels {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const PrecisionModels._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number0 = PrecisionModels._(0);
|
||||||
|
static const number1 = PrecisionModels._(1);
|
||||||
|
static const number2 = PrecisionModels._(2);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][PrecisionModels].
|
||||||
|
static const values = <PrecisionModels>[
|
||||||
|
number0,
|
||||||
|
number1,
|
||||||
|
number2,
|
||||||
|
];
|
||||||
|
|
||||||
|
static PrecisionModels? fromJson(dynamic value) =>
|
||||||
|
PrecisionModelsTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<PrecisionModels> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <PrecisionModels>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = PrecisionModels.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [PrecisionModels] to int,
|
||||||
|
/// and [decode] dynamic data back to [PrecisionModels].
|
||||||
|
class PrecisionModelsTypeTransformer {
|
||||||
|
factory PrecisionModelsTypeTransformer() =>
|
||||||
|
_instance ??= const PrecisionModelsTypeTransformer._();
|
||||||
|
|
||||||
|
const PrecisionModelsTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(PrecisionModels data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a PrecisionModels.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
PrecisionModels? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 0:
|
||||||
|
return PrecisionModels.number0;
|
||||||
|
case 1:
|
||||||
|
return PrecisionModels.number1;
|
||||||
|
case 2:
|
||||||
|
return PrecisionModels.number2;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [PrecisionModelsTypeTransformer] instance.
|
||||||
|
static PrecisionModelsTypeTransformer? _instance;
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
//
|
//
|
||||||
// @dart=2.12
|
// @dart=2.18
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
// ignore_for_file: unused_element, unused_import
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
@ -10,24 +10,30 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class PuzzleDTOImage {
|
class ProgrammeBlock {
|
||||||
/// Returns a new [PuzzleDTOImage] instance.
|
/// Returns a new [ProgrammeBlock] instance.
|
||||||
PuzzleDTOImage({
|
ProgrammeBlock({
|
||||||
|
this.id,
|
||||||
this.title = const [],
|
this.title = const [],
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.resourceId,
|
this.startTime,
|
||||||
this.resourceUrl,
|
this.endTime,
|
||||||
this.order,
|
this.mapAnnotations = const [],
|
||||||
this.resourceType,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
String? resourceId;
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
String? resourceUrl;
|
/// 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? startTime;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
@ -35,43 +41,42 @@ class PuzzleDTOImage {
|
|||||||
/// source code must fall back to having a nullable type.
|
/// source code must fall back to having a nullable type.
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
///
|
///
|
||||||
int? order;
|
DateTime? endTime;
|
||||||
|
|
||||||
///
|
List<MapAnnotation>? mapAnnotations;
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
|
||||||
/// does not include a default value (using the "default:" property), however, the generated
|
|
||||||
/// source code must fall back to having a nullable type.
|
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
|
||||||
///
|
|
||||||
ResourceType? resourceType;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is PuzzleDTOImage &&
|
other is ProgrammeBlock &&
|
||||||
other.title == title &&
|
other.id == id &&
|
||||||
other.description == description &&
|
_deepEquality.equals(other.title, title) &&
|
||||||
other.resourceId == resourceId &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.resourceUrl == resourceUrl &&
|
other.startTime == startTime &&
|
||||||
other.order == order &&
|
other.endTime == endTime &&
|
||||||
other.resourceType == resourceType;
|
_deepEquality.equals(other.mapAnnotations, mapAnnotations);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(title == null ? 0 : title!.hashCode) +
|
(title == null ? 0 : title!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(startTime == null ? 0 : startTime!.hashCode) +
|
||||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
(endTime == null ? 0 : endTime!.hashCode) +
|
||||||
(order == null ? 0 : order!.hashCode) +
|
(mapAnnotations == null ? 0 : mapAnnotations!.hashCode);
|
||||||
(resourceType == null ? 0 : resourceType!.hashCode);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]';
|
'ProgrammeBlock[id=$id, title=$title, description=$description, startTime=$startTime, endTime=$endTime, mapAnnotations=$mapAnnotations]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
if (this.title != null) {
|
if (this.title != null) {
|
||||||
json[r'title'] = this.title;
|
json[r'title'] = this.title;
|
||||||
} else {
|
} else {
|
||||||
@ -82,33 +87,28 @@ class PuzzleDTOImage {
|
|||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
json[r'description'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
if (this.startTime != null) {
|
||||||
json[r'resourceId'] = this.resourceId;
|
json[r'startTime'] = this.startTime!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'startTime'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceUrl != null) {
|
if (this.endTime != null) {
|
||||||
json[r'resourceUrl'] = this.resourceUrl;
|
json[r'endTime'] = this.endTime!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceUrl'] = null;
|
json[r'endTime'] = null;
|
||||||
}
|
}
|
||||||
if (this.order != null) {
|
if (this.mapAnnotations != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'mapAnnotations'] = this.mapAnnotations;
|
||||||
} else {
|
} else {
|
||||||
json[r'order'] = null;
|
json[r'mapAnnotations'] = null;
|
||||||
}
|
|
||||||
if (this.resourceType != null) {
|
|
||||||
json[r'resourceType'] = this.resourceType;
|
|
||||||
} else {
|
|
||||||
json[r'resourceType'] = null;
|
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [PuzzleDTOImage] instance and imports its values from
|
/// Returns a new [ProgrammeBlock] instance and imports its values from
|
||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static PuzzleDTOImage? fromJson(dynamic value) {
|
static ProgrammeBlock? fromJson(dynamic value) {
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
@ -118,33 +118,33 @@ class PuzzleDTOImage {
|
|||||||
assert(() {
|
assert(() {
|
||||||
requiredKeys.forEach((key) {
|
requiredKeys.forEach((key) {
|
||||||
assert(json.containsKey(key),
|
assert(json.containsKey(key),
|
||||||
'Required key "PuzzleDTOImage[$key]" is missing from JSON.');
|
'Required key "ProgrammeBlock[$key]" is missing from JSON.');
|
||||||
assert(json[key] != null,
|
assert(json[key] != null,
|
||||||
'Required key "PuzzleDTOImage[$key]" has a null value in JSON.');
|
'Required key "ProgrammeBlock[$key]" has a null value in JSON.');
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
return PuzzleDTOImage(
|
return ProgrammeBlock(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
startTime: mapDateTime(json, r'startTime', r''),
|
||||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
endTime: mapDateTime(json, r'endTime', r''),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
mapAnnotations: MapAnnotation.listFromJson(json[r'mapAnnotations']),
|
||||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<PuzzleDTOImage> listFromJson(
|
static List<ProgrammeBlock> listFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final result = <PuzzleDTOImage>[];
|
final result = <ProgrammeBlock>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
final value = PuzzleDTOImage.fromJson(row);
|
final value = ProgrammeBlock.fromJson(row);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
result.add(value);
|
result.add(value);
|
||||||
}
|
}
|
||||||
@ -153,12 +153,12 @@ class PuzzleDTOImage {
|
|||||||
return result.toList(growable: growable);
|
return result.toList(growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, PuzzleDTOImage> mapFromJson(dynamic json) {
|
static Map<String, ProgrammeBlock> mapFromJson(dynamic json) {
|
||||||
final map = <String, PuzzleDTOImage>{};
|
final map = <String, ProgrammeBlock>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = PuzzleDTOImage.fromJson(entry.value);
|
final value = ProgrammeBlock.fromJson(entry.value);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
map[entry.key] = value;
|
map[entry.key] = value;
|
||||||
}
|
}
|
||||||
@ -167,17 +167,17 @@ class PuzzleDTOImage {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maps a json object with a list of PuzzleDTOImage-objects as value to a dart map
|
// maps a json object with a list of ProgrammeBlock-objects as value to a dart map
|
||||||
static Map<String, List<PuzzleDTOImage>> mapListFromJson(
|
static Map<String, List<ProgrammeBlock>> mapListFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final map = <String, List<PuzzleDTOImage>>{};
|
final map = <String, List<ProgrammeBlock>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
json = json.cast<String, dynamic>();
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
map[entry.key] = PuzzleDTOImage.listFromJson(
|
map[entry.key] = ProgrammeBlock.listFromJson(
|
||||||
entry.value,
|
entry.value,
|
||||||
growable: growable,
|
growable: growable,
|
||||||
);
|
);
|
||||||
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
//
|
//
|
||||||
// @dart=2.12
|
// @dart=2.18
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
// ignore_for_file: unused_element, unused_import
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
@ -10,57 +10,73 @@
|
|||||||
|
|
||||||
part of openapi.api;
|
part of openapi.api;
|
||||||
|
|
||||||
class ImageDTO {
|
class ProgrammeBlockDTO {
|
||||||
/// Returns a new [ImageDTO] instance.
|
/// Returns a new [ProgrammeBlockDTO] instance.
|
||||||
ImageDTO({
|
ProgrammeBlockDTO({
|
||||||
|
this.id,
|
||||||
this.title = const [],
|
this.title = const [],
|
||||||
this.description = const [],
|
this.description = const [],
|
||||||
this.resourceId,
|
this.startTime,
|
||||||
this.source_,
|
this.endTime,
|
||||||
this.order,
|
this.mapAnnotations = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
List<TranslationDTO>? title;
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
List<TranslationDTO>? description;
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
String? resourceId;
|
|
||||||
|
|
||||||
String? source_;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Please note: This property should have been non-nullable! Since the specification file
|
/// 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
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
/// source code must fall back to having a nullable type.
|
/// source code must fall back to having a nullable type.
|
||||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
///
|
///
|
||||||
int? order;
|
DateTime? startTime;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? endTime;
|
||||||
|
|
||||||
|
List<MapAnnotationDTO>? mapAnnotations;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is ImageDTO &&
|
other is ProgrammeBlockDTO &&
|
||||||
other.title == title &&
|
other.id == id &&
|
||||||
other.description == description &&
|
_deepEquality.equals(other.title, title) &&
|
||||||
other.resourceId == resourceId &&
|
_deepEquality.equals(other.description, description) &&
|
||||||
other.source_ == source_ &&
|
other.startTime == startTime &&
|
||||||
other.order == order;
|
other.endTime == endTime &&
|
||||||
|
_deepEquality.equals(other.mapAnnotations, mapAnnotations);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(title == null ? 0 : title!.hashCode) +
|
(title == null ? 0 : title!.hashCode) +
|
||||||
(description == null ? 0 : description!.hashCode) +
|
(description == null ? 0 : description!.hashCode) +
|
||||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
(startTime == null ? 0 : startTime!.hashCode) +
|
||||||
(source_ == null ? 0 : source_!.hashCode) +
|
(endTime == null ? 0 : endTime!.hashCode) +
|
||||||
(order == null ? 0 : order!.hashCode);
|
(mapAnnotations == null ? 0 : mapAnnotations!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]';
|
'ProgrammeBlockDTO[id=$id, title=$title, description=$description, startTime=$startTime, endTime=$endTime, mapAnnotations=$mapAnnotations]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
if (this.title != null) {
|
if (this.title != null) {
|
||||||
json[r'title'] = this.title;
|
json[r'title'] = this.title;
|
||||||
} else {
|
} else {
|
||||||
@ -71,28 +87,28 @@ class ImageDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'description'] = null;
|
json[r'description'] = null;
|
||||||
}
|
}
|
||||||
if (this.resourceId != null) {
|
if (this.startTime != null) {
|
||||||
json[r'resourceId'] = this.resourceId;
|
json[r'startTime'] = this.startTime!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'resourceId'] = null;
|
json[r'startTime'] = null;
|
||||||
}
|
}
|
||||||
if (this.source_ != null) {
|
if (this.endTime != null) {
|
||||||
json[r'source'] = this.source_;
|
json[r'endTime'] = this.endTime!.toUtc().toIso8601String();
|
||||||
} else {
|
} else {
|
||||||
json[r'source'] = null;
|
json[r'endTime'] = null;
|
||||||
}
|
}
|
||||||
if (this.order != null) {
|
if (this.mapAnnotations != null) {
|
||||||
json[r'order'] = this.order;
|
json[r'mapAnnotations'] = this.mapAnnotations;
|
||||||
} else {
|
} else {
|
||||||
json[r'order'] = null;
|
json[r'mapAnnotations'] = null;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new [ImageDTO] instance and imports its values from
|
/// Returns a new [ProgrammeBlockDTO] instance and imports its values from
|
||||||
/// [value] if it's a [Map], null otherwise.
|
/// [value] if it's a [Map], null otherwise.
|
||||||
// ignore: prefer_constructors_over_static_methods
|
// ignore: prefer_constructors_over_static_methods
|
||||||
static ImageDTO? fromJson(dynamic value) {
|
static ProgrammeBlockDTO? fromJson(dynamic value) {
|
||||||
if (value is Map) {
|
if (value is Map) {
|
||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
@ -102,32 +118,33 @@ class ImageDTO {
|
|||||||
assert(() {
|
assert(() {
|
||||||
requiredKeys.forEach((key) {
|
requiredKeys.forEach((key) {
|
||||||
assert(json.containsKey(key),
|
assert(json.containsKey(key),
|
||||||
'Required key "ImageDTO[$key]" is missing from JSON.');
|
'Required key "ProgrammeBlockDTO[$key]" is missing from JSON.');
|
||||||
assert(json[key] != null,
|
assert(json[key] != null,
|
||||||
'Required key "ImageDTO[$key]" has a null value in JSON.');
|
'Required key "ProgrammeBlockDTO[$key]" has a null value in JSON.');
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
return ImageDTO(
|
return ProgrammeBlockDTO(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
title: TranslationDTO.listFromJson(json[r'title']),
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
description: TranslationDTO.listFromJson(json[r'description']),
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
startTime: mapDateTime(json, r'startTime', r''),
|
||||||
source_: mapValueOfType<String>(json, r'source'),
|
endTime: mapDateTime(json, r'endTime', r''),
|
||||||
order: mapValueOfType<int>(json, r'order'),
|
mapAnnotations: MapAnnotationDTO.listFromJson(json[r'mapAnnotations']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<ImageDTO> listFromJson(
|
static List<ProgrammeBlockDTO> listFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final result = <ImageDTO>[];
|
final result = <ProgrammeBlockDTO>[];
|
||||||
if (json is List && json.isNotEmpty) {
|
if (json is List && json.isNotEmpty) {
|
||||||
for (final row in json) {
|
for (final row in json) {
|
||||||
final value = ImageDTO.fromJson(row);
|
final value = ProgrammeBlockDTO.fromJson(row);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
result.add(value);
|
result.add(value);
|
||||||
}
|
}
|
||||||
@ -136,12 +153,12 @@ class ImageDTO {
|
|||||||
return result.toList(growable: growable);
|
return result.toList(growable: growable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, ImageDTO> mapFromJson(dynamic json) {
|
static Map<String, ProgrammeBlockDTO> mapFromJson(dynamic json) {
|
||||||
final map = <String, ImageDTO>{};
|
final map = <String, ProgrammeBlockDTO>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
final value = ImageDTO.fromJson(entry.value);
|
final value = ProgrammeBlockDTO.fromJson(entry.value);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
map[entry.key] = value;
|
map[entry.key] = value;
|
||||||
}
|
}
|
||||||
@ -150,17 +167,17 @@ class ImageDTO {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maps a json object with a list of ImageDTO-objects as value to a dart map
|
// maps a json object with a list of ProgrammeBlockDTO-objects as value to a dart map
|
||||||
static Map<String, List<ImageDTO>> mapListFromJson(
|
static Map<String, List<ProgrammeBlockDTO>> mapListFromJson(
|
||||||
dynamic json, {
|
dynamic json, {
|
||||||
bool growable = false,
|
bool growable = false,
|
||||||
}) {
|
}) {
|
||||||
final map = <String, List<ImageDTO>>{};
|
final map = <String, List<ProgrammeBlockDTO>>{};
|
||||||
if (json is Map && json.isNotEmpty) {
|
if (json is Map && json.isNotEmpty) {
|
||||||
// ignore: parameter_assignments
|
// ignore: parameter_assignments
|
||||||
json = json.cast<String, dynamic>();
|
json = json.cast<String, dynamic>();
|
||||||
for (final entry in json.entries) {
|
for (final entry in json.entries) {
|
||||||
map[entry.key] = ImageDTO.listFromJson(
|
map[entry.key] = ProgrammeBlockDTO.listFromJson(
|
||||||
entry.value,
|
entry.value,
|
||||||
growable: growable,
|
growable: growable,
|
||||||
);
|
);
|
||||||
95
manager_api_new/lib/model/question_type.dart
Normal file
95
manager_api_new/lib/model/question_type.dart
Normal 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 = Simple 1 = MultipleChoice 2 = Puzzle
|
||||||
|
class QuestionType {
|
||||||
|
/// Instantiate a new enum with the provided [value].
|
||||||
|
const QuestionType._(this.value);
|
||||||
|
|
||||||
|
/// The underlying value of this enum member.
|
||||||
|
final int value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => value.toString();
|
||||||
|
|
||||||
|
int toJson() => value;
|
||||||
|
|
||||||
|
static const number0 = QuestionType._(0);
|
||||||
|
static const number1 = QuestionType._(1);
|
||||||
|
static const number2 = QuestionType._(2);
|
||||||
|
|
||||||
|
/// List of all possible values in this [enum][QuestionType].
|
||||||
|
static const values = <QuestionType>[
|
||||||
|
number0,
|
||||||
|
number1,
|
||||||
|
number2,
|
||||||
|
];
|
||||||
|
|
||||||
|
static QuestionType? fromJson(dynamic value) =>
|
||||||
|
QuestionTypeTypeTransformer().decode(value);
|
||||||
|
|
||||||
|
static List<QuestionType> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <QuestionType>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = QuestionType.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Transformation class that can [encode] an instance of [QuestionType] to int,
|
||||||
|
/// and [decode] dynamic data back to [QuestionType].
|
||||||
|
class QuestionTypeTypeTransformer {
|
||||||
|
factory QuestionTypeTypeTransformer() =>
|
||||||
|
_instance ??= const QuestionTypeTypeTransformer._();
|
||||||
|
|
||||||
|
const QuestionTypeTypeTransformer._();
|
||||||
|
|
||||||
|
int encode(QuestionType data) => data.value;
|
||||||
|
|
||||||
|
/// Decodes a [dynamic value][data] to a QuestionType.
|
||||||
|
///
|
||||||
|
/// 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.
|
||||||
|
QuestionType? decode(dynamic data, {bool allowNull = true}) {
|
||||||
|
if (data != null) {
|
||||||
|
switch (data) {
|
||||||
|
case 0:
|
||||||
|
return QuestionType.number0;
|
||||||
|
case 1:
|
||||||
|
return QuestionType.number1;
|
||||||
|
case 2:
|
||||||
|
return QuestionType.number2;
|
||||||
|
default:
|
||||||
|
if (!allowNull) {
|
||||||
|
throw ArgumentError('Unknown enum value to decode: $data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Singleton [QuestionTypeTypeTransformer] instance.
|
||||||
|
static QuestionTypeTypeTransformer? _instance;
|
||||||
|
}
|
||||||
321
manager_api_new/lib/model/quiz_question_guided_step.dart
Normal file
321
manager_api_new/lib/model/quiz_question_guided_step.dart
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
//
|
||||||
|
// 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 QuizQuestionGuidedStep {
|
||||||
|
/// Returns a new [QuizQuestionGuidedStep] instance.
|
||||||
|
QuizQuestionGuidedStep({
|
||||||
|
required this.guidedPathId,
|
||||||
|
this.title = const [],
|
||||||
|
this.id,
|
||||||
|
this.guidedPath,
|
||||||
|
this.order,
|
||||||
|
this.description = const [],
|
||||||
|
this.geometry,
|
||||||
|
this.zoneRadiusMeters,
|
||||||
|
this.imageUrl,
|
||||||
|
this.triggerGeoPointId,
|
||||||
|
this.triggerGeoPoint,
|
||||||
|
this.isHiddenInitially,
|
||||||
|
this.quizQuestions = const [],
|
||||||
|
this.isStepTimer,
|
||||||
|
this.isStepLocked,
|
||||||
|
this.timerSeconds,
|
||||||
|
this.timerExpiredMessage = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String guidedPathId;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
GuidedStepGuidedPath? guidedPath;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
PointAllOfBoundary? geometry;
|
||||||
|
|
||||||
|
double? zoneRadiusMeters;
|
||||||
|
|
||||||
|
String? imageUrl;
|
||||||
|
|
||||||
|
int? triggerGeoPointId;
|
||||||
|
|
||||||
|
GuidedStepTriggerGeoPoint? triggerGeoPoint;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isHiddenInitially;
|
||||||
|
|
||||||
|
List<QuizQuestion>? quizQuestions;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepTimer;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? isStepLocked;
|
||||||
|
|
||||||
|
int? timerSeconds;
|
||||||
|
|
||||||
|
List<TranslationDTO>? timerExpiredMessage;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is QuizQuestionGuidedStep &&
|
||||||
|
other.guidedPathId == guidedPathId &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
other.id == id &&
|
||||||
|
other.guidedPath == guidedPath &&
|
||||||
|
other.order == order &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.geometry == geometry &&
|
||||||
|
other.zoneRadiusMeters == zoneRadiusMeters &&
|
||||||
|
other.imageUrl == imageUrl &&
|
||||||
|
other.triggerGeoPointId == triggerGeoPointId &&
|
||||||
|
other.triggerGeoPoint == triggerGeoPoint &&
|
||||||
|
other.isHiddenInitially == isHiddenInitially &&
|
||||||
|
_deepEquality.equals(other.quizQuestions, quizQuestions) &&
|
||||||
|
other.isStepTimer == isStepTimer &&
|
||||||
|
other.isStepLocked == isStepLocked &&
|
||||||
|
other.timerSeconds == timerSeconds &&
|
||||||
|
_deepEquality.equals(other.timerExpiredMessage, timerExpiredMessage);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(guidedPathId.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(guidedPath == null ? 0 : guidedPath!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(geometry == null ? 0 : geometry!.hashCode) +
|
||||||
|
(zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) +
|
||||||
|
(imageUrl == null ? 0 : imageUrl!.hashCode) +
|
||||||
|
(triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) +
|
||||||
|
(triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) +
|
||||||
|
(isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) +
|
||||||
|
(quizQuestions == null ? 0 : quizQuestions!.hashCode) +
|
||||||
|
(isStepTimer == null ? 0 : isStepTimer!.hashCode) +
|
||||||
|
(isStepLocked == null ? 0 : isStepLocked!.hashCode) +
|
||||||
|
(timerSeconds == null ? 0 : timerSeconds!.hashCode) +
|
||||||
|
(timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'QuizQuestionGuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'guidedPathId'] = this.guidedPathId;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.guidedPath != null) {
|
||||||
|
json[r'guidedPath'] = this.guidedPath;
|
||||||
|
} else {
|
||||||
|
json[r'guidedPath'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.geometry != null) {
|
||||||
|
json[r'geometry'] = this.geometry;
|
||||||
|
} else {
|
||||||
|
json[r'geometry'] = null;
|
||||||
|
}
|
||||||
|
if (this.zoneRadiusMeters != null) {
|
||||||
|
json[r'zoneRadiusMeters'] = this.zoneRadiusMeters;
|
||||||
|
} else {
|
||||||
|
json[r'zoneRadiusMeters'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageUrl != null) {
|
||||||
|
json[r'imageUrl'] = this.imageUrl;
|
||||||
|
} else {
|
||||||
|
json[r'imageUrl'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPointId != null) {
|
||||||
|
json[r'triggerGeoPointId'] = this.triggerGeoPointId;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPointId'] = null;
|
||||||
|
}
|
||||||
|
if (this.triggerGeoPoint != null) {
|
||||||
|
json[r'triggerGeoPoint'] = this.triggerGeoPoint;
|
||||||
|
} else {
|
||||||
|
json[r'triggerGeoPoint'] = null;
|
||||||
|
}
|
||||||
|
if (this.isHiddenInitially != null) {
|
||||||
|
json[r'isHiddenInitially'] = this.isHiddenInitially;
|
||||||
|
} else {
|
||||||
|
json[r'isHiddenInitially'] = null;
|
||||||
|
}
|
||||||
|
if (this.quizQuestions != null) {
|
||||||
|
json[r'quizQuestions'] = this.quizQuestions;
|
||||||
|
} else {
|
||||||
|
json[r'quizQuestions'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepTimer != null) {
|
||||||
|
json[r'isStepTimer'] = this.isStepTimer;
|
||||||
|
} else {
|
||||||
|
json[r'isStepTimer'] = null;
|
||||||
|
}
|
||||||
|
if (this.isStepLocked != null) {
|
||||||
|
json[r'isStepLocked'] = this.isStepLocked;
|
||||||
|
} else {
|
||||||
|
json[r'isStepLocked'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerSeconds != null) {
|
||||||
|
json[r'timerSeconds'] = this.timerSeconds;
|
||||||
|
} else {
|
||||||
|
json[r'timerSeconds'] = null;
|
||||||
|
}
|
||||||
|
if (this.timerExpiredMessage != null) {
|
||||||
|
json[r'timerExpiredMessage'] = this.timerExpiredMessage;
|
||||||
|
} else {
|
||||||
|
json[r'timerExpiredMessage'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [QuizQuestionGuidedStep] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static QuizQuestionGuidedStep? 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 "QuizQuestionGuidedStep[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "QuizQuestionGuidedStep[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return QuizQuestionGuidedStep(
|
||||||
|
guidedPathId: mapValueOfType<String>(json, r'guidedPathId')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
guidedPath: GuidedStepGuidedPath.fromJson(json[r'guidedPath']),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
geometry: PointAllOfBoundary.fromJson(json[r'geometry']),
|
||||||
|
zoneRadiusMeters: mapValueOfType<double>(json, r'zoneRadiusMeters'),
|
||||||
|
imageUrl: mapValueOfType<String>(json, r'imageUrl'),
|
||||||
|
triggerGeoPointId: mapValueOfType<int>(json, r'triggerGeoPointId'),
|
||||||
|
triggerGeoPoint:
|
||||||
|
GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']),
|
||||||
|
isHiddenInitially: mapValueOfType<bool>(json, r'isHiddenInitially'),
|
||||||
|
quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']),
|
||||||
|
isStepTimer: mapValueOfType<bool>(json, r'isStepTimer'),
|
||||||
|
isStepLocked: mapValueOfType<bool>(json, r'isStepLocked'),
|
||||||
|
timerSeconds: mapValueOfType<int>(json, r'timerSeconds'),
|
||||||
|
timerExpiredMessage:
|
||||||
|
TranslationDTO.listFromJson(json[r'timerExpiredMessage']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<QuizQuestionGuidedStep> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <QuizQuestionGuidedStep>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = QuizQuestionGuidedStep.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, QuizQuestionGuidedStep> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, QuizQuestionGuidedStep>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = QuizQuestionGuidedStep.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of QuizQuestionGuidedStep-objects as value to a dart map
|
||||||
|
static Map<String, List<QuizQuestionGuidedStep>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<QuizQuestionGuidedStep>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = QuizQuestionGuidedStep.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'guidedPathId',
|
||||||
|
'title',
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,168 +0,0 @@
|
|||||||
//
|
|
||||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
||||||
//
|
|
||||||
// @dart=2.12
|
|
||||||
|
|
||||||
// ignore_for_file: unused_element, unused_import
|
|
||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
// ignore_for_file: constant_identifier_names
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
|
|
||||||
part of openapi.api;
|
|
||||||
|
|
||||||
class QuizzDTO {
|
|
||||||
/// Returns a new [QuizzDTO] instance.
|
|
||||||
QuizzDTO({
|
|
||||||
this.questions = const [],
|
|
||||||
this.badLevel,
|
|
||||||
this.mediumLevel,
|
|
||||||
this.goodLevel,
|
|
||||||
this.greatLevel,
|
|
||||||
});
|
|
||||||
|
|
||||||
List<QuestionDTO>? questions;
|
|
||||||
|
|
||||||
LevelDTO? badLevel;
|
|
||||||
|
|
||||||
LevelDTO? mediumLevel;
|
|
||||||
|
|
||||||
LevelDTO? goodLevel;
|
|
||||||
|
|
||||||
LevelDTO? greatLevel;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) =>
|
|
||||||
identical(this, other) ||
|
|
||||||
other is QuizzDTO &&
|
|
||||||
other.questions == questions &&
|
|
||||||
other.badLevel == badLevel &&
|
|
||||||
other.mediumLevel == mediumLevel &&
|
|
||||||
other.goodLevel == goodLevel &&
|
|
||||||
other.greatLevel == greatLevel;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
// ignore: unnecessary_parenthesis
|
|
||||||
(questions == null ? 0 : questions!.hashCode) +
|
|
||||||
(badLevel == null ? 0 : badLevel!.hashCode) +
|
|
||||||
(mediumLevel == null ? 0 : mediumLevel!.hashCode) +
|
|
||||||
(goodLevel == null ? 0 : goodLevel!.hashCode) +
|
|
||||||
(greatLevel == null ? 0 : greatLevel!.hashCode);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() =>
|
|
||||||
'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]';
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
final json = <String, dynamic>{};
|
|
||||||
if (this.questions != null) {
|
|
||||||
json[r'questions'] = this.questions;
|
|
||||||
} else {
|
|
||||||
json[r'questions'] = null;
|
|
||||||
}
|
|
||||||
if (this.badLevel != null) {
|
|
||||||
json[r'bad_level'] = this.badLevel;
|
|
||||||
} else {
|
|
||||||
json[r'bad_level'] = null;
|
|
||||||
}
|
|
||||||
if (this.mediumLevel != null) {
|
|
||||||
json[r'medium_level'] = this.mediumLevel;
|
|
||||||
} else {
|
|
||||||
json[r'medium_level'] = null;
|
|
||||||
}
|
|
||||||
if (this.goodLevel != null) {
|
|
||||||
json[r'good_level'] = this.goodLevel;
|
|
||||||
} else {
|
|
||||||
json[r'good_level'] = null;
|
|
||||||
}
|
|
||||||
if (this.greatLevel != null) {
|
|
||||||
json[r'great_level'] = this.greatLevel;
|
|
||||||
} else {
|
|
||||||
json[r'great_level'] = null;
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a new [QuizzDTO] instance and imports its values from
|
|
||||||
/// [value] if it's a [Map], null otherwise.
|
|
||||||
// ignore: prefer_constructors_over_static_methods
|
|
||||||
static QuizzDTO? fromJson(dynamic value) {
|
|
||||||
if (value is Map) {
|
|
||||||
final json = value.cast<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 "QuizzDTO[$key]" is missing from JSON.');
|
|
||||||
assert(json[key] != null,
|
|
||||||
'Required key "QuizzDTO[$key]" has a null value in JSON.');
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}());
|
|
||||||
|
|
||||||
return QuizzDTO(
|
|
||||||
questions: QuestionDTO.listFromJson(json[r'questions']) ?? const [],
|
|
||||||
badLevel: LevelDTO.fromJson(json[r'bad_level']),
|
|
||||||
mediumLevel: LevelDTO.fromJson(json[r'medium_level']),
|
|
||||||
goodLevel: LevelDTO.fromJson(json[r'good_level']),
|
|
||||||
greatLevel: LevelDTO.fromJson(json[r'great_level']),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<QuizzDTO> listFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final result = <QuizzDTO>[];
|
|
||||||
if (json is List && json.isNotEmpty) {
|
|
||||||
for (final row in json) {
|
|
||||||
final value = QuizzDTO.fromJson(row);
|
|
||||||
if (value != null) {
|
|
||||||
result.add(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result.toList(growable: growable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, QuizzDTO> mapFromJson(dynamic json) {
|
|
||||||
final map = <String, QuizzDTO>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
final value = QuizzDTO.fromJson(entry.value);
|
|
||||||
if (value != null) {
|
|
||||||
map[entry.key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
// maps a json object with a list of QuizzDTO-objects as value to a dart map
|
|
||||||
static Map<String, List<QuizzDTO>> mapListFromJson(
|
|
||||||
dynamic json, {
|
|
||||||
bool growable = false,
|
|
||||||
}) {
|
|
||||||
final map = <String, List<QuizzDTO>>{};
|
|
||||||
if (json is Map && json.isNotEmpty) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
json = json.cast<String, dynamic>();
|
|
||||||
for (final entry in json.entries) {
|
|
||||||
map[entry.key] = QuizzDTO.listFromJson(
|
|
||||||
entry.value,
|
|
||||||
growable: growable,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The list of required keys that must be present in a JSON.
|
|
||||||
static const requiredKeys = <String>{};
|
|
||||||
}
|
|
||||||
386
manager_api_new/lib/model/section_event.dart
Normal file
386
manager_api_new/lib/model/section_event.dart
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
//
|
||||||
|
// 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 SectionEvent {
|
||||||
|
/// Returns a new [SectionEvent] instance.
|
||||||
|
SectionEvent({
|
||||||
|
required this.id,
|
||||||
|
required this.label,
|
||||||
|
this.title = const [],
|
||||||
|
required this.configurationId,
|
||||||
|
required this.type,
|
||||||
|
required this.isSubSection,
|
||||||
|
required this.instanceId,
|
||||||
|
this.description = const [],
|
||||||
|
this.order,
|
||||||
|
this.imageId,
|
||||||
|
this.imageSource,
|
||||||
|
this.parentId,
|
||||||
|
this.dateCreation,
|
||||||
|
this.isBeacon,
|
||||||
|
this.beaconId,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.meterZoneGPS,
|
||||||
|
this.isActive,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.programme = const [],
|
||||||
|
this.parcoursIds = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String id;
|
||||||
|
|
||||||
|
String label;
|
||||||
|
|
||||||
|
List<TranslationDTO> title;
|
||||||
|
|
||||||
|
String configurationId;
|
||||||
|
|
||||||
|
SectionType type;
|
||||||
|
|
||||||
|
bool isSubSection;
|
||||||
|
|
||||||
|
String instanceId;
|
||||||
|
|
||||||
|
List<TranslationDTO>? description;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
int? order;
|
||||||
|
|
||||||
|
String? imageId;
|
||||||
|
|
||||||
|
String? imageSource;
|
||||||
|
|
||||||
|
String? parentId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
DateTime? dateCreation;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
bool? isBeacon;
|
||||||
|
|
||||||
|
int? beaconId;
|
||||||
|
|
||||||
|
String? latitude;
|
||||||
|
|
||||||
|
String? longitude;
|
||||||
|
|
||||||
|
int? meterZoneGPS;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? startDate;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? endDate;
|
||||||
|
|
||||||
|
List<ProgrammeBlock>? programme;
|
||||||
|
|
||||||
|
List<String>? parcoursIds;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is SectionEvent &&
|
||||||
|
other.id == id &&
|
||||||
|
other.label == label &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
other.configurationId == configurationId &&
|
||||||
|
other.type == type &&
|
||||||
|
other.isSubSection == isSubSection &&
|
||||||
|
other.instanceId == instanceId &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.order == order &&
|
||||||
|
other.imageId == imageId &&
|
||||||
|
other.imageSource == imageSource &&
|
||||||
|
other.parentId == parentId &&
|
||||||
|
other.dateCreation == dateCreation &&
|
||||||
|
other.isBeacon == isBeacon &&
|
||||||
|
other.beaconId == beaconId &&
|
||||||
|
other.latitude == latitude &&
|
||||||
|
other.longitude == longitude &&
|
||||||
|
other.meterZoneGPS == meterZoneGPS &&
|
||||||
|
other.isActive == isActive &&
|
||||||
|
other.startDate == startDate &&
|
||||||
|
other.endDate == endDate &&
|
||||||
|
_deepEquality.equals(other.programme, programme) &&
|
||||||
|
_deepEquality.equals(other.parcoursIds, parcoursIds);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id.hashCode) +
|
||||||
|
(label.hashCode) +
|
||||||
|
(title.hashCode) +
|
||||||
|
(configurationId.hashCode) +
|
||||||
|
(type.hashCode) +
|
||||||
|
(isSubSection.hashCode) +
|
||||||
|
(instanceId.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(imageId == null ? 0 : imageId!.hashCode) +
|
||||||
|
(imageSource == null ? 0 : imageSource!.hashCode) +
|
||||||
|
(parentId == null ? 0 : parentId!.hashCode) +
|
||||||
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
|
(isBeacon == null ? 0 : isBeacon!.hashCode) +
|
||||||
|
(beaconId == null ? 0 : beaconId!.hashCode) +
|
||||||
|
(latitude == null ? 0 : latitude!.hashCode) +
|
||||||
|
(longitude == null ? 0 : longitude!.hashCode) +
|
||||||
|
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
||||||
|
(isActive == null ? 0 : isActive!.hashCode) +
|
||||||
|
(startDate == null ? 0 : startDate!.hashCode) +
|
||||||
|
(endDate == null ? 0 : endDate!.hashCode) +
|
||||||
|
(programme == null ? 0 : programme!.hashCode) +
|
||||||
|
(parcoursIds == null ? 0 : parcoursIds!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'SectionEvent[id=$id, label=$label, title=$title, configurationId=$configurationId, type=$type, isSubSection=$isSubSection, instanceId=$instanceId, description=$description, order=$order, imageId=$imageId, imageSource=$imageSource, parentId=$parentId, dateCreation=$dateCreation, isBeacon=$isBeacon, beaconId=$beaconId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isActive=$isActive, startDate=$startDate, endDate=$endDate, programme=$programme, parcoursIds=$parcoursIds]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
json[r'label'] = this.label;
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
json[r'configurationId'] = this.configurationId;
|
||||||
|
json[r'type'] = this.type;
|
||||||
|
json[r'isSubSection'] = this.isSubSection;
|
||||||
|
json[r'instanceId'] = this.instanceId;
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageId != null) {
|
||||||
|
json[r'imageId'] = this.imageId;
|
||||||
|
} else {
|
||||||
|
json[r'imageId'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageSource != null) {
|
||||||
|
json[r'imageSource'] = this.imageSource;
|
||||||
|
} else {
|
||||||
|
json[r'imageSource'] = null;
|
||||||
|
}
|
||||||
|
if (this.parentId != null) {
|
||||||
|
json[r'parentId'] = this.parentId;
|
||||||
|
} else {
|
||||||
|
json[r'parentId'] = null;
|
||||||
|
}
|
||||||
|
if (this.dateCreation != null) {
|
||||||
|
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'dateCreation'] = null;
|
||||||
|
}
|
||||||
|
if (this.isBeacon != null) {
|
||||||
|
json[r'isBeacon'] = this.isBeacon;
|
||||||
|
} else {
|
||||||
|
json[r'isBeacon'] = null;
|
||||||
|
}
|
||||||
|
if (this.beaconId != null) {
|
||||||
|
json[r'beaconId'] = this.beaconId;
|
||||||
|
} else {
|
||||||
|
json[r'beaconId'] = null;
|
||||||
|
}
|
||||||
|
if (this.latitude != null) {
|
||||||
|
json[r'latitude'] = this.latitude;
|
||||||
|
} else {
|
||||||
|
json[r'latitude'] = null;
|
||||||
|
}
|
||||||
|
if (this.longitude != null) {
|
||||||
|
json[r'longitude'] = this.longitude;
|
||||||
|
} else {
|
||||||
|
json[r'longitude'] = null;
|
||||||
|
}
|
||||||
|
if (this.meterZoneGPS != null) {
|
||||||
|
json[r'meterZoneGPS'] = this.meterZoneGPS;
|
||||||
|
} else {
|
||||||
|
json[r'meterZoneGPS'] = null;
|
||||||
|
}
|
||||||
|
if (this.isActive != null) {
|
||||||
|
json[r'isActive'] = this.isActive;
|
||||||
|
} else {
|
||||||
|
json[r'isActive'] = null;
|
||||||
|
}
|
||||||
|
if (this.startDate != null) {
|
||||||
|
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'startDate'] = null;
|
||||||
|
}
|
||||||
|
if (this.endDate != null) {
|
||||||
|
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'endDate'] = null;
|
||||||
|
}
|
||||||
|
if (this.programme != null) {
|
||||||
|
json[r'programme'] = this.programme;
|
||||||
|
} else {
|
||||||
|
json[r'programme'] = null;
|
||||||
|
}
|
||||||
|
if (this.parcoursIds != null) {
|
||||||
|
json[r'parcoursIds'] = this.parcoursIds;
|
||||||
|
} else {
|
||||||
|
json[r'parcoursIds'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [SectionEvent] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static SectionEvent? 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 "SectionEvent[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "SectionEvent[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return SectionEvent(
|
||||||
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
|
label: mapValueOfType<String>(json, r'label')!,
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
configurationId: mapValueOfType<String>(json, r'configurationId')!,
|
||||||
|
type: SectionType.fromJson(json[r'type'])!,
|
||||||
|
isSubSection: mapValueOfType<bool>(json, r'isSubSection')!,
|
||||||
|
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
imageId: mapValueOfType<String>(json, r'imageId'),
|
||||||
|
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
||||||
|
parentId: mapValueOfType<String>(json, r'parentId'),
|
||||||
|
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
||||||
|
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
||||||
|
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
||||||
|
latitude: mapValueOfType<String>(json, r'latitude'),
|
||||||
|
longitude: mapValueOfType<String>(json, r'longitude'),
|
||||||
|
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
||||||
|
isActive: mapValueOfType<bool>(json, r'isActive'),
|
||||||
|
startDate: mapDateTime(json, r'startDate', r''),
|
||||||
|
endDate: mapDateTime(json, r'endDate', r''),
|
||||||
|
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
||||||
|
parcoursIds: json[r'parcoursIds'] is Iterable
|
||||||
|
? (json[r'parcoursIds'] as Iterable)
|
||||||
|
.cast<String>()
|
||||||
|
.toList(growable: false)
|
||||||
|
: const [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SectionEvent> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <SectionEvent>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = SectionEvent.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, SectionEvent> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, SectionEvent>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = SectionEvent.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of SectionEvent-objects as value to a dart map
|
||||||
|
static Map<String, List<SectionEvent>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<SectionEvent>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = SectionEvent.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',
|
||||||
|
};
|
||||||
|
}
|
||||||
406
manager_api_new/lib/model/section_event_dto.dart
Normal file
406
manager_api_new/lib/model/section_event_dto.dart
Normal file
@ -0,0 +1,406 @@
|
|||||||
|
//
|
||||||
|
// 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 SectionEventDTO {
|
||||||
|
/// Returns a new [SectionEventDTO] instance.
|
||||||
|
SectionEventDTO({
|
||||||
|
this.id,
|
||||||
|
this.label,
|
||||||
|
this.title = const [],
|
||||||
|
this.description = const [],
|
||||||
|
this.isActive,
|
||||||
|
this.imageId,
|
||||||
|
this.imageSource,
|
||||||
|
this.configurationId,
|
||||||
|
this.isSubSection,
|
||||||
|
this.parentId,
|
||||||
|
this.type,
|
||||||
|
this.dateCreation,
|
||||||
|
this.order,
|
||||||
|
this.instanceId,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.meterZoneGPS,
|
||||||
|
this.isBeacon,
|
||||||
|
this.beaconId,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.parcoursIds = const [],
|
||||||
|
this.programme = const [],
|
||||||
|
});
|
||||||
|
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
String? label;
|
||||||
|
|
||||||
|
List<TranslationDTO>? title;
|
||||||
|
|
||||||
|
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.
|
||||||
|
///
|
||||||
|
bool? isActive;
|
||||||
|
|
||||||
|
String? imageId;
|
||||||
|
|
||||||
|
String? imageSource;
|
||||||
|
|
||||||
|
String? configurationId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
bool? isSubSection;
|
||||||
|
|
||||||
|
String? parentId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
SectionType? type;
|
||||||
|
|
||||||
|
DateTime? dateCreation;
|
||||||
|
|
||||||
|
int? order;
|
||||||
|
|
||||||
|
String? instanceId;
|
||||||
|
|
||||||
|
String? latitude;
|
||||||
|
|
||||||
|
String? longitude;
|
||||||
|
|
||||||
|
int? meterZoneGPS;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
bool? isBeacon;
|
||||||
|
|
||||||
|
int? beaconId;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Please note: This property should have been non-nullable! Since the specification file
|
||||||
|
/// does not include a default value (using the "default:" property), however, the generated
|
||||||
|
/// source code must fall back to having a nullable type.
|
||||||
|
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||||
|
///
|
||||||
|
DateTime? startDate;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? endDate;
|
||||||
|
|
||||||
|
List<String>? parcoursIds;
|
||||||
|
|
||||||
|
List<ProgrammeBlock>? programme;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is SectionEventDTO &&
|
||||||
|
other.id == id &&
|
||||||
|
other.label == label &&
|
||||||
|
_deepEquality.equals(other.title, title) &&
|
||||||
|
_deepEquality.equals(other.description, description) &&
|
||||||
|
other.isActive == isActive &&
|
||||||
|
other.imageId == imageId &&
|
||||||
|
other.imageSource == imageSource &&
|
||||||
|
other.configurationId == configurationId &&
|
||||||
|
other.isSubSection == isSubSection &&
|
||||||
|
other.parentId == parentId &&
|
||||||
|
other.type == type &&
|
||||||
|
other.dateCreation == dateCreation &&
|
||||||
|
other.order == order &&
|
||||||
|
other.instanceId == instanceId &&
|
||||||
|
other.latitude == latitude &&
|
||||||
|
other.longitude == longitude &&
|
||||||
|
other.meterZoneGPS == meterZoneGPS &&
|
||||||
|
other.isBeacon == isBeacon &&
|
||||||
|
other.beaconId == beaconId &&
|
||||||
|
other.startDate == startDate &&
|
||||||
|
other.endDate == endDate &&
|
||||||
|
_deepEquality.equals(other.parcoursIds, parcoursIds) &&
|
||||||
|
_deepEquality.equals(other.programme, programme);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(id == null ? 0 : id!.hashCode) +
|
||||||
|
(label == null ? 0 : label!.hashCode) +
|
||||||
|
(title == null ? 0 : title!.hashCode) +
|
||||||
|
(description == null ? 0 : description!.hashCode) +
|
||||||
|
(isActive == null ? 0 : isActive!.hashCode) +
|
||||||
|
(imageId == null ? 0 : imageId!.hashCode) +
|
||||||
|
(imageSource == null ? 0 : imageSource!.hashCode) +
|
||||||
|
(configurationId == null ? 0 : configurationId!.hashCode) +
|
||||||
|
(isSubSection == null ? 0 : isSubSection!.hashCode) +
|
||||||
|
(parentId == null ? 0 : parentId!.hashCode) +
|
||||||
|
(type == null ? 0 : type!.hashCode) +
|
||||||
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
|
(order == null ? 0 : order!.hashCode) +
|
||||||
|
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||||
|
(latitude == null ? 0 : latitude!.hashCode) +
|
||||||
|
(longitude == null ? 0 : longitude!.hashCode) +
|
||||||
|
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
|
||||||
|
(isBeacon == null ? 0 : isBeacon!.hashCode) +
|
||||||
|
(beaconId == null ? 0 : beaconId!.hashCode) +
|
||||||
|
(startDate == null ? 0 : startDate!.hashCode) +
|
||||||
|
(endDate == null ? 0 : endDate!.hashCode) +
|
||||||
|
(parcoursIds == null ? 0 : parcoursIds!.hashCode) +
|
||||||
|
(programme == null ? 0 : programme!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() =>
|
||||||
|
'SectionEventDTO[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, startDate=$startDate, endDate=$endDate, parcoursIds=$parcoursIds, programme=$programme]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.id != null) {
|
||||||
|
json[r'id'] = this.id;
|
||||||
|
} else {
|
||||||
|
json[r'id'] = null;
|
||||||
|
}
|
||||||
|
if (this.label != null) {
|
||||||
|
json[r'label'] = this.label;
|
||||||
|
} else {
|
||||||
|
json[r'label'] = null;
|
||||||
|
}
|
||||||
|
if (this.title != null) {
|
||||||
|
json[r'title'] = this.title;
|
||||||
|
} else {
|
||||||
|
json[r'title'] = null;
|
||||||
|
}
|
||||||
|
if (this.description != null) {
|
||||||
|
json[r'description'] = this.description;
|
||||||
|
} else {
|
||||||
|
json[r'description'] = null;
|
||||||
|
}
|
||||||
|
if (this.isActive != null) {
|
||||||
|
json[r'isActive'] = this.isActive;
|
||||||
|
} else {
|
||||||
|
json[r'isActive'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageId != null) {
|
||||||
|
json[r'imageId'] = this.imageId;
|
||||||
|
} else {
|
||||||
|
json[r'imageId'] = null;
|
||||||
|
}
|
||||||
|
if (this.imageSource != null) {
|
||||||
|
json[r'imageSource'] = this.imageSource;
|
||||||
|
} else {
|
||||||
|
json[r'imageSource'] = null;
|
||||||
|
}
|
||||||
|
if (this.configurationId != null) {
|
||||||
|
json[r'configurationId'] = this.configurationId;
|
||||||
|
} else {
|
||||||
|
json[r'configurationId'] = null;
|
||||||
|
}
|
||||||
|
if (this.isSubSection != null) {
|
||||||
|
json[r'isSubSection'] = this.isSubSection;
|
||||||
|
} else {
|
||||||
|
json[r'isSubSection'] = null;
|
||||||
|
}
|
||||||
|
if (this.parentId != null) {
|
||||||
|
json[r'parentId'] = this.parentId;
|
||||||
|
} else {
|
||||||
|
json[r'parentId'] = null;
|
||||||
|
}
|
||||||
|
if (this.type != null) {
|
||||||
|
json[r'type'] = this.type;
|
||||||
|
} else {
|
||||||
|
json[r'type'] = null;
|
||||||
|
}
|
||||||
|
if (this.dateCreation != null) {
|
||||||
|
json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'dateCreation'] = null;
|
||||||
|
}
|
||||||
|
if (this.order != null) {
|
||||||
|
json[r'order'] = this.order;
|
||||||
|
} else {
|
||||||
|
json[r'order'] = null;
|
||||||
|
}
|
||||||
|
if (this.instanceId != null) {
|
||||||
|
json[r'instanceId'] = this.instanceId;
|
||||||
|
} else {
|
||||||
|
json[r'instanceId'] = null;
|
||||||
|
}
|
||||||
|
if (this.latitude != null) {
|
||||||
|
json[r'latitude'] = this.latitude;
|
||||||
|
} else {
|
||||||
|
json[r'latitude'] = null;
|
||||||
|
}
|
||||||
|
if (this.longitude != null) {
|
||||||
|
json[r'longitude'] = this.longitude;
|
||||||
|
} else {
|
||||||
|
json[r'longitude'] = null;
|
||||||
|
}
|
||||||
|
if (this.meterZoneGPS != null) {
|
||||||
|
json[r'meterZoneGPS'] = this.meterZoneGPS;
|
||||||
|
} else {
|
||||||
|
json[r'meterZoneGPS'] = null;
|
||||||
|
}
|
||||||
|
if (this.isBeacon != null) {
|
||||||
|
json[r'isBeacon'] = this.isBeacon;
|
||||||
|
} else {
|
||||||
|
json[r'isBeacon'] = null;
|
||||||
|
}
|
||||||
|
if (this.beaconId != null) {
|
||||||
|
json[r'beaconId'] = this.beaconId;
|
||||||
|
} else {
|
||||||
|
json[r'beaconId'] = null;
|
||||||
|
}
|
||||||
|
if (this.startDate != null) {
|
||||||
|
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'startDate'] = null;
|
||||||
|
}
|
||||||
|
if (this.endDate != null) {
|
||||||
|
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
|
||||||
|
} else {
|
||||||
|
json[r'endDate'] = null;
|
||||||
|
}
|
||||||
|
if (this.parcoursIds != null) {
|
||||||
|
json[r'parcoursIds'] = this.parcoursIds;
|
||||||
|
} else {
|
||||||
|
json[r'parcoursIds'] = null;
|
||||||
|
}
|
||||||
|
if (this.programme != null) {
|
||||||
|
json[r'programme'] = this.programme;
|
||||||
|
} else {
|
||||||
|
json[r'programme'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [SectionEventDTO] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static SectionEventDTO? 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 "SectionEventDTO[$key]" is missing from JSON.');
|
||||||
|
assert(json[key] != null,
|
||||||
|
'Required key "SectionEventDTO[$key]" has a null value in JSON.');
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}());
|
||||||
|
|
||||||
|
return SectionEventDTO(
|
||||||
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
|
label: mapValueOfType<String>(json, r'label'),
|
||||||
|
title: TranslationDTO.listFromJson(json[r'title']),
|
||||||
|
description: TranslationDTO.listFromJson(json[r'description']),
|
||||||
|
isActive: mapValueOfType<bool>(json, r'isActive'),
|
||||||
|
imageId: mapValueOfType<String>(json, r'imageId'),
|
||||||
|
imageSource: mapValueOfType<String>(json, r'imageSource'),
|
||||||
|
configurationId: mapValueOfType<String>(json, r'configurationId'),
|
||||||
|
isSubSection: mapValueOfType<bool>(json, r'isSubSection'),
|
||||||
|
parentId: mapValueOfType<String>(json, r'parentId'),
|
||||||
|
type: SectionType.fromJson(json[r'type']),
|
||||||
|
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
||||||
|
order: mapValueOfType<int>(json, r'order'),
|
||||||
|
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
||||||
|
latitude: mapValueOfType<String>(json, r'latitude'),
|
||||||
|
longitude: mapValueOfType<String>(json, r'longitude'),
|
||||||
|
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
||||||
|
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
||||||
|
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
||||||
|
startDate: mapDateTime(json, r'startDate', r''),
|
||||||
|
endDate: mapDateTime(json, r'endDate', r''),
|
||||||
|
parcoursIds: json[r'parcoursIds'] is Iterable
|
||||||
|
? (json[r'parcoursIds'] as Iterable)
|
||||||
|
.cast<String>()
|
||||||
|
.toList(growable: false)
|
||||||
|
: const [],
|
||||||
|
programme: ProgrammeBlock.listFromJson(json[r'programme']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<SectionEventDTO> listFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final result = <SectionEventDTO>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = SectionEventDTO.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, SectionEventDTO> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, SectionEventDTO>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = SectionEventDTO.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of SectionEventDTO-objects as value to a dart map
|
||||||
|
static Map<String, List<SectionEventDTO>> mapListFromJson(
|
||||||
|
dynamic json, {
|
||||||
|
bool growable = false,
|
||||||
|
}) {
|
||||||
|
final map = <String, List<SectionEventDTO>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = SectionEventDTO.listFromJson(
|
||||||
|
entry.value,
|
||||||
|
growable: growable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user