2024-08-09 19:45:52 +02:00
|
|
|
//
|
|
|
|
// 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;
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
class FoldersResponse {
|
|
|
|
/// Returns a new [FoldersResponse] instance.
|
|
|
|
FoldersResponse({
|
2024-08-13 21:39:25 +02:00
|
|
|
this.enabled = false,
|
2024-08-29 21:29:04 +02:00
|
|
|
this.sidebarWeb = false,
|
2024-08-09 19:45:52 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
bool enabled;
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
bool sidebarWeb;
|
|
|
|
|
2024-08-09 19:45:52 +02:00
|
|
|
@override
|
2024-08-29 21:29:04 +02:00
|
|
|
bool operator ==(Object other) => identical(this, other) || other is FoldersResponse &&
|
|
|
|
other.enabled == enabled &&
|
|
|
|
other.sidebarWeb == sidebarWeb;
|
2024-08-09 19:45:52 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode =>
|
|
|
|
// ignore: unnecessary_parenthesis
|
2024-08-29 21:29:04 +02:00
|
|
|
(enabled.hashCode) +
|
|
|
|
(sidebarWeb.hashCode);
|
2024-08-09 19:45:52 +02:00
|
|
|
|
|
|
|
@override
|
2024-08-29 21:29:04 +02:00
|
|
|
String toString() => 'FoldersResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]';
|
2024-08-09 19:45:52 +02:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final json = <String, dynamic>{};
|
|
|
|
json[r'enabled'] = this.enabled;
|
2024-08-29 21:29:04 +02:00
|
|
|
json[r'sidebarWeb'] = this.sidebarWeb;
|
2024-08-09 19:45:52 +02:00
|
|
|
return json;
|
|
|
|
}
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
/// Returns a new [FoldersResponse] instance and imports its values from
|
2024-08-09 19:45:52 +02:00
|
|
|
/// [value] if it's a [Map], null otherwise.
|
|
|
|
// ignore: prefer_constructors_over_static_methods
|
2024-08-29 21:29:04 +02:00
|
|
|
static FoldersResponse? fromJson(dynamic value) {
|
2024-09-23 21:41:41 +02:00
|
|
|
upgradeDto(value, "FoldersResponse");
|
2024-08-09 19:45:52 +02:00
|
|
|
if (value is Map) {
|
|
|
|
final json = value.cast<String, dynamic>();
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
return FoldersResponse(
|
2024-08-09 19:45:52 +02:00
|
|
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
2024-08-29 21:29:04 +02:00
|
|
|
sidebarWeb: mapValueOfType<bool>(json, r'sidebarWeb')!,
|
2024-08-09 19:45:52 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
static List<FoldersResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final result = <FoldersResponse>[];
|
2024-08-09 19:45:52 +02:00
|
|
|
if (json is List && json.isNotEmpty) {
|
|
|
|
for (final row in json) {
|
2024-08-29 21:29:04 +02:00
|
|
|
final value = FoldersResponse.fromJson(row);
|
2024-08-09 19:45:52 +02:00
|
|
|
if (value != null) {
|
|
|
|
result.add(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result.toList(growable: growable);
|
|
|
|
}
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
static Map<String, FoldersResponse> mapFromJson(dynamic json) {
|
|
|
|
final map = <String, FoldersResponse>{};
|
2024-08-09 19:45:52 +02:00
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
|
|
for (final entry in json.entries) {
|
2024-08-29 21:29:04 +02:00
|
|
|
final value = FoldersResponse.fromJson(entry.value);
|
2024-08-09 19:45:52 +02:00
|
|
|
if (value != null) {
|
|
|
|
map[entry.key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
2024-08-29 21:29:04 +02:00
|
|
|
// maps a json object with a list of FoldersResponse-objects as value to a dart map
|
|
|
|
static Map<String, List<FoldersResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final map = <String, List<FoldersResponse>>{};
|
2024-08-09 19:45:52 +02:00
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
// ignore: parameter_assignments
|
|
|
|
json = json.cast<String, dynamic>();
|
|
|
|
for (final entry in json.entries) {
|
2024-08-29 21:29:04 +02:00
|
|
|
map[entry.key] = FoldersResponse.listFromJson(entry.value, growable: growable,);
|
2024-08-09 19:45:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
|
|
static const requiredKeys = <String>{
|
|
|
|
'enabled',
|
2024-08-29 21:29:04 +02:00
|
|
|
'sidebarWeb',
|
2024-08-09 19:45:52 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|