From 59b4f5926688ab7f0484faa234aef584045b956e Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 25 Nov 2022 13:14:32 +0100 Subject: [PATCH] dynamite,nextcloud: Support JSON encoded as string fields --- packages/dynamite/lib/src/models/schema.dart | 6 + .../dynamite/lib/src/models/schema.g.dart | 7 +- .../dynamite/lib/src/openapi_builder.dart | 80 ++- .../nextcloud/lib/src/nextcloud.openapi.dart | 548 ++++++++++++++++++ 4 files changed, 621 insertions(+), 20 deletions(-) diff --git a/packages/dynamite/lib/src/models/schema.dart b/packages/dynamite/lib/src/models/schema.dart index b94cbab3..dbfffb29 100644 --- a/packages/dynamite/lib/src/models/schema.dart +++ b/packages/dynamite/lib/src/models/schema.dart @@ -1,3 +1,4 @@ +import 'package:dynamite/src/models/media_type.dart'; import 'package:json_annotation/json_annotation.dart'; part 'schema.g.dart'; @@ -19,6 +20,7 @@ class Schema { this.required, this.items, this.additionalProperties, + this.content, }); factory Schema.fromJson(final Map json) => _$SchemaFromJson(json); @@ -56,4 +58,8 @@ class Schema { final Schema? items; final bool? additionalProperties; + + final Map? content; + + bool get isJsonString => type == 'string' && content?['application/json']?.schema != null; } diff --git a/packages/dynamite/lib/src/models/schema.g.dart b/packages/dynamite/lib/src/models/schema.g.dart index fa5aab1b..a3418539 100644 --- a/packages/dynamite/lib/src/models/schema.g.dart +++ b/packages/dynamite/lib/src/models/schema.g.dart @@ -23,7 +23,8 @@ Schema _$SchemaFromJson(Map json) { 'properties', 'required', 'items', - 'additionalProperties' + 'additionalProperties', + 'content' ], ); return Schema( @@ -43,6 +44,9 @@ Schema _$SchemaFromJson(Map json) { required: (json['required'] as List?)?.map((e) => e as String).toList(), items: json['items'] == null ? null : Schema.fromJson(json['items'] as Map), additionalProperties: json['additionalProperties'] as bool?, + content: (json['content'] as Map?)?.map( + (k, e) => MapEntry(k, MediaType.fromJson(e as Map)), + ), ); } @@ -69,5 +73,6 @@ Map _$SchemaToJson(Schema instance) { writeNotNull('required', instance.required); writeNotNull('items', instance.items?.toJson()); writeNotNull('additionalProperties', instance.additionalProperties); + writeNotNull('content', instance.content?.map((k, e) => MapEntry(k, e.toJson()))); return val; } diff --git a/packages/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/lib/src/openapi_builder.dart index 33d4cad4..e4b348ac 100644 --- a/packages/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/lib/src/openapi_builder.dart @@ -1060,9 +1060,23 @@ TypeResult resolveObject( ) ..body = Code('_\$${identifier}FromJson(json)'), ), + Constructor( + (final b) => b + ..factory = true + ..name = 'fromJsonString' + ..lambda = true + ..requiredParameters.add( + Parameter( + (final b) => b + ..name = 'data' + ..type = refer('String'), + ), + ) + ..body = Code('$identifier.fromJson(json.decode(data) as Map)'), + ), ], ) - ..methods.add( + ..methods.addAll([ Method( (final b) => b ..name = 'toJson' @@ -1070,21 +1084,35 @@ TypeResult resolveObject( ..lambda = true ..body = Code('_\$${identifier}ToJson(this)'), ), - ) + Method( + (final b) => b + ..name = 'toJsonString' + ..returns = refer('String') + ..lambda = true + ..static = true + ..requiredParameters.add( + Parameter( + (final b) => b + ..name = 'data' + ..type = refer(identifier), + ), + ) + ..body = const Code('json.encode(data.toJson())'), + ), + ]) ..fields.addAll([ for (final propertyName in schema.properties!.keys) ...[ Field( (final b) { + final propertySchema = schema.properties![propertyName]!; final result = resolveType( spec, state, '${identifier}_${_toDartName(propertyName, uppercaseFirstCharacter: true)}', - schema.properties![propertyName]!, + propertySchema, extraJsonSerializableValues: extraJsonSerializableValues, ); - final propertySchema = schema.properties![propertyName]!; - b ..name = _toDartName(propertyName) ..type = refer( @@ -1099,19 +1127,23 @@ TypeResult resolveObject( '/// ${propertySchema.description!}', ], ]); - if (_toDartName(propertyName) != propertyName) { + if (_toDartName(propertyName) != propertyName || + propertySchema.isJsonString || + extraJsonKeyValues != null) { b.annotations.add( refer('JsonKey').call( [], { - 'name': refer("'$propertyName'"), - if (extraJsonKeyValues != null) ...{ - for (final p in extraJsonKeyValues.keys) ...{ - if (p == propertyName) ...{ - for (final key in extraJsonKeyValues[p]!.keys) ...{ - key: refer(extraJsonKeyValues[p]![key]!), - }, - }, + if (_toDartName(propertyName) != propertyName) ...{ + 'name': refer("'$propertyName'"), + }, + if (propertySchema.isJsonString) ...{ + 'fromJson': refer('${result.name}.fromJsonString'), + 'toJson': refer('${result.name}.toJsonString'), + }, + if (extraJsonKeyValues != null && extraJsonKeyValues.containsKey(propertyName)) ...{ + for (final key in extraJsonKeyValues[propertyName]!.keys) ...{ + key: refer(extraJsonKeyValues[propertyName]![key]!), }, }, }, @@ -1289,12 +1321,22 @@ TypeResult resolveType( case 'binary': result = TypeResultBase('Uint8List'); break; - case null: - result = TypeResultBase( - 'String', - ); - break; } + + if (schema.isJsonString) { + result = resolveType( + spec, + state, + identifier, + schema.content!['application/json']!.schema!, + extraJsonSerializableValues: extraJsonSerializableValues, + ); + break; + } + + result = TypeResultBase( + 'String', + ); break; case 'array': if (schema.items != null) { diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index 72da67b6..59a224c0 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -1274,6 +1274,9 @@ class CoreServerStatus { factory CoreServerStatus.fromJson(Map json) => _$CoreServerStatusFromJson(json); + factory CoreServerStatus.fromJsonString(String data) => + CoreServerStatus.fromJson(json.decode(data) as Map); + final bool installed; final bool maintenance; @@ -1293,6 +1296,8 @@ class CoreServerStatus { // coverage:ignore-start Map toJson() => _$CoreServerStatusToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerStatus data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1307,6 +1312,8 @@ class OCSMeta { factory OCSMeta.fromJson(Map json) => _$OCSMetaFromJson(json); + factory OCSMeta.fromJsonString(String data) => OCSMeta.fromJson(json.decode(data) as Map); + final String status; final int statuscode; @@ -1320,6 +1327,8 @@ class OCSMeta { // coverage:ignore-start Map toJson() => _$OCSMetaToJson(this); // coverage:ignore-end + + static String toJsonString(OCSMeta data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1336,6 +1345,9 @@ class CoreServerCapabilities_Ocs_Data_Version { factory CoreServerCapabilities_Ocs_Data_Version.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_VersionFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Version.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Version.fromJson(json.decode(data) as Map); + final int major; final int minor; @@ -1351,6 +1363,8 @@ class CoreServerCapabilities_Ocs_Data_Version { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_VersionToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Version data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1365,6 +1379,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Core { factory CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Core.fromJson(json.decode(data) as Map); + final int pollinterval; @JsonKey(name: 'webdav-root') @@ -1379,6 +1396,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Core { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_CoreToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Core data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1388,11 +1407,17 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce { factory CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce.fromJson(json.decode(data) as Map); + final int delay; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_BruteforceToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Bruteforce data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1405,6 +1430,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable { factory CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailableFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable.fromJson( + json.decode(data) as Map); + final List size; final List gps; @@ -1412,6 +1441,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailableToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_MetadataAvailable data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1424,6 +1456,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing { factory CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditingFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing.fromJson( + json.decode(data) as Map); + final String url; final String etag; @@ -1431,6 +1467,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditingToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Files_DirectEditing data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1447,6 +1486,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files { factory CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Files.fromJson(json.decode(data) as Map); + final bool bigfilechunking; @JsonKey(name: 'blacklisted_files') @@ -1463,6 +1505,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Files { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Files data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1472,11 +1516,16 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Activity { factory CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Activity.fromJson(json.decode(data) as Map); + final List apiv2; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ActivityToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Activity data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1486,11 +1535,17 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusFromJson(json); + 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; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_StatusToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1505,6 +1560,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_SettingsFromJson(json); + 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 int allowedCircles; @@ -1516,6 +1574,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_SettingsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Settings data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1529,6 +1590,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Sour Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_SourceFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source.fromJson( + json.decode(data) as Map); + final dynamic core; final dynamic extra; @@ -1537,6 +1602,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Sour Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_SourceToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1549,6 +1617,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConstantsFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants.fromJson( + json.decode(data) as Map); + final dynamic flags; final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants_Source source; @@ -1556,6 +1628,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConstantsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Constants data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1568,6 +1643,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConfigFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config.fromJson( + json.decode(data) as Map); + final List coreFlags; final List systemFlags; @@ -1575,6 +1654,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_ConfigToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle_Config data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1587,6 +1669,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_CircleFromJson(json); + 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_Config config; @@ -1594,6 +1679,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_CircleToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Circle data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1603,11 +1691,18 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_ConstantsFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants.fromJson( + json.decode(data) as Map); + final dynamic level; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_ConstantsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member_Constants data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1620,6 +1715,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_MemberFromJson(json); + 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 dynamic type; @@ -1627,6 +1725,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Circles_MemberToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Member data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1642,6 +1743,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles { factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_CirclesFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Circles.fromJson(json.decode(data) as Map); + final String version; final CoreServerCapabilities_Ocs_Data_Capabilities_Circles_Status status; @@ -1655,6 +1759,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Circles { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_CirclesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Circles data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1665,12 +1771,19 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols { Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_ProtocolsFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols.fromJson( + json.decode(data) as Map); + final String webdav; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_ProtocolsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes_Protocols data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1684,6 +1797,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes { factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypesFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes.fromJson( + json.decode(data) as Map); + final String name; final List shareTypes; @@ -1693,6 +1810,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Ocm_ResourceTypes data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1707,6 +1827,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm { factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_OcmFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Ocm.fromJson(json.decode(data) as Map); + final bool enabled; final String apiVersion; @@ -1718,6 +1841,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Ocm { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_OcmToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Ocm data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1730,6 +1855,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Dav { factory CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_DavFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Dav.fromJson(json.decode(data) as Map); + final String? bulkupload; final String chunking; @@ -1737,6 +1865,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Dav { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_DavToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Dav data) => json.encode(data.toJson()); } @JsonSerializable() @@ -1750,6 +1880,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_PasswordFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password.fromJson( + json.decode(data) as Map); + final bool enforced; final bool askForOptionalPassword; @@ -1758,6 +1892,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_PasswordToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1768,12 +1905,19 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDate data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1784,12 +1928,21 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternalFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJsonString( + String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternalToJson(this); // coverage:ignore-end + + static String toJsonString( + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateInternal data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1800,12 +1953,20 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDat Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemoteFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJsonString( + String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemoteToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_ExpireDateRemote data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1825,6 +1986,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_PublicFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public.fromJson( + json.decode(data) as Map); + final bool enabled; final CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public_Password password; @@ -1852,6 +2017,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_PublicToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Public data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1862,12 +2030,19 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDateFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDateToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User_ExpireDate data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1880,6 +2055,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_UserFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User.fromJson( + json.decode(data) as Map); + @JsonKey(name: 'send_mail') final bool sendMail; @@ -1889,6 +2068,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_UserToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_User data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1899,12 +2081,19 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDateFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDateToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group_ExpireDate data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1917,6 +2106,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_GroupFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group.fromJson( + json.decode(data) as Map); + final bool enabled; @JsonKey(name: 'expire_date') @@ -1925,6 +2118,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_GroupToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Group data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1935,12 +2131,19 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDate data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1951,12 +2154,21 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_Expir Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupportedFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJsonString( + String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupportedToJson(this); // coverage:ignore-end + + static String toJsonString( + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation_ExpireDateSupported data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1971,6 +2183,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_FederationFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation.fromJson( + json.decode(data) as Map); + final bool outgoing; final bool incoming; @@ -1984,6 +2200,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_FederationToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Federation data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -1996,6 +2215,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_ShareeFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee.fromJson( + json.decode(data) as Map); + @JsonKey(name: 'query_lookup_default') final bool queryLookupDefault; @@ -2005,6 +2228,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_ShareeToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharee data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2015,12 +2241,21 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Uplo Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDropFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJsonString( + String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop.fromJson( + json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDropToJson(this); // coverage:ignore-end + + static String toJsonString( + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_UploadFilesDrop data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2034,6 +2269,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Pass Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_PasswordFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password.fromJson( + json.decode(data) as Map); + final bool enabled; final bool enforced; @@ -2042,6 +2281,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Pass Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_PasswordToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Password data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2055,6 +2297,11 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Expi Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDateFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJsonString( + String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate.fromJson( + json.decode(data) as Map); + final bool enabled; final bool enforced; @@ -2063,6 +2310,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_Expi Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDateToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail_ExpireDate data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2078,6 +2328,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_SharebymailFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail.fromJson( + json.decode(data) as Map); + final bool enabled; @JsonKey(name: 'send_password_by_mail') @@ -2094,6 +2348,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_SharebymailToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing_Sharebymail data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2114,6 +2371,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharingFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing.fromJson(json.decode(data) as Map); + @JsonKey(name: 'api_enabled') final bool apiEnabled; @@ -2140,6 +2400,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharingToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_FilesSharing data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2152,6 +2415,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notes { factory CoreServerCapabilities_Ocs_Data_Capabilities_Notes.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Notes.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Notes.fromJson(json.decode(data) as Map); + @JsonKey(name: 'api_version') final List apiVersion; @@ -2160,6 +2426,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notes { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Notes data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2173,6 +2441,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notifications { factory CoreServerCapabilities_Ocs_Data_Capabilities_Notifications.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotificationsFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_Notifications.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_Notifications.fromJson(json.decode(data) as Map); + @JsonKey(name: 'ocs-endpoints') final List ocsEndpoints; @@ -2184,6 +2455,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Notifications { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_NotificationsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Notifications data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2196,6 +2470,10 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api { factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_ApiFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api.fromJson( + json.decode(data) as Map); + final String generate; final String validate; @@ -2203,6 +2481,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_ApiToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy_Api data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2219,6 +2500,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy { factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicyFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy.fromJson(json.decode(data) as Map); + final int minLength; final bool enforceNonCommonPassword; @@ -2234,6 +2518,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicyToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_PasswordPolicy data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2248,6 +2535,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi { factory CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApiFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi.fromJson(json.decode(data) as Map); + final String version; @JsonKey(name: 'AccountPropertyScopesVersion') @@ -2262,6 +2552,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApiToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_ProvisioningApi data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2286,6 +2579,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Theming { factory CoreServerCapabilities_Ocs_Data_Capabilities_Theming.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingFromJson(json); + 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 url; @@ -2323,6 +2619,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_Theming { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_ThemingToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_Theming data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2335,6 +2633,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus { factory CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_UserStatusFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus.fromJson(json.decode(data) as Map); + final bool enabled; @JsonKey(name: 'supports_emoji') @@ -2343,6 +2644,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_UserStatusToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_UserStatus data) => + json.encode(data.toJson()); } @JsonSerializable() @@ -2352,11 +2656,17 @@ class CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus { factory CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatusFromJson(json); + factory CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus.fromJson(json.decode(data) as Map); + final bool enabled; // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatusToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities_WeatherStatus data) => + json.encode(data.toJson()); } @JsonSerializable(disallowUnrecognizedKeys: false) @@ -2383,6 +2693,9 @@ class CoreServerCapabilities_Ocs_Data_Capabilities { factory CoreServerCapabilities_Ocs_Data_Capabilities.fromJson(Map json) => _$CoreServerCapabilities_Ocs_Data_CapabilitiesFromJson(json); + 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_Bruteforce bruteforce; @@ -2423,6 +2736,8 @@ class CoreServerCapabilities_Ocs_Data_Capabilities { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_Data_CapabilitiesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data_Capabilities data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2435,6 +2750,9 @@ class CoreServerCapabilities_Ocs_Data { factory CoreServerCapabilities_Ocs_Data.fromJson(Map json) => _$CoreServerCapabilities_Ocs_DataFromJson(json); + factory CoreServerCapabilities_Ocs_Data.fromJsonString(String data) => + CoreServerCapabilities_Ocs_Data.fromJson(json.decode(data) as Map); + final CoreServerCapabilities_Ocs_Data_Version version; final CoreServerCapabilities_Ocs_Data_Capabilities capabilities; @@ -2442,6 +2760,8 @@ class CoreServerCapabilities_Ocs_Data { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_Ocs_DataToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs_Data data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2453,6 +2773,9 @@ class CoreServerCapabilities_Ocs { factory CoreServerCapabilities_Ocs.fromJson(Map json) => _$CoreServerCapabilities_OcsFromJson(json); + factory CoreServerCapabilities_Ocs.fromJsonString(String data) => + CoreServerCapabilities_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final CoreServerCapabilities_Ocs_Data data; @@ -2460,6 +2783,8 @@ class CoreServerCapabilities_Ocs { // coverage:ignore-start Map toJson() => _$CoreServerCapabilities_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2468,11 +2793,16 @@ class CoreServerCapabilities { factory CoreServerCapabilities.fromJson(Map json) => _$CoreServerCapabilitiesFromJson(json); + factory CoreServerCapabilities.fromJsonString(String data) => + CoreServerCapabilities.fromJson(json.decode(data) as Map); + final CoreServerCapabilities_Ocs ocs; // coverage:ignore-start Map toJson() => _$CoreServerCapabilitiesToJson(this); // coverage:ignore-end + + static String toJsonString(CoreServerCapabilities data) => json.encode(data.toJson()); } class CoreNavigationApps_Ocs_Data_Order { @@ -2527,6 +2857,9 @@ class CoreNavigationApps_Ocs_Data { factory CoreNavigationApps_Ocs_Data.fromJson(Map json) => _$CoreNavigationApps_Ocs_DataFromJson(json); + factory CoreNavigationApps_Ocs_Data.fromJsonString(String data) => + CoreNavigationApps_Ocs_Data.fromJson(json.decode(data) as Map); + final String id; /// Should always be an integer, but there is a bug. See https://github.com/nextcloud/server/issues/32828 @@ -2549,6 +2882,8 @@ class CoreNavigationApps_Ocs_Data { // coverage:ignore-start Map toJson() => _$CoreNavigationApps_Ocs_DataToJson(this); // coverage:ignore-end + + static String toJsonString(CoreNavigationApps_Ocs_Data data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2560,6 +2895,9 @@ class CoreNavigationApps_Ocs { factory CoreNavigationApps_Ocs.fromJson(Map json) => _$CoreNavigationApps_OcsFromJson(json); + factory CoreNavigationApps_Ocs.fromJsonString(String data) => + CoreNavigationApps_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final List data; @@ -2567,6 +2905,8 @@ class CoreNavigationApps_Ocs { // coverage:ignore-start Map toJson() => _$CoreNavigationApps_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreNavigationApps_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2575,11 +2915,16 @@ class CoreNavigationApps { factory CoreNavigationApps.fromJson(Map json) => _$CoreNavigationAppsFromJson(json); + factory CoreNavigationApps.fromJsonString(String data) => + CoreNavigationApps.fromJson(json.decode(data) as Map); + final CoreNavigationApps_Ocs ocs; // coverage:ignore-start Map toJson() => _$CoreNavigationAppsToJson(this); // coverage:ignore-end + + static String toJsonString(CoreNavigationApps data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2591,6 +2936,9 @@ class CoreLoginFlowInit_Poll { factory CoreLoginFlowInit_Poll.fromJson(Map json) => _$CoreLoginFlowInit_PollFromJson(json); + factory CoreLoginFlowInit_Poll.fromJsonString(String data) => + CoreLoginFlowInit_Poll.fromJson(json.decode(data) as Map); + final String token; final String endpoint; @@ -2598,6 +2946,8 @@ class CoreLoginFlowInit_Poll { // coverage:ignore-start Map toJson() => _$CoreLoginFlowInit_PollToJson(this); // coverage:ignore-end + + static String toJsonString(CoreLoginFlowInit_Poll data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2609,6 +2959,9 @@ class CoreLoginFlowInit { factory CoreLoginFlowInit.fromJson(Map json) => _$CoreLoginFlowInitFromJson(json); + factory CoreLoginFlowInit.fromJsonString(String data) => + CoreLoginFlowInit.fromJson(json.decode(data) as Map); + final CoreLoginFlowInit_Poll poll; final String login; @@ -2616,6 +2969,8 @@ class CoreLoginFlowInit { // coverage:ignore-start Map toJson() => _$CoreLoginFlowInitToJson(this); // coverage:ignore-end + + static String toJsonString(CoreLoginFlowInit data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2628,6 +2983,9 @@ class CoreLoginFlowResult { factory CoreLoginFlowResult.fromJson(Map json) => _$CoreLoginFlowResultFromJson(json); + factory CoreLoginFlowResult.fromJsonString(String data) => + CoreLoginFlowResult.fromJson(json.decode(data) as Map); + final String server; final String loginName; @@ -2637,6 +2995,8 @@ class CoreLoginFlowResult { // coverage:ignore-start Map toJson() => _$CoreLoginFlowResultToJson(this); // coverage:ignore-end + + static String toJsonString(CoreLoginFlowResult data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2645,11 +3005,16 @@ class GetSupportedApiVersions { factory GetSupportedApiVersions.fromJson(Map json) => _$GetSupportedApiVersionsFromJson(json); + factory GetSupportedApiVersions.fromJsonString(String data) => + GetSupportedApiVersions.fromJson(json.decode(data) as Map); + final List? apiLevels; // coverage:ignore-start Map toJson() => _$GetSupportedApiVersionsToJson(this); // coverage:ignore-end + + static String toJsonString(GetSupportedApiVersions data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2679,6 +3044,8 @@ class NewsArticle { factory NewsArticle.fromJson(Map json) => _$NewsArticleFromJson(json); + factory NewsArticle.fromJsonString(String data) => NewsArticle.fromJson(json.decode(data) as Map); + final int id; final String guid; @@ -2722,6 +3089,8 @@ class NewsArticle { // coverage:ignore-start Map toJson() => _$NewsArticleToJson(this); // coverage:ignore-end + + static String toJsonString(NewsArticle data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2744,6 +3113,8 @@ class NewsFeed { factory NewsFeed.fromJson(Map json) => _$NewsFeedFromJson(json); + factory NewsFeed.fromJsonString(String data) => NewsFeed.fromJson(json.decode(data) as Map); + final int id; final String url; @@ -2773,6 +3144,8 @@ class NewsFeed { // coverage:ignore-start Map toJson() => _$NewsFeedToJson(this); // coverage:ignore-end + + static String toJsonString(NewsFeed data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2786,6 +3159,8 @@ class NewsFolder { factory NewsFolder.fromJson(Map json) => _$NewsFolderFromJson(json); + factory NewsFolder.fromJsonString(String data) => NewsFolder.fromJson(json.decode(data) as Map); + final int id; final String name; @@ -2798,6 +3173,8 @@ class NewsFolder { // coverage:ignore-start Map toJson() => _$NewsFolderToJson(this); // coverage:ignore-end + + static String toJsonString(NewsFolder data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2806,11 +3183,16 @@ class NewsListFolders { factory NewsListFolders.fromJson(Map json) => _$NewsListFoldersFromJson(json); + factory NewsListFolders.fromJsonString(String data) => + NewsListFolders.fromJson(json.decode(data) as Map); + final List folders; // coverage:ignore-start Map toJson() => _$NewsListFoldersToJson(this); // coverage:ignore-end + + static String toJsonString(NewsListFolders data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2823,6 +3205,9 @@ class NewsListFeeds { factory NewsListFeeds.fromJson(Map json) => _$NewsListFeedsFromJson(json); + factory NewsListFeeds.fromJsonString(String data) => + NewsListFeeds.fromJson(json.decode(data) as Map); + final int? starredCount; final int? newestItemId; @@ -2832,6 +3217,8 @@ class NewsListFeeds { // coverage:ignore-start Map toJson() => _$NewsListFeedsToJson(this); // coverage:ignore-end + + static String toJsonString(NewsListFeeds data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2840,11 +3227,16 @@ class NewsListArticles { factory NewsListArticles.fromJson(Map json) => _$NewsListArticlesFromJson(json); + factory NewsListArticles.fromJsonString(String data) => + NewsListArticles.fromJson(json.decode(data) as Map); + final List items; // coverage:ignore-start Map toJson() => _$NewsListArticlesToJson(this); // coverage:ignore-end + + static String toJsonString(NewsListArticles data) => json.encode(data.toJson()); } @JsonSerializable() @@ -2864,6 +3256,8 @@ class NotesNote { factory NotesNote.fromJson(Map json) => _$NotesNoteFromJson(json); + factory NotesNote.fromJsonString(String data) => NotesNote.fromJson(json.decode(data) as Map); + final int id; final String etag; @@ -2887,6 +3281,8 @@ class NotesNote { // coverage:ignore-start Map toJson() => _$NotesNoteToJson(this); // coverage:ignore-end + + static String toJsonString(NotesNote data) => json.encode(data.toJson()); } enum NotesSettings_NoteMode { @@ -2919,6 +3315,9 @@ class NotesSettings { factory NotesSettings.fromJson(Map json) => _$NotesSettingsFromJson(json); + factory NotesSettings.fromJsonString(String data) => + NotesSettings.fromJson(json.decode(data) as Map); + final String notesPath; final String fileSuffix; @@ -2928,6 +3327,8 @@ class NotesSettings { // coverage:ignore-start Map toJson() => _$NotesSettingsToJson(this); // coverage:ignore-end + + static String toJsonString(NotesSettings data) => json.encode(data.toJson()); } class NotificationsNotification_SubjectRichParameters { @@ -2994,6 +3395,9 @@ class NotificationsNotificationAction { factory NotificationsNotificationAction.fromJson(Map json) => _$NotificationsNotificationActionFromJson(json); + factory NotificationsNotificationAction.fromJsonString(String data) => + NotificationsNotificationAction.fromJson(json.decode(data) as Map); + final String label; final String link; @@ -3005,6 +3409,8 @@ class NotificationsNotificationAction { // coverage:ignore-start Map toJson() => _$NotificationsNotificationActionToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsNotificationAction data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3029,6 +3435,9 @@ class NotificationsNotification { factory NotificationsNotification.fromJson(Map json) => _$NotificationsNotificationFromJson(json); + factory NotificationsNotification.fromJsonString(String data) => + NotificationsNotification.fromJson(json.decode(data) as Map); + @JsonKey(name: 'notification_id') final int notificationId; @@ -3065,6 +3474,8 @@ class NotificationsNotification { // coverage:ignore-start Map toJson() => _$NotificationsNotificationToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsNotification data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3077,6 +3488,9 @@ class NotificationsListNotifications_Ocs { factory NotificationsListNotifications_Ocs.fromJson(Map json) => _$NotificationsListNotifications_OcsFromJson(json); + factory NotificationsListNotifications_Ocs.fromJsonString(String data) => + NotificationsListNotifications_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final List data; @@ -3084,6 +3498,8 @@ class NotificationsListNotifications_Ocs { // coverage:ignore-start Map toJson() => _$NotificationsListNotifications_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsListNotifications_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3093,11 +3509,16 @@ class NotificationsListNotifications { factory NotificationsListNotifications.fromJson(Map json) => _$NotificationsListNotificationsFromJson(json); + factory NotificationsListNotifications.fromJsonString(String data) => + NotificationsListNotifications.fromJson(json.decode(data) as Map); + final NotificationsListNotifications_Ocs ocs; // coverage:ignore-start Map toJson() => _$NotificationsListNotificationsToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsListNotifications data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3110,6 +3531,9 @@ class NotificationsGetNotification_Ocs { factory NotificationsGetNotification_Ocs.fromJson(Map json) => _$NotificationsGetNotification_OcsFromJson(json); + factory NotificationsGetNotification_Ocs.fromJsonString(String data) => + NotificationsGetNotification_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final NotificationsNotification data; @@ -3117,6 +3541,8 @@ class NotificationsGetNotification_Ocs { // coverage:ignore-start Map toJson() => _$NotificationsGetNotification_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsGetNotification_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3126,11 +3552,16 @@ class NotificationsGetNotification { factory NotificationsGetNotification.fromJson(Map json) => _$NotificationsGetNotificationFromJson(json); + factory NotificationsGetNotification.fromJsonString(String data) => + NotificationsGetNotification.fromJson(json.decode(data) as Map); + final NotificationsGetNotification_Ocs ocs; // coverage:ignore-start Map toJson() => _$NotificationsGetNotificationToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsGetNotification data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3142,6 +3573,8 @@ class EmptyOCS_Ocs { factory EmptyOCS_Ocs.fromJson(Map json) => _$EmptyOCS_OcsFromJson(json); + factory EmptyOCS_Ocs.fromJsonString(String data) => EmptyOCS_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final List data; @@ -3149,6 +3582,8 @@ class EmptyOCS_Ocs { // coverage:ignore-start Map toJson() => _$EmptyOCS_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(EmptyOCS_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3157,11 +3592,15 @@ class EmptyOCS { factory EmptyOCS.fromJson(Map json) => _$EmptyOCSFromJson(json); + factory EmptyOCS.fromJsonString(String data) => EmptyOCS.fromJson(json.decode(data) as Map); + final EmptyOCS_Ocs ocs; // coverage:ignore-start Map toJson() => _$EmptyOCSToJson(this); // coverage:ignore-end + + static String toJsonString(EmptyOCS data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3176,6 +3615,9 @@ class NotificationsPushServerSubscription { factory NotificationsPushServerSubscription.fromJson(Map json) => _$NotificationsPushServerSubscriptionFromJson(json); + factory NotificationsPushServerSubscription.fromJsonString(String data) => + NotificationsPushServerSubscription.fromJson(json.decode(data) as Map); + final String publicKey; final String deviceIdentifier; @@ -3187,6 +3629,8 @@ class NotificationsPushServerSubscription { // coverage:ignore-start Map toJson() => _$NotificationsPushServerSubscriptionToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsPushServerSubscription data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3199,6 +3643,9 @@ class NotificationsPushServerRegistration_Ocs { factory NotificationsPushServerRegistration_Ocs.fromJson(Map json) => _$NotificationsPushServerRegistration_OcsFromJson(json); + factory NotificationsPushServerRegistration_Ocs.fromJsonString(String data) => + NotificationsPushServerRegistration_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final NotificationsPushServerSubscription data; @@ -3206,6 +3653,8 @@ class NotificationsPushServerRegistration_Ocs { // coverage:ignore-start Map toJson() => _$NotificationsPushServerRegistration_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsPushServerRegistration_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3215,11 +3664,16 @@ class NotificationsPushServerRegistration { factory NotificationsPushServerRegistration.fromJson(Map json) => _$NotificationsPushServerRegistrationFromJson(json); + factory NotificationsPushServerRegistration.fromJsonString(String data) => + NotificationsPushServerRegistration.fromJson(json.decode(data) as Map); + final NotificationsPushServerRegistration_Ocs ocs; // coverage:ignore-start Map toJson() => _$NotificationsPushServerRegistrationToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsPushServerRegistration data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3235,6 +3689,9 @@ class ProvisioningApiUserDetails_Quota { factory ProvisioningApiUserDetails_Quota.fromJson(Map json) => _$ProvisioningApiUserDetails_QuotaFromJson(json); + factory ProvisioningApiUserDetails_Quota.fromJsonString(String data) => + ProvisioningApiUserDetails_Quota.fromJson(json.decode(data) as Map); + final int free; final int used; @@ -3248,6 +3705,8 @@ class ProvisioningApiUserDetails_Quota { // coverage:ignore-start Map toJson() => _$ProvisioningApiUserDetails_QuotaToJson(this); // coverage:ignore-end + + static String toJsonString(ProvisioningApiUserDetails_Quota data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3260,6 +3719,9 @@ class ProvisioningApiUserDetails_BackendCapabilities { factory ProvisioningApiUserDetails_BackendCapabilities.fromJson(Map json) => _$ProvisioningApiUserDetails_BackendCapabilitiesFromJson(json); + factory ProvisioningApiUserDetails_BackendCapabilities.fromJsonString(String data) => + ProvisioningApiUserDetails_BackendCapabilities.fromJson(json.decode(data) as Map); + final bool setDisplayName; final bool setPassword; @@ -3267,6 +3729,8 @@ class ProvisioningApiUserDetails_BackendCapabilities { // coverage:ignore-start Map toJson() => _$ProvisioningApiUserDetails_BackendCapabilitiesToJson(this); // coverage:ignore-end + + static String toJsonString(ProvisioningApiUserDetails_BackendCapabilities data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3314,6 +3778,9 @@ class ProvisioningApiUserDetails { factory ProvisioningApiUserDetails.fromJson(Map json) => _$ProvisioningApiUserDetailsFromJson(json); + factory ProvisioningApiUserDetails.fromJsonString(String data) => + ProvisioningApiUserDetails.fromJson(json.decode(data) as Map); + final bool? enabled; final String storageLocation; @@ -3399,6 +3866,8 @@ class ProvisioningApiUserDetails { // coverage:ignore-start Map toJson() => _$ProvisioningApiUserDetailsToJson(this); // coverage:ignore-end + + static String toJsonString(ProvisioningApiUserDetails data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3410,6 +3879,9 @@ class ProvisioningApiUser_Ocs { factory ProvisioningApiUser_Ocs.fromJson(Map json) => _$ProvisioningApiUser_OcsFromJson(json); + factory ProvisioningApiUser_Ocs.fromJsonString(String data) => + ProvisioningApiUser_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final ProvisioningApiUserDetails data; @@ -3417,6 +3889,8 @@ class ProvisioningApiUser_Ocs { // coverage:ignore-start Map toJson() => _$ProvisioningApiUser_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(ProvisioningApiUser_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3425,11 +3899,16 @@ class ProvisioningApiUser { factory ProvisioningApiUser.fromJson(Map json) => _$ProvisioningApiUserFromJson(json); + factory ProvisioningApiUser.fromJsonString(String data) => + ProvisioningApiUser.fromJson(json.decode(data) as Map); + final ProvisioningApiUser_Ocs ocs; // coverage:ignore-start Map toJson() => _$ProvisioningApiUserToJson(this); // coverage:ignore-end + + static String toJsonString(ProvisioningApiUser data) => json.encode(data.toJson()); } enum UserStatusClearAt_Type { @@ -3518,6 +3997,9 @@ class UserStatusClearAt { factory UserStatusClearAt.fromJson(Map json) => _$UserStatusClearAtFromJson(json); + factory UserStatusClearAt.fromJsonString(String data) => + UserStatusClearAt.fromJson(json.decode(data) as Map); + final UserStatusClearAt_Type type; final UserStatusClearAt_Time time; @@ -3525,6 +4007,8 @@ class UserStatusClearAt { // coverage:ignore-start Map toJson() => _$UserStatusClearAtToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusClearAt data) => json.encode(data.toJson()); } class UserStatusPublicUserStatus_ClearAt { @@ -3603,6 +4087,9 @@ class UserStatusPublicUserStatus { factory UserStatusPublicUserStatus.fromJson(Map json) => _$UserStatusPublicUserStatusFromJson(json); + factory UserStatusPublicUserStatus.fromJsonString(String data) => + UserStatusPublicUserStatus.fromJson(json.decode(data) as Map); + final String userId; final String? message; @@ -3616,6 +4103,8 @@ class UserStatusPublicUserStatus { // coverage:ignore-start Map toJson() => _$UserStatusPublicUserStatusToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusPublicUserStatus data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3628,6 +4117,9 @@ class UserStatusFindAllStatuses_Ocs { factory UserStatusFindAllStatuses_Ocs.fromJson(Map json) => _$UserStatusFindAllStatuses_OcsFromJson(json); + factory UserStatusFindAllStatuses_Ocs.fromJsonString(String data) => + UserStatusFindAllStatuses_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final List data; @@ -3635,6 +4127,8 @@ class UserStatusFindAllStatuses_Ocs { // coverage:ignore-start Map toJson() => _$UserStatusFindAllStatuses_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusFindAllStatuses_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3643,11 +4137,16 @@ class UserStatusFindAllStatuses { factory UserStatusFindAllStatuses.fromJson(Map json) => _$UserStatusFindAllStatusesFromJson(json); + factory UserStatusFindAllStatuses.fromJsonString(String data) => + UserStatusFindAllStatuses.fromJson(json.decode(data) as Map); + final UserStatusFindAllStatuses_Ocs ocs; // coverage:ignore-start Map toJson() => _$UserStatusFindAllStatusesToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusFindAllStatuses data) => json.encode(data.toJson()); } class UserStatusFindStatus_Ocs_Data { @@ -3685,6 +4184,9 @@ class UserStatusFindStatus_Ocs { factory UserStatusFindStatus_Ocs.fromJson(Map json) => _$UserStatusFindStatus_OcsFromJson(json); + factory UserStatusFindStatus_Ocs.fromJsonString(String data) => + UserStatusFindStatus_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final UserStatusFindStatus_Ocs_Data data; @@ -3692,6 +4194,8 @@ class UserStatusFindStatus_Ocs { // coverage:ignore-start Map toJson() => _$UserStatusFindStatus_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusFindStatus_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3700,11 +4204,16 @@ class UserStatusFindStatus { factory UserStatusFindStatus.fromJson(Map json) => _$UserStatusFindStatusFromJson(json); + factory UserStatusFindStatus.fromJsonString(String data) => + UserStatusFindStatus.fromJson(json.decode(data) as Map); + final UserStatusFindStatus_Ocs ocs; // coverage:ignore-start Map toJson() => _$UserStatusFindStatusToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusFindStatus data) => json.encode(data.toJson()); } class UserStatus_ClearAt { @@ -3757,6 +4266,8 @@ class UserStatus { factory UserStatus.fromJson(Map json) => _$UserStatusFromJson(json); + factory UserStatus.fromJsonString(String data) => UserStatus.fromJson(json.decode(data) as Map); + final String userId; final String? message; @@ -3776,6 +4287,8 @@ class UserStatus { // coverage:ignore-start Map toJson() => _$UserStatusToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatus data) => json.encode(data.toJson()); } class UserStatusGetUserStatus_Ocs_Data { @@ -3814,6 +4327,9 @@ class UserStatusGetUserStatus_Ocs { factory UserStatusGetUserStatus_Ocs.fromJson(Map json) => _$UserStatusGetUserStatus_OcsFromJson(json); + factory UserStatusGetUserStatus_Ocs.fromJsonString(String data) => + UserStatusGetUserStatus_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final UserStatusGetUserStatus_Ocs_Data data; @@ -3821,6 +4337,8 @@ class UserStatusGetUserStatus_Ocs { // coverage:ignore-start Map toJson() => _$UserStatusGetUserStatus_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusGetUserStatus_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3829,11 +4347,16 @@ class UserStatusGetUserStatus { factory UserStatusGetUserStatus.fromJson(Map json) => _$UserStatusGetUserStatusFromJson(json); + factory UserStatusGetUserStatus.fromJsonString(String data) => + UserStatusGetUserStatus.fromJson(json.decode(data) as Map); + final UserStatusGetUserStatus_Ocs ocs; // coverage:ignore-start Map toJson() => _$UserStatusGetUserStatusToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusGetUserStatus data) => json.encode(data.toJson()); } class UserStatusPredefinedStatus_ClearAt { @@ -3882,6 +4405,9 @@ class UserStatusPredefinedStatus { factory UserStatusPredefinedStatus.fromJson(Map json) => _$UserStatusPredefinedStatusFromJson(json); + factory UserStatusPredefinedStatus.fromJsonString(String data) => + UserStatusPredefinedStatus.fromJson(json.decode(data) as Map); + final String id; final String icon; @@ -3893,6 +4419,8 @@ class UserStatusPredefinedStatus { // coverage:ignore-start Map toJson() => _$UserStatusPredefinedStatusToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusPredefinedStatus data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3905,6 +4433,9 @@ class UserStatusPredefinedStatuses_Ocs { factory UserStatusPredefinedStatuses_Ocs.fromJson(Map json) => _$UserStatusPredefinedStatuses_OcsFromJson(json); + factory UserStatusPredefinedStatuses_Ocs.fromJsonString(String data) => + UserStatusPredefinedStatuses_Ocs.fromJson(json.decode(data) as Map); + final OCSMeta meta; final List data; @@ -3912,6 +4443,8 @@ class UserStatusPredefinedStatuses_Ocs { // coverage:ignore-start Map toJson() => _$UserStatusPredefinedStatuses_OcsToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusPredefinedStatuses_Ocs data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3921,11 +4454,16 @@ class UserStatusPredefinedStatuses { factory UserStatusPredefinedStatuses.fromJson(Map json) => _$UserStatusPredefinedStatusesFromJson(json); + factory UserStatusPredefinedStatuses.fromJsonString(String data) => + UserStatusPredefinedStatuses.fromJson(json.decode(data) as Map); + final UserStatusPredefinedStatuses_Ocs ocs; // coverage:ignore-start Map toJson() => _$UserStatusPredefinedStatusesToJson(this); // coverage:ignore-end + + static String toJsonString(UserStatusPredefinedStatuses data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3943,6 +4481,9 @@ class NotificationsPushNotificationDecryptedSubject { factory NotificationsPushNotificationDecryptedSubject.fromJson(Map json) => _$NotificationsPushNotificationDecryptedSubjectFromJson(json); + factory NotificationsPushNotificationDecryptedSubject.fromJsonString(String data) => + NotificationsPushNotificationDecryptedSubject.fromJson(json.decode(data) as Map); + final int? nid; final String? app; @@ -3961,6 +4502,8 @@ class NotificationsPushNotificationDecryptedSubject { // coverage:ignore-start Map toJson() => _$NotificationsPushNotificationDecryptedSubjectToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsPushNotificationDecryptedSubject data) => json.encode(data.toJson()); } @JsonSerializable() @@ -3975,6 +4518,9 @@ class NotificationsPushNotification { factory NotificationsPushNotification.fromJson(Map json) => _$NotificationsPushNotificationFromJson(json); + factory NotificationsPushNotification.fromJsonString(String data) => + NotificationsPushNotification.fromJson(json.decode(data) as Map); + final String accountID; final String priority; @@ -3986,6 +4532,8 @@ class NotificationsPushNotification { // coverage:ignore-start Map toJson() => _$NotificationsPushNotificationToJson(this); // coverage:ignore-end + + static String toJsonString(NotificationsPushNotification data) => json.encode(data.toJson()); } // coverage:ignore-start