From 1a616a2d213cedfe375502e576d5c5ced18f6da1 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 23 Dec 2023 16:05:46 +0100 Subject: [PATCH] fix(dynamite): to long names for someOf typedefs refactor(dynamite): make someOf extensions and serializers private Signed-off-by: Nikolas Rimikis --- cspell.json | 1 + .../lib/src/builder/generate_ofs.dart | 39 +++- .../lib/src/models/type_result/some_of.dart | 4 +- .../src/models/type_result/type_result.dart | 3 + packages/dynamite/dynamite/pubspec.yaml | 1 + .../dynamite_end_to_end_test/build.yaml | 1 + .../lib/all_of.openapi.dart | 2 +- .../lib/any_of.openapi.dart | 98 +++++---- .../lib/enum.openapi.dart | 2 +- .../lib/headers.openapi.dart | 2 +- .../lib/interfaces.openapi.dart | 2 +- .../lib/nested_ofs.openapi.dart | 166 +++++++++------ .../lib/one_of.openapi.dart | 98 +++++---- .../lib/parameters.openapi.dart | 49 +++-- .../lib/pattern_check.openapi.dart | 2 +- .../lib/request_body.openapi.dart | 2 +- .../lib/responses.openapi.dart | 2 +- .../lib/some_of.openapi.dart | 45 ++-- .../lib/type_defs.openapi.dart | 34 ++-- .../lib/types.openapi.dart | 2 +- .../test/any_of_test.dart | 14 +- .../test/nested_ofs_test.dart | 30 +-- .../test/one_of_test.dart | 14 +- .../nextcloud/lib/src/api/core.openapi.dart | 192 +++++++++++------- .../lib/src/api/files_sharing.openapi.dart | 38 +++- .../lib/src/api/provisioning_api.openapi.dart | 177 ++++++++++------ .../lib/src/api/sharebymail.openapi.dart | 32 ++- .../nextcloud/lib/src/api/spreed.openapi.dart | 170 ++++++++++------ .../lib/src/api/user_status.openapi.dart | 66 ++++-- 29 files changed, 836 insertions(+), 452 deletions(-) diff --git a/cspell.json b/cspell.json index c5a70a99a74..47fbe6744d0 100644 --- a/cspell.json +++ b/cspell.json @@ -11,6 +11,7 @@ "**.mocks.dart", "**/assets", "**/l10n/!(en.arb)", + "**.openapi.dart", "external", "packages/dynamite/dynamite_petstore_example/lib", "packages/file_icons/lib/src/data.dart", diff --git a/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart b/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart index d33e1ede316..8c3b2b1d439 100644 --- a/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart +++ b/packages/dynamite/dynamite/lib/src/builder/generate_ofs.dart @@ -3,6 +3,7 @@ import 'package:dynamite/src/builder/state.dart'; import 'package:dynamite/src/helpers/dart_helpers.dart'; import 'package:dynamite/src/models/openapi.dart' as openapi; import 'package:dynamite/src/models/type_result.dart'; +import 'package:source_helper/source_helper.dart'; Iterable buildOfsExtensions( final openapi.OpenAPI spec, @@ -20,6 +21,29 @@ Iterable buildOfsExtensions( ..name = result.className ..definition = refer(result.dartType.name); }); + + yield Extension( + (final b) => b + ..name = '\$${result.className}Extension' + ..on = refer(result.className) + ..methods.add( + Method( + (final b) => b + ..static = true + ..returns = refer(result.className) + ..name = 'fromJson' + ..requiredParameters.add( + Parameter( + (final b) => b + ..name = 'json' + ..type = refer('Object?'), + ), + ) + ..lambda = true + ..body = Code('${result.typeName}Extension._fromJson(json)'), + ), + ), + ); } for (final result in state.uniqueSomeOfTypes) { @@ -29,7 +53,7 @@ Iterable buildOfsExtensions( yield TypeDef((final b) { b - ..name = result.typeName + ..name = '_${result.typeName}' ..definition = refer(result.dartType.name); }); @@ -40,9 +64,9 @@ Iterable buildOfsExtensions( Iterable generateSomeOf( final TypeResultSomeOf result, ) sync* { - final identifier = result.typeName; + final identifier = '_${result.typeName}'; final results = result.optimizedSubTypes; - final serializerName = '_${identifier}Serializer'; + final serializerName = '${identifier}Serializer'; final fields = {}; for (final result in results) { @@ -78,6 +102,7 @@ Iterable generateSomeOf( final serializerMethod = Method( (final b) => b + ..docs.add('// ignore: library_private_types_in_public_api') ..static = true ..returns = refer('Serializer<$identifier>') ..type = MethodType.getter @@ -90,7 +115,7 @@ Iterable generateSomeOf( (final b) => b ..static = true ..returns = refer(identifier) - ..name = 'fromJson' + ..name = '_fromJson' ..requiredParameters.add( Parameter( (final b) => b @@ -112,8 +137,12 @@ Iterable generateSomeOf( yield Extension( (final b) => b - ..name = '${identifier}Extension' + ..name = '${identifier}Extension'.nonPrivate ..on = refer(identifier) + ..docs.addAll([ + '/// @nodoc', + '// ignore: library_private_types_in_public_api', + ]) ..methods.addAll([ values, oneOfValidator, diff --git a/packages/dynamite/dynamite/lib/src/models/type_result/some_of.dart b/packages/dynamite/dynamite/lib/src/models/type_result/some_of.dart index 52324077695..c6a3f162879 100644 --- a/packages/dynamite/dynamite/lib/src/models/type_result/some_of.dart +++ b/packages/dynamite/dynamite/lib/src/models/type_result/some_of.dart @@ -50,7 +50,7 @@ abstract class TypeResultSomeOf extends TypeResult { ); } - late final String typeName = _typeName; + late final String typeName = '\$${md5.convert(utf8.encode(_typeName))}'; String get _typeName { final buffer = StringBuffer(); @@ -58,7 +58,7 @@ abstract class TypeResultSomeOf extends TypeResult { buffer.write(type.className.capitalize()); } - return '\$${toDartName(buffer.toString(), uppercaseFirstCharacter: true)}'; + return buffer.toString(); } BuiltList get _optimizedSubTypes { diff --git a/packages/dynamite/dynamite/lib/src/models/type_result/type_result.dart b/packages/dynamite/dynamite/lib/src/models/type_result/type_result.dart index a7112fa07fa..8c202ce84cd 100644 --- a/packages/dynamite/dynamite/lib/src/models/type_result/type_result.dart +++ b/packages/dynamite/dynamite/lib/src/models/type_result/type_result.dart @@ -1,4 +1,7 @@ +import 'dart:convert'; + import 'package:built_collection/built_collection.dart'; +import 'package:crypto/crypto.dart'; import 'package:dynamite/src/helpers/dart_helpers.dart'; import 'package:meta/meta.dart'; diff --git a/packages/dynamite/dynamite/pubspec.yaml b/packages/dynamite/dynamite/pubspec.yaml index 5ef04c13e00..6d2b90f541a 100644 --- a/packages/dynamite/dynamite/pubspec.yaml +++ b/packages/dynamite/dynamite/pubspec.yaml @@ -11,6 +11,7 @@ dependencies: checked_yaml: ^2.0.0 code_builder: ^4.5.0 collection: ^1.0.0 + crypto: ^3.0.0 dart_style: ^2.0.0 intersperse: ^2.0.0 meta: ^1.0.0 diff --git a/packages/dynamite/dynamite_end_to_end_test/build.yaml b/packages/dynamite/dynamite_end_to_end_test/build.yaml index 261543553a4..7b44fb568f7 100644 --- a/packages/dynamite/dynamite_end_to_end_test/build.yaml +++ b/packages/dynamite/dynamite_end_to_end_test/build.yaml @@ -8,6 +8,7 @@ targets: pageWidth: 120 analyzer_ignores: - camel_case_types + - camel_case_extensions - discarded_futures - public_member_api_docs - unreachable_switch_case diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.dart index e0f3e61ba4c..f5d33006372 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element 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 cb823ebde7e..5317d0f30d2 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 @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -92,32 +92,52 @@ abstract class OneObjectAnyOf0 implements $OneObjectAnyOf0Interface, Built $0c9017d9a03ba2eb2f15acadeab85bbeExtension._fromJson(json); +} + typedef MixedAnyOf = ({MixedAnyOf1? mixedAnyOf1, String? string}); + +extension $MixedAnyOfExtension on MixedAnyOf { + static MixedAnyOf fromJson(Object? json) => $fba45e085ee99d64c5141852d4323e3dExtension._fromJson(json); +} + typedef AnyOfIntDoubleOther = ({num? $num, String? string}); -typedef $ObjectAnyOf0ObjectAnyOf1 = ({ObjectAnyOf0? objectAnyOf0, ObjectAnyOf1? objectAnyOf1}); -extension $ObjectAnyOf0ObjectAnyOf1Extension on $ObjectAnyOf0ObjectAnyOf1 { +extension $AnyOfIntDoubleOtherExtension on AnyOfIntDoubleOther { + static AnyOfIntDoubleOther fromJson(Object? json) => $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + +typedef _$0c9017d9a03ba2eb2f15acadeab85bbe = ({ObjectAnyOf0? objectAnyOf0, ObjectAnyOf1? objectAnyOf1}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $0c9017d9a03ba2eb2f15acadeab85bbeExtension on _$0c9017d9a03ba2eb2f15acadeab85bbe { List get _values => [objectAnyOf0, objectAnyOf1]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$ObjectAnyOf0ObjectAnyOf1> get serializer => const _$ObjectAnyOf0ObjectAnyOf1Serializer(); - static $ObjectAnyOf0ObjectAnyOf1 fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$0c9017d9a03ba2eb2f15acadeab85bbe> get serializer => + const _$0c9017d9a03ba2eb2f15acadeab85bbeSerializer(); + static _$0c9017d9a03ba2eb2f15acadeab85bbe _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$ObjectAnyOf0ObjectAnyOf1Serializer implements PrimitiveSerializer<$ObjectAnyOf0ObjectAnyOf1> { - const _$ObjectAnyOf0ObjectAnyOf1Serializer(); +class _$0c9017d9a03ba2eb2f15acadeab85bbeSerializer implements PrimitiveSerializer<_$0c9017d9a03ba2eb2f15acadeab85bbe> { + const _$0c9017d9a03ba2eb2f15acadeab85bbeSerializer(); @override - Iterable get types => const [$ObjectAnyOf0ObjectAnyOf1]; + Iterable get types => const [_$0c9017d9a03ba2eb2f15acadeab85bbe]; @override - String get wireName => r'$ObjectAnyOf0ObjectAnyOf1'; + String get wireName => r'_$0c9017d9a03ba2eb2f15acadeab85bbe'; @override Object serialize( Serializers serializers, - $ObjectAnyOf0ObjectAnyOf1 object, { + _$0c9017d9a03ba2eb2f15acadeab85bbe object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -134,7 +154,7 @@ class _$ObjectAnyOf0ObjectAnyOf1Serializer implements PrimitiveSerializer<$Objec } @override - $ObjectAnyOf0ObjectAnyOf1 deserialize( + _$0c9017d9a03ba2eb2f15acadeab85bbe deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -151,30 +171,35 @@ class _$ObjectAnyOf0ObjectAnyOf1Serializer implements PrimitiveSerializer<$Objec } } -typedef $MixedAnyOf1String = ({MixedAnyOf1? mixedAnyOf1, String? string}); +typedef _$fba45e085ee99d64c5141852d4323e3d = ({MixedAnyOf1? mixedAnyOf1, String? string}); -extension $MixedAnyOf1StringExtension on $MixedAnyOf1String { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $fba45e085ee99d64c5141852d4323e3dExtension on _$fba45e085ee99d64c5141852d4323e3d { List get _values => [mixedAnyOf1, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$MixedAnyOf1String> get serializer => const _$MixedAnyOf1StringSerializer(); - static $MixedAnyOf1String fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$fba45e085ee99d64c5141852d4323e3d> get serializer => + const _$fba45e085ee99d64c5141852d4323e3dSerializer(); + static _$fba45e085ee99d64c5141852d4323e3d _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$MixedAnyOf1StringSerializer implements PrimitiveSerializer<$MixedAnyOf1String> { - const _$MixedAnyOf1StringSerializer(); +class _$fba45e085ee99d64c5141852d4323e3dSerializer implements PrimitiveSerializer<_$fba45e085ee99d64c5141852d4323e3d> { + const _$fba45e085ee99d64c5141852d4323e3dSerializer(); @override - Iterable get types => const [$MixedAnyOf1String]; + Iterable get types => const [_$fba45e085ee99d64c5141852d4323e3d]; @override - String get wireName => r'$MixedAnyOf1String'; + String get wireName => r'_$fba45e085ee99d64c5141852d4323e3d'; @override Object serialize( Serializers serializers, - $MixedAnyOf1String object, { + _$fba45e085ee99d64c5141852d4323e3d object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -191,7 +216,7 @@ class _$MixedAnyOf1StringSerializer implements PrimitiveSerializer<$MixedAnyOf1S } @override - $MixedAnyOf1String deserialize( + _$fba45e085ee99d64c5141852d4323e3d deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -208,30 +233,35 @@ class _$MixedAnyOf1StringSerializer implements PrimitiveSerializer<$MixedAnyOf1S } } -typedef $NumString = ({num? $num, String? string}); +typedef _$b6d67dc2a96424d2f407f8e51557f3de = ({num? $num, String? string}); -extension $NumStringExtension on $NumString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b6d67dc2a96424d2f407f8e51557f3deExtension on _$b6d67dc2a96424d2f407f8e51557f3de { List get _values => [$num, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$NumString> get serializer => const _$NumStringSerializer(); - static $NumString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b6d67dc2a96424d2f407f8e51557f3de> get serializer => + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); + static _$b6d67dc2a96424d2f407f8e51557f3de _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { - const _$NumStringSerializer(); +class _$b6d67dc2a96424d2f407f8e51557f3deSerializer implements PrimitiveSerializer<_$b6d67dc2a96424d2f407f8e51557f3de> { + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); @override - Iterable get types => const [$NumString]; + Iterable get types => const [_$b6d67dc2a96424d2f407f8e51557f3de]; @override - String get wireName => r'$NumString'; + String get wireName => r'_$b6d67dc2a96424d2f407f8e51557f3de'; @override Object serialize( Serializers serializers, - $NumString object, { + _$b6d67dc2a96424d2f407f8e51557f3de object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -248,7 +278,7 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { } @override - $NumString deserialize( + _$b6d67dc2a96424d2f407f8e51557f3de deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -272,13 +302,13 @@ final Serializers serializers = (Serializers().toBuilder() ..add(ObjectAnyOf0.serializer) ..addBuilderFactory(const FullType(ObjectAnyOf1), ObjectAnyOf1Builder.new) ..add(ObjectAnyOf1.serializer) - ..add($ObjectAnyOf0ObjectAnyOf1Extension.serializer) + ..add($0c9017d9a03ba2eb2f15acadeab85bbeExtension.serializer) ..addBuilderFactory(const FullType(MixedAnyOf1), MixedAnyOf1Builder.new) ..add(MixedAnyOf1.serializer) - ..add($MixedAnyOf1StringExtension.serializer) + ..add($fba45e085ee99d64c5141852d4323e3dExtension.serializer) ..addBuilderFactory(const FullType(OneObjectAnyOf0), OneObjectAnyOf0Builder.new) ..add(OneObjectAnyOf0.serializer) - ..add($NumStringExtension.serializer)) + ..add($b6d67dc2a96424d2f407f8e51557f3deExtension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/enum.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/enum.openapi.dart index a16b1313c75..7b722d5d1ce 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/enum.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/enum.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.dart index 9a4c64ebc3a..7f9842c7990 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/interfaces.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/interfaces.openapi.dart index f6e9c5e06bb..fea6bf9e142 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/interfaces.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/interfaces.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element 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 24d8fda0cb6..6dcd053c64b 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 @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -139,7 +139,17 @@ abstract class BaseNestedAnyOf3 } typedef BaseOneOf = ({BaseOneOf1? baseOneOf1, double? $double}); + +extension $BaseOneOfExtension on BaseOneOf { + static BaseOneOf fromJson(Object? json) => $fc0451dbdd462718bd075afd2e3ce0ecExtension._fromJson(json); +} + typedef BaseAnyOf = ({BaseAnyOf1? baseAnyOf1, int? $int}); + +extension $BaseAnyOfExtension on BaseAnyOf { + static BaseAnyOf fromJson(Object? json) => $ce3c7b262d1c503446a436c461be5be9Extension._fromJson(json); +} + typedef BaseNestedOneOf = ({ BaseAllOf? baseAllOf, BaseAnyOf? baseAnyOf, @@ -147,6 +157,11 @@ typedef BaseNestedOneOf = ({ BaseOneOf1? baseOneOf1, double? $double }); + +extension $BaseNestedOneOfExtension on BaseNestedOneOf { + static BaseNestedOneOf fromJson(Object? json) => $8da5087c0b3f2cce06998d453af8ad19Extension._fromJson(json); +} + typedef BaseNestedAnyOf = ({ BaseAllOf? baseAllOf, BaseAnyOf1? baseAnyOf1, @@ -154,31 +169,46 @@ typedef BaseNestedAnyOf = ({ BaseOneOf? baseOneOf, int? $int }); + +extension $BaseNestedAnyOfExtension on BaseNestedAnyOf { + static BaseNestedAnyOf fromJson(Object? json) => $523892e2348458a2bdb28f9f942dca37Extension._fromJson(json); +} + typedef NestedOptimizedOneOf = ({BaseOneOf1? baseOneOf1, num? $num}); -typedef $BaseOneOf1Double = ({BaseOneOf1? baseOneOf1, double? $double}); -extension $BaseOneOf1DoubleExtension on $BaseOneOf1Double { +extension $NestedOptimizedOneOfExtension on NestedOptimizedOneOf { + static NestedOptimizedOneOf fromJson(Object? json) => $abe6d27882a5771a98ede04cd64de567Extension._fromJson(json); +} + +typedef _$fc0451dbdd462718bd075afd2e3ce0ec = ({BaseOneOf1? baseOneOf1, double? $double}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $fc0451dbdd462718bd075afd2e3ce0ecExtension on _$fc0451dbdd462718bd075afd2e3ce0ec { List get _values => [baseOneOf1, $double]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseOneOf1Double> get serializer => const _$BaseOneOf1DoubleSerializer(); - static $BaseOneOf1Double fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$fc0451dbdd462718bd075afd2e3ce0ec> get serializer => + const _$fc0451dbdd462718bd075afd2e3ce0ecSerializer(); + static _$fc0451dbdd462718bd075afd2e3ce0ec _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseOneOf1DoubleSerializer implements PrimitiveSerializer<$BaseOneOf1Double> { - const _$BaseOneOf1DoubleSerializer(); +class _$fc0451dbdd462718bd075afd2e3ce0ecSerializer implements PrimitiveSerializer<_$fc0451dbdd462718bd075afd2e3ce0ec> { + const _$fc0451dbdd462718bd075afd2e3ce0ecSerializer(); @override - Iterable get types => const [$BaseOneOf1Double]; + Iterable get types => const [_$fc0451dbdd462718bd075afd2e3ce0ec]; @override - String get wireName => r'$BaseOneOf1Double'; + String get wireName => r'_$fc0451dbdd462718bd075afd2e3ce0ec'; @override Object serialize( Serializers serializers, - $BaseOneOf1Double object, { + _$fc0451dbdd462718bd075afd2e3ce0ec object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -195,7 +225,7 @@ class _$BaseOneOf1DoubleSerializer implements PrimitiveSerializer<$BaseOneOf1Dou } @override - $BaseOneOf1Double deserialize( + _$fc0451dbdd462718bd075afd2e3ce0ec deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -212,30 +242,35 @@ class _$BaseOneOf1DoubleSerializer implements PrimitiveSerializer<$BaseOneOf1Dou } } -typedef $BaseAnyOf1Int = ({BaseAnyOf1? baseAnyOf1, int? $int}); +typedef _$ce3c7b262d1c503446a436c461be5be9 = ({BaseAnyOf1? baseAnyOf1, int? $int}); -extension $BaseAnyOf1IntExtension on $BaseAnyOf1Int { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $ce3c7b262d1c503446a436c461be5be9Extension on _$ce3c7b262d1c503446a436c461be5be9 { List get _values => [baseAnyOf1, $int]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseAnyOf1Int> get serializer => const _$BaseAnyOf1IntSerializer(); - static $BaseAnyOf1Int fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$ce3c7b262d1c503446a436c461be5be9> get serializer => + const _$ce3c7b262d1c503446a436c461be5be9Serializer(); + static _$ce3c7b262d1c503446a436c461be5be9 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseAnyOf1IntSerializer implements PrimitiveSerializer<$BaseAnyOf1Int> { - const _$BaseAnyOf1IntSerializer(); +class _$ce3c7b262d1c503446a436c461be5be9Serializer implements PrimitiveSerializer<_$ce3c7b262d1c503446a436c461be5be9> { + const _$ce3c7b262d1c503446a436c461be5be9Serializer(); @override - Iterable get types => const [$BaseAnyOf1Int]; + Iterable get types => const [_$ce3c7b262d1c503446a436c461be5be9]; @override - String get wireName => r'$BaseAnyOf1Int'; + String get wireName => r'_$ce3c7b262d1c503446a436c461be5be9'; @override Object serialize( Serializers serializers, - $BaseAnyOf1Int object, { + _$ce3c7b262d1c503446a436c461be5be9 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -252,7 +287,7 @@ class _$BaseAnyOf1IntSerializer implements PrimitiveSerializer<$BaseAnyOf1Int> { } @override - $BaseAnyOf1Int deserialize( + _$ce3c7b262d1c503446a436c461be5be9 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -269,7 +304,7 @@ class _$BaseAnyOf1IntSerializer implements PrimitiveSerializer<$BaseAnyOf1Int> { } } -typedef $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double = ({ +typedef _$8da5087c0b3f2cce06998d453af8ad19 = ({ BaseAllOf? baseAllOf, BaseAnyOf? baseAnyOf, BaseNestedOneOf3? baseNestedOneOf3, @@ -277,32 +312,33 @@ typedef $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double = ({ double? $double }); -extension $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension - on $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $8da5087c0b3f2cce06998d453af8ad19Extension on _$8da5087c0b3f2cce06998d453af8ad19 { List get _values => [baseAllOf, baseAnyOf, baseNestedOneOf3, baseOneOf1, $double]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double> get serializer => - const _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleSerializer(); - static $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$8da5087c0b3f2cce06998d453af8ad19> get serializer => + const _$8da5087c0b3f2cce06998d453af8ad19Serializer(); + static _$8da5087c0b3f2cce06998d453af8ad19 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleSerializer - implements PrimitiveSerializer<$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double> { - const _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleSerializer(); +class _$8da5087c0b3f2cce06998d453af8ad19Serializer implements PrimitiveSerializer<_$8da5087c0b3f2cce06998d453af8ad19> { + const _$8da5087c0b3f2cce06998d453af8ad19Serializer(); @override - Iterable get types => const [$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double]; + Iterable get types => const [_$8da5087c0b3f2cce06998d453af8ad19]; @override - String get wireName => r'$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double'; + String get wireName => r'_$8da5087c0b3f2cce06998d453af8ad19'; @override Object serialize( Serializers serializers, - $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double object, { + _$8da5087c0b3f2cce06998d453af8ad19 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -331,7 +367,7 @@ class _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleSerializer } @override - $BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1Double deserialize( + _$8da5087c0b3f2cce06998d453af8ad19 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -368,7 +404,7 @@ class _$BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleSerializer } } -typedef $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt = ({ +typedef _$523892e2348458a2bdb28f9f942dca37 = ({ BaseAllOf? baseAllOf, BaseAnyOf1? baseAnyOf1, BaseNestedAnyOf3? baseNestedAnyOf3, @@ -376,32 +412,33 @@ typedef $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt = ({ int? $int }); -extension $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension - on $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $523892e2348458a2bdb28f9f942dca37Extension on _$523892e2348458a2bdb28f9f942dca37 { List get _values => [baseAllOf, baseAnyOf1, baseNestedAnyOf3, baseOneOf, $int]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt> get serializer => - const _$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntSerializer(); - static $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$523892e2348458a2bdb28f9f942dca37> get serializer => + const _$523892e2348458a2bdb28f9f942dca37Serializer(); + static _$523892e2348458a2bdb28f9f942dca37 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntSerializer - implements PrimitiveSerializer<$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt> { - const _$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntSerializer(); +class _$523892e2348458a2bdb28f9f942dca37Serializer implements PrimitiveSerializer<_$523892e2348458a2bdb28f9f942dca37> { + const _$523892e2348458a2bdb28f9f942dca37Serializer(); @override - Iterable get types => const [$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt]; + Iterable get types => const [_$523892e2348458a2bdb28f9f942dca37]; @override - String get wireName => r'$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt'; + String get wireName => r'_$523892e2348458a2bdb28f9f942dca37'; @override Object serialize( Serializers serializers, - $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt object, { + _$523892e2348458a2bdb28f9f942dca37 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -430,7 +467,7 @@ class _$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntSerializer } @override - $BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfInt deserialize( + _$523892e2348458a2bdb28f9f942dca37 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -467,30 +504,35 @@ class _$BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntSerializer } } -typedef $BaseOneOf1Num = ({BaseOneOf1? baseOneOf1, num? $num}); +typedef _$abe6d27882a5771a98ede04cd64de567 = ({BaseOneOf1? baseOneOf1, num? $num}); -extension $BaseOneOf1NumExtension on $BaseOneOf1Num { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $abe6d27882a5771a98ede04cd64de567Extension on _$abe6d27882a5771a98ede04cd64de567 { List get _values => [baseOneOf1, $num]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseOneOf1Num> get serializer => const _$BaseOneOf1NumSerializer(); - static $BaseOneOf1Num fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$abe6d27882a5771a98ede04cd64de567> get serializer => + const _$abe6d27882a5771a98ede04cd64de567Serializer(); + static _$abe6d27882a5771a98ede04cd64de567 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseOneOf1NumSerializer implements PrimitiveSerializer<$BaseOneOf1Num> { - const _$BaseOneOf1NumSerializer(); +class _$abe6d27882a5771a98ede04cd64de567Serializer implements PrimitiveSerializer<_$abe6d27882a5771a98ede04cd64de567> { + const _$abe6d27882a5771a98ede04cd64de567Serializer(); @override - Iterable get types => const [$BaseOneOf1Num]; + Iterable get types => const [_$abe6d27882a5771a98ede04cd64de567]; @override - String get wireName => r'$BaseOneOf1Num'; + String get wireName => r'_$abe6d27882a5771a98ede04cd64de567'; @override Object serialize( Serializers serializers, - $BaseOneOf1Num object, { + _$abe6d27882a5771a98ede04cd64de567 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -507,7 +549,7 @@ class _$BaseOneOf1NumSerializer implements PrimitiveSerializer<$BaseOneOf1Num> { } @override - $BaseOneOf1Num deserialize( + _$abe6d27882a5771a98ede04cd64de567 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -531,19 +573,19 @@ final Serializers serializers = (Serializers().toBuilder() ..add(BaseAllOf.serializer) ..addBuilderFactory(const FullType(BaseOneOf1), BaseOneOf1Builder.new) ..add(BaseOneOf1.serializer) - ..add($BaseOneOf1DoubleExtension.serializer) + ..add($fc0451dbdd462718bd075afd2e3ce0ecExtension.serializer) ..addBuilderFactory(const FullType(BaseAnyOf1), BaseAnyOf1Builder.new) ..add(BaseAnyOf1.serializer) - ..add($BaseAnyOf1IntExtension.serializer) + ..add($ce3c7b262d1c503446a436c461be5be9Extension.serializer) ..addBuilderFactory(const FullType(BaseNestedAllOf), BaseNestedAllOfBuilder.new) ..add(BaseNestedAllOf.serializer) ..addBuilderFactory(const FullType(BaseNestedOneOf3), BaseNestedOneOf3Builder.new) ..add(BaseNestedOneOf3.serializer) - ..add($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.serializer) + ..add($8da5087c0b3f2cce06998d453af8ad19Extension.serializer) ..addBuilderFactory(const FullType(BaseNestedAnyOf3), BaseNestedAnyOf3Builder.new) ..add(BaseNestedAnyOf3.serializer) - ..add($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.serializer) - ..add($BaseOneOf1NumExtension.serializer)) + ..add($523892e2348458a2bdb28f9f942dca37Extension.serializer) + ..add($abe6d27882a5771a98ede04cd64de567Extension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() 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 4d21364835a..caacdf6a628 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 @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -92,32 +92,52 @@ abstract class OneObjectOneOf0 implements $OneObjectOneOf0Interface, Built $6c828020e1dac1d58ded0a29ef8b0c41Extension._fromJson(json); +} + typedef MixedOneOf = ({MixedOneOf1? mixedOneOf1, String? string}); + +extension $MixedOneOfExtension on MixedOneOf { + static MixedOneOf fromJson(Object? json) => $d1b40dfcebdca2dfa1f3e52ac98462a5Extension._fromJson(json); +} + typedef OneOfIntDoubleOther = ({num? $num, String? string}); -typedef $ObjectOneOf0ObjectOneOf1 = ({ObjectOneOf0? objectOneOf0, ObjectOneOf1? objectOneOf1}); -extension $ObjectOneOf0ObjectOneOf1Extension on $ObjectOneOf0ObjectOneOf1 { +extension $OneOfIntDoubleOtherExtension on OneOfIntDoubleOther { + static OneOfIntDoubleOther fromJson(Object? json) => $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + +typedef _$6c828020e1dac1d58ded0a29ef8b0c41 = ({ObjectOneOf0? objectOneOf0, ObjectOneOf1? objectOneOf1}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $6c828020e1dac1d58ded0a29ef8b0c41Extension on _$6c828020e1dac1d58ded0a29ef8b0c41 { List get _values => [objectOneOf0, objectOneOf1]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$ObjectOneOf0ObjectOneOf1> get serializer => const _$ObjectOneOf0ObjectOneOf1Serializer(); - static $ObjectOneOf0ObjectOneOf1 fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$6c828020e1dac1d58ded0a29ef8b0c41> get serializer => + const _$6c828020e1dac1d58ded0a29ef8b0c41Serializer(); + static _$6c828020e1dac1d58ded0a29ef8b0c41 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$ObjectOneOf0ObjectOneOf1Serializer implements PrimitiveSerializer<$ObjectOneOf0ObjectOneOf1> { - const _$ObjectOneOf0ObjectOneOf1Serializer(); +class _$6c828020e1dac1d58ded0a29ef8b0c41Serializer implements PrimitiveSerializer<_$6c828020e1dac1d58ded0a29ef8b0c41> { + const _$6c828020e1dac1d58ded0a29ef8b0c41Serializer(); @override - Iterable get types => const [$ObjectOneOf0ObjectOneOf1]; + Iterable get types => const [_$6c828020e1dac1d58ded0a29ef8b0c41]; @override - String get wireName => r'$ObjectOneOf0ObjectOneOf1'; + String get wireName => r'_$6c828020e1dac1d58ded0a29ef8b0c41'; @override Object serialize( Serializers serializers, - $ObjectOneOf0ObjectOneOf1 object, { + _$6c828020e1dac1d58ded0a29ef8b0c41 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -134,7 +154,7 @@ class _$ObjectOneOf0ObjectOneOf1Serializer implements PrimitiveSerializer<$Objec } @override - $ObjectOneOf0ObjectOneOf1 deserialize( + _$6c828020e1dac1d58ded0a29ef8b0c41 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -151,30 +171,35 @@ class _$ObjectOneOf0ObjectOneOf1Serializer implements PrimitiveSerializer<$Objec } } -typedef $MixedOneOf1String = ({MixedOneOf1? mixedOneOf1, String? string}); +typedef _$d1b40dfcebdca2dfa1f3e52ac98462a5 = ({MixedOneOf1? mixedOneOf1, String? string}); -extension $MixedOneOf1StringExtension on $MixedOneOf1String { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $d1b40dfcebdca2dfa1f3e52ac98462a5Extension on _$d1b40dfcebdca2dfa1f3e52ac98462a5 { List get _values => [mixedOneOf1, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$MixedOneOf1String> get serializer => const _$MixedOneOf1StringSerializer(); - static $MixedOneOf1String fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$d1b40dfcebdca2dfa1f3e52ac98462a5> get serializer => + const _$d1b40dfcebdca2dfa1f3e52ac98462a5Serializer(); + static _$d1b40dfcebdca2dfa1f3e52ac98462a5 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$MixedOneOf1StringSerializer implements PrimitiveSerializer<$MixedOneOf1String> { - const _$MixedOneOf1StringSerializer(); +class _$d1b40dfcebdca2dfa1f3e52ac98462a5Serializer implements PrimitiveSerializer<_$d1b40dfcebdca2dfa1f3e52ac98462a5> { + const _$d1b40dfcebdca2dfa1f3e52ac98462a5Serializer(); @override - Iterable get types => const [$MixedOneOf1String]; + Iterable get types => const [_$d1b40dfcebdca2dfa1f3e52ac98462a5]; @override - String get wireName => r'$MixedOneOf1String'; + String get wireName => r'_$d1b40dfcebdca2dfa1f3e52ac98462a5'; @override Object serialize( Serializers serializers, - $MixedOneOf1String object, { + _$d1b40dfcebdca2dfa1f3e52ac98462a5 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -191,7 +216,7 @@ class _$MixedOneOf1StringSerializer implements PrimitiveSerializer<$MixedOneOf1S } @override - $MixedOneOf1String deserialize( + _$d1b40dfcebdca2dfa1f3e52ac98462a5 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -208,30 +233,35 @@ class _$MixedOneOf1StringSerializer implements PrimitiveSerializer<$MixedOneOf1S } } -typedef $NumString = ({num? $num, String? string}); +typedef _$b6d67dc2a96424d2f407f8e51557f3de = ({num? $num, String? string}); -extension $NumStringExtension on $NumString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b6d67dc2a96424d2f407f8e51557f3deExtension on _$b6d67dc2a96424d2f407f8e51557f3de { List get _values => [$num, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$NumString> get serializer => const _$NumStringSerializer(); - static $NumString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b6d67dc2a96424d2f407f8e51557f3de> get serializer => + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); + static _$b6d67dc2a96424d2f407f8e51557f3de _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { - const _$NumStringSerializer(); +class _$b6d67dc2a96424d2f407f8e51557f3deSerializer implements PrimitiveSerializer<_$b6d67dc2a96424d2f407f8e51557f3de> { + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); @override - Iterable get types => const [$NumString]; + Iterable get types => const [_$b6d67dc2a96424d2f407f8e51557f3de]; @override - String get wireName => r'$NumString'; + String get wireName => r'_$b6d67dc2a96424d2f407f8e51557f3de'; @override Object serialize( Serializers serializers, - $NumString object, { + _$b6d67dc2a96424d2f407f8e51557f3de object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -248,7 +278,7 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { } @override - $NumString deserialize( + _$b6d67dc2a96424d2f407f8e51557f3de deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -272,13 +302,13 @@ final Serializers serializers = (Serializers().toBuilder() ..add(ObjectOneOf0.serializer) ..addBuilderFactory(const FullType(ObjectOneOf1), ObjectOneOf1Builder.new) ..add(ObjectOneOf1.serializer) - ..add($ObjectOneOf0ObjectOneOf1Extension.serializer) + ..add($6c828020e1dac1d58ded0a29ef8b0c41Extension.serializer) ..addBuilderFactory(const FullType(MixedOneOf1), MixedOneOf1Builder.new) ..add(MixedOneOf1.serializer) - ..add($MixedOneOf1StringExtension.serializer) + ..add($d1b40dfcebdca2dfa1f3e52ac98462a5Extension.serializer) ..addBuilderFactory(const FullType(OneObjectOneOf0), OneObjectOneOf0Builder.new) ..add(OneObjectOneOf0.serializer) - ..add($NumStringExtension.serializer)) + ..add($b6d67dc2a96424d2f407f8e51557f3deExtension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/parameters.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/parameters.openapi.dart index 561631a685b..f840543fca5 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/parameters.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/parameters.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -584,33 +584,58 @@ class _$GetHeadersEnumPatternSerializer implements PrimitiveSerializer $93403da1a64cb6a7b1597c7a05e9b2beExtension._fromJson(json); +} + typedef GetAnyOf = ({bool? $bool, String? string}); + +extension $GetAnyOfExtension on GetAnyOf { + static GetAnyOf fromJson(Object? json) => $93403da1a64cb6a7b1597c7a05e9b2beExtension._fromJson(json); +} + typedef GetHeadersOneOf = ({bool? $bool, String? string}); + +extension $GetHeadersOneOfExtension on GetHeadersOneOf { + static GetHeadersOneOf fromJson(Object? json) => $93403da1a64cb6a7b1597c7a05e9b2beExtension._fromJson(json); +} + typedef GetHeadersAnyOf = ({bool? $bool, String? string}); -typedef $BoolString = ({bool? $bool, String? string}); -extension $BoolStringExtension on $BoolString { +extension $GetHeadersAnyOfExtension on GetHeadersAnyOf { + static GetHeadersAnyOf fromJson(Object? json) => $93403da1a64cb6a7b1597c7a05e9b2beExtension._fromJson(json); +} + +typedef _$93403da1a64cb6a7b1597c7a05e9b2be = ({bool? $bool, String? string}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $93403da1a64cb6a7b1597c7a05e9b2beExtension on _$93403da1a64cb6a7b1597c7a05e9b2be { List get _values => [$bool, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BoolString> get serializer => const _$BoolStringSerializer(); - static $BoolString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$93403da1a64cb6a7b1597c7a05e9b2be> get serializer => + const _$93403da1a64cb6a7b1597c7a05e9b2beSerializer(); + static _$93403da1a64cb6a7b1597c7a05e9b2be _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BoolStringSerializer implements PrimitiveSerializer<$BoolString> { - const _$BoolStringSerializer(); +class _$93403da1a64cb6a7b1597c7a05e9b2beSerializer implements PrimitiveSerializer<_$93403da1a64cb6a7b1597c7a05e9b2be> { + const _$93403da1a64cb6a7b1597c7a05e9b2beSerializer(); @override - Iterable get types => const [$BoolString]; + Iterable get types => const [_$93403da1a64cb6a7b1597c7a05e9b2be]; @override - String get wireName => r'$BoolString'; + String get wireName => r'_$93403da1a64cb6a7b1597c7a05e9b2be'; @override Object serialize( Serializers serializers, - $BoolString object, { + _$93403da1a64cb6a7b1597c7a05e9b2be object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -627,7 +652,7 @@ class _$BoolStringSerializer implements PrimitiveSerializer<$BoolString> { } @override - $BoolString deserialize( + _$93403da1a64cb6a7b1597c7a05e9b2be deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -660,7 +685,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(ContentString.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), ListBuilder.new) ..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder.new) - ..add($BoolStringExtension.serializer) + ..add($93403da1a64cb6a7b1597c7a05e9b2beExtension.serializer) ..add(GetEnumPattern.serializer) ..add(GetHeadersEnumPattern.serializer)) .build(); diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/pattern_check.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/pattern_check.openapi.dart index 1be6536a8e7..d0996b4651b 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/pattern_check.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/pattern_check.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart index ff88378cd66..aade09e6820 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/responses.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/responses.openapi.dart index 45dfa331405..c622d844206 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/responses.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/responses.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element 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 9cff13fe760..e0b15a2e127 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 @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -44,32 +44,53 @@ abstract class OneValueSomeOfInObject } typedef OneOfIntDoubleOther = ({num? $num, String? string}); + +extension $OneOfIntDoubleOtherExtension on OneOfIntDoubleOther { + static OneOfIntDoubleOther fromJson(Object? json) => $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + typedef AnyOfIntDoubleOther = ({num? $num, String? string}); + +extension $AnyOfIntDoubleOtherExtension on AnyOfIntDoubleOther { + static AnyOfIntDoubleOther fromJson(Object? json) => $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + typedef OneValueSomeOfInObject_IntDoubleString = ({num? $num, String? string}); -typedef $NumString = ({num? $num, String? string}); -extension $NumStringExtension on $NumString { +extension $OneValueSomeOfInObject_IntDoubleStringExtension on OneValueSomeOfInObject_IntDoubleString { + static OneValueSomeOfInObject_IntDoubleString fromJson(Object? json) => + $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + +typedef _$b6d67dc2a96424d2f407f8e51557f3de = ({num? $num, String? string}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b6d67dc2a96424d2f407f8e51557f3deExtension on _$b6d67dc2a96424d2f407f8e51557f3de { List get _values => [$num, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$NumString> get serializer => const _$NumStringSerializer(); - static $NumString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b6d67dc2a96424d2f407f8e51557f3de> get serializer => + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); + static _$b6d67dc2a96424d2f407f8e51557f3de _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { - const _$NumStringSerializer(); +class _$b6d67dc2a96424d2f407f8e51557f3deSerializer implements PrimitiveSerializer<_$b6d67dc2a96424d2f407f8e51557f3de> { + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); @override - Iterable get types => const [$NumString]; + Iterable get types => const [_$b6d67dc2a96424d2f407f8e51557f3de]; @override - String get wireName => r'$NumString'; + String get wireName => r'_$b6d67dc2a96424d2f407f8e51557f3de'; @override Object serialize( Serializers serializers, - $NumString object, { + _$b6d67dc2a96424d2f407f8e51557f3de object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -86,7 +107,7 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { } @override - $NumString deserialize( + _$b6d67dc2a96424d2f407f8e51557f3de deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -106,7 +127,7 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { // coverage:ignore-start @visibleForTesting final Serializers serializers = (Serializers().toBuilder() - ..add($NumStringExtension.serializer) + ..add($b6d67dc2a96424d2f407f8e51557f3deExtension.serializer) ..addBuilderFactory(const FullType(OneValueSomeOfInObject), OneValueSomeOfInObjectBuilder.new) ..add(OneValueSomeOfInObject.serializer)) .build(); 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 2fdcd38f4f0..ec2e1ecb19f 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 @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element @@ -58,30 +58,40 @@ abstract class NestedRedirect implements $NestedRedirectInterface, Built $e1c7ecea8e5fdae7b94cd86c0dc4f1baExtension._fromJson(json); +} + +typedef _$e1c7ecea8e5fdae7b94cd86c0dc4f1ba = ({Base? base, int? $int, JsonObject? jsonObject}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $e1c7ecea8e5fdae7b94cd86c0dc4f1baExtension on _$e1c7ecea8e5fdae7b94cd86c0dc4f1ba { List get _values => [base, $int, jsonObject]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BaseIntJsonObject> get serializer => const _$BaseIntJsonObjectSerializer(); - static $BaseIntJsonObject fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$e1c7ecea8e5fdae7b94cd86c0dc4f1ba> get serializer => + const _$e1c7ecea8e5fdae7b94cd86c0dc4f1baSerializer(); + static _$e1c7ecea8e5fdae7b94cd86c0dc4f1ba _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BaseIntJsonObjectSerializer implements PrimitiveSerializer<$BaseIntJsonObject> { - const _$BaseIntJsonObjectSerializer(); +class _$e1c7ecea8e5fdae7b94cd86c0dc4f1baSerializer implements PrimitiveSerializer<_$e1c7ecea8e5fdae7b94cd86c0dc4f1ba> { + const _$e1c7ecea8e5fdae7b94cd86c0dc4f1baSerializer(); @override - Iterable get types => const [$BaseIntJsonObject]; + Iterable get types => const [_$e1c7ecea8e5fdae7b94cd86c0dc4f1ba]; @override - String get wireName => r'$BaseIntJsonObject'; + String get wireName => r'_$e1c7ecea8e5fdae7b94cd86c0dc4f1ba'; @override Object serialize( Serializers serializers, - $BaseIntJsonObject object, { + _$e1c7ecea8e5fdae7b94cd86c0dc4f1ba object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -102,7 +112,7 @@ class _$BaseIntJsonObjectSerializer implements PrimitiveSerializer<$BaseIntJsonO } @override - $BaseIntJsonObject deserialize( + _$e1c7ecea8e5fdae7b94cd86c0dc4f1ba deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -130,7 +140,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(Base.serializer) ..addBuilderFactory(const FullType(NestedRedirect), NestedRedirectBuilder.new) ..add(NestedRedirect.serializer) - ..add($BaseIntJsonObjectExtension.serializer)) + ..add($e1c7ecea8e5fdae7b94cd86c0dc4f1baExtension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/types.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/types.openapi.dart index c78a4d0dc4c..148fc1abf94 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/types.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/types.openapi.dart @@ -1,4 +1,4 @@ -// ignore_for_file: camel_case_types, discarded_futures +// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: public_member_api_docs, unreachable_switch_case // ignore_for_file: unused_element diff --git a/packages/dynamite/dynamite_end_to_end_test/test/any_of_test.dart b/packages/dynamite/dynamite_end_to_end_test/test/any_of_test.dart index 7ca57ca302f..7b3a645df78 100644 --- a/packages/dynamite/dynamite_end_to_end_test/test/any_of_test.dart +++ b/packages/dynamite/dynamite_end_to_end_test/test/any_of_test.dart @@ -11,7 +11,7 @@ void main() { Object? json = {'attribute1-anyOf': 'attribute1AnyOf'}; expect(object.toJson(), equals(json)); - expect($ObjectAnyOf0ObjectAnyOf1Extension.fromJson(json), equals(object)); + expect($ObjectAnyOfExtension.fromJson(json), equals(object)); object = ( objectAnyOf0: null, @@ -21,7 +21,7 @@ void main() { json = {'attribute2-anyOf': 'attribute2AnyOf'}; expect(object.toJson(), equals(json)); - expect($ObjectAnyOf0ObjectAnyOf1Extension.fromJson(json), equals(object)); + expect($ObjectAnyOfExtension.fromJson(json), equals(object)); }); test('MixedAnyOf', () { @@ -33,7 +33,7 @@ void main() { Object? json = {'attribute-anyOf': 'attributeAnyOf'}; expect(object.toJson(), equals(json)); - expect($MixedAnyOf1StringExtension.fromJson(json), equals(object)); + expect($MixedAnyOfExtension.fromJson(json), equals(object)); object = ( mixedAnyOf1: null, @@ -43,7 +43,7 @@ void main() { json = 'string'; expect(object.toJson(), equals(json)); - expect($MixedAnyOf1StringExtension.fromJson(json), equals(object)); + expect($MixedAnyOfExtension.fromJson(json), equals(object)); }); test('OneObjectAnyOf', () { @@ -86,7 +86,7 @@ void main() { Object? json = 0.5971645863260784; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json), equals(object)); + expect($AnyOfIntDoubleOtherExtension.fromJson(json), equals(object)); object = ( $num: 361, @@ -96,7 +96,7 @@ void main() { json = 361; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json)..validateAnyOf(), equals(object)); + expect($AnyOfIntDoubleOtherExtension.fromJson(json)..validateAnyOf(), equals(object)); object = ( $num: null, @@ -106,6 +106,6 @@ void main() { json = 'string'; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json), equals(object)); + expect($AnyOfIntDoubleOtherExtension.fromJson(json), equals(object)); }); } diff --git a/packages/dynamite/dynamite_end_to_end_test/test/nested_ofs_test.dart b/packages/dynamite/dynamite_end_to_end_test/test/nested_ofs_test.dart index efc3e1986dc..833a34d9e44 100644 --- a/packages/dynamite/dynamite_end_to_end_test/test/nested_ofs_test.dart +++ b/packages/dynamite/dynamite_end_to_end_test/test/nested_ofs_test.dart @@ -49,7 +49,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -64,7 +64,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -77,7 +77,7 @@ void main() { json = 0.368966614163742; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -95,7 +95,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -111,7 +111,7 @@ void main() { json = 838; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -128,7 +128,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOfBaseNestedOneOf3BaseOneOf1DoubleExtension.fromJson(json), equals(object)); + expect($BaseNestedOneOfExtension.fromJson(json), equals(object)); }); test('BaseNestedAnyOf', () { @@ -150,7 +150,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -168,7 +168,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -184,7 +184,7 @@ void main() { json = 0.6945631603643333; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -199,7 +199,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -212,7 +212,7 @@ void main() { json = 659; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); object = ( baseAllOf: null, @@ -229,7 +229,7 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseAllOfBaseAnyOf1BaseNestedAnyOf3BaseOneOfIntExtension.fromJson(json), equals(object)); + expect($BaseNestedAnyOfExtension.fromJson(json), equals(object)); }); test('NestedOptimizedOneOf', () { @@ -241,7 +241,7 @@ void main() { Object? json = 770; expect(object.toJson(), equals(json)); - expect($BaseOneOf1NumExtension.fromJson(json), equals(object)); + expect($NestedOptimizedOneOfExtension.fromJson(json), equals(object)); object = ( $num: 0.8345761329689448, @@ -251,7 +251,7 @@ void main() { json = 0.8345761329689448; expect(object.toJson(), equals(json)); - expect($BaseOneOf1NumExtension.fromJson(json), equals(object)); + expect($NestedOptimizedOneOfExtension.fromJson(json), equals(object)); object = ( $num: null, @@ -265,6 +265,6 @@ void main() { }; expect(object.toJson(), equals(json)); - expect($BaseOneOf1NumExtension.fromJson(json), equals(object)); + expect($NestedOptimizedOneOfExtension.fromJson(json), equals(object)); }); } diff --git a/packages/dynamite/dynamite_end_to_end_test/test/one_of_test.dart b/packages/dynamite/dynamite_end_to_end_test/test/one_of_test.dart index 8069f9a84e4..d53c7a04c85 100644 --- a/packages/dynamite/dynamite_end_to_end_test/test/one_of_test.dart +++ b/packages/dynamite/dynamite_end_to_end_test/test/one_of_test.dart @@ -11,7 +11,7 @@ void main() { Object? json = {'attribute1-oneOf': 'attribute1OneOf'}; expect(object.toJson(), equals(json)); - expect($ObjectOneOf0ObjectOneOf1Extension.fromJson(json), equals(object)); + expect($ObjectOneOfExtension.fromJson(json), equals(object)); object = ( objectOneOf0: null, @@ -21,7 +21,7 @@ void main() { json = {'attribute2-oneOf': 'attribute2OneOf'}; expect(object.toJson(), equals(json)); - expect($ObjectOneOf0ObjectOneOf1Extension.fromJson(json), equals(object)); + expect($ObjectOneOfExtension.fromJson(json), equals(object)); }); test('MixedOneOf', () { @@ -33,7 +33,7 @@ void main() { Object? json = {'attribute-oneOf': 'attributeOneOf'}; expect(object.toJson(), equals(json)); - expect($MixedOneOf1StringExtension.fromJson(json), equals(object)); + expect($MixedOneOfExtension.fromJson(json), equals(object)); object = ( mixedOneOf1: null, @@ -43,7 +43,7 @@ void main() { json = 'string'; expect(object.toJson(), equals(json)); - expect($MixedOneOf1StringExtension.fromJson(json), equals(object)); + expect($MixedOneOfExtension.fromJson(json), equals(object)); }); test('OneObjectOneOf', () { @@ -88,7 +88,7 @@ void main() { Object? json = 0.5971645863260784; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json), equals(object)); + expect($OneOfIntDoubleOtherExtension.fromJson(json), equals(object)); object = ( $num: 361, @@ -98,7 +98,7 @@ void main() { json = 361; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json), equals(object)); + expect($OneOfIntDoubleOtherExtension.fromJson(json), equals(object)); object = ( $num: null, @@ -108,6 +108,6 @@ void main() { json = 'string'; expect(object.toJson(), equals(json)); - expect($NumStringExtension.fromJson(json), equals(object)); + expect($OneOfIntDoubleOtherExtension.fromJson(json), equals(object)); }); } diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index 9ceabc6c3fd..5e546321e1e 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -10758,15 +10758,35 @@ abstract class WipeCheckWipeResponseApplicationJson } typedef AutocompleteResult_Status = ({AutocompleteResult_Status0? autocompleteResultStatus0, String? string}); + +extension $AutocompleteResult_StatusExtension on AutocompleteResult_Status { + static AutocompleteResult_Status fromJson(Object? json) => $87e48e5649cd72b4d2947aaaea13ccd8Extension._fromJson(json); +} + typedef NavigationEntry_Order = ({int? $int, String? string}); + +extension $NavigationEntry_OrderExtension on NavigationEntry_Order { + static NavigationEntry_Order fromJson(Object? json) => $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); +} + typedef SharebymailCapabilities = ({ BuiltList? builtListNever, SharebymailCapabilities0? sharebymailCapabilities0 }); + +extension $SharebymailCapabilitiesExtension on SharebymailCapabilities { + static SharebymailCapabilities fromJson(Object? json) => $46564992d3ed3482aa6c1162698aac99Extension._fromJson(json); +} + typedef SpreedPublicCapabilities = ({ BuiltList? builtListNever, SpreedPublicCapabilities0? spreedPublicCapabilities0 }); + +extension $SpreedPublicCapabilitiesExtension on SpreedPublicCapabilities { + static SpreedPublicCapabilities fromJson(Object? json) => $06c2e47196a84ebc3718dccf9eb4b29dExtension._fromJson(json); +} + typedef OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities = ({ CommentsCapabilities? commentsCapabilities, DavCapabilities? davCapabilities, @@ -10783,33 +10803,55 @@ typedef OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities = ({ UserStatusCapabilities? userStatusCapabilities, WeatherStatusCapabilities? weatherStatusCapabilities }); + +extension $OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_CapabilitiesExtension + on OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities { + static OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities fromJson(Object? json) => + $3dc1754764311166375258bea55197c8Extension._fromJson(json); +} + typedef UnifiedSearchSearchCursor = ({int? $int, String? string}); + +extension $UnifiedSearchSearchCursorExtension on UnifiedSearchSearchCursor { + static UnifiedSearchSearchCursor fromJson(Object? json) => $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); +} + typedef UnifiedSearchResult_Cursor = ({int? $int, String? string}); -typedef $AutocompleteResultStatus0String = ({AutocompleteResult_Status0? autocompleteResultStatus0, String? string}); -extension $AutocompleteResultStatus0StringExtension on $AutocompleteResultStatus0String { +extension $UnifiedSearchResult_CursorExtension on UnifiedSearchResult_Cursor { + static UnifiedSearchResult_Cursor fromJson(Object? json) => + $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); +} + +typedef _$87e48e5649cd72b4d2947aaaea13ccd8 = ({AutocompleteResult_Status0? autocompleteResultStatus0, String? string}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $87e48e5649cd72b4d2947aaaea13ccd8Extension on _$87e48e5649cd72b4d2947aaaea13ccd8 { List get _values => [autocompleteResultStatus0, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$AutocompleteResultStatus0String> get serializer => - const _$AutocompleteResultStatus0StringSerializer(); - static $AutocompleteResultStatus0String fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$87e48e5649cd72b4d2947aaaea13ccd8> get serializer => + const _$87e48e5649cd72b4d2947aaaea13ccd8Serializer(); + static _$87e48e5649cd72b4d2947aaaea13ccd8 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$AutocompleteResultStatus0StringSerializer implements PrimitiveSerializer<$AutocompleteResultStatus0String> { - const _$AutocompleteResultStatus0StringSerializer(); +class _$87e48e5649cd72b4d2947aaaea13ccd8Serializer implements PrimitiveSerializer<_$87e48e5649cd72b4d2947aaaea13ccd8> { + const _$87e48e5649cd72b4d2947aaaea13ccd8Serializer(); @override - Iterable get types => const [$AutocompleteResultStatus0String]; + Iterable get types => const [_$87e48e5649cd72b4d2947aaaea13ccd8]; @override - String get wireName => r'$AutocompleteResultStatus0String'; + String get wireName => r'_$87e48e5649cd72b4d2947aaaea13ccd8'; @override Object serialize( Serializers serializers, - $AutocompleteResultStatus0String object, { + _$87e48e5649cd72b4d2947aaaea13ccd8 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -10826,7 +10868,7 @@ class _$AutocompleteResultStatus0StringSerializer implements PrimitiveSerializer } @override - $AutocompleteResultStatus0String deserialize( + _$87e48e5649cd72b4d2947aaaea13ccd8 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -10846,30 +10888,35 @@ class _$AutocompleteResultStatus0StringSerializer implements PrimitiveSerializer } } -typedef $IntString = ({int? $int, String? string}); +typedef _$b2c4857c0136baea42828d89c87c757d = ({int? $int, String? string}); -extension $IntStringExtension on $IntString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b2c4857c0136baea42828d89c87c757dExtension on _$b2c4857c0136baea42828d89c87c757d { List get _values => [$int, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$IntString> get serializer => const _$IntStringSerializer(); - static $IntString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b2c4857c0136baea42828d89c87c757d> get serializer => + const _$b2c4857c0136baea42828d89c87c757dSerializer(); + static _$b2c4857c0136baea42828d89c87c757d _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { - const _$IntStringSerializer(); +class _$b2c4857c0136baea42828d89c87c757dSerializer implements PrimitiveSerializer<_$b2c4857c0136baea42828d89c87c757d> { + const _$b2c4857c0136baea42828d89c87c757dSerializer(); @override - Iterable get types => const [$IntString]; + Iterable get types => const [_$b2c4857c0136baea42828d89c87c757d]; @override - String get wireName => r'$IntString'; + String get wireName => r'_$b2c4857c0136baea42828d89c87c757d'; @override Object serialize( Serializers serializers, - $IntString object, { + _$b2c4857c0136baea42828d89c87c757d object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -10886,7 +10933,7 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { } @override - $IntString deserialize( + _$b2c4857c0136baea42828d89c87c757d deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -10903,35 +10950,38 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { } } -typedef $BuiltListSharebymailCapabilities0 = ({ +typedef _$46564992d3ed3482aa6c1162698aac99 = ({ BuiltList? builtListNever, SharebymailCapabilities0? sharebymailCapabilities0 }); -extension $BuiltListSharebymailCapabilities0Extension on $BuiltListSharebymailCapabilities0 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $46564992d3ed3482aa6c1162698aac99Extension on _$46564992d3ed3482aa6c1162698aac99 { List get _values => [builtListNever, sharebymailCapabilities0]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListSharebymailCapabilities0> get serializer => - const _$BuiltListSharebymailCapabilities0Serializer(); - static $BuiltListSharebymailCapabilities0 fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$46564992d3ed3482aa6c1162698aac99> get serializer => + const _$46564992d3ed3482aa6c1162698aac99Serializer(); + static _$46564992d3ed3482aa6c1162698aac99 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListSharebymailCapabilities0Serializer implements PrimitiveSerializer<$BuiltListSharebymailCapabilities0> { - const _$BuiltListSharebymailCapabilities0Serializer(); +class _$46564992d3ed3482aa6c1162698aac99Serializer implements PrimitiveSerializer<_$46564992d3ed3482aa6c1162698aac99> { + const _$46564992d3ed3482aa6c1162698aac99Serializer(); @override - Iterable get types => const [$BuiltListSharebymailCapabilities0]; + Iterable get types => const [_$46564992d3ed3482aa6c1162698aac99]; @override - String get wireName => r'$BuiltListSharebymailCapabilities0'; + String get wireName => r'_$46564992d3ed3482aa6c1162698aac99'; @override Object serialize( Serializers serializers, - $BuiltListSharebymailCapabilities0 object, { + _$46564992d3ed3482aa6c1162698aac99 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -10948,7 +10998,7 @@ class _$BuiltListSharebymailCapabilities0Serializer implements PrimitiveSerializ } @override - $BuiltListSharebymailCapabilities0 deserialize( + _$46564992d3ed3482aa6c1162698aac99 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -10967,36 +11017,38 @@ class _$BuiltListSharebymailCapabilities0Serializer implements PrimitiveSerializ } } -typedef $BuiltListSpreedPublicCapabilities0 = ({ +typedef _$06c2e47196a84ebc3718dccf9eb4b29d = ({ BuiltList? builtListNever, SpreedPublicCapabilities0? spreedPublicCapabilities0 }); -extension $BuiltListSpreedPublicCapabilities0Extension on $BuiltListSpreedPublicCapabilities0 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $06c2e47196a84ebc3718dccf9eb4b29dExtension on _$06c2e47196a84ebc3718dccf9eb4b29d { List get _values => [builtListNever, spreedPublicCapabilities0]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListSpreedPublicCapabilities0> get serializer => - const _$BuiltListSpreedPublicCapabilities0Serializer(); - static $BuiltListSpreedPublicCapabilities0 fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$06c2e47196a84ebc3718dccf9eb4b29d> get serializer => + const _$06c2e47196a84ebc3718dccf9eb4b29dSerializer(); + static _$06c2e47196a84ebc3718dccf9eb4b29d _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListSpreedPublicCapabilities0Serializer - implements PrimitiveSerializer<$BuiltListSpreedPublicCapabilities0> { - const _$BuiltListSpreedPublicCapabilities0Serializer(); +class _$06c2e47196a84ebc3718dccf9eb4b29dSerializer implements PrimitiveSerializer<_$06c2e47196a84ebc3718dccf9eb4b29d> { + const _$06c2e47196a84ebc3718dccf9eb4b29dSerializer(); @override - Iterable get types => const [$BuiltListSpreedPublicCapabilities0]; + Iterable get types => const [_$06c2e47196a84ebc3718dccf9eb4b29d]; @override - String get wireName => r'$BuiltListSpreedPublicCapabilities0'; + String get wireName => r'_$06c2e47196a84ebc3718dccf9eb4b29d'; @override Object serialize( Serializers serializers, - $BuiltListSpreedPublicCapabilities0 object, { + _$06c2e47196a84ebc3718dccf9eb4b29d object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -11013,7 +11065,7 @@ class _$BuiltListSpreedPublicCapabilities0Serializer } @override - $BuiltListSpreedPublicCapabilities0 deserialize( + _$06c2e47196a84ebc3718dccf9eb4b29d deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -11034,8 +11086,7 @@ class _$BuiltListSpreedPublicCapabilities0Serializer } } -typedef $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities - = ({ +typedef _$3dc1754764311166375258bea55197c8 = ({ CommentsCapabilities? commentsCapabilities, DavCapabilities? davCapabilities, FilesCapabilities? filesCapabilities, @@ -11052,8 +11103,9 @@ typedef $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabil WeatherStatusCapabilities? weatherStatusCapabilities }); -extension $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilitiesExtension - on $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $3dc1754764311166375258bea55197c8Extension on _$3dc1754764311166375258bea55197c8 { List get _values => [ commentsCapabilities, davCapabilities, @@ -11072,35 +11124,27 @@ extension $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapab ]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer< - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities> - get serializer => - const _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilitiesSerializer(); - static $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities - fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$3dc1754764311166375258bea55197c8> get serializer => + const _$3dc1754764311166375258bea55197c8Serializer(); + static _$3dc1754764311166375258bea55197c8 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilitiesSerializer - implements - PrimitiveSerializer< - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities> { - const _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilitiesSerializer(); +class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerializer<_$3dc1754764311166375258bea55197c8> { + const _$3dc1754764311166375258bea55197c8Serializer(); @override - Iterable get types => const [ - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities, - ]; + Iterable get types => const [_$3dc1754764311166375258bea55197c8]; @override - String get wireName => - r'$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities'; + String get wireName => r'_$3dc1754764311166375258bea55197c8'; @override Object serialize( Serializers serializers, - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities - object, { + _$3dc1754764311166375258bea55197c8 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -11165,8 +11209,7 @@ class _$CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabili } @override - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilities - deserialize( + _$3dc1754764311166375258bea55197c8 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -11338,7 +11381,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(AutocompleteResult.serializer) ..addBuilderFactory(const FullType(AutocompleteResult_Status0), AutocompleteResult_Status0Builder.new) ..add(AutocompleteResult_Status0.serializer) - ..add($AutocompleteResultStatus0StringExtension.serializer) + ..add($87e48e5649cd72b4d2947aaaea13ccd8Extension.serializer) ..addBuilderFactory( const FullType(BuiltList, [FullType(AutocompleteResult)]), ListBuilder.new, @@ -11467,7 +11510,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(NavigationGetAppsNavigationResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(NavigationEntry), NavigationEntryBuilder.new) ..add(NavigationEntry.serializer) - ..add($IntStringExtension.serializer) + ..add($b2c4857c0136baea42828d89c87c757dExtension.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(NavigationEntry)]), ListBuilder.new) ..addBuilderFactory( const FullType(NavigationGetSettingsNavigationResponseApplicationJson), @@ -11666,7 +11709,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..add(SharebymailCapabilities0_FilesSharing_Sharebymail_ExpireDate.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(Never)]), ListBuilder.new) - ..add($BuiltListSharebymailCapabilities0Extension.serializer) + ..add($46564992d3ed3482aa6c1162698aac99Extension.serializer) ..addBuilderFactory(const FullType(SpreedPublicCapabilities0), SpreedPublicCapabilities0Builder.new) ..add(SpreedPublicCapabilities0.serializer) ..addBuilderFactory(const FullType(SpreedPublicCapabilities0_Spreed), SpreedPublicCapabilities0_SpreedBuilder.new) @@ -11706,7 +11749,7 @@ final Serializers serializers = (Serializers().toBuilder() SpreedPublicCapabilities0_Spreed_Config_SignalingBuilder.new, ) ..add(SpreedPublicCapabilities0_Spreed_Config_Signaling.serializer) - ..add($BuiltListSpreedPublicCapabilities0Extension.serializer) + ..add($06c2e47196a84ebc3718dccf9eb4b29dExtension.serializer) ..addBuilderFactory(const FullType(ThemingPublicCapabilities), ThemingPublicCapabilitiesBuilder.new) ..add(ThemingPublicCapabilities.serializer) ..addBuilderFactory( @@ -11728,10 +11771,7 @@ final Serializers serializers = (Serializers().toBuilder() WeatherStatusCapabilities_WeatherStatusBuilder.new, ) ..add(WeatherStatusCapabilities_WeatherStatus.serializer) - ..add( - $CommentsCapabilitiesDavCapabilitiesFilesCapabilitiesFilesSharingCapabilitiesFilesTrashbinCapabilitiesFilesVersionsCapabilitiesNotesCapabilitiesNotificationsCapabilitiesProvisioningApiCapabilitiesSharebymailCapabilitiesSpreedPublicCapabilitiesThemingPublicCapabilitiesUserStatusCapabilitiesWeatherStatusCapabilitiesExtension - .serializer, - ) + ..add($3dc1754764311166375258bea55197c8Extension.serializer) ..addBuilderFactory( const FullType(ProfileApiSetVisibilityResponseApplicationJson), ProfileApiSetVisibilityResponseApplicationJsonBuilder.new, diff --git a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart index a1823b7dc47..ab9c176f51e 100644 --- a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart @@ -4922,31 +4922,47 @@ abstract class Capabilities implements $CapabilitiesInterface, Built? builtListInt, int? $int}); + +extension $ShareesapiSearchShareTypeExtension on ShareesapiSearchShareType { + static ShareesapiSearchShareType fromJson(Object? json) => $07eaa0304017ba8abe7f9f20d6a736f3Extension._fromJson(json); +} + typedef ShareesapiFindRecommendedShareType = ({BuiltList? builtListInt, int? $int}); -typedef $BuiltListInt = ({BuiltList? builtListInt, int? $int}); -extension $BuiltListIntExtension on $BuiltListInt { +extension $ShareesapiFindRecommendedShareTypeExtension on ShareesapiFindRecommendedShareType { + static ShareesapiFindRecommendedShareType fromJson(Object? json) => + $07eaa0304017ba8abe7f9f20d6a736f3Extension._fromJson(json); +} + +typedef _$07eaa0304017ba8abe7f9f20d6a736f3 = ({BuiltList? builtListInt, int? $int}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $07eaa0304017ba8abe7f9f20d6a736f3Extension on _$07eaa0304017ba8abe7f9f20d6a736f3 { List get _values => [builtListInt, $int]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListInt> get serializer => const _$BuiltListIntSerializer(); - static $BuiltListInt fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$07eaa0304017ba8abe7f9f20d6a736f3> get serializer => + const _$07eaa0304017ba8abe7f9f20d6a736f3Serializer(); + static _$07eaa0304017ba8abe7f9f20d6a736f3 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListIntSerializer implements PrimitiveSerializer<$BuiltListInt> { - const _$BuiltListIntSerializer(); +class _$07eaa0304017ba8abe7f9f20d6a736f3Serializer implements PrimitiveSerializer<_$07eaa0304017ba8abe7f9f20d6a736f3> { + const _$07eaa0304017ba8abe7f9f20d6a736f3Serializer(); @override - Iterable get types => const [$BuiltListInt]; + Iterable get types => const [_$07eaa0304017ba8abe7f9f20d6a736f3]; @override - String get wireName => r'$BuiltListInt'; + String get wireName => r'_$07eaa0304017ba8abe7f9f20d6a736f3'; @override Object serialize( Serializers serializers, - $BuiltListInt object, { + _$07eaa0304017ba8abe7f9f20d6a736f3 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -4963,7 +4979,7 @@ class _$BuiltListIntSerializer implements PrimitiveSerializer<$BuiltListInt> { } @override - $BuiltListInt deserialize( + _$07eaa0304017ba8abe7f9f20d6a736f3 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -5173,7 +5189,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..add(ShareapiAcceptShareResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(int)]), ListBuilder.new) - ..add($BuiltListIntExtension.serializer) + ..add($07eaa0304017ba8abe7f9f20d6a736f3Extension.serializer) ..addBuilderFactory( const FullType(ShareesapiShareesapiSearchHeaders), ShareesapiShareesapiSearchHeadersBuilder.new, diff --git a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart index 0bd00ca35bf..2e5176896b7 100644 --- a/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart +++ b/packages/nextcloud/lib/src/api/provisioning_api.openapi.dart @@ -8057,44 +8057,85 @@ abstract class Capabilities implements $CapabilitiesInterface, Built $c4bc4131e74e61dae681408e87e2e2bdExtension._fromJson(json); +} + typedef GroupDetails_Disabled = ({bool? $bool, int? $int}); + +extension $GroupDetails_DisabledExtension on GroupDetails_Disabled { + static GroupDetails_Disabled fromJson(Object? json) => $c4bc4131e74e61dae681408e87e2e2bdExtension._fromJson(json); +} + typedef UserDetailsQuota_Quota = ({num? $num, String? string}); + +extension $UserDetailsQuota_QuotaExtension on UserDetailsQuota_Quota { + static UserDetailsQuota_Quota fromJson(Object? json) => $b6d67dc2a96424d2f407f8e51557f3deExtension._fromJson(json); +} + typedef GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users = ({ GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1? groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1, UserDetails? userDetails }); + +extension $GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_UsersExtension + on GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users { + static GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users fromJson(Object? json) => + $b20d370ea28764b414e70ac5df151f1bExtension._fromJson(json); +} + typedef UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users = ({ UserDetails? userDetails, UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 }); + +extension $UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_UsersExtension + on UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users { + static UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users fromJson(Object? json) => + $1e1cd5e43e0a1022a23a294e58225d74Extension._fromJson(json); +} + typedef UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users = ({ UserDetails? userDetails, UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 }); -typedef $BoolInt = ({bool? $bool, int? $int}); -extension $BoolIntExtension on $BoolInt { +extension $UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersExtension + on UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users { + static UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users fromJson(Object? json) => + $f9d75e948689049b3f3e23e024d4be73Extension._fromJson(json); +} + +typedef _$c4bc4131e74e61dae681408e87e2e2bd = ({bool? $bool, int? $int}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $c4bc4131e74e61dae681408e87e2e2bdExtension on _$c4bc4131e74e61dae681408e87e2e2bd { List get _values => [$bool, $int]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BoolInt> get serializer => const _$BoolIntSerializer(); - static $BoolInt fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$c4bc4131e74e61dae681408e87e2e2bd> get serializer => + const _$c4bc4131e74e61dae681408e87e2e2bdSerializer(); + static _$c4bc4131e74e61dae681408e87e2e2bd _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BoolIntSerializer implements PrimitiveSerializer<$BoolInt> { - const _$BoolIntSerializer(); +class _$c4bc4131e74e61dae681408e87e2e2bdSerializer implements PrimitiveSerializer<_$c4bc4131e74e61dae681408e87e2e2bd> { + const _$c4bc4131e74e61dae681408e87e2e2bdSerializer(); @override - Iterable get types => const [$BoolInt]; + Iterable get types => const [_$c4bc4131e74e61dae681408e87e2e2bd]; @override - String get wireName => r'$BoolInt'; + String get wireName => r'_$c4bc4131e74e61dae681408e87e2e2bd'; @override Object serialize( Serializers serializers, - $BoolInt object, { + _$c4bc4131e74e61dae681408e87e2e2bd object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -8111,7 +8152,7 @@ class _$BoolIntSerializer implements PrimitiveSerializer<$BoolInt> { } @override - $BoolInt deserialize( + _$c4bc4131e74e61dae681408e87e2e2bd deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -8128,30 +8169,35 @@ class _$BoolIntSerializer implements PrimitiveSerializer<$BoolInt> { } } -typedef $NumString = ({num? $num, String? string}); +typedef _$b6d67dc2a96424d2f407f8e51557f3de = ({num? $num, String? string}); -extension $NumStringExtension on $NumString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b6d67dc2a96424d2f407f8e51557f3deExtension on _$b6d67dc2a96424d2f407f8e51557f3de { List get _values => [$num, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$NumString> get serializer => const _$NumStringSerializer(); - static $NumString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b6d67dc2a96424d2f407f8e51557f3de> get serializer => + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); + static _$b6d67dc2a96424d2f407f8e51557f3de _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { - const _$NumStringSerializer(); +class _$b6d67dc2a96424d2f407f8e51557f3deSerializer implements PrimitiveSerializer<_$b6d67dc2a96424d2f407f8e51557f3de> { + const _$b6d67dc2a96424d2f407f8e51557f3deSerializer(); @override - Iterable get types => const [$NumString]; + Iterable get types => const [_$b6d67dc2a96424d2f407f8e51557f3de]; @override - String get wireName => r'$NumString'; + String get wireName => r'_$b6d67dc2a96424d2f407f8e51557f3de'; @override Object serialize( Serializers serializers, - $NumString object, { + _$b6d67dc2a96424d2f407f8e51557f3de object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -8168,7 +8214,7 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { } @override - $NumString deserialize( + _$b6d67dc2a96424d2f407f8e51557f3de deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -8185,37 +8231,38 @@ class _$NumStringSerializer implements PrimitiveSerializer<$NumString> { } } -typedef $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails = ({ +typedef _$b20d370ea28764b414e70ac5df151f1b = ({ GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1? groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1, UserDetails? userDetails }); -extension $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetailsExtension - on $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b20d370ea28764b414e70ac5df151f1bExtension on _$b20d370ea28764b414e70ac5df151f1b { List get _values => [groupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1, userDetails]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails> get serializer => - const _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetailsSerializer(); - static $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$b20d370ea28764b414e70ac5df151f1b> get serializer => + const _$b20d370ea28764b414e70ac5df151f1bSerializer(); + static _$b20d370ea28764b414e70ac5df151f1b _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetailsSerializer - implements PrimitiveSerializer<$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails> { - const _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetailsSerializer(); +class _$b20d370ea28764b414e70ac5df151f1bSerializer implements PrimitiveSerializer<_$b20d370ea28764b414e70ac5df151f1b> { + const _$b20d370ea28764b414e70ac5df151f1bSerializer(); @override - Iterable get types => const [$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails]; + Iterable get types => const [_$b20d370ea28764b414e70ac5df151f1b]; @override - String get wireName => r'$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails'; + String get wireName => r'_$b20d370ea28764b414e70ac5df151f1b'; @override Object serialize( Serializers serializers, - $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails object, { + _$b20d370ea28764b414e70ac5df151f1b object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -8235,7 +8282,7 @@ class _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetail } @override - $GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetails deserialize( + _$b20d370ea28764b414e70ac5df151f1b deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -8260,37 +8307,38 @@ class _$GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetail } } -typedef $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 = ({ +typedef _$1e1cd5e43e0a1022a23a294e58225d74 = ({ UserDetails? userDetails, UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 }); -extension $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Extension - on $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $1e1cd5e43e0a1022a23a294e58225d74Extension on _$1e1cd5e43e0a1022a23a294e58225d74 { List get _values => [userDetails, usersGetUsersDetailsResponseApplicationJsonOcsDataUsers1]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1> get serializer => - const _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer(); - static $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$1e1cd5e43e0a1022a23a294e58225d74> get serializer => + const _$1e1cd5e43e0a1022a23a294e58225d74Serializer(); + static _$1e1cd5e43e0a1022a23a294e58225d74 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer - implements PrimitiveSerializer<$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1> { - const _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer(); +class _$1e1cd5e43e0a1022a23a294e58225d74Serializer implements PrimitiveSerializer<_$1e1cd5e43e0a1022a23a294e58225d74> { + const _$1e1cd5e43e0a1022a23a294e58225d74Serializer(); @override - Iterable get types => const [$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1]; + Iterable get types => const [_$1e1cd5e43e0a1022a23a294e58225d74]; @override - String get wireName => r'$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1'; + String get wireName => r'_$1e1cd5e43e0a1022a23a294e58225d74'; @override Object serialize( Serializers serializers, - $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 object, { + _$1e1cd5e43e0a1022a23a294e58225d74 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -8310,7 +8358,7 @@ class _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Seria } @override - $UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1 deserialize( + _$1e1cd5e43e0a1022a23a294e58225d74 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -8334,37 +8382,38 @@ class _$UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Seria } } -typedef $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 = ({ +typedef _$f9d75e948689049b3f3e23e024d4be73 = ({ UserDetails? userDetails, UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1? usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 }); -extension $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Extension - on $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $f9d75e948689049b3f3e23e024d4be73Extension on _$f9d75e948689049b3f3e23e024d4be73 { List get _values => [userDetails, usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1> get serializer => - const _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer(); - static $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$f9d75e948689049b3f3e23e024d4be73> get serializer => + const _$f9d75e948689049b3f3e23e024d4be73Serializer(); + static _$f9d75e948689049b3f3e23e024d4be73 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer - implements PrimitiveSerializer<$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1> { - const _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer(); +class _$f9d75e948689049b3f3e23e024d4be73Serializer implements PrimitiveSerializer<_$f9d75e948689049b3f3e23e024d4be73> { + const _$f9d75e948689049b3f3e23e024d4be73Serializer(); @override - Iterable get types => const [$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1]; + Iterable get types => const [_$f9d75e948689049b3f3e23e024d4be73]; @override - String get wireName => r'$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1'; + String get wireName => r'_$f9d75e948689049b3f3e23e024d4be73'; @override Object serialize( Serializers serializers, - $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 object, { + _$f9d75e948689049b3f3e23e024d4be73 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -8384,7 +8433,7 @@ class _$UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUse } @override - $UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 deserialize( + _$f9d75e948689049b3f3e23e024d4be73 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -8569,7 +8618,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(GroupsGetGroupsDetailsResponseApplicationJson_Ocs_Data.serializer) ..addBuilderFactory(const FullType(GroupDetails), GroupDetailsBuilder.new) ..add(GroupDetails.serializer) - ..add($BoolIntExtension.serializer) + ..add($c4bc4131e74e61dae681408e87e2e2bdExtension.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(GroupDetails)]), ListBuilder.new) ..addBuilderFactory( const FullType(GroupsGetGroupUsersResponseApplicationJson), @@ -8607,13 +8656,13 @@ final Serializers serializers = (Serializers().toBuilder() ..add(UserDetails_BackendCapabilities.serializer) ..addBuilderFactory(const FullType(UserDetailsQuota), UserDetailsQuotaBuilder.new) ..add(UserDetailsQuota.serializer) - ..add($NumStringExtension.serializer) + ..add($b6d67dc2a96424d2f407f8e51557f3deExtension.serializer) ..addBuilderFactory( const FullType(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1), GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1Builder.new, ) ..add(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1.serializer) - ..add($GroupsGetGroupUsersDetailsResponseApplicationJsonOcsDataUsers1UserDetailsExtension.serializer) + ..add($b20d370ea28764b414e70ac5df151f1bExtension.serializer) ..addBuilderFactory( const FullType( BuiltMap, @@ -8767,7 +8816,7 @@ final Serializers serializers = (Serializers().toBuilder() UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1Builder.new, ) ..add(UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users1.serializer) - ..add($UserDetailsUsersGetUsersDetailsResponseApplicationJsonOcsDataUsers1Extension.serializer) + ..add($1e1cd5e43e0a1022a23a294e58225d74Extension.serializer) ..addBuilderFactory( const FullType( BuiltMap, @@ -8795,7 +8844,7 @@ final Serializers serializers = (Serializers().toBuilder() UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1Builder.new, ) ..add(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1.serializer) - ..add($UserDetailsUsersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Extension.serializer) + ..add($f9d75e948689049b3f3e23e024d4be73Extension.serializer) ..addBuilderFactory( const FullType( BuiltMap, diff --git a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart index 23b9d129cfc..d2e8478d7f1 100644 --- a/packages/nextcloud/lib/src/api/sharebymail.openapi.dart +++ b/packages/nextcloud/lib/src/api/sharebymail.openapi.dart @@ -197,30 +197,40 @@ abstract class Capabilities0 implements $Capabilities0Interface, Built? builtListNever, Capabilities0? capabilities0}); -typedef $BuiltListCapabilities0 = ({BuiltList? builtListNever, Capabilities0? capabilities0}); -extension $BuiltListCapabilities0Extension on $BuiltListCapabilities0 { +extension $CapabilitiesExtension on Capabilities { + static Capabilities fromJson(Object? json) => $7f1b9936cf688676379074249fff891bExtension._fromJson(json); +} + +typedef _$7f1b9936cf688676379074249fff891b = ({BuiltList? builtListNever, Capabilities0? capabilities0}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $7f1b9936cf688676379074249fff891bExtension on _$7f1b9936cf688676379074249fff891b { List get _values => [builtListNever, capabilities0]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListCapabilities0> get serializer => const _$BuiltListCapabilities0Serializer(); - static $BuiltListCapabilities0 fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$7f1b9936cf688676379074249fff891b> get serializer => + const _$7f1b9936cf688676379074249fff891bSerializer(); + static _$7f1b9936cf688676379074249fff891b _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListCapabilities0Serializer implements PrimitiveSerializer<$BuiltListCapabilities0> { - const _$BuiltListCapabilities0Serializer(); +class _$7f1b9936cf688676379074249fff891bSerializer implements PrimitiveSerializer<_$7f1b9936cf688676379074249fff891b> { + const _$7f1b9936cf688676379074249fff891bSerializer(); @override - Iterable get types => const [$BuiltListCapabilities0]; + Iterable get types => const [_$7f1b9936cf688676379074249fff891b]; @override - String get wireName => r'$BuiltListCapabilities0'; + String get wireName => r'_$7f1b9936cf688676379074249fff891b'; @override Object serialize( Serializers serializers, - $BuiltListCapabilities0 object, { + _$7f1b9936cf688676379074249fff891b object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -237,7 +247,7 @@ class _$BuiltListCapabilities0Serializer implements PrimitiveSerializer<$BuiltLi } @override - $BuiltListCapabilities0 deserialize( + _$7f1b9936cf688676379074249fff891b deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -283,7 +293,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..add(Capabilities0_FilesSharing_Sharebymail_ExpireDate.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(Never)]), ListBuilder.new) - ..add($BuiltListCapabilities0Extension.serializer)) + ..add($7f1b9936cf688676379074249fff891bExtension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.dart b/packages/nextcloud/lib/src/api/spreed.openapi.dart index b886dc9c2c0..d15f75fc9d3 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.dart @@ -33629,40 +33629,75 @@ abstract class PublicCapabilities0 } typedef Room_LastMessage = ({BuiltList? builtListNever, ChatMessage? chatMessage}); + +extension $Room_LastMessageExtension on Room_LastMessage { + static Room_LastMessage fromJson(Object? json) => $e620970959f428e934829e52f32b7089Extension._fromJson(json); +} + typedef RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data = ({ BuiltList? builtListNever, RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0? roomAddParticipantToRoomResponseApplicationJsonOcsData0 }); + +extension $RoomAddParticipantToRoomResponseApplicationJson_Ocs_DataExtension + on RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data { + static RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data fromJson(Object? json) => + $bd993fb3f40af33e8594d0d698208560Extension._fromJson(json); +} + typedef SettingsSetUserSettingValue = ({int? $int, String? string}); + +extension $SettingsSetUserSettingValueExtension on SettingsSetUserSettingValue { + static SettingsSetUserSettingValue fromJson(Object? json) => + $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); +} + typedef SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data = ({ BuiltList? builtListSignalingSession, String? string }); + +extension $SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataExtension + on SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data { + static SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data fromJson(Object? json) => + $1df642f5035aea3b22543ab331c3fb01Extension._fromJson(json); +} + typedef PublicCapabilities = ({BuiltList? builtListNever, PublicCapabilities0? publicCapabilities0}); -typedef $BuiltListChatMessage = ({BuiltList? builtListNever, ChatMessage? chatMessage}); -extension $BuiltListChatMessageExtension on $BuiltListChatMessage { +extension $PublicCapabilitiesExtension on PublicCapabilities { + static PublicCapabilities fromJson(Object? json) => $bc4aac45771b11649d372f39a92b1cf3Extension._fromJson(json); +} + +typedef _$e620970959f428e934829e52f32b7089 = ({BuiltList? builtListNever, ChatMessage? chatMessage}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $e620970959f428e934829e52f32b7089Extension on _$e620970959f428e934829e52f32b7089 { List get _values => [builtListNever, chatMessage]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListChatMessage> get serializer => const _$BuiltListChatMessageSerializer(); - static $BuiltListChatMessage fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$e620970959f428e934829e52f32b7089> get serializer => + const _$e620970959f428e934829e52f32b7089Serializer(); + static _$e620970959f428e934829e52f32b7089 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListChatMessageSerializer implements PrimitiveSerializer<$BuiltListChatMessage> { - const _$BuiltListChatMessageSerializer(); +class _$e620970959f428e934829e52f32b7089Serializer implements PrimitiveSerializer<_$e620970959f428e934829e52f32b7089> { + const _$e620970959f428e934829e52f32b7089Serializer(); @override - Iterable get types => const [$BuiltListChatMessage]; + Iterable get types => const [_$e620970959f428e934829e52f32b7089]; @override - String get wireName => r'$BuiltListChatMessage'; + String get wireName => r'_$e620970959f428e934829e52f32b7089'; @override Object serialize( Serializers serializers, - $BuiltListChatMessage object, { + _$e620970959f428e934829e52f32b7089 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -33679,7 +33714,7 @@ class _$BuiltListChatMessageSerializer implements PrimitiveSerializer<$BuiltList } @override - $BuiltListChatMessage deserialize( + _$e620970959f428e934829e52f32b7089 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -33697,37 +33732,38 @@ class _$BuiltListChatMessageSerializer implements PrimitiveSerializer<$BuiltList } } -typedef $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0 = ({ +typedef _$bd993fb3f40af33e8594d0d698208560 = ({ BuiltList? builtListNever, RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0? roomAddParticipantToRoomResponseApplicationJsonOcsData0 }); -extension $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Extension - on $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $bd993fb3f40af33e8594d0d698208560Extension on _$bd993fb3f40af33e8594d0d698208560 { List get _values => [builtListNever, roomAddParticipantToRoomResponseApplicationJsonOcsData0]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0> get serializer => - const _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializer(); - static $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0 fromJson(Object? json) => +// ignore: library_private_types_in_public_api + static Serializer<_$bd993fb3f40af33e8594d0d698208560> get serializer => + const _$bd993fb3f40af33e8594d0d698208560Serializer(); + static _$bd993fb3f40af33e8594d0d698208560 _fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializer - implements PrimitiveSerializer<$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0> { - const _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializer(); +class _$bd993fb3f40af33e8594d0d698208560Serializer implements PrimitiveSerializer<_$bd993fb3f40af33e8594d0d698208560> { + const _$bd993fb3f40af33e8594d0d698208560Serializer(); @override - Iterable get types => const [$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0]; + Iterable get types => const [_$bd993fb3f40af33e8594d0d698208560]; @override - String get wireName => r'$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0'; + String get wireName => r'_$bd993fb3f40af33e8594d0d698208560'; @override Object serialize( Serializers serializers, - $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0 object, { + _$bd993fb3f40af33e8594d0d698208560 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -33747,7 +33783,7 @@ class _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializ } @override - $BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0 deserialize( + _$bd993fb3f40af33e8594d0d698208560 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -33771,30 +33807,35 @@ class _$BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Serializ } } -typedef $IntString = ({int? $int, String? string}); +typedef _$b2c4857c0136baea42828d89c87c757d = ({int? $int, String? string}); -extension $IntStringExtension on $IntString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b2c4857c0136baea42828d89c87c757dExtension on _$b2c4857c0136baea42828d89c87c757d { List get _values => [$int, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$IntString> get serializer => const _$IntStringSerializer(); - static $IntString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$b2c4857c0136baea42828d89c87c757d> get serializer => + const _$b2c4857c0136baea42828d89c87c757dSerializer(); + static _$b2c4857c0136baea42828d89c87c757d _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { - const _$IntStringSerializer(); +class _$b2c4857c0136baea42828d89c87c757dSerializer implements PrimitiveSerializer<_$b2c4857c0136baea42828d89c87c757d> { + const _$b2c4857c0136baea42828d89c87c757dSerializer(); @override - Iterable get types => const [$IntString]; + Iterable get types => const [_$b2c4857c0136baea42828d89c87c757d]; @override - String get wireName => r'$IntString'; + String get wireName => r'_$b2c4857c0136baea42828d89c87c757d'; @override Object serialize( Serializers serializers, - $IntString object, { + _$b2c4857c0136baea42828d89c87c757d object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -33811,7 +33852,7 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { } @override - $IntString deserialize( + _$b2c4857c0136baea42828d89c87c757d deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -33828,30 +33869,35 @@ class _$IntStringSerializer implements PrimitiveSerializer<$IntString> { } } -typedef $BuiltListString = ({BuiltList? builtListSignalingSession, String? string}); +typedef _$1df642f5035aea3b22543ab331c3fb01 = ({BuiltList? builtListSignalingSession, String? string}); -extension $BuiltListStringExtension on $BuiltListString { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $1df642f5035aea3b22543ab331c3fb01Extension on _$1df642f5035aea3b22543ab331c3fb01 { List get _values => [builtListSignalingSession, string]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListString> get serializer => const _$BuiltListStringSerializer(); - static $BuiltListString fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$1df642f5035aea3b22543ab331c3fb01> get serializer => + const _$1df642f5035aea3b22543ab331c3fb01Serializer(); + static _$1df642f5035aea3b22543ab331c3fb01 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListStringSerializer implements PrimitiveSerializer<$BuiltListString> { - const _$BuiltListStringSerializer(); +class _$1df642f5035aea3b22543ab331c3fb01Serializer implements PrimitiveSerializer<_$1df642f5035aea3b22543ab331c3fb01> { + const _$1df642f5035aea3b22543ab331c3fb01Serializer(); @override - Iterable get types => const [$BuiltListString]; + Iterable get types => const [_$1df642f5035aea3b22543ab331c3fb01]; @override - String get wireName => r'$BuiltListString'; + String get wireName => r'_$1df642f5035aea3b22543ab331c3fb01'; @override Object serialize( Serializers serializers, - $BuiltListString object, { + _$1df642f5035aea3b22543ab331c3fb01 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -33868,7 +33914,7 @@ class _$BuiltListStringSerializer implements PrimitiveSerializer<$BuiltListStrin } @override - $BuiltListString deserialize( + _$1df642f5035aea3b22543ab331c3fb01 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -33888,30 +33934,38 @@ class _$BuiltListStringSerializer implements PrimitiveSerializer<$BuiltListStrin } } -typedef $BuiltListPublicCapabilities0 = ({BuiltList? builtListNever, PublicCapabilities0? publicCapabilities0}); +typedef _$bc4aac45771b11649d372f39a92b1cf3 = ({ + BuiltList? builtListNever, + PublicCapabilities0? publicCapabilities0 +}); -extension $BuiltListPublicCapabilities0Extension on $BuiltListPublicCapabilities0 { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $bc4aac45771b11649d372f39a92b1cf3Extension on _$bc4aac45771b11649d372f39a92b1cf3 { List get _values => [builtListNever, publicCapabilities0]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListPublicCapabilities0> get serializer => const _$BuiltListPublicCapabilities0Serializer(); - static $BuiltListPublicCapabilities0 fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$bc4aac45771b11649d372f39a92b1cf3> get serializer => + const _$bc4aac45771b11649d372f39a92b1cf3Serializer(); + static _$bc4aac45771b11649d372f39a92b1cf3 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListPublicCapabilities0Serializer implements PrimitiveSerializer<$BuiltListPublicCapabilities0> { - const _$BuiltListPublicCapabilities0Serializer(); +class _$bc4aac45771b11649d372f39a92b1cf3Serializer implements PrimitiveSerializer<_$bc4aac45771b11649d372f39a92b1cf3> { + const _$bc4aac45771b11649d372f39a92b1cf3Serializer(); @override - Iterable get types => const [$BuiltListPublicCapabilities0]; + Iterable get types => const [_$bc4aac45771b11649d372f39a92b1cf3]; @override - String get wireName => r'$BuiltListPublicCapabilities0'; + String get wireName => r'_$bc4aac45771b11649d372f39a92b1cf3'; @override Object serialize( Serializers serializers, - $BuiltListPublicCapabilities0 object, { + _$bc4aac45771b11649d372f39a92b1cf3 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -33928,7 +33982,7 @@ class _$BuiltListPublicCapabilities0Serializer implements PrimitiveSerializer<$B } @override - $BuiltListPublicCapabilities0 deserialize( + _$bc4aac45771b11649d372f39a92b1cf3 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -33981,7 +34035,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..addBuilderFactory(const FullType(BuiltMap, [FullType(String), FullType(int)]), MapBuilder.new) ..addBuilderFactory(const FullType(BuiltList, [FullType(Never)]), ListBuilder.new) - ..add($BuiltListChatMessageExtension.serializer) + ..add($e620970959f428e934829e52f32b7089Extension.serializer) ..add(AvatarDeleteAvatarApiVersion.serializer) ..addBuilderFactory( const FullType(AvatarDeleteAvatarResponseApplicationJson), @@ -35033,7 +35087,7 @@ final Serializers serializers = (Serializers().toBuilder() RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0Builder.new, ) ..add(RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data0.serializer) - ..add($BuiltListRoomAddParticipantToRoomResponseApplicationJsonOcsData0Extension.serializer) + ..add($bd993fb3f40af33e8594d0d698208560Extension.serializer) ..add(RoomGetBreakoutRoomParticipantsApiVersion.serializer) ..addBuilderFactory( const FullType(RoomRoomGetBreakoutRoomParticipantsHeaders), @@ -35266,7 +35320,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..add(SettingsSetsipSettingsResponseApplicationJson_Ocs.serializer) ..add(SettingsSetUserSettingKey.serializer) - ..add($IntStringExtension.serializer) + ..add($b2c4857c0136baea42828d89c87c757dExtension.serializer) ..add(SettingsSetUserSettingApiVersion.serializer) ..addBuilderFactory( const FullType(SettingsSetUserSettingResponseApplicationJson), @@ -35348,7 +35402,7 @@ final Serializers serializers = (Serializers().toBuilder() ..addBuilderFactory(const FullType(SignalingSession), SignalingSessionBuilder.new) ..add(SignalingSession.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(SignalingSession)]), ListBuilder.new) - ..add($BuiltListStringExtension.serializer) + ..add($1df642f5035aea3b22543ab331c3fb01Extension.serializer) ..addBuilderFactory( const FullType(BuiltList, [FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data)]), ListBuilder.new, @@ -35427,7 +35481,7 @@ final Serializers serializers = (Serializers().toBuilder() PublicCapabilities0_Spreed_Config_SignalingBuilder.new, ) ..add(PublicCapabilities0_Spreed_Config_Signaling.serializer) - ..add($BuiltListPublicCapabilities0Extension.serializer)) + ..add($bc4aac45771b11649d372f39a92b1cf3Extension.serializer)) .build(); @visibleForTesting final Serializers jsonSerializers = (serializers.toBuilder() diff --git a/packages/nextcloud/lib/src/api/user_status.openapi.dart b/packages/nextcloud/lib/src/api/user_status.openapi.dart index 0dbed353e70..c2cf77f765b 100644 --- a/packages/nextcloud/lib/src/api/user_status.openapi.dart +++ b/packages/nextcloud/lib/src/api/user_status.openapi.dart @@ -1918,31 +1918,48 @@ abstract class Capabilities implements $CapabilitiesInterface, Built $557344b3ba734aacc7109e5420fcb6c5Extension._fromJson(json); +} + typedef UserStatusRevertStatusResponseApplicationJson_Ocs_Data = ({BuiltList? builtListNever, Private? private}); -typedef $ClearAtTimeTypeInt = ({ClearAtTimeType? clearAtTimeType, int? $int}); -extension $ClearAtTimeTypeIntExtension on $ClearAtTimeTypeInt { +extension $UserStatusRevertStatusResponseApplicationJson_Ocs_DataExtension + on UserStatusRevertStatusResponseApplicationJson_Ocs_Data { + static UserStatusRevertStatusResponseApplicationJson_Ocs_Data fromJson(Object? json) => + $d77829de8b7590d2e16cdb714800f5beExtension._fromJson(json); +} + +typedef _$557344b3ba734aacc7109e5420fcb6c5 = ({ClearAtTimeType? clearAtTimeType, int? $int}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $557344b3ba734aacc7109e5420fcb6c5Extension on _$557344b3ba734aacc7109e5420fcb6c5 { List get _values => [clearAtTimeType, $int]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$ClearAtTimeTypeInt> get serializer => const _$ClearAtTimeTypeIntSerializer(); - static $ClearAtTimeTypeInt fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$557344b3ba734aacc7109e5420fcb6c5> get serializer => + const _$557344b3ba734aacc7109e5420fcb6c5Serializer(); + static _$557344b3ba734aacc7109e5420fcb6c5 _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$ClearAtTimeTypeIntSerializer implements PrimitiveSerializer<$ClearAtTimeTypeInt> { - const _$ClearAtTimeTypeIntSerializer(); +class _$557344b3ba734aacc7109e5420fcb6c5Serializer implements PrimitiveSerializer<_$557344b3ba734aacc7109e5420fcb6c5> { + const _$557344b3ba734aacc7109e5420fcb6c5Serializer(); @override - Iterable get types => const [$ClearAtTimeTypeInt]; + Iterable get types => const [_$557344b3ba734aacc7109e5420fcb6c5]; @override - String get wireName => r'$ClearAtTimeTypeInt'; + String get wireName => r'_$557344b3ba734aacc7109e5420fcb6c5'; @override Object serialize( Serializers serializers, - $ClearAtTimeTypeInt object, { + _$557344b3ba734aacc7109e5420fcb6c5 object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -1959,7 +1976,7 @@ class _$ClearAtTimeTypeIntSerializer implements PrimitiveSerializer<$ClearAtTime } @override - $ClearAtTimeTypeInt deserialize( + _$557344b3ba734aacc7109e5420fcb6c5 deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -1977,30 +1994,35 @@ class _$ClearAtTimeTypeIntSerializer implements PrimitiveSerializer<$ClearAtTime } } -typedef $BuiltListPrivate = ({BuiltList? builtListNever, Private? private}); +typedef _$d77829de8b7590d2e16cdb714800f5be = ({BuiltList? builtListNever, Private? private}); -extension $BuiltListPrivateExtension on $BuiltListPrivate { +/// @nodoc +// ignore: library_private_types_in_public_api +extension $d77829de8b7590d2e16cdb714800f5beExtension on _$d77829de8b7590d2e16cdb714800f5be { List get _values => [builtListNever, private]; void validateOneOf() => dynamite_utils.validateOneOf(_values); void validateAnyOf() => dynamite_utils.validateAnyOf(_values); - static Serializer<$BuiltListPrivate> get serializer => const _$BuiltListPrivateSerializer(); - static $BuiltListPrivate fromJson(Object? json) => jsonSerializers.deserializeWith(serializer, json)!; +// ignore: library_private_types_in_public_api + static Serializer<_$d77829de8b7590d2e16cdb714800f5be> get serializer => + const _$d77829de8b7590d2e16cdb714800f5beSerializer(); + static _$d77829de8b7590d2e16cdb714800f5be _fromJson(Object? json) => + jsonSerializers.deserializeWith(serializer, json)!; Object? toJson() => jsonSerializers.serializeWith(serializer, this); } -class _$BuiltListPrivateSerializer implements PrimitiveSerializer<$BuiltListPrivate> { - const _$BuiltListPrivateSerializer(); +class _$d77829de8b7590d2e16cdb714800f5beSerializer implements PrimitiveSerializer<_$d77829de8b7590d2e16cdb714800f5be> { + const _$d77829de8b7590d2e16cdb714800f5beSerializer(); @override - Iterable get types => const [$BuiltListPrivate]; + Iterable get types => const [_$d77829de8b7590d2e16cdb714800f5be]; @override - String get wireName => r'$BuiltListPrivate'; + String get wireName => r'_$d77829de8b7590d2e16cdb714800f5be'; @override Object serialize( Serializers serializers, - $BuiltListPrivate object, { + _$d77829de8b7590d2e16cdb714800f5be object, { FullType specifiedType = FullType.unspecified, }) { dynamic value; @@ -2017,7 +2039,7 @@ class _$BuiltListPrivateSerializer implements PrimitiveSerializer<$BuiltListPriv } @override - $BuiltListPrivate deserialize( + _$d77829de8b7590d2e16cdb714800f5be deserialize( Serializers serializers, Object data, { FullType specifiedType = FullType.unspecified, @@ -2070,7 +2092,7 @@ final Serializers serializers = (Serializers().toBuilder() ..add(ClearAt.serializer) ..add(ClearAt_Type.serializer) ..add(ClearAtTimeType.serializer) - ..add($ClearAtTimeTypeIntExtension.serializer) + ..add($557344b3ba734aacc7109e5420fcb6c5Extension.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(Predefined)]), ListBuilder.new) ..addBuilderFactory( const FullType(StatusesFindAllResponseApplicationJson), @@ -2154,7 +2176,7 @@ final Serializers serializers = (Serializers().toBuilder() ) ..add(UserStatusRevertStatusResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(Never)]), ListBuilder.new) - ..add($BuiltListPrivateExtension.serializer) + ..add($d77829de8b7590d2e16cdb714800f5beExtension.serializer) ..addBuilderFactory(const FullType(Capabilities), CapabilitiesBuilder.new) ..add(Capabilities.serializer) ..addBuilderFactory(const FullType(Capabilities_UserStatus), Capabilities_UserStatusBuilder.new)