// // 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 WidgetAPI { /// Returns a new [Widget] instance. WidgetAPI({ 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 WidgetAPI && 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 toJson() { final json = {}; 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 WidgetAPI fromJson(Map json) => json == null ? null : WidgetAPI( 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 listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty ? true == emptyIsNull ? null : [] : json.map((v) => WidgetAPI.fromJson(v)).toList(growable: true == growable); static Map mapFromJson(Map json) { final map = {}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) => map[key] = WidgetAPI.fromJson(v)); } return map; } // maps a json object with a list of Widget-objects as value to a dart map static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { map[key] = WidgetAPI.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; } }