// // 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 Instance { /// Returns a new [Instance] instance. Instance({ this.id, this.name, this.dateCreation, }); String id; String name; DateTime dateCreation; @override bool operator ==(Object other) => identical(this, other) || other is Instance && other.id == id && other.name == name && other.dateCreation == dateCreation; @override int get hashCode => (id == null ? 0 : id.hashCode) + (name == null ? 0 : name.hashCode) + (dateCreation == null ? 0 : dateCreation.hashCode); @override String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]'; Map toJson() { final json = {}; if (id != null) { json[r'id'] = id; } if (name != null) { json[r'name'] = name; } if (dateCreation != null) { json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); } return json; } /// Returns a new [Instance] instance and imports its values from /// [json] if it's non-null, null if [json] is null. static Instance fromJson(Map json) => json == null ? null : Instance( id: json[r'id'], name: json[r'name'], dateCreation: json[r'dateCreation'] == null ? null : DateTime.parse(json[r'dateCreation']), ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty ? true == emptyIsNull ? null : [] : json.map((v) => Instance.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] = Instance.fromJson(v)); } return map; } // maps a json object with a list of Instance-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] = Instance.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; } }