117 lines
3.4 KiB
Dart
117 lines
3.4 KiB
Dart
//
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
//
|
|
// @dart=2.0
|
|
|
|
// ignore_for_file: unused_element, unused_import
|
|
// ignore_for_file: always_put_required_named_parameters_first
|
|
// ignore_for_file: lines_longer_than_80_chars
|
|
|
|
part of openapi.api;
|
|
|
|
class ArticleDTO {
|
|
/// Returns a new [ArticleDTO] instance.
|
|
ArticleDTO({
|
|
this.content,
|
|
this.qrCode,
|
|
this.isContentTop,
|
|
this.audioId,
|
|
this.isReadAudioAuto,
|
|
this.images,
|
|
});
|
|
|
|
List<TranslationDTO> content;
|
|
|
|
String qrCode;
|
|
|
|
bool isContentTop;
|
|
|
|
String audioId;
|
|
|
|
bool isReadAudioAuto;
|
|
|
|
List<ImageDTO> images;
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
|
|
other.content == content &&
|
|
other.qrCode == qrCode &&
|
|
other.isContentTop == isContentTop &&
|
|
other.audioId == audioId &&
|
|
other.isReadAudioAuto == isReadAudioAuto &&
|
|
other.images == images;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
(content == null ? 0 : content.hashCode) +
|
|
(qrCode == null ? 0 : qrCode.hashCode) +
|
|
(isContentTop == null ? 0 : isContentTop.hashCode) +
|
|
(audioId == null ? 0 : audioId.hashCode) +
|
|
(isReadAudioAuto == null ? 0 : isReadAudioAuto.hashCode) +
|
|
(images == null ? 0 : images.hashCode);
|
|
|
|
@override
|
|
String toString() => 'ArticleDTO[content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioId=$audioId, 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;
|
|
}
|
|
if (audioId != null) {
|
|
json[r'audioId'] = audioId;
|
|
}
|
|
if (isReadAudioAuto != null) {
|
|
json[r'isReadAudioAuto'] = isReadAudioAuto;
|
|
}
|
|
if (images != null) {
|
|
json[r'images'] = images;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [ArticleDTO] instance and imports its values from
|
|
/// [json] if it's non-null, null if [json] is null.
|
|
static ArticleDTO fromJson(Map<String, dynamic> json) => json == null
|
|
? null
|
|
: ArticleDTO(
|
|
content: TranslationDTO.listFromJson(json[r'content']),
|
|
qrCode: json[r'qrCode'],
|
|
isContentTop: json[r'isContentTop'],
|
|
audioId: json[r'audioId'],
|
|
isReadAudioAuto: json[r'isReadAudioAuto'],
|
|
images: ImageDTO.listFromJson(json[r'images']),
|
|
);
|
|
|
|
static List<ArticleDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
|
json == null || json.isEmpty
|
|
? true == emptyIsNull ? null : <ArticleDTO>[]
|
|
: json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable);
|
|
|
|
static Map<String, ArticleDTO> mapFromJson(Map<String, dynamic> json) {
|
|
final map = <String, ArticleDTO>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) => map[key] = ArticleDTO.fromJson(v));
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of ArticleDTO-objects as value to a dart map
|
|
static Map<String, List<ArticleDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
|
final map = <String, List<ArticleDTO>>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) {
|
|
map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
|
});
|
|
}
|
|
return map;
|
|
}
|
|
}
|
|
|