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