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