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