108 lines
3.0 KiB
Dart
108 lines
3.0 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 ImageDTO {
|
|
/// Returns a new [ImageDTO] instance.
|
|
ImageDTO({
|
|
this.title,
|
|
this.description,
|
|
this.resourceId,
|
|
this.source_,
|
|
this.order,
|
|
});
|
|
|
|
List<TranslationDTO> title;
|
|
|
|
List<TranslationDTO> description;
|
|
|
|
String resourceId;
|
|
|
|
String source_;
|
|
|
|
int order;
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is ImageDTO &&
|
|
other.title == title &&
|
|
other.description == description &&
|
|
other.resourceId == resourceId &&
|
|
other.source_ == source_ &&
|
|
other.order == order;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
(title == null ? 0 : title.hashCode) +
|
|
(description == null ? 0 : description.hashCode) +
|
|
(resourceId == null ? 0 : resourceId.hashCode) +
|
|
(source_ == null ? 0 : source_.hashCode) +
|
|
(order == null ? 0 : order.hashCode);
|
|
|
|
@override
|
|
String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
if (title != null) {
|
|
json[r'title'] = title;
|
|
}
|
|
if (description != null) {
|
|
json[r'description'] = description;
|
|
}
|
|
if (resourceId != null) {
|
|
json[r'resourceId'] = resourceId;
|
|
}
|
|
if (source_ != null) {
|
|
json[r'source'] = source_;
|
|
}
|
|
if (order != null) {
|
|
json[r'order'] = order;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [ImageDTO] instance and imports its values from
|
|
/// [json] if it's non-null, null if [json] is null.
|
|
static ImageDTO fromJson(Map<String, dynamic> json) => json == null
|
|
? null
|
|
: ImageDTO(
|
|
title: TranslationDTO.listFromJson(json[r'title']),
|
|
description: TranslationDTO.listFromJson(json[r'description']),
|
|
resourceId: json[r'resourceId'],
|
|
source_: json[r'source'],
|
|
order: json[r'order'],
|
|
);
|
|
|
|
static List<ImageDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
|
json == null || json.isEmpty
|
|
? true == emptyIsNull ? null : <ImageDTO>[]
|
|
: json.map((v) => ImageDTO.fromJson(v)).toList(growable: true == growable);
|
|
|
|
static Map<String, ImageDTO> mapFromJson(Map<String, dynamic> json) {
|
|
final map = <String, ImageDTO>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) => map[key] = ImageDTO.fromJson(v));
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of ImageDTO-objects as value to a dart map
|
|
static Map<String, List<ImageDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
|
final map = <String, List<ImageDTO>>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) {
|
|
map[key] = ImageDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
|
});
|
|
}
|
|
return map;
|
|
}
|
|
}
|
|
|