From ad31b9edec596d08056f1d60de2161625b4ff581 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 2 Dec 2023 11:35:55 +0100 Subject: [PATCH] fix(dynamite): use the currently active serializer when serializing someOfs Signed-off-by: Nikolas Rimikis --- .../lib/src/builder/generate_ofs.dart | 4 +- .../lib/any_of.openapi.dart | 24 ++-- .../lib/nested_ofs.openapi.dart | 56 ++++----- .../lib/one_of.openapi.dart | 24 ++-- .../lib/some_of.openapi.dart | 8 +- .../lib/type_defs.openapi.dart | 12 +- .../nextcloud/lib/src/api/core.openapi.dart | 106 ++++++++---------- .../lib/src/api/files_sharing.openapi.dart | 10 +- .../lib/src/api/provisioning_api.openapi.dart | 40 +++---- .../lib/src/api/sharebymail.openapi.dart | 9 +- .../nextcloud/lib/src/api/spreed.openapi.dart | 42 +++---- .../lib/src/api/user_status.openapi.dart | 16 +-- 12 files changed, 171 insertions(+), 180 deletions(-) diff --git a/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart b/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart index 484e2c0cb57..137e4405ace 100644 --- a/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart +++ b/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart @@ -184,7 +184,7 @@ Iterable generateSomeOf( [ 'value = object.$fieldName;', 'if (value != null) {', - ' return ${result.serialize('value')}!;', + ' return ${result.serialize('value', 'serializers')}!;', '}', ], '\n', @@ -233,7 +233,7 @@ Iterable generateSomeOf( buffer.write(''' $dartName $fieldName; try { - $fieldName = ${result.deserialize('data')}; + $fieldName = ${result.deserialize('data', 'serializers')}; } catch (_) {} '''); } diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart index b4c22a95345..0b3237769ed 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/any_of.openapi.dart @@ -147,11 +147,11 @@ class _$ObjectAnyOf0ObjectAnyOf1Serializer implements PrimitiveSerializer<$Objec dynamic value; value = object.objectAnyOf0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ObjectAnyOf0))!; + return serializers.serialize(value, specifiedType: const FullType(ObjectAnyOf0))!; } value = object.objectAnyOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ObjectAnyOf1))!; + return serializers.serialize(value, specifiedType: const FullType(ObjectAnyOf1))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -165,11 +165,11 @@ class _$ObjectAnyOf0ObjectAnyOf1Serializer implements PrimitiveSerializer<$Objec }) { ObjectAnyOf0? objectAnyOf0; try { - objectAnyOf0 = _jsonSerializers.deserialize(data, specifiedType: const FullType(ObjectAnyOf0))! as ObjectAnyOf0; + objectAnyOf0 = serializers.deserialize(data, specifiedType: const FullType(ObjectAnyOf0))! as ObjectAnyOf0; } catch (_) {} ObjectAnyOf1? objectAnyOf1; try { - objectAnyOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(ObjectAnyOf1))! as ObjectAnyOf1; + objectAnyOf1 = serializers.deserialize(data, specifiedType: const FullType(ObjectAnyOf1))! as ObjectAnyOf1; } catch (_) {} return (objectAnyOf0: objectAnyOf0, objectAnyOf1: objectAnyOf1); } @@ -204,11 +204,11 @@ class _$MixedAnyOf1StringSerializer implements PrimitiveSerializer<$MixedAnyOf1S dynamic value; value = object.mixedAnyOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(MixedAnyOf1))!; + return serializers.serialize(value, specifiedType: const FullType(MixedAnyOf1))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -222,11 +222,11 @@ class _$MixedAnyOf1StringSerializer implements PrimitiveSerializer<$MixedAnyOf1S }) { MixedAnyOf1? mixedAnyOf1; try { - mixedAnyOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(MixedAnyOf1))! as MixedAnyOf1; + mixedAnyOf1 = serializers.deserialize(data, specifiedType: const FullType(MixedAnyOf1))! as MixedAnyOf1; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return (mixedAnyOf1: mixedAnyOf1, string: string); } @@ -261,11 +261,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { dynamic value; value = object.$num; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(num))!; + return serializers.serialize(value, specifiedType: const FullType(num))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -279,11 +279,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { }) { num? $num; try { - $num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num; + $num = serializers.deserialize(data, specifiedType: const FullType(num))! as num; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($num: $num, string: string); } diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart index cc76d41acbe..2c0007eae39 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/nested_ofs.openapi.dart @@ -205,11 +205,11 @@ class _$BaseOneOf1DoubleSerializer implements PrimitiveSerializer<$BaseOneOf1Dou dynamic value; value = object.baseOneOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseOneOf1))!; + return serializers.serialize(value, specifiedType: const FullType(BaseOneOf1))!; } value = object.$double; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(double))!; + return serializers.serialize(value, specifiedType: const FullType(double))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -223,11 +223,11 @@ class _$BaseOneOf1DoubleSerializer implements PrimitiveSerializer<$BaseOneOf1Dou }) { BaseOneOf1? baseOneOf1; try { - baseOneOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseOneOf1))! as BaseOneOf1; + baseOneOf1 = serializers.deserialize(data, specifiedType: const FullType(BaseOneOf1))! as BaseOneOf1; } catch (_) {} double? $double; try { - $double = _jsonSerializers.deserialize(data, specifiedType: const FullType(double))! as double; + $double = serializers.deserialize(data, specifiedType: const FullType(double))! as double; } catch (_) {} return (baseOneOf1: baseOneOf1, $double: $double); } @@ -262,11 +262,11 @@ class _$BaseAnyOf1IntSerializer implements PrimitiveSerializer<$BaseAnyOf1Int> { dynamic value; value = object.baseAnyOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseAnyOf1))!; + return serializers.serialize(value, specifiedType: const FullType(BaseAnyOf1))!; } value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -280,11 +280,11 @@ class _$BaseAnyOf1IntSerializer implements PrimitiveSerializer<$BaseAnyOf1Int> { }) { BaseAnyOf1? baseAnyOf1; try { - baseAnyOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseAnyOf1))! as BaseAnyOf1; + baseAnyOf1 = serializers.deserialize(data, specifiedType: const FullType(BaseAnyOf1))! as BaseAnyOf1; } catch (_) {} int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} return (baseAnyOf1: baseAnyOf1, $int: $int); } @@ -327,19 +327,19 @@ class _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOfSerializer dynamic value; value = object.baseAllOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseAllOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseAllOf))!; } value = object.baseAnyOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseAnyOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseAnyOf))!; } value = object.baseNestedOneOf3; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseNestedOneOf3))!; + return serializers.serialize(value, specifiedType: const FullType(BaseNestedOneOf3))!; } value = object.baseOneOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseOneOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseOneOf))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -353,22 +353,22 @@ class _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOfSerializer }) { BaseAllOf? baseAllOf; try { - baseAllOf = _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseAllOf))! as BaseAllOf; + baseAllOf = serializers.deserialize(data, specifiedType: const FullType(BaseAllOf))! as BaseAllOf; } catch (_) {} BaseAnyOf? baseAnyOf; try { - baseAnyOf = ((_jsonSerializers.deserialize(data, specifiedType: const FullType(BaseAnyOf))! as BaseAnyOf) - ..validateAnyOf()); + baseAnyOf = + ((serializers.deserialize(data, specifiedType: const FullType(BaseAnyOf))! as BaseAnyOf)..validateAnyOf()); } catch (_) {} BaseNestedOneOf3? baseNestedOneOf3; try { baseNestedOneOf3 = - _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseNestedOneOf3))! as BaseNestedOneOf3; + serializers.deserialize(data, specifiedType: const FullType(BaseNestedOneOf3))! as BaseNestedOneOf3; } catch (_) {} BaseOneOf? baseOneOf; try { - baseOneOf = ((_jsonSerializers.deserialize(data, specifiedType: const FullType(BaseOneOf))! as BaseOneOf) - ..validateOneOf()); + baseOneOf = + ((serializers.deserialize(data, specifiedType: const FullType(BaseOneOf))! as BaseOneOf)..validateOneOf()); } catch (_) {} return (baseAllOf: baseAllOf, baseAnyOf: baseAnyOf, baseNestedOneOf3: baseNestedOneOf3, baseOneOf: baseOneOf); } @@ -411,19 +411,19 @@ class _$BaseAllOfBaseAnyOfBaseNestedAnyOf3BaseOneOfSerializer dynamic value; value = object.baseAllOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseAllOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseAllOf))!; } value = object.baseAnyOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseAnyOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseAnyOf))!; } value = object.baseNestedAnyOf3; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseNestedAnyOf3))!; + return serializers.serialize(value, specifiedType: const FullType(BaseNestedAnyOf3))!; } value = object.baseOneOf; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BaseOneOf))!; + return serializers.serialize(value, specifiedType: const FullType(BaseOneOf))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -437,22 +437,22 @@ class _$BaseAllOfBaseAnyOfBaseNestedAnyOf3BaseOneOfSerializer }) { BaseAllOf? baseAllOf; try { - baseAllOf = _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseAllOf))! as BaseAllOf; + baseAllOf = serializers.deserialize(data, specifiedType: const FullType(BaseAllOf))! as BaseAllOf; } catch (_) {} BaseAnyOf? baseAnyOf; try { - baseAnyOf = ((_jsonSerializers.deserialize(data, specifiedType: const FullType(BaseAnyOf))! as BaseAnyOf) - ..validateAnyOf()); + baseAnyOf = + ((serializers.deserialize(data, specifiedType: const FullType(BaseAnyOf))! as BaseAnyOf)..validateAnyOf()); } catch (_) {} BaseNestedAnyOf3? baseNestedAnyOf3; try { baseNestedAnyOf3 = - _jsonSerializers.deserialize(data, specifiedType: const FullType(BaseNestedAnyOf3))! as BaseNestedAnyOf3; + serializers.deserialize(data, specifiedType: const FullType(BaseNestedAnyOf3))! as BaseNestedAnyOf3; } catch (_) {} BaseOneOf? baseOneOf; try { - baseOneOf = ((_jsonSerializers.deserialize(data, specifiedType: const FullType(BaseOneOf))! as BaseOneOf) - ..validateOneOf()); + baseOneOf = + ((serializers.deserialize(data, specifiedType: const FullType(BaseOneOf))! as BaseOneOf)..validateOneOf()); } catch (_) {} return (baseAllOf: baseAllOf, baseAnyOf: baseAnyOf, baseNestedAnyOf3: baseNestedAnyOf3, baseOneOf: baseOneOf); } diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart index b4a53da7ff3..ffa72a0e742 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/one_of.openapi.dart @@ -147,11 +147,11 @@ class _$ObjectOneOf0ObjectOneOf1Serializer implements PrimitiveSerializer<$Objec dynamic value; value = object.objectOneOf0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ObjectOneOf0))!; + return serializers.serialize(value, specifiedType: const FullType(ObjectOneOf0))!; } value = object.objectOneOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ObjectOneOf1))!; + return serializers.serialize(value, specifiedType: const FullType(ObjectOneOf1))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -165,11 +165,11 @@ class _$ObjectOneOf0ObjectOneOf1Serializer implements PrimitiveSerializer<$Objec }) { ObjectOneOf0? objectOneOf0; try { - objectOneOf0 = _jsonSerializers.deserialize(data, specifiedType: const FullType(ObjectOneOf0))! as ObjectOneOf0; + objectOneOf0 = serializers.deserialize(data, specifiedType: const FullType(ObjectOneOf0))! as ObjectOneOf0; } catch (_) {} ObjectOneOf1? objectOneOf1; try { - objectOneOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(ObjectOneOf1))! as ObjectOneOf1; + objectOneOf1 = serializers.deserialize(data, specifiedType: const FullType(ObjectOneOf1))! as ObjectOneOf1; } catch (_) {} return (objectOneOf0: objectOneOf0, objectOneOf1: objectOneOf1); } @@ -204,11 +204,11 @@ class _$MixedOneOf1StringSerializer implements PrimitiveSerializer<$MixedOneOf1S dynamic value; value = object.mixedOneOf1; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(MixedOneOf1))!; + return serializers.serialize(value, specifiedType: const FullType(MixedOneOf1))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -222,11 +222,11 @@ class _$MixedOneOf1StringSerializer implements PrimitiveSerializer<$MixedOneOf1S }) { MixedOneOf1? mixedOneOf1; try { - mixedOneOf1 = _jsonSerializers.deserialize(data, specifiedType: const FullType(MixedOneOf1))! as MixedOneOf1; + mixedOneOf1 = serializers.deserialize(data, specifiedType: const FullType(MixedOneOf1))! as MixedOneOf1; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return (mixedOneOf1: mixedOneOf1, string: string); } @@ -261,11 +261,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { dynamic value; value = object.$num; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(num))!; + return serializers.serialize(value, specifiedType: const FullType(num))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -279,11 +279,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { }) { num? $num; try { - $num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num; + $num = serializers.deserialize(data, specifiedType: const FullType(num))! as num; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($num: $num, string: string); } diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/some_of.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/some_of.openapi.dart index 39971e01ce5..0589e6ca173 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/some_of.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/some_of.openapi.dart @@ -95,11 +95,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { dynamic value; value = object.$num; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(num))!; + return serializers.serialize(value, specifiedType: const FullType(num))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -113,11 +113,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { }) { num? $num; try { - $num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num; + $num = serializers.deserialize(data, specifiedType: const FullType(num))! as num; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($num: $num, string: string); } diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart index dd5e6fe515e..470aa518b09 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/type_defs.openapi.dart @@ -110,15 +110,15 @@ class _$BaseIntJsonObjectSerializer implements PrimitiveSerializer<$BaseIntJsonO dynamic value; value = object.base; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(Base))!; + return serializers.serialize(value, specifiedType: const FullType(Base))!; } value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } value = object.jsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(JsonObject))!; + return serializers.serialize(value, specifiedType: const FullType(JsonObject))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -132,15 +132,15 @@ class _$BaseIntJsonObjectSerializer implements PrimitiveSerializer<$BaseIntJsonO }) { Base? base; try { - base = _jsonSerializers.deserialize(data, specifiedType: const FullType(Base))! as Base; + base = serializers.deserialize(data, specifiedType: const FullType(Base))! as Base; } catch (_) {} int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} JsonObject? jsonObject; try { - jsonObject = _jsonSerializers.deserialize(data, specifiedType: const FullType(JsonObject))! as JsonObject; + jsonObject = serializers.deserialize(data, specifiedType: const FullType(JsonObject))! as JsonObject; } catch (_) {} return (base: base, $int: $int, jsonObject: jsonObject); } diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index c420dcd0a0d..b0cdc1e0205 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -10787,11 +10787,11 @@ class _$AutocompleteResultStatus0StringSerializer implements PrimitiveSerializer dynamic value; value = object.autocompleteResultStatus0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(AutocompleteResult_Status0))!; + return serializers.serialize(value, specifiedType: const FullType(AutocompleteResult_Status0))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -10805,14 +10805,14 @@ class _$AutocompleteResultStatus0StringSerializer implements PrimitiveSerializer }) { AutocompleteResult_Status0? autocompleteResultStatus0; try { - autocompleteResultStatus0 = _jsonSerializers.deserialize( + autocompleteResultStatus0 = serializers.deserialize( data, specifiedType: const FullType(AutocompleteResult_Status0), )! as AutocompleteResult_Status0; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return (autocompleteResultStatus0: autocompleteResultStatus0, string: string); } @@ -10847,11 +10847,11 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { dynamic value; value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -10865,11 +10865,11 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { }) { int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($int: $int, string: string); } @@ -10909,11 +10909,11 @@ class _$BuiltListSharebymailCapabilities0Serializer implements PrimitiveSerializ dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.sharebymailCapabilities0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(SharebymailCapabilities0))!; + return serializers.serialize(value, specifiedType: const FullType(SharebymailCapabilities0))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -10927,17 +10927,15 @@ class _$BuiltListSharebymailCapabilities0Serializer implements PrimitiveSerializ }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} SharebymailCapabilities0? sharebymailCapabilities0; try { - sharebymailCapabilities0 = _jsonSerializers.deserialize( - data, - specifiedType: const FullType(SharebymailCapabilities0), - )! as SharebymailCapabilities0; + sharebymailCapabilities0 = serializers.deserialize(data, specifiedType: const FullType(SharebymailCapabilities0))! + as SharebymailCapabilities0; } catch (_) {} return (builtListJsonObject: builtListJsonObject, sharebymailCapabilities0: sharebymailCapabilities0); } @@ -10978,11 +10976,11 @@ class _$BuiltListSpreedPublicCapabilities0Serializer dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.spreedPublicCapabilities0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(SpreedPublicCapabilities0))!; + return serializers.serialize(value, specifiedType: const FullType(SpreedPublicCapabilities0))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -10996,14 +10994,14 @@ class _$BuiltListSpreedPublicCapabilities0Serializer }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} SpreedPublicCapabilities0? spreedPublicCapabilities0; try { - spreedPublicCapabilities0 = _jsonSerializers.deserialize( + spreedPublicCapabilities0 = serializers.deserialize( data, specifiedType: const FullType(SpreedPublicCapabilities0), )! as SpreedPublicCapabilities0; @@ -11084,59 +11082,59 @@ class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabili dynamic value; value = object.commentsCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(CommentsCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(CommentsCapabilities))!; } value = object.davCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(DavCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(DavCapabilities))!; } value = object.filesCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(FilesCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(FilesCapabilities))!; } value = object.filesSharingCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(FilesSharingCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(FilesSharingCapabilities))!; } value = object.filesTrashbinCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(FilesTrashbinCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(FilesTrashbinCapabilities))!; } value = object.filesVersionsCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(FilesVersionsCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(FilesVersionsCapabilities))!; } value = object.notesCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(NotesCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(NotesCapabilities))!; } value = object.notificationsCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(NotificationsCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(NotificationsCapabilities))!; } value = object.provisioningApiCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ProvisioningApiCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(ProvisioningApiCapabilities))!; } value = object.sharebymailCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(SharebymailCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(SharebymailCapabilities))!; } value = object.spreedPublicCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(SpreedPublicCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(SpreedPublicCapabilities))!; } value = object.themingPublicCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ThemingPublicCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(ThemingPublicCapabilities))!; } value = object.userStatusCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(UserStatusCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(UserStatusCapabilities))!; } value = object.weatherStatusCapabilities; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(WeatherStatusCapabilities))!; + return serializers.serialize(value, specifiedType: const FullType(WeatherStatusCapabilities))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -11151,36 +11149,34 @@ class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabili }) { CommentsCapabilities? commentsCapabilities; try { - commentsCapabilities = _jsonSerializers.deserialize(data, specifiedType: const FullType(CommentsCapabilities))! - as CommentsCapabilities; + commentsCapabilities = + serializers.deserialize(data, specifiedType: const FullType(CommentsCapabilities))! as CommentsCapabilities; } catch (_) {} DavCapabilities? davCapabilities; try { davCapabilities = - _jsonSerializers.deserialize(data, specifiedType: const FullType(DavCapabilities))! as DavCapabilities; + serializers.deserialize(data, specifiedType: const FullType(DavCapabilities))! as DavCapabilities; } catch (_) {} FilesCapabilities? filesCapabilities; try { filesCapabilities = - _jsonSerializers.deserialize(data, specifiedType: const FullType(FilesCapabilities))! as FilesCapabilities; + serializers.deserialize(data, specifiedType: const FullType(FilesCapabilities))! as FilesCapabilities; } catch (_) {} FilesSharingCapabilities? filesSharingCapabilities; try { - filesSharingCapabilities = _jsonSerializers.deserialize( - data, - specifiedType: const FullType(FilesSharingCapabilities), - )! as FilesSharingCapabilities; + filesSharingCapabilities = serializers.deserialize(data, specifiedType: const FullType(FilesSharingCapabilities))! + as FilesSharingCapabilities; } catch (_) {} FilesTrashbinCapabilities? filesTrashbinCapabilities; try { - filesTrashbinCapabilities = _jsonSerializers.deserialize( + filesTrashbinCapabilities = serializers.deserialize( data, specifiedType: const FullType(FilesTrashbinCapabilities), )! as FilesTrashbinCapabilities; } catch (_) {} FilesVersionsCapabilities? filesVersionsCapabilities; try { - filesVersionsCapabilities = _jsonSerializers.deserialize( + filesVersionsCapabilities = serializers.deserialize( data, specifiedType: const FullType(FilesVersionsCapabilities), )! as FilesVersionsCapabilities; @@ -11188,33 +11184,31 @@ class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabili NotesCapabilities? notesCapabilities; try { notesCapabilities = - _jsonSerializers.deserialize(data, specifiedType: const FullType(NotesCapabilities))! as NotesCapabilities; + serializers.deserialize(data, specifiedType: const FullType(NotesCapabilities))! as NotesCapabilities; } catch (_) {} NotificationsCapabilities? notificationsCapabilities; try { - notificationsCapabilities = _jsonSerializers.deserialize( + notificationsCapabilities = serializers.deserialize( data, specifiedType: const FullType(NotificationsCapabilities), )! as NotificationsCapabilities; } catch (_) {} ProvisioningApiCapabilities? provisioningApiCapabilities; try { - provisioningApiCapabilities = _jsonSerializers.deserialize( + provisioningApiCapabilities = serializers.deserialize( data, specifiedType: const FullType(ProvisioningApiCapabilities), )! as ProvisioningApiCapabilities; } catch (_) {} SharebymailCapabilities? sharebymailCapabilities; try { - sharebymailCapabilities = ((_jsonSerializers.deserialize( - data, - specifiedType: const FullType(SharebymailCapabilities), - )! as SharebymailCapabilities) + sharebymailCapabilities = ((serializers.deserialize(data, specifiedType: const FullType(SharebymailCapabilities))! + as SharebymailCapabilities) ..validateAnyOf()); } catch (_) {} SpreedPublicCapabilities? spreedPublicCapabilities; try { - spreedPublicCapabilities = ((_jsonSerializers.deserialize( + spreedPublicCapabilities = ((serializers.deserialize( data, specifiedType: const FullType(SpreedPublicCapabilities), )! as SpreedPublicCapabilities) @@ -11222,21 +11216,19 @@ class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabili } catch (_) {} ThemingPublicCapabilities? themingPublicCapabilities; try { - themingPublicCapabilities = _jsonSerializers.deserialize( + themingPublicCapabilities = serializers.deserialize( data, specifiedType: const FullType(ThemingPublicCapabilities), )! as ThemingPublicCapabilities; } catch (_) {} UserStatusCapabilities? userStatusCapabilities; try { - userStatusCapabilities = _jsonSerializers.deserialize( - data, - specifiedType: const FullType(UserStatusCapabilities), - )! as UserStatusCapabilities; + userStatusCapabilities = serializers.deserialize(data, specifiedType: const FullType(UserStatusCapabilities))! + as UserStatusCapabilities; } catch (_) {} WeatherStatusCapabilities? weatherStatusCapabilities; try { - weatherStatusCapabilities = _jsonSerializers.deserialize( + weatherStatusCapabilities = serializers.deserialize( data, specifiedType: const FullType(WeatherStatusCapabilities), )! as WeatherStatusCapabilities; diff --git a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart index 495d4209c3f..6d57ecefbf4 100644 --- a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart @@ -4843,11 +4843,11 @@ class _$BuiltListIntSerializer implements PrimitiveSerializer<$BuiltListInt> { dynamic value; value = object.builtListInt; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(int)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(int)]))!; } value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -4861,12 +4861,12 @@ class _$BuiltListIntSerializer implements PrimitiveSerializer<$BuiltListInt> { }) { BuiltList? builtListInt; try { - builtListInt = _jsonSerializers.deserialize(data, specifiedType: const FullType(BuiltList, [FullType(int)]))! - as BuiltList; + builtListInt = + serializers.deserialize(data, specifiedType: const FullType(BuiltList, [FullType(int)]))! as BuiltList; } catch (_) {} int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} return (builtListInt: builtListInt, $int: $int); } diff --git a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart index 53f67926c5f..658dd49b73e 100644 --- a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart +++ b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart @@ -8134,11 +8134,11 @@ class _$BoolIntSerializer implements PrimitiveSerializer<$BoolInt> { dynamic value; value = object.$bool; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(bool))!; + return serializers.serialize(value, specifiedType: const FullType(bool))!; } value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -8152,11 +8152,11 @@ class _$BoolIntSerializer implements PrimitiveSerializer<$BoolInt> { }) { bool? $bool; try { - $bool = _jsonSerializers.deserialize(data, specifiedType: const FullType(bool))! as bool; + $bool = serializers.deserialize(data, specifiedType: const FullType(bool))! as bool; } catch (_) {} int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} return ($bool: $bool, $int: $int); } @@ -8191,11 +8191,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { dynamic value; value = object.$num; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(num))!; + return serializers.serialize(value, specifiedType: const FullType(num))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -8209,11 +8209,11 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { }) { num? $num; try { - $num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num; + $num = serializers.deserialize(data, specifiedType: const FullType(num))! as num; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($num: $num, string: string); } @@ -8255,14 +8255,14 @@ class _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetail dynamic value; value = object.groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1; if (value != null) { - return _jsonSerializers.serialize( + return serializers.serialize( value, specifiedType: const FullType(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )!; } value = object.userDetails; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(UserDetails))!; + return serializers.serialize(value, specifiedType: const FullType(UserDetails))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -8277,14 +8277,14 @@ class _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetail GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1? groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1; try { - groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1 = _jsonSerializers.deserialize( + groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1 = serializers.deserialize( data, specifiedType: const FullType(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )! as GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1; } catch (_) {} UserDetails? userDetails; try { - userDetails = _jsonSerializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; + userDetails = serializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; } catch (_) {} return ( groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1: @@ -8330,11 +8330,11 @@ class _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Seria dynamic value; value = object.userDetails; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(UserDetails))!; + return serializers.serialize(value, specifiedType: const FullType(UserDetails))!; } value = object.usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1; if (value != null) { - return _jsonSerializers.serialize( + return serializers.serialize( value, specifiedType: const FullType(UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )!; @@ -8351,12 +8351,12 @@ class _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Seria }) { UserDetails? userDetails; try { - userDetails = _jsonSerializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; + userDetails = serializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; } catch (_) {} UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1; try { - usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 = _jsonSerializers.deserialize( + usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 = serializers.deserialize( data, specifiedType: const FullType(UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )! as UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1; @@ -8404,11 +8404,11 @@ class _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUse dynamic value; value = object.userDetails; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(UserDetails))!; + return serializers.serialize(value, specifiedType: const FullType(UserDetails))!; } value = object.usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1; if (value != null) { - return _jsonSerializers.serialize( + return serializers.serialize( value, specifiedType: const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )!; @@ -8425,12 +8425,12 @@ class _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUse }) { UserDetails? userDetails; try { - userDetails = _jsonSerializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; + userDetails = serializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails; } catch (_) {} UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1; try { - usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 = _jsonSerializers.deserialize( + usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 = serializers.deserialize( data, specifiedType: const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1), )! as UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1; diff --git a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart index 15fdda9f5bf..35f5df188ec 100644 --- a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart +++ b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart @@ -250,11 +250,11 @@ class _$BuiltListCapabilities0Serializer implements PrimitiveSerializer<$BuiltLi dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.capabilities0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(Capabilities0))!; + return serializers.serialize(value, specifiedType: const FullType(Capabilities0))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -268,15 +268,14 @@ class _$BuiltListCapabilities0Serializer implements PrimitiveSerializer<$BuiltLi }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} Capabilities0? capabilities0; try { - capabilities0 = - _jsonSerializers.deserialize(data, specifiedType: const FullType(Capabilities0))! as Capabilities0; + capabilities0 = serializers.deserialize(data, specifiedType: const FullType(Capabilities0))! as Capabilities0; } catch (_) {} return (builtListJsonObject: builtListJsonObject, capabilities0: capabilities0); } diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.dart b/packages/nextcloud/lib/src/api/spreed.openapi.dart index 631939a24d5..fb47180d85d 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.dart @@ -23194,11 +23194,11 @@ class _$BuiltListChatMessageSerializer implements PrimitiveSerializer<$BuiltList dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.chatMessage; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ChatMessage))!; + return serializers.serialize(value, specifiedType: const FullType(ChatMessage))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -23212,14 +23212,14 @@ class _$BuiltListChatMessageSerializer implements PrimitiveSerializer<$BuiltList }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} ChatMessage? chatMessage; try { - chatMessage = _jsonSerializers.deserialize(data, specifiedType: const FullType(ChatMessage))! as ChatMessage; + chatMessage = serializers.deserialize(data, specifiedType: const FullType(ChatMessage))! as ChatMessage; } catch (_) {} return (builtListJsonObject: builtListJsonObject, chatMessage: chatMessage); } @@ -23261,11 +23261,11 @@ class _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializ dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.roomAddParticipantToRoomResponseApplicationJsonOcsData0; if (value != null) { - return _jsonSerializers.serialize( + return serializers.serialize( value, specifiedType: const FullType(RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0), )!; @@ -23282,14 +23282,14 @@ class _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializ }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0? roomAddParticipantToRoomResponseApplicationJsonOcsData0; try { - roomAddParticipantToRoomResponseApplicationJsonOcsData0 = _jsonSerializers.deserialize( + roomAddParticipantToRoomResponseApplicationJsonOcsData0 = serializers.deserialize( data, specifiedType: const FullType(RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0), )! as RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0; @@ -23330,11 +23330,11 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { dynamic value; value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -23348,11 +23348,11 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { }) { int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return ($int: $int, string: string); } @@ -23387,11 +23387,11 @@ class _$BuiltListStringSerializer implements PrimitiveSerializer<$BuiltListStrin dynamic value; value = object.builtListSignalingSession; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(SignalingSession)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(SignalingSession)]))!; } value = object.string; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(String))!; + return serializers.serialize(value, specifiedType: const FullType(String))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -23405,14 +23405,14 @@ class _$BuiltListStringSerializer implements PrimitiveSerializer<$BuiltListStrin }) { BuiltList? builtListSignalingSession; try { - builtListSignalingSession = _jsonSerializers.deserialize( + builtListSignalingSession = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(SignalingSession)]), )! as BuiltList; } catch (_) {} String? string; try { - string = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; + string = serializers.deserialize(data, specifiedType: const FullType(String))! as String; } catch (_) {} return (builtListSignalingSession: builtListSignalingSession, string: string); } @@ -23451,11 +23451,11 @@ class _$BuiltListPublicCapabilities0Serializer implements PrimitiveSerializer<$B dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.publicCapabilities0; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(PublicCapabilities0))!; + return serializers.serialize(value, specifiedType: const FullType(PublicCapabilities0))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -23469,15 +23469,15 @@ class _$BuiltListPublicCapabilities0Serializer implements PrimitiveSerializer<$B }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} PublicCapabilities0? publicCapabilities0; try { - publicCapabilities0 = _jsonSerializers.deserialize(data, specifiedType: const FullType(PublicCapabilities0))! - as PublicCapabilities0; + publicCapabilities0 = + serializers.deserialize(data, specifiedType: const FullType(PublicCapabilities0))! as PublicCapabilities0; } catch (_) {} return (builtListJsonObject: builtListJsonObject, publicCapabilities0: publicCapabilities0); } diff --git a/packages/nextcloud/lib/src/api/user_status.openapi.dart b/packages/nextcloud/lib/src/api/user_status.openapi.dart index e94d1c95d4f..1321e1d8f5f 100644 --- a/packages/nextcloud/lib/src/api/user_status.openapi.dart +++ b/packages/nextcloud/lib/src/api/user_status.openapi.dart @@ -1912,11 +1912,11 @@ class _$ClearAtTimeTypeIntSerializer implements PrimitiveSerializer<$ClearAtTime dynamic value; value = object.clearAtTimeType; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(ClearAtTimeType))!; + return serializers.serialize(value, specifiedType: const FullType(ClearAtTimeType))!; } value = object.$int; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(int))!; + return serializers.serialize(value, specifiedType: const FullType(int))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -1931,11 +1931,11 @@ class _$ClearAtTimeTypeIntSerializer implements PrimitiveSerializer<$ClearAtTime ClearAtTimeType? clearAtTimeType; try { clearAtTimeType = - _jsonSerializers.deserialize(data, specifiedType: const FullType(ClearAtTimeType))! as ClearAtTimeType; + serializers.deserialize(data, specifiedType: const FullType(ClearAtTimeType))! as ClearAtTimeType; } catch (_) {} int? $int; try { - $int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int; + $int = serializers.deserialize(data, specifiedType: const FullType(int))! as int; } catch (_) {} return (clearAtTimeType: clearAtTimeType, $int: $int); } @@ -1970,11 +1970,11 @@ class _$BuiltListPrivateSerializer implements PrimitiveSerializer<$BuiltListPriv dynamic value; value = object.builtListJsonObject; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; + return serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]))!; } value = object.private; if (value != null) { - return _jsonSerializers.serialize(value, specifiedType: const FullType(Private))!; + return serializers.serialize(value, specifiedType: const FullType(Private))!; } // Should not be possible after validation. throw StateError('Tried to serialize without any value.'); @@ -1988,14 +1988,14 @@ class _$BuiltListPrivateSerializer implements PrimitiveSerializer<$BuiltListPriv }) { BuiltList? builtListJsonObject; try { - builtListJsonObject = _jsonSerializers.deserialize( + builtListJsonObject = serializers.deserialize( data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)]), )! as BuiltList; } catch (_) {} Private? private; try { - private = _jsonSerializers.deserialize(data, specifiedType: const FullType(Private))! as Private; + private = serializers.deserialize(data, specifiedType: const FullType(Private))! as Private; } catch (_) {} return (builtListJsonObject: builtListJsonObject, private: private); }