Update service generation

This commit is contained in:
Fransolet Thomas 2022-12-27 22:15:28 +01:00
parent ed9c4bfc15
commit 509d7b6adf
7 changed files with 2301 additions and 3557 deletions

View File

@ -131,7 +131,7 @@ class _ArticleConfigState extends State<ArticleConfig> {
maxLines: 1,
),
CheckInputContainer(
label: "Lecture auto audio :",
label: "Lecture audio auto :",
isChecked: articleDTO.isReadAudioAuto,
onChanged: (value) {
setState(() {
@ -184,7 +184,6 @@ class _ArticleConfigState extends State<ArticleConfig> {
articleToSend.isContentTop = articleDTO.isContentTop;
articleToSend.content = articleDTO.content;
articleToSend.isReadAudioAuto = articleDTO.isReadAudioAuto;
articleToSend.qrCode = articleDTO.qrCode;
widget.onChanged(jsonEncode(articleToSend).toString());
});
},

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,6 @@ import 'package:manager_api_new/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**qrCode** | **String** | | [optional]
**isContentTop** | **bool** | | [optional]
**audioIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**isReadAudioAuto** | **bool** | | [optional]

View File

@ -22,6 +22,11 @@ Name | Type | Description | Notes
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -14,7 +14,6 @@ class ArticleDTO {
/// Returns a new [ArticleDTO] instance.
ArticleDTO({
this.content = const [],
this.qrCode,
this.isContentTop,
this.audioIds = const [],
this.isReadAudioAuto,
@ -23,8 +22,6 @@ class ArticleDTO {
List<TranslationDTO>? content;
String? qrCode;
///
/// 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
@ -48,7 +45,6 @@ class ArticleDTO {
@override
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
other.content == content &&
other.qrCode == qrCode &&
other.isContentTop == isContentTop &&
other.audioIds == audioIds &&
other.isReadAudioAuto == isReadAudioAuto &&
@ -58,23 +54,19 @@ class ArticleDTO {
int get hashCode =>
// ignore: unnecessary_parenthesis
(content == null ? 0 : content!.hashCode) +
(qrCode == null ? 0 : qrCode!.hashCode) +
(isContentTop == null ? 0 : isContentTop!.hashCode) +
(audioIds == null ? 0 : audioIds!.hashCode) +
(isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) +
(images == null ? 0 : images!.hashCode);
@override
String toString() => 'ArticleDTO[content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]';
String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
if (content != null) {
_json[r'content'] = content;
}
if (qrCode != null) {
_json[r'qrCode'] = qrCode;
}
if (isContentTop != null) {
_json[r'isContentTop'] = isContentTop;
}
@ -110,7 +102,6 @@ class ArticleDTO {
return ArticleDTO(
content: TranslationDTO.listFromJson(json[r'content']) ?? const [],
qrCode: mapValueOfType<String>(json, r'qrCode'),
isContentTop: mapValueOfType<bool>(json, r'isContentTop'),
audioIds: TranslationDTO.listFromJson(json[r'audioIds']) ?? const [],
isReadAudioAuto: mapValueOfType<bool>(json, r'isReadAudioAuto'),

View File

@ -27,6 +27,11 @@ class SectionDTO {
this.dateCreation,
this.order,
this.instanceId,
this.latitude,
this.longitude,
this.meterZoneGPS,
this.isBeacon,
this.beaconId,
});
String? id;
@ -81,6 +86,22 @@ class SectionDTO {
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;
String? beaconId;
@override
bool operator ==(Object other) => identical(this, other) || other is SectionDTO &&
other.id == id &&
@ -96,7 +117,12 @@ class SectionDTO {
other.data == data &&
other.dateCreation == dateCreation &&
other.order == order &&
other.instanceId == instanceId;
other.instanceId == instanceId &&
other.latitude == latitude &&
other.longitude == longitude &&
other.meterZoneGPS == meterZoneGPS &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId;
@override
int get hashCode =>
@ -114,10 +140,15 @@ class SectionDTO {
(data == null ? 0 : data!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) +
(order == null ? 0 : order!.hashCode) +
(instanceId == null ? 0 : instanceId!.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);
@override
String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId]';
String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
@ -163,6 +194,21 @@ class SectionDTO {
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
if (latitude != null) {
_json[r'latitude'] = latitude;
}
if (longitude != null) {
_json[r'longitude'] = longitude;
}
if (meterZoneGPS != null) {
_json[r'meterZoneGPS'] = meterZoneGPS;
}
if (isBeacon != null) {
_json[r'isBeacon'] = isBeacon;
}
if (beaconId != null) {
_json[r'beaconId'] = beaconId;
}
return _json;
}
@ -199,6 +245,11 @@ class SectionDTO {
dateCreation: mapDateTime(json, r'dateCreation', ''),
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<String>(json, r'beaconId'),
);
}
return null;

View File

@ -11,6 +11,6 @@ environment:
dependencies:
http: '>=0.13.0 <0.14.0'
intl: '^0.17.0'
meta:
meta: '^1.1.8'
dev_dependencies:
test: '>=1.16.0 <1.18.0'