diff --git a/packages/dynamite/dynamite/lib/src/builder/header_serializer.dart b/packages/dynamite/dynamite/lib/src/builder/header_serializer.dart deleted file mode 100644 index 77535531b9e..00000000000 --- a/packages/dynamite/dynamite/lib/src/builder/header_serializer.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'package:code_builder/code_builder.dart'; -import 'package:dynamite/src/builder/resolve_type.dart'; -import 'package:dynamite/src/builder/state.dart'; -import 'package:dynamite/src/helpers/dart_helpers.dart'; -import 'package:dynamite/src/helpers/dynamite.dart'; -import 'package:dynamite/src/models/openapi.dart' as openapi; -import 'package:dynamite/src/models/type_result.dart'; - -Spec buildHeaderSerializer( - final State state, - final String identifier, - final openapi.OpenAPI spec, - final openapi.Schema schema, -) => - Class( - (final b) => b - ..name = '_\$${identifier}Serializer' - ..implements.add(refer('StructuredSerializer<$identifier>')) - ..fields.addAll([ - Field( - (final b) => b - ..name = 'types' - ..modifier = FieldModifier.final$ - ..type = refer('Iterable') - ..annotations.add(refer('override')) - ..assignment = Code('const [$identifier, _\$$identifier]'), - ), - Field( - (final b) => b - ..name = 'wireName' - ..modifier = FieldModifier.final$ - ..type = refer('String') - ..annotations.add(refer('override')) - ..assignment = Code("r'$identifier'"), - ), - ]) - ..methods.addAll([ - Method((final b) { - b - ..name = 'serialize' - ..returns = refer('Iterable') - ..annotations.add(refer('override')) - ..requiredParameters.addAll([ - Parameter( - (final b) => b - ..name = 'serializers' - ..type = refer('Serializers'), - ), - Parameter( - (final b) => b - ..name = 'object' - ..type = refer(identifier), - ), - ]) - ..optionalParameters.add( - Parameter( - (final b) => b - ..name = 'specifiedType' - ..type = refer('FullType') - ..named = true - ..defaultTo = const Code('FullType.unspecified'), - ), - ) - ..body = const Code('throw UnimplementedError();'); - }), - Method((final b) { - b - ..name = 'deserialize' - ..returns = refer(identifier) - ..annotations.add(refer('override')) - ..requiredParameters.addAll([ - Parameter( - (final b) => b - ..name = 'serializers' - ..type = refer('Serializers'), - ), - Parameter( - (final b) => b - ..name = 'serialized' - ..type = refer('Iterable'), - ), - ]) - ..optionalParameters.add( - Parameter( - (final b) => b - ..name = 'specifiedType' - ..type = refer('FullType') - ..named = true - ..defaultTo = const Code('FullType.unspecified'), - ), - ) - ..body = Code(''' -final result = new ${identifier}Builder(); - -final iterator = serialized.iterator; -while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - ${deserializeProperty(state, identifier, spec, schema).join('\n')} - } -} - -return result.build(); -'''); - }), - ]), - ); - -Iterable deserializeProperty( - final State state, - final String identifier, - final openapi.OpenAPI spec, - final openapi.Schema schema, -) sync* { - for (final property in schema.properties!.entries) { - final propertyName = property.key; - final propertySchema = property.value; - final result = resolveType( - spec, - state, - '${identifier}_${toDartName(propertyName, uppercaseFirstCharacter: true)}', - propertySchema, - nullable: isDartParameterNullable(schema.required.contains(propertyName), propertySchema), - ); - - yield "case '$propertyName':"; - if (result.className != 'String') { - if (result is TypeResultBase || result is TypeResultEnum) { - yield 'result.${toDartName(propertyName)} = ${result.deserialize(result.decode('value!'))};'; - } else { - yield 'result.${toDartName(propertyName)}.replace(${result.deserialize(result.decode('value!'))});'; - } - } else { - yield 'result.${toDartName(propertyName)} = value!;'; - } - } -} diff --git a/packages/dynamite/dynamite/lib/src/builder/resolve_object.dart b/packages/dynamite/dynamite/lib/src/builder/resolve_object.dart index 7fceacaf40a..36cec83a55e 100644 --- a/packages/dynamite/dynamite/lib/src/builder/resolve_object.dart +++ b/packages/dynamite/dynamite/lib/src/builder/resolve_object.dart @@ -1,6 +1,5 @@ import 'package:built_collection/built_collection.dart'; import 'package:code_builder/code_builder.dart'; -import 'package:dynamite/src/builder/header_serializer.dart'; import 'package:dynamite/src/builder/resolve_interface.dart'; import 'package:dynamite/src/builder/resolve_type.dart'; import 'package:dynamite/src/builder/state.dart'; @@ -41,7 +40,7 @@ TypeResultObject resolveObject( final propertySchema = property.value; final dartName = toDartName(propertyName); - final result = resolveType( + var result = resolveType( spec, state, '${identifier}_${toDartName(propertyName, uppercaseFirstCharacter: true)}', @@ -52,6 +51,15 @@ TypeResultObject resolveObject( ), ); + if (isHeader && result.className != 'String') { + result = TypeResultObject( + 'ContentString', + generics: [result], + nullable: result.nullable, + ); + state.resolvedTypes.add(result); + } + final method = generateProperty( result, propertyName, @@ -76,17 +84,12 @@ TypeResultObject resolveObject( identifier, defaults: defaults.build(), validators: validators.build(), - customSerializer: isHeader, ); state.output.addAll([ $interface, $class, ]); - - if (isHeader) { - state.output.add(buildHeaderSerializer(state, identifier, spec, schema)); - } } return result; } 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 5cd4bd5e52d..24a1eeae0c9 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 @@ -201,47 +201,7 @@ abstract class GetHeaders implements $GetHeadersInterface, Built toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$GetHeadersSerializer(); -} - -class _$GetHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [GetHeaders, _$GetHeaders]; - - @override - final String wireName = 'GetHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final GetHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - GetHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = GetHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'my-header': - result.myHeader = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$getHeadersSerializer; } @BuiltValue(instantiable: false) @@ -264,47 +224,7 @@ abstract class WithContentOperationIdHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$WithContentOperationIdHeadersSerializer(); -} - -class _$WithContentOperationIdHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [WithContentOperationIdHeaders, _$WithContentOperationIdHeaders]; - - @override - final String wireName = 'WithContentOperationIdHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final WithContentOperationIdHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - WithContentOperationIdHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = WithContentOperationIdHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'my-header': - result.myHeader = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$withContentOperationIdHeadersSerializer; } @BuiltValue(instantiable: false) @@ -324,47 +244,7 @@ abstract class GetWithContentHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$GetWithContentHeadersSerializer(); -} - -class _$GetWithContentHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [GetWithContentHeaders, _$GetWithContentHeaders]; - - @override - final String wireName = 'GetWithContentHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final GetWithContentHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - GetWithContentHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = GetWithContentHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'my-header': - result.myHeader = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$getWithContentHeadersSerializer; } // coverage:ignore-start diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.g.dart b/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.g.dart index 85778d0e01c..9f762a42d0b 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.g.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.g.dart @@ -6,6 +6,134 @@ part of 'headers.openapi.dart'; // BuiltValueGenerator // ************************************************************************** +Serializer _$getHeadersSerializer = _$GetHeadersSerializer(); +Serializer _$withContentOperationIdHeadersSerializer = + _$WithContentOperationIdHeadersSerializer(); +Serializer _$getWithContentHeadersSerializer = _$GetWithContentHeadersSerializer(); + +class _$GetHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [GetHeaders, _$GetHeaders]; + @override + final String wireName = 'GetHeaders'; + + @override + Iterable serialize(Serializers serializers, GetHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.myHeader; + if (value != null) { + result + ..add('my-header') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + GetHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = GetHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'my-header': + result.myHeader = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + +class _$WithContentOperationIdHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [WithContentOperationIdHeaders, _$WithContentOperationIdHeaders]; + @override + final String wireName = 'WithContentOperationIdHeaders'; + + @override + Iterable serialize(Serializers serializers, WithContentOperationIdHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.myHeader; + if (value != null) { + result + ..add('my-header') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + WithContentOperationIdHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = WithContentOperationIdHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'my-header': + result.myHeader = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + +class _$GetWithContentHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [GetWithContentHeaders, _$GetWithContentHeaders]; + @override + final String wireName = 'GetWithContentHeaders'; + + @override + Iterable serialize(Serializers serializers, GetWithContentHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.myHeader; + if (value != null) { + result + ..add('my-header') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + GetWithContentHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = GetWithContentHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'my-header': + result.myHeader = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + abstract mixin class $GetHeadersInterfaceBuilder { void replace($GetHeadersInterface other); void update(void Function($GetHeadersInterfaceBuilder) updates); diff --git a/packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart b/packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart index 7db4b7584ed..3b88f96766d 100644 --- a/packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart +++ b/packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart @@ -159,7 +159,7 @@ class DynamiteRawResponse { /// /// Responses revived with [DynamiteRawResponse.fromJson] are not cached as /// they are not expected to be serialized again. - Map? _rawHeaders; + Map? _rawHeaders; DynamiteResponse? _response; @@ -286,7 +286,7 @@ class DynamiteApiException implements Exception { final int statusCode; /// The returned headers when the exception was thrown. - final Map headers; + final Map headers; /// The returned body code when the exception was thrown. final String body; diff --git a/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart b/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart index 0224edb8eb5..eaca30d719b 100644 --- a/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart +++ b/packages/dynamite/dynamite_runtime/lib/src/http_extensions.dart @@ -51,8 +51,8 @@ extension BytesStreamExtension on BytesStream { /// Extension on a http responses. extension HttpClientResponseExtension on HttpClientResponse { /// Returns a map of headers. - Map get responseHeaders { - final responseHeaders = {}; + Map get responseHeaders { + final responseHeaders = {}; headers.forEach((final name, final values) { responseHeaders[name] = values.last; }); diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index 2c459430450..8b7f864b28b 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -2,7 +2,6 @@ // ignore_for_file: discarded_futures // ignore_for_file: public_member_api_docs // ignore_for_file: unreachable_switch_case -import 'dart:convert'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; @@ -5689,7 +5688,7 @@ abstract class AutoCompleteGetResponseApplicationJson @BuiltValue(instantiable: false) abstract interface class $AvatarAvatarGetAvatarDarkHeadersInterface { @BuiltValueField(wireName: 'x-nc-iscustomavatar') - int? get xNcIscustomavatar; + ContentString? get xNcIscustomavatar; } abstract class AvatarAvatarGetAvatarDarkHeaders @@ -5712,54 +5711,13 @@ abstract class AvatarAvatarGetAvatarDarkHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AvatarAvatarGetAvatarDarkHeadersSerializer(); -} - -class _$AvatarAvatarGetAvatarDarkHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [AvatarAvatarGetAvatarDarkHeaders, _$AvatarAvatarGetAvatarDarkHeaders]; - - @override - final String wireName = 'AvatarAvatarGetAvatarDarkHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final AvatarAvatarGetAvatarDarkHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - AvatarAvatarGetAvatarDarkHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = AvatarAvatarGetAvatarDarkHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nc-iscustomavatar': - result.xNcIscustomavatar = - _jsonSerializers.deserialize(json.decode(value), specifiedType: const FullType(int))! as int; - } - } - - return result.build(); - } + static Serializer get serializer => _$avatarAvatarGetAvatarDarkHeadersSerializer; } @BuiltValue(instantiable: false) abstract interface class $AvatarAvatarGetAvatarHeadersInterface { @BuiltValueField(wireName: 'x-nc-iscustomavatar') - int? get xNcIscustomavatar; + ContentString? get xNcIscustomavatar; } abstract class AvatarAvatarGetAvatarHeaders @@ -5782,48 +5740,7 @@ abstract class AvatarAvatarGetAvatarHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AvatarAvatarGetAvatarHeadersSerializer(); -} - -class _$AvatarAvatarGetAvatarHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [AvatarAvatarGetAvatarHeaders, _$AvatarAvatarGetAvatarHeaders]; - - @override - final String wireName = 'AvatarAvatarGetAvatarHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final AvatarAvatarGetAvatarHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - AvatarAvatarGetAvatarHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = AvatarAvatarGetAvatarHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nc-iscustomavatar': - result.xNcIscustomavatar = - _jsonSerializers.deserialize(json.decode(value), specifiedType: const FullType(int))! as int; - } - } - - return result.build(); - } + static Serializer get serializer => _$avatarAvatarGetAvatarHeadersSerializer; } @BuiltValue(instantiable: false) @@ -6790,7 +6707,7 @@ abstract class NavigationGetSettingsNavigationResponseApplicationJson @BuiltValue(instantiable: false) abstract interface class $OcmOcmDiscoveryHeadersInterface { @BuiltValueField(wireName: 'x-nextcloud-ocm-providers') - bool? get xNextcloudOcmProviders; + ContentString? get xNextcloudOcmProviders; } abstract class OcmOcmDiscoveryHeaders @@ -6810,50 +6727,7 @@ abstract class OcmOcmDiscoveryHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OcmOcmDiscoveryHeadersSerializer(); -} - -class _$OcmOcmDiscoveryHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [OcmOcmDiscoveryHeaders, _$OcmOcmDiscoveryHeaders]; - - @override - final String wireName = 'OcmOcmDiscoveryHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final OcmOcmDiscoveryHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - OcmOcmDiscoveryHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = OcmOcmDiscoveryHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-ocm-providers': - result.xNextcloudOcmProviders = _jsonSerializers.deserialize( - json.decode(value), - specifiedType: const FullType(bool), - )! as bool; - } - } - - return result.build(); - } + static Serializer get serializer => _$ocmOcmDiscoveryHeadersSerializer; } @BuiltValue(instantiable: false) @@ -11535,6 +11409,8 @@ final Serializers _serializers = (Serializers().toBuilder() ) ..addBuilderFactory(const FullType(AvatarAvatarGetAvatarDarkHeaders), AvatarAvatarGetAvatarDarkHeadersBuilder.new) ..add(AvatarAvatarGetAvatarDarkHeaders.serializer) + ..addBuilderFactory(const FullType(ContentString, [FullType(int)]), ContentStringBuilder.new) + ..add(ContentString.serializer) ..addBuilderFactory(const FullType(AvatarAvatarGetAvatarHeaders), AvatarAvatarGetAvatarHeadersBuilder.new) ..add(AvatarAvatarGetAvatarHeaders.serializer) ..addBuilderFactory(const FullType(LoginFlowV2Credentials), LoginFlowV2CredentialsBuilder.new) @@ -11670,6 +11546,7 @@ final Serializers _serializers = (Serializers().toBuilder() ..add(NavigationGetSettingsNavigationResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(OcmOcmDiscoveryHeaders), OcmOcmDiscoveryHeadersBuilder.new) ..add(OcmOcmDiscoveryHeaders.serializer) + ..addBuilderFactory(const FullType(ContentString, [FullType(bool)]), ContentStringBuilder.new) ..addBuilderFactory( const FullType(OcmDiscoveryResponseApplicationJson), OcmDiscoveryResponseApplicationJsonBuilder.new, @@ -12240,7 +12117,6 @@ final Serializers _serializers = (Serializers().toBuilder() const FullType(ContentString, [FullType(UnifiedSearchSearchCursor)]), ContentStringBuilder.new, ) - ..add(ContentString.serializer) ..addBuilderFactory( const FullType(UnifiedSearchSearchResponseApplicationJson), UnifiedSearchSearchResponseApplicationJsonBuilder.new, diff --git a/packages/nextcloud/lib/src/api/core.openapi.g.dart b/packages/nextcloud/lib/src/api/core.openapi.g.dart index 00951806ab1..dd99052d54a 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.g.dart @@ -38,6 +38,10 @@ Serializer _$autoCompleteGetResponse _$AutoCompleteGetResponseApplicationJson_OcsSerializer(); Serializer _$autoCompleteGetResponseApplicationJsonSerializer = _$AutoCompleteGetResponseApplicationJsonSerializer(); +Serializer _$avatarAvatarGetAvatarDarkHeadersSerializer = + _$AvatarAvatarGetAvatarDarkHeadersSerializer(); +Serializer _$avatarAvatarGetAvatarHeadersSerializer = + _$AvatarAvatarGetAvatarHeadersSerializer(); Serializer _$loginFlowV2CredentialsSerializer = _$LoginFlowV2CredentialsSerializer(); Serializer _$loginFlowV2PollSerializer = _$LoginFlowV2_PollSerializer(); Serializer _$loginFlowV2Serializer = _$LoginFlowV2Serializer(); @@ -107,6 +111,7 @@ Serializer Serializer _$navigationGetSettingsNavigationResponseApplicationJsonSerializer = _$NavigationGetSettingsNavigationResponseApplicationJsonSerializer(); +Serializer _$ocmOcmDiscoveryHeadersSerializer = _$OcmOcmDiscoveryHeadersSerializer(); Serializer _$ocmDiscoveryResponseApplicationJsonResourceTypesProtocolsSerializer = _$OcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsSerializer(); @@ -1153,6 +1158,90 @@ class _$AutoCompleteGetResponseApplicationJsonSerializer } } +class _$AvatarAvatarGetAvatarDarkHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [AvatarAvatarGetAvatarDarkHeaders, _$AvatarAvatarGetAvatarDarkHeaders]; + @override + final String wireName = 'AvatarAvatarGetAvatarDarkHeaders'; + + @override + Iterable serialize(Serializers serializers, AvatarAvatarGetAvatarDarkHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNcIscustomavatar; + if (value != null) { + result + ..add('x-nc-iscustomavatar') + ..add(serializers.serialize(value, specifiedType: const FullType(ContentString, [FullType(int)]))); + } + return result; + } + + @override + AvatarAvatarGetAvatarDarkHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = AvatarAvatarGetAvatarDarkHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nc-iscustomavatar': + result.xNcIscustomavatar.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(int)]))! as ContentString); + break; + } + } + + return result.build(); + } +} + +class _$AvatarAvatarGetAvatarHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [AvatarAvatarGetAvatarHeaders, _$AvatarAvatarGetAvatarHeaders]; + @override + final String wireName = 'AvatarAvatarGetAvatarHeaders'; + + @override + Iterable serialize(Serializers serializers, AvatarAvatarGetAvatarHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNcIscustomavatar; + if (value != null) { + result + ..add('x-nc-iscustomavatar') + ..add(serializers.serialize(value, specifiedType: const FullType(ContentString, [FullType(int)]))); + } + return result; + } + + @override + AvatarAvatarGetAvatarHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = AvatarAvatarGetAvatarHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nc-iscustomavatar': + result.xNcIscustomavatar.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(int)]))! as ContentString); + break; + } + } + + return result.build(); + } +} + class _$LoginFlowV2CredentialsSerializer implements StructuredSerializer { @override final Iterable types = const [LoginFlowV2Credentials, _$LoginFlowV2Credentials]; @@ -2603,6 +2692,48 @@ class _$NavigationGetSettingsNavigationResponseApplicationJsonSerializer } } +class _$OcmOcmDiscoveryHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [OcmOcmDiscoveryHeaders, _$OcmOcmDiscoveryHeaders]; + @override + final String wireName = 'OcmOcmDiscoveryHeaders'; + + @override + Iterable serialize(Serializers serializers, OcmOcmDiscoveryHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudOcmProviders; + if (value != null) { + result + ..add('x-nextcloud-ocm-providers') + ..add(serializers.serialize(value, specifiedType: const FullType(ContentString, [FullType(bool)]))); + } + return result; + } + + @override + OcmOcmDiscoveryHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = OcmOcmDiscoveryHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-ocm-providers': + result.xNextcloudOcmProviders.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(bool)]))! as ContentString); + break; + } + } + + return result.build(); + } +} + class _$OcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsSerializer implements StructuredSerializer { @override @@ -11232,13 +11363,13 @@ class AutoCompleteGetResponseApplicationJsonBuilder abstract mixin class $AvatarAvatarGetAvatarDarkHeadersInterfaceBuilder { void replace($AvatarAvatarGetAvatarDarkHeadersInterface other); void update(void Function($AvatarAvatarGetAvatarDarkHeadersInterfaceBuilder) updates); - int? get xNcIscustomavatar; - set xNcIscustomavatar(int? xNcIscustomavatar); + ContentStringBuilder get xNcIscustomavatar; + set xNcIscustomavatar(ContentStringBuilder? xNcIscustomavatar); } class _$AvatarAvatarGetAvatarDarkHeaders extends AvatarAvatarGetAvatarDarkHeaders { @override - final int? xNcIscustomavatar; + final ContentString? xNcIscustomavatar; factory _$AvatarAvatarGetAvatarDarkHeaders([void Function(AvatarAvatarGetAvatarDarkHeadersBuilder)? updates]) => (AvatarAvatarGetAvatarDarkHeadersBuilder()..update(updates))._build(); @@ -11280,16 +11411,17 @@ class AvatarAvatarGetAvatarDarkHeadersBuilder $AvatarAvatarGetAvatarDarkHeadersInterfaceBuilder { _$AvatarAvatarGetAvatarDarkHeaders? _$v; - int? _xNcIscustomavatar; - int? get xNcIscustomavatar => _$this._xNcIscustomavatar; - set xNcIscustomavatar(covariant int? xNcIscustomavatar) => _$this._xNcIscustomavatar = xNcIscustomavatar; + ContentStringBuilder? _xNcIscustomavatar; + ContentStringBuilder get xNcIscustomavatar => _$this._xNcIscustomavatar ??= ContentStringBuilder(); + set xNcIscustomavatar(covariant ContentStringBuilder? xNcIscustomavatar) => + _$this._xNcIscustomavatar = xNcIscustomavatar; AvatarAvatarGetAvatarDarkHeadersBuilder(); AvatarAvatarGetAvatarDarkHeadersBuilder get _$this { final $v = _$v; if ($v != null) { - _xNcIscustomavatar = $v.xNcIscustomavatar; + _xNcIscustomavatar = $v.xNcIscustomavatar?.toBuilder(); _$v = null; } return this; @@ -11310,7 +11442,19 @@ class AvatarAvatarGetAvatarDarkHeadersBuilder AvatarAvatarGetAvatarDarkHeaders build() => _build(); _$AvatarAvatarGetAvatarDarkHeaders _build() { - final _$result = _$v ?? _$AvatarAvatarGetAvatarDarkHeaders._(xNcIscustomavatar: xNcIscustomavatar); + _$AvatarAvatarGetAvatarDarkHeaders _$result; + try { + _$result = _$v ?? _$AvatarAvatarGetAvatarDarkHeaders._(xNcIscustomavatar: _xNcIscustomavatar?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'xNcIscustomavatar'; + _xNcIscustomavatar?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'AvatarAvatarGetAvatarDarkHeaders', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } @@ -11319,13 +11463,13 @@ class AvatarAvatarGetAvatarDarkHeadersBuilder abstract mixin class $AvatarAvatarGetAvatarHeadersInterfaceBuilder { void replace($AvatarAvatarGetAvatarHeadersInterface other); void update(void Function($AvatarAvatarGetAvatarHeadersInterfaceBuilder) updates); - int? get xNcIscustomavatar; - set xNcIscustomavatar(int? xNcIscustomavatar); + ContentStringBuilder get xNcIscustomavatar; + set xNcIscustomavatar(ContentStringBuilder? xNcIscustomavatar); } class _$AvatarAvatarGetAvatarHeaders extends AvatarAvatarGetAvatarHeaders { @override - final int? xNcIscustomavatar; + final ContentString? xNcIscustomavatar; factory _$AvatarAvatarGetAvatarHeaders([void Function(AvatarAvatarGetAvatarHeadersBuilder)? updates]) => (AvatarAvatarGetAvatarHeadersBuilder()..update(updates))._build(); @@ -11366,16 +11510,17 @@ class AvatarAvatarGetAvatarHeadersBuilder $AvatarAvatarGetAvatarHeadersInterfaceBuilder { _$AvatarAvatarGetAvatarHeaders? _$v; - int? _xNcIscustomavatar; - int? get xNcIscustomavatar => _$this._xNcIscustomavatar; - set xNcIscustomavatar(covariant int? xNcIscustomavatar) => _$this._xNcIscustomavatar = xNcIscustomavatar; + ContentStringBuilder? _xNcIscustomavatar; + ContentStringBuilder get xNcIscustomavatar => _$this._xNcIscustomavatar ??= ContentStringBuilder(); + set xNcIscustomavatar(covariant ContentStringBuilder? xNcIscustomavatar) => + _$this._xNcIscustomavatar = xNcIscustomavatar; AvatarAvatarGetAvatarHeadersBuilder(); AvatarAvatarGetAvatarHeadersBuilder get _$this { final $v = _$v; if ($v != null) { - _xNcIscustomavatar = $v.xNcIscustomavatar; + _xNcIscustomavatar = $v.xNcIscustomavatar?.toBuilder(); _$v = null; } return this; @@ -11396,7 +11541,19 @@ class AvatarAvatarGetAvatarHeadersBuilder AvatarAvatarGetAvatarHeaders build() => _build(); _$AvatarAvatarGetAvatarHeaders _build() { - final _$result = _$v ?? _$AvatarAvatarGetAvatarHeaders._(xNcIscustomavatar: xNcIscustomavatar); + _$AvatarAvatarGetAvatarHeaders _$result; + try { + _$result = _$v ?? _$AvatarAvatarGetAvatarHeaders._(xNcIscustomavatar: _xNcIscustomavatar?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'xNcIscustomavatar'; + _xNcIscustomavatar?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'AvatarAvatarGetAvatarHeaders', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } @@ -15140,13 +15297,13 @@ class NavigationGetSettingsNavigationResponseApplicationJsonBuilder abstract mixin class $OcmOcmDiscoveryHeadersInterfaceBuilder { void replace($OcmOcmDiscoveryHeadersInterface other); void update(void Function($OcmOcmDiscoveryHeadersInterfaceBuilder) updates); - bool? get xNextcloudOcmProviders; - set xNextcloudOcmProviders(bool? xNextcloudOcmProviders); + ContentStringBuilder get xNextcloudOcmProviders; + set xNextcloudOcmProviders(ContentStringBuilder? xNextcloudOcmProviders); } class _$OcmOcmDiscoveryHeaders extends OcmOcmDiscoveryHeaders { @override - final bool? xNextcloudOcmProviders; + final ContentString? xNextcloudOcmProviders; factory _$OcmOcmDiscoveryHeaders([void Function(OcmOcmDiscoveryHeadersBuilder)? updates]) => (OcmOcmDiscoveryHeadersBuilder()..update(updates))._build(); @@ -15186,9 +15343,10 @@ class OcmOcmDiscoveryHeadersBuilder implements Builder, $OcmOcmDiscoveryHeadersInterfaceBuilder { _$OcmOcmDiscoveryHeaders? _$v; - bool? _xNextcloudOcmProviders; - bool? get xNextcloudOcmProviders => _$this._xNextcloudOcmProviders; - set xNextcloudOcmProviders(covariant bool? xNextcloudOcmProviders) => + ContentStringBuilder? _xNextcloudOcmProviders; + ContentStringBuilder get xNextcloudOcmProviders => + _$this._xNextcloudOcmProviders ??= ContentStringBuilder(); + set xNextcloudOcmProviders(covariant ContentStringBuilder? xNextcloudOcmProviders) => _$this._xNextcloudOcmProviders = xNextcloudOcmProviders; OcmOcmDiscoveryHeadersBuilder(); @@ -15196,7 +15354,7 @@ class OcmOcmDiscoveryHeadersBuilder OcmOcmDiscoveryHeadersBuilder get _$this { final $v = _$v; if ($v != null) { - _xNextcloudOcmProviders = $v.xNextcloudOcmProviders; + _xNextcloudOcmProviders = $v.xNextcloudOcmProviders?.toBuilder(); _$v = null; } return this; @@ -15217,7 +15375,19 @@ class OcmOcmDiscoveryHeadersBuilder OcmOcmDiscoveryHeaders build() => _build(); _$OcmOcmDiscoveryHeaders _build() { - final _$result = _$v ?? _$OcmOcmDiscoveryHeaders._(xNextcloudOcmProviders: xNextcloudOcmProviders); + _$OcmOcmDiscoveryHeaders _$result; + try { + _$result = _$v ?? _$OcmOcmDiscoveryHeaders._(xNextcloudOcmProviders: _xNextcloudOcmProviders?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'xNextcloudOcmProviders'; + _xNextcloudOcmProviders?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'OcmOcmDiscoveryHeaders', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } diff --git a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart index 16644a8a516..b1f78b40609 100644 --- a/packages/nextcloud/lib/src/api/files_sharing.openapi.dart +++ b/packages/nextcloud/lib/src/api/files_sharing.openapi.dart @@ -3868,48 +3868,7 @@ abstract class ShareesapiShareesapiSearchHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - _$ShareesapiShareesapiSearchHeadersSerializer(); -} - -class _$ShareesapiShareesapiSearchHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ShareesapiShareesapiSearchHeaders, _$ShareesapiShareesapiSearchHeaders]; - - @override - final String wireName = 'ShareesapiShareesapiSearchHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ShareesapiShareesapiSearchHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ShareesapiShareesapiSearchHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ShareesapiShareesapiSearchHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'link': - result.link = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$shareesapiShareesapiSearchHeadersSerializer; } @BuiltValue(instantiable: false) diff --git a/packages/nextcloud/lib/src/api/files_sharing.openapi.g.dart b/packages/nextcloud/lib/src/api/files_sharing.openapi.g.dart index 92428dbcc67..c5db3480036 100644 --- a/packages/nextcloud/lib/src/api/files_sharing.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/files_sharing.openapi.g.dart @@ -100,6 +100,8 @@ Serializer _$shareapiAcceptShare _$ShareapiAcceptShareResponseApplicationJson_OcsSerializer(); Serializer _$shareapiAcceptShareResponseApplicationJsonSerializer = _$ShareapiAcceptShareResponseApplicationJsonSerializer(); +Serializer _$shareesapiShareesapiSearchHeadersSerializer = + _$ShareesapiShareesapiSearchHeadersSerializer(); Serializer _$shareeSerializer = _$ShareeSerializer(); Serializer _$shareeValueSerializer = _$ShareeValueSerializer(); Serializer _$shareeCircle1ValueSerializer = _$ShareeCircle_1_ValueSerializer(); @@ -2464,6 +2466,47 @@ class _$ShareapiAcceptShareResponseApplicationJsonSerializer } } +class _$ShareesapiShareesapiSearchHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [ShareesapiShareesapiSearchHeaders, _$ShareesapiShareesapiSearchHeaders]; + @override + final String wireName = 'ShareesapiShareesapiSearchHeaders'; + + @override + Iterable serialize(Serializers serializers, ShareesapiShareesapiSearchHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.link; + if (value != null) { + result + ..add('link') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ShareesapiShareesapiSearchHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ShareesapiShareesapiSearchHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'link': + result.link = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ShareeSerializer implements StructuredSerializer { @override final Iterable types = const [Sharee, _$Sharee]; diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.dart b/packages/nextcloud/lib/src/api/notifications.openapi.dart index 8993fee76d1..dac207a8a06 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.dart +++ b/packages/nextcloud/lib/src/api/notifications.openapi.dart @@ -1287,52 +1287,8 @@ abstract class EndpointEndpointListNotificationsHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) static Serializer get serializer => - _$EndpointEndpointListNotificationsHeadersSerializer(); -} - -class _$EndpointEndpointListNotificationsHeadersSerializer - implements StructuredSerializer { - @override - final Iterable types = const [ - EndpointEndpointListNotificationsHeaders, - _$EndpointEndpointListNotificationsHeaders, - ]; - - @override - final String wireName = 'EndpointEndpointListNotificationsHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final EndpointEndpointListNotificationsHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - EndpointEndpointListNotificationsHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = EndpointEndpointListNotificationsHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-user-status': - result.xNextcloudUserStatus = value; - } - } - - return result.build(); - } + _$endpointEndpointListNotificationsHeadersSerializer; } @BuiltValue(instantiable: false) diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.g.dart b/packages/nextcloud/lib/src/api/notifications.openapi.g.dart index 3b264cea3dc..222212af0fd 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/notifications.openapi.g.dart @@ -212,6 +212,8 @@ Serializer _$apiGenerateNotifica _$ApiGenerateNotificationResponseApplicationJsonSerializer(); Serializer _$endpointListNotificationsApiVersionSerializer = _$EndpointListNotificationsApiVersionSerializer(); +Serializer _$endpointEndpointListNotificationsHeadersSerializer = + _$EndpointEndpointListNotificationsHeadersSerializer(); Serializer _$notificationActionSerializer = _$NotificationActionSerializer(); Serializer _$notificationSerializer = _$NotificationSerializer(); Serializer @@ -475,6 +477,52 @@ class _$EndpointListNotificationsApiVersionSerializer EndpointListNotificationsApiVersion.valueOf(serialized as String); } +class _$EndpointEndpointListNotificationsHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + EndpointEndpointListNotificationsHeaders, + _$EndpointEndpointListNotificationsHeaders + ]; + @override + final String wireName = 'EndpointEndpointListNotificationsHeaders'; + + @override + Iterable serialize(Serializers serializers, EndpointEndpointListNotificationsHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudUserStatus; + if (value != null) { + result + ..add('x-nextcloud-user-status') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + EndpointEndpointListNotificationsHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = EndpointEndpointListNotificationsHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-user-status': + result.xNextcloudUserStatus = + serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$NotificationActionSerializer implements StructuredSerializer { @override final Iterable types = const [NotificationAction, _$NotificationAction]; diff --git a/packages/nextcloud/lib/src/api/settings.openapi.dart b/packages/nextcloud/lib/src/api/settings.openapi.dart index f6a245d3944..08c9959aaf3 100644 --- a/packages/nextcloud/lib/src/api/settings.openapi.dart +++ b/packages/nextcloud/lib/src/api/settings.openapi.dart @@ -148,49 +148,8 @@ abstract class LogSettingsLogSettingsDownloadHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) static Serializer get serializer => - _$LogSettingsLogSettingsDownloadHeadersSerializer(); -} - -class _$LogSettingsLogSettingsDownloadHeadersSerializer - implements StructuredSerializer { - @override - final Iterable types = const [LogSettingsLogSettingsDownloadHeaders, _$LogSettingsLogSettingsDownloadHeaders]; - - @override - final String wireName = 'LogSettingsLogSettingsDownloadHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final LogSettingsLogSettingsDownloadHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - LogSettingsLogSettingsDownloadHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = LogSettingsLogSettingsDownloadHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'content-disposition': - result.contentDisposition = value; - } - } - - return result.build(); - } + _$logSettingsLogSettingsDownloadHeadersSerializer; } // coverage:ignore-start diff --git a/packages/nextcloud/lib/src/api/settings.openapi.g.dart b/packages/nextcloud/lib/src/api/settings.openapi.g.dart index 7044a4afc3d..899e9e4fd45 100644 --- a/packages/nextcloud/lib/src/api/settings.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/settings.openapi.g.dart @@ -6,6 +6,51 @@ part of 'settings.openapi.dart'; // BuiltValueGenerator // ************************************************************************** +Serializer _$logSettingsLogSettingsDownloadHeadersSerializer = + _$LogSettingsLogSettingsDownloadHeadersSerializer(); + +class _$LogSettingsLogSettingsDownloadHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [LogSettingsLogSettingsDownloadHeaders, _$LogSettingsLogSettingsDownloadHeaders]; + @override + final String wireName = 'LogSettingsLogSettingsDownloadHeaders'; + + @override + Iterable serialize(Serializers serializers, LogSettingsLogSettingsDownloadHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.contentDisposition; + if (value != null) { + result + ..add('content-disposition') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + LogSettingsLogSettingsDownloadHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = LogSettingsLogSettingsDownloadHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'content-disposition': + result.contentDisposition = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + abstract mixin class $LogSettingsLogSettingsDownloadHeadersInterfaceBuilder { void replace($LogSettingsLogSettingsDownloadHeadersInterface other); void update(void Function($LogSettingsLogSettingsDownloadHeadersInterfaceBuilder) updates); diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.dart b/packages/nextcloud/lib/src/api/spreed.openapi.dart index e9ff065131e..8890439ad61 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.dart @@ -2,7 +2,6 @@ // ignore_for_file: discarded_futures // ignore_for_file: public_member_api_docs // ignore_for_file: unreachable_switch_case -import 'dart:convert'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; @@ -15207,49 +15206,7 @@ abstract class ChatChatReceiveMessagesHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatReceiveMessagesHeadersSerializer(); -} - -class _$ChatChatReceiveMessagesHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatReceiveMessagesHeaders, _$ChatChatReceiveMessagesHeaders]; - - @override - final String wireName = 'ChatChatReceiveMessagesHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatReceiveMessagesHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatReceiveMessagesHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatReceiveMessagesHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - case 'x-chat-last-given': - result.xChatLastGiven = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatReceiveMessagesHeadersSerializer; } @BuiltValue(instantiable: false) @@ -15382,47 +15339,7 @@ abstract class ChatChatSendMessageHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatSendMessageHeadersSerializer(); -} - -class _$ChatChatSendMessageHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatSendMessageHeaders, _$ChatChatSendMessageHeaders]; - - @override - final String wireName = 'ChatChatSendMessageHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatSendMessageHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatSendMessageHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatSendMessageHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatSendMessageHeadersSerializer; } @BuiltValue(instantiable: false) @@ -15526,47 +15443,7 @@ abstract class ChatChatClearHistoryHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatClearHistoryHeadersSerializer(); -} - -class _$ChatChatClearHistoryHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatClearHistoryHeaders, _$ChatChatClearHistoryHeaders]; - - @override - final String wireName = 'ChatChatClearHistoryHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatClearHistoryHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatClearHistoryHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatClearHistoryHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatClearHistoryHeadersSerializer; } @BuiltValue(instantiable: false) @@ -15670,47 +15547,7 @@ abstract class ChatChatDeleteMessageHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatDeleteMessageHeadersSerializer(); -} - -class _$ChatChatDeleteMessageHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatDeleteMessageHeaders, _$ChatChatDeleteMessageHeaders]; - - @override - final String wireName = 'ChatChatDeleteMessageHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatDeleteMessageHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatDeleteMessageHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatDeleteMessageHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatDeleteMessageHeadersSerializer; } @BuiltValue(instantiable: false) @@ -15816,49 +15653,7 @@ abstract class ChatChatGetMessageContextHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatGetMessageContextHeadersSerializer(); -} - -class _$ChatChatGetMessageContextHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatGetMessageContextHeaders, _$ChatChatGetMessageContextHeaders]; - - @override - final String wireName = 'ChatChatGetMessageContextHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatGetMessageContextHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatGetMessageContextHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatGetMessageContextHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - case 'x-chat-last-given': - result.xChatLastGiven = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatGetMessageContextHeadersSerializer; } @BuiltValue(instantiable: false) @@ -16214,47 +16009,7 @@ abstract class ChatChatSetReadMarkerHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatSetReadMarkerHeadersSerializer(); -} - -class _$ChatChatSetReadMarkerHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatSetReadMarkerHeaders, _$ChatChatSetReadMarkerHeaders]; - - @override - final String wireName = 'ChatChatSetReadMarkerHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatSetReadMarkerHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatSetReadMarkerHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatSetReadMarkerHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatSetReadMarkerHeadersSerializer; } @BuiltValue(instantiable: false) @@ -16356,47 +16111,7 @@ abstract class ChatChatMarkUnreadHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatMarkUnreadHeadersSerializer(); -} - -class _$ChatChatMarkUnreadHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatMarkUnreadHeaders, _$ChatChatMarkUnreadHeaders]; - - @override - final String wireName = 'ChatChatMarkUnreadHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatMarkUnreadHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatMarkUnreadHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatMarkUnreadHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatMarkUnreadHeadersSerializer; } @BuiltValue(instantiable: false) @@ -16608,49 +16323,8 @@ abstract class ChatChatGetObjectsSharedInRoomHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) static Serializer get serializer => - _$ChatChatGetObjectsSharedInRoomHeadersSerializer(); -} - -class _$ChatChatGetObjectsSharedInRoomHeadersSerializer - implements StructuredSerializer { - @override - final Iterable types = const [ChatChatGetObjectsSharedInRoomHeaders, _$ChatChatGetObjectsSharedInRoomHeaders]; - - @override - final String wireName = 'ChatChatGetObjectsSharedInRoomHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatGetObjectsSharedInRoomHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatGetObjectsSharedInRoomHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatGetObjectsSharedInRoomHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-given': - result.xChatLastGiven = value; - } - } - - return result.build(); - } + _$chatChatGetObjectsSharedInRoomHeadersSerializer; } @BuiltValue(instantiable: false) @@ -16756,47 +16430,7 @@ abstract class ChatChatShareObjectToChatHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ChatChatShareObjectToChatHeadersSerializer(); -} - -class _$ChatChatShareObjectToChatHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [ChatChatShareObjectToChatHeaders, _$ChatChatShareObjectToChatHeaders]; - - @override - final String wireName = 'ChatChatShareObjectToChatHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final ChatChatShareObjectToChatHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - ChatChatShareObjectToChatHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = ChatChatShareObjectToChatHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-chat-last-common-read': - result.xChatLastCommonRead = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$chatChatShareObjectToChatHeadersSerializer; } @BuiltValue(instantiable: false) @@ -19506,49 +19140,7 @@ abstract class RoomRoomGetRoomsHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$RoomRoomGetRoomsHeadersSerializer(); -} - -class _$RoomRoomGetRoomsHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [RoomRoomGetRoomsHeaders, _$RoomRoomGetRoomsHeaders]; - - @override - final String wireName = 'RoomRoomGetRoomsHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final RoomRoomGetRoomsHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - RoomRoomGetRoomsHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = RoomRoomGetRoomsHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-talk-hash': - result.xNextcloudTalkHash = value; - case 'x-nextcloud-talk-modified-before': - result.xNextcloudTalkModifiedBefore = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$roomRoomGetRoomsHeadersSerializer; } @BuiltValue(instantiable: false) @@ -19805,52 +19397,8 @@ abstract class RoomRoomGetNoteToSelfConversationHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) static Serializer get serializer => - _$RoomRoomGetNoteToSelfConversationHeadersSerializer(); -} - -class _$RoomRoomGetNoteToSelfConversationHeadersSerializer - implements StructuredSerializer { - @override - final Iterable types = const [ - RoomRoomGetNoteToSelfConversationHeaders, - _$RoomRoomGetNoteToSelfConversationHeaders, - ]; - - @override - final String wireName = 'RoomRoomGetNoteToSelfConversationHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final RoomRoomGetNoteToSelfConversationHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - RoomRoomGetNoteToSelfConversationHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = RoomRoomGetNoteToSelfConversationHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-talk-hash': - result.xNextcloudTalkHash = value; - } - } - - return result.build(); - } + _$roomRoomGetNoteToSelfConversationHeadersSerializer; } @BuiltValue(instantiable: false) @@ -19956,47 +19504,7 @@ abstract class RoomRoomGetSingleRoomHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$RoomRoomGetSingleRoomHeadersSerializer(); -} - -class _$RoomRoomGetSingleRoomHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [RoomRoomGetSingleRoomHeaders, _$RoomRoomGetSingleRoomHeaders]; - - @override - final String wireName = 'RoomRoomGetSingleRoomHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final RoomRoomGetSingleRoomHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - RoomRoomGetSingleRoomHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = RoomRoomGetSingleRoomHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-talk-hash': - result.xNextcloudTalkHash = value; - } - } - - return result.build(); - } + static Serializer get serializer => _$roomRoomGetSingleRoomHeadersSerializer; } @BuiltValue(instantiable: false) @@ -20827,7 +20335,7 @@ class RoomGetParticipantsApiVersion extends EnumClass { @BuiltValue(instantiable: false) abstract interface class $RoomRoomGetParticipantsHeadersInterface { @BuiltValueField(wireName: 'x-nextcloud-has-user-statuses') - bool? get xNextcloudHasUserStatuses; + ContentString? get xNextcloudHasUserStatuses; } abstract class RoomRoomGetParticipantsHeaders @@ -20850,50 +20358,7 @@ abstract class RoomRoomGetParticipantsHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$RoomRoomGetParticipantsHeadersSerializer(); -} - -class _$RoomRoomGetParticipantsHeadersSerializer implements StructuredSerializer { - @override - final Iterable types = const [RoomRoomGetParticipantsHeaders, _$RoomRoomGetParticipantsHeaders]; - - @override - final String wireName = 'RoomRoomGetParticipantsHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final RoomRoomGetParticipantsHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - RoomRoomGetParticipantsHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = RoomRoomGetParticipantsHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-has-user-statuses': - result.xNextcloudHasUserStatuses = _jsonSerializers.deserialize( - json.decode(value), - specifiedType: const FullType(bool), - )! as bool; - } - } - - return result.build(); - } + static Serializer get serializer => _$roomRoomGetParticipantsHeadersSerializer; } @BuiltValue(instantiable: false) @@ -21221,7 +20686,7 @@ class RoomGetBreakoutRoomParticipantsApiVersion extends EnumClass { @BuiltValue(instantiable: false) abstract interface class $RoomRoomGetBreakoutRoomParticipantsHeadersInterface { @BuiltValueField(wireName: 'x-nextcloud-has-user-statuses') - bool? get xNextcloudHasUserStatuses; + ContentString? get xNextcloudHasUserStatuses; } abstract class RoomRoomGetBreakoutRoomParticipantsHeaders @@ -21245,55 +20710,8 @@ abstract class RoomRoomGetBreakoutRoomParticipantsHeaders Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - @BuiltValueSerializer(custom: true) static Serializer get serializer => - _$RoomRoomGetBreakoutRoomParticipantsHeadersSerializer(); -} - -class _$RoomRoomGetBreakoutRoomParticipantsHeadersSerializer - implements StructuredSerializer { - @override - final Iterable types = const [ - RoomRoomGetBreakoutRoomParticipantsHeaders, - _$RoomRoomGetBreakoutRoomParticipantsHeaders, - ]; - - @override - final String wireName = 'RoomRoomGetBreakoutRoomParticipantsHeaders'; - - @override - Iterable serialize( - final Serializers serializers, - final RoomRoomGetBreakoutRoomParticipantsHeaders object, { - final FullType specifiedType = FullType.unspecified, - }) { - throw UnimplementedError(); - } - - @override - RoomRoomGetBreakoutRoomParticipantsHeaders deserialize( - final Serializers serializers, - final Iterable serialized, { - final FullType specifiedType = FullType.unspecified, - }) { - final result = RoomRoomGetBreakoutRoomParticipantsHeadersBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final value = iterator.current! as String; - switch (key) { - case 'x-nextcloud-has-user-statuses': - result.xNextcloudHasUserStatuses = _jsonSerializers.deserialize( - json.decode(value), - specifiedType: const FullType(bool), - )! as bool; - } - } - - return result.build(); - } + _$roomRoomGetBreakoutRoomParticipantsHeadersSerializer; } @BuiltValue(instantiable: false) @@ -25209,6 +24627,7 @@ final Serializers _serializers = (Serializers().toBuilder() ..add(RoomGetParticipantsApiVersion.serializer) ..addBuilderFactory(const FullType(RoomRoomGetParticipantsHeaders), RoomRoomGetParticipantsHeadersBuilder.new) ..add(RoomRoomGetParticipantsHeaders.serializer) + ..addBuilderFactory(const FullType(ContentString, [FullType(bool)]), ContentStringBuilder.new) ..addBuilderFactory( const FullType(RoomGetParticipantsResponseApplicationJson), RoomGetParticipantsResponseApplicationJsonBuilder.new, diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.g.dart b/packages/nextcloud/lib/src/api/spreed.openapi.g.dart index 21906bc5335..042a32c8459 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.g.dart @@ -2022,30 +2022,40 @@ Serializer _$CertificateGetCertificateExpirationResponseApplicationJsonSerializer(); Serializer _$chatReceiveMessagesApiVersionSerializer = _$ChatReceiveMessagesApiVersionSerializer(); +Serializer _$chatChatReceiveMessagesHeadersSerializer = + _$ChatChatReceiveMessagesHeadersSerializer(); Serializer _$chatMessageWithParentSerializer = _$ChatMessageWithParentSerializer(); Serializer _$chatReceiveMessagesResponseApplicationJsonOcsSerializer = _$ChatReceiveMessagesResponseApplicationJson_OcsSerializer(); Serializer _$chatReceiveMessagesResponseApplicationJsonSerializer = _$ChatReceiveMessagesResponseApplicationJsonSerializer(); Serializer _$chatSendMessageApiVersionSerializer = _$ChatSendMessageApiVersionSerializer(); +Serializer _$chatChatSendMessageHeadersSerializer = + _$ChatChatSendMessageHeadersSerializer(); Serializer _$chatSendMessageResponseApplicationJsonOcsSerializer = _$ChatSendMessageResponseApplicationJson_OcsSerializer(); Serializer _$chatSendMessageResponseApplicationJsonSerializer = _$ChatSendMessageResponseApplicationJsonSerializer(); Serializer _$chatClearHistoryApiVersionSerializer = _$ChatClearHistoryApiVersionSerializer(); +Serializer _$chatChatClearHistoryHeadersSerializer = + _$ChatChatClearHistoryHeadersSerializer(); Serializer _$chatClearHistoryResponseApplicationJsonOcsSerializer = _$ChatClearHistoryResponseApplicationJson_OcsSerializer(); Serializer _$chatClearHistoryResponseApplicationJsonSerializer = _$ChatClearHistoryResponseApplicationJsonSerializer(); Serializer _$chatDeleteMessageApiVersionSerializer = _$ChatDeleteMessageApiVersionSerializer(); +Serializer _$chatChatDeleteMessageHeadersSerializer = + _$ChatChatDeleteMessageHeadersSerializer(); Serializer _$chatDeleteMessageResponseApplicationJsonOcsSerializer = _$ChatDeleteMessageResponseApplicationJson_OcsSerializer(); Serializer _$chatDeleteMessageResponseApplicationJsonSerializer = _$ChatDeleteMessageResponseApplicationJsonSerializer(); Serializer _$chatGetMessageContextApiVersionSerializer = _$ChatGetMessageContextApiVersionSerializer(); +Serializer _$chatChatGetMessageContextHeadersSerializer = + _$ChatChatGetMessageContextHeadersSerializer(); Serializer _$chatGetMessageContextResponseApplicationJsonOcsSerializer = _$ChatGetMessageContextResponseApplicationJson_OcsSerializer(); @@ -2070,11 +2080,14 @@ Serializer _$chatDeleteReminderRespon _$ChatDeleteReminderResponseApplicationJsonSerializer(); Serializer _$chatSetReadMarkerApiVersionSerializer = _$ChatSetReadMarkerApiVersionSerializer(); +Serializer _$chatChatSetReadMarkerHeadersSerializer = + _$ChatChatSetReadMarkerHeadersSerializer(); Serializer _$chatSetReadMarkerResponseApplicationJsonOcsSerializer = _$ChatSetReadMarkerResponseApplicationJson_OcsSerializer(); Serializer _$chatSetReadMarkerResponseApplicationJsonSerializer = _$ChatSetReadMarkerResponseApplicationJsonSerializer(); Serializer _$chatMarkUnreadApiVersionSerializer = _$ChatMarkUnreadApiVersionSerializer(); +Serializer _$chatChatMarkUnreadHeadersSerializer = _$ChatChatMarkUnreadHeadersSerializer(); Serializer _$chatMarkUnreadResponseApplicationJsonOcsSerializer = _$ChatMarkUnreadResponseApplicationJson_OcsSerializer(); Serializer _$chatMarkUnreadResponseApplicationJsonSerializer = @@ -2087,6 +2100,8 @@ Serializer _$chatMentionsResponseApplicatio _$ChatMentionsResponseApplicationJsonSerializer(); Serializer _$chatGetObjectsSharedInRoomApiVersionSerializer = _$ChatGetObjectsSharedInRoomApiVersionSerializer(); +Serializer _$chatChatGetObjectsSharedInRoomHeadersSerializer = + _$ChatChatGetObjectsSharedInRoomHeadersSerializer(); Serializer _$chatGetObjectsSharedInRoomResponseApplicationJsonOcsSerializer = _$ChatGetObjectsSharedInRoomResponseApplicationJson_OcsSerializer(); @@ -2095,6 +2110,8 @@ Serializer _$ChatGetObjectsSharedInRoomResponseApplicationJsonSerializer(); Serializer _$chatShareObjectToChatApiVersionSerializer = _$ChatShareObjectToChatApiVersionSerializer(); +Serializer _$chatChatShareObjectToChatHeadersSerializer = + _$ChatChatShareObjectToChatHeadersSerializer(); Serializer _$chatShareObjectToChatResponseApplicationJsonOcsSerializer = _$ChatShareObjectToChatResponseApplicationJson_OcsSerializer(); @@ -2320,6 +2337,7 @@ Serializer _$recordingShareToCh Serializer _$recordingShareToChatResponseApplicationJsonSerializer = _$RecordingShareToChatResponseApplicationJsonSerializer(); Serializer _$roomGetRoomsApiVersionSerializer = _$RoomGetRoomsApiVersionSerializer(); +Serializer _$roomRoomGetRoomsHeadersSerializer = _$RoomRoomGetRoomsHeadersSerializer(); Serializer _$roomGetRoomsResponseApplicationJsonOcsSerializer = _$RoomGetRoomsResponseApplicationJson_OcsSerializer(); Serializer _$roomGetRoomsResponseApplicationJsonSerializer = @@ -2337,6 +2355,8 @@ Serializer _$roomGetListedRoomsRespon _$RoomGetListedRoomsResponseApplicationJsonSerializer(); Serializer _$roomGetNoteToSelfConversationApiVersionSerializer = _$RoomGetNoteToSelfConversationApiVersionSerializer(); +Serializer _$roomRoomGetNoteToSelfConversationHeadersSerializer = + _$RoomRoomGetNoteToSelfConversationHeadersSerializer(); Serializer _$roomGetNoteToSelfConversationResponseApplicationJsonOcsSerializer = _$RoomGetNoteToSelfConversationResponseApplicationJson_OcsSerializer(); @@ -2345,6 +2365,8 @@ Serializer _$RoomGetNoteToSelfConversationResponseApplicationJsonSerializer(); Serializer _$roomGetSingleRoomApiVersionSerializer = _$RoomGetSingleRoomApiVersionSerializer(); +Serializer _$roomRoomGetSingleRoomHeadersSerializer = + _$RoomRoomGetSingleRoomHeadersSerializer(); Serializer _$roomGetSingleRoomResponseApplicationJsonOcsSerializer = _$RoomGetSingleRoomResponseApplicationJson_OcsSerializer(); Serializer _$roomGetSingleRoomResponseApplicationJsonSerializer = @@ -2404,6 +2426,8 @@ Serializer _$roomSetPermissionsRespon _$RoomSetPermissionsResponseApplicationJsonSerializer(); Serializer _$roomGetParticipantsApiVersionSerializer = _$RoomGetParticipantsApiVersionSerializer(); +Serializer _$roomRoomGetParticipantsHeadersSerializer = + _$RoomRoomGetParticipantsHeadersSerializer(); Serializer _$participantSerializer = _$ParticipantSerializer(); Serializer _$roomGetParticipantsResponseApplicationJsonOcsSerializer = _$RoomGetParticipantsResponseApplicationJson_OcsSerializer(); @@ -2422,6 +2446,8 @@ Serializer _$RoomAddParticipantToRoomResponseApplicationJsonSerializer(); Serializer _$roomGetBreakoutRoomParticipantsApiVersionSerializer = _$RoomGetBreakoutRoomParticipantsApiVersionSerializer(); +Serializer _$roomRoomGetBreakoutRoomParticipantsHeadersSerializer = + _$RoomRoomGetBreakoutRoomParticipantsHeadersSerializer(); Serializer _$roomGetBreakoutRoomParticipantsResponseApplicationJsonOcsSerializer = _$RoomGetBreakoutRoomParticipantsResponseApplicationJson_OcsSerializer(); @@ -6363,6 +6389,56 @@ class _$ChatReceiveMessagesApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatReceiveMessagesHeaders, _$ChatChatReceiveMessagesHeaders]; + @override + final String wireName = 'ChatChatReceiveMessagesHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatReceiveMessagesHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.xChatLastGiven; + if (value != null) { + result + ..add('x-chat-last-given') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatReceiveMessagesHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatReceiveMessagesHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'x-chat-last-given': + result.xChatLastGiven = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatMessageWithParentSerializer implements StructuredSerializer { @override final Iterable types = const [ChatMessageWithParent, _$ChatMessageWithParent]; @@ -6613,6 +6689,47 @@ class _$ChatSendMessageApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatSendMessageHeaders, _$ChatChatSendMessageHeaders]; + @override + final String wireName = 'ChatChatSendMessageHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatSendMessageHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatSendMessageHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatSendMessageHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatSendMessageResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -6723,6 +6840,47 @@ class _$ChatClearHistoryApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatClearHistoryHeaders, _$ChatChatClearHistoryHeaders]; + @override + final String wireName = 'ChatChatClearHistoryHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatClearHistoryHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatClearHistoryHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatClearHistoryHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatClearHistoryResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -6832,6 +6990,47 @@ class _$ChatDeleteMessageApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatDeleteMessageHeaders, _$ChatChatDeleteMessageHeaders]; + @override + final String wireName = 'ChatChatDeleteMessageHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatDeleteMessageHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatDeleteMessageHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatDeleteMessageHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatDeleteMessageResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -6941,6 +7140,56 @@ class _$ChatGetMessageContextApiVersionSerializer implements PrimitiveSerializer ChatGetMessageContextApiVersion.valueOf(serialized as String); } +class _$ChatChatGetMessageContextHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [ChatChatGetMessageContextHeaders, _$ChatChatGetMessageContextHeaders]; + @override + final String wireName = 'ChatChatGetMessageContextHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatGetMessageContextHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.xChatLastGiven; + if (value != null) { + result + ..add('x-chat-last-given') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatGetMessageContextHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatGetMessageContextHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'x-chat-last-given': + result.xChatLastGiven = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatGetMessageContextResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -7424,6 +7673,47 @@ class _$ChatSetReadMarkerApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatSetReadMarkerHeaders, _$ChatChatSetReadMarkerHeaders]; + @override + final String wireName = 'ChatChatSetReadMarkerHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatSetReadMarkerHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatSetReadMarkerHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatSetReadMarkerHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatSetReadMarkerResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -7532,6 +7822,47 @@ class _$ChatMarkUnreadApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChatChatMarkUnreadHeaders, _$ChatChatMarkUnreadHeaders]; + @override + final String wireName = 'ChatChatMarkUnreadHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatMarkUnreadHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatMarkUnreadHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatMarkUnreadHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatMarkUnreadResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -7828,6 +8159,48 @@ class _$ChatGetObjectsSharedInRoomApiVersionSerializer ChatGetObjectsSharedInRoomApiVersion.valueOf(serialized as String); } +class _$ChatChatGetObjectsSharedInRoomHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ChatChatGetObjectsSharedInRoomHeaders, _$ChatChatGetObjectsSharedInRoomHeaders]; + @override + final String wireName = 'ChatChatGetObjectsSharedInRoomHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatGetObjectsSharedInRoomHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastGiven; + if (value != null) { + result + ..add('x-chat-last-given') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatGetObjectsSharedInRoomHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatGetObjectsSharedInRoomHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-given': + result.xChatLastGiven = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatGetObjectsSharedInRoomResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -7939,6 +8312,47 @@ class _$ChatShareObjectToChatApiVersionSerializer implements PrimitiveSerializer ChatShareObjectToChatApiVersion.valueOf(serialized as String); } +class _$ChatChatShareObjectToChatHeadersSerializer implements StructuredSerializer { + @override + final Iterable types = const [ChatChatShareObjectToChatHeaders, _$ChatChatShareObjectToChatHeaders]; + @override + final String wireName = 'ChatChatShareObjectToChatHeaders'; + + @override + Iterable serialize(Serializers serializers, ChatChatShareObjectToChatHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xChatLastCommonRead; + if (value != null) { + result + ..add('x-chat-last-common-read') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + ChatChatShareObjectToChatHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ChatChatShareObjectToChatHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-chat-last-common-read': + result.xChatLastCommonRead = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$ChatShareObjectToChatResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -11966,6 +12380,57 @@ class _$RoomGetRoomsApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [RoomRoomGetRoomsHeaders, _$RoomRoomGetRoomsHeaders]; + @override + final String wireName = 'RoomRoomGetRoomsHeaders'; + + @override + Iterable serialize(Serializers serializers, RoomRoomGetRoomsHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudTalkHash; + if (value != null) { + result + ..add('x-nextcloud-talk-hash') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.xNextcloudTalkModifiedBefore; + if (value != null) { + result + ..add('x-nextcloud-talk-modified-before') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + RoomRoomGetRoomsHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RoomRoomGetRoomsHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-talk-hash': + result.xNextcloudTalkHash = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'x-nextcloud-talk-modified-before': + result.xNextcloudTalkModifiedBefore = + serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$RoomGetRoomsResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -12287,6 +12752,51 @@ class _$RoomGetNoteToSelfConversationApiVersionSerializer RoomGetNoteToSelfConversationApiVersion.valueOf(serialized as String); } +class _$RoomRoomGetNoteToSelfConversationHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + RoomRoomGetNoteToSelfConversationHeaders, + _$RoomRoomGetNoteToSelfConversationHeaders + ]; + @override + final String wireName = 'RoomRoomGetNoteToSelfConversationHeaders'; + + @override + Iterable serialize(Serializers serializers, RoomRoomGetNoteToSelfConversationHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudTalkHash; + if (value != null) { + result + ..add('x-nextcloud-talk-hash') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + RoomRoomGetNoteToSelfConversationHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RoomRoomGetNoteToSelfConversationHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-talk-hash': + result.xNextcloudTalkHash = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$RoomGetNoteToSelfConversationResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -12398,6 +12908,47 @@ class _$RoomGetSingleRoomApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [RoomRoomGetSingleRoomHeaders, _$RoomRoomGetSingleRoomHeaders]; + @override + final String wireName = 'RoomRoomGetSingleRoomHeaders'; + + @override + Iterable serialize(Serializers serializers, RoomRoomGetSingleRoomHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudTalkHash; + if (value != null) { + result + ..add('x-nextcloud-talk-hash') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + RoomRoomGetSingleRoomHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RoomRoomGetSingleRoomHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-talk-hash': + result.xNextcloudTalkHash = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + class _$RoomGetSingleRoomResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -13566,6 +14117,48 @@ class _$RoomGetParticipantsApiVersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [RoomRoomGetParticipantsHeaders, _$RoomRoomGetParticipantsHeaders]; + @override + final String wireName = 'RoomRoomGetParticipantsHeaders'; + + @override + Iterable serialize(Serializers serializers, RoomRoomGetParticipantsHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudHasUserStatuses; + if (value != null) { + result + ..add('x-nextcloud-has-user-statuses') + ..add(serializers.serialize(value, specifiedType: const FullType(ContentString, [FullType(bool)]))); + } + return result; + } + + @override + RoomRoomGetParticipantsHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RoomRoomGetParticipantsHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-has-user-statuses': + result.xNextcloudHasUserStatuses.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(bool)]))! as ContentString); + break; + } + } + + return result.build(); + } +} + class _$ParticipantSerializer implements StructuredSerializer { @override final Iterable types = const [Participant, _$Participant]; @@ -13980,6 +14573,52 @@ class _$RoomGetBreakoutRoomParticipantsApiVersionSerializer RoomGetBreakoutRoomParticipantsApiVersion.valueOf(serialized as String); } +class _$RoomRoomGetBreakoutRoomParticipantsHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + RoomRoomGetBreakoutRoomParticipantsHeaders, + _$RoomRoomGetBreakoutRoomParticipantsHeaders + ]; + @override + final String wireName = 'RoomRoomGetBreakoutRoomParticipantsHeaders'; + + @override + Iterable serialize(Serializers serializers, RoomRoomGetBreakoutRoomParticipantsHeaders object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.xNextcloudHasUserStatuses; + if (value != null) { + result + ..add('x-nextcloud-has-user-statuses') + ..add(serializers.serialize(value, specifiedType: const FullType(ContentString, [FullType(bool)]))); + } + return result; + } + + @override + RoomRoomGetBreakoutRoomParticipantsHeaders deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RoomRoomGetBreakoutRoomParticipantsHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'x-nextcloud-has-user-statuses': + result.xNextcloudHasUserStatuses.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(bool)]))! as ContentString); + break; + } + } + + return result.build(); + } +} + class _$RoomGetBreakoutRoomParticipantsResponseApplicationJson_OcsSerializer implements StructuredSerializer { @override @@ -42481,13 +43120,13 @@ class RoomSetPermissionsResponseApplicationJsonBuilder abstract mixin class $RoomRoomGetParticipantsHeadersInterfaceBuilder { void replace($RoomRoomGetParticipantsHeadersInterface other); void update(void Function($RoomRoomGetParticipantsHeadersInterfaceBuilder) updates); - bool? get xNextcloudHasUserStatuses; - set xNextcloudHasUserStatuses(bool? xNextcloudHasUserStatuses); + ContentStringBuilder get xNextcloudHasUserStatuses; + set xNextcloudHasUserStatuses(ContentStringBuilder? xNextcloudHasUserStatuses); } class _$RoomRoomGetParticipantsHeaders extends RoomRoomGetParticipantsHeaders { @override - final bool? xNextcloudHasUserStatuses; + final ContentString? xNextcloudHasUserStatuses; factory _$RoomRoomGetParticipantsHeaders([void Function(RoomRoomGetParticipantsHeadersBuilder)? updates]) => (RoomRoomGetParticipantsHeadersBuilder()..update(updates))._build(); @@ -42529,9 +43168,10 @@ class RoomRoomGetParticipantsHeadersBuilder $RoomRoomGetParticipantsHeadersInterfaceBuilder { _$RoomRoomGetParticipantsHeaders? _$v; - bool? _xNextcloudHasUserStatuses; - bool? get xNextcloudHasUserStatuses => _$this._xNextcloudHasUserStatuses; - set xNextcloudHasUserStatuses(covariant bool? xNextcloudHasUserStatuses) => + ContentStringBuilder? _xNextcloudHasUserStatuses; + ContentStringBuilder get xNextcloudHasUserStatuses => + _$this._xNextcloudHasUserStatuses ??= ContentStringBuilder(); + set xNextcloudHasUserStatuses(covariant ContentStringBuilder? xNextcloudHasUserStatuses) => _$this._xNextcloudHasUserStatuses = xNextcloudHasUserStatuses; RoomRoomGetParticipantsHeadersBuilder(); @@ -42539,7 +43179,7 @@ class RoomRoomGetParticipantsHeadersBuilder RoomRoomGetParticipantsHeadersBuilder get _$this { final $v = _$v; if ($v != null) { - _xNextcloudHasUserStatuses = $v.xNextcloudHasUserStatuses; + _xNextcloudHasUserStatuses = $v.xNextcloudHasUserStatuses?.toBuilder(); _$v = null; } return this; @@ -42560,7 +43200,20 @@ class RoomRoomGetParticipantsHeadersBuilder RoomRoomGetParticipantsHeaders build() => _build(); _$RoomRoomGetParticipantsHeaders _build() { - final _$result = _$v ?? _$RoomRoomGetParticipantsHeaders._(xNextcloudHasUserStatuses: xNextcloudHasUserStatuses); + _$RoomRoomGetParticipantsHeaders _$result; + try { + _$result = + _$v ?? _$RoomRoomGetParticipantsHeaders._(xNextcloudHasUserStatuses: _xNextcloudHasUserStatuses?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'xNextcloudHasUserStatuses'; + _xNextcloudHasUserStatuses?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'RoomRoomGetParticipantsHeaders', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } @@ -43646,13 +44299,13 @@ class RoomAddParticipantToRoomResponseApplicationJsonBuilder abstract mixin class $RoomRoomGetBreakoutRoomParticipantsHeadersInterfaceBuilder { void replace($RoomRoomGetBreakoutRoomParticipantsHeadersInterface other); void update(void Function($RoomRoomGetBreakoutRoomParticipantsHeadersInterfaceBuilder) updates); - bool? get xNextcloudHasUserStatuses; - set xNextcloudHasUserStatuses(bool? xNextcloudHasUserStatuses); + ContentStringBuilder get xNextcloudHasUserStatuses; + set xNextcloudHasUserStatuses(ContentStringBuilder? xNextcloudHasUserStatuses); } class _$RoomRoomGetBreakoutRoomParticipantsHeaders extends RoomRoomGetBreakoutRoomParticipantsHeaders { @override - final bool? xNextcloudHasUserStatuses; + final ContentString? xNextcloudHasUserStatuses; factory _$RoomRoomGetBreakoutRoomParticipantsHeaders( [void Function(RoomRoomGetBreakoutRoomParticipantsHeadersBuilder)? updates]) => @@ -43698,9 +44351,10 @@ class RoomRoomGetBreakoutRoomParticipantsHeadersBuilder $RoomRoomGetBreakoutRoomParticipantsHeadersInterfaceBuilder { _$RoomRoomGetBreakoutRoomParticipantsHeaders? _$v; - bool? _xNextcloudHasUserStatuses; - bool? get xNextcloudHasUserStatuses => _$this._xNextcloudHasUserStatuses; - set xNextcloudHasUserStatuses(covariant bool? xNextcloudHasUserStatuses) => + ContentStringBuilder? _xNextcloudHasUserStatuses; + ContentStringBuilder get xNextcloudHasUserStatuses => + _$this._xNextcloudHasUserStatuses ??= ContentStringBuilder(); + set xNextcloudHasUserStatuses(covariant ContentStringBuilder? xNextcloudHasUserStatuses) => _$this._xNextcloudHasUserStatuses = xNextcloudHasUserStatuses; RoomRoomGetBreakoutRoomParticipantsHeadersBuilder(); @@ -43708,7 +44362,7 @@ class RoomRoomGetBreakoutRoomParticipantsHeadersBuilder RoomRoomGetBreakoutRoomParticipantsHeadersBuilder get _$this { final $v = _$v; if ($v != null) { - _xNextcloudHasUserStatuses = $v.xNextcloudHasUserStatuses; + _xNextcloudHasUserStatuses = $v.xNextcloudHasUserStatuses?.toBuilder(); _$v = null; } return this; @@ -43729,8 +44383,21 @@ class RoomRoomGetBreakoutRoomParticipantsHeadersBuilder RoomRoomGetBreakoutRoomParticipantsHeaders build() => _build(); _$RoomRoomGetBreakoutRoomParticipantsHeaders _build() { - final _$result = - _$v ?? _$RoomRoomGetBreakoutRoomParticipantsHeaders._(xNextcloudHasUserStatuses: xNextcloudHasUserStatuses); + _$RoomRoomGetBreakoutRoomParticipantsHeaders _$result; + try { + _$result = _$v ?? + _$RoomRoomGetBreakoutRoomParticipantsHeaders._( + xNextcloudHasUserStatuses: _xNextcloudHasUserStatuses?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'xNextcloudHasUserStatuses'; + _xNextcloudHasUserStatuses?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'RoomRoomGetBreakoutRoomParticipantsHeaders', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } diff --git a/packages/nextcloud/test/core_test.dart b/packages/nextcloud/test/core_test.dart index 3b9489560ef..912f36b8259 100644 --- a/packages/nextcloud/test/core_test.dart +++ b/packages/nextcloud/test/core_test.dart @@ -126,11 +126,13 @@ void main() { test('Get', () async { final response = await client.core.avatar.getAvatar(userId: 'admin', size: 32); expect(response.body, isNotEmpty); + expect(response.headers.xNcIscustomavatar?.content, 0); }); test('Get dark', () async { final response = await client.core.avatar.getAvatarDark(userId: 'admin', size: 32); expect(response.body, isNotEmpty); + expect(response.headers.xNcIscustomavatar?.content, 0); }); });