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