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