mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
72 lines
2.0 KiB
Dart
72 lines
2.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 SliderDTO {
|
|
/// Returns a new [SliderDTO] instance.
|
|
SliderDTO({
|
|
this.images,
|
|
});
|
|
|
|
List<ImageDTO> images;
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is SliderDTO &&
|
|
other.images == images;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
(images == null ? 0 : images.hashCode);
|
|
|
|
@override
|
|
String toString() => 'SliderDTO[images=$images]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
if (images != null) {
|
|
json[r'images'] = images;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [SliderDTO] instance and imports its values from
|
|
/// [json] if it's non-null, null if [json] is null.
|
|
static SliderDTO fromJson(Map<String, dynamic> json) => json == null
|
|
? null
|
|
: SliderDTO(
|
|
images: ImageDTO.listFromJson(json[r'images']),
|
|
);
|
|
|
|
static List<SliderDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
|
json == null || json.isEmpty
|
|
? true == emptyIsNull ? null : <SliderDTO>[]
|
|
: json.map((v) => SliderDTO.fromJson(v)).toList(growable: true == growable);
|
|
|
|
static Map<String, SliderDTO> mapFromJson(Map<String, dynamic> json) {
|
|
final map = <String, SliderDTO>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) => map[key] = SliderDTO.fromJson(v));
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of SliderDTO-objects as value to a dart map
|
|
static Map<String, List<SliderDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
|
final map = <String, List<SliderDTO>>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) {
|
|
map[key] = SliderDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
|
});
|
|
}
|
|
return map;
|
|
}
|
|
}
|
|
|