From 86630031168ed6262c048f9e96a8251c0f038f79 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 10 Dec 2022 14:06:14 +0100 Subject: [PATCH] specs,nextcloud,neon: Fix capabilities mess --- .../integration_test/screenshot_test.dart | 6 +- packages/neon/lib/src/pages/home.dart | 30 +- packages/neon/lib/src/utils/theme.dart | 2 +- .../nextcloud/lib/src/nextcloud.openapi.dart | 550 +++++++++--------- .../lib/src/nextcloud.openapi.g.dart | 467 ++++++++------- .../nextcloud/lib/src/nextcloud.openapi.json | 234 -------- .../nextcloud/lib/src/version_supported.dart | 9 +- specs/core.json | 234 -------- 8 files changed, 567 insertions(+), 965 deletions(-) diff --git a/packages/neon/integration_test/screenshot_test.dart b/packages/neon/integration_test/screenshot_test.dart index 1cebc89f..cb5fc122 100644 --- a/packages/neon/integration_test/screenshot_test.dart +++ b/packages/neon/integration_test/screenshot_test.dart @@ -98,7 +98,7 @@ Future pumpAppPage( final WidgetTester tester, final IntegrationTestWidgetsFlutterBinding binding, final PackageInfo packageInfo, { - required final Widget Function(BuildContext, Function(NextcloudTheme)) builder, + required final Widget Function(BuildContext, Function(NextcloudTheme?)) builder, final Account? account, }) async { final sharedPreferences = MemorySharedPreferences(); @@ -134,7 +134,7 @@ Future pumpAppPage( ); // ignore: close_sinks - final userThemeStream = BehaviorSubject(); + final userThemeStream = BehaviorSubject(); await tester.pumpWidget( MultiProvider( @@ -167,7 +167,7 @@ Future pumpAppPage( create: (final _) => packageInfo, ), ], - child: StreamBuilder( + child: StreamBuilder( stream: userThemeStream, builder: (final context, final themeSnapshot) => OptionBuilder( option: globalOptions.themeMode, diff --git a/packages/neon/lib/src/pages/home.dart b/packages/neon/lib/src/pages/home.dart index 612edea8..e39f9d11 100644 --- a/packages/neon/lib/src/pages/home.dart +++ b/packages/neon/lib/src/pages/home.dart @@ -10,7 +10,7 @@ class HomePage extends StatefulWidget { }); final Account account; - final Function(NextcloudTheme theme) onThemeChanged; + final Function(NextcloudTheme? theme) onThemeChanged; @override State createState() => _HomePageState(); @@ -34,7 +34,7 @@ class _HomePageState extends State { _capabilitiesBloc.capabilities.listen((final result) async { if (result.data != null) { - widget.onThemeChanged(result.data!.capabilities.theming!); + widget.onThemeChanged(result.data!.capabilities.theming); // ignore cached version and prevent duplicate dialogs if (result.cached) { @@ -240,17 +240,21 @@ class _HomePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ if (capabilities.data != null) ...[ - Text( - capabilities.data!.capabilities.theming!.name, - style: DefaultTextStyle.of(context).style.copyWith( - color: Theme.of(context).appBarTheme.foregroundColor, - ), - ), - Flexible( - child: CachedURLImage( - url: capabilities.data!.capabilities.theming!.logo, + if (capabilities.data!.capabilities.theming?.name != null) ...[ + Text( + capabilities.data!.capabilities.theming!.name!, + style: DefaultTextStyle.of(context).style.copyWith( + color: Theme.of(context).appBarTheme.foregroundColor, + ), ), - ), + ], + if (capabilities.data!.capabilities.theming?.logo != null) ...[ + Flexible( + child: CachedURLImage( + url: capabilities.data!.capabilities.theming!.logo!, + ), + ), + ], ] else ...[ ExceptionWidget( capabilities.error, @@ -412,7 +416,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(5), child: capabilities.data?.capabilities.theming?.logo != null ? CachedURLImage( - url: capabilities.data!.capabilities.theming!.logo, + url: capabilities.data!.capabilities.theming!.logo!, ) : null, ) diff --git a/packages/neon/lib/src/utils/theme.dart b/packages/neon/lib/src/utils/theme.dart index 71a8f3e4..8c22cf87 100644 --- a/packages/neon/lib/src/utils/theme.dart +++ b/packages/neon/lib/src/utils/theme.dart @@ -9,7 +9,7 @@ ThemeData getThemeFromNextcloudTheme( required final bool oledAsDark, required final bool keepOriginalAccentColor, }) { - final primaryColor = nextcloudTheme != null ? HexColor(nextcloudTheme.color) : themePrimaryColor; + final primaryColor = nextcloudTheme?.color != null ? HexColor(nextcloudTheme!.color!) : themePrimaryColor; late final Brightness selectBrightness; switch (themeMode) { diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index d61ca963..f29b7349 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -1341,12 +1341,12 @@ class OCSMeta { @JsonSerializable() class CoreServerCapabilities_Ocs_Data_Version { CoreServerCapabilities_Ocs_Data_Version({ - required this.major, - required this.minor, - required this.micro, - required this.string, - required this.edition, - required this.extendedSupport, + this.major, + this.minor, + this.micro, + this.string, + this.edition, + this.extendedSupport, }); factory CoreServerCapabilities_Ocs_Data_Version.fromJson(Map json) => @@ -1355,17 +1355,17 @@ class CoreServerCapabilities_Ocs_Data_Version { factory CoreServerCapabilities_Ocs_Data_Version.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Version.fromJson(json.decode(data) as Map); - final int major; + final int? major; - final int minor; + final int? minor; - final int micro; + final int? micro; - final String string; + final String? string; - final String edition; + final String? edition; - final bool extendedSupport; + final bool? extendedSupport; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_VersionToJson(this); @@ -1377,10 +1377,10 @@ class CoreServerCapabilities_Ocs_Data_Version { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Core { CoreServerCapabilities_Ocs_Data_Capabilities_Core({ - required this.pollinterval, - required this.webdavRoot, - required this.referenceApi, - required this.referenceRegex, + this.pollinterval, + this.webdavRoot, + this.referenceApi, + this.referenceRegex, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(Map json) => @@ -1389,16 +1389,16 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Core { factory CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(json.decode(data) as Map); - final int pollinterval; + final int? pollinterval; @JsonKey(name: 'webdav-root') - final String webdavRoot; + final String? webdavRoot; @JsonKey(name: 'reference-api') - final bool referenceApi; + final bool? referenceApi; @JsonKey(name: 'reference-regex') - final String referenceRegex; + final String? referenceRegex; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreToJson(this); @@ -1409,7 +1409,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Core { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce { - CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce({required this.delay}); + CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce({this.delay}); factory CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceFromJson(json); @@ -1417,7 +1417,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce { factory CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson(json.decode(data) as Map); - final int delay; + final int? delay; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceToJson(this); @@ -1430,8 +1430,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable { CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable({ - required this.size, - required this.gps, + this.size, + this.gps, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson(Map json) => @@ -1441,9 +1441,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable { CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson( json.decode(data) as Map); - final List size; + final List? size; - final List gps; + final List? gps; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailableToJson(this); @@ -1456,8 +1456,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing { CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing({ - required this.url, - required this.etag, + this.url, + this.etag, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson(Map json) => @@ -1467,9 +1467,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing { CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson( json.decode(data) as Map); - final String url; + final String? url; - final String etag; + final String? etag; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditingToJson(this); @@ -1482,12 +1482,12 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Files { CoreServerCapabilities_Ocs_Data_Capabilities_Files({ - required this.bigfilechunking, - required this.blacklistedFiles, - required this.directEditing, - required this.comments, - required this.undelete, - required this.versioning, + this.bigfilechunking, + this.blacklistedFiles, + this.directEditing, + this.comments, + this.undelete, + this.versioning, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(Map json) => @@ -1496,18 +1496,18 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files { factory CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(json.decode(data) as Map); - final bool bigfilechunking; + final bool? bigfilechunking; @JsonKey(name: 'blacklisted_files') - final List blacklistedFiles; + final List? blacklistedFiles; - final CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing directEditing; + final CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing? directEditing; - final bool comments; + final bool? comments; - final bool undelete; + final bool? undelete; - final bool versioning; + final bool? versioning; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesToJson(this); @@ -1518,7 +1518,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Activity { - CoreServerCapabilities_Ocs_Data_Capabilities_Activity({required this.apiv2}); + CoreServerCapabilities_Ocs_Data_Capabilities_Activity({this.apiv2}); factory CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityFromJson(json); @@ -1526,7 +1526,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Activity { factory CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJson(json.decode(data) as Map); - final List apiv2; + final List? apiv2; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityToJson(this); @@ -1537,7 +1537,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Activity { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status { - CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status({required this.globalScale}); + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status({this.globalScale}); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusFromJson(json); @@ -1545,7 +1545,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJson(json.decode(data) as Map); - final bool globalScale; + final bool? globalScale; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusToJson(this); @@ -1558,10 +1558,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings({ - required this.frontendEnabled, - required this.allowedCircles, - required this.allowedUserTypes, - required this.membersLimit, + this.frontendEnabled, + this.allowedCircles, + this.allowedUserTypes, + this.membersLimit, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJson(Map json) => @@ -1570,13 +1570,13 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJson(json.decode(data) as Map); - final bool frontendEnabled; + final bool? frontendEnabled; - final int allowedCircles; + final int? allowedCircles; - final int allowedUserTypes; + final int? allowedUserTypes; - final int membersLimit; + final int? membersLimit; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_SettingsToJson(this); @@ -1589,8 +1589,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source({ - required this.core, - required this.extra, + this.core, + this.extra, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source.fromJson( @@ -1617,8 +1617,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Sour @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants({ - required this.flags, - required this.source, + this.flags, + this.source, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJson(Map json) => @@ -1630,7 +1630,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants { final dynamic flags; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source source; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source? source; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConstantsToJson(this); @@ -1643,8 +1643,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config({ - required this.coreFlags, - required this.systemFlags, + this.coreFlags, + this.systemFlags, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson(Map json) => @@ -1654,9 +1654,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson( json.decode(data) as Map); - final List coreFlags; + final List? coreFlags; - final List systemFlags; + final List? systemFlags; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConfigToJson(this); @@ -1669,8 +1669,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle({ - required this.constants, - required this.config, + this.constants, + this.config, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJson(Map json) => @@ -1679,9 +1679,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJson(json.decode(data) as Map); - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants constants; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants? constants; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config config; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config? config; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_CircleToJson(this); @@ -1693,7 +1693,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants { - CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants({required this.level}); + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants({this.level}); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_ConstantsFromJson(json); @@ -1715,8 +1715,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member { CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member({ - required this.constants, - required this.type, + this.constants, + this.type, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJson(Map json) => @@ -1725,7 +1725,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJson(json.decode(data) as Map); - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants constants; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants? constants; final dynamic type; @@ -1740,11 +1740,11 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Circles { CoreServerCapabilities_Ocs_Data_Capabilities_Circles({ - required this.version, - required this.status, - required this.settings, - required this.circle, - required this.member, + this.version, + this.status, + this.settings, + this.circle, + this.member, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJson(Map json) => @@ -1753,15 +1753,15 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJson(json.decode(data) as Map); - final String version; + final String? version; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status status; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status? status; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings settings; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings? settings; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle circle; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle? circle; - final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member member; + final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member? member; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_CirclesToJson(this); @@ -1772,7 +1772,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols { - CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols({required this.webdav}); + CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols({this.webdav}); factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJson( Map json) => @@ -1782,7 +1782,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols { CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJson( json.decode(data) as Map); - final String webdav; + final String? webdav; // coverage:ignore-start Map toJson() => @@ -1796,9 +1796,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes { CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes({ - required this.name, - required this.shareTypes, - required this.protocols, + this.name, + this.shareTypes, + this.protocols, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJson(Map json) => @@ -1808,11 +1808,11 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes { CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJson( json.decode(data) as Map); - final String name; + final String? name; - final List shareTypes; + final List? shareTypes; - final CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols protocols; + final CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols? protocols; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypesToJson(this); @@ -1825,10 +1825,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm { CoreServerCapabilities_Ocs_Data_Capabilities_Ocm({ - required this.enabled, - required this.apiVersion, - required this.endPoint, - required this.resourceTypes, + this.enabled, + this.apiVersion, + this.endPoint, + this.resourceTypes, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(Map json) => @@ -1837,13 +1837,13 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm { factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(json.decode(data) as Map); - final bool enabled; + final bool? enabled; - final String apiVersion; + final String? apiVersion; - final String endPoint; + final String? endPoint; - final List resourceTypes; + final List? resourceTypes; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_OcmToJson(this); @@ -1856,7 +1856,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm { class CoreServerCapabilities_Ocs_Data_Capabilities_Dav { CoreServerCapabilities_Ocs_Data_Capabilities_Dav({ this.bulkupload, - required this.chunking, + this.chunking, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJson(Map json) => @@ -1867,7 +1867,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Dav { final String? bulkupload; - final String chunking; + final String? chunking; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_DavToJson(this); @@ -1879,8 +1879,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Dav { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password({ - required this.enforced, - required this.askForOptionalPassword, + this.enforced, + this.askForOptionalPassword, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJson( @@ -1891,9 +1891,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJson( json.decode(data) as Map); - final bool enforced; + final bool? enforced; - final bool askForOptionalPassword; + final bool? askForOptionalPassword; // coverage:ignore-start Map toJson() => @@ -1906,7 +1906,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJson( Map json) => @@ -1916,7 +1916,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -1929,7 +1929,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJson( Map json) => @@ -1940,7 +1940,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -1954,7 +1954,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJson( Map json) => @@ -1965,7 +1965,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -1979,15 +1979,15 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public({ - required this.enabled, - required this.password, - required this.expireDate, - required this.multipleLinks, - required this.expireDateInternal, - required this.expireDateRemote, - required this.sendMail, - required this.upload, - required this.uploadFilesDrop, + this.enabled, + this.password, + this.expireDate, + this.multipleLinks, + this.expireDateInternal, + this.expireDateRemote, + this.sendMail, + this.upload, + this.uploadFilesDrop, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson(Map json) => @@ -1997,29 +1997,29 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password password; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password? password; @JsonKey(name: 'expire_date') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate expireDate; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate? expireDate; @JsonKey(name: 'multiple_links') - final bool multipleLinks; + final bool? multipleLinks; @JsonKey(name: 'expire_date_internal') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal expireDateInternal; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal? expireDateInternal; @JsonKey(name: 'expire_date_remote') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote expireDateRemote; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote? expireDateRemote; @JsonKey(name: 'send_mail') - final bool sendMail; + final bool? sendMail; - final bool upload; + final bool? upload; @JsonKey(name: 'upload_files_drop') - final bool uploadFilesDrop; + final bool? uploadFilesDrop; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_PublicToJson(this); @@ -2031,7 +2031,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJson( Map json) => @@ -2041,7 +2041,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -2055,8 +2055,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User({ - required this.sendMail, - required this.expireDate, + this.sendMail, + this.expireDate, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJson(Map json) => @@ -2067,10 +2067,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User { json.decode(data) as Map); @JsonKey(name: 'send_mail') - final bool sendMail; + final bool? sendMail; @JsonKey(name: 'expire_date') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate expireDate; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate? expireDate; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_UserToJson(this); @@ -2082,7 +2082,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJson( Map json) => @@ -2092,7 +2092,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -2106,8 +2106,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group({ - required this.enabled, - required this.expireDate, + this.enabled, + this.expireDate, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson(Map json) => @@ -2117,10 +2117,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; @JsonKey(name: 'expire_date') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate expireDate; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate? expireDate; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_GroupToJson(this); @@ -2132,7 +2132,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJson( Map json) => @@ -2142,7 +2142,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -2155,7 +2155,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJson( Map json) => @@ -2166,7 +2166,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -2181,10 +2181,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation({ - required this.outgoing, - required this.incoming, - required this.expireDate, - required this.expireDateSupported, + this.outgoing, + this.incoming, + this.expireDate, + this.expireDateSupported, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson(Map json) => @@ -2194,15 +2194,15 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson( json.decode(data) as Map); - final bool outgoing; + final bool? outgoing; - final bool incoming; + final bool? incoming; @JsonKey(name: 'expire_date') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate expireDate; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate? expireDate; @JsonKey(name: 'expire_date_supported') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported expireDateSupported; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported? expireDateSupported; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_FederationToJson(this); @@ -2215,8 +2215,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee({ - required this.queryLookupDefault, - required this.alwaysShowUnique, + this.queryLookupDefault, + this.alwaysShowUnique, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJson(Map json) => @@ -2227,10 +2227,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee { json.decode(data) as Map); @JsonKey(name: 'query_lookup_default') - final bool queryLookupDefault; + final bool? queryLookupDefault; @JsonKey(name: 'always_show_unique') - final bool alwaysShowUnique; + final bool? alwaysShowUnique; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_ShareeToJson(this); @@ -2242,7 +2242,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop { - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJson( Map json) => @@ -2253,7 +2253,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Uplo CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => @@ -2268,8 +2268,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Uplo @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password({ - required this.enabled, - required this.enforced, + this.enabled, + this.enforced, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJson( @@ -2280,9 +2280,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Pass CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; - final bool enforced; + final bool? enforced; // coverage:ignore-start Map toJson() => @@ -2296,8 +2296,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Pass @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate({ - required this.enabled, - required this.enforced, + this.enabled, + this.enforced, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJson( @@ -2309,9 +2309,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Expi CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; - final bool enforced; + final bool? enforced; // coverage:ignore-start Map toJson() => @@ -2325,11 +2325,11 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Expi @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail({ - required this.enabled, - required this.sendPasswordByMail, - required this.uploadFilesDrop, - required this.password, - required this.expireDate, + this.enabled, + this.sendPasswordByMail, + this.uploadFilesDrop, + this.password, + this.expireDate, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson(Map json) => @@ -2339,18 +2339,18 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson( json.decode(data) as Map); - final bool enabled; + final bool? enabled; @JsonKey(name: 'send_password_by_mail') - final bool sendPasswordByMail; + final bool? sendPasswordByMail; @JsonKey(name: 'upload_files_drop') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop uploadFilesDrop; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop? uploadFilesDrop; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password password; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password? password; @JsonKey(name: 'expire_date') - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate expireDate; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate? expireDate; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_SharebymailToJson(this); @@ -2363,16 +2363,16 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing({ - required this.apiEnabled, - required this.public, - required this.resharing, - required this.user, - required this.groupSharing, - required this.group, - required this.defaultPermissions, - required this.federation, - required this.sharee, - required this.sharebymail, + this.apiEnabled, + this.public, + this.resharing, + this.user, + this.groupSharing, + this.group, + this.defaultPermissions, + this.federation, + this.sharee, + this.sharebymail, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJson(Map json) => @@ -2382,27 +2382,27 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJson(json.decode(data) as Map); @JsonKey(name: 'api_enabled') - final bool apiEnabled; + final bool? apiEnabled; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public public; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public? public; - final bool resharing; + final bool? resharing; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User user; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User? user; @JsonKey(name: 'group_sharing') - final bool groupSharing; + final bool? groupSharing; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group group; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group? group; @JsonKey(name: 'default_permissions') - final int defaultPermissions; + final int? defaultPermissions; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation federation; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation? federation; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee sharee; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee? sharee; - final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail sharebymail; + final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail? sharebymail; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharingToJson(this); @@ -2415,8 +2415,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Notes { CoreServerCapabilities_Ocs_Data_Capabilities_Notes({ - required this.apiVersion, - required this.version, + this.apiVersion, + this.version, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Notes.fromJson(Map json) => @@ -2426,9 +2426,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notes { CoreServerCapabilities_Ocs_Data_Capabilities_Notes.fromJson(json.decode(data) as Map); @JsonKey(name: 'api_version') - final List apiVersion; + final List? apiVersion; - final String version; + final String? version; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesToJson(this); @@ -2440,9 +2440,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notes { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Notifications { CoreServerCapabilities_Ocs_Data_Capabilities_Notifications({ - required this.ocsEndpoints, - required this.push, - required this.adminNotifications, + this.ocsEndpoints, + this.push, + this.adminNotifications, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Notifications.fromJson(Map json) => @@ -2452,12 +2452,12 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notifications { CoreServerCapabilities_Ocs_Data_Capabilities_Notifications.fromJson(json.decode(data) as Map); @JsonKey(name: 'ocs-endpoints') - final List ocsEndpoints; + final List? ocsEndpoints; - final List push; + final List? push; @JsonKey(name: 'admin-notifications') - final List adminNotifications; + final List? adminNotifications; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotificationsToJson(this); @@ -2470,8 +2470,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notifications { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api { CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api({ - required this.generate, - required this.validate, + this.generate, + this.validate, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson(Map json) => @@ -2481,9 +2481,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api { CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson( json.decode(data) as Map); - final String generate; + final String? generate; - final String validate; + final String? validate; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_ApiToJson(this); @@ -2496,12 +2496,12 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy { CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy({ - required this.minLength, - required this.enforceNonCommonPassword, - required this.enforceNumericCharacters, - required this.enforceSpecialCharacters, - required this.enforceUpperLowerCase, - required this.api, + this.minLength, + this.enforceNonCommonPassword, + this.enforceNumericCharacters, + this.enforceSpecialCharacters, + this.enforceUpperLowerCase, + this.api, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJson(Map json) => @@ -2510,17 +2510,17 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy { factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJson(json.decode(data) as Map); - final int minLength; + final int? minLength; - final bool enforceNonCommonPassword; + final bool? enforceNonCommonPassword; - final bool enforceNumericCharacters; + final bool? enforceNumericCharacters; - final bool enforceSpecialCharacters; + final bool? enforceSpecialCharacters; - final bool enforceUpperLowerCase; + final bool? enforceUpperLowerCase; - final CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api api; + final CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api? api; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicyToJson(this); @@ -2533,10 +2533,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi { CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi({ - required this.version, - required this.accountPropertyScopesVersion, - required this.accountPropertyScopesFederatedEnabled, - required this.accountPropertyScopesPublishedEnabled, + this.version, + this.accountPropertyScopesVersion, + this.accountPropertyScopesFederatedEnabled, + this.accountPropertyScopesPublishedEnabled, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJson(Map json) => @@ -2545,16 +2545,16 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi { factory CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJson(json.decode(data) as Map); - final String version; + final String? version; @JsonKey(name: 'AccountPropertyScopesVersion') - final int accountPropertyScopesVersion; + final int? accountPropertyScopesVersion; @JsonKey(name: 'AccountPropertyScopesFederatedEnabled') - final bool accountPropertyScopesFederatedEnabled; + final bool? accountPropertyScopesFederatedEnabled; @JsonKey(name: 'AccountPropertyScopesPublishedEnabled') - final bool accountPropertyScopesPublishedEnabled; + final bool? accountPropertyScopesPublishedEnabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApiToJson(this); @@ -2567,20 +2567,20 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_Theming { CoreServerCapabilities_Ocs_Data_Capabilities_Theming({ - required this.name, - required this.url, - required this.slogan, - required this.color, - required this.colorText, - required this.colorElement, - required this.colorElementBright, - required this.colorElementDark, - required this.logo, - required this.background, - required this.backgroundPlain, - required this.backgroundDefault, - required this.logoheader, - required this.favicon, + this.name, + this.url, + this.slogan, + this.color, + this.colorText, + this.colorElement, + this.colorElementBright, + this.colorElementDark, + this.logo, + this.background, + this.backgroundPlain, + this.backgroundDefault, + this.logoheader, + this.favicon, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_Theming.fromJson(Map json) => @@ -2589,39 +2589,39 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Theming { factory CoreServerCapabilities_Ocs_Data_Capabilities_Theming.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_Theming.fromJson(json.decode(data) as Map); - final String name; + final String? name; - final String url; + final String? url; - final String slogan; + final String? slogan; - final String color; + final String? color; @JsonKey(name: 'color-text') - final String colorText; + final String? colorText; @JsonKey(name: 'color-element') - final String colorElement; + final String? colorElement; @JsonKey(name: 'color-element-bright') - final String colorElementBright; + final String? colorElementBright; @JsonKey(name: 'color-element-dark') - final String colorElementDark; + final String? colorElementDark; - final String logo; + final String? logo; - final String background; + final String? background; @JsonKey(name: 'background-plain') - final bool backgroundPlain; + final bool? backgroundPlain; @JsonKey(name: 'background-default') - final bool backgroundDefault; + final bool? backgroundDefault; - final String logoheader; + final String? logoheader; - final String favicon; + final String? favicon; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingToJson(this); @@ -2633,8 +2633,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Theming { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus { CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus({ - required this.enabled, - required this.supportsEmoji, + this.enabled, + this.supportsEmoji, }); factory CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJson(Map json) => @@ -2643,10 +2643,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus { factory CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJson(json.decode(data) as Map); - final bool enabled; + final bool? enabled; @JsonKey(name: 'supports_emoji') - final bool supportsEmoji; + final bool? supportsEmoji; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_UserStatusToJson(this); @@ -2658,7 +2658,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus { @JsonSerializable() class CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus { - CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus({required this.enabled}); + CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus({this.enabled}); factory CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatusFromJson(json); @@ -2666,7 +2666,7 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus { factory CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJson(json.decode(data) as Map); - final bool enabled; + final bool? enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatusToJson(this); @@ -2679,14 +2679,14 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus { @JsonSerializable(disallowUnrecognizedKeys: false) class CoreServerCapabilities_Ocs_Data_Capabilities { CoreServerCapabilities_Ocs_Data_Capabilities({ - required this.core, - required this.bruteforce, - required this.metadataAvailable, - required this.files, + this.core, + this.bruteforce, + this.metadataAvailable, + this.files, this.activity, this.circles, - required this.ocm, - required this.dav, + this.ocm, + this.dav, this.filesSharing, this.notes, this.notifications, @@ -2703,21 +2703,21 @@ class CoreServerCapabilities_Ocs_Data_Capabilities { factory CoreServerCapabilities_Ocs_Data_Capabilities.fromJsonString(String data) => CoreServerCapabilities_Ocs_Data_Capabilities.fromJson(json.decode(data) as Map); - final CoreServerCapabilities_Ocs_Data_Capabilities_Core core; + final CoreServerCapabilities_Ocs_Data_Capabilities_Core? core; - final CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce bruteforce; + final CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce? bruteforce; - final CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable metadataAvailable; + final CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable? metadataAvailable; - final CoreServerCapabilities_Ocs_Data_Capabilities_Files files; + final CoreServerCapabilities_Ocs_Data_Capabilities_Files? files; final CoreServerCapabilities_Ocs_Data_Capabilities_Activity? activity; final CoreServerCapabilities_Ocs_Data_Capabilities_Circles? circles; - final CoreServerCapabilities_Ocs_Data_Capabilities_Ocm ocm; + final CoreServerCapabilities_Ocs_Data_Capabilities_Ocm? ocm; - final CoreServerCapabilities_Ocs_Data_Capabilities_Dav dav; + final CoreServerCapabilities_Ocs_Data_Capabilities_Dav? dav; @JsonKey(name: 'files_sharing') final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing? filesSharing; diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart index 6cc2c357..240f0d2d 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart @@ -71,12 +71,12 @@ CoreServerCapabilities_Ocs_Data_Version _$CoreServerCapabilities_Ocs_Data_Versio allowedKeys: const ['major', 'minor', 'micro', 'string', 'edition', 'extendedSupport'], ); return CoreServerCapabilities_Ocs_Data_Version( - major: json['major'] as int, - minor: json['minor'] as int, - micro: json['micro'] as int, - string: json['string'] as String, - edition: json['edition'] as String, - extendedSupport: json['extendedSupport'] as bool, + major: json['major'] as int?, + minor: json['minor'] as int?, + micro: json['micro'] as int?, + string: json['string'] as String?, + edition: json['edition'] as String?, + extendedSupport: json['extendedSupport'] as bool?, ); } @@ -94,10 +94,10 @@ Map _$CoreServerCapabilities_Ocs_Data_VersionToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Core _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Core( - pollinterval: json['pollinterval'] as int, - webdavRoot: json['webdav-root'] as String, - referenceApi: json['reference-api'] as bool, - referenceRegex: json['reference-regex'] as String, + pollinterval: json['pollinterval'] as int?, + webdavRoot: json['webdav-root'] as String?, + referenceApi: json['reference-api'] as bool?, + referenceRegex: json['reference-regex'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreToJson( @@ -112,7 +112,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce( - delay: json['delay'] as int, + delay: json['delay'] as int?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceToJson( @@ -124,8 +124,8 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceTo CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailableFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable( - size: (json['size'] as List).map((e) => e as String).toList(), - gps: (json['gps'] as List).map((e) => e as String).toList(), + size: (json['size'] as List?)?.map((e) => e as String).toList(), + gps: (json['gps'] as List?)?.map((e) => e as String).toList(), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailableToJson( @@ -138,8 +138,8 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvai CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditingFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing( - url: json['url'] as String, - etag: json['etag'] as String, + url: json['url'] as String?, + etag: json['etag'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditingToJson( @@ -152,13 +152,15 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_Direct CoreServerCapabilities_Ocs_Data_Capabilities_Files _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Files( - bigfilechunking: json['bigfilechunking'] as bool, - blacklistedFiles: (json['blacklisted_files'] as List).map((e) => e as String).toList(), - directEditing: CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson( - json['directEditing'] as Map), - comments: json['comments'] as bool, - undelete: json['undelete'] as bool, - versioning: json['versioning'] as bool, + bigfilechunking: json['bigfilechunking'] as bool?, + blacklistedFiles: (json['blacklisted_files'] as List?)?.map((e) => e as String).toList(), + directEditing: json['directEditing'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson( + json['directEditing'] as Map), + comments: json['comments'] as bool?, + undelete: json['undelete'] as bool?, + versioning: json['versioning'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesToJson( @@ -166,7 +168,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesToJson( { 'bigfilechunking': instance.bigfilechunking, 'blacklisted_files': instance.blacklistedFiles, - 'directEditing': instance.directEditing.toJson(), + 'directEditing': instance.directEditing?.toJson(), 'comments': instance.comments, 'undelete': instance.undelete, 'versioning': instance.versioning, @@ -175,7 +177,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Activity _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Activity( - apiv2: (json['apiv2'] as List).map((e) => e as String).toList(), + apiv2: (json['apiv2'] as List?)?.map((e) => e as String).toList(), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityToJson( @@ -187,7 +189,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityToJs CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status( - globalScale: json['globalScale'] as bool, + globalScale: json['globalScale'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusToJson( @@ -199,10 +201,10 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Stat CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_SettingsFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings( - frontendEnabled: json['frontendEnabled'] as bool, - allowedCircles: json['allowedCircles'] as int, - allowedUserTypes: json['allowedUserTypes'] as int, - membersLimit: json['membersLimit'] as int, + frontendEnabled: json['frontendEnabled'] as bool?, + allowedCircles: json['allowedCircles'] as int?, + allowedUserTypes: json['allowedUserTypes'] as int?, + membersLimit: json['membersLimit'] as int?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_SettingsToJson( @@ -232,22 +234,24 @@ CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConstantsFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants( flags: json['flags'], - source: CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source.fromJson( - json['source'] as Map), + source: json['source'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source.fromJson( + json['source'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConstantsToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants instance) => { 'flags': instance.flags, - 'source': instance.source.toJson(), + 'source': instance.source?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConfigFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config( - coreFlags: (json['coreFlags'] as List).map((e) => e as int).toList(), - systemFlags: (json['systemFlags'] as List).map((e) => e as int).toList(), + coreFlags: (json['coreFlags'] as List?)?.map((e) => e as int).toList(), + systemFlags: (json['systemFlags'] as List?)?.map((e) => e as int).toList(), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConfigToJson( @@ -260,17 +264,21 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circ CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_CircleFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle( - constants: CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJson( - json['constants'] as Map), - config: CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson( - json['config'] as Map), + constants: json['constants'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJson( + json['constants'] as Map), + config: json['config'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson( + json['config'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_CircleToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle instance) => { - 'constants': instance.constants.toJson(), - 'config': instance.config.toJson(), + 'constants': instance.constants?.toJson(), + 'config': instance.config?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants @@ -288,46 +296,56 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Memb CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_MemberFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member( - constants: CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJson( - json['constants'] as Map), + constants: json['constants'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJson( + json['constants'] as Map), type: json['type'], ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_MemberToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member instance) => { - 'constants': instance.constants.toJson(), + 'constants': instance.constants?.toJson(), 'type': instance.type, }; CoreServerCapabilities_Ocs_Data_Capabilities_Circles _$CoreServerCapabilities_Ocs_Data_Capabilities_CirclesFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Circles( - version: json['version'] as String, - status: - CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJson(json['status'] as Map), - settings: CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJson( - json['settings'] as Map), - circle: - CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJson(json['circle'] as Map), - member: - CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJson(json['member'] as Map), + version: json['version'] as String?, + status: json['status'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJson( + json['status'] as Map), + settings: json['settings'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJson( + json['settings'] as Map), + circle: json['circle'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJson( + json['circle'] as Map), + member: json['member'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJson( + json['member'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_CirclesToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Circles instance) => { 'version': instance.version, - 'status': instance.status.toJson(), - 'settings': instance.settings.toJson(), - 'circle': instance.circle.toJson(), - 'member': instance.member.toJson(), + 'status': instance.status?.toJson(), + 'settings': instance.settings?.toJson(), + 'circle': instance.circle?.toJson(), + 'member': instance.member?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_ProtocolsFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols( - webdav: json['webdav'] as String, + webdav: json['webdav'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_ProtocolsToJson( @@ -339,10 +357,12 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_Resource CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypesFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes( - name: json['name'] as String, - shareTypes: (json['shareTypes'] as List).map((e) => e as String).toList(), - protocols: CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJson( - json['protocols'] as Map), + name: json['name'] as String?, + shareTypes: (json['shareTypes'] as List?)?.map((e) => e as String).toList(), + protocols: json['protocols'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJson( + json['protocols'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypesToJson( @@ -350,17 +370,17 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_Resource { 'name': instance.name, 'shareTypes': instance.shareTypes, - 'protocols': instance.protocols.toJson(), + 'protocols': instance.protocols?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Ocm _$CoreServerCapabilities_Ocs_Data_Capabilities_OcmFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Ocm( - enabled: json['enabled'] as bool, - apiVersion: json['apiVersion'] as String, - endPoint: json['endPoint'] as String, - resourceTypes: (json['resourceTypes'] as List) - .map( + enabled: json['enabled'] as bool?, + apiVersion: json['apiVersion'] as String?, + endPoint: json['endPoint'] as String?, + resourceTypes: (json['resourceTypes'] as List?) + ?.map( (e) => CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJson(e as Map)) .toList(), ); @@ -371,14 +391,14 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_OcmToJson( 'enabled': instance.enabled, 'apiVersion': instance.apiVersion, 'endPoint': instance.endPoint, - 'resourceTypes': instance.resourceTypes.map((e) => e.toJson()).toList(), + 'resourceTypes': instance.resourceTypes?.map((e) => e.toJson()).toList(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Dav _$CoreServerCapabilities_Ocs_Data_Capabilities_DavFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Dav( bulkupload: json['bulkupload'] as String?, - chunking: json['chunking'] as String, + chunking: json['chunking'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_DavToJson( @@ -391,8 +411,8 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_DavToJson( CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_PasswordFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password( - enforced: json['enforced'] as bool, - askForOptionalPassword: json['askForOptionalPassword'] as bool, + enforced: json['enforced'] as bool?, + askForOptionalPassword: json['askForOptionalPassword'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_PasswordToJson( @@ -405,7 +425,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateToJson( @@ -418,7 +438,7 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInter _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternalFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternalToJson( @@ -431,7 +451,7 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemot _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemoteFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemoteToJson( @@ -443,31 +463,38 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_PublicFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public( - enabled: json['enabled'] as bool, - password: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJson( - json['password'] as Map), - expireDate: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJson( - json['expire_date'] as Map), - multipleLinks: json['multiple_links'] as bool, - expireDateInternal: - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJson( + enabled: json['enabled'] as bool?, + password: json['password'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJson( + json['password'] as Map), + expireDate: json['expire_date'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJson( + json['expire_date'] as Map), + multipleLinks: json['multiple_links'] as bool?, + expireDateInternal: json['expire_date_internal'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJson( json['expire_date_internal'] as Map), - expireDateRemote: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJson( - json['expire_date_remote'] as Map), - sendMail: json['send_mail'] as bool, - upload: json['upload'] as bool, - uploadFilesDrop: json['upload_files_drop'] as bool, + expireDateRemote: json['expire_date_remote'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJson( + json['expire_date_remote'] as Map), + sendMail: json['send_mail'] as bool?, + upload: json['upload'] as bool?, + uploadFilesDrop: json['upload_files_drop'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_PublicToJson( CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public instance) => { 'enabled': instance.enabled, - 'password': instance.password.toJson(), - 'expire_date': instance.expireDate.toJson(), + 'password': instance.password?.toJson(), + 'expire_date': instance.expireDate?.toJson(), 'multiple_links': instance.multipleLinks, - 'expire_date_internal': instance.expireDateInternal.toJson(), - 'expire_date_remote': instance.expireDateRemote.toJson(), + 'expire_date_internal': instance.expireDateInternal?.toJson(), + 'expire_date_remote': instance.expireDateRemote?.toJson(), 'send_mail': instance.sendMail, 'upload': instance.upload, 'upload_files_drop': instance.uploadFilesDrop, @@ -476,7 +503,7 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDateFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDateToJson( @@ -488,22 +515,24 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_UserFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User( - sendMail: json['send_mail'] as bool, - expireDate: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJson( - json['expire_date'] as Map), + sendMail: json['send_mail'] as bool?, + expireDate: json['expire_date'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJson( + json['expire_date'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_UserToJson( CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User instance) => { 'send_mail': instance.sendMail, - 'expire_date': instance.expireDate.toJson(), + 'expire_date': instance.expireDate?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDateFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDateToJson( @@ -515,23 +544,25 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_GroupFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group( - enabled: json['enabled'] as bool, - expireDate: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJson( - json['expire_date'] as Map), + enabled: json['enabled'] as bool?, + expireDate: json['expire_date'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJson( + json['expire_date'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_GroupToJson( CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group instance) => { 'enabled': instance.enabled, - 'expire_date': instance.expireDate.toJson(), + 'expire_date': instance.expireDate?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateToJson( @@ -544,7 +575,7 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateS _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupportedFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupportedToJson( @@ -556,12 +587,15 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_FederationFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation( - outgoing: json['outgoing'] as bool, - incoming: json['incoming'] as bool, - expireDate: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJson( - json['expire_date'] as Map), - expireDateSupported: - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJson( + outgoing: json['outgoing'] as bool?, + incoming: json['incoming'] as bool?, + expireDate: json['expire_date'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJson( + json['expire_date'] as Map), + expireDateSupported: json['expire_date_supported'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJson( json['expire_date_supported'] as Map), ); @@ -570,15 +604,15 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { 'outgoing': instance.outgoing, 'incoming': instance.incoming, - 'expire_date': instance.expireDate.toJson(), - 'expire_date_supported': instance.expireDateSupported.toJson(), + 'expire_date': instance.expireDate?.toJson(), + 'expire_date_supported': instance.expireDateSupported?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_ShareeFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee( - queryLookupDefault: json['query_lookup_default'] as bool, - alwaysShowUnique: json['always_show_unique'] as bool, + queryLookupDefault: json['query_lookup_default'] as bool?, + alwaysShowUnique: json['always_show_unique'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_ShareeToJson( @@ -592,7 +626,7 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFile _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDropFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDropToJson( @@ -605,8 +639,8 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_PasswordFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password( - enabled: json['enabled'] as bool, - enforced: json['enforced'] as bool, + enabled: json['enabled'] as bool?, + enforced: json['enforced'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_PasswordToJson( @@ -620,8 +654,8 @@ CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDateFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate( - enabled: json['enabled'] as bool, - enforced: json['enforced'] as bool, + enabled: json['enabled'] as bool?, + enforced: json['enforced'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDateToJson( @@ -634,15 +668,20 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_SharebymailFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail( - enabled: json['enabled'] as bool, - sendPasswordByMail: json['send_password_by_mail'] as bool, - uploadFilesDrop: - CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJson( + enabled: json['enabled'] as bool?, + sendPasswordByMail: json['send_password_by_mail'] as bool?, + uploadFilesDrop: json['upload_files_drop'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJson( json['upload_files_drop'] as Map), - password: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJson( - json['password'] as Map), - expireDate: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJson( - json['expire_date'] as Map), + password: json['password'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJson( + json['password'] as Map), + expireDate: json['expire_date'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJson( + json['expire_date'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_SharebymailToJson( @@ -650,52 +689,64 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { 'enabled': instance.enabled, 'send_password_by_mail': instance.sendPasswordByMail, - 'upload_files_drop': instance.uploadFilesDrop.toJson(), - 'password': instance.password.toJson(), - 'expire_date': instance.expireDate.toJson(), + 'upload_files_drop': instance.uploadFilesDrop?.toJson(), + 'password': instance.password?.toJson(), + 'expire_date': instance.expireDate?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharingFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing( - apiEnabled: json['api_enabled'] as bool, - public: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson( - json['public'] as Map), - resharing: json['resharing'] as bool, - user: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJson( - json['user'] as Map), - groupSharing: json['group_sharing'] as bool, - group: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson( - json['group'] as Map), - defaultPermissions: json['default_permissions'] as int, - federation: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson( - json['federation'] as Map), - sharee: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJson( - json['sharee'] as Map), - sharebymail: CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson( - json['sharebymail'] as Map), + apiEnabled: json['api_enabled'] as bool?, + public: json['public'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson( + json['public'] as Map), + resharing: json['resharing'] as bool?, + user: json['user'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJson( + json['user'] as Map), + groupSharing: json['group_sharing'] as bool?, + group: json['group'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson( + json['group'] as Map), + defaultPermissions: json['default_permissions'] as int?, + federation: json['federation'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson( + json['federation'] as Map), + sharee: json['sharee'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJson( + json['sharee'] as Map), + sharebymail: json['sharebymail'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson( + json['sharebymail'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharingToJson( CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing instance) => { 'api_enabled': instance.apiEnabled, - 'public': instance.public.toJson(), + 'public': instance.public?.toJson(), 'resharing': instance.resharing, - 'user': instance.user.toJson(), + 'user': instance.user?.toJson(), 'group_sharing': instance.groupSharing, - 'group': instance.group.toJson(), + 'group': instance.group?.toJson(), 'default_permissions': instance.defaultPermissions, - 'federation': instance.federation.toJson(), - 'sharee': instance.sharee.toJson(), - 'sharebymail': instance.sharebymail.toJson(), + 'federation': instance.federation?.toJson(), + 'sharee': instance.sharee?.toJson(), + 'sharebymail': instance.sharebymail?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_Notes _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Notes( - apiVersion: (json['api_version'] as List).map((e) => e as String).toList(), - version: json['version'] as String, + apiVersion: (json['api_version'] as List?)?.map((e) => e as String).toList(), + version: json['version'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesToJson( @@ -708,9 +759,9 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesToJson( CoreServerCapabilities_Ocs_Data_Capabilities_Notifications _$CoreServerCapabilities_Ocs_Data_Capabilities_NotificationsFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Notifications( - ocsEndpoints: (json['ocs-endpoints'] as List).map((e) => e as String).toList(), - push: (json['push'] as List).map((e) => e as String).toList(), - adminNotifications: (json['admin-notifications'] as List).map((e) => e as String).toList(), + ocsEndpoints: (json['ocs-endpoints'] as List?)?.map((e) => e as String).toList(), + push: (json['push'] as List?)?.map((e) => e as String).toList(), + adminNotifications: (json['admin-notifications'] as List?)?.map((e) => e as String).toList(), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_NotificationsToJson( @@ -724,8 +775,8 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Notification CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_ApiFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api( - generate: json['generate'] as String, - validate: json['validate'] as String, + generate: json['generate'] as String?, + validate: json['validate'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_ApiToJson( @@ -738,13 +789,15 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPoli CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicyFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy( - minLength: json['minLength'] as int, - enforceNonCommonPassword: json['enforceNonCommonPassword'] as bool, - enforceNumericCharacters: json['enforceNumericCharacters'] as bool, - enforceSpecialCharacters: json['enforceSpecialCharacters'] as bool, - enforceUpperLowerCase: json['enforceUpperLowerCase'] as bool, - api: CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson( - json['api'] as Map), + minLength: json['minLength'] as int?, + enforceNonCommonPassword: json['enforceNonCommonPassword'] as bool?, + enforceNumericCharacters: json['enforceNumericCharacters'] as bool?, + enforceSpecialCharacters: json['enforceSpecialCharacters'] as bool?, + enforceUpperLowerCase: json['enforceUpperLowerCase'] as bool?, + api: json['api'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson( + json['api'] as Map), ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicyToJson( @@ -755,16 +808,16 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPoli 'enforceNumericCharacters': instance.enforceNumericCharacters, 'enforceSpecialCharacters': instance.enforceSpecialCharacters, 'enforceUpperLowerCase': instance.enforceUpperLowerCase, - 'api': instance.api.toJson(), + 'api': instance.api?.toJson(), }; CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi _$CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApiFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi( - version: json['version'] as String, - accountPropertyScopesVersion: json['AccountPropertyScopesVersion'] as int, - accountPropertyScopesFederatedEnabled: json['AccountPropertyScopesFederatedEnabled'] as bool, - accountPropertyScopesPublishedEnabled: json['AccountPropertyScopesPublishedEnabled'] as bool, + version: json['version'] as String?, + accountPropertyScopesVersion: json['AccountPropertyScopesVersion'] as int?, + accountPropertyScopesFederatedEnabled: json['AccountPropertyScopesFederatedEnabled'] as bool?, + accountPropertyScopesPublishedEnabled: json['AccountPropertyScopesPublishedEnabled'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApiToJson( @@ -779,20 +832,20 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_Provisioning CoreServerCapabilities_Ocs_Data_Capabilities_Theming _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_Theming( - name: json['name'] as String, - url: json['url'] as String, - slogan: json['slogan'] as String, - color: json['color'] as String, - colorText: json['color-text'] as String, - colorElement: json['color-element'] as String, - colorElementBright: json['color-element-bright'] as String, - colorElementDark: json['color-element-dark'] as String, - logo: json['logo'] as String, - background: json['background'] as String, - backgroundPlain: json['background-plain'] as bool, - backgroundDefault: json['background-default'] as bool, - logoheader: json['logoheader'] as String, - favicon: json['favicon'] as String, + name: json['name'] as String?, + url: json['url'] as String?, + slogan: json['slogan'] as String?, + color: json['color'] as String?, + colorText: json['color-text'] as String?, + colorElement: json['color-element'] as String?, + colorElementBright: json['color-element-bright'] as String?, + colorElementDark: json['color-element-dark'] as String?, + logo: json['logo'] as String?, + background: json['background'] as String?, + backgroundPlain: json['background-plain'] as bool?, + backgroundDefault: json['background-default'] as bool?, + logoheader: json['logoheader'] as String?, + favicon: json['favicon'] as String?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingToJson( @@ -817,8 +870,8 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingToJso CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus _$CoreServerCapabilities_Ocs_Data_Capabilities_UserStatusFromJson(Map json) => CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus( - enabled: json['enabled'] as bool, - supportsEmoji: json['supports_emoji'] as bool, + enabled: json['enabled'] as bool?, + supportsEmoji: json['supports_emoji'] as bool?, ); Map _$CoreServerCapabilities_Ocs_Data_Capabilities_UserStatusToJson( @@ -835,7 +888,7 @@ CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus allowedKeys: const ['enabled'], ); return CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus( - enabled: json['enabled'] as bool, + enabled: json['enabled'] as bool?, ); } @@ -848,20 +901,32 @@ Map _$CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatu CoreServerCapabilities_Ocs_Data_Capabilities _$CoreServerCapabilities_Ocs_Data_CapabilitiesFromJson( Map json) => CoreServerCapabilities_Ocs_Data_Capabilities( - core: CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(json['core'] as Map), - bruteforce: - CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson(json['bruteforce'] as Map), - metadataAvailable: CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson( - json['metadataAvailable'] as Map), - files: CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(json['files'] as Map), + core: json['core'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(json['core'] as Map), + bruteforce: json['bruteforce'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson( + json['bruteforce'] as Map), + metadataAvailable: json['metadataAvailable'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson( + json['metadataAvailable'] as Map), + files: json['files'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(json['files'] as Map), activity: json['activity'] == null ? null : CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJson(json['activity'] as Map), circles: json['circles'] == null ? null : CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJson(json['circles'] as Map), - ocm: CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(json['ocm'] as Map), - dav: CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJson(json['dav'] as Map), + ocm: json['ocm'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(json['ocm'] as Map), + dav: json['dav'] == null + ? null + : CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJson(json['dav'] as Map), filesSharing: json['files_sharing'] == null ? null : CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJson( @@ -897,14 +962,14 @@ CoreServerCapabilities_Ocs_Data_Capabilities _$CoreServerCapabilities_Ocs_Data_C Map _$CoreServerCapabilities_Ocs_Data_CapabilitiesToJson( CoreServerCapabilities_Ocs_Data_Capabilities instance) => { - 'core': instance.core.toJson(), - 'bruteforce': instance.bruteforce.toJson(), - 'metadataAvailable': instance.metadataAvailable.toJson(), - 'files': instance.files.toJson(), + 'core': instance.core?.toJson(), + 'bruteforce': instance.bruteforce?.toJson(), + 'metadataAvailable': instance.metadataAvailable?.toJson(), + 'files': instance.files?.toJson(), 'activity': instance.activity?.toJson(), 'circles': instance.circles?.toJson(), - 'ocm': instance.ocm.toJson(), - 'dav': instance.dav.toJson(), + 'ocm': instance.ocm?.toJson(), + 'dav': instance.dav?.toJson(), 'files_sharing': instance.filesSharing?.toJson(), 'notes': instance.notes?.toJson(), 'notifications': instance.notifications?.toJson(), diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.json b/packages/nextcloud/lib/src/nextcloud.openapi.json index db63abc2..9acac440 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.json +++ b/packages/nextcloud/lib/src/nextcloud.openapi.json @@ -159,14 +159,6 @@ "properties": { "version": { "type": "object", - "required": [ - "major", - "minor", - "micro", - "string", - "edition", - "extendedSupport" - ], "properties": { "major": { "type": "integer" @@ -191,24 +183,10 @@ "capabilities": { "type": "object", "additionalProperties": true, - "required": [ - "core", - "bruteforce", - "metadataAvailable", - "files", - "ocm", - "dav" - ], "properties": { "core": { "type": "object", "additionalProperties": true, - "required": [ - "pollinterval", - "webdav-root", - "reference-api", - "reference-regex" - ], "properties": { "pollinterval": { "type": "integer" @@ -227,9 +205,6 @@ "bruteforce": { "type": "object", "additionalProperties": true, - "required": [ - "delay" - ], "properties": { "delay": { "type": "integer" @@ -239,10 +214,6 @@ "metadataAvailable": { "type": "object", "additionalProperties": true, - "required": [ - "size", - "gps" - ], "properties": { "size": { "type": "array", @@ -261,14 +232,6 @@ "files": { "type": "object", "additionalProperties": true, - "required": [ - "bigfilechunking", - "blacklisted_files", - "directEditing", - "comments", - "undelete", - "versioning" - ], "properties": { "bigfilechunking": { "type": "boolean" @@ -282,10 +245,6 @@ "directEditing": { "type": "object", "additionalProperties": true, - "required": [ - "url", - "etag" - ], "properties": { "url": { "type": "string" @@ -309,9 +268,6 @@ "activity": { "type": "object", "additionalProperties": true, - "required": [ - "apiv2" - ], "properties": { "apiv2": { "type": "array", @@ -324,13 +280,6 @@ "circles": { "type": "object", "additionalProperties": true, - "required": [ - "version", - "status", - "settings", - "circle", - "member" - ], "properties": { "version": { "type": "string" @@ -338,9 +287,6 @@ "status": { "type": "object", "additionalProperties": true, - "required": [ - "globalScale" - ], "properties": { "globalScale": { "type": "boolean" @@ -350,12 +296,6 @@ "settings": { "type": "object", "additionalProperties": true, - "required": [ - "frontendEnabled", - "allowedCircles", - "allowedUserTypes", - "membersLimit" - ], "properties": { "frontendEnabled": { "type": "boolean" @@ -374,18 +314,10 @@ "circle": { "type": "object", "additionalProperties": true, - "required": [ - "constants", - "config" - ], "properties": { "constants": { "type": "object", "additionalProperties": true, - "required": [ - "flags", - "source" - ], "properties": { "flags": { "type": "object" @@ -393,10 +325,6 @@ "source": { "type": "object", "additionalProperties": true, - "required": [ - "core", - "extra" - ], "properties": { "core": { "type": "object" @@ -411,10 +339,6 @@ "config": { "type": "object", "additionalProperties": true, - "required": [ - "coreFlags", - "systemFlags" - ], "properties": { "coreFlags": { "type": "array", @@ -435,17 +359,10 @@ "member": { "type": "object", "additionalProperties": true, - "required": [ - "constants", - "type" - ], "properties": { "constants": { "type": "object", "additionalProperties": true, - "required": [ - "level" - ], "properties": { "level": { "type": "object" @@ -462,12 +379,6 @@ "ocm": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "apiVersion", - "endPoint", - "resourceTypes" - ], "properties": { "enabled": { "type": "boolean" @@ -483,11 +394,6 @@ "items": { "type": "object", "additionalProperties": true, - "required": [ - "name", - "shareTypes", - "protocols" - ], "properties": { "name": { "type": "string" @@ -501,9 +407,6 @@ "protocols": { "type": "object", "additionalProperties": true, - "required": [ - "webdav" - ], "properties": { "webdav": { "type": "string" @@ -518,9 +421,6 @@ "dav": { "type": "object", "additionalProperties": true, - "required": [ - "chunking" - ], "properties": { "bulkupload": { "type": "string" @@ -533,18 +433,6 @@ "files_sharing": { "type": "object", "additionalProperties": true, - "required": [ - "api_enabled", - "public", - "resharing", - "user", - "group_sharing", - "group", - "default_permissions", - "federation", - "sharee", - "sharebymail" - ], "properties": { "api_enabled": { "type": "boolean" @@ -552,17 +440,6 @@ "public": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "password", - "expire_date", - "multiple_links", - "expire_date_internal", - "expire_date_remote", - "send_mail", - "upload", - "upload_files_drop" - ], "properties": { "enabled": { "type": "boolean" @@ -570,10 +447,6 @@ "password": { "type": "object", "additionalProperties": true, - "required": [ - "enforced", - "askForOptionalPassword" - ], "properties": { "enforced": { "type": "boolean" @@ -586,9 +459,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -601,9 +471,6 @@ "expire_date_internal": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -613,9 +480,6 @@ "expire_date_remote": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -639,10 +503,6 @@ "user": { "type": "object", "additionalProperties": true, - "required": [ - "send_mail", - "expire_date" - ], "properties": { "send_mail": { "type": "boolean" @@ -650,9 +510,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -667,10 +524,6 @@ "group": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "expire_date" - ], "properties": { "enabled": { "type": "boolean" @@ -678,9 +531,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -695,12 +545,6 @@ "federation": { "type": "object", "additionalProperties": true, - "required": [ - "outgoing", - "incoming", - "expire_date", - "expire_date_supported" - ], "properties": { "outgoing": { "type": "boolean" @@ -711,9 +555,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -723,9 +564,6 @@ "expire_date_supported": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -737,10 +575,6 @@ "sharee": { "type": "object", "additionalProperties": true, - "required": [ - "query_lookup_default", - "always_show_unique" - ], "properties": { "query_lookup_default": { "type": "boolean" @@ -753,13 +587,6 @@ "sharebymail": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "send_password_by_mail", - "upload_files_drop", - "password", - "expire_date" - ], "properties": { "enabled": { "type": "boolean" @@ -770,9 +597,6 @@ "upload_files_drop": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -782,10 +606,6 @@ "password": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "enforced" - ], "properties": { "enabled": { "type": "boolean" @@ -798,10 +618,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "enforced" - ], "properties": { "enabled": { "type": "boolean" @@ -818,10 +634,6 @@ "notes": { "type": "object", "additionalProperties": true, - "required": [ - "api_version", - "version" - ], "properties": { "api_version": { "type": "array", @@ -837,11 +649,6 @@ "notifications": { "type": "object", "additionalProperties": true, - "required": [ - "ocs-endpoints", - "push", - "admin-notifications" - ], "properties": { "ocs-endpoints": { "type": "array", @@ -866,14 +673,6 @@ "password_policy": { "type": "object", "additionalProperties": true, - "required": [ - "minLength", - "enforceNonCommonPassword", - "enforceNumericCharacters", - "enforceSpecialCharacters", - "enforceUpperLowerCase", - "api" - ], "properties": { "minLength": { "type": "integer" @@ -893,10 +692,6 @@ "api": { "type": "object", "additionalProperties": true, - "required": [ - "generate", - "validate" - ], "properties": { "generate": { "type": "string" @@ -911,12 +706,6 @@ "provisioning_api": { "type": "object", "additionalProperties": true, - "required": [ - "version", - "AccountPropertyScopesVersion", - "AccountPropertyScopesFederatedEnabled", - "AccountPropertyScopesPublishedEnabled" - ], "properties": { "version": { "type": "string" @@ -935,22 +724,6 @@ "theming": { "type": "object", "additionalProperties": true, - "required": [ - "name", - "url", - "slogan", - "color", - "color-text", - "color-element", - "color-element-bright", - "color-element-dark", - "logo", - "background", - "background-plain", - "background-default", - "logoheader", - "favicon" - ], "properties": { "name": { "type": "string" @@ -999,10 +772,6 @@ "user_status": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "supports_emoji" - ], "properties": { "enabled": { "type": "boolean" @@ -1014,9 +783,6 @@ }, "weather_status": { "type": "object", - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" diff --git a/packages/nextcloud/lib/src/version_supported.dart b/packages/nextcloud/lib/src/version_supported.dart index 7a9ffca6..0c1a3fb4 100644 --- a/packages/nextcloud/lib/src/version_supported.dart +++ b/packages/nextcloud/lib/src/version_supported.dart @@ -22,11 +22,12 @@ extension NotesVersionSupported on NotesClient { Future isSupported([final CoreServerCapabilities_Ocs_Data? capabilities]) async => (capabilities ?? (await rootClient.core.getCapabilities()).ocs.data) .capabilities - .notes! - .apiVersion - .map(Version.parse) + .notes + ?.apiVersion + ?.map(Version.parse) .where((final version) => version.major == 1) - .isNotEmpty; + .isNotEmpty ?? + false; } // Notifications, ProvisioningApi, UserStatus and Webdav are shipped with the Nextcloud server, so their supported versions depend on the major version of the Nextcloud instance. diff --git a/specs/core.json b/specs/core.json index 099589b7..f0ab9210 100644 --- a/specs/core.json +++ b/specs/core.json @@ -145,14 +145,6 @@ "properties": { "version": { "type": "object", - "required": [ - "major", - "minor", - "micro", - "string", - "edition", - "extendedSupport" - ], "properties": { "major": { "type": "integer" @@ -177,24 +169,10 @@ "capabilities": { "type": "object", "additionalProperties": true, - "required": [ - "core", - "bruteforce", - "metadataAvailable", - "files", - "ocm", - "dav" - ], "properties": { "core": { "type": "object", "additionalProperties": true, - "required": [ - "pollinterval", - "webdav-root", - "reference-api", - "reference-regex" - ], "properties": { "pollinterval": { "type": "integer" @@ -213,9 +191,6 @@ "bruteforce": { "type": "object", "additionalProperties": true, - "required": [ - "delay" - ], "properties": { "delay": { "type": "integer" @@ -225,10 +200,6 @@ "metadataAvailable": { "type": "object", "additionalProperties": true, - "required": [ - "size", - "gps" - ], "properties": { "size": { "type": "array", @@ -247,14 +218,6 @@ "files": { "type": "object", "additionalProperties": true, - "required": [ - "bigfilechunking", - "blacklisted_files", - "directEditing", - "comments", - "undelete", - "versioning" - ], "properties": { "bigfilechunking": { "type": "boolean" @@ -268,10 +231,6 @@ "directEditing": { "type": "object", "additionalProperties": true, - "required": [ - "url", - "etag" - ], "properties": { "url": { "type": "string" @@ -295,9 +254,6 @@ "activity": { "type": "object", "additionalProperties": true, - "required": [ - "apiv2" - ], "properties": { "apiv2": { "type": "array", @@ -310,13 +266,6 @@ "circles": { "type": "object", "additionalProperties": true, - "required": [ - "version", - "status", - "settings", - "circle", - "member" - ], "properties": { "version": { "type": "string" @@ -324,9 +273,6 @@ "status": { "type": "object", "additionalProperties": true, - "required": [ - "globalScale" - ], "properties": { "globalScale": { "type": "boolean" @@ -336,12 +282,6 @@ "settings": { "type": "object", "additionalProperties": true, - "required": [ - "frontendEnabled", - "allowedCircles", - "allowedUserTypes", - "membersLimit" - ], "properties": { "frontendEnabled": { "type": "boolean" @@ -360,18 +300,10 @@ "circle": { "type": "object", "additionalProperties": true, - "required": [ - "constants", - "config" - ], "properties": { "constants": { "type": "object", "additionalProperties": true, - "required": [ - "flags", - "source" - ], "properties": { "flags": { "type": "object" @@ -379,10 +311,6 @@ "source": { "type": "object", "additionalProperties": true, - "required": [ - "core", - "extra" - ], "properties": { "core": { "type": "object" @@ -397,10 +325,6 @@ "config": { "type": "object", "additionalProperties": true, - "required": [ - "coreFlags", - "systemFlags" - ], "properties": { "coreFlags": { "type": "array", @@ -421,17 +345,10 @@ "member": { "type": "object", "additionalProperties": true, - "required": [ - "constants", - "type" - ], "properties": { "constants": { "type": "object", "additionalProperties": true, - "required": [ - "level" - ], "properties": { "level": { "type": "object" @@ -448,12 +365,6 @@ "ocm": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "apiVersion", - "endPoint", - "resourceTypes" - ], "properties": { "enabled": { "type": "boolean" @@ -469,11 +380,6 @@ "items": { "type": "object", "additionalProperties": true, - "required": [ - "name", - "shareTypes", - "protocols" - ], "properties": { "name": { "type": "string" @@ -487,9 +393,6 @@ "protocols": { "type": "object", "additionalProperties": true, - "required": [ - "webdav" - ], "properties": { "webdav": { "type": "string" @@ -504,9 +407,6 @@ "dav": { "type": "object", "additionalProperties": true, - "required": [ - "chunking" - ], "properties": { "bulkupload": { "type": "string" @@ -519,18 +419,6 @@ "files_sharing": { "type": "object", "additionalProperties": true, - "required": [ - "api_enabled", - "public", - "resharing", - "user", - "group_sharing", - "group", - "default_permissions", - "federation", - "sharee", - "sharebymail" - ], "properties": { "api_enabled": { "type": "boolean" @@ -538,17 +426,6 @@ "public": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "password", - "expire_date", - "multiple_links", - "expire_date_internal", - "expire_date_remote", - "send_mail", - "upload", - "upload_files_drop" - ], "properties": { "enabled": { "type": "boolean" @@ -556,10 +433,6 @@ "password": { "type": "object", "additionalProperties": true, - "required": [ - "enforced", - "askForOptionalPassword" - ], "properties": { "enforced": { "type": "boolean" @@ -572,9 +445,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -587,9 +457,6 @@ "expire_date_internal": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -599,9 +466,6 @@ "expire_date_remote": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -625,10 +489,6 @@ "user": { "type": "object", "additionalProperties": true, - "required": [ - "send_mail", - "expire_date" - ], "properties": { "send_mail": { "type": "boolean" @@ -636,9 +496,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -653,10 +510,6 @@ "group": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "expire_date" - ], "properties": { "enabled": { "type": "boolean" @@ -664,9 +517,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -681,12 +531,6 @@ "federation": { "type": "object", "additionalProperties": true, - "required": [ - "outgoing", - "incoming", - "expire_date", - "expire_date_supported" - ], "properties": { "outgoing": { "type": "boolean" @@ -697,9 +541,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -709,9 +550,6 @@ "expire_date_supported": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -723,10 +561,6 @@ "sharee": { "type": "object", "additionalProperties": true, - "required": [ - "query_lookup_default", - "always_show_unique" - ], "properties": { "query_lookup_default": { "type": "boolean" @@ -739,13 +573,6 @@ "sharebymail": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "send_password_by_mail", - "upload_files_drop", - "password", - "expire_date" - ], "properties": { "enabled": { "type": "boolean" @@ -756,9 +583,6 @@ "upload_files_drop": { "type": "object", "additionalProperties": true, - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean" @@ -768,10 +592,6 @@ "password": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "enforced" - ], "properties": { "enabled": { "type": "boolean" @@ -784,10 +604,6 @@ "expire_date": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "enforced" - ], "properties": { "enabled": { "type": "boolean" @@ -804,10 +620,6 @@ "notes": { "type": "object", "additionalProperties": true, - "required": [ - "api_version", - "version" - ], "properties": { "api_version": { "type": "array", @@ -823,11 +635,6 @@ "notifications": { "type": "object", "additionalProperties": true, - "required": [ - "ocs-endpoints", - "push", - "admin-notifications" - ], "properties": { "ocs-endpoints": { "type": "array", @@ -852,14 +659,6 @@ "password_policy": { "type": "object", "additionalProperties": true, - "required": [ - "minLength", - "enforceNonCommonPassword", - "enforceNumericCharacters", - "enforceSpecialCharacters", - "enforceUpperLowerCase", - "api" - ], "properties": { "minLength": { "type": "integer" @@ -879,10 +678,6 @@ "api": { "type": "object", "additionalProperties": true, - "required": [ - "generate", - "validate" - ], "properties": { "generate": { "type": "string" @@ -897,12 +692,6 @@ "provisioning_api": { "type": "object", "additionalProperties": true, - "required": [ - "version", - "AccountPropertyScopesVersion", - "AccountPropertyScopesFederatedEnabled", - "AccountPropertyScopesPublishedEnabled" - ], "properties": { "version": { "type": "string" @@ -921,22 +710,6 @@ "theming": { "type": "object", "additionalProperties": true, - "required": [ - "name", - "url", - "slogan", - "color", - "color-text", - "color-element", - "color-element-bright", - "color-element-dark", - "logo", - "background", - "background-plain", - "background-default", - "logoheader", - "favicon" - ], "properties": { "name": { "type": "string" @@ -985,10 +758,6 @@ "user_status": { "type": "object", "additionalProperties": true, - "required": [ - "enabled", - "supports_emoji" - ], "properties": { "enabled": { "type": "boolean" @@ -1000,9 +769,6 @@ }, "weather_status": { "type": "object", - "required": [ - "enabled" - ], "properties": { "enabled": { "type": "boolean"