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