useless manager api new updates.. to be removed
This commit is contained in:
parent
9a46b443b6
commit
30d88df7b6
@ -91,6 +91,19 @@ part 'model/user_detail_dto.dart';
|
||||
part 'model/video_dto.dart';
|
||||
part 'model/weather_dto.dart';
|
||||
part 'model/web_dto.dart';
|
||||
part 'model/map_annotation.dart';
|
||||
part 'model/programme_block.dart';
|
||||
part 'model/app_configuration_link_configuration.dart';
|
||||
part 'model/app_configuration_link_device.dart';
|
||||
part 'model/app_configuration_link.dart';
|
||||
part 'model/app_configuration_link_application_instance.dart';
|
||||
part 'model/app_type.dart';
|
||||
part 'model/layout_main_page_type.dart';
|
||||
part 'model/application_instance_dto.dart';
|
||||
part 'model/application_instance_dto_section_event_dto.dart';
|
||||
part 'model/application_instance_section_event.dart';
|
||||
part 'model/section_event.dart';
|
||||
part 'model/section_event_dto.dart';
|
||||
|
||||
/// An [ApiClient] instance that uses the default values obtained from
|
||||
/// the OpenAPI specification file.
|
||||
|
||||
369
manager_api_new/lib/model/app_configuration_link.dart
Normal file
369
manager_api_new/lib/model/app_configuration_link.dart
Normal file
@ -0,0 +1,369 @@
|
||||
//
|
||||
// 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 AppConfigurationLink {
|
||||
/// Returns a new [AppConfigurationLink] instance.
|
||||
AppConfigurationLink({
|
||||
required this.configurationId,
|
||||
required this.applicationInstanceId,
|
||||
this.id,
|
||||
this.order,
|
||||
this.isActive,
|
||||
this.weightMasonryGrid,
|
||||
this.isDate,
|
||||
this.isHour,
|
||||
this.roundedValue,
|
||||
this.screenPercentageSectionsMainPage,
|
||||
this.isSectionImageBackground,
|
||||
this.layoutMainPage,
|
||||
this.loaderImageId,
|
||||
this.loaderImageUrl,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.configuration,
|
||||
this.applicationInstance,
|
||||
this.deviceId,
|
||||
this.device,
|
||||
});
|
||||
|
||||
String configurationId;
|
||||
|
||||
String applicationInstanceId;
|
||||
|
||||
String? id;
|
||||
|
||||
int? order;
|
||||
|
||||
///
|
||||
/// 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;
|
||||
|
||||
int? weightMasonryGrid;
|
||||
|
||||
///
|
||||
/// 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? isDate;
|
||||
|
||||
///
|
||||
/// 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? isHour;
|
||||
|
||||
int? roundedValue;
|
||||
|
||||
int? screenPercentageSectionsMainPage;
|
||||
|
||||
///
|
||||
/// 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? isSectionImageBackground;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
LayoutMainPageType? layoutMainPage;
|
||||
|
||||
String? loaderImageId;
|
||||
|
||||
String? loaderImageUrl;
|
||||
|
||||
String? primaryColor;
|
||||
|
||||
String? secondaryColor;
|
||||
|
||||
AppConfigurationLinkConfiguration? configuration;
|
||||
|
||||
AppConfigurationLinkApplicationInstance? applicationInstance;
|
||||
|
||||
String? deviceId;
|
||||
|
||||
AppConfigurationLinkDevice? device;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is AppConfigurationLink &&
|
||||
other.configurationId == configurationId &&
|
||||
other.applicationInstanceId == applicationInstanceId &&
|
||||
other.id == id &&
|
||||
other.order == order &&
|
||||
other.isActive == isActive &&
|
||||
other.weightMasonryGrid == weightMasonryGrid &&
|
||||
other.isDate == isDate &&
|
||||
other.isHour == isHour &&
|
||||
other.roundedValue == roundedValue &&
|
||||
other.screenPercentageSectionsMainPage ==
|
||||
screenPercentageSectionsMainPage &&
|
||||
other.isSectionImageBackground == isSectionImageBackground &&
|
||||
other.layoutMainPage == layoutMainPage &&
|
||||
other.loaderImageId == loaderImageId &&
|
||||
other.loaderImageUrl == loaderImageUrl &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.configuration == configuration &&
|
||||
other.applicationInstance == applicationInstance &&
|
||||
other.deviceId == deviceId &&
|
||||
other.device == device;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(configurationId.hashCode) +
|
||||
(applicationInstanceId.hashCode) +
|
||||
(id == null ? 0 : id!.hashCode) +
|
||||
(order == null ? 0 : order!.hashCode) +
|
||||
(isActive == null ? 0 : isActive!.hashCode) +
|
||||
(weightMasonryGrid == null ? 0 : weightMasonryGrid!.hashCode) +
|
||||
(isDate == null ? 0 : isDate!.hashCode) +
|
||||
(isHour == null ? 0 : isHour!.hashCode) +
|
||||
(roundedValue == null ? 0 : roundedValue!.hashCode) +
|
||||
(screenPercentageSectionsMainPage == null
|
||||
? 0
|
||||
: screenPercentageSectionsMainPage!.hashCode) +
|
||||
(isSectionImageBackground == null
|
||||
? 0
|
||||
: isSectionImageBackground!.hashCode) +
|
||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
||||
(configuration == null ? 0 : configuration!.hashCode) +
|
||||
(applicationInstance == null ? 0 : applicationInstance!.hashCode) +
|
||||
(deviceId == null ? 0 : deviceId!.hashCode) +
|
||||
(device == null ? 0 : device!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'AppConfigurationLink[configurationId=$configurationId, applicationInstanceId=$applicationInstanceId, id=$id, order=$order, isActive=$isActive, weightMasonryGrid=$weightMasonryGrid, isDate=$isDate, isHour=$isHour, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, isSectionImageBackground=$isSectionImageBackground, layoutMainPage=$layoutMainPage, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, configuration=$configuration, applicationInstance=$applicationInstance, deviceId=$deviceId, device=$device]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'configurationId'] = this.configurationId;
|
||||
json[r'applicationInstanceId'] = this.applicationInstanceId;
|
||||
if (this.id != null) {
|
||||
json[r'id'] = this.id;
|
||||
} else {
|
||||
json[r'id'] = null;
|
||||
}
|
||||
if (this.order != null) {
|
||||
json[r'order'] = this.order;
|
||||
} else {
|
||||
json[r'order'] = null;
|
||||
}
|
||||
if (this.isActive != null) {
|
||||
json[r'isActive'] = this.isActive;
|
||||
} else {
|
||||
json[r'isActive'] = null;
|
||||
}
|
||||
if (this.weightMasonryGrid != null) {
|
||||
json[r'weightMasonryGrid'] = this.weightMasonryGrid;
|
||||
} else {
|
||||
json[r'weightMasonryGrid'] = null;
|
||||
}
|
||||
if (this.isDate != null) {
|
||||
json[r'isDate'] = this.isDate;
|
||||
} else {
|
||||
json[r'isDate'] = null;
|
||||
}
|
||||
if (this.isHour != null) {
|
||||
json[r'isHour'] = this.isHour;
|
||||
} else {
|
||||
json[r'isHour'] = null;
|
||||
}
|
||||
if (this.roundedValue != null) {
|
||||
json[r'roundedValue'] = this.roundedValue;
|
||||
} else {
|
||||
json[r'roundedValue'] = null;
|
||||
}
|
||||
if (this.screenPercentageSectionsMainPage != null) {
|
||||
json[r'screenPercentageSectionsMainPage'] =
|
||||
this.screenPercentageSectionsMainPage;
|
||||
} else {
|
||||
json[r'screenPercentageSectionsMainPage'] = null;
|
||||
}
|
||||
if (this.isSectionImageBackground != null) {
|
||||
json[r'isSectionImageBackground'] = this.isSectionImageBackground;
|
||||
} else {
|
||||
json[r'isSectionImageBackground'] = null;
|
||||
}
|
||||
if (this.layoutMainPage != null) {
|
||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
||||
} else {
|
||||
json[r'layoutMainPage'] = null;
|
||||
}
|
||||
if (this.loaderImageId != null) {
|
||||
json[r'loaderImageId'] = this.loaderImageId;
|
||||
} else {
|
||||
json[r'loaderImageId'] = null;
|
||||
}
|
||||
if (this.loaderImageUrl != null) {
|
||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
||||
} else {
|
||||
json[r'loaderImageUrl'] = null;
|
||||
}
|
||||
if (this.primaryColor != null) {
|
||||
json[r'primaryColor'] = this.primaryColor;
|
||||
} else {
|
||||
json[r'primaryColor'] = null;
|
||||
}
|
||||
if (this.secondaryColor != null) {
|
||||
json[r'secondaryColor'] = this.secondaryColor;
|
||||
} else {
|
||||
json[r'secondaryColor'] = null;
|
||||
}
|
||||
if (this.configuration != null) {
|
||||
json[r'configuration'] = this.configuration;
|
||||
} else {
|
||||
json[r'configuration'] = null;
|
||||
}
|
||||
if (this.applicationInstance != null) {
|
||||
json[r'applicationInstance'] = this.applicationInstance;
|
||||
} else {
|
||||
json[r'applicationInstance'] = null;
|
||||
}
|
||||
if (this.deviceId != null) {
|
||||
json[r'deviceId'] = this.deviceId;
|
||||
} else {
|
||||
json[r'deviceId'] = null;
|
||||
}
|
||||
if (this.device != null) {
|
||||
json[r'device'] = this.device;
|
||||
} else {
|
||||
json[r'device'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AppConfigurationLink] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AppConfigurationLink? 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 "AppConfigurationLink[$key]" is missing from JSON.');
|
||||
assert(json[key] != null,
|
||||
'Required key "AppConfigurationLink[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return AppConfigurationLink(
|
||||
configurationId: mapValueOfType<String>(json, r'configurationId')!,
|
||||
applicationInstanceId:
|
||||
mapValueOfType<String>(json, r'applicationInstanceId')!,
|
||||
id: mapValueOfType<String>(json, r'id'),
|
||||
order: mapValueOfType<int>(json, r'order'),
|
||||
isActive: mapValueOfType<bool>(json, r'isActive'),
|
||||
weightMasonryGrid: mapValueOfType<int>(json, r'weightMasonryGrid'),
|
||||
isDate: mapValueOfType<bool>(json, r'isDate'),
|
||||
isHour: mapValueOfType<bool>(json, r'isHour'),
|
||||
roundedValue: mapValueOfType<int>(json, r'roundedValue'),
|
||||
screenPercentageSectionsMainPage:
|
||||
mapValueOfType<int>(json, r'screenPercentageSectionsMainPage'),
|
||||
isSectionImageBackground:
|
||||
mapValueOfType<bool>(json, r'isSectionImageBackground'),
|
||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
||||
configuration:
|
||||
AppConfigurationLinkConfiguration.fromJson(json[r'configuration']),
|
||||
applicationInstance: AppConfigurationLinkApplicationInstance.fromJson(
|
||||
json[r'applicationInstance']),
|
||||
deviceId: mapValueOfType<String>(json, r'deviceId'),
|
||||
device: AppConfigurationLinkDevice.fromJson(json[r'device']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AppConfigurationLink> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <AppConfigurationLink>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AppConfigurationLink.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AppConfigurationLink> mapFromJson(dynamic json) {
|
||||
final map = <String, AppConfigurationLink>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AppConfigurationLink.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AppConfigurationLink-objects as value to a dart map
|
||||
static Map<String, List<AppConfigurationLink>> mapListFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final map = <String, List<AppConfigurationLink>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AppConfigurationLink.listFromJson(
|
||||
entry.value,
|
||||
growable: growable,
|
||||
);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'configurationId',
|
||||
'applicationInstanceId',
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,277 @@
|
||||
//
|
||||
// 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 AppConfigurationLinkApplicationInstance {
|
||||
/// Returns a new [AppConfigurationLinkApplicationInstance] instance.
|
||||
AppConfigurationLinkApplicationInstance({
|
||||
required this.instanceId,
|
||||
required this.appType,
|
||||
this.id,
|
||||
this.configurations = const [],
|
||||
this.mainImageId,
|
||||
this.mainImageUrl,
|
||||
this.loaderImageId,
|
||||
this.loaderImageUrl,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.layoutMainPage,
|
||||
this.languages = const [],
|
||||
this.sectionEventId,
|
||||
this.sectionEvent,
|
||||
});
|
||||
|
||||
String instanceId;
|
||||
|
||||
AppType appType;
|
||||
|
||||
String? id;
|
||||
|
||||
List<AppConfigurationLink>? configurations;
|
||||
|
||||
String? mainImageId;
|
||||
|
||||
String? mainImageUrl;
|
||||
|
||||
String? loaderImageId;
|
||||
|
||||
String? loaderImageUrl;
|
||||
|
||||
String? primaryColor;
|
||||
|
||||
String? secondaryColor;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
LayoutMainPageType? layoutMainPage;
|
||||
|
||||
List<String>? languages;
|
||||
|
||||
String? sectionEventId;
|
||||
|
||||
ApplicationInstanceSectionEvent? sectionEvent;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is AppConfigurationLinkApplicationInstance &&
|
||||
other.instanceId == instanceId &&
|
||||
other.appType == appType &&
|
||||
other.id == id &&
|
||||
_deepEquality.equals(other.configurations, configurations) &&
|
||||
other.mainImageId == mainImageId &&
|
||||
other.mainImageUrl == mainImageUrl &&
|
||||
other.loaderImageId == loaderImageId &&
|
||||
other.loaderImageUrl == loaderImageUrl &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.layoutMainPage == layoutMainPage &&
|
||||
_deepEquality.equals(other.languages, languages) &&
|
||||
other.sectionEventId == sectionEventId &&
|
||||
other.sectionEvent == sectionEvent;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(instanceId.hashCode) +
|
||||
(appType.hashCode) +
|
||||
(id == null ? 0 : id!.hashCode) +
|
||||
(configurations == null ? 0 : configurations!.hashCode) +
|
||||
(mainImageId == null ? 0 : mainImageId!.hashCode) +
|
||||
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
|
||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
||||
(languages == null ? 0 : languages!.hashCode) +
|
||||
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||
(sectionEvent == null ? 0 : sectionEvent!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'AppConfigurationLinkApplicationInstance[instanceId=$instanceId, appType=$appType, id=$id, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'instanceId'] = this.instanceId;
|
||||
json[r'appType'] = this.appType;
|
||||
if (this.id != null) {
|
||||
json[r'id'] = this.id;
|
||||
} else {
|
||||
json[r'id'] = null;
|
||||
}
|
||||
if (this.configurations != null) {
|
||||
json[r'configurations'] = this.configurations;
|
||||
} else {
|
||||
json[r'configurations'] = null;
|
||||
}
|
||||
if (this.mainImageId != null) {
|
||||
json[r'mainImageId'] = this.mainImageId;
|
||||
} else {
|
||||
json[r'mainImageId'] = null;
|
||||
}
|
||||
if (this.mainImageUrl != null) {
|
||||
json[r'mainImageUrl'] = this.mainImageUrl;
|
||||
} else {
|
||||
json[r'mainImageUrl'] = null;
|
||||
}
|
||||
if (this.loaderImageId != null) {
|
||||
json[r'loaderImageId'] = this.loaderImageId;
|
||||
} else {
|
||||
json[r'loaderImageId'] = null;
|
||||
}
|
||||
if (this.loaderImageUrl != null) {
|
||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
||||
} else {
|
||||
json[r'loaderImageUrl'] = null;
|
||||
}
|
||||
if (this.primaryColor != null) {
|
||||
json[r'primaryColor'] = this.primaryColor;
|
||||
} else {
|
||||
json[r'primaryColor'] = null;
|
||||
}
|
||||
if (this.secondaryColor != null) {
|
||||
json[r'secondaryColor'] = this.secondaryColor;
|
||||
} else {
|
||||
json[r'secondaryColor'] = null;
|
||||
}
|
||||
if (this.layoutMainPage != null) {
|
||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
||||
} else {
|
||||
json[r'layoutMainPage'] = null;
|
||||
}
|
||||
if (this.languages != null) {
|
||||
json[r'languages'] = this.languages;
|
||||
} else {
|
||||
json[r'languages'] = 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 [AppConfigurationLinkApplicationInstance] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AppConfigurationLinkApplicationInstance? 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 "AppConfigurationLinkApplicationInstance[$key]" is missing from JSON.');
|
||||
assert(json[key] != null,
|
||||
'Required key "AppConfigurationLinkApplicationInstance[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return AppConfigurationLinkApplicationInstance(
|
||||
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
||||
appType: AppType.fromJson(json[r'appType'])!,
|
||||
id: mapValueOfType<String>(json, r'id'),
|
||||
configurations:
|
||||
AppConfigurationLink.listFromJson(json[r'configurations']),
|
||||
mainImageId: mapValueOfType<String>(json, r'mainImageId'),
|
||||
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
|
||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
||||
languages: json[r'languages'] is Iterable
|
||||
? (json[r'languages'] as Iterable)
|
||||
.cast<String>()
|
||||
.toList(growable: false)
|
||||
: const [],
|
||||
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||
sectionEvent:
|
||||
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AppConfigurationLinkApplicationInstance> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <AppConfigurationLinkApplicationInstance>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AppConfigurationLinkApplicationInstance.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AppConfigurationLinkApplicationInstance> mapFromJson(
|
||||
dynamic json) {
|
||||
final map = <String, AppConfigurationLinkApplicationInstance>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value =
|
||||
AppConfigurationLinkApplicationInstance.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AppConfigurationLinkApplicationInstance-objects as value to a dart map
|
||||
static Map<String, List<AppConfigurationLinkApplicationInstance>>
|
||||
mapListFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final map = <String, List<AppConfigurationLinkApplicationInstance>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AppConfigurationLinkApplicationInstance.listFromJson(
|
||||
entry.value,
|
||||
growable: growable,
|
||||
);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'instanceId',
|
||||
'appType',
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 AppConfigurationLinkConfiguration {
|
||||
AppConfigurationLinkConfiguration({this.id});
|
||||
String? id;
|
||||
|
||||
static AppConfigurationLinkConfiguration? fromJson(dynamic value) =>
|
||||
value is Map ? AppConfigurationLinkConfiguration() : null;
|
||||
|
||||
static const requiredKeys = <String>{};
|
||||
}
|
||||
21
manager_api_new/lib/model/app_configuration_link_device.dart
Normal file
21
manager_api_new/lib/model/app_configuration_link_device.dart
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 AppConfigurationLinkDevice {
|
||||
AppConfigurationLinkDevice({this.id});
|
||||
String? id;
|
||||
|
||||
static AppConfigurationLinkDevice? fromJson(dynamic value) =>
|
||||
value is Map ? AppConfigurationLinkDevice() : null;
|
||||
|
||||
static const requiredKeys = <String>{};
|
||||
}
|
||||
110
manager_api_new/lib/model/app_type.dart
Normal file
110
manager_api_new/lib/model/app_type.dart
Normal file
@ -0,0 +1,110 @@
|
||||
//
|
||||
// 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 = Mobile 1 = Tablet 2 = Web 3 = VR
|
||||
class AppType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AppType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final int value;
|
||||
|
||||
@override
|
||||
String toString() => value.toString();
|
||||
|
||||
int toJson() => value;
|
||||
|
||||
static const Mobile = AppType._(0);
|
||||
static const Tablet = AppType._(1);
|
||||
static const Web = AppType._(2);
|
||||
static const VR = AppType._(3);
|
||||
|
||||
/// List of all possible values in this [enum][AppType].
|
||||
static const values = <AppType>[
|
||||
Mobile,
|
||||
Tablet,
|
||||
Web,
|
||||
VR,
|
||||
];
|
||||
|
||||
static AppType? fromJson(dynamic value) =>
|
||||
AppTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<AppType> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <AppType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AppType.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [AppType] to int,
|
||||
/// and [decode] dynamic data back to [AppType].
|
||||
class AppTypeTypeTransformer {
|
||||
factory AppTypeTypeTransformer() =>
|
||||
_instance ??= const AppTypeTypeTransformer._();
|
||||
|
||||
const AppTypeTypeTransformer._();
|
||||
|
||||
int encode(AppType data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AppType.
|
||||
///
|
||||
/// 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.
|
||||
AppType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
if(data.runtimeType == String) {
|
||||
switch (data.toString()) {
|
||||
case r'Mobile': return AppType.Mobile;
|
||||
case r'Tablet': return AppType.Tablet;
|
||||
case r'Web': return AppType.Web;
|
||||
case r'VR': return AppType.VR;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(data.runtimeType == int) {
|
||||
switch (data) {
|
||||
case 0: return AppType.Mobile;
|
||||
case 1: return AppType.Tablet;
|
||||
case 2: return AppType.Web;
|
||||
case 3: return AppType.VR;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AppTypeTypeTransformer] instance.
|
||||
static AppTypeTypeTransformer? _instance;
|
||||
}
|
||||
295
manager_api_new/lib/model/application_instance_dto.dart
Normal file
295
manager_api_new/lib/model/application_instance_dto.dart
Normal file
@ -0,0 +1,295 @@
|
||||
//
|
||||
// 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 ApplicationInstanceDTO {
|
||||
/// Returns a new [ApplicationInstanceDTO] instance.
|
||||
ApplicationInstanceDTO({
|
||||
this.id,
|
||||
this.instanceId,
|
||||
this.appType,
|
||||
this.configurations = const [],
|
||||
this.mainImageId,
|
||||
this.mainImageUrl,
|
||||
this.loaderImageId,
|
||||
this.loaderImageUrl,
|
||||
this.primaryColor,
|
||||
this.secondaryColor,
|
||||
this.layoutMainPage,
|
||||
this.languages = const [],
|
||||
this.sectionEventId,
|
||||
this.sectionEventDTO,
|
||||
this.isAssistant,
|
||||
});
|
||||
|
||||
String? id;
|
||||
|
||||
String? instanceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
AppType? appType;
|
||||
|
||||
List<AppConfigurationLink>? configurations;
|
||||
|
||||
String? mainImageId;
|
||||
|
||||
String? mainImageUrl;
|
||||
|
||||
String? loaderImageId;
|
||||
|
||||
String? loaderImageUrl;
|
||||
|
||||
String? primaryColor;
|
||||
|
||||
String? secondaryColor;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
LayoutMainPageType? layoutMainPage;
|
||||
|
||||
List<String>? languages;
|
||||
|
||||
String? sectionEventId;
|
||||
|
||||
SectionEventDTO? sectionEventDTO;
|
||||
|
||||
bool? isAssistant;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is ApplicationInstanceDTO &&
|
||||
other.id == id &&
|
||||
other.instanceId == instanceId &&
|
||||
other.appType == appType &&
|
||||
_deepEquality.equals(other.configurations, configurations) &&
|
||||
other.mainImageId == mainImageId &&
|
||||
other.mainImageUrl == mainImageUrl &&
|
||||
other.loaderImageId == loaderImageId &&
|
||||
other.loaderImageUrl == loaderImageUrl &&
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.layoutMainPage == layoutMainPage &&
|
||||
_deepEquality.equals(other.languages, languages) &&
|
||||
other.sectionEventId == sectionEventId &&
|
||||
other.sectionEventDTO == sectionEventDTO &&
|
||||
other.isAssistant == isAssistant;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(id == null ? 0 : id!.hashCode) +
|
||||
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||
(appType == null ? 0 : appType!.hashCode) +
|
||||
(configurations == null ? 0 : configurations!.hashCode) +
|
||||
(mainImageId == null ? 0 : mainImageId!.hashCode) +
|
||||
(mainImageUrl == null ? 0 : mainImageUrl!.hashCode) +
|
||||
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
|
||||
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
|
||||
(primaryColor == null ? 0 : primaryColor!.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor!.hashCode) +
|
||||
(layoutMainPage == null ? 0 : layoutMainPage!.hashCode) +
|
||||
(languages == null ? 0 : languages!.hashCode) +
|
||||
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
||||
(sectionEventDTO == null ? 0 : sectionEventDTO!.hashCode) +
|
||||
(isAssistant == null ? 0 : isAssistant!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'ApplicationInstanceDTO[id=$id, instanceId=$instanceId, appType=$appType, configurations=$configurations, mainImageId=$mainImageId, mainImageUrl=$mainImageUrl, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, primaryColor=$primaryColor, secondaryColor=$secondaryColor, layoutMainPage=$layoutMainPage, languages=$languages, sectionEventId=$sectionEventId, sectionEventDTO=$sectionEventDTO, isAssistant=$isAssistant]';
|
||||
|
||||
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.appType != null) {
|
||||
json[r'appType'] = this.appType;
|
||||
} else {
|
||||
json[r'appType'] = null;
|
||||
}
|
||||
if (this.configurations != null) {
|
||||
json[r'configurations'] = this.configurations;
|
||||
} else {
|
||||
json[r'configurations'] = null;
|
||||
}
|
||||
if (this.mainImageId != null) {
|
||||
json[r'mainImageId'] = this.mainImageId;
|
||||
} else {
|
||||
json[r'mainImageId'] = null;
|
||||
}
|
||||
if (this.mainImageUrl != null) {
|
||||
json[r'mainImageUrl'] = this.mainImageUrl;
|
||||
} else {
|
||||
json[r'mainImageUrl'] = null;
|
||||
}
|
||||
if (this.loaderImageId != null) {
|
||||
json[r'loaderImageId'] = this.loaderImageId;
|
||||
} else {
|
||||
json[r'loaderImageId'] = null;
|
||||
}
|
||||
if (this.loaderImageUrl != null) {
|
||||
json[r'loaderImageUrl'] = this.loaderImageUrl;
|
||||
} else {
|
||||
json[r'loaderImageUrl'] = null;
|
||||
}
|
||||
if (this.primaryColor != null) {
|
||||
json[r'primaryColor'] = this.primaryColor;
|
||||
} else {
|
||||
json[r'primaryColor'] = null;
|
||||
}
|
||||
if (this.secondaryColor != null) {
|
||||
json[r'secondaryColor'] = this.secondaryColor;
|
||||
} else {
|
||||
json[r'secondaryColor'] = null;
|
||||
}
|
||||
if (this.layoutMainPage != null) {
|
||||
json[r'layoutMainPage'] = this.layoutMainPage;
|
||||
} else {
|
||||
json[r'layoutMainPage'] = null;
|
||||
}
|
||||
if (this.languages != null) {
|
||||
json[r'languages'] = this.languages;
|
||||
} else {
|
||||
json[r'languages'] = null;
|
||||
}
|
||||
if (this.sectionEventId != null) {
|
||||
json[r'sectionEventId'] = this.sectionEventId;
|
||||
} else {
|
||||
json[r'sectionEventId'] = null;
|
||||
}
|
||||
if (this.sectionEventDTO != null) {
|
||||
json[r'sectionEventDTO'] = this.sectionEventDTO;
|
||||
} else {
|
||||
json[r'sectionEventDTO'] = null;
|
||||
}
|
||||
if (this.isAssistant != null) {
|
||||
json[r'isAssistant'] = this.isAssistant;
|
||||
} else {
|
||||
json[r'isAssistant'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ApplicationInstanceDTO] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ApplicationInstanceDTO? 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 "ApplicationInstanceDTO[$key]" is missing from JSON.');
|
||||
assert(json[key] != null,
|
||||
'Required key "ApplicationInstanceDTO[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return ApplicationInstanceDTO(
|
||||
id: mapValueOfType<String>(json, r'id'),
|
||||
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
||||
appType: AppType.fromJson(json[r'appType']),
|
||||
configurations:
|
||||
AppConfigurationLink.listFromJson(json[r'configurations']),
|
||||
mainImageId: mapValueOfType<String>(json, r'mainImageId'),
|
||||
mainImageUrl: mapValueOfType<String>(json, r'mainImageUrl'),
|
||||
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
|
||||
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
|
||||
primaryColor: mapValueOfType<String>(json, r'primaryColor'),
|
||||
secondaryColor: mapValueOfType<String>(json, r'secondaryColor'),
|
||||
layoutMainPage: LayoutMainPageType.fromJson(json[r'layoutMainPage']),
|
||||
languages: json[r'languages'] is Iterable
|
||||
? (json[r'languages'] as Iterable)
|
||||
.cast<String>()
|
||||
.toList(growable: false)
|
||||
: const [],
|
||||
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
||||
sectionEventDTO: SectionEventDTO.fromJson(json[r'sectionEventDTO']),
|
||||
isAssistant: mapValueOfType<bool>(json, r'isAssistant'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ApplicationInstanceDTO> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <ApplicationInstanceDTO>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ApplicationInstanceDTO.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ApplicationInstanceDTO> mapFromJson(dynamic json) {
|
||||
final map = <String, ApplicationInstanceDTO>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ApplicationInstanceDTO.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ApplicationInstanceDTO-objects as value to a dart map
|
||||
static Map<String, List<ApplicationInstanceDTO>> mapListFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final map = <String, List<ApplicationInstanceDTO>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ApplicationInstanceDTO.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,409 @@
|
||||
//
|
||||
// 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 ApplicationInstanceDTOSectionEventDTO {
|
||||
/// Returns a new [ApplicationInstanceDTOSectionEventDTO] instance.
|
||||
ApplicationInstanceDTOSectionEventDTO({
|
||||
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 ApplicationInstanceDTOSectionEventDTO &&
|
||||
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() =>
|
||||
'ApplicationInstanceDTOSectionEventDTO[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 [ApplicationInstanceDTOSectionEventDTO] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ApplicationInstanceDTOSectionEventDTO? 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 "ApplicationInstanceDTOSectionEventDTO[$key]" is missing from JSON.');
|
||||
assert(json[key] != null,
|
||||
'Required key "ApplicationInstanceDTOSectionEventDTO[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return ApplicationInstanceDTOSectionEventDTO(
|
||||
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<ApplicationInstanceDTOSectionEventDTO> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <ApplicationInstanceDTOSectionEventDTO>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ApplicationInstanceDTOSectionEventDTO.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ApplicationInstanceDTOSectionEventDTO> mapFromJson(
|
||||
dynamic json) {
|
||||
final map = <String, ApplicationInstanceDTOSectionEventDTO>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value =
|
||||
ApplicationInstanceDTOSectionEventDTO.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ApplicationInstanceDTOSectionEventDTO-objects as value to a dart map
|
||||
static Map<String, List<ApplicationInstanceDTOSectionEventDTO>>
|
||||
mapListFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final map = <String, List<ApplicationInstanceDTOSectionEventDTO>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ApplicationInstanceDTOSectionEventDTO.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,387 @@
|
||||
//
|
||||
// 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 ApplicationInstanceSectionEvent {
|
||||
/// Returns a new [ApplicationInstanceSectionEvent] instance.
|
||||
ApplicationInstanceSectionEvent({
|
||||
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 ApplicationInstanceSectionEvent &&
|
||||
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() =>
|
||||
'ApplicationInstanceSectionEvent[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 [ApplicationInstanceSectionEvent] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ApplicationInstanceSectionEvent? 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 "ApplicationInstanceSectionEvent[$key]" is missing from JSON.');
|
||||
assert(json[key] != null,
|
||||
'Required key "ApplicationInstanceSectionEvent[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return ApplicationInstanceSectionEvent(
|
||||
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<ApplicationInstanceSectionEvent> listFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final result = <ApplicationInstanceSectionEvent>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ApplicationInstanceSectionEvent.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ApplicationInstanceSectionEvent> mapFromJson(
|
||||
dynamic json) {
|
||||
final map = <String, ApplicationInstanceSectionEvent>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ApplicationInstanceSectionEvent.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ApplicationInstanceSectionEvent-objects as value to a dart map
|
||||
static Map<String, List<ApplicationInstanceSectionEvent>> mapListFromJson(
|
||||
dynamic json, {
|
||||
bool growable = false,
|
||||
}) {
|
||||
final map = <String, List<ApplicationInstanceSectionEvent>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ApplicationInstanceSectionEvent.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',
|
||||
};
|
||||
}
|
||||
@ -17,6 +17,14 @@ class InstanceDTO {
|
||||
this.name,
|
||||
this.dateCreation,
|
||||
this.pinCode,
|
||||
this.isPushNotification,
|
||||
this.isStatistic,
|
||||
this.isMobile,
|
||||
this.isTablet,
|
||||
this.isWeb,
|
||||
this.isVR,
|
||||
this.isAssistant,
|
||||
this.applicationInstanceDTOs = const [],
|
||||
});
|
||||
|
||||
String? id;
|
||||
@ -27,6 +35,58 @@ class InstanceDTO {
|
||||
|
||||
String? pinCode;
|
||||
|
||||
///
|
||||
/// 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? isPushNotification;
|
||||
|
||||
///
|
||||
/// 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? isStatistic;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isMobile;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isTablet;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isWeb;
|
||||
|
||||
///
|
||||
/// 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? isVR;
|
||||
|
||||
bool? isAssistant;
|
||||
|
||||
List<ApplicationInstanceDTO>? applicationInstanceDTOs;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
@ -34,7 +94,16 @@ class InstanceDTO {
|
||||
other.id == id &&
|
||||
other.name == name &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.pinCode == pinCode;
|
||||
other.pinCode == pinCode &&
|
||||
other.isPushNotification == isPushNotification &&
|
||||
other.isStatistic == isStatistic &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isTablet == isTablet &&
|
||||
other.isWeb == isWeb &&
|
||||
other.isVR == isVR &&
|
||||
other.isAssistant == isAssistant &&
|
||||
_deepEquality.equals(
|
||||
other.applicationInstanceDTOs, applicationInstanceDTOs);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -42,11 +111,19 @@ class InstanceDTO {
|
||||
(id == null ? 0 : id!.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||
(pinCode == null ? 0 : pinCode!.hashCode) +
|
||||
(isPushNotification == null ? 0 : isPushNotification!.hashCode) +
|
||||
(isStatistic == null ? 0 : isStatistic!.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile!.hashCode) +
|
||||
(isTablet == null ? 0 : isTablet!.hashCode) +
|
||||
(isWeb == null ? 0 : isWeb!.hashCode) +
|
||||
(isVR == null ? 0 : isVR!.hashCode) +
|
||||
(isAssistant == null ? 0 : isAssistant!.hashCode) +
|
||||
(applicationInstanceDTOs == null ? 0 : applicationInstanceDTOs!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]';
|
||||
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isWeb=$isWeb, isVR=$isVR, isAssistant=$isAssistant, applicationInstanceDTOs=$applicationInstanceDTOs]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -70,6 +147,46 @@ class InstanceDTO {
|
||||
} else {
|
||||
json[r'pinCode'] = null;
|
||||
}
|
||||
if (this.isPushNotification != null) {
|
||||
json[r'isPushNotification'] = this.isPushNotification;
|
||||
} else {
|
||||
json[r'isPushNotification'] = null;
|
||||
}
|
||||
if (this.isStatistic != null) {
|
||||
json[r'isStatistic'] = this.isStatistic;
|
||||
} else {
|
||||
json[r'isStatistic'] = null;
|
||||
}
|
||||
if (this.isMobile != null) {
|
||||
json[r'isMobile'] = this.isMobile;
|
||||
} else {
|
||||
json[r'isMobile'] = null;
|
||||
}
|
||||
if (this.isTablet != null) {
|
||||
json[r'isTablet'] = this.isTablet;
|
||||
} else {
|
||||
json[r'isTablet'] = null;
|
||||
}
|
||||
if (this.isWeb != null) {
|
||||
json[r'isWeb'] = this.isWeb;
|
||||
} else {
|
||||
json[r'isWeb'] = null;
|
||||
}
|
||||
if (this.isVR != null) {
|
||||
json[r'isVR'] = this.isVR;
|
||||
} else {
|
||||
json[r'isVR'] = null;
|
||||
}
|
||||
if (this.isAssistant != null) {
|
||||
json[r'isAssistant'] = this.isAssistant;
|
||||
} else {
|
||||
json[r'isAssistant'] = null;
|
||||
}
|
||||
if (this.applicationInstanceDTOs != null) {
|
||||
json[r'applicationInstanceDTOs'] = this.applicationInstanceDTOs;
|
||||
} else {
|
||||
json[r'applicationInstanceDTOs'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -98,6 +215,15 @@ class InstanceDTO {
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
||||
pinCode: mapValueOfType<String>(json, r'pinCode'),
|
||||
isPushNotification: mapValueOfType<bool>(json, r'isPushNotification'),
|
||||
isStatistic: mapValueOfType<bool>(json, r'isStatistic'),
|
||||
isMobile: mapValueOfType<bool>(json, r'isMobile'),
|
||||
isTablet: mapValueOfType<bool>(json, r'isTablet'),
|
||||
isWeb: mapValueOfType<bool>(json, r'isWeb'),
|
||||
isVR: mapValueOfType<bool>(json, r'isVR'),
|
||||
isAssistant: mapValueOfType<bool>(json, r'isAssistant'),
|
||||
applicationInstanceDTOs: ApplicationInstanceDTO.listFromJson(
|
||||
json[r'applicationInstanceDTOs']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
102
manager_api_new/lib/model/layout_main_page_type.dart
Normal file
102
manager_api_new/lib/model/layout_main_page_type.dart
Normal file
@ -0,0 +1,102 @@
|
||||
//
|
||||
// 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 SimpleGrid = LayoutMainPageType._(0);
|
||||
static const MasonryGrid = LayoutMainPageType._(1);
|
||||
|
||||
/// List of all possible values in this [enum][LayoutMainPageType].
|
||||
static const values = <LayoutMainPageType>[
|
||||
SimpleGrid,
|
||||
MasonryGrid,
|
||||
];
|
||||
|
||||
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) {
|
||||
if(data.runtimeType == String) {
|
||||
switch (data.toString()) {
|
||||
case r'SimpleGrid': return LayoutMainPageType.SimpleGrid;
|
||||
case r'MasonryGrid': return LayoutMainPageType.MasonryGrid;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(data.runtimeType == int) {
|
||||
switch (data) {
|
||||
case 0: return LayoutMainPageType.SimpleGrid;
|
||||
case 1: return LayoutMainPageType.MasonryGrid;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [LayoutMainPageTypeTypeTransformer] instance.
|
||||
static LayoutMainPageTypeTypeTransformer? _instance;
|
||||
}
|
||||
31
manager_api_new/lib/model/map_annotation.dart
Normal file
31
manager_api_new/lib/model/map_annotation.dart
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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 {
|
||||
MapAnnotation({this.id});
|
||||
String? id;
|
||||
|
||||
static MapAnnotation? fromJson(dynamic value) => value is Map ? MapAnnotation() : 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 const requiredKeys = <String>{};
|
||||
}
|
||||
31
manager_api_new/lib/model/programme_block.dart
Normal file
31
manager_api_new/lib/model/programme_block.dart
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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 ProgrammeBlock {
|
||||
ProgrammeBlock({this.id});
|
||||
String? id;
|
||||
|
||||
static ProgrammeBlock? fromJson(dynamic value) => value is Map ? ProgrammeBlock() : null;
|
||||
|
||||
static List<ProgrammeBlock> listFromJson(dynamic json, {bool growable = false}) {
|
||||
final result = <ProgrammeBlock>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ProgrammeBlock.fromJson(row);
|
||||
if (value != null) result.add(value);
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
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