// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars part of openapi.api; /// Un endroit ou une ressource est employee. Renvoye par GET /api/Resource/{id}/usages. class ResourceUsageDTO { ResourceUsageDTO({ this.kind, this.id, this.label, this.configurationId, this.configurationLabel, this.sectionId, this.field, this.path, }); /// Section | GuidedPath | GuidedStep | Configuration String? kind; String? id; String? label; String? configurationId; String? configurationLabel; /// Section porteuse, pour ouvrir le contenu. Nulle pour kind = Configuration. String? sectionId; String? field; /// Chaine lisible : "Escape game > Parcours > image". String? path; @override bool operator ==(Object other) => identical(this, other) || other is ResourceUsageDTO && other.kind == kind && other.id == id && other.field == field; @override int get hashCode => (kind == null ? 0 : kind!.hashCode) + (id == null ? 0 : id!.hashCode) + (field == null ? 0 : field!.hashCode); @override String toString() => 'ResourceUsageDTO[kind=$kind, id=$id, path=$path]'; Map toJson() { final json = {}; json[r'kind'] = this.kind; json[r'id'] = this.id; json[r'label'] = this.label; json[r'configurationId'] = this.configurationId; json[r'configurationLabel'] = this.configurationLabel; json[r'sectionId'] = this.sectionId; json[r'field'] = this.field; json[r'path'] = this.path; return json; } // ignore: prefer_constructors_over_static_methods static ResourceUsageDTO? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); return ResourceUsageDTO( kind: mapValueOfType(json, r'kind'), id: mapValueOfType(json, r'id'), label: mapValueOfType(json, r'label'), configurationId: mapValueOfType(json, r'configurationId'), configurationLabel: mapValueOfType(json, r'configurationLabel'), sectionId: mapValueOfType(json, r'sectionId'), field: mapValueOfType(json, r'field'), path: mapValueOfType(json, r'path'), ); } return null; } static List listFromJson( dynamic json, { bool growable = false, }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { final value = ResourceUsageDTO.fromJson(row); if (value != null) { result.add(value); } } } return result.toList(growable: growable); } }