109 lines
2.9 KiB
Dart
109 lines
2.9 KiB
Dart
//
|
|
// 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<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
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<String, dynamic>();
|
|
return ResourceUsageDTO(
|
|
kind: mapValueOfType<String>(json, r'kind'),
|
|
id: mapValueOfType<String>(json, r'id'),
|
|
label: mapValueOfType<String>(json, r'label'),
|
|
configurationId: mapValueOfType<String>(json, r'configurationId'),
|
|
configurationLabel: mapValueOfType<String>(json, r'configurationLabel'),
|
|
sectionId: mapValueOfType<String>(json, r'sectionId'),
|
|
field: mapValueOfType<String>(json, r'field'),
|
|
path: mapValueOfType<String>(json, r'path'),
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
static List<ResourceUsageDTO> listFromJson(
|
|
dynamic json, {
|
|
bool growable = false,
|
|
}) {
|
|
final result = <ResourceUsageDTO>[];
|
|
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);
|
|
}
|
|
}
|