diff --git a/lib/misskey_dart.dart b/lib/misskey_dart.dart index 09b72d2c..b246d562 100644 --- a/lib/misskey_dart.dart +++ b/lib/misskey_dart.dart @@ -99,7 +99,6 @@ export 'src/data/following/requests/following_requests_reject_request.dart'; export 'src/data/federation/federation_show_instance_request.dart'; export 'src/data/federation/federation_show_instance_response.dart'; export 'src/data/federation/federation_users_request.dart'; -export 'src/data/i_response.dart'; export 'src/data/i/i_notifications_request.dart'; export 'src/data/i/i_notifications_response.dart'; export 'src/data/i/i_favorites_request.dart'; @@ -142,7 +141,6 @@ export 'src/data/pages/pages_like_request.dart'; export 'src/data/pages/pages_unlike_request.dart'; export 'src/data/pages/pages_show_request.dart'; export 'src/data/users/users_show_request.dart'; -export 'src/data/users/users_show_response.dart'; export 'src/data/users/users_notes_request.dart'; export 'src/data/users/users_clips_request.dart'; export 'src/data/users/users_following_request.dart'; diff --git a/lib/src/data/base/clip.dart b/lib/src/data/base/clip.dart index 99633871..03a5584a 100644 --- a/lib/src/data/base/clip.dart +++ b/lib/src/data/base/clip.dart @@ -12,7 +12,7 @@ class Clip with _$Clip { @DateTimeConverter() required DateTime createdAt, @NullableDateTimeConverter() DateTime? lastClippedAt, required String userId, - required User user, + required UserLite user, String? name, String? description, required bool isPublic, diff --git a/lib/src/data/base/clip.freezed.dart b/lib/src/data/base/clip.freezed.dart index 17c69c14..b56bfb55 100644 --- a/lib/src/data/base/clip.freezed.dart +++ b/lib/src/data/base/clip.freezed.dart @@ -26,7 +26,7 @@ mixin _$Clip { @NullableDateTimeConverter() DateTime? get lastClippedAt => throw _privateConstructorUsedError; String get userId => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; String? get name => throw _privateConstructorUsedError; String? get description => throw _privateConstructorUsedError; bool get isPublic => throw _privateConstructorUsedError; @@ -48,14 +48,14 @@ abstract class $ClipCopyWith<$Res> { @DateTimeConverter() DateTime createdAt, @NullableDateTimeConverter() DateTime? lastClippedAt, String userId, - User user, + UserLite user, String? name, String? description, bool isPublic, int favoritedCount, bool isFavorited}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -102,7 +102,7 @@ class _$ClipCopyWithImpl<$Res, $Val extends Clip> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, name: freezed == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -128,8 +128,8 @@ class _$ClipCopyWithImpl<$Res, $Val extends Clip> @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -147,7 +147,7 @@ abstract class _$$ClipImplCopyWith<$Res> implements $ClipCopyWith<$Res> { @DateTimeConverter() DateTime createdAt, @NullableDateTimeConverter() DateTime? lastClippedAt, String userId, - User user, + UserLite user, String? name, String? description, bool isPublic, @@ -155,7 +155,7 @@ abstract class _$$ClipImplCopyWith<$Res> implements $ClipCopyWith<$Res> { bool isFavorited}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -199,7 +199,7 @@ class __$$ClipImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, name: freezed == name ? _value.name : name // ignore: cast_nullable_to_non_nullable @@ -253,7 +253,7 @@ class _$ClipImpl implements _Clip { @override final String userId; @override - final User user; + final UserLite user; @override final String? name; @override @@ -318,7 +318,7 @@ abstract class _Clip implements Clip { @DateTimeConverter() required final DateTime createdAt, @NullableDateTimeConverter() final DateTime? lastClippedAt, required final String userId, - required final User user, + required final UserLite user, final String? name, final String? description, required final bool isPublic, @@ -338,7 +338,7 @@ abstract class _Clip implements Clip { @override String get userId; @override - User get user; + UserLite get user; @override String? get name; @override diff --git a/lib/src/data/base/clip.g.dart b/lib/src/data/base/clip.g.dart index 2319cf89..0e4b6117 100644 --- a/lib/src/data/base/clip.g.dart +++ b/lib/src/data/base/clip.g.dart @@ -13,7 +13,7 @@ _$ClipImpl _$$ClipImplFromJson(Map json) => _$ClipImpl( lastClippedAt: _$JsonConverterFromJson( json['lastClippedAt'], const NullableDateTimeConverter().fromJson), userId: json['userId'] as String, - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), name: json['name'] as String?, description: json['description'] as String?, isPublic: json['isPublic'] as bool, diff --git a/lib/src/data/base/drive_file.dart b/lib/src/data/base/drive_file.dart index 34a3bde6..4132f2f9 100644 --- a/lib/src/data/base/drive_file.dart +++ b/lib/src/data/base/drive_file.dart @@ -23,7 +23,7 @@ class DriveFile with _$DriveFile { String? folderId, DriveFolder? folder, String? userId, - User? user, + UserLite? user, }) = _DriveFile; factory DriveFile.fromJson(Map json) => diff --git a/lib/src/data/base/drive_file.freezed.dart b/lib/src/data/base/drive_file.freezed.dart index c0c69925..856d29e5 100644 --- a/lib/src/data/base/drive_file.freezed.dart +++ b/lib/src/data/base/drive_file.freezed.dart @@ -36,7 +36,7 @@ mixin _$DriveFile { String? get folderId => throw _privateConstructorUsedError; DriveFolder? get folder => throw _privateConstructorUsedError; String? get userId => throw _privateConstructorUsedError; - User? get user => throw _privateConstructorUsedError; + UserLite? get user => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -65,11 +65,11 @@ abstract class $DriveFileCopyWith<$Res> { String? folderId, DriveFolder? folder, String? userId, - User? user}); + UserLite? user}); $DriveFilePropertiesCopyWith<$Res> get properties; $DriveFolderCopyWith<$Res>? get folder; - $UserCopyWith<$Res>? get user; + $UserLiteCopyWith<$Res>? get user; } /// @nodoc @@ -166,7 +166,7 @@ class _$DriveFileCopyWithImpl<$Res, $Val extends DriveFile> user: freezed == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User?, + as UserLite?, ) as $Val); } @@ -192,12 +192,12 @@ class _$DriveFileCopyWithImpl<$Res, $Val extends DriveFile> @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res>? get user { + $UserLiteCopyWith<$Res>? get user { if (_value.user == null) { return null; } - return $UserCopyWith<$Res>(_value.user!, (value) { + return $UserLiteCopyWith<$Res>(_value.user!, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -227,14 +227,14 @@ abstract class _$$DriveFileImplCopyWith<$Res> String? folderId, DriveFolder? folder, String? userId, - User? user}); + UserLite? user}); @override $DriveFilePropertiesCopyWith<$Res> get properties; @override $DriveFolderCopyWith<$Res>? get folder; @override - $UserCopyWith<$Res>? get user; + $UserLiteCopyWith<$Res>? get user; } /// @nodoc @@ -329,7 +329,7 @@ class __$$DriveFileImplCopyWithImpl<$Res> user: freezed == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User?, + as UserLite?, )); } } @@ -390,7 +390,7 @@ class _$DriveFileImpl implements _DriveFile { @override final String? userId; @override - final User? user; + final UserLite? user; @override String toString() { @@ -478,7 +478,7 @@ abstract class _DriveFile implements DriveFile { final String? folderId, final DriveFolder? folder, final String? userId, - final User? user}) = _$DriveFileImpl; + final UserLite? user}) = _$DriveFileImpl; factory _DriveFile.fromJson(Map json) = _$DriveFileImpl.fromJson; @@ -515,7 +515,7 @@ abstract class _DriveFile implements DriveFile { @override String? get userId; @override - User? get user; + UserLite? get user; @override @JsonKey(ignore: true) _$$DriveFileImplCopyWith<_$DriveFileImpl> get copyWith => diff --git a/lib/src/data/base/drive_file.g.dart b/lib/src/data/base/drive_file.g.dart index f2667f00..40291157 100644 --- a/lib/src/data/base/drive_file.g.dart +++ b/lib/src/data/base/drive_file.g.dart @@ -29,7 +29,7 @@ _$DriveFileImpl _$$DriveFileImplFromJson(Map json) => userId: json['userId'] as String?, user: json['user'] == null ? null - : User.fromJson(json['user'] as Map), + : UserLite.fromJson(json['user'] as Map), ); Map _$$DriveFileImplToJson(_$DriveFileImpl instance) => diff --git a/lib/src/data/base/flash.dart b/lib/src/data/base/flash.dart index a78d8544..9a5dcf1c 100644 --- a/lib/src/data/base/flash.dart +++ b/lib/src/data/base/flash.dart @@ -17,7 +17,7 @@ class Flash with _$Flash { required String summary, required String script, required String userId, - required User user, + required UserLite user, int? likedCount, @Default(false) bool isLiked, }) = _Flash; diff --git a/lib/src/data/base/flash.freezed.dart b/lib/src/data/base/flash.freezed.dart index ad0e05c4..2dc98f6e 100644 --- a/lib/src/data/base/flash.freezed.dart +++ b/lib/src/data/base/flash.freezed.dart @@ -29,7 +29,7 @@ mixin _$Flash { String get summary => throw _privateConstructorUsedError; String get script => throw _privateConstructorUsedError; String get userId => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; int? get likedCount => throw _privateConstructorUsedError; bool get isLiked => throw _privateConstructorUsedError; @@ -51,11 +51,11 @@ abstract class $FlashCopyWith<$Res> { String summary, String script, String userId, - User user, + UserLite user, int? likedCount, bool isLiked}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -114,7 +114,7 @@ class _$FlashCopyWithImpl<$Res, $Val extends Flash> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, likedCount: freezed == likedCount ? _value.likedCount : likedCount // ignore: cast_nullable_to_non_nullable @@ -128,8 +128,8 @@ class _$FlashCopyWithImpl<$Res, $Val extends Flash> @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -150,12 +150,12 @@ abstract class _$$FlashImplCopyWith<$Res> implements $FlashCopyWith<$Res> { String summary, String script, String userId, - User user, + UserLite user, int? likedCount, bool isLiked}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -212,7 +212,7 @@ class __$$FlashImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, likedCount: freezed == likedCount ? _value.likedCount : likedCount // ignore: cast_nullable_to_non_nullable @@ -260,7 +260,7 @@ class _$FlashImpl implements _Flash { @override final String userId; @override - final User user; + final UserLite user; @override final int? likedCount; @override @@ -320,7 +320,7 @@ abstract class _Flash implements Flash { required final String summary, required final String script, required final String userId, - required final User user, + required final UserLite user, final int? likedCount, final bool isLiked}) = _$FlashImpl; @@ -343,7 +343,7 @@ abstract class _Flash implements Flash { @override String get userId; @override - User get user; + UserLite get user; @override int? get likedCount; @override diff --git a/lib/src/data/base/flash.g.dart b/lib/src/data/base/flash.g.dart index 4c0a7018..a2611faa 100644 --- a/lib/src/data/base/flash.g.dart +++ b/lib/src/data/base/flash.g.dart @@ -16,7 +16,7 @@ _$FlashImpl _$$FlashImplFromJson(Map json) => _$FlashImpl( summary: json['summary'] as String, script: json['script'] as String, userId: json['userId'] as String, - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), likedCount: json['likedCount'] as int?, isLiked: json['isLiked'] as bool? ?? false, ); diff --git a/lib/src/data/base/follow_request.dart b/lib/src/data/base/follow_request.dart index d4f68700..93120a8c 100644 --- a/lib/src/data/base/follow_request.dart +++ b/lib/src/data/base/follow_request.dart @@ -8,8 +8,8 @@ part 'follow_request.g.dart'; class FollowRequest with _$FollowRequest { const factory FollowRequest({ required String id, - required User followee, - required User follower, + required UserLite followee, + required UserLite follower, }) = _FollowRequest; factory FollowRequest.fromJson(Map json) => diff --git a/lib/src/data/base/follow_request.freezed.dart b/lib/src/data/base/follow_request.freezed.dart index 29367ae0..856f410f 100644 --- a/lib/src/data/base/follow_request.freezed.dart +++ b/lib/src/data/base/follow_request.freezed.dart @@ -21,8 +21,8 @@ FollowRequest _$FollowRequestFromJson(Map json) { /// @nodoc mixin _$FollowRequest { String get id => throw _privateConstructorUsedError; - User get followee => throw _privateConstructorUsedError; - User get follower => throw _privateConstructorUsedError; + UserLite get followee => throw _privateConstructorUsedError; + UserLite get follower => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -36,10 +36,10 @@ abstract class $FollowRequestCopyWith<$Res> { FollowRequest value, $Res Function(FollowRequest) then) = _$FollowRequestCopyWithImpl<$Res, FollowRequest>; @useResult - $Res call({String id, User followee, User follower}); + $Res call({String id, UserLite followee, UserLite follower}); - $UserCopyWith<$Res> get followee; - $UserCopyWith<$Res> get follower; + $UserLiteCopyWith<$Res> get followee; + $UserLiteCopyWith<$Res> get follower; } /// @nodoc @@ -67,26 +67,26 @@ class _$FollowRequestCopyWithImpl<$Res, $Val extends FollowRequest> followee: null == followee ? _value.followee : followee // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, follower: null == follower ? _value.follower : follower // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, ) as $Val); } @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get followee { - return $UserCopyWith<$Res>(_value.followee, (value) { + $UserLiteCopyWith<$Res> get followee { + return $UserLiteCopyWith<$Res>(_value.followee, (value) { return _then(_value.copyWith(followee: value) as $Val); }); } @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get follower { - return $UserCopyWith<$Res>(_value.follower, (value) { + $UserLiteCopyWith<$Res> get follower { + return $UserLiteCopyWith<$Res>(_value.follower, (value) { return _then(_value.copyWith(follower: value) as $Val); }); } @@ -100,12 +100,12 @@ abstract class _$$FollowRequestImplCopyWith<$Res> __$$FollowRequestImplCopyWithImpl<$Res>; @override @useResult - $Res call({String id, User followee, User follower}); + $Res call({String id, UserLite followee, UserLite follower}); @override - $UserCopyWith<$Res> get followee; + $UserLiteCopyWith<$Res> get followee; @override - $UserCopyWith<$Res> get follower; + $UserLiteCopyWith<$Res> get follower; } /// @nodoc @@ -131,11 +131,11 @@ class __$$FollowRequestImplCopyWithImpl<$Res> followee: null == followee ? _value.followee : followee // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, follower: null == follower ? _value.follower : follower // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, )); } } @@ -152,9 +152,9 @@ class _$FollowRequestImpl implements _FollowRequest { @override final String id; @override - final User followee; + final UserLite followee; @override - final User follower; + final UserLite follower; @override String toString() { @@ -194,8 +194,8 @@ class _$FollowRequestImpl implements _FollowRequest { abstract class _FollowRequest implements FollowRequest { const factory _FollowRequest( {required final String id, - required final User followee, - required final User follower}) = _$FollowRequestImpl; + required final UserLite followee, + required final UserLite follower}) = _$FollowRequestImpl; factory _FollowRequest.fromJson(Map json) = _$FollowRequestImpl.fromJson; @@ -203,9 +203,9 @@ abstract class _FollowRequest implements FollowRequest { @override String get id; @override - User get followee; + UserLite get followee; @override - User get follower; + UserLite get follower; @override @JsonKey(ignore: true) _$$FollowRequestImplCopyWith<_$FollowRequestImpl> get copyWith => diff --git a/lib/src/data/base/follow_request.g.dart b/lib/src/data/base/follow_request.g.dart index 45c914e4..08d09c6d 100644 --- a/lib/src/data/base/follow_request.g.dart +++ b/lib/src/data/base/follow_request.g.dart @@ -9,8 +9,8 @@ part of 'follow_request.dart'; _$FollowRequestImpl _$$FollowRequestImplFromJson(Map json) => _$FollowRequestImpl( id: json['id'] as String, - followee: User.fromJson(json['followee'] as Map), - follower: User.fromJson(json['follower'] as Map), + followee: UserLite.fromJson(json['followee'] as Map), + follower: UserLite.fromJson(json['follower'] as Map), ); Map _$$FollowRequestImplToJson(_$FollowRequestImpl instance) => diff --git a/lib/src/data/base/following.dart b/lib/src/data/base/following.dart index 48638652..bb30ecf5 100644 --- a/lib/src/data/base/following.dart +++ b/lib/src/data/base/following.dart @@ -12,8 +12,18 @@ class Following with _$Following { @DateTimeConverter() required DateTime createdAt, required String followeeId, required String followerId, - User? followee, - User? follower, + + /// 以下のエンドポイントでnon-null + /// + // - [MisskeyFederation.followers] + // - [MisskeyFederation.following] + /// - [MisskeyUsers.following] + UserDetailed? followee, + + /// 以下のエンドポイントでnon-null + /// + /// - [MisskeyUsers.followers] + UserDetailed? follower, }) = _Following; factory Following.fromJson(Map json) => diff --git a/lib/src/data/base/following.freezed.dart b/lib/src/data/base/following.freezed.dart index 733e6472..74d4fd8d 100644 --- a/lib/src/data/base/following.freezed.dart +++ b/lib/src/data/base/following.freezed.dart @@ -25,8 +25,18 @@ mixin _$Following { DateTime get createdAt => throw _privateConstructorUsedError; String get followeeId => throw _privateConstructorUsedError; String get followerId => throw _privateConstructorUsedError; - User? get followee => throw _privateConstructorUsedError; - User? get follower => throw _privateConstructorUsedError; + + /// 以下のエンドポイントでnon-null + /// +// - [MisskeyFederation.followers] +// - [MisskeyFederation.following] + /// - [MisskeyUsers.following] + UserDetailed? get followee => throw _privateConstructorUsedError; + + /// 以下のエンドポイントでnon-null + /// + /// - [MisskeyUsers.followers] + UserDetailed? get follower => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -44,11 +54,8 @@ abstract class $FollowingCopyWith<$Res> { @DateTimeConverter() DateTime createdAt, String followeeId, String followerId, - User? followee, - User? follower}); - - $UserCopyWith<$Res>? get followee; - $UserCopyWith<$Res>? get follower; + UserDetailed? followee, + UserDetailed? follower}); } /// @nodoc @@ -91,37 +98,13 @@ class _$FollowingCopyWithImpl<$Res, $Val extends Following> followee: freezed == followee ? _value.followee : followee // ignore: cast_nullable_to_non_nullable - as User?, + as UserDetailed?, follower: freezed == follower ? _value.follower : follower // ignore: cast_nullable_to_non_nullable - as User?, + as UserDetailed?, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $UserCopyWith<$Res>? get followee { - if (_value.followee == null) { - return null; - } - - return $UserCopyWith<$Res>(_value.followee!, (value) { - return _then(_value.copyWith(followee: value) as $Val); - }); - } - - @override - @pragma('vm:prefer-inline') - $UserCopyWith<$Res>? get follower { - if (_value.follower == null) { - return null; - } - - return $UserCopyWith<$Res>(_value.follower!, (value) { - return _then(_value.copyWith(follower: value) as $Val); - }); - } } /// @nodoc @@ -137,13 +120,8 @@ abstract class _$$FollowingImplCopyWith<$Res> @DateTimeConverter() DateTime createdAt, String followeeId, String followerId, - User? followee, - User? follower}); - - @override - $UserCopyWith<$Res>? get followee; - @override - $UserCopyWith<$Res>? get follower; + UserDetailed? followee, + UserDetailed? follower}); } /// @nodoc @@ -184,11 +162,11 @@ class __$$FollowingImplCopyWithImpl<$Res> followee: freezed == followee ? _value.followee : followee // ignore: cast_nullable_to_non_nullable - as User?, + as UserDetailed?, follower: freezed == follower ? _value.follower : follower // ignore: cast_nullable_to_non_nullable - as User?, + as UserDetailed?, )); } } @@ -216,10 +194,20 @@ class _$FollowingImpl implements _Following { final String followeeId; @override final String followerId; + + /// 以下のエンドポイントでnon-null + /// +// - [MisskeyFederation.followers] +// - [MisskeyFederation.following] + /// - [MisskeyUsers.following] @override - final User? followee; + final UserDetailed? followee; + + /// 以下のエンドポイントでnon-null + /// + /// - [MisskeyUsers.followers] @override - final User? follower; + final UserDetailed? follower; @override String toString() { @@ -269,8 +257,8 @@ abstract class _Following implements Following { @DateTimeConverter() required final DateTime createdAt, required final String followeeId, required final String followerId, - final User? followee, - final User? follower}) = _$FollowingImpl; + final UserDetailed? followee, + final UserDetailed? follower}) = _$FollowingImpl; factory _Following.fromJson(Map json) = _$FollowingImpl.fromJson; @@ -285,9 +273,19 @@ abstract class _Following implements Following { @override String get followerId; @override - User? get followee; + + /// 以下のエンドポイントでnon-null + /// +// - [MisskeyFederation.followers] +// - [MisskeyFederation.following] + /// - [MisskeyUsers.following] + UserDetailed? get followee; @override - User? get follower; + + /// 以下のエンドポイントでnon-null + /// + /// - [MisskeyUsers.followers] + UserDetailed? get follower; @override @JsonKey(ignore: true) _$$FollowingImplCopyWith<_$FollowingImpl> get copyWith => diff --git a/lib/src/data/base/following.g.dart b/lib/src/data/base/following.g.dart index edeba590..17bebe93 100644 --- a/lib/src/data/base/following.g.dart +++ b/lib/src/data/base/following.g.dart @@ -15,10 +15,10 @@ _$FollowingImpl _$$FollowingImplFromJson(Map json) => followerId: json['followerId'] as String, followee: json['followee'] == null ? null - : User.fromJson(json['followee'] as Map), + : UserDetailed.fromJson(json['followee'] as Map), follower: json['follower'] == null ? null - : User.fromJson(json['follower'] as Map), + : UserDetailed.fromJson(json['follower'] as Map), ); Map _$$FollowingImplToJson(_$FollowingImpl instance) => diff --git a/lib/src/data/base/note.dart b/lib/src/data/base/note.dart index 85788346..ce6b5b99 100644 --- a/lib/src/data/base/note.dart +++ b/lib/src/data/base/note.dart @@ -16,7 +16,7 @@ class Note with _$Note { @NullableDateTimeConverter() DateTime? updatedAt, String? text, String? cw, - required User user, + required UserLite user, required String userId, @NoteVisibilityJsonConverter() required NoteVisibility visibility, required bool localOnly, diff --git a/lib/src/data/base/note.freezed.dart b/lib/src/data/base/note.freezed.dart index 52180b50..e47df823 100644 --- a/lib/src/data/base/note.freezed.dart +++ b/lib/src/data/base/note.freezed.dart @@ -27,7 +27,7 @@ mixin _$Note { DateTime? get updatedAt => throw _privateConstructorUsedError; String? get text => throw _privateConstructorUsedError; String? get cw => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; String get userId => throw _privateConstructorUsedError; @NoteVisibilityJsonConverter() NoteVisibility get visibility => throw _privateConstructorUsedError; @@ -77,7 +77,7 @@ abstract class $NoteCopyWith<$Res> { @NullableDateTimeConverter() DateTime? updatedAt, String? text, String? cw, - User user, + UserLite user, String userId, @NoteVisibilityJsonConverter() NoteVisibility visibility, bool localOnly, @@ -104,7 +104,7 @@ abstract class $NoteCopyWith<$Res> { NotePoll? poll, int? clippedCount}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; $NoteCopyWith<$Res>? get renote; $NoteCopyWith<$Res>? get reply; $NoteChannelInfoCopyWith<$Res>? get channel; @@ -180,7 +180,7 @@ class _$NoteCopyWithImpl<$Res, $Val extends Note> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, userId: null == userId ? _value.userId : userId // ignore: cast_nullable_to_non_nullable @@ -286,8 +286,8 @@ class _$NoteCopyWithImpl<$Res, $Val extends Note> @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -354,7 +354,7 @@ abstract class _$$NoteImplCopyWith<$Res> implements $NoteCopyWith<$Res> { @NullableDateTimeConverter() DateTime? updatedAt, String? text, String? cw, - User user, + UserLite user, String userId, @NoteVisibilityJsonConverter() NoteVisibility visibility, bool localOnly, @@ -382,7 +382,7 @@ abstract class _$$NoteImplCopyWith<$Res> implements $NoteCopyWith<$Res> { int? clippedCount}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; @override $NoteCopyWith<$Res>? get renote; @override @@ -459,7 +459,7 @@ class __$$NoteImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, userId: null == userId ? _value.userId : userId // ignore: cast_nullable_to_non_nullable @@ -624,7 +624,7 @@ class _$NoteImpl implements _Note { @override final String? cw; @override - final User user; + final UserLite user; @override final String userId; @override @@ -850,7 +850,7 @@ abstract class _Note implements Note { @NullableDateTimeConverter() final DateTime? updatedAt, final String? text, final String? cw, - required final User user, + required final UserLite user, required final String userId, @NoteVisibilityJsonConverter() required final NoteVisibility visibility, required final bool localOnly, @@ -892,7 +892,7 @@ abstract class _Note implements Note { @override String? get cw; @override - User get user; + UserLite get user; @override String get userId; @override diff --git a/lib/src/data/base/note.g.dart b/lib/src/data/base/note.g.dart index a2c3ec78..7110f6a7 100644 --- a/lib/src/data/base/note.g.dart +++ b/lib/src/data/base/note.g.dart @@ -14,7 +14,7 @@ _$NoteImpl _$$NoteImplFromJson(Map json) => _$NoteImpl( json['updatedAt'], const NullableDateTimeConverter().fromJson), text: json['text'] as String?, cw: json['cw'] as String?, - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), userId: json['userId'] as String, visibility: const NoteVisibilityJsonConverter() .fromJson(json['visibility'] as String), diff --git a/lib/src/data/base/page.dart b/lib/src/data/base/page.dart index 8181f6e1..f52f9d7d 100644 --- a/lib/src/data/base/page.dart +++ b/lib/src/data/base/page.dart @@ -13,7 +13,7 @@ class Page with _$Page { @DateTimeConverter() required DateTime createdAt, @DateTimeConverter() required DateTime updatedAt, required String userId, - required User user, + required UserLite user, @ListPageContentConverter() required List content, required List> variables, required String title, diff --git a/lib/src/data/base/page.freezed.dart b/lib/src/data/base/page.freezed.dart index 83c3111b..ea7b3140 100644 --- a/lib/src/data/base/page.freezed.dart +++ b/lib/src/data/base/page.freezed.dart @@ -26,7 +26,7 @@ mixin _$Page { @DateTimeConverter() DateTime get updatedAt => throw _privateConstructorUsedError; String get userId => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; @ListPageContentConverter() List get content => throw _privateConstructorUsedError; List> get variables => @@ -59,7 +59,7 @@ abstract class $PageCopyWith<$Res> { @DateTimeConverter() DateTime createdAt, @DateTimeConverter() DateTime updatedAt, String userId, - User user, + UserLite user, @ListPageContentConverter() List content, List> variables, String title, @@ -75,7 +75,7 @@ abstract class $PageCopyWith<$Res> { int likedCount, bool? isLiked}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; $DriveFileCopyWith<$Res>? get eyeCatchingImage; } @@ -132,7 +132,7 @@ class _$PageCopyWithImpl<$Res, $Val extends Page> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, content: null == content ? _value.content : content // ignore: cast_nullable_to_non_nullable @@ -194,8 +194,8 @@ class _$PageCopyWithImpl<$Res, $Val extends Page> @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -225,7 +225,7 @@ abstract class _$$PageImplCopyWith<$Res> implements $PageCopyWith<$Res> { @DateTimeConverter() DateTime createdAt, @DateTimeConverter() DateTime updatedAt, String userId, - User user, + UserLite user, @ListPageContentConverter() List content, List> variables, String title, @@ -242,7 +242,7 @@ abstract class _$$PageImplCopyWith<$Res> implements $PageCopyWith<$Res> { bool? isLiked}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; @override $DriveFileCopyWith<$Res>? get eyeCatchingImage; } @@ -297,7 +297,7 @@ class __$$PageImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, content: null == content ? _value._content : content // ignore: cast_nullable_to_non_nullable @@ -400,7 +400,7 @@ class _$PageImpl implements _Page { @override final String userId; @override - final User user; + final UserLite user; final List _content; @override @ListPageContentConverter() @@ -534,7 +534,7 @@ abstract class _Page implements Page { @DateTimeConverter() required final DateTime createdAt, @DateTimeConverter() required final DateTime updatedAt, required final String userId, - required final User user, + required final UserLite user, @ListPageContentConverter() required final List content, required final List> variables, @@ -564,7 +564,7 @@ abstract class _Page implements Page { @override String get userId; @override - User get user; + UserLite get user; @override @ListPageContentConverter() List get content; diff --git a/lib/src/data/base/page.g.dart b/lib/src/data/base/page.g.dart index e5a64f82..e075a2e7 100644 --- a/lib/src/data/base/page.g.dart +++ b/lib/src/data/base/page.g.dart @@ -13,7 +13,7 @@ _$PageImpl _$$PageImplFromJson(Map json) => _$PageImpl( updatedAt: const DateTimeConverter().fromJson(json['updatedAt'] as String), userId: json['userId'] as String, - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), content: const ListPageContentConverter().fromJson(json['content'] as List?), variables: (json['variables'] as List) diff --git a/lib/src/data/base/user.dart b/lib/src/data/base/user.dart index 3f3bb177..bdf3a26b 100644 --- a/lib/src/data/base/user.dart +++ b/lib/src/data/base/user.dart @@ -1,31 +1,304 @@ import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:misskey_dart/misskey_dart.dart'; import 'package:misskey_dart/src/converters/date_time_converter.dart'; import 'package:misskey_dart/src/converters/emojis_converter.dart'; +import 'package:misskey_dart/src/converters/mute_words_converter.dart'; import 'package:misskey_dart/src/converters/uri_converter.dart'; -import 'package:misskey_dart/src/enums/online_status.dart'; part 'user.freezed.dart'; part 'user.g.dart'; +abstract class User { + String get id; + String get username; + String? get host; + String? get name; + OnlineStatus? get onlineStatus; + List get badgeRoles; + Uri get avatarUrl; + String? get avatarBlurhash; + List get avatarDecorations; + UserInstanceInfo? get instance; + bool get isCat; + bool get isBot; + Map get emojis; + + factory User.fromJson(Map json) { + if (json.containsKey("url")) { + return UserDetailed.fromJson(json); + } else { + return UserLite.fromJson(json); + } + } + + Map toJson() { + return (this as UserLite).toJson(); + } +} + +abstract class UserDetailed implements User { + Uri? get url; + Uri? get uri; + DateTime get createdAt; + DateTime? get updatedAt; + DateTime? get lastFetchedAt; + Uri? get bannerUrl; + String? get bannerBlurhash; + bool get isLocked; + bool get isSilenced; + bool get isSuspended; + String? get description; + String? get location; + DateTime? get birthday; + String? get lang; + List? get fields; + int get followersCount; + int get followingCount; + int get notesCount; + List? get pinnedNoteIds; + List? get pinnedNotes; + String? get pinnedPageId; + Map? get pinnedPage; + bool get publicReactions; + FFVisibility get ffVisibility; + bool get twoFactorEnabled; + bool get usePasswordLessLogin; + bool get securityKeys; + List? get roles; + String? get memo; + + factory UserDetailed.fromJson(Map json) { + if (json.containsKey("isFollowing")) { + return UserDetailedNotMeWithRelations.fromJson(json); + } else if (json.containsKey("avatarId")) { + return MeDetailed.fromJson(json); + } else { + return UserDetailedNotMe.fromJson(json); + } + } + + @override + Map toJson() { + return (this as UserDetailedNotMe).toJson(); + } +} + @freezed -class User with _$User { - const factory User({ +class UserLite with _$UserLite implements User { + const factory UserLite({ required String id, + String? name, required String username, String? host, + @UriConverter() required Uri avatarUrl, + String? avatarBlurhash, + @Default([]) List avatarDecorations, + @Default(false) bool isBot, + @Default(false) bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() @Default({}) Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + @Default([]) List badgeRoles, + }) = _UserLite; + + factory UserLite.fromJson(Map json) => + _$UserLiteFromJson(json); +} + +@freezed +class UserDetailedNotMe with _$UserDetailedNotMe implements UserDetailed { + const factory UserDetailedNotMe({ + required String id, String? name, + required String username, + String? host, + @UriConverter() required Uri avatarUrl, + String? avatarBlurhash, + @Default([]) List avatarDecorations, + required bool isBot, + required bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() @Default({}) Map emojis, @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, @Default([]) List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() required DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + required bool isLocked, + required bool isSilenced, + required bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + required int followersCount, + required int followingCount, + required int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + required bool publicReactions, + required FFVisibility ffVisibility, + required bool twoFactorEnabled, + required bool usePasswordLessLogin, + required bool securityKeys, + List? roles, + String? memo, + }) = _UserDetailedNotMe; + + factory UserDetailedNotMe.fromJson(Map json) => + _$UserDetailedNotMeFromJson(json); +} + +@freezed +class UserDetailedNotMeWithRelations + with _$UserDetailedNotMeWithRelations + implements UserDetailed { + const factory UserDetailedNotMeWithRelations({ + required String id, + String? name, + required String username, + String? host, @UriConverter() required Uri avatarUrl, + String? avatarBlurhash, @Default([]) List avatarDecorations, + required bool isBot, + required bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() @Default({}) Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + @Default([]) List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() required DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + required bool isLocked, + required bool isSilenced, + required bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + required int followersCount, + required int followingCount, + required int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + required bool publicReactions, + required FFVisibility ffVisibility, + required bool twoFactorEnabled, + required bool usePasswordLessLogin, + required bool securityKeys, + List? roles, + String? memo, + required bool isFollowing, + required bool isFollowed, + required bool hasPendingFollowRequestFromYou, + required bool hasPendingFollowRequestToYou, + required bool isBlocking, + required bool isBlocked, + required bool isMuted, + required bool isRenoteMuted, + }) = _UserDetailedNotMeWithRelations; + + factory UserDetailedNotMeWithRelations.fromJson(Map json) => + _$UserDetailedNotMeWithRelationsFromJson(json); +} + +@freezed +class MeDetailed with _$MeDetailed implements UserDetailed { + const factory MeDetailed({ + required String id, + String? name, + required String username, + String? host, + @UriConverter() required Uri avatarUrl, String? avatarBlurhash, + @Default([]) List avatarDecorations, + required bool isBot, + required bool isCat, UserInstanceInfo? instance, - @Default(false) bool isCat, - @Default(false) bool isBot, @EmojisConverter() @Default({}) Map emojis, - }) = _User; + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + @Default([]) List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() required DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + required bool isLocked, + required bool isSilenced, + required bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + required int followersCount, + required int followingCount, + required int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + required bool publicReactions, + required FFVisibility ffVisibility, + required bool twoFactorEnabled, + required bool usePasswordLessLogin, + required bool securityKeys, + List? roles, + String? memo, + String? avatarId, + String? bannerId, + required bool isModerator, + required bool isAdmin, + required bool injectFeaturedNote, + required bool receiveAnnouncementEmail, + required bool alwaysMarkNsfw, + required bool autoSensitive, + required bool carefulBot, + required bool autoAcceptFollowed, + required bool noCrawle, + required bool isExplorable, + required bool isDeleted, + required bool hideOnlineStatus, + required bool hasUnreadSpecifiedNotes, + required bool hasUnreadMentions, + required bool hasUnreadAnnouncement, + required bool hasUnreadAntenna, + required bool hasUnreadChannel, + required bool hasUnreadNotification, + required bool hasPendingReceivedFollowRequest, + int? unreadNotificationsCount, + @Default([]) List unreadAnnouncements, + @MuteWordsConverter() required List mutedWords, + @MuteWordsConverter() @Default([]) List hardMutedWords, + required List mutedInstances, + @Deprecated("Deprecated in Misskey 2023.9.2") + List? mutingNotificationTypes, + dynamic notificationRecieveConfig, + required List emailNotificationTypes, + required List achievements, + required int loggedInDays, + required UserPolicies policies, + }) = _MeDetailed; - factory User.fromJson(Map json) => _$UserFromJson(json); + factory MeDetailed.fromJson(Map json) => + _$MeDetailedFromJson(json); } @freezed @@ -130,3 +403,10 @@ class UserField with _$UserField { factory UserField.fromJson(Map json) => _$UserFieldFromJson(json); } + +class MuteWord { + final String? regExp; + final List? content; + + const MuteWord({this.regExp, this.content}); +} diff --git a/lib/src/data/base/user.freezed.dart b/lib/src/data/base/user.freezed.dart index 284480ab..bc1827ec 100644 --- a/lib/src/data/base/user.freezed.dart +++ b/lib/src/data/base/user.freezed.dart @@ -14,62 +14,63 @@ T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); -User _$UserFromJson(Map json) { - return _User.fromJson(json); +UserLite _$UserLiteFromJson(Map json) { + return _UserLite.fromJson(json); } /// @nodoc -mixin _$User { +mixin _$UserLite { String get id => throw _privateConstructorUsedError; + String? get name => throw _privateConstructorUsedError; String get username => throw _privateConstructorUsedError; String? get host => throw _privateConstructorUsedError; - String? get name => throw _privateConstructorUsedError; - @OnlineStatusJsonConverter() - OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; - List get badgeRoles => throw _privateConstructorUsedError; @UriConverter() Uri get avatarUrl => throw _privateConstructorUsedError; + String? get avatarBlurhash => throw _privateConstructorUsedError; List get avatarDecorations => throw _privateConstructorUsedError; - String? get avatarBlurhash => throw _privateConstructorUsedError; - UserInstanceInfo? get instance => throw _privateConstructorUsedError; - bool get isCat => throw _privateConstructorUsedError; bool get isBot => throw _privateConstructorUsedError; + bool get isCat => throw _privateConstructorUsedError; + UserInstanceInfo? get instance => throw _privateConstructorUsedError; @EmojisConverter() Map get emojis => throw _privateConstructorUsedError; + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; + List get badgeRoles => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UserCopyWith get copyWith => throw _privateConstructorUsedError; + $UserLiteCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $UserCopyWith<$Res> { - factory $UserCopyWith(User value, $Res Function(User) then) = - _$UserCopyWithImpl<$Res, User>; +abstract class $UserLiteCopyWith<$Res> { + factory $UserLiteCopyWith(UserLite value, $Res Function(UserLite) then) = + _$UserLiteCopyWithImpl<$Res, UserLite>; @useResult $Res call( {String id, + String? name, String username, String? host, - String? name, - @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, - List badgeRoles, @UriConverter() Uri avatarUrl, - List avatarDecorations, String? avatarBlurhash, - UserInstanceInfo? instance, - bool isCat, + List avatarDecorations, bool isBot, - @EmojisConverter() Map emojis}); + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles}); $UserInstanceInfoCopyWith<$Res>? get instance; } /// @nodoc -class _$UserCopyWithImpl<$Res, $Val extends User> - implements $UserCopyWith<$Res> { - _$UserCopyWithImpl(this._value, this._then); +class _$UserLiteCopyWithImpl<$Res, $Val extends UserLite> + implements $UserLiteCopyWith<$Res> { + _$UserLiteCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -80,24 +81,28 @@ class _$UserCopyWithImpl<$Res, $Val extends User> @override $Res call({ Object? id = null, + Object? name = freezed, Object? username = null, Object? host = freezed, - Object? name = freezed, - Object? onlineStatus = freezed, - Object? badgeRoles = null, Object? avatarUrl = null, - Object? avatarDecorations = null, Object? avatarBlurhash = freezed, - Object? instance = freezed, - Object? isCat = null, + Object? avatarDecorations = null, Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, }) { return _then(_value.copyWith( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, username: null == username ? _value.username : username // ignore: cast_nullable_to_non_nullable @@ -106,46 +111,42 @@ class _$UserCopyWithImpl<$Res, $Val extends User> ? _value.host : host // ignore: cast_nullable_to_non_nullable as String?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as OnlineStatus?, - badgeRoles: null == badgeRoles - ? _value.badgeRoles - : badgeRoles // ignore: cast_nullable_to_non_nullable - as List, avatarUrl: null == avatarUrl ? _value.avatarUrl : avatarUrl // ignore: cast_nullable_to_non_nullable as Uri, - avatarDecorations: null == avatarDecorations - ? _value.avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, avatarBlurhash: freezed == avatarBlurhash ? _value.avatarBlurhash : avatarBlurhash // ignore: cast_nullable_to_non_nullable as String?, - instance: freezed == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as UserInstanceInfo?, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, + avatarDecorations: null == avatarDecorations + ? _value.avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, isBot: null == isBot ? _value.isBot : isBot // ignore: cast_nullable_to_non_nullable as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, emojis: null == emojis ? _value.emojis : emojis // ignore: cast_nullable_to_non_nullable as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value.badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, ) as $Val); } @@ -163,60 +164,66 @@ class _$UserCopyWithImpl<$Res, $Val extends User> } /// @nodoc -abstract class _$$UserImplCopyWith<$Res> implements $UserCopyWith<$Res> { - factory _$$UserImplCopyWith( - _$UserImpl value, $Res Function(_$UserImpl) then) = - __$$UserImplCopyWithImpl<$Res>; +abstract class _$$UserLiteImplCopyWith<$Res> + implements $UserLiteCopyWith<$Res> { + factory _$$UserLiteImplCopyWith( + _$UserLiteImpl value, $Res Function(_$UserLiteImpl) then) = + __$$UserLiteImplCopyWithImpl<$Res>; @override @useResult $Res call( {String id, + String? name, String username, String? host, - String? name, - @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, - List badgeRoles, @UriConverter() Uri avatarUrl, - List avatarDecorations, String? avatarBlurhash, - UserInstanceInfo? instance, - bool isCat, + List avatarDecorations, bool isBot, - @EmojisConverter() Map emojis}); + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles}); @override $UserInstanceInfoCopyWith<$Res>? get instance; } /// @nodoc -class __$$UserImplCopyWithImpl<$Res> - extends _$UserCopyWithImpl<$Res, _$UserImpl> - implements _$$UserImplCopyWith<$Res> { - __$$UserImplCopyWithImpl(_$UserImpl _value, $Res Function(_$UserImpl) _then) +class __$$UserLiteImplCopyWithImpl<$Res> + extends _$UserLiteCopyWithImpl<$Res, _$UserLiteImpl> + implements _$$UserLiteImplCopyWith<$Res> { + __$$UserLiteImplCopyWithImpl( + _$UserLiteImpl _value, $Res Function(_$UserLiteImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, + Object? name = freezed, Object? username = null, Object? host = freezed, - Object? name = freezed, - Object? onlineStatus = freezed, - Object? badgeRoles = null, Object? avatarUrl = null, - Object? avatarDecorations = null, Object? avatarBlurhash = freezed, - Object? instance = freezed, - Object? isCat = null, + Object? avatarDecorations = null, Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, }) { - return _then(_$UserImpl( + return _then(_$UserLiteImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, username: null == username ? _value.username : username // ignore: cast_nullable_to_non_nullable @@ -225,97 +232,83 @@ class __$$UserImplCopyWithImpl<$Res> ? _value.host : host // ignore: cast_nullable_to_non_nullable as String?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as OnlineStatus?, - badgeRoles: null == badgeRoles - ? _value._badgeRoles - : badgeRoles // ignore: cast_nullable_to_non_nullable - as List, avatarUrl: null == avatarUrl ? _value.avatarUrl : avatarUrl // ignore: cast_nullable_to_non_nullable as Uri, - avatarDecorations: null == avatarDecorations - ? _value._avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, avatarBlurhash: freezed == avatarBlurhash ? _value.avatarBlurhash : avatarBlurhash // ignore: cast_nullable_to_non_nullable as String?, - instance: freezed == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as UserInstanceInfo?, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, + avatarDecorations: null == avatarDecorations + ? _value._avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, isBot: null == isBot ? _value.isBot : isBot // ignore: cast_nullable_to_non_nullable as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, emojis: null == emojis ? _value._emojis : emojis // ignore: cast_nullable_to_non_nullable as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value._badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$UserImpl implements _User { - const _$UserImpl( +class _$UserLiteImpl implements _UserLite { + const _$UserLiteImpl( {required this.id, + this.name, required this.username, this.host, - this.name, - @OnlineStatusJsonConverter() this.onlineStatus, - final List badgeRoles = const [], @UriConverter() required this.avatarUrl, - final List avatarDecorations = const [], this.avatarBlurhash, - this.instance, - this.isCat = false, + final List avatarDecorations = const [], this.isBot = false, - @EmojisConverter() final Map emojis = const {}}) - : _badgeRoles = badgeRoles, - _avatarDecorations = avatarDecorations, - _emojis = emojis; + this.isCat = false, + this.instance, + @EmojisConverter() final Map emojis = const {}, + @OnlineStatusJsonConverter() this.onlineStatus, + final List badgeRoles = const []}) + : _avatarDecorations = avatarDecorations, + _emojis = emojis, + _badgeRoles = badgeRoles; - factory _$UserImpl.fromJson(Map json) => - _$$UserImplFromJson(json); + factory _$UserLiteImpl.fromJson(Map json) => + _$$UserLiteImplFromJson(json); @override final String id; @override - final String username; - @override - final String? host; - @override final String? name; @override - @OnlineStatusJsonConverter() - final OnlineStatus? onlineStatus; - final List _badgeRoles; + final String username; @override - @JsonKey() - List get badgeRoles { - if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_badgeRoles); - } - + final String? host; @override @UriConverter() final Uri avatarUrl; + @override + final String? avatarBlurhash; final List _avatarDecorations; @override @JsonKey() @@ -327,15 +320,13 @@ class _$UserImpl implements _User { } @override - final String? avatarBlurhash; - @override - final UserInstanceInfo? instance; + @JsonKey() + final bool isBot; @override @JsonKey() final bool isCat; @override - @JsonKey() - final bool isBot; + final UserInstanceInfo? instance; final Map _emojis; @override @JsonKey() @@ -346,36 +337,48 @@ class _$UserImpl implements _User { return EqualUnmodifiableMapView(_emojis); } + @override + @OnlineStatusJsonConverter() + final OnlineStatus? onlineStatus; + final List _badgeRoles; + @override + @JsonKey() + List get badgeRoles { + if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_badgeRoles); + } + @override String toString() { - return 'User(id: $id, username: $username, host: $host, name: $name, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles, avatarUrl: $avatarUrl, avatarDecorations: $avatarDecorations, avatarBlurhash: $avatarBlurhash, instance: $instance, isCat: $isCat, isBot: $isBot, emojis: $emojis)'; + return 'UserLite(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, instance: $instance, emojis: $emojis, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles)'; } @override bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UserImpl && + other is _$UserLiteImpl && (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && (identical(other.username, username) || other.username == username) && (identical(other.host, host) || other.host == host) && - (identical(other.name, name) || other.name == name) && - (identical(other.onlineStatus, onlineStatus) || - other.onlineStatus == onlineStatus) && - const DeepCollectionEquality() - .equals(other._badgeRoles, _badgeRoles) && (identical(other.avatarUrl, avatarUrl) || other.avatarUrl == avatarUrl) && - const DeepCollectionEquality() - .equals(other._avatarDecorations, _avatarDecorations) && (identical(other.avatarBlurhash, avatarBlurhash) || other.avatarBlurhash == avatarBlurhash) && + const DeepCollectionEquality() + .equals(other._avatarDecorations, _avatarDecorations) && + (identical(other.isBot, isBot) || other.isBot == isBot) && + (identical(other.isCat, isCat) || other.isCat == isCat) && (identical(other.instance, instance) || other.instance == instance) && - (identical(other.isCat, isCat) || other.isCat == isCat) && - (identical(other.isBot, isBot) || other.isBot == isBot) && - const DeepCollectionEquality().equals(other._emojis, _emojis)); + const DeepCollectionEquality().equals(other._emojis, _emojis) && + (identical(other.onlineStatus, onlineStatus) || + other.onlineStatus == onlineStatus) && + const DeepCollectionEquality() + .equals(other._badgeRoles, _badgeRoles)); } @JsonKey(ignore: true) @@ -383,83 +386,4500 @@ class _$UserImpl implements _User { int get hashCode => Object.hash( runtimeType, id, + name, username, host, - name, - onlineStatus, - const DeepCollectionEquality().hash(_badgeRoles), avatarUrl, - const DeepCollectionEquality().hash(_avatarDecorations), avatarBlurhash, - instance, - isCat, + const DeepCollectionEquality().hash(_avatarDecorations), isBot, - const DeepCollectionEquality().hash(_emojis)); + isCat, + instance, + const DeepCollectionEquality().hash(_emojis), + onlineStatus, + const DeepCollectionEquality().hash(_badgeRoles)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UserImplCopyWith<_$UserImpl> get copyWith => - __$$UserImplCopyWithImpl<_$UserImpl>(this, _$identity); + _$$UserLiteImplCopyWith<_$UserLiteImpl> get copyWith => + __$$UserLiteImplCopyWithImpl<_$UserLiteImpl>(this, _$identity); @override Map toJson() { - return _$$UserImplToJson( + return _$$UserLiteImplToJson( this, ); } } -abstract class _User implements User { - const factory _User( +abstract class _UserLite implements UserLite { + const factory _UserLite( {required final String id, + final String? name, required final String username, final String? host, - final String? name, - @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, - final List badgeRoles, @UriConverter() required final Uri avatarUrl, - final List avatarDecorations, final String? avatarBlurhash, - final UserInstanceInfo? instance, - final bool isCat, + final List avatarDecorations, final bool isBot, - @EmojisConverter() final Map emojis}) = _$UserImpl; + final bool isCat, + final UserInstanceInfo? instance, + @EmojisConverter() final Map emojis, + @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, + final List badgeRoles}) = _$UserLiteImpl; - factory _User.fromJson(Map json) = _$UserImpl.fromJson; + factory _UserLite.fromJson(Map json) = + _$UserLiteImpl.fromJson; @override String get id; @override - String get username; - @override - String? get host; - @override String? get name; @override - @OnlineStatusJsonConverter() - OnlineStatus? get onlineStatus; + String get username; @override - List get badgeRoles; + String? get host; @override @UriConverter() Uri get avatarUrl; @override - List get avatarDecorations; - @override String? get avatarBlurhash; @override - UserInstanceInfo? get instance; + List get avatarDecorations; + @override + bool get isBot; + @override + bool get isCat; + @override + UserInstanceInfo? get instance; + @override + @EmojisConverter() + Map get emojis; + @override + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus; + @override + List get badgeRoles; + @override + @JsonKey(ignore: true) + _$$UserLiteImplCopyWith<_$UserLiteImpl> get copyWith => + throw _privateConstructorUsedError; +} + +UserDetailedNotMe _$UserDetailedNotMeFromJson(Map json) { + return _UserDetailedNotMe.fromJson(json); +} + +/// @nodoc +mixin _$UserDetailedNotMe { + String get id => throw _privateConstructorUsedError; + String? get name => throw _privateConstructorUsedError; + String get username => throw _privateConstructorUsedError; + String? get host => throw _privateConstructorUsedError; + @UriConverter() + Uri get avatarUrl => throw _privateConstructorUsedError; + String? get avatarBlurhash => throw _privateConstructorUsedError; + List get avatarDecorations => + throw _privateConstructorUsedError; + bool get isBot => throw _privateConstructorUsedError; + bool get isCat => throw _privateConstructorUsedError; + UserInstanceInfo? get instance => throw _privateConstructorUsedError; + @EmojisConverter() + Map get emojis => throw _privateConstructorUsedError; + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; + List get badgeRoles => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get url => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get uri => throw _privateConstructorUsedError; + @DateTimeConverter() + DateTime get createdAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get updatedAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get lastFetchedAt => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get bannerUrl => throw _privateConstructorUsedError; + String? get bannerBlurhash => throw _privateConstructorUsedError; + bool get isLocked => throw _privateConstructorUsedError; + bool get isSilenced => throw _privateConstructorUsedError; + bool get isSuspended => throw _privateConstructorUsedError; + String? get description => throw _privateConstructorUsedError; + String? get location => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get birthday => throw _privateConstructorUsedError; + String? get lang => throw _privateConstructorUsedError; + List? get fields => throw _privateConstructorUsedError; + int get followersCount => throw _privateConstructorUsedError; + int get followingCount => throw _privateConstructorUsedError; + int get notesCount => throw _privateConstructorUsedError; + List? get pinnedNoteIds => throw _privateConstructorUsedError; + List? get pinnedNotes => throw _privateConstructorUsedError; + String? get pinnedPageId => throw _privateConstructorUsedError; + Map? get pinnedPage => throw _privateConstructorUsedError; + bool get publicReactions => throw _privateConstructorUsedError; + FFVisibility get ffVisibility => throw _privateConstructorUsedError; + bool get twoFactorEnabled => throw _privateConstructorUsedError; + bool get usePasswordLessLogin => throw _privateConstructorUsedError; + bool get securityKeys => throw _privateConstructorUsedError; + List? get roles => throw _privateConstructorUsedError; + String? get memo => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $UserDetailedNotMeCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $UserDetailedNotMeCopyWith<$Res> { + factory $UserDetailedNotMeCopyWith( + UserDetailedNotMe value, $Res Function(UserDetailedNotMe) then) = + _$UserDetailedNotMeCopyWithImpl<$Res, UserDetailedNotMe>; + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo}); + + $UserInstanceInfoCopyWith<$Res>? get instance; +} + +/// @nodoc +class _$UserDetailedNotMeCopyWithImpl<$Res, $Val extends UserDetailedNotMe> + implements $UserDetailedNotMeCopyWith<$Res> { + _$UserDetailedNotMeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + }) { + return _then(_value.copyWith( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value.avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value.emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value.badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value.fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value.pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value.pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value.pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value.roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $UserInstanceInfoCopyWith<$Res>? get instance { + if (_value.instance == null) { + return null; + } + + return $UserInstanceInfoCopyWith<$Res>(_value.instance!, (value) { + return _then(_value.copyWith(instance: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$UserDetailedNotMeImplCopyWith<$Res> + implements $UserDetailedNotMeCopyWith<$Res> { + factory _$$UserDetailedNotMeImplCopyWith(_$UserDetailedNotMeImpl value, + $Res Function(_$UserDetailedNotMeImpl) then) = + __$$UserDetailedNotMeImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo}); + + @override + $UserInstanceInfoCopyWith<$Res>? get instance; +} + +/// @nodoc +class __$$UserDetailedNotMeImplCopyWithImpl<$Res> + extends _$UserDetailedNotMeCopyWithImpl<$Res, _$UserDetailedNotMeImpl> + implements _$$UserDetailedNotMeImplCopyWith<$Res> { + __$$UserDetailedNotMeImplCopyWithImpl(_$UserDetailedNotMeImpl _value, + $Res Function(_$UserDetailedNotMeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + }) { + return _then(_$UserDetailedNotMeImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value._avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value._emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value._badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value._fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value._pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value._pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value._pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value._roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$UserDetailedNotMeImpl implements _UserDetailedNotMe { + const _$UserDetailedNotMeImpl( + {required this.id, + this.name, + required this.username, + this.host, + @UriConverter() required this.avatarUrl, + this.avatarBlurhash, + final List avatarDecorations = const [], + required this.isBot, + required this.isCat, + this.instance, + @EmojisConverter() final Map emojis = const {}, + @OnlineStatusJsonConverter() this.onlineStatus, + final List badgeRoles = const [], + @NullableUriConverter() this.url, + @NullableUriConverter() this.uri, + @DateTimeConverter() required this.createdAt, + @NullableDateTimeConverter() this.updatedAt, + @NullableDateTimeConverter() this.lastFetchedAt, + @NullableUriConverter() this.bannerUrl, + this.bannerBlurhash, + required this.isLocked, + required this.isSilenced, + required this.isSuspended, + this.description, + this.location, + @NullableDateTimeConverter() this.birthday, + this.lang, + final List? fields, + required this.followersCount, + required this.followingCount, + required this.notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + this.pinnedPageId, + final Map? pinnedPage, + required this.publicReactions, + required this.ffVisibility, + required this.twoFactorEnabled, + required this.usePasswordLessLogin, + required this.securityKeys, + final List? roles, + this.memo}) + : _avatarDecorations = avatarDecorations, + _emojis = emojis, + _badgeRoles = badgeRoles, + _fields = fields, + _pinnedNoteIds = pinnedNoteIds, + _pinnedNotes = pinnedNotes, + _pinnedPage = pinnedPage, + _roles = roles; + + factory _$UserDetailedNotMeImpl.fromJson(Map json) => + _$$UserDetailedNotMeImplFromJson(json); + + @override + final String id; + @override + final String? name; + @override + final String username; + @override + final String? host; + @override + @UriConverter() + final Uri avatarUrl; + @override + final String? avatarBlurhash; + final List _avatarDecorations; + @override + @JsonKey() + List get avatarDecorations { + if (_avatarDecorations is EqualUnmodifiableListView) + return _avatarDecorations; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_avatarDecorations); + } + + @override + final bool isBot; + @override + final bool isCat; + @override + final UserInstanceInfo? instance; + final Map _emojis; + @override + @JsonKey() + @EmojisConverter() + Map get emojis { + if (_emojis is EqualUnmodifiableMapView) return _emojis; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_emojis); + } + + @override + @OnlineStatusJsonConverter() + final OnlineStatus? onlineStatus; + final List _badgeRoles; + @override + @JsonKey() + List get badgeRoles { + if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_badgeRoles); + } + + @override + @NullableUriConverter() + final Uri? url; + @override + @NullableUriConverter() + final Uri? uri; + @override + @DateTimeConverter() + final DateTime createdAt; + @override + @NullableDateTimeConverter() + final DateTime? updatedAt; + @override + @NullableDateTimeConverter() + final DateTime? lastFetchedAt; + @override + @NullableUriConverter() + final Uri? bannerUrl; + @override + final String? bannerBlurhash; + @override + final bool isLocked; + @override + final bool isSilenced; + @override + final bool isSuspended; + @override + final String? description; + @override + final String? location; + @override + @NullableDateTimeConverter() + final DateTime? birthday; + @override + final String? lang; + final List? _fields; + @override + List? get fields { + final value = _fields; + if (value == null) return null; + if (_fields is EqualUnmodifiableListView) return _fields; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final int followersCount; + @override + final int followingCount; + @override + final int notesCount; + final List? _pinnedNoteIds; + @override + List? get pinnedNoteIds { + final value = _pinnedNoteIds; + if (value == null) return null; + if (_pinnedNoteIds is EqualUnmodifiableListView) return _pinnedNoteIds; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + final List? _pinnedNotes; + @override + List? get pinnedNotes { + final value = _pinnedNotes; + if (value == null) return null; + if (_pinnedNotes is EqualUnmodifiableListView) return _pinnedNotes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? pinnedPageId; + final Map? _pinnedPage; + @override + Map? get pinnedPage { + final value = _pinnedPage; + if (value == null) return null; + if (_pinnedPage is EqualUnmodifiableMapView) return _pinnedPage; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + final bool publicReactions; + @override + final FFVisibility ffVisibility; + @override + final bool twoFactorEnabled; + @override + final bool usePasswordLessLogin; + @override + final bool securityKeys; + final List? _roles; + @override + List? get roles { + final value = _roles; + if (value == null) return null; + if (_roles is EqualUnmodifiableListView) return _roles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? memo; + + @override + String toString() { + return 'UserDetailedNotMe(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, instance: $instance, emojis: $emojis, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles, url: $url, uri: $uri, createdAt: $createdAt, updatedAt: $updatedAt, lastFetchedAt: $lastFetchedAt, bannerUrl: $bannerUrl, bannerBlurhash: $bannerBlurhash, isLocked: $isLocked, isSilenced: $isSilenced, isSuspended: $isSuspended, description: $description, location: $location, birthday: $birthday, lang: $lang, fields: $fields, followersCount: $followersCount, followingCount: $followingCount, notesCount: $notesCount, pinnedNoteIds: $pinnedNoteIds, pinnedNotes: $pinnedNotes, pinnedPageId: $pinnedPageId, pinnedPage: $pinnedPage, publicReactions: $publicReactions, ffVisibility: $ffVisibility, twoFactorEnabled: $twoFactorEnabled, usePasswordLessLogin: $usePasswordLessLogin, securityKeys: $securityKeys, roles: $roles, memo: $memo)'; + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$UserDetailedNotMeImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.username, username) || + other.username == username) && + (identical(other.host, host) || other.host == host) && + (identical(other.avatarUrl, avatarUrl) || + other.avatarUrl == avatarUrl) && + (identical(other.avatarBlurhash, avatarBlurhash) || + other.avatarBlurhash == avatarBlurhash) && + const DeepCollectionEquality() + .equals(other._avatarDecorations, _avatarDecorations) && + (identical(other.isBot, isBot) || other.isBot == isBot) && + (identical(other.isCat, isCat) || other.isCat == isCat) && + (identical(other.instance, instance) || + other.instance == instance) && + const DeepCollectionEquality().equals(other._emojis, _emojis) && + (identical(other.onlineStatus, onlineStatus) || + other.onlineStatus == onlineStatus) && + const DeepCollectionEquality() + .equals(other._badgeRoles, _badgeRoles) && + (identical(other.url, url) || other.url == url) && + (identical(other.uri, uri) || other.uri == uri) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.lastFetchedAt, lastFetchedAt) || + other.lastFetchedAt == lastFetchedAt) && + (identical(other.bannerUrl, bannerUrl) || + other.bannerUrl == bannerUrl) && + (identical(other.bannerBlurhash, bannerBlurhash) || + other.bannerBlurhash == bannerBlurhash) && + (identical(other.isLocked, isLocked) || + other.isLocked == isLocked) && + (identical(other.isSilenced, isSilenced) || + other.isSilenced == isSilenced) && + (identical(other.isSuspended, isSuspended) || + other.isSuspended == isSuspended) && + (identical(other.description, description) || + other.description == description) && + (identical(other.location, location) || + other.location == location) && + (identical(other.birthday, birthday) || + other.birthday == birthday) && + (identical(other.lang, lang) || other.lang == lang) && + const DeepCollectionEquality().equals(other._fields, _fields) && + (identical(other.followersCount, followersCount) || + other.followersCount == followersCount) && + (identical(other.followingCount, followingCount) || + other.followingCount == followingCount) && + (identical(other.notesCount, notesCount) || + other.notesCount == notesCount) && + const DeepCollectionEquality() + .equals(other._pinnedNoteIds, _pinnedNoteIds) && + const DeepCollectionEquality() + .equals(other._pinnedNotes, _pinnedNotes) && + (identical(other.pinnedPageId, pinnedPageId) || + other.pinnedPageId == pinnedPageId) && + const DeepCollectionEquality() + .equals(other._pinnedPage, _pinnedPage) && + (identical(other.publicReactions, publicReactions) || + other.publicReactions == publicReactions) && + (identical(other.ffVisibility, ffVisibility) || + other.ffVisibility == ffVisibility) && + (identical(other.twoFactorEnabled, twoFactorEnabled) || + other.twoFactorEnabled == twoFactorEnabled) && + (identical(other.usePasswordLessLogin, usePasswordLessLogin) || + other.usePasswordLessLogin == usePasswordLessLogin) && + (identical(other.securityKeys, securityKeys) || + other.securityKeys == securityKeys) && + const DeepCollectionEquality().equals(other._roles, _roles) && + (identical(other.memo, memo) || other.memo == memo)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + name, + username, + host, + avatarUrl, + avatarBlurhash, + const DeepCollectionEquality().hash(_avatarDecorations), + isBot, + isCat, + instance, + const DeepCollectionEquality().hash(_emojis), + onlineStatus, + const DeepCollectionEquality().hash(_badgeRoles), + url, + uri, + createdAt, + updatedAt, + lastFetchedAt, + bannerUrl, + bannerBlurhash, + isLocked, + isSilenced, + isSuspended, + description, + location, + birthday, + lang, + const DeepCollectionEquality().hash(_fields), + followersCount, + followingCount, + notesCount, + const DeepCollectionEquality().hash(_pinnedNoteIds), + const DeepCollectionEquality().hash(_pinnedNotes), + pinnedPageId, + const DeepCollectionEquality().hash(_pinnedPage), + publicReactions, + ffVisibility, + twoFactorEnabled, + usePasswordLessLogin, + securityKeys, + const DeepCollectionEquality().hash(_roles), + memo + ]); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$UserDetailedNotMeImplCopyWith<_$UserDetailedNotMeImpl> get copyWith => + __$$UserDetailedNotMeImplCopyWithImpl<_$UserDetailedNotMeImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$UserDetailedNotMeImplToJson( + this, + ); + } +} + +abstract class _UserDetailedNotMe implements UserDetailedNotMe { + const factory _UserDetailedNotMe( + {required final String id, + final String? name, + required final String username, + final String? host, + @UriConverter() required final Uri avatarUrl, + final String? avatarBlurhash, + final List avatarDecorations, + required final bool isBot, + required final bool isCat, + final UserInstanceInfo? instance, + @EmojisConverter() final Map emojis, + @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, + final List badgeRoles, + @NullableUriConverter() final Uri? url, + @NullableUriConverter() final Uri? uri, + @DateTimeConverter() required final DateTime createdAt, + @NullableDateTimeConverter() final DateTime? updatedAt, + @NullableDateTimeConverter() final DateTime? lastFetchedAt, + @NullableUriConverter() final Uri? bannerUrl, + final String? bannerBlurhash, + required final bool isLocked, + required final bool isSilenced, + required final bool isSuspended, + final String? description, + final String? location, + @NullableDateTimeConverter() final DateTime? birthday, + final String? lang, + final List? fields, + required final int followersCount, + required final int followingCount, + required final int notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + final String? pinnedPageId, + final Map? pinnedPage, + required final bool publicReactions, + required final FFVisibility ffVisibility, + required final bool twoFactorEnabled, + required final bool usePasswordLessLogin, + required final bool securityKeys, + final List? roles, + final String? memo}) = _$UserDetailedNotMeImpl; + + factory _UserDetailedNotMe.fromJson(Map json) = + _$UserDetailedNotMeImpl.fromJson; + + @override + String get id; + @override + String? get name; + @override + String get username; + @override + String? get host; + @override + @UriConverter() + Uri get avatarUrl; + @override + String? get avatarBlurhash; + @override + List get avatarDecorations; + @override + bool get isBot; + @override + bool get isCat; + @override + UserInstanceInfo? get instance; + @override + @EmojisConverter() + Map get emojis; + @override + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus; + @override + List get badgeRoles; + @override + @NullableUriConverter() + Uri? get url; + @override + @NullableUriConverter() + Uri? get uri; + @override + @DateTimeConverter() + DateTime get createdAt; + @override + @NullableDateTimeConverter() + DateTime? get updatedAt; + @override + @NullableDateTimeConverter() + DateTime? get lastFetchedAt; + @override + @NullableUriConverter() + Uri? get bannerUrl; + @override + String? get bannerBlurhash; + @override + bool get isLocked; + @override + bool get isSilenced; + @override + bool get isSuspended; + @override + String? get description; + @override + String? get location; + @override + @NullableDateTimeConverter() + DateTime? get birthday; + @override + String? get lang; + @override + List? get fields; + @override + int get followersCount; + @override + int get followingCount; + @override + int get notesCount; + @override + List? get pinnedNoteIds; + @override + List? get pinnedNotes; + @override + String? get pinnedPageId; + @override + Map? get pinnedPage; + @override + bool get publicReactions; + @override + FFVisibility get ffVisibility; + @override + bool get twoFactorEnabled; + @override + bool get usePasswordLessLogin; + @override + bool get securityKeys; + @override + List? get roles; + @override + String? get memo; + @override + @JsonKey(ignore: true) + _$$UserDetailedNotMeImplCopyWith<_$UserDetailedNotMeImpl> get copyWith => + throw _privateConstructorUsedError; +} + +UserDetailedNotMeWithRelations _$UserDetailedNotMeWithRelationsFromJson( + Map json) { + return _UserDetailedNotMeWithRelations.fromJson(json); +} + +/// @nodoc +mixin _$UserDetailedNotMeWithRelations { + String get id => throw _privateConstructorUsedError; + String? get name => throw _privateConstructorUsedError; + String get username => throw _privateConstructorUsedError; + String? get host => throw _privateConstructorUsedError; + @UriConverter() + Uri get avatarUrl => throw _privateConstructorUsedError; + String? get avatarBlurhash => throw _privateConstructorUsedError; + List get avatarDecorations => + throw _privateConstructorUsedError; + bool get isBot => throw _privateConstructorUsedError; + bool get isCat => throw _privateConstructorUsedError; + UserInstanceInfo? get instance => throw _privateConstructorUsedError; + @EmojisConverter() + Map get emojis => throw _privateConstructorUsedError; + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; + List get badgeRoles => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get url => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get uri => throw _privateConstructorUsedError; + @DateTimeConverter() + DateTime get createdAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get updatedAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get lastFetchedAt => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get bannerUrl => throw _privateConstructorUsedError; + String? get bannerBlurhash => throw _privateConstructorUsedError; + bool get isLocked => throw _privateConstructorUsedError; + bool get isSilenced => throw _privateConstructorUsedError; + bool get isSuspended => throw _privateConstructorUsedError; + String? get description => throw _privateConstructorUsedError; + String? get location => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get birthday => throw _privateConstructorUsedError; + String? get lang => throw _privateConstructorUsedError; + List? get fields => throw _privateConstructorUsedError; + int get followersCount => throw _privateConstructorUsedError; + int get followingCount => throw _privateConstructorUsedError; + int get notesCount => throw _privateConstructorUsedError; + List? get pinnedNoteIds => throw _privateConstructorUsedError; + List? get pinnedNotes => throw _privateConstructorUsedError; + String? get pinnedPageId => throw _privateConstructorUsedError; + Map? get pinnedPage => throw _privateConstructorUsedError; + bool get publicReactions => throw _privateConstructorUsedError; + FFVisibility get ffVisibility => throw _privateConstructorUsedError; + bool get twoFactorEnabled => throw _privateConstructorUsedError; + bool get usePasswordLessLogin => throw _privateConstructorUsedError; + bool get securityKeys => throw _privateConstructorUsedError; + List? get roles => throw _privateConstructorUsedError; + String? get memo => throw _privateConstructorUsedError; + bool get isFollowing => throw _privateConstructorUsedError; + bool get isFollowed => throw _privateConstructorUsedError; + bool get hasPendingFollowRequestFromYou => throw _privateConstructorUsedError; + bool get hasPendingFollowRequestToYou => throw _privateConstructorUsedError; + bool get isBlocking => throw _privateConstructorUsedError; + bool get isBlocked => throw _privateConstructorUsedError; + bool get isMuted => throw _privateConstructorUsedError; + bool get isRenoteMuted => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $UserDetailedNotMeWithRelationsCopyWith + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $UserDetailedNotMeWithRelationsCopyWith<$Res> { + factory $UserDetailedNotMeWithRelationsCopyWith( + UserDetailedNotMeWithRelations value, + $Res Function(UserDetailedNotMeWithRelations) then) = + _$UserDetailedNotMeWithRelationsCopyWithImpl<$Res, + UserDetailedNotMeWithRelations>; + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo, + bool isFollowing, + bool isFollowed, + bool hasPendingFollowRequestFromYou, + bool hasPendingFollowRequestToYou, + bool isBlocking, + bool isBlocked, + bool isMuted, + bool isRenoteMuted}); + + $UserInstanceInfoCopyWith<$Res>? get instance; +} + +/// @nodoc +class _$UserDetailedNotMeWithRelationsCopyWithImpl<$Res, + $Val extends UserDetailedNotMeWithRelations> + implements $UserDetailedNotMeWithRelationsCopyWith<$Res> { + _$UserDetailedNotMeWithRelationsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + Object? isFollowing = null, + Object? isFollowed = null, + Object? hasPendingFollowRequestFromYou = null, + Object? hasPendingFollowRequestToYou = null, + Object? isBlocking = null, + Object? isBlocked = null, + Object? isMuted = null, + Object? isRenoteMuted = null, + }) { + return _then(_value.copyWith( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value.avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value.emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value.badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value.fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value.pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value.pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value.pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value.roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + isFollowing: null == isFollowing + ? _value.isFollowing + : isFollowing // ignore: cast_nullable_to_non_nullable + as bool, + isFollowed: null == isFollowed + ? _value.isFollowed + : isFollowed // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingFollowRequestFromYou: null == hasPendingFollowRequestFromYou + ? _value.hasPendingFollowRequestFromYou + : hasPendingFollowRequestFromYou // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingFollowRequestToYou: null == hasPendingFollowRequestToYou + ? _value.hasPendingFollowRequestToYou + : hasPendingFollowRequestToYou // ignore: cast_nullable_to_non_nullable + as bool, + isBlocking: null == isBlocking + ? _value.isBlocking + : isBlocking // ignore: cast_nullable_to_non_nullable + as bool, + isBlocked: null == isBlocked + ? _value.isBlocked + : isBlocked // ignore: cast_nullable_to_non_nullable + as bool, + isMuted: null == isMuted + ? _value.isMuted + : isMuted // ignore: cast_nullable_to_non_nullable + as bool, + isRenoteMuted: null == isRenoteMuted + ? _value.isRenoteMuted + : isRenoteMuted // ignore: cast_nullable_to_non_nullable + as bool, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $UserInstanceInfoCopyWith<$Res>? get instance { + if (_value.instance == null) { + return null; + } + + return $UserInstanceInfoCopyWith<$Res>(_value.instance!, (value) { + return _then(_value.copyWith(instance: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$UserDetailedNotMeWithRelationsImplCopyWith<$Res> + implements $UserDetailedNotMeWithRelationsCopyWith<$Res> { + factory _$$UserDetailedNotMeWithRelationsImplCopyWith( + _$UserDetailedNotMeWithRelationsImpl value, + $Res Function(_$UserDetailedNotMeWithRelationsImpl) then) = + __$$UserDetailedNotMeWithRelationsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo, + bool isFollowing, + bool isFollowed, + bool hasPendingFollowRequestFromYou, + bool hasPendingFollowRequestToYou, + bool isBlocking, + bool isBlocked, + bool isMuted, + bool isRenoteMuted}); + + @override + $UserInstanceInfoCopyWith<$Res>? get instance; +} + +/// @nodoc +class __$$UserDetailedNotMeWithRelationsImplCopyWithImpl<$Res> + extends _$UserDetailedNotMeWithRelationsCopyWithImpl<$Res, + _$UserDetailedNotMeWithRelationsImpl> + implements _$$UserDetailedNotMeWithRelationsImplCopyWith<$Res> { + __$$UserDetailedNotMeWithRelationsImplCopyWithImpl( + _$UserDetailedNotMeWithRelationsImpl _value, + $Res Function(_$UserDetailedNotMeWithRelationsImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + Object? isFollowing = null, + Object? isFollowed = null, + Object? hasPendingFollowRequestFromYou = null, + Object? hasPendingFollowRequestToYou = null, + Object? isBlocking = null, + Object? isBlocked = null, + Object? isMuted = null, + Object? isRenoteMuted = null, + }) { + return _then(_$UserDetailedNotMeWithRelationsImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value._avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value._emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value._badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value._fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value._pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value._pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value._pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value._roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + isFollowing: null == isFollowing + ? _value.isFollowing + : isFollowing // ignore: cast_nullable_to_non_nullable + as bool, + isFollowed: null == isFollowed + ? _value.isFollowed + : isFollowed // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingFollowRequestFromYou: null == hasPendingFollowRequestFromYou + ? _value.hasPendingFollowRequestFromYou + : hasPendingFollowRequestFromYou // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingFollowRequestToYou: null == hasPendingFollowRequestToYou + ? _value.hasPendingFollowRequestToYou + : hasPendingFollowRequestToYou // ignore: cast_nullable_to_non_nullable + as bool, + isBlocking: null == isBlocking + ? _value.isBlocking + : isBlocking // ignore: cast_nullable_to_non_nullable + as bool, + isBlocked: null == isBlocked + ? _value.isBlocked + : isBlocked // ignore: cast_nullable_to_non_nullable + as bool, + isMuted: null == isMuted + ? _value.isMuted + : isMuted // ignore: cast_nullable_to_non_nullable + as bool, + isRenoteMuted: null == isRenoteMuted + ? _value.isRenoteMuted + : isRenoteMuted // ignore: cast_nullable_to_non_nullable + as bool, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$UserDetailedNotMeWithRelationsImpl + implements _UserDetailedNotMeWithRelations { + const _$UserDetailedNotMeWithRelationsImpl( + {required this.id, + this.name, + required this.username, + this.host, + @UriConverter() required this.avatarUrl, + this.avatarBlurhash, + final List avatarDecorations = const [], + required this.isBot, + required this.isCat, + this.instance, + @EmojisConverter() final Map emojis = const {}, + @OnlineStatusJsonConverter() this.onlineStatus, + final List badgeRoles = const [], + @NullableUriConverter() this.url, + @NullableUriConverter() this.uri, + @DateTimeConverter() required this.createdAt, + @NullableDateTimeConverter() this.updatedAt, + @NullableDateTimeConverter() this.lastFetchedAt, + @NullableUriConverter() this.bannerUrl, + this.bannerBlurhash, + required this.isLocked, + required this.isSilenced, + required this.isSuspended, + this.description, + this.location, + @NullableDateTimeConverter() this.birthday, + this.lang, + final List? fields, + required this.followersCount, + required this.followingCount, + required this.notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + this.pinnedPageId, + final Map? pinnedPage, + required this.publicReactions, + required this.ffVisibility, + required this.twoFactorEnabled, + required this.usePasswordLessLogin, + required this.securityKeys, + final List? roles, + this.memo, + required this.isFollowing, + required this.isFollowed, + required this.hasPendingFollowRequestFromYou, + required this.hasPendingFollowRequestToYou, + required this.isBlocking, + required this.isBlocked, + required this.isMuted, + required this.isRenoteMuted}) + : _avatarDecorations = avatarDecorations, + _emojis = emojis, + _badgeRoles = badgeRoles, + _fields = fields, + _pinnedNoteIds = pinnedNoteIds, + _pinnedNotes = pinnedNotes, + _pinnedPage = pinnedPage, + _roles = roles; + + factory _$UserDetailedNotMeWithRelationsImpl.fromJson( + Map json) => + _$$UserDetailedNotMeWithRelationsImplFromJson(json); + + @override + final String id; + @override + final String? name; + @override + final String username; + @override + final String? host; + @override + @UriConverter() + final Uri avatarUrl; + @override + final String? avatarBlurhash; + final List _avatarDecorations; + @override + @JsonKey() + List get avatarDecorations { + if (_avatarDecorations is EqualUnmodifiableListView) + return _avatarDecorations; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_avatarDecorations); + } + + @override + final bool isBot; + @override + final bool isCat; + @override + final UserInstanceInfo? instance; + final Map _emojis; + @override + @JsonKey() + @EmojisConverter() + Map get emojis { + if (_emojis is EqualUnmodifiableMapView) return _emojis; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_emojis); + } + + @override + @OnlineStatusJsonConverter() + final OnlineStatus? onlineStatus; + final List _badgeRoles; + @override + @JsonKey() + List get badgeRoles { + if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_badgeRoles); + } + + @override + @NullableUriConverter() + final Uri? url; + @override + @NullableUriConverter() + final Uri? uri; + @override + @DateTimeConverter() + final DateTime createdAt; + @override + @NullableDateTimeConverter() + final DateTime? updatedAt; + @override + @NullableDateTimeConverter() + final DateTime? lastFetchedAt; + @override + @NullableUriConverter() + final Uri? bannerUrl; + @override + final String? bannerBlurhash; + @override + final bool isLocked; + @override + final bool isSilenced; + @override + final bool isSuspended; + @override + final String? description; + @override + final String? location; + @override + @NullableDateTimeConverter() + final DateTime? birthday; + @override + final String? lang; + final List? _fields; + @override + List? get fields { + final value = _fields; + if (value == null) return null; + if (_fields is EqualUnmodifiableListView) return _fields; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final int followersCount; + @override + final int followingCount; + @override + final int notesCount; + final List? _pinnedNoteIds; + @override + List? get pinnedNoteIds { + final value = _pinnedNoteIds; + if (value == null) return null; + if (_pinnedNoteIds is EqualUnmodifiableListView) return _pinnedNoteIds; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + final List? _pinnedNotes; + @override + List? get pinnedNotes { + final value = _pinnedNotes; + if (value == null) return null; + if (_pinnedNotes is EqualUnmodifiableListView) return _pinnedNotes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? pinnedPageId; + final Map? _pinnedPage; + @override + Map? get pinnedPage { + final value = _pinnedPage; + if (value == null) return null; + if (_pinnedPage is EqualUnmodifiableMapView) return _pinnedPage; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + final bool publicReactions; + @override + final FFVisibility ffVisibility; + @override + final bool twoFactorEnabled; + @override + final bool usePasswordLessLogin; + @override + final bool securityKeys; + final List? _roles; + @override + List? get roles { + final value = _roles; + if (value == null) return null; + if (_roles is EqualUnmodifiableListView) return _roles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? memo; + @override + final bool isFollowing; + @override + final bool isFollowed; + @override + final bool hasPendingFollowRequestFromYou; + @override + final bool hasPendingFollowRequestToYou; + @override + final bool isBlocking; + @override + final bool isBlocked; + @override + final bool isMuted; + @override + final bool isRenoteMuted; + + @override + String toString() { + return 'UserDetailedNotMeWithRelations(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, instance: $instance, emojis: $emojis, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles, url: $url, uri: $uri, createdAt: $createdAt, updatedAt: $updatedAt, lastFetchedAt: $lastFetchedAt, bannerUrl: $bannerUrl, bannerBlurhash: $bannerBlurhash, isLocked: $isLocked, isSilenced: $isSilenced, isSuspended: $isSuspended, description: $description, location: $location, birthday: $birthday, lang: $lang, fields: $fields, followersCount: $followersCount, followingCount: $followingCount, notesCount: $notesCount, pinnedNoteIds: $pinnedNoteIds, pinnedNotes: $pinnedNotes, pinnedPageId: $pinnedPageId, pinnedPage: $pinnedPage, publicReactions: $publicReactions, ffVisibility: $ffVisibility, twoFactorEnabled: $twoFactorEnabled, usePasswordLessLogin: $usePasswordLessLogin, securityKeys: $securityKeys, roles: $roles, memo: $memo, isFollowing: $isFollowing, isFollowed: $isFollowed, hasPendingFollowRequestFromYou: $hasPendingFollowRequestFromYou, hasPendingFollowRequestToYou: $hasPendingFollowRequestToYou, isBlocking: $isBlocking, isBlocked: $isBlocked, isMuted: $isMuted, isRenoteMuted: $isRenoteMuted)'; + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$UserDetailedNotMeWithRelationsImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.username, username) || + other.username == username) && + (identical(other.host, host) || other.host == host) && + (identical(other.avatarUrl, avatarUrl) || + other.avatarUrl == avatarUrl) && + (identical(other.avatarBlurhash, avatarBlurhash) || + other.avatarBlurhash == avatarBlurhash) && + const DeepCollectionEquality() + .equals(other._avatarDecorations, _avatarDecorations) && + (identical(other.isBot, isBot) || other.isBot == isBot) && + (identical(other.isCat, isCat) || other.isCat == isCat) && + (identical(other.instance, instance) || + other.instance == instance) && + const DeepCollectionEquality().equals(other._emojis, _emojis) && + (identical(other.onlineStatus, onlineStatus) || + other.onlineStatus == onlineStatus) && + const DeepCollectionEquality() + .equals(other._badgeRoles, _badgeRoles) && + (identical(other.url, url) || other.url == url) && + (identical(other.uri, uri) || other.uri == uri) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.lastFetchedAt, lastFetchedAt) || + other.lastFetchedAt == lastFetchedAt) && + (identical(other.bannerUrl, bannerUrl) || + other.bannerUrl == bannerUrl) && + (identical(other.bannerBlurhash, bannerBlurhash) || + other.bannerBlurhash == bannerBlurhash) && + (identical(other.isLocked, isLocked) || + other.isLocked == isLocked) && + (identical(other.isSilenced, isSilenced) || + other.isSilenced == isSilenced) && + (identical(other.isSuspended, isSuspended) || + other.isSuspended == isSuspended) && + (identical(other.description, description) || + other.description == description) && + (identical(other.location, location) || + other.location == location) && + (identical(other.birthday, birthday) || + other.birthday == birthday) && + (identical(other.lang, lang) || other.lang == lang) && + const DeepCollectionEquality().equals(other._fields, _fields) && + (identical(other.followersCount, followersCount) || + other.followersCount == followersCount) && + (identical(other.followingCount, followingCount) || + other.followingCount == followingCount) && + (identical(other.notesCount, notesCount) || + other.notesCount == notesCount) && + const DeepCollectionEquality() + .equals(other._pinnedNoteIds, _pinnedNoteIds) && + const DeepCollectionEquality() + .equals(other._pinnedNotes, _pinnedNotes) && + (identical(other.pinnedPageId, pinnedPageId) || + other.pinnedPageId == pinnedPageId) && + const DeepCollectionEquality() + .equals(other._pinnedPage, _pinnedPage) && + (identical(other.publicReactions, publicReactions) || + other.publicReactions == publicReactions) && + (identical(other.ffVisibility, ffVisibility) || + other.ffVisibility == ffVisibility) && + (identical(other.twoFactorEnabled, twoFactorEnabled) || + other.twoFactorEnabled == twoFactorEnabled) && + (identical(other.usePasswordLessLogin, usePasswordLessLogin) || + other.usePasswordLessLogin == usePasswordLessLogin) && + (identical(other.securityKeys, securityKeys) || + other.securityKeys == securityKeys) && + const DeepCollectionEquality().equals(other._roles, _roles) && + (identical(other.memo, memo) || other.memo == memo) && + (identical(other.isFollowing, isFollowing) || + other.isFollowing == isFollowing) && + (identical(other.isFollowed, isFollowed) || + other.isFollowed == isFollowed) && + (identical(other.hasPendingFollowRequestFromYou, + hasPendingFollowRequestFromYou) || + other.hasPendingFollowRequestFromYou == + hasPendingFollowRequestFromYou) && + (identical(other.hasPendingFollowRequestToYou, hasPendingFollowRequestToYou) || + other.hasPendingFollowRequestToYou == + hasPendingFollowRequestToYou) && + (identical(other.isBlocking, isBlocking) || + other.isBlocking == isBlocking) && + (identical(other.isBlocked, isBlocked) || + other.isBlocked == isBlocked) && + (identical(other.isMuted, isMuted) || other.isMuted == isMuted) && + (identical(other.isRenoteMuted, isRenoteMuted) || + other.isRenoteMuted == isRenoteMuted)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + name, + username, + host, + avatarUrl, + avatarBlurhash, + const DeepCollectionEquality().hash(_avatarDecorations), + isBot, + isCat, + instance, + const DeepCollectionEquality().hash(_emojis), + onlineStatus, + const DeepCollectionEquality().hash(_badgeRoles), + url, + uri, + createdAt, + updatedAt, + lastFetchedAt, + bannerUrl, + bannerBlurhash, + isLocked, + isSilenced, + isSuspended, + description, + location, + birthday, + lang, + const DeepCollectionEquality().hash(_fields), + followersCount, + followingCount, + notesCount, + const DeepCollectionEquality().hash(_pinnedNoteIds), + const DeepCollectionEquality().hash(_pinnedNotes), + pinnedPageId, + const DeepCollectionEquality().hash(_pinnedPage), + publicReactions, + ffVisibility, + twoFactorEnabled, + usePasswordLessLogin, + securityKeys, + const DeepCollectionEquality().hash(_roles), + memo, + isFollowing, + isFollowed, + hasPendingFollowRequestFromYou, + hasPendingFollowRequestToYou, + isBlocking, + isBlocked, + isMuted, + isRenoteMuted + ]); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$UserDetailedNotMeWithRelationsImplCopyWith< + _$UserDetailedNotMeWithRelationsImpl> + get copyWith => __$$UserDetailedNotMeWithRelationsImplCopyWithImpl< + _$UserDetailedNotMeWithRelationsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$UserDetailedNotMeWithRelationsImplToJson( + this, + ); + } +} + +abstract class _UserDetailedNotMeWithRelations + implements UserDetailedNotMeWithRelations { + const factory _UserDetailedNotMeWithRelations( + {required final String id, + final String? name, + required final String username, + final String? host, + @UriConverter() required final Uri avatarUrl, + final String? avatarBlurhash, + final List avatarDecorations, + required final bool isBot, + required final bool isCat, + final UserInstanceInfo? instance, + @EmojisConverter() final Map emojis, + @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, + final List badgeRoles, + @NullableUriConverter() final Uri? url, + @NullableUriConverter() final Uri? uri, + @DateTimeConverter() required final DateTime createdAt, + @NullableDateTimeConverter() final DateTime? updatedAt, + @NullableDateTimeConverter() final DateTime? lastFetchedAt, + @NullableUriConverter() final Uri? bannerUrl, + final String? bannerBlurhash, + required final bool isLocked, + required final bool isSilenced, + required final bool isSuspended, + final String? description, + final String? location, + @NullableDateTimeConverter() final DateTime? birthday, + final String? lang, + final List? fields, + required final int followersCount, + required final int followingCount, + required final int notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + final String? pinnedPageId, + final Map? pinnedPage, + required final bool publicReactions, + required final FFVisibility ffVisibility, + required final bool twoFactorEnabled, + required final bool usePasswordLessLogin, + required final bool securityKeys, + final List? roles, + final String? memo, + required final bool isFollowing, + required final bool isFollowed, + required final bool hasPendingFollowRequestFromYou, + required final bool hasPendingFollowRequestToYou, + required final bool isBlocking, + required final bool isBlocked, + required final bool isMuted, + required final bool isRenoteMuted}) = + _$UserDetailedNotMeWithRelationsImpl; + + factory _UserDetailedNotMeWithRelations.fromJson(Map json) = + _$UserDetailedNotMeWithRelationsImpl.fromJson; + + @override + String get id; + @override + String? get name; + @override + String get username; + @override + String? get host; + @override + @UriConverter() + Uri get avatarUrl; + @override + String? get avatarBlurhash; + @override + List get avatarDecorations; + @override + bool get isBot; + @override + bool get isCat; + @override + UserInstanceInfo? get instance; + @override + @EmojisConverter() + Map get emojis; + @override + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus; + @override + List get badgeRoles; + @override + @NullableUriConverter() + Uri? get url; + @override + @NullableUriConverter() + Uri? get uri; + @override + @DateTimeConverter() + DateTime get createdAt; + @override + @NullableDateTimeConverter() + DateTime? get updatedAt; + @override + @NullableDateTimeConverter() + DateTime? get lastFetchedAt; + @override + @NullableUriConverter() + Uri? get bannerUrl; + @override + String? get bannerBlurhash; + @override + bool get isLocked; + @override + bool get isSilenced; + @override + bool get isSuspended; + @override + String? get description; + @override + String? get location; + @override + @NullableDateTimeConverter() + DateTime? get birthday; + @override + String? get lang; + @override + List? get fields; + @override + int get followersCount; + @override + int get followingCount; + @override + int get notesCount; + @override + List? get pinnedNoteIds; + @override + List? get pinnedNotes; + @override + String? get pinnedPageId; + @override + Map? get pinnedPage; + @override + bool get publicReactions; + @override + FFVisibility get ffVisibility; + @override + bool get twoFactorEnabled; + @override + bool get usePasswordLessLogin; + @override + bool get securityKeys; + @override + List? get roles; + @override + String? get memo; + @override + bool get isFollowing; + @override + bool get isFollowed; + @override + bool get hasPendingFollowRequestFromYou; + @override + bool get hasPendingFollowRequestToYou; + @override + bool get isBlocking; + @override + bool get isBlocked; + @override + bool get isMuted; + @override + bool get isRenoteMuted; + @override + @JsonKey(ignore: true) + _$$UserDetailedNotMeWithRelationsImplCopyWith< + _$UserDetailedNotMeWithRelationsImpl> + get copyWith => throw _privateConstructorUsedError; +} + +MeDetailed _$MeDetailedFromJson(Map json) { + return _MeDetailed.fromJson(json); +} + +/// @nodoc +mixin _$MeDetailed { + String get id => throw _privateConstructorUsedError; + String? get name => throw _privateConstructorUsedError; + String get username => throw _privateConstructorUsedError; + String? get host => throw _privateConstructorUsedError; + @UriConverter() + Uri get avatarUrl => throw _privateConstructorUsedError; + String? get avatarBlurhash => throw _privateConstructorUsedError; + List get avatarDecorations => + throw _privateConstructorUsedError; + bool get isBot => throw _privateConstructorUsedError; + bool get isCat => throw _privateConstructorUsedError; + UserInstanceInfo? get instance => throw _privateConstructorUsedError; + @EmojisConverter() + Map get emojis => throw _privateConstructorUsedError; + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; + List get badgeRoles => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get url => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get uri => throw _privateConstructorUsedError; + @DateTimeConverter() + DateTime get createdAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get updatedAt => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get lastFetchedAt => throw _privateConstructorUsedError; + @NullableUriConverter() + Uri? get bannerUrl => throw _privateConstructorUsedError; + String? get bannerBlurhash => throw _privateConstructorUsedError; + bool get isLocked => throw _privateConstructorUsedError; + bool get isSilenced => throw _privateConstructorUsedError; + bool get isSuspended => throw _privateConstructorUsedError; + String? get description => throw _privateConstructorUsedError; + String? get location => throw _privateConstructorUsedError; + @NullableDateTimeConverter() + DateTime? get birthday => throw _privateConstructorUsedError; + String? get lang => throw _privateConstructorUsedError; + List? get fields => throw _privateConstructorUsedError; + int get followersCount => throw _privateConstructorUsedError; + int get followingCount => throw _privateConstructorUsedError; + int get notesCount => throw _privateConstructorUsedError; + List? get pinnedNoteIds => throw _privateConstructorUsedError; + List? get pinnedNotes => throw _privateConstructorUsedError; + String? get pinnedPageId => throw _privateConstructorUsedError; + Map? get pinnedPage => throw _privateConstructorUsedError; + bool get publicReactions => throw _privateConstructorUsedError; + FFVisibility get ffVisibility => throw _privateConstructorUsedError; + bool get twoFactorEnabled => throw _privateConstructorUsedError; + bool get usePasswordLessLogin => throw _privateConstructorUsedError; + bool get securityKeys => throw _privateConstructorUsedError; + List? get roles => throw _privateConstructorUsedError; + String? get memo => throw _privateConstructorUsedError; + String? get avatarId => throw _privateConstructorUsedError; + String? get bannerId => throw _privateConstructorUsedError; + bool get isModerator => throw _privateConstructorUsedError; + bool get isAdmin => throw _privateConstructorUsedError; + bool get injectFeaturedNote => throw _privateConstructorUsedError; + bool get receiveAnnouncementEmail => throw _privateConstructorUsedError; + bool get alwaysMarkNsfw => throw _privateConstructorUsedError; + bool get autoSensitive => throw _privateConstructorUsedError; + bool get carefulBot => throw _privateConstructorUsedError; + bool get autoAcceptFollowed => throw _privateConstructorUsedError; + bool get noCrawle => throw _privateConstructorUsedError; + bool get isExplorable => throw _privateConstructorUsedError; + bool get isDeleted => throw _privateConstructorUsedError; + bool get hideOnlineStatus => throw _privateConstructorUsedError; + bool get hasUnreadSpecifiedNotes => throw _privateConstructorUsedError; + bool get hasUnreadMentions => throw _privateConstructorUsedError; + bool get hasUnreadAnnouncement => throw _privateConstructorUsedError; + bool get hasUnreadAntenna => throw _privateConstructorUsedError; + bool get hasUnreadChannel => throw _privateConstructorUsedError; + bool get hasUnreadNotification => throw _privateConstructorUsedError; + bool get hasPendingReceivedFollowRequest => + throw _privateConstructorUsedError; + int? get unreadNotificationsCount => throw _privateConstructorUsedError; + List get unreadAnnouncements => + throw _privateConstructorUsedError; + @MuteWordsConverter() + List get mutedWords => throw _privateConstructorUsedError; + @MuteWordsConverter() + List get hardMutedWords => throw _privateConstructorUsedError; + List get mutedInstances => throw _privateConstructorUsedError; + @Deprecated("Deprecated in Misskey 2023.9.2") + List? get mutingNotificationTypes => + throw _privateConstructorUsedError; + dynamic get notificationRecieveConfig => throw _privateConstructorUsedError; + List get emailNotificationTypes => throw _privateConstructorUsedError; + List get achievements => throw _privateConstructorUsedError; + int get loggedInDays => throw _privateConstructorUsedError; + UserPolicies get policies => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $MeDetailedCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $MeDetailedCopyWith<$Res> { + factory $MeDetailedCopyWith( + MeDetailed value, $Res Function(MeDetailed) then) = + _$MeDetailedCopyWithImpl<$Res, MeDetailed>; + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo, + String? avatarId, + String? bannerId, + bool isModerator, + bool isAdmin, + bool injectFeaturedNote, + bool receiveAnnouncementEmail, + bool alwaysMarkNsfw, + bool autoSensitive, + bool carefulBot, + bool autoAcceptFollowed, + bool noCrawle, + bool isExplorable, + bool isDeleted, + bool hideOnlineStatus, + bool hasUnreadSpecifiedNotes, + bool hasUnreadMentions, + bool hasUnreadAnnouncement, + bool hasUnreadAntenna, + bool hasUnreadChannel, + bool hasUnreadNotification, + bool hasPendingReceivedFollowRequest, + int? unreadNotificationsCount, + List unreadAnnouncements, + @MuteWordsConverter() List mutedWords, + @MuteWordsConverter() List hardMutedWords, + List mutedInstances, + @Deprecated("Deprecated in Misskey 2023.9.2") + List? mutingNotificationTypes, + dynamic notificationRecieveConfig, + List emailNotificationTypes, + List achievements, + int loggedInDays, + UserPolicies policies}); + + $UserInstanceInfoCopyWith<$Res>? get instance; + $UserPoliciesCopyWith<$Res> get policies; +} + +/// @nodoc +class _$MeDetailedCopyWithImpl<$Res, $Val extends MeDetailed> + implements $MeDetailedCopyWith<$Res> { + _$MeDetailedCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + Object? avatarId = freezed, + Object? bannerId = freezed, + Object? isModerator = null, + Object? isAdmin = null, + Object? injectFeaturedNote = null, + Object? receiveAnnouncementEmail = null, + Object? alwaysMarkNsfw = null, + Object? autoSensitive = null, + Object? carefulBot = null, + Object? autoAcceptFollowed = null, + Object? noCrawle = null, + Object? isExplorable = null, + Object? isDeleted = null, + Object? hideOnlineStatus = null, + Object? hasUnreadSpecifiedNotes = null, + Object? hasUnreadMentions = null, + Object? hasUnreadAnnouncement = null, + Object? hasUnreadAntenna = null, + Object? hasUnreadChannel = null, + Object? hasUnreadNotification = null, + Object? hasPendingReceivedFollowRequest = null, + Object? unreadNotificationsCount = freezed, + Object? unreadAnnouncements = null, + Object? mutedWords = null, + Object? hardMutedWords = null, + Object? mutedInstances = null, + Object? mutingNotificationTypes = freezed, + Object? notificationRecieveConfig = freezed, + Object? emailNotificationTypes = null, + Object? achievements = null, + Object? loggedInDays = null, + Object? policies = null, + }) { + return _then(_value.copyWith( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value.avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value.emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value.badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value.fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value.pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value.pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value.pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value.roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + avatarId: freezed == avatarId + ? _value.avatarId + : avatarId // ignore: cast_nullable_to_non_nullable + as String?, + bannerId: freezed == bannerId + ? _value.bannerId + : bannerId // ignore: cast_nullable_to_non_nullable + as String?, + isModerator: null == isModerator + ? _value.isModerator + : isModerator // ignore: cast_nullable_to_non_nullable + as bool, + isAdmin: null == isAdmin + ? _value.isAdmin + : isAdmin // ignore: cast_nullable_to_non_nullable + as bool, + injectFeaturedNote: null == injectFeaturedNote + ? _value.injectFeaturedNote + : injectFeaturedNote // ignore: cast_nullable_to_non_nullable + as bool, + receiveAnnouncementEmail: null == receiveAnnouncementEmail + ? _value.receiveAnnouncementEmail + : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable + as bool, + alwaysMarkNsfw: null == alwaysMarkNsfw + ? _value.alwaysMarkNsfw + : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable + as bool, + autoSensitive: null == autoSensitive + ? _value.autoSensitive + : autoSensitive // ignore: cast_nullable_to_non_nullable + as bool, + carefulBot: null == carefulBot + ? _value.carefulBot + : carefulBot // ignore: cast_nullable_to_non_nullable + as bool, + autoAcceptFollowed: null == autoAcceptFollowed + ? _value.autoAcceptFollowed + : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable + as bool, + noCrawle: null == noCrawle + ? _value.noCrawle + : noCrawle // ignore: cast_nullable_to_non_nullable + as bool, + isExplorable: null == isExplorable + ? _value.isExplorable + : isExplorable // ignore: cast_nullable_to_non_nullable + as bool, + isDeleted: null == isDeleted + ? _value.isDeleted + : isDeleted // ignore: cast_nullable_to_non_nullable + as bool, + hideOnlineStatus: null == hideOnlineStatus + ? _value.hideOnlineStatus + : hideOnlineStatus // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadSpecifiedNotes: null == hasUnreadSpecifiedNotes + ? _value.hasUnreadSpecifiedNotes + : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadMentions: null == hasUnreadMentions + ? _value.hasUnreadMentions + : hasUnreadMentions // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadAnnouncement: null == hasUnreadAnnouncement + ? _value.hasUnreadAnnouncement + : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadAntenna: null == hasUnreadAntenna + ? _value.hasUnreadAntenna + : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadChannel: null == hasUnreadChannel + ? _value.hasUnreadChannel + : hasUnreadChannel // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadNotification: null == hasUnreadNotification + ? _value.hasUnreadNotification + : hasUnreadNotification // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingReceivedFollowRequest: null == hasPendingReceivedFollowRequest + ? _value.hasPendingReceivedFollowRequest + : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable + as bool, + unreadNotificationsCount: freezed == unreadNotificationsCount + ? _value.unreadNotificationsCount + : unreadNotificationsCount // ignore: cast_nullable_to_non_nullable + as int?, + unreadAnnouncements: null == unreadAnnouncements + ? _value.unreadAnnouncements + : unreadAnnouncements // ignore: cast_nullable_to_non_nullable + as List, + mutedWords: null == mutedWords + ? _value.mutedWords + : mutedWords // ignore: cast_nullable_to_non_nullable + as List, + hardMutedWords: null == hardMutedWords + ? _value.hardMutedWords + : hardMutedWords // ignore: cast_nullable_to_non_nullable + as List, + mutedInstances: null == mutedInstances + ? _value.mutedInstances + : mutedInstances // ignore: cast_nullable_to_non_nullable + as List, + mutingNotificationTypes: freezed == mutingNotificationTypes + ? _value.mutingNotificationTypes + : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable + as List?, + notificationRecieveConfig: freezed == notificationRecieveConfig + ? _value.notificationRecieveConfig + : notificationRecieveConfig // ignore: cast_nullable_to_non_nullable + as dynamic, + emailNotificationTypes: null == emailNotificationTypes + ? _value.emailNotificationTypes + : emailNotificationTypes // ignore: cast_nullable_to_non_nullable + as List, + achievements: null == achievements + ? _value.achievements + : achievements // ignore: cast_nullable_to_non_nullable + as List, + loggedInDays: null == loggedInDays + ? _value.loggedInDays + : loggedInDays // ignore: cast_nullable_to_non_nullable + as int, + policies: null == policies + ? _value.policies + : policies // ignore: cast_nullable_to_non_nullable + as UserPolicies, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $UserInstanceInfoCopyWith<$Res>? get instance { + if (_value.instance == null) { + return null; + } + + return $UserInstanceInfoCopyWith<$Res>(_value.instance!, (value) { + return _then(_value.copyWith(instance: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $UserPoliciesCopyWith<$Res> get policies { + return $UserPoliciesCopyWith<$Res>(_value.policies, (value) { + return _then(_value.copyWith(policies: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$MeDetailedImplCopyWith<$Res> + implements $MeDetailedCopyWith<$Res> { + factory _$$MeDetailedImplCopyWith( + _$MeDetailedImpl value, $Res Function(_$MeDetailedImpl) then) = + __$$MeDetailedImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String id, + String? name, + String username, + String? host, + @UriConverter() Uri avatarUrl, + String? avatarBlurhash, + List avatarDecorations, + bool isBot, + bool isCat, + UserInstanceInfo? instance, + @EmojisConverter() Map emojis, + @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, + List badgeRoles, + @NullableUriConverter() Uri? url, + @NullableUriConverter() Uri? uri, + @DateTimeConverter() DateTime createdAt, + @NullableDateTimeConverter() DateTime? updatedAt, + @NullableDateTimeConverter() DateTime? lastFetchedAt, + @NullableUriConverter() Uri? bannerUrl, + String? bannerBlurhash, + bool isLocked, + bool isSilenced, + bool isSuspended, + String? description, + String? location, + @NullableDateTimeConverter() DateTime? birthday, + String? lang, + List? fields, + int followersCount, + int followingCount, + int notesCount, + List? pinnedNoteIds, + List? pinnedNotes, + String? pinnedPageId, + Map? pinnedPage, + bool publicReactions, + FFVisibility ffVisibility, + bool twoFactorEnabled, + bool usePasswordLessLogin, + bool securityKeys, + List? roles, + String? memo, + String? avatarId, + String? bannerId, + bool isModerator, + bool isAdmin, + bool injectFeaturedNote, + bool receiveAnnouncementEmail, + bool alwaysMarkNsfw, + bool autoSensitive, + bool carefulBot, + bool autoAcceptFollowed, + bool noCrawle, + bool isExplorable, + bool isDeleted, + bool hideOnlineStatus, + bool hasUnreadSpecifiedNotes, + bool hasUnreadMentions, + bool hasUnreadAnnouncement, + bool hasUnreadAntenna, + bool hasUnreadChannel, + bool hasUnreadNotification, + bool hasPendingReceivedFollowRequest, + int? unreadNotificationsCount, + List unreadAnnouncements, + @MuteWordsConverter() List mutedWords, + @MuteWordsConverter() List hardMutedWords, + List mutedInstances, + @Deprecated("Deprecated in Misskey 2023.9.2") + List? mutingNotificationTypes, + dynamic notificationRecieveConfig, + List emailNotificationTypes, + List achievements, + int loggedInDays, + UserPolicies policies}); + + @override + $UserInstanceInfoCopyWith<$Res>? get instance; + @override + $UserPoliciesCopyWith<$Res> get policies; +} + +/// @nodoc +class __$$MeDetailedImplCopyWithImpl<$Res> + extends _$MeDetailedCopyWithImpl<$Res, _$MeDetailedImpl> + implements _$$MeDetailedImplCopyWith<$Res> { + __$$MeDetailedImplCopyWithImpl( + _$MeDetailedImpl _value, $Res Function(_$MeDetailedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? name = freezed, + Object? username = null, + Object? host = freezed, + Object? avatarUrl = null, + Object? avatarBlurhash = freezed, + Object? avatarDecorations = null, + Object? isBot = null, + Object? isCat = null, + Object? instance = freezed, + Object? emojis = null, + Object? onlineStatus = freezed, + Object? badgeRoles = null, + Object? url = freezed, + Object? uri = freezed, + Object? createdAt = null, + Object? updatedAt = freezed, + Object? lastFetchedAt = freezed, + Object? bannerUrl = freezed, + Object? bannerBlurhash = freezed, + Object? isLocked = null, + Object? isSilenced = null, + Object? isSuspended = null, + Object? description = freezed, + Object? location = freezed, + Object? birthday = freezed, + Object? lang = freezed, + Object? fields = freezed, + Object? followersCount = null, + Object? followingCount = null, + Object? notesCount = null, + Object? pinnedNoteIds = freezed, + Object? pinnedNotes = freezed, + Object? pinnedPageId = freezed, + Object? pinnedPage = freezed, + Object? publicReactions = null, + Object? ffVisibility = null, + Object? twoFactorEnabled = null, + Object? usePasswordLessLogin = null, + Object? securityKeys = null, + Object? roles = freezed, + Object? memo = freezed, + Object? avatarId = freezed, + Object? bannerId = freezed, + Object? isModerator = null, + Object? isAdmin = null, + Object? injectFeaturedNote = null, + Object? receiveAnnouncementEmail = null, + Object? alwaysMarkNsfw = null, + Object? autoSensitive = null, + Object? carefulBot = null, + Object? autoAcceptFollowed = null, + Object? noCrawle = null, + Object? isExplorable = null, + Object? isDeleted = null, + Object? hideOnlineStatus = null, + Object? hasUnreadSpecifiedNotes = null, + Object? hasUnreadMentions = null, + Object? hasUnreadAnnouncement = null, + Object? hasUnreadAntenna = null, + Object? hasUnreadChannel = null, + Object? hasUnreadNotification = null, + Object? hasPendingReceivedFollowRequest = null, + Object? unreadNotificationsCount = freezed, + Object? unreadAnnouncements = null, + Object? mutedWords = null, + Object? hardMutedWords = null, + Object? mutedInstances = null, + Object? mutingNotificationTypes = freezed, + Object? notificationRecieveConfig = freezed, + Object? emailNotificationTypes = null, + Object? achievements = null, + Object? loggedInDays = null, + Object? policies = null, + }) { + return _then(_$MeDetailedImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + host: freezed == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String?, + avatarUrl: null == avatarUrl + ? _value.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as Uri, + avatarBlurhash: freezed == avatarBlurhash + ? _value.avatarBlurhash + : avatarBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + avatarDecorations: null == avatarDecorations + ? _value._avatarDecorations + : avatarDecorations // ignore: cast_nullable_to_non_nullable + as List, + isBot: null == isBot + ? _value.isBot + : isBot // ignore: cast_nullable_to_non_nullable + as bool, + isCat: null == isCat + ? _value.isCat + : isCat // ignore: cast_nullable_to_non_nullable + as bool, + instance: freezed == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as UserInstanceInfo?, + emojis: null == emojis + ? _value._emojis + : emojis // ignore: cast_nullable_to_non_nullable + as Map, + onlineStatus: freezed == onlineStatus + ? _value.onlineStatus + : onlineStatus // ignore: cast_nullable_to_non_nullable + as OnlineStatus?, + badgeRoles: null == badgeRoles + ? _value._badgeRoles + : badgeRoles // ignore: cast_nullable_to_non_nullable + as List, + url: freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as Uri?, + uri: freezed == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as Uri?, + createdAt: null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastFetchedAt: freezed == lastFetchedAt + ? _value.lastFetchedAt + : lastFetchedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + bannerUrl: freezed == bannerUrl + ? _value.bannerUrl + : bannerUrl // ignore: cast_nullable_to_non_nullable + as Uri?, + bannerBlurhash: freezed == bannerBlurhash + ? _value.bannerBlurhash + : bannerBlurhash // ignore: cast_nullable_to_non_nullable + as String?, + isLocked: null == isLocked + ? _value.isLocked + : isLocked // ignore: cast_nullable_to_non_nullable + as bool, + isSilenced: null == isSilenced + ? _value.isSilenced + : isSilenced // ignore: cast_nullable_to_non_nullable + as bool, + isSuspended: null == isSuspended + ? _value.isSuspended + : isSuspended // ignore: cast_nullable_to_non_nullable + as bool, + description: freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + location: freezed == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String?, + birthday: freezed == birthday + ? _value.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + lang: freezed == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String?, + fields: freezed == fields + ? _value._fields + : fields // ignore: cast_nullable_to_non_nullable + as List?, + followersCount: null == followersCount + ? _value.followersCount + : followersCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _value.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + notesCount: null == notesCount + ? _value.notesCount + : notesCount // ignore: cast_nullable_to_non_nullable + as int, + pinnedNoteIds: freezed == pinnedNoteIds + ? _value._pinnedNoteIds + : pinnedNoteIds // ignore: cast_nullable_to_non_nullable + as List?, + pinnedNotes: freezed == pinnedNotes + ? _value._pinnedNotes + : pinnedNotes // ignore: cast_nullable_to_non_nullable + as List?, + pinnedPageId: freezed == pinnedPageId + ? _value.pinnedPageId + : pinnedPageId // ignore: cast_nullable_to_non_nullable + as String?, + pinnedPage: freezed == pinnedPage + ? _value._pinnedPage + : pinnedPage // ignore: cast_nullable_to_non_nullable + as Map?, + publicReactions: null == publicReactions + ? _value.publicReactions + : publicReactions // ignore: cast_nullable_to_non_nullable + as bool, + ffVisibility: null == ffVisibility + ? _value.ffVisibility + : ffVisibility // ignore: cast_nullable_to_non_nullable + as FFVisibility, + twoFactorEnabled: null == twoFactorEnabled + ? _value.twoFactorEnabled + : twoFactorEnabled // ignore: cast_nullable_to_non_nullable + as bool, + usePasswordLessLogin: null == usePasswordLessLogin + ? _value.usePasswordLessLogin + : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable + as bool, + securityKeys: null == securityKeys + ? _value.securityKeys + : securityKeys // ignore: cast_nullable_to_non_nullable + as bool, + roles: freezed == roles + ? _value._roles + : roles // ignore: cast_nullable_to_non_nullable + as List?, + memo: freezed == memo + ? _value.memo + : memo // ignore: cast_nullable_to_non_nullable + as String?, + avatarId: freezed == avatarId + ? _value.avatarId + : avatarId // ignore: cast_nullable_to_non_nullable + as String?, + bannerId: freezed == bannerId + ? _value.bannerId + : bannerId // ignore: cast_nullable_to_non_nullable + as String?, + isModerator: null == isModerator + ? _value.isModerator + : isModerator // ignore: cast_nullable_to_non_nullable + as bool, + isAdmin: null == isAdmin + ? _value.isAdmin + : isAdmin // ignore: cast_nullable_to_non_nullable + as bool, + injectFeaturedNote: null == injectFeaturedNote + ? _value.injectFeaturedNote + : injectFeaturedNote // ignore: cast_nullable_to_non_nullable + as bool, + receiveAnnouncementEmail: null == receiveAnnouncementEmail + ? _value.receiveAnnouncementEmail + : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable + as bool, + alwaysMarkNsfw: null == alwaysMarkNsfw + ? _value.alwaysMarkNsfw + : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable + as bool, + autoSensitive: null == autoSensitive + ? _value.autoSensitive + : autoSensitive // ignore: cast_nullable_to_non_nullable + as bool, + carefulBot: null == carefulBot + ? _value.carefulBot + : carefulBot // ignore: cast_nullable_to_non_nullable + as bool, + autoAcceptFollowed: null == autoAcceptFollowed + ? _value.autoAcceptFollowed + : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable + as bool, + noCrawle: null == noCrawle + ? _value.noCrawle + : noCrawle // ignore: cast_nullable_to_non_nullable + as bool, + isExplorable: null == isExplorable + ? _value.isExplorable + : isExplorable // ignore: cast_nullable_to_non_nullable + as bool, + isDeleted: null == isDeleted + ? _value.isDeleted + : isDeleted // ignore: cast_nullable_to_non_nullable + as bool, + hideOnlineStatus: null == hideOnlineStatus + ? _value.hideOnlineStatus + : hideOnlineStatus // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadSpecifiedNotes: null == hasUnreadSpecifiedNotes + ? _value.hasUnreadSpecifiedNotes + : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadMentions: null == hasUnreadMentions + ? _value.hasUnreadMentions + : hasUnreadMentions // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadAnnouncement: null == hasUnreadAnnouncement + ? _value.hasUnreadAnnouncement + : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadAntenna: null == hasUnreadAntenna + ? _value.hasUnreadAntenna + : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadChannel: null == hasUnreadChannel + ? _value.hasUnreadChannel + : hasUnreadChannel // ignore: cast_nullable_to_non_nullable + as bool, + hasUnreadNotification: null == hasUnreadNotification + ? _value.hasUnreadNotification + : hasUnreadNotification // ignore: cast_nullable_to_non_nullable + as bool, + hasPendingReceivedFollowRequest: null == hasPendingReceivedFollowRequest + ? _value.hasPendingReceivedFollowRequest + : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable + as bool, + unreadNotificationsCount: freezed == unreadNotificationsCount + ? _value.unreadNotificationsCount + : unreadNotificationsCount // ignore: cast_nullable_to_non_nullable + as int?, + unreadAnnouncements: null == unreadAnnouncements + ? _value._unreadAnnouncements + : unreadAnnouncements // ignore: cast_nullable_to_non_nullable + as List, + mutedWords: null == mutedWords + ? _value._mutedWords + : mutedWords // ignore: cast_nullable_to_non_nullable + as List, + hardMutedWords: null == hardMutedWords + ? _value._hardMutedWords + : hardMutedWords // ignore: cast_nullable_to_non_nullable + as List, + mutedInstances: null == mutedInstances + ? _value._mutedInstances + : mutedInstances // ignore: cast_nullable_to_non_nullable + as List, + mutingNotificationTypes: freezed == mutingNotificationTypes + ? _value._mutingNotificationTypes + : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable + as List?, + notificationRecieveConfig: freezed == notificationRecieveConfig + ? _value.notificationRecieveConfig + : notificationRecieveConfig // ignore: cast_nullable_to_non_nullable + as dynamic, + emailNotificationTypes: null == emailNotificationTypes + ? _value._emailNotificationTypes + : emailNotificationTypes // ignore: cast_nullable_to_non_nullable + as List, + achievements: null == achievements + ? _value._achievements + : achievements // ignore: cast_nullable_to_non_nullable + as List, + loggedInDays: null == loggedInDays + ? _value.loggedInDays + : loggedInDays // ignore: cast_nullable_to_non_nullable + as int, + policies: null == policies + ? _value.policies + : policies // ignore: cast_nullable_to_non_nullable + as UserPolicies, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$MeDetailedImpl implements _MeDetailed { + const _$MeDetailedImpl( + {required this.id, + this.name, + required this.username, + this.host, + @UriConverter() required this.avatarUrl, + this.avatarBlurhash, + final List avatarDecorations = const [], + required this.isBot, + required this.isCat, + this.instance, + @EmojisConverter() final Map emojis = const {}, + @OnlineStatusJsonConverter() this.onlineStatus, + final List badgeRoles = const [], + @NullableUriConverter() this.url, + @NullableUriConverter() this.uri, + @DateTimeConverter() required this.createdAt, + @NullableDateTimeConverter() this.updatedAt, + @NullableDateTimeConverter() this.lastFetchedAt, + @NullableUriConverter() this.bannerUrl, + this.bannerBlurhash, + required this.isLocked, + required this.isSilenced, + required this.isSuspended, + this.description, + this.location, + @NullableDateTimeConverter() this.birthday, + this.lang, + final List? fields, + required this.followersCount, + required this.followingCount, + required this.notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + this.pinnedPageId, + final Map? pinnedPage, + required this.publicReactions, + required this.ffVisibility, + required this.twoFactorEnabled, + required this.usePasswordLessLogin, + required this.securityKeys, + final List? roles, + this.memo, + this.avatarId, + this.bannerId, + required this.isModerator, + required this.isAdmin, + required this.injectFeaturedNote, + required this.receiveAnnouncementEmail, + required this.alwaysMarkNsfw, + required this.autoSensitive, + required this.carefulBot, + required this.autoAcceptFollowed, + required this.noCrawle, + required this.isExplorable, + required this.isDeleted, + required this.hideOnlineStatus, + required this.hasUnreadSpecifiedNotes, + required this.hasUnreadMentions, + required this.hasUnreadAnnouncement, + required this.hasUnreadAntenna, + required this.hasUnreadChannel, + required this.hasUnreadNotification, + required this.hasPendingReceivedFollowRequest, + this.unreadNotificationsCount, + final List unreadAnnouncements = const [], + @MuteWordsConverter() required final List mutedWords, + @MuteWordsConverter() final List hardMutedWords = const [], + required final List mutedInstances, + @Deprecated("Deprecated in Misskey 2023.9.2") + final List? mutingNotificationTypes, + this.notificationRecieveConfig, + required final List emailNotificationTypes, + required final List achievements, + required this.loggedInDays, + required this.policies}) + : _avatarDecorations = avatarDecorations, + _emojis = emojis, + _badgeRoles = badgeRoles, + _fields = fields, + _pinnedNoteIds = pinnedNoteIds, + _pinnedNotes = pinnedNotes, + _pinnedPage = pinnedPage, + _roles = roles, + _unreadAnnouncements = unreadAnnouncements, + _mutedWords = mutedWords, + _hardMutedWords = hardMutedWords, + _mutedInstances = mutedInstances, + _mutingNotificationTypes = mutingNotificationTypes, + _emailNotificationTypes = emailNotificationTypes, + _achievements = achievements; + + factory _$MeDetailedImpl.fromJson(Map json) => + _$$MeDetailedImplFromJson(json); + + @override + final String id; + @override + final String? name; + @override + final String username; + @override + final String? host; + @override + @UriConverter() + final Uri avatarUrl; + @override + final String? avatarBlurhash; + final List _avatarDecorations; + @override + @JsonKey() + List get avatarDecorations { + if (_avatarDecorations is EqualUnmodifiableListView) + return _avatarDecorations; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_avatarDecorations); + } + + @override + final bool isBot; + @override + final bool isCat; + @override + final UserInstanceInfo? instance; + final Map _emojis; + @override + @JsonKey() + @EmojisConverter() + Map get emojis { + if (_emojis is EqualUnmodifiableMapView) return _emojis; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_emojis); + } + + @override + @OnlineStatusJsonConverter() + final OnlineStatus? onlineStatus; + final List _badgeRoles; + @override + @JsonKey() + List get badgeRoles { + if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_badgeRoles); + } + + @override + @NullableUriConverter() + final Uri? url; + @override + @NullableUriConverter() + final Uri? uri; + @override + @DateTimeConverter() + final DateTime createdAt; @override - bool get isCat; + @NullableDateTimeConverter() + final DateTime? updatedAt; + @override + @NullableDateTimeConverter() + final DateTime? lastFetchedAt; + @override + @NullableUriConverter() + final Uri? bannerUrl; + @override + final String? bannerBlurhash; + @override + final bool isLocked; + @override + final bool isSilenced; + @override + final bool isSuspended; + @override + final String? description; + @override + final String? location; + @override + @NullableDateTimeConverter() + final DateTime? birthday; + @override + final String? lang; + final List? _fields; + @override + List? get fields { + final value = _fields; + if (value == null) return null; + if (_fields is EqualUnmodifiableListView) return _fields; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final int followersCount; + @override + final int followingCount; + @override + final int notesCount; + final List? _pinnedNoteIds; + @override + List? get pinnedNoteIds { + final value = _pinnedNoteIds; + if (value == null) return null; + if (_pinnedNoteIds is EqualUnmodifiableListView) return _pinnedNoteIds; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + final List? _pinnedNotes; + @override + List? get pinnedNotes { + final value = _pinnedNotes; + if (value == null) return null; + if (_pinnedNotes is EqualUnmodifiableListView) return _pinnedNotes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? pinnedPageId; + final Map? _pinnedPage; + @override + Map? get pinnedPage { + final value = _pinnedPage; + if (value == null) return null; + if (_pinnedPage is EqualUnmodifiableMapView) return _pinnedPage; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + final bool publicReactions; + @override + final FFVisibility ffVisibility; + @override + final bool twoFactorEnabled; + @override + final bool usePasswordLessLogin; + @override + final bool securityKeys; + final List? _roles; + @override + List? get roles { + final value = _roles; + if (value == null) return null; + if (_roles is EqualUnmodifiableListView) return _roles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final String? memo; + @override + final String? avatarId; + @override + final String? bannerId; + @override + final bool isModerator; + @override + final bool isAdmin; + @override + final bool injectFeaturedNote; + @override + final bool receiveAnnouncementEmail; + @override + final bool alwaysMarkNsfw; + @override + final bool autoSensitive; + @override + final bool carefulBot; + @override + final bool autoAcceptFollowed; + @override + final bool noCrawle; + @override + final bool isExplorable; + @override + final bool isDeleted; + @override + final bool hideOnlineStatus; + @override + final bool hasUnreadSpecifiedNotes; + @override + final bool hasUnreadMentions; + @override + final bool hasUnreadAnnouncement; + @override + final bool hasUnreadAntenna; + @override + final bool hasUnreadChannel; + @override + final bool hasUnreadNotification; + @override + final bool hasPendingReceivedFollowRequest; + @override + final int? unreadNotificationsCount; + final List _unreadAnnouncements; + @override + @JsonKey() + List get unreadAnnouncements { + if (_unreadAnnouncements is EqualUnmodifiableListView) + return _unreadAnnouncements; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_unreadAnnouncements); + } + + final List _mutedWords; + @override + @MuteWordsConverter() + List get mutedWords { + if (_mutedWords is EqualUnmodifiableListView) return _mutedWords; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_mutedWords); + } + + final List _hardMutedWords; + @override + @JsonKey() + @MuteWordsConverter() + List get hardMutedWords { + if (_hardMutedWords is EqualUnmodifiableListView) return _hardMutedWords; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_hardMutedWords); + } + + final List _mutedInstances; + @override + List get mutedInstances { + if (_mutedInstances is EqualUnmodifiableListView) return _mutedInstances; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_mutedInstances); + } + + final List? _mutingNotificationTypes; + @override + @Deprecated("Deprecated in Misskey 2023.9.2") + List? get mutingNotificationTypes { + final value = _mutingNotificationTypes; + if (value == null) return null; + if (_mutingNotificationTypes is EqualUnmodifiableListView) + return _mutingNotificationTypes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final dynamic notificationRecieveConfig; + final List _emailNotificationTypes; + @override + List get emailNotificationTypes { + if (_emailNotificationTypes is EqualUnmodifiableListView) + return _emailNotificationTypes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_emailNotificationTypes); + } + + final List _achievements; + @override + List get achievements { + if (_achievements is EqualUnmodifiableListView) return _achievements; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_achievements); + } + + @override + final int loggedInDays; + @override + final UserPolicies policies; + + @override + String toString() { + return 'MeDetailed(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, instance: $instance, emojis: $emojis, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles, url: $url, uri: $uri, createdAt: $createdAt, updatedAt: $updatedAt, lastFetchedAt: $lastFetchedAt, bannerUrl: $bannerUrl, bannerBlurhash: $bannerBlurhash, isLocked: $isLocked, isSilenced: $isSilenced, isSuspended: $isSuspended, description: $description, location: $location, birthday: $birthday, lang: $lang, fields: $fields, followersCount: $followersCount, followingCount: $followingCount, notesCount: $notesCount, pinnedNoteIds: $pinnedNoteIds, pinnedNotes: $pinnedNotes, pinnedPageId: $pinnedPageId, pinnedPage: $pinnedPage, publicReactions: $publicReactions, ffVisibility: $ffVisibility, twoFactorEnabled: $twoFactorEnabled, usePasswordLessLogin: $usePasswordLessLogin, securityKeys: $securityKeys, roles: $roles, memo: $memo, avatarId: $avatarId, bannerId: $bannerId, isModerator: $isModerator, isAdmin: $isAdmin, injectFeaturedNote: $injectFeaturedNote, receiveAnnouncementEmail: $receiveAnnouncementEmail, alwaysMarkNsfw: $alwaysMarkNsfw, autoSensitive: $autoSensitive, carefulBot: $carefulBot, autoAcceptFollowed: $autoAcceptFollowed, noCrawle: $noCrawle, isExplorable: $isExplorable, isDeleted: $isDeleted, hideOnlineStatus: $hideOnlineStatus, hasUnreadSpecifiedNotes: $hasUnreadSpecifiedNotes, hasUnreadMentions: $hasUnreadMentions, hasUnreadAnnouncement: $hasUnreadAnnouncement, hasUnreadAntenna: $hasUnreadAntenna, hasUnreadChannel: $hasUnreadChannel, hasUnreadNotification: $hasUnreadNotification, hasPendingReceivedFollowRequest: $hasPendingReceivedFollowRequest, unreadNotificationsCount: $unreadNotificationsCount, unreadAnnouncements: $unreadAnnouncements, mutedWords: $mutedWords, hardMutedWords: $hardMutedWords, mutedInstances: $mutedInstances, mutingNotificationTypes: $mutingNotificationTypes, notificationRecieveConfig: $notificationRecieveConfig, emailNotificationTypes: $emailNotificationTypes, achievements: $achievements, loggedInDays: $loggedInDays, policies: $policies)'; + } + + @override + bool operator ==(dynamic other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$MeDetailedImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.username, username) || + other.username == username) && + (identical(other.host, host) || other.host == host) && + (identical(other.avatarUrl, avatarUrl) || + other.avatarUrl == avatarUrl) && + (identical(other.avatarBlurhash, avatarBlurhash) || + other.avatarBlurhash == avatarBlurhash) && + const DeepCollectionEquality() + .equals(other._avatarDecorations, _avatarDecorations) && + (identical(other.isBot, isBot) || other.isBot == isBot) && + (identical(other.isCat, isCat) || other.isCat == isCat) && + (identical(other.instance, instance) || + other.instance == instance) && + const DeepCollectionEquality().equals(other._emojis, _emojis) && + (identical(other.onlineStatus, onlineStatus) || + other.onlineStatus == onlineStatus) && + const DeepCollectionEquality() + .equals(other._badgeRoles, _badgeRoles) && + (identical(other.url, url) || other.url == url) && + (identical(other.uri, uri) || other.uri == uri) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.lastFetchedAt, lastFetchedAt) || + other.lastFetchedAt == lastFetchedAt) && + (identical(other.bannerUrl, bannerUrl) || + other.bannerUrl == bannerUrl) && + (identical(other.bannerBlurhash, bannerBlurhash) || + other.bannerBlurhash == bannerBlurhash) && + (identical(other.isLocked, isLocked) || + other.isLocked == isLocked) && + (identical(other.isSilenced, isSilenced) || + other.isSilenced == isSilenced) && + (identical(other.isSuspended, isSuspended) || + other.isSuspended == isSuspended) && + (identical(other.description, description) || + other.description == description) && + (identical(other.location, location) || + other.location == location) && + (identical(other.birthday, birthday) || + other.birthday == birthday) && + (identical(other.lang, lang) || other.lang == lang) && + const DeepCollectionEquality().equals(other._fields, _fields) && + (identical(other.followersCount, followersCount) || + other.followersCount == followersCount) && + (identical(other.followingCount, followingCount) || + other.followingCount == followingCount) && + (identical(other.notesCount, notesCount) || + other.notesCount == notesCount) && + const DeepCollectionEquality() + .equals(other._pinnedNoteIds, _pinnedNoteIds) && + const DeepCollectionEquality() + .equals(other._pinnedNotes, _pinnedNotes) && + (identical(other.pinnedPageId, pinnedPageId) || + other.pinnedPageId == pinnedPageId) && + const DeepCollectionEquality() + .equals(other._pinnedPage, _pinnedPage) && + (identical(other.publicReactions, publicReactions) || + other.publicReactions == publicReactions) && + (identical(other.ffVisibility, ffVisibility) || + other.ffVisibility == ffVisibility) && + (identical(other.twoFactorEnabled, twoFactorEnabled) || + other.twoFactorEnabled == twoFactorEnabled) && + (identical(other.usePasswordLessLogin, usePasswordLessLogin) || + other.usePasswordLessLogin == usePasswordLessLogin) && + (identical(other.securityKeys, securityKeys) || + other.securityKeys == securityKeys) && + const DeepCollectionEquality().equals(other._roles, _roles) && + (identical(other.memo, memo) || other.memo == memo) && + (identical(other.avatarId, avatarId) || + other.avatarId == avatarId) && + (identical(other.bannerId, bannerId) || + other.bannerId == bannerId) && + (identical(other.isModerator, isModerator) || + other.isModerator == isModerator) && + (identical(other.isAdmin, isAdmin) || other.isAdmin == isAdmin) && + (identical(other.injectFeaturedNote, injectFeaturedNote) || + other.injectFeaturedNote == injectFeaturedNote) && + (identical(other.receiveAnnouncementEmail, receiveAnnouncementEmail) || + other.receiveAnnouncementEmail == receiveAnnouncementEmail) && + (identical(other.alwaysMarkNsfw, alwaysMarkNsfw) || + other.alwaysMarkNsfw == alwaysMarkNsfw) && + (identical(other.autoSensitive, autoSensitive) || + other.autoSensitive == autoSensitive) && + (identical(other.carefulBot, carefulBot) || + other.carefulBot == carefulBot) && + (identical(other.autoAcceptFollowed, autoAcceptFollowed) || + other.autoAcceptFollowed == autoAcceptFollowed) && + (identical(other.noCrawle, noCrawle) || + other.noCrawle == noCrawle) && + (identical(other.isExplorable, isExplorable) || + other.isExplorable == isExplorable) && + (identical(other.isDeleted, isDeleted) || + other.isDeleted == isDeleted) && + (identical(other.hideOnlineStatus, hideOnlineStatus) || other.hideOnlineStatus == hideOnlineStatus) && + (identical(other.hasUnreadSpecifiedNotes, hasUnreadSpecifiedNotes) || other.hasUnreadSpecifiedNotes == hasUnreadSpecifiedNotes) && + (identical(other.hasUnreadMentions, hasUnreadMentions) || other.hasUnreadMentions == hasUnreadMentions) && + (identical(other.hasUnreadAnnouncement, hasUnreadAnnouncement) || other.hasUnreadAnnouncement == hasUnreadAnnouncement) && + (identical(other.hasUnreadAntenna, hasUnreadAntenna) || other.hasUnreadAntenna == hasUnreadAntenna) && + (identical(other.hasUnreadChannel, hasUnreadChannel) || other.hasUnreadChannel == hasUnreadChannel) && + (identical(other.hasUnreadNotification, hasUnreadNotification) || other.hasUnreadNotification == hasUnreadNotification) && + (identical(other.hasPendingReceivedFollowRequest, hasPendingReceivedFollowRequest) || other.hasPendingReceivedFollowRequest == hasPendingReceivedFollowRequest) && + (identical(other.unreadNotificationsCount, unreadNotificationsCount) || other.unreadNotificationsCount == unreadNotificationsCount) && + const DeepCollectionEquality().equals(other._unreadAnnouncements, _unreadAnnouncements) && + const DeepCollectionEquality().equals(other._mutedWords, _mutedWords) && + const DeepCollectionEquality().equals(other._hardMutedWords, _hardMutedWords) && + const DeepCollectionEquality().equals(other._mutedInstances, _mutedInstances) && + const DeepCollectionEquality().equals(other._mutingNotificationTypes, _mutingNotificationTypes) && + const DeepCollectionEquality().equals(other.notificationRecieveConfig, notificationRecieveConfig) && + const DeepCollectionEquality().equals(other._emailNotificationTypes, _emailNotificationTypes) && + const DeepCollectionEquality().equals(other._achievements, _achievements) && + (identical(other.loggedInDays, loggedInDays) || other.loggedInDays == loggedInDays) && + (identical(other.policies, policies) || other.policies == policies)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + name, + username, + host, + avatarUrl, + avatarBlurhash, + const DeepCollectionEquality().hash(_avatarDecorations), + isBot, + isCat, + instance, + const DeepCollectionEquality().hash(_emojis), + onlineStatus, + const DeepCollectionEquality().hash(_badgeRoles), + url, + uri, + createdAt, + updatedAt, + lastFetchedAt, + bannerUrl, + bannerBlurhash, + isLocked, + isSilenced, + isSuspended, + description, + location, + birthday, + lang, + const DeepCollectionEquality().hash(_fields), + followersCount, + followingCount, + notesCount, + const DeepCollectionEquality().hash(_pinnedNoteIds), + const DeepCollectionEquality().hash(_pinnedNotes), + pinnedPageId, + const DeepCollectionEquality().hash(_pinnedPage), + publicReactions, + ffVisibility, + twoFactorEnabled, + usePasswordLessLogin, + securityKeys, + const DeepCollectionEquality().hash(_roles), + memo, + avatarId, + bannerId, + isModerator, + isAdmin, + injectFeaturedNote, + receiveAnnouncementEmail, + alwaysMarkNsfw, + autoSensitive, + carefulBot, + autoAcceptFollowed, + noCrawle, + isExplorable, + isDeleted, + hideOnlineStatus, + hasUnreadSpecifiedNotes, + hasUnreadMentions, + hasUnreadAnnouncement, + hasUnreadAntenna, + hasUnreadChannel, + hasUnreadNotification, + hasPendingReceivedFollowRequest, + unreadNotificationsCount, + const DeepCollectionEquality().hash(_unreadAnnouncements), + const DeepCollectionEquality().hash(_mutedWords), + const DeepCollectionEquality().hash(_hardMutedWords), + const DeepCollectionEquality().hash(_mutedInstances), + const DeepCollectionEquality().hash(_mutingNotificationTypes), + const DeepCollectionEquality().hash(notificationRecieveConfig), + const DeepCollectionEquality().hash(_emailNotificationTypes), + const DeepCollectionEquality().hash(_achievements), + loggedInDays, + policies + ]); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$MeDetailedImplCopyWith<_$MeDetailedImpl> get copyWith => + __$$MeDetailedImplCopyWithImpl<_$MeDetailedImpl>(this, _$identity); + + @override + Map toJson() { + return _$$MeDetailedImplToJson( + this, + ); + } +} + +abstract class _MeDetailed implements MeDetailed { + const factory _MeDetailed( + {required final String id, + final String? name, + required final String username, + final String? host, + @UriConverter() required final Uri avatarUrl, + final String? avatarBlurhash, + final List avatarDecorations, + required final bool isBot, + required final bool isCat, + final UserInstanceInfo? instance, + @EmojisConverter() final Map emojis, + @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, + final List badgeRoles, + @NullableUriConverter() final Uri? url, + @NullableUriConverter() final Uri? uri, + @DateTimeConverter() required final DateTime createdAt, + @NullableDateTimeConverter() final DateTime? updatedAt, + @NullableDateTimeConverter() final DateTime? lastFetchedAt, + @NullableUriConverter() final Uri? bannerUrl, + final String? bannerBlurhash, + required final bool isLocked, + required final bool isSilenced, + required final bool isSuspended, + final String? description, + final String? location, + @NullableDateTimeConverter() final DateTime? birthday, + final String? lang, + final List? fields, + required final int followersCount, + required final int followingCount, + required final int notesCount, + final List? pinnedNoteIds, + final List? pinnedNotes, + final String? pinnedPageId, + final Map? pinnedPage, + required final bool publicReactions, + required final FFVisibility ffVisibility, + required final bool twoFactorEnabled, + required final bool usePasswordLessLogin, + required final bool securityKeys, + final List? roles, + final String? memo, + final String? avatarId, + final String? bannerId, + required final bool isModerator, + required final bool isAdmin, + required final bool injectFeaturedNote, + required final bool receiveAnnouncementEmail, + required final bool alwaysMarkNsfw, + required final bool autoSensitive, + required final bool carefulBot, + required final bool autoAcceptFollowed, + required final bool noCrawle, + required final bool isExplorable, + required final bool isDeleted, + required final bool hideOnlineStatus, + required final bool hasUnreadSpecifiedNotes, + required final bool hasUnreadMentions, + required final bool hasUnreadAnnouncement, + required final bool hasUnreadAntenna, + required final bool hasUnreadChannel, + required final bool hasUnreadNotification, + required final bool hasPendingReceivedFollowRequest, + final int? unreadNotificationsCount, + final List unreadAnnouncements, + @MuteWordsConverter() required final List mutedWords, + @MuteWordsConverter() final List hardMutedWords, + required final List mutedInstances, + @Deprecated("Deprecated in Misskey 2023.9.2") + final List? mutingNotificationTypes, + final dynamic notificationRecieveConfig, + required final List emailNotificationTypes, + required final List achievements, + required final int loggedInDays, + required final UserPolicies policies}) = _$MeDetailedImpl; + + factory _MeDetailed.fromJson(Map json) = + _$MeDetailedImpl.fromJson; + + @override + String get id; + @override + String? get name; + @override + String get username; + @override + String? get host; + @override + @UriConverter() + Uri get avatarUrl; + @override + String? get avatarBlurhash; + @override + List get avatarDecorations; @override bool get isBot; @override + bool get isCat; + @override + UserInstanceInfo? get instance; + @override @EmojisConverter() Map get emojis; @override + @OnlineStatusJsonConverter() + OnlineStatus? get onlineStatus; + @override + List get badgeRoles; + @override + @NullableUriConverter() + Uri? get url; + @override + @NullableUriConverter() + Uri? get uri; + @override + @DateTimeConverter() + DateTime get createdAt; + @override + @NullableDateTimeConverter() + DateTime? get updatedAt; + @override + @NullableDateTimeConverter() + DateTime? get lastFetchedAt; + @override + @NullableUriConverter() + Uri? get bannerUrl; + @override + String? get bannerBlurhash; + @override + bool get isLocked; + @override + bool get isSilenced; + @override + bool get isSuspended; + @override + String? get description; + @override + String? get location; + @override + @NullableDateTimeConverter() + DateTime? get birthday; + @override + String? get lang; + @override + List? get fields; + @override + int get followersCount; + @override + int get followingCount; + @override + int get notesCount; + @override + List? get pinnedNoteIds; + @override + List? get pinnedNotes; + @override + String? get pinnedPageId; + @override + Map? get pinnedPage; + @override + bool get publicReactions; + @override + FFVisibility get ffVisibility; + @override + bool get twoFactorEnabled; + @override + bool get usePasswordLessLogin; + @override + bool get securityKeys; + @override + List? get roles; + @override + String? get memo; + @override + String? get avatarId; + @override + String? get bannerId; + @override + bool get isModerator; + @override + bool get isAdmin; + @override + bool get injectFeaturedNote; + @override + bool get receiveAnnouncementEmail; + @override + bool get alwaysMarkNsfw; + @override + bool get autoSensitive; + @override + bool get carefulBot; + @override + bool get autoAcceptFollowed; + @override + bool get noCrawle; + @override + bool get isExplorable; + @override + bool get isDeleted; + @override + bool get hideOnlineStatus; + @override + bool get hasUnreadSpecifiedNotes; + @override + bool get hasUnreadMentions; + @override + bool get hasUnreadAnnouncement; + @override + bool get hasUnreadAntenna; + @override + bool get hasUnreadChannel; + @override + bool get hasUnreadNotification; + @override + bool get hasPendingReceivedFollowRequest; + @override + int? get unreadNotificationsCount; + @override + List get unreadAnnouncements; + @override + @MuteWordsConverter() + List get mutedWords; + @override + @MuteWordsConverter() + List get hardMutedWords; + @override + List get mutedInstances; + @override + @Deprecated("Deprecated in Misskey 2023.9.2") + List? get mutingNotificationTypes; + @override + dynamic get notificationRecieveConfig; + @override + List get emailNotificationTypes; + @override + List get achievements; + @override + int get loggedInDays; + @override + UserPolicies get policies; + @override @JsonKey(ignore: true) - _$$UserImplCopyWith<_$UserImpl> get copyWith => + _$$MeDetailedImplCopyWith<_$MeDetailedImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/data/base/user.g.dart b/lib/src/data/base/user.g.dart index 53b3a2cc..466a50bd 100644 --- a/lib/src/data/base/user.g.dart +++ b/lib/src/data/base/user.g.dart @@ -6,50 +6,539 @@ part of 'user.dart'; // JsonSerializableGenerator // ************************************************************************** -_$UserImpl _$$UserImplFromJson(Map json) => _$UserImpl( +_$UserLiteImpl _$$UserLiteImplFromJson(Map json) => + _$UserLiteImpl( id: json['id'] as String, + name: json['name'] as String?, username: json['username'] as String, host: json['host'] as String?, - name: json['name'] as String?, + avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), + avatarBlurhash: json['avatarBlurhash'] as String?, + avatarDecorations: (json['avatarDecorations'] as List?) + ?.map((e) => + UserAvatarDecoration.fromJson(e as Map)) + .toList() ?? + const [], + isBot: json['isBot'] as bool? ?? false, + isCat: json['isCat'] as bool? ?? false, + instance: json['instance'] == null + ? null + : UserInstanceInfo.fromJson(json['instance'] as Map), + emojis: json['emojis'] == null + ? const {} + : const EmojisConverter().fromJson(json['emojis']), onlineStatus: const OnlineStatusJsonConverter() .fromJson(json['onlineStatus'] as String?), badgeRoles: (json['badgeRoles'] as List?) ?.map((e) => UserBadgeRole.fromJson(e as Map)) .toList() ?? const [], + ); + +Map _$$UserLiteImplToJson(_$UserLiteImpl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'username': instance.username, + 'host': instance.host, + 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), + 'avatarBlurhash': instance.avatarBlurhash, + 'avatarDecorations': instance.avatarDecorations, + 'isBot': instance.isBot, + 'isCat': instance.isCat, + 'instance': instance.instance, + 'emojis': const EmojisConverter().toJson(instance.emojis), + 'onlineStatus': + const OnlineStatusJsonConverter().toJson(instance.onlineStatus), + 'badgeRoles': instance.badgeRoles, + }; + +_$UserDetailedNotMeImpl _$$UserDetailedNotMeImplFromJson( + Map json) => + _$UserDetailedNotMeImpl( + id: json['id'] as String, + name: json['name'] as String?, + username: json['username'] as String, + host: json['host'] as String?, avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), + avatarBlurhash: json['avatarBlurhash'] as String?, avatarDecorations: (json['avatarDecorations'] as List?) ?.map((e) => UserAvatarDecoration.fromJson(e as Map)) .toList() ?? const [], - avatarBlurhash: json['avatarBlurhash'] as String?, + isBot: json['isBot'] as bool, + isCat: json['isCat'] as bool, instance: json['instance'] == null ? null : UserInstanceInfo.fromJson(json['instance'] as Map), - isCat: json['isCat'] as bool? ?? false, - isBot: json['isBot'] as bool? ?? false, emojis: json['emojis'] == null ? const {} : const EmojisConverter().fromJson(json['emojis']), + onlineStatus: const OnlineStatusJsonConverter() + .fromJson(json['onlineStatus'] as String?), + badgeRoles: (json['badgeRoles'] as List?) + ?.map((e) => UserBadgeRole.fromJson(e as Map)) + .toList() ?? + const [], + url: _$JsonConverterFromJson( + json['url'], const NullableUriConverter().fromJson), + uri: _$JsonConverterFromJson( + json['uri'], const NullableUriConverter().fromJson), + createdAt: + const DateTimeConverter().fromJson(json['createdAt'] as String), + updatedAt: _$JsonConverterFromJson( + json['updatedAt'], const NullableDateTimeConverter().fromJson), + lastFetchedAt: _$JsonConverterFromJson( + json['lastFetchedAt'], const NullableDateTimeConverter().fromJson), + bannerUrl: _$JsonConverterFromJson( + json['bannerUrl'], const NullableUriConverter().fromJson), + bannerBlurhash: json['bannerBlurhash'] as String?, + isLocked: json['isLocked'] as bool, + isSilenced: json['isSilenced'] as bool, + isSuspended: json['isSuspended'] as bool, + description: json['description'] as String?, + location: json['location'] as String?, + birthday: _$JsonConverterFromJson( + json['birthday'], const NullableDateTimeConverter().fromJson), + lang: json['lang'] as String?, + fields: (json['fields'] as List?) + ?.map((e) => UserField.fromJson(e as Map)) + .toList(), + followersCount: json['followersCount'] as int, + followingCount: json['followingCount'] as int, + notesCount: json['notesCount'] as int, + pinnedNoteIds: (json['pinnedNoteIds'] as List?) + ?.map((e) => e as String) + .toList(), + pinnedNotes: (json['pinnedNotes'] as List?) + ?.map((e) => Note.fromJson(e as Map)) + .toList(), + pinnedPageId: json['pinnedPageId'] as String?, + pinnedPage: json['pinnedPage'] as Map?, + publicReactions: json['publicReactions'] as bool, + ffVisibility: $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']), + twoFactorEnabled: json['twoFactorEnabled'] as bool, + usePasswordLessLogin: json['usePasswordLessLogin'] as bool, + securityKeys: json['securityKeys'] as bool, + roles: (json['roles'] as List?) + ?.map((e) => UserRole.fromJson(e as Map)) + .toList(), + memo: json['memo'] as String?, ); -Map _$$UserImplToJson(_$UserImpl instance) => +Map _$$UserDetailedNotMeImplToJson( + _$UserDetailedNotMeImpl instance) => { 'id': instance.id, + 'name': instance.name, 'username': instance.username, 'host': instance.host, - 'name': instance.name, + 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), + 'avatarBlurhash': instance.avatarBlurhash, + 'avatarDecorations': instance.avatarDecorations, + 'isBot': instance.isBot, + 'isCat': instance.isCat, + 'instance': instance.instance, + 'emojis': const EmojisConverter().toJson(instance.emojis), 'onlineStatus': const OnlineStatusJsonConverter().toJson(instance.onlineStatus), 'badgeRoles': instance.badgeRoles, + 'url': const NullableUriConverter().toJson(instance.url), + 'uri': const NullableUriConverter().toJson(instance.uri), + 'createdAt': const DateTimeConverter().toJson(instance.createdAt), + 'updatedAt': const NullableDateTimeConverter().toJson(instance.updatedAt), + 'lastFetchedAt': + const NullableDateTimeConverter().toJson(instance.lastFetchedAt), + 'bannerUrl': const NullableUriConverter().toJson(instance.bannerUrl), + 'bannerBlurhash': instance.bannerBlurhash, + 'isLocked': instance.isLocked, + 'isSilenced': instance.isSilenced, + 'isSuspended': instance.isSuspended, + 'description': instance.description, + 'location': instance.location, + 'birthday': const NullableDateTimeConverter().toJson(instance.birthday), + 'lang': instance.lang, + 'fields': instance.fields, + 'followersCount': instance.followersCount, + 'followingCount': instance.followingCount, + 'notesCount': instance.notesCount, + 'pinnedNoteIds': instance.pinnedNoteIds, + 'pinnedNotes': instance.pinnedNotes, + 'pinnedPageId': instance.pinnedPageId, + 'pinnedPage': instance.pinnedPage, + 'publicReactions': instance.publicReactions, + 'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!, + 'twoFactorEnabled': instance.twoFactorEnabled, + 'usePasswordLessLogin': instance.usePasswordLessLogin, + 'securityKeys': instance.securityKeys, + 'roles': instance.roles, + 'memo': instance.memo, + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +const _$FFVisibilityEnumMap = { + FFVisibility.public: 'public', + FFVisibility.followers: 'followers', + FFVisibility.private: 'private', +}; + +_$UserDetailedNotMeWithRelationsImpl + _$$UserDetailedNotMeWithRelationsImplFromJson(Map json) => + _$UserDetailedNotMeWithRelationsImpl( + id: json['id'] as String, + name: json['name'] as String?, + username: json['username'] as String, + host: json['host'] as String?, + avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), + avatarBlurhash: json['avatarBlurhash'] as String?, + avatarDecorations: (json['avatarDecorations'] as List?) + ?.map((e) => + UserAvatarDecoration.fromJson(e as Map)) + .toList() ?? + const [], + isBot: json['isBot'] as bool, + isCat: json['isCat'] as bool, + instance: json['instance'] == null + ? null + : UserInstanceInfo.fromJson( + json['instance'] as Map), + emojis: json['emojis'] == null + ? const {} + : const EmojisConverter().fromJson(json['emojis']), + onlineStatus: const OnlineStatusJsonConverter() + .fromJson(json['onlineStatus'] as String?), + badgeRoles: (json['badgeRoles'] as List?) + ?.map( + (e) => UserBadgeRole.fromJson(e as Map)) + .toList() ?? + const [], + url: _$JsonConverterFromJson( + json['url'], const NullableUriConverter().fromJson), + uri: _$JsonConverterFromJson( + json['uri'], const NullableUriConverter().fromJson), + createdAt: + const DateTimeConverter().fromJson(json['createdAt'] as String), + updatedAt: _$JsonConverterFromJson( + json['updatedAt'], const NullableDateTimeConverter().fromJson), + lastFetchedAt: _$JsonConverterFromJson( + json['lastFetchedAt'], + const NullableDateTimeConverter().fromJson), + bannerUrl: _$JsonConverterFromJson( + json['bannerUrl'], const NullableUriConverter().fromJson), + bannerBlurhash: json['bannerBlurhash'] as String?, + isLocked: json['isLocked'] as bool, + isSilenced: json['isSilenced'] as bool, + isSuspended: json['isSuspended'] as bool, + description: json['description'] as String?, + location: json['location'] as String?, + birthday: _$JsonConverterFromJson( + json['birthday'], const NullableDateTimeConverter().fromJson), + lang: json['lang'] as String?, + fields: (json['fields'] as List?) + ?.map((e) => UserField.fromJson(e as Map)) + .toList(), + followersCount: json['followersCount'] as int, + followingCount: json['followingCount'] as int, + notesCount: json['notesCount'] as int, + pinnedNoteIds: (json['pinnedNoteIds'] as List?) + ?.map((e) => e as String) + .toList(), + pinnedNotes: (json['pinnedNotes'] as List?) + ?.map((e) => Note.fromJson(e as Map)) + .toList(), + pinnedPageId: json['pinnedPageId'] as String?, + pinnedPage: json['pinnedPage'] as Map?, + publicReactions: json['publicReactions'] as bool, + ffVisibility: + $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']), + twoFactorEnabled: json['twoFactorEnabled'] as bool, + usePasswordLessLogin: json['usePasswordLessLogin'] as bool, + securityKeys: json['securityKeys'] as bool, + roles: (json['roles'] as List?) + ?.map((e) => UserRole.fromJson(e as Map)) + .toList(), + memo: json['memo'] as String?, + isFollowing: json['isFollowing'] as bool, + isFollowed: json['isFollowed'] as bool, + hasPendingFollowRequestFromYou: + json['hasPendingFollowRequestFromYou'] as bool, + hasPendingFollowRequestToYou: + json['hasPendingFollowRequestToYou'] as bool, + isBlocking: json['isBlocking'] as bool, + isBlocked: json['isBlocked'] as bool, + isMuted: json['isMuted'] as bool, + isRenoteMuted: json['isRenoteMuted'] as bool, + ); + +Map _$$UserDetailedNotMeWithRelationsImplToJson( + _$UserDetailedNotMeWithRelationsImpl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'username': instance.username, + 'host': instance.host, 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), - 'avatarDecorations': instance.avatarDecorations, 'avatarBlurhash': instance.avatarBlurhash, - 'instance': instance.instance, + 'avatarDecorations': instance.avatarDecorations, + 'isBot': instance.isBot, 'isCat': instance.isCat, + 'instance': instance.instance, + 'emojis': const EmojisConverter().toJson(instance.emojis), + 'onlineStatus': + const OnlineStatusJsonConverter().toJson(instance.onlineStatus), + 'badgeRoles': instance.badgeRoles, + 'url': const NullableUriConverter().toJson(instance.url), + 'uri': const NullableUriConverter().toJson(instance.uri), + 'createdAt': const DateTimeConverter().toJson(instance.createdAt), + 'updatedAt': const NullableDateTimeConverter().toJson(instance.updatedAt), + 'lastFetchedAt': + const NullableDateTimeConverter().toJson(instance.lastFetchedAt), + 'bannerUrl': const NullableUriConverter().toJson(instance.bannerUrl), + 'bannerBlurhash': instance.bannerBlurhash, + 'isLocked': instance.isLocked, + 'isSilenced': instance.isSilenced, + 'isSuspended': instance.isSuspended, + 'description': instance.description, + 'location': instance.location, + 'birthday': const NullableDateTimeConverter().toJson(instance.birthday), + 'lang': instance.lang, + 'fields': instance.fields, + 'followersCount': instance.followersCount, + 'followingCount': instance.followingCount, + 'notesCount': instance.notesCount, + 'pinnedNoteIds': instance.pinnedNoteIds, + 'pinnedNotes': instance.pinnedNotes, + 'pinnedPageId': instance.pinnedPageId, + 'pinnedPage': instance.pinnedPage, + 'publicReactions': instance.publicReactions, + 'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!, + 'twoFactorEnabled': instance.twoFactorEnabled, + 'usePasswordLessLogin': instance.usePasswordLessLogin, + 'securityKeys': instance.securityKeys, + 'roles': instance.roles, + 'memo': instance.memo, + 'isFollowing': instance.isFollowing, + 'isFollowed': instance.isFollowed, + 'hasPendingFollowRequestFromYou': instance.hasPendingFollowRequestFromYou, + 'hasPendingFollowRequestToYou': instance.hasPendingFollowRequestToYou, + 'isBlocking': instance.isBlocking, + 'isBlocked': instance.isBlocked, + 'isMuted': instance.isMuted, + 'isRenoteMuted': instance.isRenoteMuted, + }; + +_$MeDetailedImpl _$$MeDetailedImplFromJson(Map json) => + _$MeDetailedImpl( + id: json['id'] as String, + name: json['name'] as String?, + username: json['username'] as String, + host: json['host'] as String?, + avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), + avatarBlurhash: json['avatarBlurhash'] as String?, + avatarDecorations: (json['avatarDecorations'] as List?) + ?.map((e) => + UserAvatarDecoration.fromJson(e as Map)) + .toList() ?? + const [], + isBot: json['isBot'] as bool, + isCat: json['isCat'] as bool, + instance: json['instance'] == null + ? null + : UserInstanceInfo.fromJson(json['instance'] as Map), + emojis: json['emojis'] == null + ? const {} + : const EmojisConverter().fromJson(json['emojis']), + onlineStatus: const OnlineStatusJsonConverter() + .fromJson(json['onlineStatus'] as String?), + badgeRoles: (json['badgeRoles'] as List?) + ?.map((e) => UserBadgeRole.fromJson(e as Map)) + .toList() ?? + const [], + url: _$JsonConverterFromJson( + json['url'], const NullableUriConverter().fromJson), + uri: _$JsonConverterFromJson( + json['uri'], const NullableUriConverter().fromJson), + createdAt: + const DateTimeConverter().fromJson(json['createdAt'] as String), + updatedAt: _$JsonConverterFromJson( + json['updatedAt'], const NullableDateTimeConverter().fromJson), + lastFetchedAt: _$JsonConverterFromJson( + json['lastFetchedAt'], const NullableDateTimeConverter().fromJson), + bannerUrl: _$JsonConverterFromJson( + json['bannerUrl'], const NullableUriConverter().fromJson), + bannerBlurhash: json['bannerBlurhash'] as String?, + isLocked: json['isLocked'] as bool, + isSilenced: json['isSilenced'] as bool, + isSuspended: json['isSuspended'] as bool, + description: json['description'] as String?, + location: json['location'] as String?, + birthday: _$JsonConverterFromJson( + json['birthday'], const NullableDateTimeConverter().fromJson), + lang: json['lang'] as String?, + fields: (json['fields'] as List?) + ?.map((e) => UserField.fromJson(e as Map)) + .toList(), + followersCount: json['followersCount'] as int, + followingCount: json['followingCount'] as int, + notesCount: json['notesCount'] as int, + pinnedNoteIds: (json['pinnedNoteIds'] as List?) + ?.map((e) => e as String) + .toList(), + pinnedNotes: (json['pinnedNotes'] as List?) + ?.map((e) => Note.fromJson(e as Map)) + .toList(), + pinnedPageId: json['pinnedPageId'] as String?, + pinnedPage: json['pinnedPage'] as Map?, + publicReactions: json['publicReactions'] as bool, + ffVisibility: $enumDecode(_$FFVisibilityEnumMap, json['ffVisibility']), + twoFactorEnabled: json['twoFactorEnabled'] as bool, + usePasswordLessLogin: json['usePasswordLessLogin'] as bool, + securityKeys: json['securityKeys'] as bool, + roles: (json['roles'] as List?) + ?.map((e) => UserRole.fromJson(e as Map)) + .toList(), + memo: json['memo'] as String?, + avatarId: json['avatarId'] as String?, + bannerId: json['bannerId'] as String?, + isModerator: json['isModerator'] as bool, + isAdmin: json['isAdmin'] as bool, + injectFeaturedNote: json['injectFeaturedNote'] as bool, + receiveAnnouncementEmail: json['receiveAnnouncementEmail'] as bool, + alwaysMarkNsfw: json['alwaysMarkNsfw'] as bool, + autoSensitive: json['autoSensitive'] as bool, + carefulBot: json['carefulBot'] as bool, + autoAcceptFollowed: json['autoAcceptFollowed'] as bool, + noCrawle: json['noCrawle'] as bool, + isExplorable: json['isExplorable'] as bool, + isDeleted: json['isDeleted'] as bool, + hideOnlineStatus: json['hideOnlineStatus'] as bool, + hasUnreadSpecifiedNotes: json['hasUnreadSpecifiedNotes'] as bool, + hasUnreadMentions: json['hasUnreadMentions'] as bool, + hasUnreadAnnouncement: json['hasUnreadAnnouncement'] as bool, + hasUnreadAntenna: json['hasUnreadAntenna'] as bool, + hasUnreadChannel: json['hasUnreadChannel'] as bool, + hasUnreadNotification: json['hasUnreadNotification'] as bool, + hasPendingReceivedFollowRequest: + json['hasPendingReceivedFollowRequest'] as bool, + unreadNotificationsCount: json['unreadNotificationsCount'] as int?, + unreadAnnouncements: (json['unreadAnnouncements'] as List?) + ?.map((e) => + AnnouncementsResponse.fromJson(e as Map)) + .toList() ?? + const [], + mutedWords: (json['mutedWords'] as List) + .map(const MuteWordsConverter().fromJson) + .toList(), + hardMutedWords: (json['hardMutedWords'] as List?) + ?.map(const MuteWordsConverter().fromJson) + .toList() ?? + const [], + mutedInstances: (json['mutedInstances'] as List) + .map((e) => e as String) + .toList(), + mutingNotificationTypes: + (json['mutingNotificationTypes'] as List?) + ?.map((e) => e as String) + .toList(), + notificationRecieveConfig: json['notificationRecieveConfig'], + emailNotificationTypes: (json['emailNotificationTypes'] as List) + .map((e) => e as String) + .toList(), + achievements: (json['achievements'] as List) + .map((e) => UserAchievement.fromJson(e as Map)) + .toList(), + loggedInDays: json['loggedInDays'] as int, + policies: UserPolicies.fromJson(json['policies'] as Map), + ); + +Map _$$MeDetailedImplToJson(_$MeDetailedImpl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'username': instance.username, + 'host': instance.host, + 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), + 'avatarBlurhash': instance.avatarBlurhash, + 'avatarDecorations': instance.avatarDecorations, 'isBot': instance.isBot, + 'isCat': instance.isCat, + 'instance': instance.instance, 'emojis': const EmojisConverter().toJson(instance.emojis), + 'onlineStatus': + const OnlineStatusJsonConverter().toJson(instance.onlineStatus), + 'badgeRoles': instance.badgeRoles, + 'url': const NullableUriConverter().toJson(instance.url), + 'uri': const NullableUriConverter().toJson(instance.uri), + 'createdAt': const DateTimeConverter().toJson(instance.createdAt), + 'updatedAt': const NullableDateTimeConverter().toJson(instance.updatedAt), + 'lastFetchedAt': + const NullableDateTimeConverter().toJson(instance.lastFetchedAt), + 'bannerUrl': const NullableUriConverter().toJson(instance.bannerUrl), + 'bannerBlurhash': instance.bannerBlurhash, + 'isLocked': instance.isLocked, + 'isSilenced': instance.isSilenced, + 'isSuspended': instance.isSuspended, + 'description': instance.description, + 'location': instance.location, + 'birthday': const NullableDateTimeConverter().toJson(instance.birthday), + 'lang': instance.lang, + 'fields': instance.fields, + 'followersCount': instance.followersCount, + 'followingCount': instance.followingCount, + 'notesCount': instance.notesCount, + 'pinnedNoteIds': instance.pinnedNoteIds, + 'pinnedNotes': instance.pinnedNotes, + 'pinnedPageId': instance.pinnedPageId, + 'pinnedPage': instance.pinnedPage, + 'publicReactions': instance.publicReactions, + 'ffVisibility': _$FFVisibilityEnumMap[instance.ffVisibility]!, + 'twoFactorEnabled': instance.twoFactorEnabled, + 'usePasswordLessLogin': instance.usePasswordLessLogin, + 'securityKeys': instance.securityKeys, + 'roles': instance.roles, + 'memo': instance.memo, + 'avatarId': instance.avatarId, + 'bannerId': instance.bannerId, + 'isModerator': instance.isModerator, + 'isAdmin': instance.isAdmin, + 'injectFeaturedNote': instance.injectFeaturedNote, + 'receiveAnnouncementEmail': instance.receiveAnnouncementEmail, + 'alwaysMarkNsfw': instance.alwaysMarkNsfw, + 'autoSensitive': instance.autoSensitive, + 'carefulBot': instance.carefulBot, + 'autoAcceptFollowed': instance.autoAcceptFollowed, + 'noCrawle': instance.noCrawle, + 'isExplorable': instance.isExplorable, + 'isDeleted': instance.isDeleted, + 'hideOnlineStatus': instance.hideOnlineStatus, + 'hasUnreadSpecifiedNotes': instance.hasUnreadSpecifiedNotes, + 'hasUnreadMentions': instance.hasUnreadMentions, + 'hasUnreadAnnouncement': instance.hasUnreadAnnouncement, + 'hasUnreadAntenna': instance.hasUnreadAntenna, + 'hasUnreadChannel': instance.hasUnreadChannel, + 'hasUnreadNotification': instance.hasUnreadNotification, + 'hasPendingReceivedFollowRequest': + instance.hasPendingReceivedFollowRequest, + 'unreadNotificationsCount': instance.unreadNotificationsCount, + 'unreadAnnouncements': instance.unreadAnnouncements, + 'mutedWords': + instance.mutedWords.map(const MuteWordsConverter().toJson).toList(), + 'hardMutedWords': instance.hardMutedWords + .map(const MuteWordsConverter().toJson) + .toList(), + 'mutedInstances': instance.mutedInstances, + 'mutingNotificationTypes': instance.mutingNotificationTypes, + 'notificationRecieveConfig': instance.notificationRecieveConfig, + 'emailNotificationTypes': instance.emailNotificationTypes, + 'achievements': instance.achievements, + 'loggedInDays': instance.loggedInDays, + 'policies': instance.policies, }; _$UserAvatarDecorationImpl _$$UserAvatarDecorationImplFromJson( @@ -94,12 +583,6 @@ Map _$$UserInstanceInfoImplToJson( 'themeColor': instance.themeColor, }; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); - _$UserBadgeRoleImpl _$$UserBadgeRoleImplFromJson(Map json) => _$UserBadgeRoleImpl( name: json['name'] as String, diff --git a/lib/src/data/i/i_notifications_response.dart b/lib/src/data/i/i_notifications_response.dart index 7cc449f4..6d1206ba 100644 --- a/lib/src/data/i/i_notifications_response.dart +++ b/lib/src/data/i/i_notifications_response.dart @@ -22,7 +22,7 @@ class INotificationsResponse with _$INotificationsResponse { @NullableUriConverter() Uri? customIcon, String? appAccessTokenId, String? userId, - User? user, + UserLite? user, Note? note, }) = _INotificationsResponse; diff --git a/lib/src/data/i/i_notifications_response.freezed.dart b/lib/src/data/i/i_notifications_response.freezed.dart index 369403c7..8a2cf93a 100644 --- a/lib/src/data/i/i_notifications_response.freezed.dart +++ b/lib/src/data/i/i_notifications_response.freezed.dart @@ -36,7 +36,7 @@ mixin _$INotificationsResponse { Uri? get customIcon => throw _privateConstructorUsedError; String? get appAccessTokenId => throw _privateConstructorUsedError; String? get userId => throw _privateConstructorUsedError; - User? get user => throw _privateConstructorUsedError; + UserLite? get user => throw _privateConstructorUsedError; Note? get note => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @@ -65,10 +65,10 @@ abstract class $INotificationsResponseCopyWith<$Res> { @NullableUriConverter() Uri? customIcon, String? appAccessTokenId, String? userId, - User? user, + UserLite? user, Note? note}); - $UserCopyWith<$Res>? get user; + $UserLiteCopyWith<$Res>? get user; $NoteCopyWith<$Res>? get note; } @@ -158,7 +158,7 @@ class _$INotificationsResponseCopyWithImpl<$Res, user: freezed == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User?, + as UserLite?, note: freezed == note ? _value.note : note // ignore: cast_nullable_to_non_nullable @@ -168,12 +168,12 @@ class _$INotificationsResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res>? get user { + $UserLiteCopyWith<$Res>? get user { if (_value.user == null) { return null; } - return $UserCopyWith<$Res>(_value.user!, (value) { + return $UserLiteCopyWith<$Res>(_value.user!, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -214,11 +214,11 @@ abstract class _$$INotificationsResponseImplCopyWith<$Res> @NullableUriConverter() Uri? customIcon, String? appAccessTokenId, String? userId, - User? user, + UserLite? user, Note? note}); @override - $UserCopyWith<$Res>? get user; + $UserLiteCopyWith<$Res>? get user; @override $NoteCopyWith<$Res>? get note; } @@ -308,7 +308,7 @@ class __$$INotificationsResponseImplCopyWithImpl<$Res> user: freezed == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User?, + as UserLite?, note: freezed == note ? _value.note : note // ignore: cast_nullable_to_non_nullable @@ -369,7 +369,7 @@ class _$INotificationsResponseImpl implements _INotificationsResponse { @override final String? userId; @override - final User? user; + final UserLite? user; @override final Note? note; @@ -458,7 +458,7 @@ abstract class _INotificationsResponse implements INotificationsResponse { @NullableUriConverter() final Uri? customIcon, final String? appAccessTokenId, final String? userId, - final User? user, + final UserLite? user, final Note? note}) = _$INotificationsResponseImpl; factory _INotificationsResponse.fromJson(Map json) = @@ -493,7 +493,7 @@ abstract class _INotificationsResponse implements INotificationsResponse { @override String? get userId; @override - User? get user; + UserLite? get user; @override Note? get note; @override diff --git a/lib/src/data/i/i_notifications_response.g.dart b/lib/src/data/i/i_notifications_response.g.dart index f5bc5ad9..366c3f3d 100644 --- a/lib/src/data/i/i_notifications_response.g.dart +++ b/lib/src/data/i/i_notifications_response.g.dart @@ -26,7 +26,7 @@ _$INotificationsResponseImpl _$$INotificationsResponseImplFromJson( userId: json['userId'] as String?, user: json['user'] == null ? null - : User.fromJson(json['user'] as Map), + : UserLite.fromJson(json['user'] as Map), note: json['note'] == null ? null : Note.fromJson(json['note'] as Map), diff --git a/lib/src/data/i_response.dart b/lib/src/data/i_response.dart deleted file mode 100644 index 1cd48955..00000000 --- a/lib/src/data/i_response.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:misskey_dart/misskey_dart.dart'; -import 'package:misskey_dart/src/converters/date_time_converter.dart'; -import 'package:misskey_dart/src/converters/emojis_converter.dart'; -import 'package:misskey_dart/src/converters/mute_words_converter.dart'; -import 'package:misskey_dart/src/converters/uri_converter.dart'; - -part 'i_response.freezed.dart'; -part 'i_response.g.dart'; - -@freezed -class IResponse with _$IResponse { - const factory IResponse({ - required String id, - String? name, - required String username, - String? host, - @UriConverter() required Uri avatarUrl, - String? avatarBlurhash, - @Default([]) List avatarDecorations, - required bool isBot, - required bool isCat, - @EmojisConverter() @Default({}) Map? emojis, - String? onlineStatus, - required List badgeRoles, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - @DateTimeConverter() required DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - required bool isLocked, - required bool isSilenced, - required bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - required int followersCount, - required int followingCount, - required int notesCount, - List? pinnedNoteIds, - String? pinnedPageId, - Map? pinnedPage, - required bool publicReactions, - required String ffVisibility, - required bool twoFactorEnabled, - required bool usePasswordLessLogin, - required bool securityKeys, - String? avatarId, - String? bannerId, - required bool isModerator, - required bool isAdmin, - required bool injectFeaturedNote, - required bool receiveAnnouncementEmail, - required bool alwaysMarkNsfw, - required bool autoSensitive, - required bool carefulBot, - required bool autoAcceptFollowed, - required bool noCrawle, - required bool isExplorable, - required bool isDeleted, - required bool hideOnlineStatus, - required bool hasUnreadSpecifiedNotes, - required bool hasUnreadMentions, - required bool hasUnreadAnnouncement, - required bool hasUnreadAntenna, - required bool hasUnreadChannel, - required bool hasUnreadNotification, - required bool hasPendingReceivedFollowRequest, - int? unreadNotificationsCount, - @Default([]) List unreadAnnouncements, - @MuteWordsConverter() required List mutedWords, - @MuteWordsConverter() @Default([]) List hardMutedWords, - required List mutedInstances, - @Deprecated("Depracted from Misskey 2023.9.2") - List? mutingNotificationTypes, - dynamic notificationRecieveConfig, - required List emailNotificationTypes, - //required bool showTimelineReplies, - required List achievements, - required int loggedInDays, - required UserPolicies policies, - }) = _IResponse; - - factory IResponse.fromJson(Map json) => - _$IResponseFromJson(json); -} - -class MuteWord { - final String? regExp; - final List? content; - - const MuteWord({this.regExp, this.content}); -} diff --git a/lib/src/data/i_response.freezed.dart b/lib/src/data/i_response.freezed.dart deleted file mode 100644 index 8c930722..00000000 --- a/lib/src/data/i_response.freezed.dart +++ /dev/null @@ -1,1817 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'i_response.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -IResponse _$IResponseFromJson(Map json) { - return _IResponse.fromJson(json); -} - -/// @nodoc -mixin _$IResponse { - String get id => throw _privateConstructorUsedError; - String? get name => throw _privateConstructorUsedError; - String get username => throw _privateConstructorUsedError; - String? get host => throw _privateConstructorUsedError; - @UriConverter() - Uri get avatarUrl => throw _privateConstructorUsedError; - String? get avatarBlurhash => throw _privateConstructorUsedError; - List get avatarDecorations => - throw _privateConstructorUsedError; - bool get isBot => throw _privateConstructorUsedError; - bool get isCat => throw _privateConstructorUsedError; - @EmojisConverter() - Map? get emojis => throw _privateConstructorUsedError; - String? get onlineStatus => throw _privateConstructorUsedError; - List get badgeRoles => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get url => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get uri => throw _privateConstructorUsedError; - @DateTimeConverter() - DateTime get createdAt => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get updatedAt => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get lastFetchedAt => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get bannerUrl => throw _privateConstructorUsedError; - String? get bannerBlurhash => throw _privateConstructorUsedError; - bool get isLocked => throw _privateConstructorUsedError; - bool get isSilenced => throw _privateConstructorUsedError; - bool get isSuspended => throw _privateConstructorUsedError; - String? get description => throw _privateConstructorUsedError; - String? get location => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get birthday => throw _privateConstructorUsedError; - String? get lang => throw _privateConstructorUsedError; - List? get fields => throw _privateConstructorUsedError; - int get followersCount => throw _privateConstructorUsedError; - int get followingCount => throw _privateConstructorUsedError; - int get notesCount => throw _privateConstructorUsedError; - List? get pinnedNoteIds => throw _privateConstructorUsedError; - String? get pinnedPageId => throw _privateConstructorUsedError; - Map? get pinnedPage => throw _privateConstructorUsedError; - bool get publicReactions => throw _privateConstructorUsedError; - String get ffVisibility => throw _privateConstructorUsedError; - bool get twoFactorEnabled => throw _privateConstructorUsedError; - bool get usePasswordLessLogin => throw _privateConstructorUsedError; - bool get securityKeys => throw _privateConstructorUsedError; - String? get avatarId => throw _privateConstructorUsedError; - String? get bannerId => throw _privateConstructorUsedError; - bool get isModerator => throw _privateConstructorUsedError; - bool get isAdmin => throw _privateConstructorUsedError; - bool get injectFeaturedNote => throw _privateConstructorUsedError; - bool get receiveAnnouncementEmail => throw _privateConstructorUsedError; - bool get alwaysMarkNsfw => throw _privateConstructorUsedError; - bool get autoSensitive => throw _privateConstructorUsedError; - bool get carefulBot => throw _privateConstructorUsedError; - bool get autoAcceptFollowed => throw _privateConstructorUsedError; - bool get noCrawle => throw _privateConstructorUsedError; - bool get isExplorable => throw _privateConstructorUsedError; - bool get isDeleted => throw _privateConstructorUsedError; - bool get hideOnlineStatus => throw _privateConstructorUsedError; - bool get hasUnreadSpecifiedNotes => throw _privateConstructorUsedError; - bool get hasUnreadMentions => throw _privateConstructorUsedError; - bool get hasUnreadAnnouncement => throw _privateConstructorUsedError; - bool get hasUnreadAntenna => throw _privateConstructorUsedError; - bool get hasUnreadChannel => throw _privateConstructorUsedError; - bool get hasUnreadNotification => throw _privateConstructorUsedError; - bool get hasPendingReceivedFollowRequest => - throw _privateConstructorUsedError; - int? get unreadNotificationsCount => throw _privateConstructorUsedError; - List get unreadAnnouncements => - throw _privateConstructorUsedError; - @MuteWordsConverter() - List get mutedWords => throw _privateConstructorUsedError; - @MuteWordsConverter() - List get hardMutedWords => throw _privateConstructorUsedError; - List get mutedInstances => throw _privateConstructorUsedError; - @Deprecated("Depracted from Misskey 2023.9.2") - List? get mutingNotificationTypes => - throw _privateConstructorUsedError; - dynamic get notificationRecieveConfig => throw _privateConstructorUsedError; - List get emailNotificationTypes => - throw _privateConstructorUsedError; //required bool showTimelineReplies, - List get achievements => throw _privateConstructorUsedError; - int get loggedInDays => throw _privateConstructorUsedError; - UserPolicies get policies => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $IResponseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $IResponseCopyWith<$Res> { - factory $IResponseCopyWith(IResponse value, $Res Function(IResponse) then) = - _$IResponseCopyWithImpl<$Res, IResponse>; - @useResult - $Res call( - {String id, - String? name, - String username, - String? host, - @UriConverter() Uri avatarUrl, - String? avatarBlurhash, - List avatarDecorations, - bool isBot, - bool isCat, - @EmojisConverter() Map? emojis, - String? onlineStatus, - List badgeRoles, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - @DateTimeConverter() DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - bool isLocked, - bool isSilenced, - bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - int followersCount, - int followingCount, - int notesCount, - List? pinnedNoteIds, - String? pinnedPageId, - Map? pinnedPage, - bool publicReactions, - String ffVisibility, - bool twoFactorEnabled, - bool usePasswordLessLogin, - bool securityKeys, - String? avatarId, - String? bannerId, - bool isModerator, - bool isAdmin, - bool injectFeaturedNote, - bool receiveAnnouncementEmail, - bool alwaysMarkNsfw, - bool autoSensitive, - bool carefulBot, - bool autoAcceptFollowed, - bool noCrawle, - bool isExplorable, - bool isDeleted, - bool hideOnlineStatus, - bool hasUnreadSpecifiedNotes, - bool hasUnreadMentions, - bool hasUnreadAnnouncement, - bool hasUnreadAntenna, - bool hasUnreadChannel, - bool hasUnreadNotification, - bool hasPendingReceivedFollowRequest, - int? unreadNotificationsCount, - List unreadAnnouncements, - @MuteWordsConverter() List mutedWords, - @MuteWordsConverter() List hardMutedWords, - List mutedInstances, - @Deprecated("Depracted from Misskey 2023.9.2") - List? mutingNotificationTypes, - dynamic notificationRecieveConfig, - List emailNotificationTypes, - List achievements, - int loggedInDays, - UserPolicies policies}); - - $UserPoliciesCopyWith<$Res> get policies; -} - -/// @nodoc -class _$IResponseCopyWithImpl<$Res, $Val extends IResponse> - implements $IResponseCopyWith<$Res> { - _$IResponseCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = freezed, - Object? username = null, - Object? host = freezed, - Object? avatarUrl = null, - Object? avatarBlurhash = freezed, - Object? avatarDecorations = null, - Object? isBot = null, - Object? isCat = null, - Object? emojis = freezed, - Object? onlineStatus = freezed, - Object? badgeRoles = null, - Object? url = freezed, - Object? uri = freezed, - Object? createdAt = null, - Object? updatedAt = freezed, - Object? lastFetchedAt = freezed, - Object? bannerUrl = freezed, - Object? bannerBlurhash = freezed, - Object? isLocked = null, - Object? isSilenced = null, - Object? isSuspended = null, - Object? description = freezed, - Object? location = freezed, - Object? birthday = freezed, - Object? lang = freezed, - Object? fields = freezed, - Object? followersCount = null, - Object? followingCount = null, - Object? notesCount = null, - Object? pinnedNoteIds = freezed, - Object? pinnedPageId = freezed, - Object? pinnedPage = freezed, - Object? publicReactions = null, - Object? ffVisibility = null, - Object? twoFactorEnabled = null, - Object? usePasswordLessLogin = null, - Object? securityKeys = null, - Object? avatarId = freezed, - Object? bannerId = freezed, - Object? isModerator = null, - Object? isAdmin = null, - Object? injectFeaturedNote = null, - Object? receiveAnnouncementEmail = null, - Object? alwaysMarkNsfw = null, - Object? autoSensitive = null, - Object? carefulBot = null, - Object? autoAcceptFollowed = null, - Object? noCrawle = null, - Object? isExplorable = null, - Object? isDeleted = null, - Object? hideOnlineStatus = null, - Object? hasUnreadSpecifiedNotes = null, - Object? hasUnreadMentions = null, - Object? hasUnreadAnnouncement = null, - Object? hasUnreadAntenna = null, - Object? hasUnreadChannel = null, - Object? hasUnreadNotification = null, - Object? hasPendingReceivedFollowRequest = null, - Object? unreadNotificationsCount = freezed, - Object? unreadAnnouncements = null, - Object? mutedWords = null, - Object? hardMutedWords = null, - Object? mutedInstances = null, - Object? mutingNotificationTypes = freezed, - Object? notificationRecieveConfig = freezed, - Object? emailNotificationTypes = null, - Object? achievements = null, - Object? loggedInDays = null, - Object? policies = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - host: freezed == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String?, - avatarUrl: null == avatarUrl - ? _value.avatarUrl - : avatarUrl // ignore: cast_nullable_to_non_nullable - as Uri, - avatarBlurhash: freezed == avatarBlurhash - ? _value.avatarBlurhash - : avatarBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - avatarDecorations: null == avatarDecorations - ? _value.avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, - isBot: null == isBot - ? _value.isBot - : isBot // ignore: cast_nullable_to_non_nullable - as bool, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, - emojis: freezed == emojis - ? _value.emojis - : emojis // ignore: cast_nullable_to_non_nullable - as Map?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as String?, - badgeRoles: null == badgeRoles - ? _value.badgeRoles - : badgeRoles // ignore: cast_nullable_to_non_nullable - as List, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as Uri?, - uri: freezed == uri - ? _value.uri - : uri // ignore: cast_nullable_to_non_nullable - as Uri?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lastFetchedAt: freezed == lastFetchedAt - ? _value.lastFetchedAt - : lastFetchedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - bannerUrl: freezed == bannerUrl - ? _value.bannerUrl - : bannerUrl // ignore: cast_nullable_to_non_nullable - as Uri?, - bannerBlurhash: freezed == bannerBlurhash - ? _value.bannerBlurhash - : bannerBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - isLocked: null == isLocked - ? _value.isLocked - : isLocked // ignore: cast_nullable_to_non_nullable - as bool, - isSilenced: null == isSilenced - ? _value.isSilenced - : isSilenced // ignore: cast_nullable_to_non_nullable - as bool, - isSuspended: null == isSuspended - ? _value.isSuspended - : isSuspended // ignore: cast_nullable_to_non_nullable - as bool, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - location: freezed == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String?, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, - lang: freezed == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String?, - fields: freezed == fields - ? _value.fields - : fields // ignore: cast_nullable_to_non_nullable - as List?, - followersCount: null == followersCount - ? _value.followersCount - : followersCount // ignore: cast_nullable_to_non_nullable - as int, - followingCount: null == followingCount - ? _value.followingCount - : followingCount // ignore: cast_nullable_to_non_nullable - as int, - notesCount: null == notesCount - ? _value.notesCount - : notesCount // ignore: cast_nullable_to_non_nullable - as int, - pinnedNoteIds: freezed == pinnedNoteIds - ? _value.pinnedNoteIds - : pinnedNoteIds // ignore: cast_nullable_to_non_nullable - as List?, - pinnedPageId: freezed == pinnedPageId - ? _value.pinnedPageId - : pinnedPageId // ignore: cast_nullable_to_non_nullable - as String?, - pinnedPage: freezed == pinnedPage - ? _value.pinnedPage - : pinnedPage // ignore: cast_nullable_to_non_nullable - as Map?, - publicReactions: null == publicReactions - ? _value.publicReactions - : publicReactions // ignore: cast_nullable_to_non_nullable - as bool, - ffVisibility: null == ffVisibility - ? _value.ffVisibility - : ffVisibility // ignore: cast_nullable_to_non_nullable - as String, - twoFactorEnabled: null == twoFactorEnabled - ? _value.twoFactorEnabled - : twoFactorEnabled // ignore: cast_nullable_to_non_nullable - as bool, - usePasswordLessLogin: null == usePasswordLessLogin - ? _value.usePasswordLessLogin - : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable - as bool, - securityKeys: null == securityKeys - ? _value.securityKeys - : securityKeys // ignore: cast_nullable_to_non_nullable - as bool, - avatarId: freezed == avatarId - ? _value.avatarId - : avatarId // ignore: cast_nullable_to_non_nullable - as String?, - bannerId: freezed == bannerId - ? _value.bannerId - : bannerId // ignore: cast_nullable_to_non_nullable - as String?, - isModerator: null == isModerator - ? _value.isModerator - : isModerator // ignore: cast_nullable_to_non_nullable - as bool, - isAdmin: null == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool, - injectFeaturedNote: null == injectFeaturedNote - ? _value.injectFeaturedNote - : injectFeaturedNote // ignore: cast_nullable_to_non_nullable - as bool, - receiveAnnouncementEmail: null == receiveAnnouncementEmail - ? _value.receiveAnnouncementEmail - : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable - as bool, - alwaysMarkNsfw: null == alwaysMarkNsfw - ? _value.alwaysMarkNsfw - : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable - as bool, - autoSensitive: null == autoSensitive - ? _value.autoSensitive - : autoSensitive // ignore: cast_nullable_to_non_nullable - as bool, - carefulBot: null == carefulBot - ? _value.carefulBot - : carefulBot // ignore: cast_nullable_to_non_nullable - as bool, - autoAcceptFollowed: null == autoAcceptFollowed - ? _value.autoAcceptFollowed - : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable - as bool, - noCrawle: null == noCrawle - ? _value.noCrawle - : noCrawle // ignore: cast_nullable_to_non_nullable - as bool, - isExplorable: null == isExplorable - ? _value.isExplorable - : isExplorable // ignore: cast_nullable_to_non_nullable - as bool, - isDeleted: null == isDeleted - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - hideOnlineStatus: null == hideOnlineStatus - ? _value.hideOnlineStatus - : hideOnlineStatus // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadSpecifiedNotes: null == hasUnreadSpecifiedNotes - ? _value.hasUnreadSpecifiedNotes - : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadMentions: null == hasUnreadMentions - ? _value.hasUnreadMentions - : hasUnreadMentions // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadAnnouncement: null == hasUnreadAnnouncement - ? _value.hasUnreadAnnouncement - : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadAntenna: null == hasUnreadAntenna - ? _value.hasUnreadAntenna - : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadChannel: null == hasUnreadChannel - ? _value.hasUnreadChannel - : hasUnreadChannel // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadNotification: null == hasUnreadNotification - ? _value.hasUnreadNotification - : hasUnreadNotification // ignore: cast_nullable_to_non_nullable - as bool, - hasPendingReceivedFollowRequest: null == hasPendingReceivedFollowRequest - ? _value.hasPendingReceivedFollowRequest - : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable - as bool, - unreadNotificationsCount: freezed == unreadNotificationsCount - ? _value.unreadNotificationsCount - : unreadNotificationsCount // ignore: cast_nullable_to_non_nullable - as int?, - unreadAnnouncements: null == unreadAnnouncements - ? _value.unreadAnnouncements - : unreadAnnouncements // ignore: cast_nullable_to_non_nullable - as List, - mutedWords: null == mutedWords - ? _value.mutedWords - : mutedWords // ignore: cast_nullable_to_non_nullable - as List, - hardMutedWords: null == hardMutedWords - ? _value.hardMutedWords - : hardMutedWords // ignore: cast_nullable_to_non_nullable - as List, - mutedInstances: null == mutedInstances - ? _value.mutedInstances - : mutedInstances // ignore: cast_nullable_to_non_nullable - as List, - mutingNotificationTypes: freezed == mutingNotificationTypes - ? _value.mutingNotificationTypes - : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - notificationRecieveConfig: freezed == notificationRecieveConfig - ? _value.notificationRecieveConfig - : notificationRecieveConfig // ignore: cast_nullable_to_non_nullable - as dynamic, - emailNotificationTypes: null == emailNotificationTypes - ? _value.emailNotificationTypes - : emailNotificationTypes // ignore: cast_nullable_to_non_nullable - as List, - achievements: null == achievements - ? _value.achievements - : achievements // ignore: cast_nullable_to_non_nullable - as List, - loggedInDays: null == loggedInDays - ? _value.loggedInDays - : loggedInDays // ignore: cast_nullable_to_non_nullable - as int, - policies: null == policies - ? _value.policies - : policies // ignore: cast_nullable_to_non_nullable - as UserPolicies, - ) as $Val); - } - - @override - @pragma('vm:prefer-inline') - $UserPoliciesCopyWith<$Res> get policies { - return $UserPoliciesCopyWith<$Res>(_value.policies, (value) { - return _then(_value.copyWith(policies: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$IResponseImplCopyWith<$Res> - implements $IResponseCopyWith<$Res> { - factory _$$IResponseImplCopyWith( - _$IResponseImpl value, $Res Function(_$IResponseImpl) then) = - __$$IResponseImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String? name, - String username, - String? host, - @UriConverter() Uri avatarUrl, - String? avatarBlurhash, - List avatarDecorations, - bool isBot, - bool isCat, - @EmojisConverter() Map? emojis, - String? onlineStatus, - List badgeRoles, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - @DateTimeConverter() DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - bool isLocked, - bool isSilenced, - bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - int followersCount, - int followingCount, - int notesCount, - List? pinnedNoteIds, - String? pinnedPageId, - Map? pinnedPage, - bool publicReactions, - String ffVisibility, - bool twoFactorEnabled, - bool usePasswordLessLogin, - bool securityKeys, - String? avatarId, - String? bannerId, - bool isModerator, - bool isAdmin, - bool injectFeaturedNote, - bool receiveAnnouncementEmail, - bool alwaysMarkNsfw, - bool autoSensitive, - bool carefulBot, - bool autoAcceptFollowed, - bool noCrawle, - bool isExplorable, - bool isDeleted, - bool hideOnlineStatus, - bool hasUnreadSpecifiedNotes, - bool hasUnreadMentions, - bool hasUnreadAnnouncement, - bool hasUnreadAntenna, - bool hasUnreadChannel, - bool hasUnreadNotification, - bool hasPendingReceivedFollowRequest, - int? unreadNotificationsCount, - List unreadAnnouncements, - @MuteWordsConverter() List mutedWords, - @MuteWordsConverter() List hardMutedWords, - List mutedInstances, - @Deprecated("Depracted from Misskey 2023.9.2") - List? mutingNotificationTypes, - dynamic notificationRecieveConfig, - List emailNotificationTypes, - List achievements, - int loggedInDays, - UserPolicies policies}); - - @override - $UserPoliciesCopyWith<$Res> get policies; -} - -/// @nodoc -class __$$IResponseImplCopyWithImpl<$Res> - extends _$IResponseCopyWithImpl<$Res, _$IResponseImpl> - implements _$$IResponseImplCopyWith<$Res> { - __$$IResponseImplCopyWithImpl( - _$IResponseImpl _value, $Res Function(_$IResponseImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = freezed, - Object? username = null, - Object? host = freezed, - Object? avatarUrl = null, - Object? avatarBlurhash = freezed, - Object? avatarDecorations = null, - Object? isBot = null, - Object? isCat = null, - Object? emojis = freezed, - Object? onlineStatus = freezed, - Object? badgeRoles = null, - Object? url = freezed, - Object? uri = freezed, - Object? createdAt = null, - Object? updatedAt = freezed, - Object? lastFetchedAt = freezed, - Object? bannerUrl = freezed, - Object? bannerBlurhash = freezed, - Object? isLocked = null, - Object? isSilenced = null, - Object? isSuspended = null, - Object? description = freezed, - Object? location = freezed, - Object? birthday = freezed, - Object? lang = freezed, - Object? fields = freezed, - Object? followersCount = null, - Object? followingCount = null, - Object? notesCount = null, - Object? pinnedNoteIds = freezed, - Object? pinnedPageId = freezed, - Object? pinnedPage = freezed, - Object? publicReactions = null, - Object? ffVisibility = null, - Object? twoFactorEnabled = null, - Object? usePasswordLessLogin = null, - Object? securityKeys = null, - Object? avatarId = freezed, - Object? bannerId = freezed, - Object? isModerator = null, - Object? isAdmin = null, - Object? injectFeaturedNote = null, - Object? receiveAnnouncementEmail = null, - Object? alwaysMarkNsfw = null, - Object? autoSensitive = null, - Object? carefulBot = null, - Object? autoAcceptFollowed = null, - Object? noCrawle = null, - Object? isExplorable = null, - Object? isDeleted = null, - Object? hideOnlineStatus = null, - Object? hasUnreadSpecifiedNotes = null, - Object? hasUnreadMentions = null, - Object? hasUnreadAnnouncement = null, - Object? hasUnreadAntenna = null, - Object? hasUnreadChannel = null, - Object? hasUnreadNotification = null, - Object? hasPendingReceivedFollowRequest = null, - Object? unreadNotificationsCount = freezed, - Object? unreadAnnouncements = null, - Object? mutedWords = null, - Object? hardMutedWords = null, - Object? mutedInstances = null, - Object? mutingNotificationTypes = freezed, - Object? notificationRecieveConfig = freezed, - Object? emailNotificationTypes = null, - Object? achievements = null, - Object? loggedInDays = null, - Object? policies = null, - }) { - return _then(_$IResponseImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - host: freezed == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String?, - avatarUrl: null == avatarUrl - ? _value.avatarUrl - : avatarUrl // ignore: cast_nullable_to_non_nullable - as Uri, - avatarBlurhash: freezed == avatarBlurhash - ? _value.avatarBlurhash - : avatarBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - avatarDecorations: null == avatarDecorations - ? _value._avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, - isBot: null == isBot - ? _value.isBot - : isBot // ignore: cast_nullable_to_non_nullable - as bool, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, - emojis: freezed == emojis - ? _value._emojis - : emojis // ignore: cast_nullable_to_non_nullable - as Map?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as String?, - badgeRoles: null == badgeRoles - ? _value._badgeRoles - : badgeRoles // ignore: cast_nullable_to_non_nullable - as List, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as Uri?, - uri: freezed == uri - ? _value.uri - : uri // ignore: cast_nullable_to_non_nullable - as Uri?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lastFetchedAt: freezed == lastFetchedAt - ? _value.lastFetchedAt - : lastFetchedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - bannerUrl: freezed == bannerUrl - ? _value.bannerUrl - : bannerUrl // ignore: cast_nullable_to_non_nullable - as Uri?, - bannerBlurhash: freezed == bannerBlurhash - ? _value.bannerBlurhash - : bannerBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - isLocked: null == isLocked - ? _value.isLocked - : isLocked // ignore: cast_nullable_to_non_nullable - as bool, - isSilenced: null == isSilenced - ? _value.isSilenced - : isSilenced // ignore: cast_nullable_to_non_nullable - as bool, - isSuspended: null == isSuspended - ? _value.isSuspended - : isSuspended // ignore: cast_nullable_to_non_nullable - as bool, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - location: freezed == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String?, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, - lang: freezed == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String?, - fields: freezed == fields - ? _value._fields - : fields // ignore: cast_nullable_to_non_nullable - as List?, - followersCount: null == followersCount - ? _value.followersCount - : followersCount // ignore: cast_nullable_to_non_nullable - as int, - followingCount: null == followingCount - ? _value.followingCount - : followingCount // ignore: cast_nullable_to_non_nullable - as int, - notesCount: null == notesCount - ? _value.notesCount - : notesCount // ignore: cast_nullable_to_non_nullable - as int, - pinnedNoteIds: freezed == pinnedNoteIds - ? _value._pinnedNoteIds - : pinnedNoteIds // ignore: cast_nullable_to_non_nullable - as List?, - pinnedPageId: freezed == pinnedPageId - ? _value.pinnedPageId - : pinnedPageId // ignore: cast_nullable_to_non_nullable - as String?, - pinnedPage: freezed == pinnedPage - ? _value._pinnedPage - : pinnedPage // ignore: cast_nullable_to_non_nullable - as Map?, - publicReactions: null == publicReactions - ? _value.publicReactions - : publicReactions // ignore: cast_nullable_to_non_nullable - as bool, - ffVisibility: null == ffVisibility - ? _value.ffVisibility - : ffVisibility // ignore: cast_nullable_to_non_nullable - as String, - twoFactorEnabled: null == twoFactorEnabled - ? _value.twoFactorEnabled - : twoFactorEnabled // ignore: cast_nullable_to_non_nullable - as bool, - usePasswordLessLogin: null == usePasswordLessLogin - ? _value.usePasswordLessLogin - : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable - as bool, - securityKeys: null == securityKeys - ? _value.securityKeys - : securityKeys // ignore: cast_nullable_to_non_nullable - as bool, - avatarId: freezed == avatarId - ? _value.avatarId - : avatarId // ignore: cast_nullable_to_non_nullable - as String?, - bannerId: freezed == bannerId - ? _value.bannerId - : bannerId // ignore: cast_nullable_to_non_nullable - as String?, - isModerator: null == isModerator - ? _value.isModerator - : isModerator // ignore: cast_nullable_to_non_nullable - as bool, - isAdmin: null == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool, - injectFeaturedNote: null == injectFeaturedNote - ? _value.injectFeaturedNote - : injectFeaturedNote // ignore: cast_nullable_to_non_nullable - as bool, - receiveAnnouncementEmail: null == receiveAnnouncementEmail - ? _value.receiveAnnouncementEmail - : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable - as bool, - alwaysMarkNsfw: null == alwaysMarkNsfw - ? _value.alwaysMarkNsfw - : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable - as bool, - autoSensitive: null == autoSensitive - ? _value.autoSensitive - : autoSensitive // ignore: cast_nullable_to_non_nullable - as bool, - carefulBot: null == carefulBot - ? _value.carefulBot - : carefulBot // ignore: cast_nullable_to_non_nullable - as bool, - autoAcceptFollowed: null == autoAcceptFollowed - ? _value.autoAcceptFollowed - : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable - as bool, - noCrawle: null == noCrawle - ? _value.noCrawle - : noCrawle // ignore: cast_nullable_to_non_nullable - as bool, - isExplorable: null == isExplorable - ? _value.isExplorable - : isExplorable // ignore: cast_nullable_to_non_nullable - as bool, - isDeleted: null == isDeleted - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - hideOnlineStatus: null == hideOnlineStatus - ? _value.hideOnlineStatus - : hideOnlineStatus // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadSpecifiedNotes: null == hasUnreadSpecifiedNotes - ? _value.hasUnreadSpecifiedNotes - : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadMentions: null == hasUnreadMentions - ? _value.hasUnreadMentions - : hasUnreadMentions // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadAnnouncement: null == hasUnreadAnnouncement - ? _value.hasUnreadAnnouncement - : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadAntenna: null == hasUnreadAntenna - ? _value.hasUnreadAntenna - : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadChannel: null == hasUnreadChannel - ? _value.hasUnreadChannel - : hasUnreadChannel // ignore: cast_nullable_to_non_nullable - as bool, - hasUnreadNotification: null == hasUnreadNotification - ? _value.hasUnreadNotification - : hasUnreadNotification // ignore: cast_nullable_to_non_nullable - as bool, - hasPendingReceivedFollowRequest: null == hasPendingReceivedFollowRequest - ? _value.hasPendingReceivedFollowRequest - : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable - as bool, - unreadNotificationsCount: freezed == unreadNotificationsCount - ? _value.unreadNotificationsCount - : unreadNotificationsCount // ignore: cast_nullable_to_non_nullable - as int?, - unreadAnnouncements: null == unreadAnnouncements - ? _value._unreadAnnouncements - : unreadAnnouncements // ignore: cast_nullable_to_non_nullable - as List, - mutedWords: null == mutedWords - ? _value._mutedWords - : mutedWords // ignore: cast_nullable_to_non_nullable - as List, - hardMutedWords: null == hardMutedWords - ? _value._hardMutedWords - : hardMutedWords // ignore: cast_nullable_to_non_nullable - as List, - mutedInstances: null == mutedInstances - ? _value._mutedInstances - : mutedInstances // ignore: cast_nullable_to_non_nullable - as List, - mutingNotificationTypes: freezed == mutingNotificationTypes - ? _value._mutingNotificationTypes - : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - notificationRecieveConfig: freezed == notificationRecieveConfig - ? _value.notificationRecieveConfig - : notificationRecieveConfig // ignore: cast_nullable_to_non_nullable - as dynamic, - emailNotificationTypes: null == emailNotificationTypes - ? _value._emailNotificationTypes - : emailNotificationTypes // ignore: cast_nullable_to_non_nullable - as List, - achievements: null == achievements - ? _value._achievements - : achievements // ignore: cast_nullable_to_non_nullable - as List, - loggedInDays: null == loggedInDays - ? _value.loggedInDays - : loggedInDays // ignore: cast_nullable_to_non_nullable - as int, - policies: null == policies - ? _value.policies - : policies // ignore: cast_nullable_to_non_nullable - as UserPolicies, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$IResponseImpl implements _IResponse { - const _$IResponseImpl( - {required this.id, - this.name, - required this.username, - this.host, - @UriConverter() required this.avatarUrl, - this.avatarBlurhash, - final List avatarDecorations = const [], - required this.isBot, - required this.isCat, - @EmojisConverter() final Map? emojis = const {}, - this.onlineStatus, - required final List badgeRoles, - @NullableUriConverter() this.url, - @NullableUriConverter() this.uri, - @DateTimeConverter() required this.createdAt, - @NullableDateTimeConverter() this.updatedAt, - @NullableDateTimeConverter() this.lastFetchedAt, - @NullableUriConverter() this.bannerUrl, - this.bannerBlurhash, - required this.isLocked, - required this.isSilenced, - required this.isSuspended, - this.description, - this.location, - @NullableDateTimeConverter() this.birthday, - this.lang, - final List? fields, - required this.followersCount, - required this.followingCount, - required this.notesCount, - final List? pinnedNoteIds, - this.pinnedPageId, - final Map? pinnedPage, - required this.publicReactions, - required this.ffVisibility, - required this.twoFactorEnabled, - required this.usePasswordLessLogin, - required this.securityKeys, - this.avatarId, - this.bannerId, - required this.isModerator, - required this.isAdmin, - required this.injectFeaturedNote, - required this.receiveAnnouncementEmail, - required this.alwaysMarkNsfw, - required this.autoSensitive, - required this.carefulBot, - required this.autoAcceptFollowed, - required this.noCrawle, - required this.isExplorable, - required this.isDeleted, - required this.hideOnlineStatus, - required this.hasUnreadSpecifiedNotes, - required this.hasUnreadMentions, - required this.hasUnreadAnnouncement, - required this.hasUnreadAntenna, - required this.hasUnreadChannel, - required this.hasUnreadNotification, - required this.hasPendingReceivedFollowRequest, - this.unreadNotificationsCount, - final List unreadAnnouncements = const [], - @MuteWordsConverter() required final List mutedWords, - @MuteWordsConverter() final List hardMutedWords = const [], - required final List mutedInstances, - @Deprecated("Depracted from Misskey 2023.9.2") - final List? mutingNotificationTypes, - this.notificationRecieveConfig, - required final List emailNotificationTypes, - required final List achievements, - required this.loggedInDays, - required this.policies}) - : _avatarDecorations = avatarDecorations, - _emojis = emojis, - _badgeRoles = badgeRoles, - _fields = fields, - _pinnedNoteIds = pinnedNoteIds, - _pinnedPage = pinnedPage, - _unreadAnnouncements = unreadAnnouncements, - _mutedWords = mutedWords, - _hardMutedWords = hardMutedWords, - _mutedInstances = mutedInstances, - _mutingNotificationTypes = mutingNotificationTypes, - _emailNotificationTypes = emailNotificationTypes, - _achievements = achievements; - - factory _$IResponseImpl.fromJson(Map json) => - _$$IResponseImplFromJson(json); - - @override - final String id; - @override - final String? name; - @override - final String username; - @override - final String? host; - @override - @UriConverter() - final Uri avatarUrl; - @override - final String? avatarBlurhash; - final List _avatarDecorations; - @override - @JsonKey() - List get avatarDecorations { - if (_avatarDecorations is EqualUnmodifiableListView) - return _avatarDecorations; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_avatarDecorations); - } - - @override - final bool isBot; - @override - final bool isCat; - final Map? _emojis; - @override - @JsonKey() - @EmojisConverter() - Map? get emojis { - final value = _emojis; - if (value == null) return null; - if (_emojis is EqualUnmodifiableMapView) return _emojis; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final String? onlineStatus; - final List _badgeRoles; - @override - List get badgeRoles { - if (_badgeRoles is EqualUnmodifiableListView) return _badgeRoles; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_badgeRoles); - } - - @override - @NullableUriConverter() - final Uri? url; - @override - @NullableUriConverter() - final Uri? uri; - @override - @DateTimeConverter() - final DateTime createdAt; - @override - @NullableDateTimeConverter() - final DateTime? updatedAt; - @override - @NullableDateTimeConverter() - final DateTime? lastFetchedAt; - @override - @NullableUriConverter() - final Uri? bannerUrl; - @override - final String? bannerBlurhash; - @override - final bool isLocked; - @override - final bool isSilenced; - @override - final bool isSuspended; - @override - final String? description; - @override - final String? location; - @override - @NullableDateTimeConverter() - final DateTime? birthday; - @override - final String? lang; - final List? _fields; - @override - List? get fields { - final value = _fields; - if (value == null) return null; - if (_fields is EqualUnmodifiableListView) return _fields; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final int followersCount; - @override - final int followingCount; - @override - final int notesCount; - final List? _pinnedNoteIds; - @override - List? get pinnedNoteIds { - final value = _pinnedNoteIds; - if (value == null) return null; - if (_pinnedNoteIds is EqualUnmodifiableListView) return _pinnedNoteIds; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final String? pinnedPageId; - final Map? _pinnedPage; - @override - Map? get pinnedPage { - final value = _pinnedPage; - if (value == null) return null; - if (_pinnedPage is EqualUnmodifiableMapView) return _pinnedPage; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final bool publicReactions; - @override - final String ffVisibility; - @override - final bool twoFactorEnabled; - @override - final bool usePasswordLessLogin; - @override - final bool securityKeys; - @override - final String? avatarId; - @override - final String? bannerId; - @override - final bool isModerator; - @override - final bool isAdmin; - @override - final bool injectFeaturedNote; - @override - final bool receiveAnnouncementEmail; - @override - final bool alwaysMarkNsfw; - @override - final bool autoSensitive; - @override - final bool carefulBot; - @override - final bool autoAcceptFollowed; - @override - final bool noCrawle; - @override - final bool isExplorable; - @override - final bool isDeleted; - @override - final bool hideOnlineStatus; - @override - final bool hasUnreadSpecifiedNotes; - @override - final bool hasUnreadMentions; - @override - final bool hasUnreadAnnouncement; - @override - final bool hasUnreadAntenna; - @override - final bool hasUnreadChannel; - @override - final bool hasUnreadNotification; - @override - final bool hasPendingReceivedFollowRequest; - @override - final int? unreadNotificationsCount; - final List _unreadAnnouncements; - @override - @JsonKey() - List get unreadAnnouncements { - if (_unreadAnnouncements is EqualUnmodifiableListView) - return _unreadAnnouncements; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_unreadAnnouncements); - } - - final List _mutedWords; - @override - @MuteWordsConverter() - List get mutedWords { - if (_mutedWords is EqualUnmodifiableListView) return _mutedWords; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_mutedWords); - } - - final List _hardMutedWords; - @override - @JsonKey() - @MuteWordsConverter() - List get hardMutedWords { - if (_hardMutedWords is EqualUnmodifiableListView) return _hardMutedWords; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_hardMutedWords); - } - - final List _mutedInstances; - @override - List get mutedInstances { - if (_mutedInstances is EqualUnmodifiableListView) return _mutedInstances; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_mutedInstances); - } - - final List? _mutingNotificationTypes; - @override - @Deprecated("Depracted from Misskey 2023.9.2") - List? get mutingNotificationTypes { - final value = _mutingNotificationTypes; - if (value == null) return null; - if (_mutingNotificationTypes is EqualUnmodifiableListView) - return _mutingNotificationTypes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final dynamic notificationRecieveConfig; - final List _emailNotificationTypes; - @override - List get emailNotificationTypes { - if (_emailNotificationTypes is EqualUnmodifiableListView) - return _emailNotificationTypes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_emailNotificationTypes); - } - -//required bool showTimelineReplies, - final List _achievements; -//required bool showTimelineReplies, - @override - List get achievements { - if (_achievements is EqualUnmodifiableListView) return _achievements; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_achievements); - } - - @override - final int loggedInDays; - @override - final UserPolicies policies; - - @override - String toString() { - return 'IResponse(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, emojis: $emojis, onlineStatus: $onlineStatus, badgeRoles: $badgeRoles, url: $url, uri: $uri, createdAt: $createdAt, updatedAt: $updatedAt, lastFetchedAt: $lastFetchedAt, bannerUrl: $bannerUrl, bannerBlurhash: $bannerBlurhash, isLocked: $isLocked, isSilenced: $isSilenced, isSuspended: $isSuspended, description: $description, location: $location, birthday: $birthday, lang: $lang, fields: $fields, followersCount: $followersCount, followingCount: $followingCount, notesCount: $notesCount, pinnedNoteIds: $pinnedNoteIds, pinnedPageId: $pinnedPageId, pinnedPage: $pinnedPage, publicReactions: $publicReactions, ffVisibility: $ffVisibility, twoFactorEnabled: $twoFactorEnabled, usePasswordLessLogin: $usePasswordLessLogin, securityKeys: $securityKeys, avatarId: $avatarId, bannerId: $bannerId, isModerator: $isModerator, isAdmin: $isAdmin, injectFeaturedNote: $injectFeaturedNote, receiveAnnouncementEmail: $receiveAnnouncementEmail, alwaysMarkNsfw: $alwaysMarkNsfw, autoSensitive: $autoSensitive, carefulBot: $carefulBot, autoAcceptFollowed: $autoAcceptFollowed, noCrawle: $noCrawle, isExplorable: $isExplorable, isDeleted: $isDeleted, hideOnlineStatus: $hideOnlineStatus, hasUnreadSpecifiedNotes: $hasUnreadSpecifiedNotes, hasUnreadMentions: $hasUnreadMentions, hasUnreadAnnouncement: $hasUnreadAnnouncement, hasUnreadAntenna: $hasUnreadAntenna, hasUnreadChannel: $hasUnreadChannel, hasUnreadNotification: $hasUnreadNotification, hasPendingReceivedFollowRequest: $hasPendingReceivedFollowRequest, unreadNotificationsCount: $unreadNotificationsCount, unreadAnnouncements: $unreadAnnouncements, mutedWords: $mutedWords, hardMutedWords: $hardMutedWords, mutedInstances: $mutedInstances, mutingNotificationTypes: $mutingNotificationTypes, notificationRecieveConfig: $notificationRecieveConfig, emailNotificationTypes: $emailNotificationTypes, achievements: $achievements, loggedInDays: $loggedInDays, policies: $policies)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$IResponseImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.username, username) || - other.username == username) && - (identical(other.host, host) || other.host == host) && - (identical(other.avatarUrl, avatarUrl) || - other.avatarUrl == avatarUrl) && - (identical(other.avatarBlurhash, avatarBlurhash) || - other.avatarBlurhash == avatarBlurhash) && - const DeepCollectionEquality() - .equals(other._avatarDecorations, _avatarDecorations) && - (identical(other.isBot, isBot) || other.isBot == isBot) && - (identical(other.isCat, isCat) || other.isCat == isCat) && - const DeepCollectionEquality().equals(other._emojis, _emojis) && - (identical(other.onlineStatus, onlineStatus) || - other.onlineStatus == onlineStatus) && - const DeepCollectionEquality() - .equals(other._badgeRoles, _badgeRoles) && - (identical(other.url, url) || other.url == url) && - (identical(other.uri, uri) || other.uri == uri) && - (identical(other.createdAt, createdAt) || - other.createdAt == createdAt) && - (identical(other.updatedAt, updatedAt) || - other.updatedAt == updatedAt) && - (identical(other.lastFetchedAt, lastFetchedAt) || - other.lastFetchedAt == lastFetchedAt) && - (identical(other.bannerUrl, bannerUrl) || - other.bannerUrl == bannerUrl) && - (identical(other.bannerBlurhash, bannerBlurhash) || - other.bannerBlurhash == bannerBlurhash) && - (identical(other.isLocked, isLocked) || - other.isLocked == isLocked) && - (identical(other.isSilenced, isSilenced) || - other.isSilenced == isSilenced) && - (identical(other.isSuspended, isSuspended) || - other.isSuspended == isSuspended) && - (identical(other.description, description) || - other.description == description) && - (identical(other.location, location) || - other.location == location) && - (identical(other.birthday, birthday) || - other.birthday == birthday) && - (identical(other.lang, lang) || other.lang == lang) && - const DeepCollectionEquality().equals(other._fields, _fields) && - (identical(other.followersCount, followersCount) || - other.followersCount == followersCount) && - (identical(other.followingCount, followingCount) || - other.followingCount == followingCount) && - (identical(other.notesCount, notesCount) || - other.notesCount == notesCount) && - const DeepCollectionEquality() - .equals(other._pinnedNoteIds, _pinnedNoteIds) && - (identical(other.pinnedPageId, pinnedPageId) || - other.pinnedPageId == pinnedPageId) && - const DeepCollectionEquality() - .equals(other._pinnedPage, _pinnedPage) && - (identical(other.publicReactions, publicReactions) || - other.publicReactions == publicReactions) && - (identical(other.ffVisibility, ffVisibility) || - other.ffVisibility == ffVisibility) && - (identical(other.twoFactorEnabled, twoFactorEnabled) || - other.twoFactorEnabled == twoFactorEnabled) && - (identical(other.usePasswordLessLogin, usePasswordLessLogin) || - other.usePasswordLessLogin == usePasswordLessLogin) && - (identical(other.securityKeys, securityKeys) || - other.securityKeys == securityKeys) && - (identical(other.avatarId, avatarId) || - other.avatarId == avatarId) && - (identical(other.bannerId, bannerId) || - other.bannerId == bannerId) && - (identical(other.isModerator, isModerator) || - other.isModerator == isModerator) && - (identical(other.isAdmin, isAdmin) || other.isAdmin == isAdmin) && - (identical(other.injectFeaturedNote, injectFeaturedNote) || - other.injectFeaturedNote == injectFeaturedNote) && - (identical(other.receiveAnnouncementEmail, receiveAnnouncementEmail) || - other.receiveAnnouncementEmail == receiveAnnouncementEmail) && - (identical(other.alwaysMarkNsfw, alwaysMarkNsfw) || - other.alwaysMarkNsfw == alwaysMarkNsfw) && - (identical(other.autoSensitive, autoSensitive) || - other.autoSensitive == autoSensitive) && - (identical(other.carefulBot, carefulBot) || - other.carefulBot == carefulBot) && - (identical(other.autoAcceptFollowed, autoAcceptFollowed) || - other.autoAcceptFollowed == autoAcceptFollowed) && - (identical(other.noCrawle, noCrawle) || - other.noCrawle == noCrawle) && - (identical(other.isExplorable, isExplorable) || - other.isExplorable == isExplorable) && - (identical(other.isDeleted, isDeleted) || - other.isDeleted == isDeleted) && - (identical(other.hideOnlineStatus, hideOnlineStatus) || - other.hideOnlineStatus == hideOnlineStatus) && - (identical(other.hasUnreadSpecifiedNotes, hasUnreadSpecifiedNotes) || - other.hasUnreadSpecifiedNotes == hasUnreadSpecifiedNotes) && - (identical(other.hasUnreadMentions, hasUnreadMentions) || other.hasUnreadMentions == hasUnreadMentions) && - (identical(other.hasUnreadAnnouncement, hasUnreadAnnouncement) || other.hasUnreadAnnouncement == hasUnreadAnnouncement) && - (identical(other.hasUnreadAntenna, hasUnreadAntenna) || other.hasUnreadAntenna == hasUnreadAntenna) && - (identical(other.hasUnreadChannel, hasUnreadChannel) || other.hasUnreadChannel == hasUnreadChannel) && - (identical(other.hasUnreadNotification, hasUnreadNotification) || other.hasUnreadNotification == hasUnreadNotification) && - (identical(other.hasPendingReceivedFollowRequest, hasPendingReceivedFollowRequest) || other.hasPendingReceivedFollowRequest == hasPendingReceivedFollowRequest) && - (identical(other.unreadNotificationsCount, unreadNotificationsCount) || other.unreadNotificationsCount == unreadNotificationsCount) && - const DeepCollectionEquality().equals(other._unreadAnnouncements, _unreadAnnouncements) && - const DeepCollectionEquality().equals(other._mutedWords, _mutedWords) && - const DeepCollectionEquality().equals(other._hardMutedWords, _hardMutedWords) && - const DeepCollectionEquality().equals(other._mutedInstances, _mutedInstances) && - const DeepCollectionEquality().equals(other._mutingNotificationTypes, _mutingNotificationTypes) && - const DeepCollectionEquality().equals(other.notificationRecieveConfig, notificationRecieveConfig) && - const DeepCollectionEquality().equals(other._emailNotificationTypes, _emailNotificationTypes) && - const DeepCollectionEquality().equals(other._achievements, _achievements) && - (identical(other.loggedInDays, loggedInDays) || other.loggedInDays == loggedInDays) && - (identical(other.policies, policies) || other.policies == policies)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hashAll([ - runtimeType, - id, - name, - username, - host, - avatarUrl, - avatarBlurhash, - const DeepCollectionEquality().hash(_avatarDecorations), - isBot, - isCat, - const DeepCollectionEquality().hash(_emojis), - onlineStatus, - const DeepCollectionEquality().hash(_badgeRoles), - url, - uri, - createdAt, - updatedAt, - lastFetchedAt, - bannerUrl, - bannerBlurhash, - isLocked, - isSilenced, - isSuspended, - description, - location, - birthday, - lang, - const DeepCollectionEquality().hash(_fields), - followersCount, - followingCount, - notesCount, - const DeepCollectionEquality().hash(_pinnedNoteIds), - pinnedPageId, - const DeepCollectionEquality().hash(_pinnedPage), - publicReactions, - ffVisibility, - twoFactorEnabled, - usePasswordLessLogin, - securityKeys, - avatarId, - bannerId, - isModerator, - isAdmin, - injectFeaturedNote, - receiveAnnouncementEmail, - alwaysMarkNsfw, - autoSensitive, - carefulBot, - autoAcceptFollowed, - noCrawle, - isExplorable, - isDeleted, - hideOnlineStatus, - hasUnreadSpecifiedNotes, - hasUnreadMentions, - hasUnreadAnnouncement, - hasUnreadAntenna, - hasUnreadChannel, - hasUnreadNotification, - hasPendingReceivedFollowRequest, - unreadNotificationsCount, - const DeepCollectionEquality().hash(_unreadAnnouncements), - const DeepCollectionEquality().hash(_mutedWords), - const DeepCollectionEquality().hash(_hardMutedWords), - const DeepCollectionEquality().hash(_mutedInstances), - const DeepCollectionEquality().hash(_mutingNotificationTypes), - const DeepCollectionEquality().hash(notificationRecieveConfig), - const DeepCollectionEquality().hash(_emailNotificationTypes), - const DeepCollectionEquality().hash(_achievements), - loggedInDays, - policies - ]); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$IResponseImplCopyWith<_$IResponseImpl> get copyWith => - __$$IResponseImplCopyWithImpl<_$IResponseImpl>(this, _$identity); - - @override - Map toJson() { - return _$$IResponseImplToJson( - this, - ); - } -} - -abstract class _IResponse implements IResponse { - const factory _IResponse( - {required final String id, - final String? name, - required final String username, - final String? host, - @UriConverter() required final Uri avatarUrl, - final String? avatarBlurhash, - final List avatarDecorations, - required final bool isBot, - required final bool isCat, - @EmojisConverter() final Map? emojis, - final String? onlineStatus, - required final List badgeRoles, - @NullableUriConverter() final Uri? url, - @NullableUriConverter() final Uri? uri, - @DateTimeConverter() required final DateTime createdAt, - @NullableDateTimeConverter() final DateTime? updatedAt, - @NullableDateTimeConverter() final DateTime? lastFetchedAt, - @NullableUriConverter() final Uri? bannerUrl, - final String? bannerBlurhash, - required final bool isLocked, - required final bool isSilenced, - required final bool isSuspended, - final String? description, - final String? location, - @NullableDateTimeConverter() final DateTime? birthday, - final String? lang, - final List? fields, - required final int followersCount, - required final int followingCount, - required final int notesCount, - final List? pinnedNoteIds, - final String? pinnedPageId, - final Map? pinnedPage, - required final bool publicReactions, - required final String ffVisibility, - required final bool twoFactorEnabled, - required final bool usePasswordLessLogin, - required final bool securityKeys, - final String? avatarId, - final String? bannerId, - required final bool isModerator, - required final bool isAdmin, - required final bool injectFeaturedNote, - required final bool receiveAnnouncementEmail, - required final bool alwaysMarkNsfw, - required final bool autoSensitive, - required final bool carefulBot, - required final bool autoAcceptFollowed, - required final bool noCrawle, - required final bool isExplorable, - required final bool isDeleted, - required final bool hideOnlineStatus, - required final bool hasUnreadSpecifiedNotes, - required final bool hasUnreadMentions, - required final bool hasUnreadAnnouncement, - required final bool hasUnreadAntenna, - required final bool hasUnreadChannel, - required final bool hasUnreadNotification, - required final bool hasPendingReceivedFollowRequest, - final int? unreadNotificationsCount, - final List unreadAnnouncements, - @MuteWordsConverter() required final List mutedWords, - @MuteWordsConverter() final List hardMutedWords, - required final List mutedInstances, - @Deprecated("Depracted from Misskey 2023.9.2") - final List? mutingNotificationTypes, - final dynamic notificationRecieveConfig, - required final List emailNotificationTypes, - required final List achievements, - required final int loggedInDays, - required final UserPolicies policies}) = _$IResponseImpl; - - factory _IResponse.fromJson(Map json) = - _$IResponseImpl.fromJson; - - @override - String get id; - @override - String? get name; - @override - String get username; - @override - String? get host; - @override - @UriConverter() - Uri get avatarUrl; - @override - String? get avatarBlurhash; - @override - List get avatarDecorations; - @override - bool get isBot; - @override - bool get isCat; - @override - @EmojisConverter() - Map? get emojis; - @override - String? get onlineStatus; - @override - List get badgeRoles; - @override - @NullableUriConverter() - Uri? get url; - @override - @NullableUriConverter() - Uri? get uri; - @override - @DateTimeConverter() - DateTime get createdAt; - @override - @NullableDateTimeConverter() - DateTime? get updatedAt; - @override - @NullableDateTimeConverter() - DateTime? get lastFetchedAt; - @override - @NullableUriConverter() - Uri? get bannerUrl; - @override - String? get bannerBlurhash; - @override - bool get isLocked; - @override - bool get isSilenced; - @override - bool get isSuspended; - @override - String? get description; - @override - String? get location; - @override - @NullableDateTimeConverter() - DateTime? get birthday; - @override - String? get lang; - @override - List? get fields; - @override - int get followersCount; - @override - int get followingCount; - @override - int get notesCount; - @override - List? get pinnedNoteIds; - @override - String? get pinnedPageId; - @override - Map? get pinnedPage; - @override - bool get publicReactions; - @override - String get ffVisibility; - @override - bool get twoFactorEnabled; - @override - bool get usePasswordLessLogin; - @override - bool get securityKeys; - @override - String? get avatarId; - @override - String? get bannerId; - @override - bool get isModerator; - @override - bool get isAdmin; - @override - bool get injectFeaturedNote; - @override - bool get receiveAnnouncementEmail; - @override - bool get alwaysMarkNsfw; - @override - bool get autoSensitive; - @override - bool get carefulBot; - @override - bool get autoAcceptFollowed; - @override - bool get noCrawle; - @override - bool get isExplorable; - @override - bool get isDeleted; - @override - bool get hideOnlineStatus; - @override - bool get hasUnreadSpecifiedNotes; - @override - bool get hasUnreadMentions; - @override - bool get hasUnreadAnnouncement; - @override - bool get hasUnreadAntenna; - @override - bool get hasUnreadChannel; - @override - bool get hasUnreadNotification; - @override - bool get hasPendingReceivedFollowRequest; - @override - int? get unreadNotificationsCount; - @override - List get unreadAnnouncements; - @override - @MuteWordsConverter() - List get mutedWords; - @override - @MuteWordsConverter() - List get hardMutedWords; - @override - List get mutedInstances; - @override - @Deprecated("Depracted from Misskey 2023.9.2") - List? get mutingNotificationTypes; - @override - dynamic get notificationRecieveConfig; - @override - List get emailNotificationTypes; - @override //required bool showTimelineReplies, - List get achievements; - @override - int get loggedInDays; - @override - UserPolicies get policies; - @override - @JsonKey(ignore: true) - _$$IResponseImplCopyWith<_$IResponseImpl> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/src/data/i_response.g.dart b/lib/src/data/i_response.g.dart deleted file mode 100644 index 1862ef58..00000000 --- a/lib/src/data/i_response.g.dart +++ /dev/null @@ -1,211 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'i_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$IResponseImpl _$$IResponseImplFromJson(Map json) => - _$IResponseImpl( - id: json['id'] as String, - name: json['name'] as String?, - username: json['username'] as String, - host: json['host'] as String?, - avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), - avatarBlurhash: json['avatarBlurhash'] as String?, - avatarDecorations: (json['avatarDecorations'] as List?) - ?.map((e) => - UserAvatarDecoration.fromJson(e as Map)) - .toList() ?? - const [], - isBot: json['isBot'] as bool, - isCat: json['isCat'] as bool, - emojis: json['emojis'] == null - ? const {} - : const EmojisConverter().fromJson(json['emojis']), - onlineStatus: json['onlineStatus'] as String?, - badgeRoles: (json['badgeRoles'] as List) - .map((e) => UserBadgeRole.fromJson(e as Map)) - .toList(), - url: _$JsonConverterFromJson( - json['url'], const NullableUriConverter().fromJson), - uri: _$JsonConverterFromJson( - json['uri'], const NullableUriConverter().fromJson), - createdAt: - const DateTimeConverter().fromJson(json['createdAt'] as String), - updatedAt: _$JsonConverterFromJson( - json['updatedAt'], const NullableDateTimeConverter().fromJson), - lastFetchedAt: _$JsonConverterFromJson( - json['lastFetchedAt'], const NullableDateTimeConverter().fromJson), - bannerUrl: _$JsonConverterFromJson( - json['bannerUrl'], const NullableUriConverter().fromJson), - bannerBlurhash: json['bannerBlurhash'] as String?, - isLocked: json['isLocked'] as bool, - isSilenced: json['isSilenced'] as bool, - isSuspended: json['isSuspended'] as bool, - description: json['description'] as String?, - location: json['location'] as String?, - birthday: _$JsonConverterFromJson( - json['birthday'], const NullableDateTimeConverter().fromJson), - lang: json['lang'] as String?, - fields: (json['fields'] as List?) - ?.map((e) => UserField.fromJson(e as Map)) - .toList(), - followersCount: json['followersCount'] as int, - followingCount: json['followingCount'] as int, - notesCount: json['notesCount'] as int, - pinnedNoteIds: (json['pinnedNoteIds'] as List?) - ?.map((e) => e as String) - .toList(), - pinnedPageId: json['pinnedPageId'] as String?, - pinnedPage: json['pinnedPage'] as Map?, - publicReactions: json['publicReactions'] as bool, - ffVisibility: json['ffVisibility'] as String, - twoFactorEnabled: json['twoFactorEnabled'] as bool, - usePasswordLessLogin: json['usePasswordLessLogin'] as bool, - securityKeys: json['securityKeys'] as bool, - avatarId: json['avatarId'] as String?, - bannerId: json['bannerId'] as String?, - isModerator: json['isModerator'] as bool, - isAdmin: json['isAdmin'] as bool, - injectFeaturedNote: json['injectFeaturedNote'] as bool, - receiveAnnouncementEmail: json['receiveAnnouncementEmail'] as bool, - alwaysMarkNsfw: json['alwaysMarkNsfw'] as bool, - autoSensitive: json['autoSensitive'] as bool, - carefulBot: json['carefulBot'] as bool, - autoAcceptFollowed: json['autoAcceptFollowed'] as bool, - noCrawle: json['noCrawle'] as bool, - isExplorable: json['isExplorable'] as bool, - isDeleted: json['isDeleted'] as bool, - hideOnlineStatus: json['hideOnlineStatus'] as bool, - hasUnreadSpecifiedNotes: json['hasUnreadSpecifiedNotes'] as bool, - hasUnreadMentions: json['hasUnreadMentions'] as bool, - hasUnreadAnnouncement: json['hasUnreadAnnouncement'] as bool, - hasUnreadAntenna: json['hasUnreadAntenna'] as bool, - hasUnreadChannel: json['hasUnreadChannel'] as bool, - hasUnreadNotification: json['hasUnreadNotification'] as bool, - hasPendingReceivedFollowRequest: - json['hasPendingReceivedFollowRequest'] as bool, - unreadNotificationsCount: json['unreadNotificationsCount'] as int?, - unreadAnnouncements: (json['unreadAnnouncements'] as List?) - ?.map((e) => - AnnouncementsResponse.fromJson(e as Map)) - .toList() ?? - const [], - mutedWords: (json['mutedWords'] as List) - .map(const MuteWordsConverter().fromJson) - .toList(), - hardMutedWords: (json['hardMutedWords'] as List?) - ?.map(const MuteWordsConverter().fromJson) - .toList() ?? - const [], - mutedInstances: (json['mutedInstances'] as List) - .map((e) => e as String) - .toList(), - mutingNotificationTypes: - (json['mutingNotificationTypes'] as List?) - ?.map((e) => e as String) - .toList(), - notificationRecieveConfig: json['notificationRecieveConfig'], - emailNotificationTypes: (json['emailNotificationTypes'] as List) - .map((e) => e as String) - .toList(), - achievements: (json['achievements'] as List) - .map((e) => UserAchievement.fromJson(e as Map)) - .toList(), - loggedInDays: json['loggedInDays'] as int, - policies: UserPolicies.fromJson(json['policies'] as Map), - ); - -Map _$$IResponseImplToJson(_$IResponseImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'username': instance.username, - 'host': instance.host, - 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), - 'avatarBlurhash': instance.avatarBlurhash, - 'avatarDecorations': instance.avatarDecorations, - 'isBot': instance.isBot, - 'isCat': instance.isCat, - 'emojis': _$JsonConverterToJson>( - instance.emojis, const EmojisConverter().toJson), - 'onlineStatus': instance.onlineStatus, - 'badgeRoles': instance.badgeRoles, - 'url': const NullableUriConverter().toJson(instance.url), - 'uri': const NullableUriConverter().toJson(instance.uri), - 'createdAt': const DateTimeConverter().toJson(instance.createdAt), - 'updatedAt': const NullableDateTimeConverter().toJson(instance.updatedAt), - 'lastFetchedAt': - const NullableDateTimeConverter().toJson(instance.lastFetchedAt), - 'bannerUrl': const NullableUriConverter().toJson(instance.bannerUrl), - 'bannerBlurhash': instance.bannerBlurhash, - 'isLocked': instance.isLocked, - 'isSilenced': instance.isSilenced, - 'isSuspended': instance.isSuspended, - 'description': instance.description, - 'location': instance.location, - 'birthday': const NullableDateTimeConverter().toJson(instance.birthday), - 'lang': instance.lang, - 'fields': instance.fields, - 'followersCount': instance.followersCount, - 'followingCount': instance.followingCount, - 'notesCount': instance.notesCount, - 'pinnedNoteIds': instance.pinnedNoteIds, - 'pinnedPageId': instance.pinnedPageId, - 'pinnedPage': instance.pinnedPage, - 'publicReactions': instance.publicReactions, - 'ffVisibility': instance.ffVisibility, - 'twoFactorEnabled': instance.twoFactorEnabled, - 'usePasswordLessLogin': instance.usePasswordLessLogin, - 'securityKeys': instance.securityKeys, - 'avatarId': instance.avatarId, - 'bannerId': instance.bannerId, - 'isModerator': instance.isModerator, - 'isAdmin': instance.isAdmin, - 'injectFeaturedNote': instance.injectFeaturedNote, - 'receiveAnnouncementEmail': instance.receiveAnnouncementEmail, - 'alwaysMarkNsfw': instance.alwaysMarkNsfw, - 'autoSensitive': instance.autoSensitive, - 'carefulBot': instance.carefulBot, - 'autoAcceptFollowed': instance.autoAcceptFollowed, - 'noCrawle': instance.noCrawle, - 'isExplorable': instance.isExplorable, - 'isDeleted': instance.isDeleted, - 'hideOnlineStatus': instance.hideOnlineStatus, - 'hasUnreadSpecifiedNotes': instance.hasUnreadSpecifiedNotes, - 'hasUnreadMentions': instance.hasUnreadMentions, - 'hasUnreadAnnouncement': instance.hasUnreadAnnouncement, - 'hasUnreadAntenna': instance.hasUnreadAntenna, - 'hasUnreadChannel': instance.hasUnreadChannel, - 'hasUnreadNotification': instance.hasUnreadNotification, - 'hasPendingReceivedFollowRequest': - instance.hasPendingReceivedFollowRequest, - 'unreadNotificationsCount': instance.unreadNotificationsCount, - 'unreadAnnouncements': instance.unreadAnnouncements, - 'mutedWords': - instance.mutedWords.map(const MuteWordsConverter().toJson).toList(), - 'hardMutedWords': instance.hardMutedWords - .map(const MuteWordsConverter().toJson) - .toList(), - 'mutedInstances': instance.mutedInstances, - 'mutingNotificationTypes': instance.mutingNotificationTypes, - 'notificationRecieveConfig': instance.notificationRecieveConfig, - 'emailNotificationTypes': instance.emailNotificationTypes, - 'achievements': instance.achievements, - 'loggedInDays': instance.loggedInDays, - 'policies': instance.policies, - }; - -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); - -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); diff --git a/lib/src/data/notes/notes_reactions_response.dart b/lib/src/data/notes/notes_reactions_response.dart index 40aa1a87..a34a234a 100644 --- a/lib/src/data/notes/notes_reactions_response.dart +++ b/lib/src/data/notes/notes_reactions_response.dart @@ -10,7 +10,7 @@ class NotesReactionsResponse with _$NotesReactionsResponse { const factory NotesReactionsResponse({ required String id, @DateTimeConverter() required DateTime createdAt, - required User user, + required UserLite user, required String type, }) = _NotesReactionsResponse; diff --git a/lib/src/data/notes/notes_reactions_response.freezed.dart b/lib/src/data/notes/notes_reactions_response.freezed.dart index 58a33612..4a7ed61f 100644 --- a/lib/src/data/notes/notes_reactions_response.freezed.dart +++ b/lib/src/data/notes/notes_reactions_response.freezed.dart @@ -24,7 +24,7 @@ mixin _$NotesReactionsResponse { String get id => throw _privateConstructorUsedError; @DateTimeConverter() DateTime get createdAt => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; String get type => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @@ -42,10 +42,10 @@ abstract class $NotesReactionsResponseCopyWith<$Res> { $Res call( {String id, @DateTimeConverter() DateTime createdAt, - User user, + UserLite user, String type}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -79,7 +79,7 @@ class _$NotesReactionsResponseCopyWithImpl<$Res, user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -89,8 +89,8 @@ class _$NotesReactionsResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -108,11 +108,11 @@ abstract class _$$NotesReactionsResponseImplCopyWith<$Res> $Res call( {String id, @DateTimeConverter() DateTime createdAt, - User user, + UserLite user, String type}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; } /// @nodoc @@ -145,7 +145,7 @@ class __$$NotesReactionsResponseImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -172,7 +172,7 @@ class _$NotesReactionsResponseImpl implements _NotesReactionsResponse { @DateTimeConverter() final DateTime createdAt; @override - final User user; + final UserLite user; @override final String type; @@ -216,7 +216,7 @@ abstract class _NotesReactionsResponse implements NotesReactionsResponse { const factory _NotesReactionsResponse( {required final String id, @DateTimeConverter() required final DateTime createdAt, - required final User user, + required final UserLite user, required final String type}) = _$NotesReactionsResponseImpl; factory _NotesReactionsResponse.fromJson(Map json) = @@ -228,7 +228,7 @@ abstract class _NotesReactionsResponse implements NotesReactionsResponse { @DateTimeConverter() DateTime get createdAt; @override - User get user; + UserLite get user; @override String get type; @override diff --git a/lib/src/data/notes/notes_reactions_response.g.dart b/lib/src/data/notes/notes_reactions_response.g.dart index 0a57b814..612abcc5 100644 --- a/lib/src/data/notes/notes_reactions_response.g.dart +++ b/lib/src/data/notes/notes_reactions_response.g.dart @@ -12,7 +12,7 @@ _$NotesReactionsResponseImpl _$$NotesReactionsResponseImplFromJson( id: json['id'] as String, createdAt: const DateTimeConverter().fromJson(json['createdAt'] as String), - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), type: json['type'] as String, ); diff --git a/lib/src/data/roles/roles_users_response.dart b/lib/src/data/roles/roles_users_response.dart index 7f632e36..b9ceb4e8 100644 --- a/lib/src/data/roles/roles_users_response.dart +++ b/lib/src/data/roles/roles_users_response.dart @@ -6,8 +6,10 @@ part 'roles_users_response.g.dart'; @freezed class RolesUsersResponse with _$RolesUsersResponse { - const factory RolesUsersResponse({required String id, required User user}) = - _RolesUsersResponse; + const factory RolesUsersResponse({ + required String id, + required UserDetailed user, + }) = _RolesUsersResponse; factory RolesUsersResponse.fromJson(Map json) => _$RolesUsersResponseFromJson(json); diff --git a/lib/src/data/roles/roles_users_response.freezed.dart b/lib/src/data/roles/roles_users_response.freezed.dart index c86a0e57..6c355b97 100644 --- a/lib/src/data/roles/roles_users_response.freezed.dart +++ b/lib/src/data/roles/roles_users_response.freezed.dart @@ -21,7 +21,7 @@ RolesUsersResponse _$RolesUsersResponseFromJson(Map json) { /// @nodoc mixin _$RolesUsersResponse { String get id => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserDetailed get user => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) @@ -35,9 +35,7 @@ abstract class $RolesUsersResponseCopyWith<$Res> { RolesUsersResponse value, $Res Function(RolesUsersResponse) then) = _$RolesUsersResponseCopyWithImpl<$Res, RolesUsersResponse>; @useResult - $Res call({String id, User user}); - - $UserCopyWith<$Res> get user; + $Res call({String id, UserDetailed user}); } /// @nodoc @@ -64,17 +62,9 @@ class _$RolesUsersResponseCopyWithImpl<$Res, $Val extends RolesUsersResponse> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserDetailed, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { - return _then(_value.copyWith(user: value) as $Val); - }); - } } /// @nodoc @@ -85,10 +75,7 @@ abstract class _$$RolesUsersResponseImplCopyWith<$Res> __$$RolesUsersResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call({String id, User user}); - - @override - $UserCopyWith<$Res> get user; + $Res call({String id, UserDetailed user}); } /// @nodoc @@ -113,7 +100,7 @@ class __$$RolesUsersResponseImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserDetailed, )); } } @@ -129,7 +116,7 @@ class _$RolesUsersResponseImpl implements _RolesUsersResponse { @override final String id; @override - final User user; + final UserDetailed user; @override String toString() { @@ -167,7 +154,7 @@ class _$RolesUsersResponseImpl implements _RolesUsersResponse { abstract class _RolesUsersResponse implements RolesUsersResponse { const factory _RolesUsersResponse( {required final String id, - required final User user}) = _$RolesUsersResponseImpl; + required final UserDetailed user}) = _$RolesUsersResponseImpl; factory _RolesUsersResponse.fromJson(Map json) = _$RolesUsersResponseImpl.fromJson; @@ -175,7 +162,7 @@ abstract class _RolesUsersResponse implements RolesUsersResponse { @override String get id; @override - User get user; + UserDetailed get user; @override @JsonKey(ignore: true) _$$RolesUsersResponseImplCopyWith<_$RolesUsersResponseImpl> get copyWith => diff --git a/lib/src/data/roles/roles_users_response.g.dart b/lib/src/data/roles/roles_users_response.g.dart index 152c87c6..0ea0df47 100644 --- a/lib/src/data/roles/roles_users_response.g.dart +++ b/lib/src/data/roles/roles_users_response.g.dart @@ -10,7 +10,7 @@ _$RolesUsersResponseImpl _$$RolesUsersResponseImplFromJson( Map json) => _$RolesUsersResponseImpl( id: json['id'] as String, - user: User.fromJson(json['user'] as Map), + user: UserDetailed.fromJson(json['user'] as Map), ); Map _$$RolesUsersResponseImplToJson( diff --git a/lib/src/data/users/users_reactions_response.dart b/lib/src/data/users/users_reactions_response.dart index 0a74e1c3..2f451cf3 100644 --- a/lib/src/data/users/users_reactions_response.dart +++ b/lib/src/data/users/users_reactions_response.dart @@ -10,7 +10,7 @@ class UsersReactionsResponse with _$UsersReactionsResponse { const factory UsersReactionsResponse({ required String id, @DateTimeConverter() required DateTime createdAt, - required User user, + required UserLite user, required String type, required Note note, }) = _UsersReactionsResponse; diff --git a/lib/src/data/users/users_reactions_response.freezed.dart b/lib/src/data/users/users_reactions_response.freezed.dart index 4d36778e..8b305cab 100644 --- a/lib/src/data/users/users_reactions_response.freezed.dart +++ b/lib/src/data/users/users_reactions_response.freezed.dart @@ -24,7 +24,7 @@ mixin _$UsersReactionsResponse { String get id => throw _privateConstructorUsedError; @DateTimeConverter() DateTime get createdAt => throw _privateConstructorUsedError; - User get user => throw _privateConstructorUsedError; + UserLite get user => throw _privateConstructorUsedError; String get type => throw _privateConstructorUsedError; Note get note => throw _privateConstructorUsedError; @@ -43,11 +43,11 @@ abstract class $UsersReactionsResponseCopyWith<$Res> { $Res call( {String id, @DateTimeConverter() DateTime createdAt, - User user, + UserLite user, String type, Note note}); - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; $NoteCopyWith<$Res> get note; } @@ -83,7 +83,7 @@ class _$UsersReactionsResponseCopyWithImpl<$Res, user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -97,8 +97,8 @@ class _$UsersReactionsResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') - $UserCopyWith<$Res> get user { - return $UserCopyWith<$Res>(_value.user, (value) { + $UserLiteCopyWith<$Res> get user { + return $UserLiteCopyWith<$Res>(_value.user, (value) { return _then(_value.copyWith(user: value) as $Val); }); } @@ -124,12 +124,12 @@ abstract class _$$UsersReactionsResponseImplCopyWith<$Res> $Res call( {String id, @DateTimeConverter() DateTime createdAt, - User user, + UserLite user, String type, Note note}); @override - $UserCopyWith<$Res> get user; + $UserLiteCopyWith<$Res> get user; @override $NoteCopyWith<$Res> get note; } @@ -165,7 +165,7 @@ class __$$UsersReactionsResponseImplCopyWithImpl<$Res> user: null == user ? _value.user : user // ignore: cast_nullable_to_non_nullable - as User, + as UserLite, type: null == type ? _value.type : type // ignore: cast_nullable_to_non_nullable @@ -197,7 +197,7 @@ class _$UsersReactionsResponseImpl implements _UsersReactionsResponse { @DateTimeConverter() final DateTime createdAt; @override - final User user; + final UserLite user; @override final String type; @override @@ -244,7 +244,7 @@ abstract class _UsersReactionsResponse implements UsersReactionsResponse { const factory _UsersReactionsResponse( {required final String id, @DateTimeConverter() required final DateTime createdAt, - required final User user, + required final UserLite user, required final String type, required final Note note}) = _$UsersReactionsResponseImpl; @@ -257,7 +257,7 @@ abstract class _UsersReactionsResponse implements UsersReactionsResponse { @DateTimeConverter() DateTime get createdAt; @override - User get user; + UserLite get user; @override String get type; @override diff --git a/lib/src/data/users/users_reactions_response.g.dart b/lib/src/data/users/users_reactions_response.g.dart index c45fb9e5..e8aa3785 100644 --- a/lib/src/data/users/users_reactions_response.g.dart +++ b/lib/src/data/users/users_reactions_response.g.dart @@ -12,7 +12,7 @@ _$UsersReactionsResponseImpl _$$UsersReactionsResponseImplFromJson( id: json['id'] as String, createdAt: const DateTimeConverter().fromJson(json['createdAt'] as String), - user: User.fromJson(json['user'] as Map), + user: UserLite.fromJson(json['user'] as Map), type: json['type'] as String, note: Note.fromJson(json['note'] as Map), ); diff --git a/lib/src/data/users/users_show_response.dart b/lib/src/data/users/users_show_response.dart deleted file mode 100644 index 42f1d471..00000000 --- a/lib/src/data/users/users_show_response.dart +++ /dev/null @@ -1,118 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:misskey_dart/misskey_dart.dart'; -import 'package:misskey_dart/src/converters/date_time_converter.dart'; -import 'package:misskey_dart/src/converters/emojis_converter.dart'; -import 'package:misskey_dart/src/converters/mute_words_converter.dart'; -import 'package:misskey_dart/src/converters/uri_converter.dart'; - -part 'users_show_response.freezed.dart'; -part 'users_show_response.g.dart'; - -@freezed -class UsersShowResponse with _$UsersShowResponse { - const UsersShowResponse._(); - - const factory UsersShowResponse({ - required String id, - String? name, - required String username, - String? host, - @UriConverter() required Uri avatarUrl, - String? avatarBlurhash, - @Default([]) List avatarDecorations, - required bool isBot, - required bool isCat, - UserInstanceInfo? instance, - @EmojisConverter() Map? emojis, - @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - //dynamic movedToUri, - //dynamic alsoKnownAs, - @DateTimeConverter() required DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - required bool isLocked, - required bool isSilenced, - required bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - required int followersCount, - required int followingCount, - required int notesCount, - List? pinnedNoteIds, - List? pinnedNotes, - String? pinnedPageId, - Map? pinnedPage, - required bool publicReactions, - required String ffVisibility, - required bool twoFactorEnabled, - required bool usePasswordLessLogin, - required bool securityKeys, - List? roles, - String? memo, - // 以下ログイン時のみ - String? avatarId, - String? bannerId, - bool? isModerator, - bool? isAdmin, - bool? injectFeaturedNote, - bool? receiveAnnouncementEmail, - bool? alwaysMarkNsfw, - bool? autoSensitive, - bool? carefulBot, - bool? autoAcceptFollowed, - bool? noCrawle, - bool? preventAiLearning, - bool? isExplorable, - bool? isDeleted, - bool? hideOnlineStatus, - bool? hasUnreadSpecifiedNotes, - bool? hasUnreadMentions, - bool? hasUnreadAnnouncement, - bool? hasUnreadAntenna, - bool? hasUnreadNotification, - bool? hasPendingReceivedFollowRequest, - @MuteWordsConverter() List? mutedWords, - List? mutedInstances, - List? mutingNotificationTypes, - List? emailNotificationTypes, - List? achievements, - int? loggedInDays, - UserPolicies? policies, - bool? isFollowing, - bool? isFollowed, - bool? hasPendingFollowRequestFromYou, - bool? hasPendingFollowRequestToYou, - bool? isBlocking, - bool? isBlocked, - bool? isMuted, - bool? isRenoteMuted, - }) = _UsersShowResponse; - - factory UsersShowResponse.fromJson(Map json) => - _$UsersShowResponseFromJson(json); - - User toUser() => User( - id: id, - username: username, - host: host, - name: name, - onlineStatus: onlineStatus, - badgeRoles: roles - ?.map((e) => UserBadgeRole(name: e.name, iconUrl: e.iconUrl)) - .toList() ?? - [], - avatarUrl: avatarUrl, - avatarBlurhash: avatarBlurhash, - instance: instance, - isCat: isCat, - isBot: isBot, - emojis: emojis ?? {}, - ); -} diff --git a/lib/src/data/users/users_show_response.freezed.dart b/lib/src/data/users/users_show_response.freezed.dart deleted file mode 100644 index fda323f1..00000000 --- a/lib/src/data/users/users_show_response.freezed.dart +++ /dev/null @@ -1,1986 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'users_show_response.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -UsersShowResponse _$UsersShowResponseFromJson(Map json) { - return _UsersShowResponse.fromJson(json); -} - -/// @nodoc -mixin _$UsersShowResponse { - String get id => throw _privateConstructorUsedError; - String? get name => throw _privateConstructorUsedError; - String get username => throw _privateConstructorUsedError; - String? get host => throw _privateConstructorUsedError; - @UriConverter() - Uri get avatarUrl => throw _privateConstructorUsedError; - String? get avatarBlurhash => throw _privateConstructorUsedError; - List get avatarDecorations => - throw _privateConstructorUsedError; - bool get isBot => throw _privateConstructorUsedError; - bool get isCat => throw _privateConstructorUsedError; - UserInstanceInfo? get instance => throw _privateConstructorUsedError; - @EmojisConverter() - Map? get emojis => throw _privateConstructorUsedError; - @OnlineStatusJsonConverter() - OnlineStatus? get onlineStatus => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get url => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get uri => throw _privateConstructorUsedError; //dynamic movedToUri, -//dynamic alsoKnownAs, - @DateTimeConverter() - DateTime get createdAt => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get updatedAt => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get lastFetchedAt => throw _privateConstructorUsedError; - @NullableUriConverter() - Uri? get bannerUrl => throw _privateConstructorUsedError; - String? get bannerBlurhash => throw _privateConstructorUsedError; - bool get isLocked => throw _privateConstructorUsedError; - bool get isSilenced => throw _privateConstructorUsedError; - bool get isSuspended => throw _privateConstructorUsedError; - String? get description => throw _privateConstructorUsedError; - String? get location => throw _privateConstructorUsedError; - @NullableDateTimeConverter() - DateTime? get birthday => throw _privateConstructorUsedError; - String? get lang => throw _privateConstructorUsedError; - List? get fields => throw _privateConstructorUsedError; - int get followersCount => throw _privateConstructorUsedError; - int get followingCount => throw _privateConstructorUsedError; - int get notesCount => throw _privateConstructorUsedError; - List? get pinnedNoteIds => throw _privateConstructorUsedError; - List? get pinnedNotes => throw _privateConstructorUsedError; - String? get pinnedPageId => throw _privateConstructorUsedError; - Map? get pinnedPage => throw _privateConstructorUsedError; - bool get publicReactions => throw _privateConstructorUsedError; - String get ffVisibility => throw _privateConstructorUsedError; - bool get twoFactorEnabled => throw _privateConstructorUsedError; - bool get usePasswordLessLogin => throw _privateConstructorUsedError; - bool get securityKeys => throw _privateConstructorUsedError; - List? get roles => throw _privateConstructorUsedError; - String? get memo => throw _privateConstructorUsedError; // 以下ログイン時のみ - String? get avatarId => throw _privateConstructorUsedError; - String? get bannerId => throw _privateConstructorUsedError; - bool? get isModerator => throw _privateConstructorUsedError; - bool? get isAdmin => throw _privateConstructorUsedError; - bool? get injectFeaturedNote => throw _privateConstructorUsedError; - bool? get receiveAnnouncementEmail => throw _privateConstructorUsedError; - bool? get alwaysMarkNsfw => throw _privateConstructorUsedError; - bool? get autoSensitive => throw _privateConstructorUsedError; - bool? get carefulBot => throw _privateConstructorUsedError; - bool? get autoAcceptFollowed => throw _privateConstructorUsedError; - bool? get noCrawle => throw _privateConstructorUsedError; - bool? get preventAiLearning => throw _privateConstructorUsedError; - bool? get isExplorable => throw _privateConstructorUsedError; - bool? get isDeleted => throw _privateConstructorUsedError; - bool? get hideOnlineStatus => throw _privateConstructorUsedError; - bool? get hasUnreadSpecifiedNotes => throw _privateConstructorUsedError; - bool? get hasUnreadMentions => throw _privateConstructorUsedError; - bool? get hasUnreadAnnouncement => throw _privateConstructorUsedError; - bool? get hasUnreadAntenna => throw _privateConstructorUsedError; - bool? get hasUnreadNotification => throw _privateConstructorUsedError; - bool? get hasPendingReceivedFollowRequest => - throw _privateConstructorUsedError; - @MuteWordsConverter() - List? get mutedWords => throw _privateConstructorUsedError; - List? get mutedInstances => throw _privateConstructorUsedError; - List? get mutingNotificationTypes => - throw _privateConstructorUsedError; - List? get emailNotificationTypes => - throw _privateConstructorUsedError; - List? get achievements => throw _privateConstructorUsedError; - int? get loggedInDays => throw _privateConstructorUsedError; - UserPolicies? get policies => throw _privateConstructorUsedError; - bool? get isFollowing => throw _privateConstructorUsedError; - bool? get isFollowed => throw _privateConstructorUsedError; - bool? get hasPendingFollowRequestFromYou => - throw _privateConstructorUsedError; - bool? get hasPendingFollowRequestToYou => throw _privateConstructorUsedError; - bool? get isBlocking => throw _privateConstructorUsedError; - bool? get isBlocked => throw _privateConstructorUsedError; - bool? get isMuted => throw _privateConstructorUsedError; - bool? get isRenoteMuted => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $UsersShowResponseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $UsersShowResponseCopyWith<$Res> { - factory $UsersShowResponseCopyWith( - UsersShowResponse value, $Res Function(UsersShowResponse) then) = - _$UsersShowResponseCopyWithImpl<$Res, UsersShowResponse>; - @useResult - $Res call( - {String id, - String? name, - String username, - String? host, - @UriConverter() Uri avatarUrl, - String? avatarBlurhash, - List avatarDecorations, - bool isBot, - bool isCat, - UserInstanceInfo? instance, - @EmojisConverter() Map? emojis, - @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - @DateTimeConverter() DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - bool isLocked, - bool isSilenced, - bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - int followersCount, - int followingCount, - int notesCount, - List? pinnedNoteIds, - List? pinnedNotes, - String? pinnedPageId, - Map? pinnedPage, - bool publicReactions, - String ffVisibility, - bool twoFactorEnabled, - bool usePasswordLessLogin, - bool securityKeys, - List? roles, - String? memo, - String? avatarId, - String? bannerId, - bool? isModerator, - bool? isAdmin, - bool? injectFeaturedNote, - bool? receiveAnnouncementEmail, - bool? alwaysMarkNsfw, - bool? autoSensitive, - bool? carefulBot, - bool? autoAcceptFollowed, - bool? noCrawle, - bool? preventAiLearning, - bool? isExplorable, - bool? isDeleted, - bool? hideOnlineStatus, - bool? hasUnreadSpecifiedNotes, - bool? hasUnreadMentions, - bool? hasUnreadAnnouncement, - bool? hasUnreadAntenna, - bool? hasUnreadNotification, - bool? hasPendingReceivedFollowRequest, - @MuteWordsConverter() List? mutedWords, - List? mutedInstances, - List? mutingNotificationTypes, - List? emailNotificationTypes, - List? achievements, - int? loggedInDays, - UserPolicies? policies, - bool? isFollowing, - bool? isFollowed, - bool? hasPendingFollowRequestFromYou, - bool? hasPendingFollowRequestToYou, - bool? isBlocking, - bool? isBlocked, - bool? isMuted, - bool? isRenoteMuted}); - - $UserInstanceInfoCopyWith<$Res>? get instance; - $UserPoliciesCopyWith<$Res>? get policies; -} - -/// @nodoc -class _$UsersShowResponseCopyWithImpl<$Res, $Val extends UsersShowResponse> - implements $UsersShowResponseCopyWith<$Res> { - _$UsersShowResponseCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = freezed, - Object? username = null, - Object? host = freezed, - Object? avatarUrl = null, - Object? avatarBlurhash = freezed, - Object? avatarDecorations = null, - Object? isBot = null, - Object? isCat = null, - Object? instance = freezed, - Object? emojis = freezed, - Object? onlineStatus = freezed, - Object? url = freezed, - Object? uri = freezed, - Object? createdAt = null, - Object? updatedAt = freezed, - Object? lastFetchedAt = freezed, - Object? bannerUrl = freezed, - Object? bannerBlurhash = freezed, - Object? isLocked = null, - Object? isSilenced = null, - Object? isSuspended = null, - Object? description = freezed, - Object? location = freezed, - Object? birthday = freezed, - Object? lang = freezed, - Object? fields = freezed, - Object? followersCount = null, - Object? followingCount = null, - Object? notesCount = null, - Object? pinnedNoteIds = freezed, - Object? pinnedNotes = freezed, - Object? pinnedPageId = freezed, - Object? pinnedPage = freezed, - Object? publicReactions = null, - Object? ffVisibility = null, - Object? twoFactorEnabled = null, - Object? usePasswordLessLogin = null, - Object? securityKeys = null, - Object? roles = freezed, - Object? memo = freezed, - Object? avatarId = freezed, - Object? bannerId = freezed, - Object? isModerator = freezed, - Object? isAdmin = freezed, - Object? injectFeaturedNote = freezed, - Object? receiveAnnouncementEmail = freezed, - Object? alwaysMarkNsfw = freezed, - Object? autoSensitive = freezed, - Object? carefulBot = freezed, - Object? autoAcceptFollowed = freezed, - Object? noCrawle = freezed, - Object? preventAiLearning = freezed, - Object? isExplorable = freezed, - Object? isDeleted = freezed, - Object? hideOnlineStatus = freezed, - Object? hasUnreadSpecifiedNotes = freezed, - Object? hasUnreadMentions = freezed, - Object? hasUnreadAnnouncement = freezed, - Object? hasUnreadAntenna = freezed, - Object? hasUnreadNotification = freezed, - Object? hasPendingReceivedFollowRequest = freezed, - Object? mutedWords = freezed, - Object? mutedInstances = freezed, - Object? mutingNotificationTypes = freezed, - Object? emailNotificationTypes = freezed, - Object? achievements = freezed, - Object? loggedInDays = freezed, - Object? policies = freezed, - Object? isFollowing = freezed, - Object? isFollowed = freezed, - Object? hasPendingFollowRequestFromYou = freezed, - Object? hasPendingFollowRequestToYou = freezed, - Object? isBlocking = freezed, - Object? isBlocked = freezed, - Object? isMuted = freezed, - Object? isRenoteMuted = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - host: freezed == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String?, - avatarUrl: null == avatarUrl - ? _value.avatarUrl - : avatarUrl // ignore: cast_nullable_to_non_nullable - as Uri, - avatarBlurhash: freezed == avatarBlurhash - ? _value.avatarBlurhash - : avatarBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - avatarDecorations: null == avatarDecorations - ? _value.avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, - isBot: null == isBot - ? _value.isBot - : isBot // ignore: cast_nullable_to_non_nullable - as bool, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, - instance: freezed == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as UserInstanceInfo?, - emojis: freezed == emojis - ? _value.emojis - : emojis // ignore: cast_nullable_to_non_nullable - as Map?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as OnlineStatus?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as Uri?, - uri: freezed == uri - ? _value.uri - : uri // ignore: cast_nullable_to_non_nullable - as Uri?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lastFetchedAt: freezed == lastFetchedAt - ? _value.lastFetchedAt - : lastFetchedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - bannerUrl: freezed == bannerUrl - ? _value.bannerUrl - : bannerUrl // ignore: cast_nullable_to_non_nullable - as Uri?, - bannerBlurhash: freezed == bannerBlurhash - ? _value.bannerBlurhash - : bannerBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - isLocked: null == isLocked - ? _value.isLocked - : isLocked // ignore: cast_nullable_to_non_nullable - as bool, - isSilenced: null == isSilenced - ? _value.isSilenced - : isSilenced // ignore: cast_nullable_to_non_nullable - as bool, - isSuspended: null == isSuspended - ? _value.isSuspended - : isSuspended // ignore: cast_nullable_to_non_nullable - as bool, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - location: freezed == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String?, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, - lang: freezed == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String?, - fields: freezed == fields - ? _value.fields - : fields // ignore: cast_nullable_to_non_nullable - as List?, - followersCount: null == followersCount - ? _value.followersCount - : followersCount // ignore: cast_nullable_to_non_nullable - as int, - followingCount: null == followingCount - ? _value.followingCount - : followingCount // ignore: cast_nullable_to_non_nullable - as int, - notesCount: null == notesCount - ? _value.notesCount - : notesCount // ignore: cast_nullable_to_non_nullable - as int, - pinnedNoteIds: freezed == pinnedNoteIds - ? _value.pinnedNoteIds - : pinnedNoteIds // ignore: cast_nullable_to_non_nullable - as List?, - pinnedNotes: freezed == pinnedNotes - ? _value.pinnedNotes - : pinnedNotes // ignore: cast_nullable_to_non_nullable - as List?, - pinnedPageId: freezed == pinnedPageId - ? _value.pinnedPageId - : pinnedPageId // ignore: cast_nullable_to_non_nullable - as String?, - pinnedPage: freezed == pinnedPage - ? _value.pinnedPage - : pinnedPage // ignore: cast_nullable_to_non_nullable - as Map?, - publicReactions: null == publicReactions - ? _value.publicReactions - : publicReactions // ignore: cast_nullable_to_non_nullable - as bool, - ffVisibility: null == ffVisibility - ? _value.ffVisibility - : ffVisibility // ignore: cast_nullable_to_non_nullable - as String, - twoFactorEnabled: null == twoFactorEnabled - ? _value.twoFactorEnabled - : twoFactorEnabled // ignore: cast_nullable_to_non_nullable - as bool, - usePasswordLessLogin: null == usePasswordLessLogin - ? _value.usePasswordLessLogin - : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable - as bool, - securityKeys: null == securityKeys - ? _value.securityKeys - : securityKeys // ignore: cast_nullable_to_non_nullable - as bool, - roles: freezed == roles - ? _value.roles - : roles // ignore: cast_nullable_to_non_nullable - as List?, - memo: freezed == memo - ? _value.memo - : memo // ignore: cast_nullable_to_non_nullable - as String?, - avatarId: freezed == avatarId - ? _value.avatarId - : avatarId // ignore: cast_nullable_to_non_nullable - as String?, - bannerId: freezed == bannerId - ? _value.bannerId - : bannerId // ignore: cast_nullable_to_non_nullable - as String?, - isModerator: freezed == isModerator - ? _value.isModerator - : isModerator // ignore: cast_nullable_to_non_nullable - as bool?, - isAdmin: freezed == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - injectFeaturedNote: freezed == injectFeaturedNote - ? _value.injectFeaturedNote - : injectFeaturedNote // ignore: cast_nullable_to_non_nullable - as bool?, - receiveAnnouncementEmail: freezed == receiveAnnouncementEmail - ? _value.receiveAnnouncementEmail - : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable - as bool?, - alwaysMarkNsfw: freezed == alwaysMarkNsfw - ? _value.alwaysMarkNsfw - : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoSensitive: freezed == autoSensitive - ? _value.autoSensitive - : autoSensitive // ignore: cast_nullable_to_non_nullable - as bool?, - carefulBot: freezed == carefulBot - ? _value.carefulBot - : carefulBot // ignore: cast_nullable_to_non_nullable - as bool?, - autoAcceptFollowed: freezed == autoAcceptFollowed - ? _value.autoAcceptFollowed - : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable - as bool?, - noCrawle: freezed == noCrawle - ? _value.noCrawle - : noCrawle // ignore: cast_nullable_to_non_nullable - as bool?, - preventAiLearning: freezed == preventAiLearning - ? _value.preventAiLearning - : preventAiLearning // ignore: cast_nullable_to_non_nullable - as bool?, - isExplorable: freezed == isExplorable - ? _value.isExplorable - : isExplorable // ignore: cast_nullable_to_non_nullable - as bool?, - isDeleted: freezed == isDeleted - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool?, - hideOnlineStatus: freezed == hideOnlineStatus - ? _value.hideOnlineStatus - : hideOnlineStatus // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadSpecifiedNotes: freezed == hasUnreadSpecifiedNotes - ? _value.hasUnreadSpecifiedNotes - : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadMentions: freezed == hasUnreadMentions - ? _value.hasUnreadMentions - : hasUnreadMentions // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadAnnouncement: freezed == hasUnreadAnnouncement - ? _value.hasUnreadAnnouncement - : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadAntenna: freezed == hasUnreadAntenna - ? _value.hasUnreadAntenna - : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadNotification: freezed == hasUnreadNotification - ? _value.hasUnreadNotification - : hasUnreadNotification // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingReceivedFollowRequest: freezed == - hasPendingReceivedFollowRequest - ? _value.hasPendingReceivedFollowRequest - : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable - as bool?, - mutedWords: freezed == mutedWords - ? _value.mutedWords - : mutedWords // ignore: cast_nullable_to_non_nullable - as List?, - mutedInstances: freezed == mutedInstances - ? _value.mutedInstances - : mutedInstances // ignore: cast_nullable_to_non_nullable - as List?, - mutingNotificationTypes: freezed == mutingNotificationTypes - ? _value.mutingNotificationTypes - : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - emailNotificationTypes: freezed == emailNotificationTypes - ? _value.emailNotificationTypes - : emailNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - achievements: freezed == achievements - ? _value.achievements - : achievements // ignore: cast_nullable_to_non_nullable - as List?, - loggedInDays: freezed == loggedInDays - ? _value.loggedInDays - : loggedInDays // ignore: cast_nullable_to_non_nullable - as int?, - policies: freezed == policies - ? _value.policies - : policies // ignore: cast_nullable_to_non_nullable - as UserPolicies?, - isFollowing: freezed == isFollowing - ? _value.isFollowing - : isFollowing // ignore: cast_nullable_to_non_nullable - as bool?, - isFollowed: freezed == isFollowed - ? _value.isFollowed - : isFollowed // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingFollowRequestFromYou: freezed == hasPendingFollowRequestFromYou - ? _value.hasPendingFollowRequestFromYou - : hasPendingFollowRequestFromYou // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingFollowRequestToYou: freezed == hasPendingFollowRequestToYou - ? _value.hasPendingFollowRequestToYou - : hasPendingFollowRequestToYou // ignore: cast_nullable_to_non_nullable - as bool?, - isBlocking: freezed == isBlocking - ? _value.isBlocking - : isBlocking // ignore: cast_nullable_to_non_nullable - as bool?, - isBlocked: freezed == isBlocked - ? _value.isBlocked - : isBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - isMuted: freezed == isMuted - ? _value.isMuted - : isMuted // ignore: cast_nullable_to_non_nullable - as bool?, - isRenoteMuted: freezed == isRenoteMuted - ? _value.isRenoteMuted - : isRenoteMuted // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); - } - - @override - @pragma('vm:prefer-inline') - $UserInstanceInfoCopyWith<$Res>? get instance { - if (_value.instance == null) { - return null; - } - - return $UserInstanceInfoCopyWith<$Res>(_value.instance!, (value) { - return _then(_value.copyWith(instance: value) as $Val); - }); - } - - @override - @pragma('vm:prefer-inline') - $UserPoliciesCopyWith<$Res>? get policies { - if (_value.policies == null) { - return null; - } - - return $UserPoliciesCopyWith<$Res>(_value.policies!, (value) { - return _then(_value.copyWith(policies: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$UsersShowResponseImplCopyWith<$Res> - implements $UsersShowResponseCopyWith<$Res> { - factory _$$UsersShowResponseImplCopyWith(_$UsersShowResponseImpl value, - $Res Function(_$UsersShowResponseImpl) then) = - __$$UsersShowResponseImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {String id, - String? name, - String username, - String? host, - @UriConverter() Uri avatarUrl, - String? avatarBlurhash, - List avatarDecorations, - bool isBot, - bool isCat, - UserInstanceInfo? instance, - @EmojisConverter() Map? emojis, - @OnlineStatusJsonConverter() OnlineStatus? onlineStatus, - @NullableUriConverter() Uri? url, - @NullableUriConverter() Uri? uri, - @DateTimeConverter() DateTime createdAt, - @NullableDateTimeConverter() DateTime? updatedAt, - @NullableDateTimeConverter() DateTime? lastFetchedAt, - @NullableUriConverter() Uri? bannerUrl, - String? bannerBlurhash, - bool isLocked, - bool isSilenced, - bool isSuspended, - String? description, - String? location, - @NullableDateTimeConverter() DateTime? birthday, - String? lang, - List? fields, - int followersCount, - int followingCount, - int notesCount, - List? pinnedNoteIds, - List? pinnedNotes, - String? pinnedPageId, - Map? pinnedPage, - bool publicReactions, - String ffVisibility, - bool twoFactorEnabled, - bool usePasswordLessLogin, - bool securityKeys, - List? roles, - String? memo, - String? avatarId, - String? bannerId, - bool? isModerator, - bool? isAdmin, - bool? injectFeaturedNote, - bool? receiveAnnouncementEmail, - bool? alwaysMarkNsfw, - bool? autoSensitive, - bool? carefulBot, - bool? autoAcceptFollowed, - bool? noCrawle, - bool? preventAiLearning, - bool? isExplorable, - bool? isDeleted, - bool? hideOnlineStatus, - bool? hasUnreadSpecifiedNotes, - bool? hasUnreadMentions, - bool? hasUnreadAnnouncement, - bool? hasUnreadAntenna, - bool? hasUnreadNotification, - bool? hasPendingReceivedFollowRequest, - @MuteWordsConverter() List? mutedWords, - List? mutedInstances, - List? mutingNotificationTypes, - List? emailNotificationTypes, - List? achievements, - int? loggedInDays, - UserPolicies? policies, - bool? isFollowing, - bool? isFollowed, - bool? hasPendingFollowRequestFromYou, - bool? hasPendingFollowRequestToYou, - bool? isBlocking, - bool? isBlocked, - bool? isMuted, - bool? isRenoteMuted}); - - @override - $UserInstanceInfoCopyWith<$Res>? get instance; - @override - $UserPoliciesCopyWith<$Res>? get policies; -} - -/// @nodoc -class __$$UsersShowResponseImplCopyWithImpl<$Res> - extends _$UsersShowResponseCopyWithImpl<$Res, _$UsersShowResponseImpl> - implements _$$UsersShowResponseImplCopyWith<$Res> { - __$$UsersShowResponseImplCopyWithImpl(_$UsersShowResponseImpl _value, - $Res Function(_$UsersShowResponseImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = freezed, - Object? username = null, - Object? host = freezed, - Object? avatarUrl = null, - Object? avatarBlurhash = freezed, - Object? avatarDecorations = null, - Object? isBot = null, - Object? isCat = null, - Object? instance = freezed, - Object? emojis = freezed, - Object? onlineStatus = freezed, - Object? url = freezed, - Object? uri = freezed, - Object? createdAt = null, - Object? updatedAt = freezed, - Object? lastFetchedAt = freezed, - Object? bannerUrl = freezed, - Object? bannerBlurhash = freezed, - Object? isLocked = null, - Object? isSilenced = null, - Object? isSuspended = null, - Object? description = freezed, - Object? location = freezed, - Object? birthday = freezed, - Object? lang = freezed, - Object? fields = freezed, - Object? followersCount = null, - Object? followingCount = null, - Object? notesCount = null, - Object? pinnedNoteIds = freezed, - Object? pinnedNotes = freezed, - Object? pinnedPageId = freezed, - Object? pinnedPage = freezed, - Object? publicReactions = null, - Object? ffVisibility = null, - Object? twoFactorEnabled = null, - Object? usePasswordLessLogin = null, - Object? securityKeys = null, - Object? roles = freezed, - Object? memo = freezed, - Object? avatarId = freezed, - Object? bannerId = freezed, - Object? isModerator = freezed, - Object? isAdmin = freezed, - Object? injectFeaturedNote = freezed, - Object? receiveAnnouncementEmail = freezed, - Object? alwaysMarkNsfw = freezed, - Object? autoSensitive = freezed, - Object? carefulBot = freezed, - Object? autoAcceptFollowed = freezed, - Object? noCrawle = freezed, - Object? preventAiLearning = freezed, - Object? isExplorable = freezed, - Object? isDeleted = freezed, - Object? hideOnlineStatus = freezed, - Object? hasUnreadSpecifiedNotes = freezed, - Object? hasUnreadMentions = freezed, - Object? hasUnreadAnnouncement = freezed, - Object? hasUnreadAntenna = freezed, - Object? hasUnreadNotification = freezed, - Object? hasPendingReceivedFollowRequest = freezed, - Object? mutedWords = freezed, - Object? mutedInstances = freezed, - Object? mutingNotificationTypes = freezed, - Object? emailNotificationTypes = freezed, - Object? achievements = freezed, - Object? loggedInDays = freezed, - Object? policies = freezed, - Object? isFollowing = freezed, - Object? isFollowed = freezed, - Object? hasPendingFollowRequestFromYou = freezed, - Object? hasPendingFollowRequestToYou = freezed, - Object? isBlocking = freezed, - Object? isBlocked = freezed, - Object? isMuted = freezed, - Object? isRenoteMuted = freezed, - }) { - return _then(_$UsersShowResponseImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - host: freezed == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String?, - avatarUrl: null == avatarUrl - ? _value.avatarUrl - : avatarUrl // ignore: cast_nullable_to_non_nullable - as Uri, - avatarBlurhash: freezed == avatarBlurhash - ? _value.avatarBlurhash - : avatarBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - avatarDecorations: null == avatarDecorations - ? _value._avatarDecorations - : avatarDecorations // ignore: cast_nullable_to_non_nullable - as List, - isBot: null == isBot - ? _value.isBot - : isBot // ignore: cast_nullable_to_non_nullable - as bool, - isCat: null == isCat - ? _value.isCat - : isCat // ignore: cast_nullable_to_non_nullable - as bool, - instance: freezed == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as UserInstanceInfo?, - emojis: freezed == emojis - ? _value._emojis - : emojis // ignore: cast_nullable_to_non_nullable - as Map?, - onlineStatus: freezed == onlineStatus - ? _value.onlineStatus - : onlineStatus // ignore: cast_nullable_to_non_nullable - as OnlineStatus?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as Uri?, - uri: freezed == uri - ? _value.uri - : uri // ignore: cast_nullable_to_non_nullable - as Uri?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lastFetchedAt: freezed == lastFetchedAt - ? _value.lastFetchedAt - : lastFetchedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - bannerUrl: freezed == bannerUrl - ? _value.bannerUrl - : bannerUrl // ignore: cast_nullable_to_non_nullable - as Uri?, - bannerBlurhash: freezed == bannerBlurhash - ? _value.bannerBlurhash - : bannerBlurhash // ignore: cast_nullable_to_non_nullable - as String?, - isLocked: null == isLocked - ? _value.isLocked - : isLocked // ignore: cast_nullable_to_non_nullable - as bool, - isSilenced: null == isSilenced - ? _value.isSilenced - : isSilenced // ignore: cast_nullable_to_non_nullable - as bool, - isSuspended: null == isSuspended - ? _value.isSuspended - : isSuspended // ignore: cast_nullable_to_non_nullable - as bool, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - location: freezed == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String?, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, - lang: freezed == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String?, - fields: freezed == fields - ? _value._fields - : fields // ignore: cast_nullable_to_non_nullable - as List?, - followersCount: null == followersCount - ? _value.followersCount - : followersCount // ignore: cast_nullable_to_non_nullable - as int, - followingCount: null == followingCount - ? _value.followingCount - : followingCount // ignore: cast_nullable_to_non_nullable - as int, - notesCount: null == notesCount - ? _value.notesCount - : notesCount // ignore: cast_nullable_to_non_nullable - as int, - pinnedNoteIds: freezed == pinnedNoteIds - ? _value._pinnedNoteIds - : pinnedNoteIds // ignore: cast_nullable_to_non_nullable - as List?, - pinnedNotes: freezed == pinnedNotes - ? _value._pinnedNotes - : pinnedNotes // ignore: cast_nullable_to_non_nullable - as List?, - pinnedPageId: freezed == pinnedPageId - ? _value.pinnedPageId - : pinnedPageId // ignore: cast_nullable_to_non_nullable - as String?, - pinnedPage: freezed == pinnedPage - ? _value._pinnedPage - : pinnedPage // ignore: cast_nullable_to_non_nullable - as Map?, - publicReactions: null == publicReactions - ? _value.publicReactions - : publicReactions // ignore: cast_nullable_to_non_nullable - as bool, - ffVisibility: null == ffVisibility - ? _value.ffVisibility - : ffVisibility // ignore: cast_nullable_to_non_nullable - as String, - twoFactorEnabled: null == twoFactorEnabled - ? _value.twoFactorEnabled - : twoFactorEnabled // ignore: cast_nullable_to_non_nullable - as bool, - usePasswordLessLogin: null == usePasswordLessLogin - ? _value.usePasswordLessLogin - : usePasswordLessLogin // ignore: cast_nullable_to_non_nullable - as bool, - securityKeys: null == securityKeys - ? _value.securityKeys - : securityKeys // ignore: cast_nullable_to_non_nullable - as bool, - roles: freezed == roles - ? _value._roles - : roles // ignore: cast_nullable_to_non_nullable - as List?, - memo: freezed == memo - ? _value.memo - : memo // ignore: cast_nullable_to_non_nullable - as String?, - avatarId: freezed == avatarId - ? _value.avatarId - : avatarId // ignore: cast_nullable_to_non_nullable - as String?, - bannerId: freezed == bannerId - ? _value.bannerId - : bannerId // ignore: cast_nullable_to_non_nullable - as String?, - isModerator: freezed == isModerator - ? _value.isModerator - : isModerator // ignore: cast_nullable_to_non_nullable - as bool?, - isAdmin: freezed == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - injectFeaturedNote: freezed == injectFeaturedNote - ? _value.injectFeaturedNote - : injectFeaturedNote // ignore: cast_nullable_to_non_nullable - as bool?, - receiveAnnouncementEmail: freezed == receiveAnnouncementEmail - ? _value.receiveAnnouncementEmail - : receiveAnnouncementEmail // ignore: cast_nullable_to_non_nullable - as bool?, - alwaysMarkNsfw: freezed == alwaysMarkNsfw - ? _value.alwaysMarkNsfw - : alwaysMarkNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoSensitive: freezed == autoSensitive - ? _value.autoSensitive - : autoSensitive // ignore: cast_nullable_to_non_nullable - as bool?, - carefulBot: freezed == carefulBot - ? _value.carefulBot - : carefulBot // ignore: cast_nullable_to_non_nullable - as bool?, - autoAcceptFollowed: freezed == autoAcceptFollowed - ? _value.autoAcceptFollowed - : autoAcceptFollowed // ignore: cast_nullable_to_non_nullable - as bool?, - noCrawle: freezed == noCrawle - ? _value.noCrawle - : noCrawle // ignore: cast_nullable_to_non_nullable - as bool?, - preventAiLearning: freezed == preventAiLearning - ? _value.preventAiLearning - : preventAiLearning // ignore: cast_nullable_to_non_nullable - as bool?, - isExplorable: freezed == isExplorable - ? _value.isExplorable - : isExplorable // ignore: cast_nullable_to_non_nullable - as bool?, - isDeleted: freezed == isDeleted - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool?, - hideOnlineStatus: freezed == hideOnlineStatus - ? _value.hideOnlineStatus - : hideOnlineStatus // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadSpecifiedNotes: freezed == hasUnreadSpecifiedNotes - ? _value.hasUnreadSpecifiedNotes - : hasUnreadSpecifiedNotes // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadMentions: freezed == hasUnreadMentions - ? _value.hasUnreadMentions - : hasUnreadMentions // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadAnnouncement: freezed == hasUnreadAnnouncement - ? _value.hasUnreadAnnouncement - : hasUnreadAnnouncement // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadAntenna: freezed == hasUnreadAntenna - ? _value.hasUnreadAntenna - : hasUnreadAntenna // ignore: cast_nullable_to_non_nullable - as bool?, - hasUnreadNotification: freezed == hasUnreadNotification - ? _value.hasUnreadNotification - : hasUnreadNotification // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingReceivedFollowRequest: freezed == - hasPendingReceivedFollowRequest - ? _value.hasPendingReceivedFollowRequest - : hasPendingReceivedFollowRequest // ignore: cast_nullable_to_non_nullable - as bool?, - mutedWords: freezed == mutedWords - ? _value._mutedWords - : mutedWords // ignore: cast_nullable_to_non_nullable - as List?, - mutedInstances: freezed == mutedInstances - ? _value._mutedInstances - : mutedInstances // ignore: cast_nullable_to_non_nullable - as List?, - mutingNotificationTypes: freezed == mutingNotificationTypes - ? _value._mutingNotificationTypes - : mutingNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - emailNotificationTypes: freezed == emailNotificationTypes - ? _value._emailNotificationTypes - : emailNotificationTypes // ignore: cast_nullable_to_non_nullable - as List?, - achievements: freezed == achievements - ? _value._achievements - : achievements // ignore: cast_nullable_to_non_nullable - as List?, - loggedInDays: freezed == loggedInDays - ? _value.loggedInDays - : loggedInDays // ignore: cast_nullable_to_non_nullable - as int?, - policies: freezed == policies - ? _value.policies - : policies // ignore: cast_nullable_to_non_nullable - as UserPolicies?, - isFollowing: freezed == isFollowing - ? _value.isFollowing - : isFollowing // ignore: cast_nullable_to_non_nullable - as bool?, - isFollowed: freezed == isFollowed - ? _value.isFollowed - : isFollowed // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingFollowRequestFromYou: freezed == hasPendingFollowRequestFromYou - ? _value.hasPendingFollowRequestFromYou - : hasPendingFollowRequestFromYou // ignore: cast_nullable_to_non_nullable - as bool?, - hasPendingFollowRequestToYou: freezed == hasPendingFollowRequestToYou - ? _value.hasPendingFollowRequestToYou - : hasPendingFollowRequestToYou // ignore: cast_nullable_to_non_nullable - as bool?, - isBlocking: freezed == isBlocking - ? _value.isBlocking - : isBlocking // ignore: cast_nullable_to_non_nullable - as bool?, - isBlocked: freezed == isBlocked - ? _value.isBlocked - : isBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - isMuted: freezed == isMuted - ? _value.isMuted - : isMuted // ignore: cast_nullable_to_non_nullable - as bool?, - isRenoteMuted: freezed == isRenoteMuted - ? _value.isRenoteMuted - : isRenoteMuted // ignore: cast_nullable_to_non_nullable - as bool?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$UsersShowResponseImpl extends _UsersShowResponse { - const _$UsersShowResponseImpl( - {required this.id, - this.name, - required this.username, - this.host, - @UriConverter() required this.avatarUrl, - this.avatarBlurhash, - final List avatarDecorations = const [], - required this.isBot, - required this.isCat, - this.instance, - @EmojisConverter() final Map? emojis, - @OnlineStatusJsonConverter() this.onlineStatus, - @NullableUriConverter() this.url, - @NullableUriConverter() this.uri, - @DateTimeConverter() required this.createdAt, - @NullableDateTimeConverter() this.updatedAt, - @NullableDateTimeConverter() this.lastFetchedAt, - @NullableUriConverter() this.bannerUrl, - this.bannerBlurhash, - required this.isLocked, - required this.isSilenced, - required this.isSuspended, - this.description, - this.location, - @NullableDateTimeConverter() this.birthday, - this.lang, - final List? fields, - required this.followersCount, - required this.followingCount, - required this.notesCount, - final List? pinnedNoteIds, - final List? pinnedNotes, - this.pinnedPageId, - final Map? pinnedPage, - required this.publicReactions, - required this.ffVisibility, - required this.twoFactorEnabled, - required this.usePasswordLessLogin, - required this.securityKeys, - final List? roles, - this.memo, - this.avatarId, - this.bannerId, - this.isModerator, - this.isAdmin, - this.injectFeaturedNote, - this.receiveAnnouncementEmail, - this.alwaysMarkNsfw, - this.autoSensitive, - this.carefulBot, - this.autoAcceptFollowed, - this.noCrawle, - this.preventAiLearning, - this.isExplorable, - this.isDeleted, - this.hideOnlineStatus, - this.hasUnreadSpecifiedNotes, - this.hasUnreadMentions, - this.hasUnreadAnnouncement, - this.hasUnreadAntenna, - this.hasUnreadNotification, - this.hasPendingReceivedFollowRequest, - @MuteWordsConverter() final List? mutedWords, - final List? mutedInstances, - final List? mutingNotificationTypes, - final List? emailNotificationTypes, - final List? achievements, - this.loggedInDays, - this.policies, - this.isFollowing, - this.isFollowed, - this.hasPendingFollowRequestFromYou, - this.hasPendingFollowRequestToYou, - this.isBlocking, - this.isBlocked, - this.isMuted, - this.isRenoteMuted}) - : _avatarDecorations = avatarDecorations, - _emojis = emojis, - _fields = fields, - _pinnedNoteIds = pinnedNoteIds, - _pinnedNotes = pinnedNotes, - _pinnedPage = pinnedPage, - _roles = roles, - _mutedWords = mutedWords, - _mutedInstances = mutedInstances, - _mutingNotificationTypes = mutingNotificationTypes, - _emailNotificationTypes = emailNotificationTypes, - _achievements = achievements, - super._(); - - factory _$UsersShowResponseImpl.fromJson(Map json) => - _$$UsersShowResponseImplFromJson(json); - - @override - final String id; - @override - final String? name; - @override - final String username; - @override - final String? host; - @override - @UriConverter() - final Uri avatarUrl; - @override - final String? avatarBlurhash; - final List _avatarDecorations; - @override - @JsonKey() - List get avatarDecorations { - if (_avatarDecorations is EqualUnmodifiableListView) - return _avatarDecorations; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_avatarDecorations); - } - - @override - final bool isBot; - @override - final bool isCat; - @override - final UserInstanceInfo? instance; - final Map? _emojis; - @override - @EmojisConverter() - Map? get emojis { - final value = _emojis; - if (value == null) return null; - if (_emojis is EqualUnmodifiableMapView) return _emojis; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - @OnlineStatusJsonConverter() - final OnlineStatus? onlineStatus; - @override - @NullableUriConverter() - final Uri? url; - @override - @NullableUriConverter() - final Uri? uri; -//dynamic movedToUri, -//dynamic alsoKnownAs, - @override - @DateTimeConverter() - final DateTime createdAt; - @override - @NullableDateTimeConverter() - final DateTime? updatedAt; - @override - @NullableDateTimeConverter() - final DateTime? lastFetchedAt; - @override - @NullableUriConverter() - final Uri? bannerUrl; - @override - final String? bannerBlurhash; - @override - final bool isLocked; - @override - final bool isSilenced; - @override - final bool isSuspended; - @override - final String? description; - @override - final String? location; - @override - @NullableDateTimeConverter() - final DateTime? birthday; - @override - final String? lang; - final List? _fields; - @override - List? get fields { - final value = _fields; - if (value == null) return null; - if (_fields is EqualUnmodifiableListView) return _fields; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final int followersCount; - @override - final int followingCount; - @override - final int notesCount; - final List? _pinnedNoteIds; - @override - List? get pinnedNoteIds { - final value = _pinnedNoteIds; - if (value == null) return null; - if (_pinnedNoteIds is EqualUnmodifiableListView) return _pinnedNoteIds; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - final List? _pinnedNotes; - @override - List? get pinnedNotes { - final value = _pinnedNotes; - if (value == null) return null; - if (_pinnedNotes is EqualUnmodifiableListView) return _pinnedNotes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final String? pinnedPageId; - final Map? _pinnedPage; - @override - Map? get pinnedPage { - final value = _pinnedPage; - if (value == null) return null; - if (_pinnedPage is EqualUnmodifiableMapView) return _pinnedPage; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final bool publicReactions; - @override - final String ffVisibility; - @override - final bool twoFactorEnabled; - @override - final bool usePasswordLessLogin; - @override - final bool securityKeys; - final List? _roles; - @override - List? get roles { - final value = _roles; - if (value == null) return null; - if (_roles is EqualUnmodifiableListView) return _roles; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final String? memo; -// 以下ログイン時のみ - @override - final String? avatarId; - @override - final String? bannerId; - @override - final bool? isModerator; - @override - final bool? isAdmin; - @override - final bool? injectFeaturedNote; - @override - final bool? receiveAnnouncementEmail; - @override - final bool? alwaysMarkNsfw; - @override - final bool? autoSensitive; - @override - final bool? carefulBot; - @override - final bool? autoAcceptFollowed; - @override - final bool? noCrawle; - @override - final bool? preventAiLearning; - @override - final bool? isExplorable; - @override - final bool? isDeleted; - @override - final bool? hideOnlineStatus; - @override - final bool? hasUnreadSpecifiedNotes; - @override - final bool? hasUnreadMentions; - @override - final bool? hasUnreadAnnouncement; - @override - final bool? hasUnreadAntenna; - @override - final bool? hasUnreadNotification; - @override - final bool? hasPendingReceivedFollowRequest; - final List? _mutedWords; - @override - @MuteWordsConverter() - List? get mutedWords { - final value = _mutedWords; - if (value == null) return null; - if (_mutedWords is EqualUnmodifiableListView) return _mutedWords; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - final List? _mutedInstances; - @override - List? get mutedInstances { - final value = _mutedInstances; - if (value == null) return null; - if (_mutedInstances is EqualUnmodifiableListView) return _mutedInstances; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - final List? _mutingNotificationTypes; - @override - List? get mutingNotificationTypes { - final value = _mutingNotificationTypes; - if (value == null) return null; - if (_mutingNotificationTypes is EqualUnmodifiableListView) - return _mutingNotificationTypes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - final List? _emailNotificationTypes; - @override - List? get emailNotificationTypes { - final value = _emailNotificationTypes; - if (value == null) return null; - if (_emailNotificationTypes is EqualUnmodifiableListView) - return _emailNotificationTypes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - final List? _achievements; - @override - List? get achievements { - final value = _achievements; - if (value == null) return null; - if (_achievements is EqualUnmodifiableListView) return _achievements; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final int? loggedInDays; - @override - final UserPolicies? policies; - @override - final bool? isFollowing; - @override - final bool? isFollowed; - @override - final bool? hasPendingFollowRequestFromYou; - @override - final bool? hasPendingFollowRequestToYou; - @override - final bool? isBlocking; - @override - final bool? isBlocked; - @override - final bool? isMuted; - @override - final bool? isRenoteMuted; - - @override - String toString() { - return 'UsersShowResponse(id: $id, name: $name, username: $username, host: $host, avatarUrl: $avatarUrl, avatarBlurhash: $avatarBlurhash, avatarDecorations: $avatarDecorations, isBot: $isBot, isCat: $isCat, instance: $instance, emojis: $emojis, onlineStatus: $onlineStatus, url: $url, uri: $uri, createdAt: $createdAt, updatedAt: $updatedAt, lastFetchedAt: $lastFetchedAt, bannerUrl: $bannerUrl, bannerBlurhash: $bannerBlurhash, isLocked: $isLocked, isSilenced: $isSilenced, isSuspended: $isSuspended, description: $description, location: $location, birthday: $birthday, lang: $lang, fields: $fields, followersCount: $followersCount, followingCount: $followingCount, notesCount: $notesCount, pinnedNoteIds: $pinnedNoteIds, pinnedNotes: $pinnedNotes, pinnedPageId: $pinnedPageId, pinnedPage: $pinnedPage, publicReactions: $publicReactions, ffVisibility: $ffVisibility, twoFactorEnabled: $twoFactorEnabled, usePasswordLessLogin: $usePasswordLessLogin, securityKeys: $securityKeys, roles: $roles, memo: $memo, avatarId: $avatarId, bannerId: $bannerId, isModerator: $isModerator, isAdmin: $isAdmin, injectFeaturedNote: $injectFeaturedNote, receiveAnnouncementEmail: $receiveAnnouncementEmail, alwaysMarkNsfw: $alwaysMarkNsfw, autoSensitive: $autoSensitive, carefulBot: $carefulBot, autoAcceptFollowed: $autoAcceptFollowed, noCrawle: $noCrawle, preventAiLearning: $preventAiLearning, isExplorable: $isExplorable, isDeleted: $isDeleted, hideOnlineStatus: $hideOnlineStatus, hasUnreadSpecifiedNotes: $hasUnreadSpecifiedNotes, hasUnreadMentions: $hasUnreadMentions, hasUnreadAnnouncement: $hasUnreadAnnouncement, hasUnreadAntenna: $hasUnreadAntenna, hasUnreadNotification: $hasUnreadNotification, hasPendingReceivedFollowRequest: $hasPendingReceivedFollowRequest, mutedWords: $mutedWords, mutedInstances: $mutedInstances, mutingNotificationTypes: $mutingNotificationTypes, emailNotificationTypes: $emailNotificationTypes, achievements: $achievements, loggedInDays: $loggedInDays, policies: $policies, isFollowing: $isFollowing, isFollowed: $isFollowed, hasPendingFollowRequestFromYou: $hasPendingFollowRequestFromYou, hasPendingFollowRequestToYou: $hasPendingFollowRequestToYou, isBlocking: $isBlocking, isBlocked: $isBlocked, isMuted: $isMuted, isRenoteMuted: $isRenoteMuted)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$UsersShowResponseImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.username, username) || - other.username == username) && - (identical(other.host, host) || other.host == host) && - (identical(other.avatarUrl, avatarUrl) || - other.avatarUrl == avatarUrl) && - (identical(other.avatarBlurhash, avatarBlurhash) || - other.avatarBlurhash == avatarBlurhash) && - const DeepCollectionEquality() - .equals(other._avatarDecorations, _avatarDecorations) && - (identical(other.isBot, isBot) || other.isBot == isBot) && - (identical(other.isCat, isCat) || other.isCat == isCat) && - (identical(other.instance, instance) || - other.instance == instance) && - const DeepCollectionEquality().equals(other._emojis, _emojis) && - (identical(other.onlineStatus, onlineStatus) || - other.onlineStatus == onlineStatus) && - (identical(other.url, url) || other.url == url) && - (identical(other.uri, uri) || other.uri == uri) && - (identical(other.createdAt, createdAt) || - other.createdAt == createdAt) && - (identical(other.updatedAt, updatedAt) || - other.updatedAt == updatedAt) && - (identical(other.lastFetchedAt, lastFetchedAt) || - other.lastFetchedAt == lastFetchedAt) && - (identical(other.bannerUrl, bannerUrl) || - other.bannerUrl == bannerUrl) && - (identical(other.bannerBlurhash, bannerBlurhash) || - other.bannerBlurhash == bannerBlurhash) && - (identical(other.isLocked, isLocked) || - other.isLocked == isLocked) && - (identical(other.isSilenced, isSilenced) || - other.isSilenced == isSilenced) && - (identical(other.isSuspended, isSuspended) || - other.isSuspended == isSuspended) && - (identical(other.description, description) || - other.description == description) && - (identical(other.location, location) || - other.location == location) && - (identical(other.birthday, birthday) || - other.birthday == birthday) && - (identical(other.lang, lang) || other.lang == lang) && - const DeepCollectionEquality().equals(other._fields, _fields) && - (identical(other.followersCount, followersCount) || - other.followersCount == followersCount) && - (identical(other.followingCount, followingCount) || - other.followingCount == followingCount) && - (identical(other.notesCount, notesCount) || - other.notesCount == notesCount) && - const DeepCollectionEquality() - .equals(other._pinnedNoteIds, _pinnedNoteIds) && - const DeepCollectionEquality() - .equals(other._pinnedNotes, _pinnedNotes) && - (identical(other.pinnedPageId, pinnedPageId) || - other.pinnedPageId == pinnedPageId) && - const DeepCollectionEquality() - .equals(other._pinnedPage, _pinnedPage) && - (identical(other.publicReactions, publicReactions) || - other.publicReactions == publicReactions) && - (identical(other.ffVisibility, ffVisibility) || - other.ffVisibility == ffVisibility) && - (identical(other.twoFactorEnabled, twoFactorEnabled) || - other.twoFactorEnabled == twoFactorEnabled) && - (identical(other.usePasswordLessLogin, usePasswordLessLogin) || - other.usePasswordLessLogin == usePasswordLessLogin) && - (identical(other.securityKeys, securityKeys) || - other.securityKeys == securityKeys) && - const DeepCollectionEquality().equals(other._roles, _roles) && - (identical(other.memo, memo) || other.memo == memo) && - (identical(other.avatarId, avatarId) || - other.avatarId == avatarId) && - (identical(other.bannerId, bannerId) || - other.bannerId == bannerId) && - (identical(other.isModerator, isModerator) || - other.isModerator == isModerator) && - (identical(other.isAdmin, isAdmin) || other.isAdmin == isAdmin) && - (identical(other.injectFeaturedNote, injectFeaturedNote) || - other.injectFeaturedNote == injectFeaturedNote) && - (identical(other.receiveAnnouncementEmail, receiveAnnouncementEmail) || - other.receiveAnnouncementEmail == receiveAnnouncementEmail) && - (identical(other.alwaysMarkNsfw, alwaysMarkNsfw) || - other.alwaysMarkNsfw == alwaysMarkNsfw) && - (identical(other.autoSensitive, autoSensitive) || - other.autoSensitive == autoSensitive) && - (identical(other.carefulBot, carefulBot) || - other.carefulBot == carefulBot) && - (identical(other.autoAcceptFollowed, autoAcceptFollowed) || - other.autoAcceptFollowed == autoAcceptFollowed) && - (identical(other.noCrawle, noCrawle) || - other.noCrawle == noCrawle) && - (identical(other.preventAiLearning, preventAiLearning) || - other.preventAiLearning == preventAiLearning) && - (identical(other.isExplorable, isExplorable) || - other.isExplorable == isExplorable) && - (identical(other.isDeleted, isDeleted) || - other.isDeleted == isDeleted) && - (identical(other.hideOnlineStatus, hideOnlineStatus) || other.hideOnlineStatus == hideOnlineStatus) && - (identical(other.hasUnreadSpecifiedNotes, hasUnreadSpecifiedNotes) || other.hasUnreadSpecifiedNotes == hasUnreadSpecifiedNotes) && - (identical(other.hasUnreadMentions, hasUnreadMentions) || other.hasUnreadMentions == hasUnreadMentions) && - (identical(other.hasUnreadAnnouncement, hasUnreadAnnouncement) || other.hasUnreadAnnouncement == hasUnreadAnnouncement) && - (identical(other.hasUnreadAntenna, hasUnreadAntenna) || other.hasUnreadAntenna == hasUnreadAntenna) && - (identical(other.hasUnreadNotification, hasUnreadNotification) || other.hasUnreadNotification == hasUnreadNotification) && - (identical(other.hasPendingReceivedFollowRequest, hasPendingReceivedFollowRequest) || other.hasPendingReceivedFollowRequest == hasPendingReceivedFollowRequest) && - const DeepCollectionEquality().equals(other._mutedWords, _mutedWords) && - const DeepCollectionEquality().equals(other._mutedInstances, _mutedInstances) && - const DeepCollectionEquality().equals(other._mutingNotificationTypes, _mutingNotificationTypes) && - const DeepCollectionEquality().equals(other._emailNotificationTypes, _emailNotificationTypes) && - const DeepCollectionEquality().equals(other._achievements, _achievements) && - (identical(other.loggedInDays, loggedInDays) || other.loggedInDays == loggedInDays) && - (identical(other.policies, policies) || other.policies == policies) && - (identical(other.isFollowing, isFollowing) || other.isFollowing == isFollowing) && - (identical(other.isFollowed, isFollowed) || other.isFollowed == isFollowed) && - (identical(other.hasPendingFollowRequestFromYou, hasPendingFollowRequestFromYou) || other.hasPendingFollowRequestFromYou == hasPendingFollowRequestFromYou) && - (identical(other.hasPendingFollowRequestToYou, hasPendingFollowRequestToYou) || other.hasPendingFollowRequestToYou == hasPendingFollowRequestToYou) && - (identical(other.isBlocking, isBlocking) || other.isBlocking == isBlocking) && - (identical(other.isBlocked, isBlocked) || other.isBlocked == isBlocked) && - (identical(other.isMuted, isMuted) || other.isMuted == isMuted) && - (identical(other.isRenoteMuted, isRenoteMuted) || other.isRenoteMuted == isRenoteMuted)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hashAll([ - runtimeType, - id, - name, - username, - host, - avatarUrl, - avatarBlurhash, - const DeepCollectionEquality().hash(_avatarDecorations), - isBot, - isCat, - instance, - const DeepCollectionEquality().hash(_emojis), - onlineStatus, - url, - uri, - createdAt, - updatedAt, - lastFetchedAt, - bannerUrl, - bannerBlurhash, - isLocked, - isSilenced, - isSuspended, - description, - location, - birthday, - lang, - const DeepCollectionEquality().hash(_fields), - followersCount, - followingCount, - notesCount, - const DeepCollectionEquality().hash(_pinnedNoteIds), - const DeepCollectionEquality().hash(_pinnedNotes), - pinnedPageId, - const DeepCollectionEquality().hash(_pinnedPage), - publicReactions, - ffVisibility, - twoFactorEnabled, - usePasswordLessLogin, - securityKeys, - const DeepCollectionEquality().hash(_roles), - memo, - avatarId, - bannerId, - isModerator, - isAdmin, - injectFeaturedNote, - receiveAnnouncementEmail, - alwaysMarkNsfw, - autoSensitive, - carefulBot, - autoAcceptFollowed, - noCrawle, - preventAiLearning, - isExplorable, - isDeleted, - hideOnlineStatus, - hasUnreadSpecifiedNotes, - hasUnreadMentions, - hasUnreadAnnouncement, - hasUnreadAntenna, - hasUnreadNotification, - hasPendingReceivedFollowRequest, - const DeepCollectionEquality().hash(_mutedWords), - const DeepCollectionEquality().hash(_mutedInstances), - const DeepCollectionEquality().hash(_mutingNotificationTypes), - const DeepCollectionEquality().hash(_emailNotificationTypes), - const DeepCollectionEquality().hash(_achievements), - loggedInDays, - policies, - isFollowing, - isFollowed, - hasPendingFollowRequestFromYou, - hasPendingFollowRequestToYou, - isBlocking, - isBlocked, - isMuted, - isRenoteMuted - ]); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$UsersShowResponseImplCopyWith<_$UsersShowResponseImpl> get copyWith => - __$$UsersShowResponseImplCopyWithImpl<_$UsersShowResponseImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$UsersShowResponseImplToJson( - this, - ); - } -} - -abstract class _UsersShowResponse extends UsersShowResponse { - const factory _UsersShowResponse( - {required final String id, - final String? name, - required final String username, - final String? host, - @UriConverter() required final Uri avatarUrl, - final String? avatarBlurhash, - final List avatarDecorations, - required final bool isBot, - required final bool isCat, - final UserInstanceInfo? instance, - @EmojisConverter() final Map? emojis, - @OnlineStatusJsonConverter() final OnlineStatus? onlineStatus, - @NullableUriConverter() final Uri? url, - @NullableUriConverter() final Uri? uri, - @DateTimeConverter() required final DateTime createdAt, - @NullableDateTimeConverter() final DateTime? updatedAt, - @NullableDateTimeConverter() final DateTime? lastFetchedAt, - @NullableUriConverter() final Uri? bannerUrl, - final String? bannerBlurhash, - required final bool isLocked, - required final bool isSilenced, - required final bool isSuspended, - final String? description, - final String? location, - @NullableDateTimeConverter() final DateTime? birthday, - final String? lang, - final List? fields, - required final int followersCount, - required final int followingCount, - required final int notesCount, - final List? pinnedNoteIds, - final List? pinnedNotes, - final String? pinnedPageId, - final Map? pinnedPage, - required final bool publicReactions, - required final String ffVisibility, - required final bool twoFactorEnabled, - required final bool usePasswordLessLogin, - required final bool securityKeys, - final List? roles, - final String? memo, - final String? avatarId, - final String? bannerId, - final bool? isModerator, - final bool? isAdmin, - final bool? injectFeaturedNote, - final bool? receiveAnnouncementEmail, - final bool? alwaysMarkNsfw, - final bool? autoSensitive, - final bool? carefulBot, - final bool? autoAcceptFollowed, - final bool? noCrawle, - final bool? preventAiLearning, - final bool? isExplorable, - final bool? isDeleted, - final bool? hideOnlineStatus, - final bool? hasUnreadSpecifiedNotes, - final bool? hasUnreadMentions, - final bool? hasUnreadAnnouncement, - final bool? hasUnreadAntenna, - final bool? hasUnreadNotification, - final bool? hasPendingReceivedFollowRequest, - @MuteWordsConverter() final List? mutedWords, - final List? mutedInstances, - final List? mutingNotificationTypes, - final List? emailNotificationTypes, - final List? achievements, - final int? loggedInDays, - final UserPolicies? policies, - final bool? isFollowing, - final bool? isFollowed, - final bool? hasPendingFollowRequestFromYou, - final bool? hasPendingFollowRequestToYou, - final bool? isBlocking, - final bool? isBlocked, - final bool? isMuted, - final bool? isRenoteMuted}) = _$UsersShowResponseImpl; - const _UsersShowResponse._() : super._(); - - factory _UsersShowResponse.fromJson(Map json) = - _$UsersShowResponseImpl.fromJson; - - @override - String get id; - @override - String? get name; - @override - String get username; - @override - String? get host; - @override - @UriConverter() - Uri get avatarUrl; - @override - String? get avatarBlurhash; - @override - List get avatarDecorations; - @override - bool get isBot; - @override - bool get isCat; - @override - UserInstanceInfo? get instance; - @override - @EmojisConverter() - Map? get emojis; - @override - @OnlineStatusJsonConverter() - OnlineStatus? get onlineStatus; - @override - @NullableUriConverter() - Uri? get url; - @override - @NullableUriConverter() - Uri? get uri; - @override //dynamic movedToUri, -//dynamic alsoKnownAs, - @DateTimeConverter() - DateTime get createdAt; - @override - @NullableDateTimeConverter() - DateTime? get updatedAt; - @override - @NullableDateTimeConverter() - DateTime? get lastFetchedAt; - @override - @NullableUriConverter() - Uri? get bannerUrl; - @override - String? get bannerBlurhash; - @override - bool get isLocked; - @override - bool get isSilenced; - @override - bool get isSuspended; - @override - String? get description; - @override - String? get location; - @override - @NullableDateTimeConverter() - DateTime? get birthday; - @override - String? get lang; - @override - List? get fields; - @override - int get followersCount; - @override - int get followingCount; - @override - int get notesCount; - @override - List? get pinnedNoteIds; - @override - List? get pinnedNotes; - @override - String? get pinnedPageId; - @override - Map? get pinnedPage; - @override - bool get publicReactions; - @override - String get ffVisibility; - @override - bool get twoFactorEnabled; - @override - bool get usePasswordLessLogin; - @override - bool get securityKeys; - @override - List? get roles; - @override - String? get memo; - @override // 以下ログイン時のみ - String? get avatarId; - @override - String? get bannerId; - @override - bool? get isModerator; - @override - bool? get isAdmin; - @override - bool? get injectFeaturedNote; - @override - bool? get receiveAnnouncementEmail; - @override - bool? get alwaysMarkNsfw; - @override - bool? get autoSensitive; - @override - bool? get carefulBot; - @override - bool? get autoAcceptFollowed; - @override - bool? get noCrawle; - @override - bool? get preventAiLearning; - @override - bool? get isExplorable; - @override - bool? get isDeleted; - @override - bool? get hideOnlineStatus; - @override - bool? get hasUnreadSpecifiedNotes; - @override - bool? get hasUnreadMentions; - @override - bool? get hasUnreadAnnouncement; - @override - bool? get hasUnreadAntenna; - @override - bool? get hasUnreadNotification; - @override - bool? get hasPendingReceivedFollowRequest; - @override - @MuteWordsConverter() - List? get mutedWords; - @override - List? get mutedInstances; - @override - List? get mutingNotificationTypes; - @override - List? get emailNotificationTypes; - @override - List? get achievements; - @override - int? get loggedInDays; - @override - UserPolicies? get policies; - @override - bool? get isFollowing; - @override - bool? get isFollowed; - @override - bool? get hasPendingFollowRequestFromYou; - @override - bool? get hasPendingFollowRequestToYou; - @override - bool? get isBlocking; - @override - bool? get isBlocked; - @override - bool? get isMuted; - @override - bool? get isRenoteMuted; - @override - @JsonKey(ignore: true) - _$$UsersShowResponseImplCopyWith<_$UsersShowResponseImpl> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/lib/src/data/users/users_show_response.g.dart b/lib/src/data/users/users_show_response.g.dart deleted file mode 100644 index 7d882d1c..00000000 --- a/lib/src/data/users/users_show_response.g.dart +++ /dev/null @@ -1,226 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'users_show_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$UsersShowResponseImpl _$$UsersShowResponseImplFromJson( - Map json) => - _$UsersShowResponseImpl( - id: json['id'] as String, - name: json['name'] as String?, - username: json['username'] as String, - host: json['host'] as String?, - avatarUrl: const UriConverter().fromJson(json['avatarUrl'] as String), - avatarBlurhash: json['avatarBlurhash'] as String?, - avatarDecorations: (json['avatarDecorations'] as List?) - ?.map((e) => - UserAvatarDecoration.fromJson(e as Map)) - .toList() ?? - const [], - isBot: json['isBot'] as bool, - isCat: json['isCat'] as bool, - instance: json['instance'] == null - ? null - : UserInstanceInfo.fromJson(json['instance'] as Map), - emojis: const EmojisConverter().fromJson(json['emojis']), - onlineStatus: const OnlineStatusJsonConverter() - .fromJson(json['onlineStatus'] as String?), - url: _$JsonConverterFromJson( - json['url'], const NullableUriConverter().fromJson), - uri: _$JsonConverterFromJson( - json['uri'], const NullableUriConverter().fromJson), - createdAt: - const DateTimeConverter().fromJson(json['createdAt'] as String), - updatedAt: _$JsonConverterFromJson( - json['updatedAt'], const NullableDateTimeConverter().fromJson), - lastFetchedAt: _$JsonConverterFromJson( - json['lastFetchedAt'], const NullableDateTimeConverter().fromJson), - bannerUrl: _$JsonConverterFromJson( - json['bannerUrl'], const NullableUriConverter().fromJson), - bannerBlurhash: json['bannerBlurhash'] as String?, - isLocked: json['isLocked'] as bool, - isSilenced: json['isSilenced'] as bool, - isSuspended: json['isSuspended'] as bool, - description: json['description'] as String?, - location: json['location'] as String?, - birthday: _$JsonConverterFromJson( - json['birthday'], const NullableDateTimeConverter().fromJson), - lang: json['lang'] as String?, - fields: (json['fields'] as List?) - ?.map((e) => UserField.fromJson(e as Map)) - .toList(), - followersCount: json['followersCount'] as int, - followingCount: json['followingCount'] as int, - notesCount: json['notesCount'] as int, - pinnedNoteIds: (json['pinnedNoteIds'] as List?) - ?.map((e) => e as String) - .toList(), - pinnedNotes: (json['pinnedNotes'] as List?) - ?.map((e) => Note.fromJson(e as Map)) - .toList(), - pinnedPageId: json['pinnedPageId'] as String?, - pinnedPage: json['pinnedPage'] as Map?, - publicReactions: json['publicReactions'] as bool, - ffVisibility: json['ffVisibility'] as String, - twoFactorEnabled: json['twoFactorEnabled'] as bool, - usePasswordLessLogin: json['usePasswordLessLogin'] as bool, - securityKeys: json['securityKeys'] as bool, - roles: (json['roles'] as List?) - ?.map((e) => UserRole.fromJson(e as Map)) - .toList(), - memo: json['memo'] as String?, - avatarId: json['avatarId'] as String?, - bannerId: json['bannerId'] as String?, - isModerator: json['isModerator'] as bool?, - isAdmin: json['isAdmin'] as bool?, - injectFeaturedNote: json['injectFeaturedNote'] as bool?, - receiveAnnouncementEmail: json['receiveAnnouncementEmail'] as bool?, - alwaysMarkNsfw: json['alwaysMarkNsfw'] as bool?, - autoSensitive: json['autoSensitive'] as bool?, - carefulBot: json['carefulBot'] as bool?, - autoAcceptFollowed: json['autoAcceptFollowed'] as bool?, - noCrawle: json['noCrawle'] as bool?, - preventAiLearning: json['preventAiLearning'] as bool?, - isExplorable: json['isExplorable'] as bool?, - isDeleted: json['isDeleted'] as bool?, - hideOnlineStatus: json['hideOnlineStatus'] as bool?, - hasUnreadSpecifiedNotes: json['hasUnreadSpecifiedNotes'] as bool?, - hasUnreadMentions: json['hasUnreadMentions'] as bool?, - hasUnreadAnnouncement: json['hasUnreadAnnouncement'] as bool?, - hasUnreadAntenna: json['hasUnreadAntenna'] as bool?, - hasUnreadNotification: json['hasUnreadNotification'] as bool?, - hasPendingReceivedFollowRequest: - json['hasPendingReceivedFollowRequest'] as bool?, - mutedWords: (json['mutedWords'] as List?) - ?.map(const MuteWordsConverter().fromJson) - .toList(), - mutedInstances: (json['mutedInstances'] as List?) - ?.map((e) => e as String) - .toList(), - mutingNotificationTypes: - (json['mutingNotificationTypes'] as List?) - ?.map((e) => e as String) - .toList(), - emailNotificationTypes: (json['emailNotificationTypes'] as List?) - ?.map((e) => e as String) - .toList(), - achievements: (json['achievements'] as List?) - ?.map((e) => UserAchievement.fromJson(e as Map)) - .toList(), - loggedInDays: json['loggedInDays'] as int?, - policies: json['policies'] == null - ? null - : UserPolicies.fromJson(json['policies'] as Map), - isFollowing: json['isFollowing'] as bool?, - isFollowed: json['isFollowed'] as bool?, - hasPendingFollowRequestFromYou: - json['hasPendingFollowRequestFromYou'] as bool?, - hasPendingFollowRequestToYou: - json['hasPendingFollowRequestToYou'] as bool?, - isBlocking: json['isBlocking'] as bool?, - isBlocked: json['isBlocked'] as bool?, - isMuted: json['isMuted'] as bool?, - isRenoteMuted: json['isRenoteMuted'] as bool?, - ); - -Map _$$UsersShowResponseImplToJson( - _$UsersShowResponseImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'username': instance.username, - 'host': instance.host, - 'avatarUrl': const UriConverter().toJson(instance.avatarUrl), - 'avatarBlurhash': instance.avatarBlurhash, - 'avatarDecorations': instance.avatarDecorations, - 'isBot': instance.isBot, - 'isCat': instance.isCat, - 'instance': instance.instance, - 'emojis': _$JsonConverterToJson>( - instance.emojis, const EmojisConverter().toJson), - 'onlineStatus': - const OnlineStatusJsonConverter().toJson(instance.onlineStatus), - 'url': const NullableUriConverter().toJson(instance.url), - 'uri': const NullableUriConverter().toJson(instance.uri), - 'createdAt': const DateTimeConverter().toJson(instance.createdAt), - 'updatedAt': const NullableDateTimeConverter().toJson(instance.updatedAt), - 'lastFetchedAt': - const NullableDateTimeConverter().toJson(instance.lastFetchedAt), - 'bannerUrl': const NullableUriConverter().toJson(instance.bannerUrl), - 'bannerBlurhash': instance.bannerBlurhash, - 'isLocked': instance.isLocked, - 'isSilenced': instance.isSilenced, - 'isSuspended': instance.isSuspended, - 'description': instance.description, - 'location': instance.location, - 'birthday': const NullableDateTimeConverter().toJson(instance.birthday), - 'lang': instance.lang, - 'fields': instance.fields, - 'followersCount': instance.followersCount, - 'followingCount': instance.followingCount, - 'notesCount': instance.notesCount, - 'pinnedNoteIds': instance.pinnedNoteIds, - 'pinnedNotes': instance.pinnedNotes, - 'pinnedPageId': instance.pinnedPageId, - 'pinnedPage': instance.pinnedPage, - 'publicReactions': instance.publicReactions, - 'ffVisibility': instance.ffVisibility, - 'twoFactorEnabled': instance.twoFactorEnabled, - 'usePasswordLessLogin': instance.usePasswordLessLogin, - 'securityKeys': instance.securityKeys, - 'roles': instance.roles, - 'memo': instance.memo, - 'avatarId': instance.avatarId, - 'bannerId': instance.bannerId, - 'isModerator': instance.isModerator, - 'isAdmin': instance.isAdmin, - 'injectFeaturedNote': instance.injectFeaturedNote, - 'receiveAnnouncementEmail': instance.receiveAnnouncementEmail, - 'alwaysMarkNsfw': instance.alwaysMarkNsfw, - 'autoSensitive': instance.autoSensitive, - 'carefulBot': instance.carefulBot, - 'autoAcceptFollowed': instance.autoAcceptFollowed, - 'noCrawle': instance.noCrawle, - 'preventAiLearning': instance.preventAiLearning, - 'isExplorable': instance.isExplorable, - 'isDeleted': instance.isDeleted, - 'hideOnlineStatus': instance.hideOnlineStatus, - 'hasUnreadSpecifiedNotes': instance.hasUnreadSpecifiedNotes, - 'hasUnreadMentions': instance.hasUnreadMentions, - 'hasUnreadAnnouncement': instance.hasUnreadAnnouncement, - 'hasUnreadAntenna': instance.hasUnreadAntenna, - 'hasUnreadNotification': instance.hasUnreadNotification, - 'hasPendingReceivedFollowRequest': - instance.hasPendingReceivedFollowRequest, - 'mutedWords': - instance.mutedWords?.map(const MuteWordsConverter().toJson).toList(), - 'mutedInstances': instance.mutedInstances, - 'mutingNotificationTypes': instance.mutingNotificationTypes, - 'emailNotificationTypes': instance.emailNotificationTypes, - 'achievements': instance.achievements, - 'loggedInDays': instance.loggedInDays, - 'policies': instance.policies, - 'isFollowing': instance.isFollowing, - 'isFollowed': instance.isFollowed, - 'hasPendingFollowRequestFromYou': instance.hasPendingFollowRequestFromYou, - 'hasPendingFollowRequestToYou': instance.hasPendingFollowRequestToYou, - 'isBlocking': instance.isBlocking, - 'isBlocked': instance.isBlocked, - 'isMuted': instance.isMuted, - 'isRenoteMuted': instance.isRenoteMuted, - }; - -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); - -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); diff --git a/lib/src/misskey_dart_base.dart b/lib/src/misskey_dart_base.dart index 1ccbc106..1280ecb1 100644 --- a/lib/src/misskey_dart_base.dart +++ b/lib/src/misskey_dart_base.dart @@ -142,9 +142,9 @@ class Misskey { } /// ピン留めされたユーザーを取得します。 - Future> pinnedUsers() async { + Future> pinnedUsers() async { final response = await apiService.post("pinned-users", {}); - return response.map((e) => User.fromJson(e)); + return response.map((e) => UserDetailed.fromJson(e)); } /// ホームタイムラインに接続します。 @@ -392,8 +392,8 @@ class Misskey { SocketController userListStream({ required String listId, FutureOr Function(Note note)? onNoteReceived, - FutureOr Function(User user)? onUserAdded, - FutureOr Function(User user)? onUserRemoved, + FutureOr Function(UserLite user)? onUserAdded, + FutureOr Function(UserLite user)? onUserRemoved, FutureOr Function(String id, TimelineReacted reaction)? onReacted, FutureOr Function(String id, TimelineReacted reaction)? onUnreacted, FutureOr Function(String id, NoteEdited note)? onUpdated, @@ -407,13 +407,13 @@ class Misskey { if (response == null) return; if (type == ChannelEventType.userAdded) { - final user = User.fromJson(response); + final user = UserLite.fromJson(response); await onUserAdded?.call(user); return; } if (type == ChannelEventType.userRemoved) { - final user = User.fromJson(response); + final user = UserLite.fromJson(response); await onUserRemoved?.call(user); return; } @@ -540,10 +540,10 @@ class Misskey { FutureOr Function(Note note)? onMention, FutureOr Function(Note note)? onReply, FutureOr Function(Note note)? onRenote, - FutureOr Function(User user)? onFollow, - FutureOr Function(User user)? onFollowed, - FutureOr Function(User user)? onUnfollow, - FutureOr Function(User user)? onMeUpdated, + FutureOr Function(UserDetailedNotMe user)? onFollow, + FutureOr Function(UserLite user)? onFollowed, + FutureOr Function(UserDetailedNotMe user)? onUnfollow, + FutureOr Function(MeDetailed me)? onMeUpdated, FutureOr Function()? onReadAllNotifications, FutureOr Function(INotificationsResponse notification)? onUnreadNotification, @@ -551,7 +551,7 @@ class Misskey { FutureOr Function()? onReadAllUnreadMentions, FutureOr Function(String noteId)? onUnreadSpecifiedNote, FutureOr Function()? onReadAllUnreadSpecifiedNotes, - FutureOr Function(User user)? onReceiveFollowRequest, + FutureOr Function(UserLite user)? onReceiveFollowRequest, FutureOr Function()? onReadAllAnnouncements, }) => streamingService.connect( @@ -573,13 +573,16 @@ class Misskey { await onRenote?.call(Note.fromJson(response)); break; case ChannelEventType.follow: - await onFollow?.call(User.fromJson(response)); + await onFollow?.call(UserDetailedNotMe.fromJson(response)); break; case ChannelEventType.followed: - await onFollowed?.call(User.fromJson(response)); + await onFollowed?.call(UserLite.fromJson(response)); + break; + case ChannelEventType.unfollow: + await onUnfollow?.call(UserDetailedNotMe.fromJson(response)); break; case ChannelEventType.meUpdated: - await onMeUpdated?.call(User.fromJson(response)); + await onMeUpdated?.call(MeDetailed.fromJson(response)); break; case ChannelEventType.readAllNotifications: await onReadAllNotifications?.call(); @@ -601,7 +604,7 @@ class Misskey { await onReadAllUnreadSpecifiedNotes?.call(); break; case ChannelEventType.receiveFollowRequest: - await onReceiveFollowRequest?.call(User.fromJson(response)); + await onReceiveFollowRequest?.call(UserLite.fromJson(response)); break; case ChannelEventType.readAllAnnouncements: await onReadAllAnnouncements?.call(); diff --git a/lib/src/misskey_federation.dart b/lib/src/misskey_federation.dart index 629d279e..7e53165d 100644 --- a/lib/src/misskey_federation.dart +++ b/lib/src/misskey_federation.dart @@ -16,9 +16,9 @@ class MisskeyFederation { } /// 自身のサーバーが保持する外部サーバーにいるユーザーの一覧を取得します。 - Future> users(FederationUsersRequest request) async { + Future> users(FederationUsersRequest request) async { final response = await _apiService.post("federation/users", request.toJson()); - return response.map((e) => User.fromJson(e)); + return response.map((e) => UserDetailed.fromJson(e)); } } diff --git a/lib/src/misskey_following.dart b/lib/src/misskey_following.dart index 16d326ba..4e5fd22b 100644 --- a/lib/src/misskey_following.dart +++ b/lib/src/misskey_following.dart @@ -11,26 +11,26 @@ class MisskeyFollowing { requests = MisskeyFollowingRequests(apiService: apiService); /// ユーザーをフォローします。 - Future create(FollowingCreateRequest request) async { + Future create(FollowingCreateRequest request) async { final response = await _apiService.post>( "following/create", request.toJson()); - return User.fromJson(response); + return UserLite.fromJson(response); } /// ユーザーに対するフォローを解除します。 - Future delete(FollowingDeleteRequest request) async { + Future delete(FollowingDeleteRequest request) async { final response = await _apiService.post>( "following/delete", request.toJson()); - return User.fromJson(response); + return UserLite.fromJson(response); } /// ユーザーからのフォローを解除します。 - Future invalidate(FollowingInvalidateRequest request) async { + Future invalidate(FollowingInvalidateRequest request) async { final response = await _apiService.post>( "following/invalidate", request.toJson(), ); - return User.fromJson(response); + return UserLite.fromJson(response); } /// フォロー中のすべての人の状態を変更します。 diff --git a/lib/src/misskey_hashtags.dart b/lib/src/misskey_hashtags.dart index b025cf43..da13ffb4 100644 --- a/lib/src/misskey_hashtags.dart +++ b/lib/src/misskey_hashtags.dart @@ -29,9 +29,9 @@ class MisskeyHashtags { return response.map((e) => HashtagsTrendResponse.fromJson(e)); } - Future> users(HashtagsUsersRequest request) async { + Future> users(HashtagsUsersRequest request) async { final response = await _apiService.post("hashtags/users", request.toJson()); - return response.map((e) => User.fromJson(e)); + return response.map((e) => UserDetailed.fromJson(e)); } } diff --git a/lib/src/misskey_i.dart b/lib/src/misskey_i.dart index 0d5113fa..5eabf49d 100644 --- a/lib/src/misskey_i.dart +++ b/lib/src/misskey_i.dart @@ -7,9 +7,9 @@ class MisskeyI { MisskeyI({required ApiService apiService}) : _apiService = apiService; /// 自分自身の情報を取得します。 - Future i() async { + Future i() async { final response = await _apiService.post>("i", {}); - return IResponse.fromJson(response); + return MeDetailed.fromJson(response); } /// 通知を取得します。 @@ -34,11 +34,11 @@ class MisskeyI { } /// 自身の情報を更新します。 - Future update(IUpdateRequest request) async { + Future update(IUpdateRequest request) async { final response = await _apiService.post>( "i/update", request.toJson(), ); - return IResponse.fromJson(response); + return MeDetailed.fromJson(response); } } diff --git a/lib/src/misskey_users.dart b/lib/src/misskey_users.dart index 05b20ab5..1faf1225 100644 --- a/lib/src/misskey_users.dart +++ b/lib/src/misskey_users.dart @@ -10,27 +10,26 @@ class MisskeyUsers { list = MisskeyUsersLists(apiService: apiService); /// ユーザー情報をIDから取得します。 - Future show(UsersShowRequest request) async { + Future show(UsersShowRequest request) async { final response = await _apiService.post>( "users/show", request.toJson()); - return UsersShowResponse.fromJson(response); + return UserDetailed.fromJson(response); } /// ユーザー情報を複数のIDから取得します。 - Future> showByIds( + Future> showByIds( UsersShowByIdsRequest request) async { final response = await _apiService.post("users/show", request.toJson()); - return response.map((e) => UsersShowResponse.fromJson(e)); + return response.map((e) => UserDetailed.fromJson(e)); } /// ユーザー情報をスクリーンネームから取得します。 /// 自分自身のホストのユーザーを取得する場合、hostはnullである必要があります。 - Future showByName( - UsersShowByUserNameRequest request) async { + Future showByName(UsersShowByUserNameRequest request) async { final response = await _apiService.post>( "users/show", request.toJson()); - return UsersShowResponse.fromJson(response); + return UserDetailed.fromJson(response); } /// ユーザーが投稿したノートを取得します。 @@ -75,6 +74,9 @@ class MisskeyUsers { } /// ユーザーを検索します。 + /// + /// [UsersSearchRequest.detail] が false のとき 返り値の各要素は [UserLite] + /// そうでなければ [UserDetailed] Future> search(UsersSearchRequest request) async { final response = await _apiService.post("users/search", request.toJson()); @@ -89,9 +91,9 @@ class MisskeyUsers { return response.map((e) => User.fromJson(e)); } - Future> users(UsersUsersRequest request) async { + Future> users(UsersUsersRequest request) async { final response = await _apiService.post("users", request.toJson()); - return response.map((e) => User.fromJson(e)); + return response.map((e) => UserDetailed.fromJson(e)); } /// A personal memo for the target user. If null or empty, delete the memo. diff --git a/test/misskey_ap_test.dart b/test/misskey_ap_test.dart index 4dcb72e8..2ce4aea0 100644 --- a/test/misskey_ap_test.dart +++ b/test/misskey_ap_test.dart @@ -28,7 +28,7 @@ void main() async { ), ); expect(response.type, equals("User")); - User.fromJson(response.object); + MeDetailed.fromJson(response.object); }); }); } diff --git a/test/misskey_blocking_test.dart b/test/misskey_blocking_test.dart index 65088aee..15629ca8 100644 --- a/test/misskey_blocking_test.dart +++ b/test/misskey_blocking_test.dart @@ -9,7 +9,7 @@ void main() async { await userClient.blocking.create(BlockCreateRequest(userId: newUser.id)); final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); - expect(userDetailed.isBlocking, isTrue); + expect((userDetailed as UserDetailedNotMeWithRelations).isBlocking, isTrue); }); test("delete", () async { @@ -19,7 +19,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isBlocking, + (userDetailed as UserDetailedNotMeWithRelations).isBlocking, isFalse, ); }); diff --git a/test/misskey_dart_base_test.dart b/test/misskey_dart_base_test.dart index 19bbaac4..d8de6dc5 100644 --- a/test/misskey_dart_base_test.dart +++ b/test/misskey_dart_base_test.dart @@ -167,7 +167,7 @@ void main() async { }); test("userAdded", () async { - final completer = Completer(); + final completer = Completer(); final client = userClient; final list = await client.users.list .create(UsersListsCreateRequest(name: "test")); @@ -187,7 +187,7 @@ void main() async { }); test("userRemoved", () async { - final completer = Completer(); + final completer = Completer(); final client = userClient; final list = await client.users.list .create(UsersListsCreateRequest(name: "test")); @@ -326,7 +326,7 @@ void main() async { }); test("follow", () async { - final completer = Completer(); + final completer = Completer(); final client = userClient; final newUser = (await adminClient.createUser()).user; final controller = client.mainStream(onFollow: completer.complete); @@ -338,7 +338,7 @@ void main() async { }); test("followed", () async { - final completer = Completer(); + final completer = Completer(); final client = userClient; final newClient = (await adminClient.createUser()).client; final controller = @@ -350,8 +350,23 @@ void main() async { controller.disconnect(); }); + test("unfollow", () async { + final completer = Completer(); + final client = userClient; + final newUser = (await adminClient.createUser()).user; + final controller = + client.mainStream(onUnfollow: completer.complete); + await client.following + .create(FollowingCreateRequest(userId: newUser.id)); + await client.startStreaming(); + await client.following + .delete(FollowingDeleteRequest(userId: newUser.id)); + await completer.future; + controller.disconnect(); + }); + test("meUpdated", () async { - final completer = Completer(); + final completer = Completer(); final client = userClient; final controller = client.mainStream(onMeUpdated: completer.complete); @@ -437,7 +452,7 @@ void main() async { }); test("receiveFollowRequest", () async { - final completer = Completer(); + final completer = Completer(); final newClient = (await adminClient.createUser()).client; final newUser = await newClient.i.update(IUpdateRequest(isLocked: true)); diff --git a/test/misskey_following_test.dart b/test/misskey_following_test.dart index 6062864b..8655e06b 100644 --- a/test/misskey_following_test.dart +++ b/test/misskey_following_test.dart @@ -13,7 +13,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isFollowing, + (userDetailed as UserDetailedNotMeWithRelations).isFollowing, isTrue, ); }); @@ -27,7 +27,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isFollowing, + (userDetailed as UserDetailedNotMeWithRelations).isFollowing, isFalse, ); }); @@ -43,7 +43,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isFollowed, + (userDetailed as UserDetailedNotMeWithRelations).isFollowed, isFalse, ); }); @@ -66,7 +66,7 @@ void main() async { final userDetailed = await newClient.users.show(UsersShowRequest(userId: user.id)); expect( - userDetailed.isFollowed, + (userDetailed as UserDetailedNotMeWithRelations).isFollowed, isTrue, ); }); diff --git a/test/misskey_mute_test.dart b/test/misskey_mute_test.dart index c6f4b637..1f3b7ae0 100644 --- a/test/misskey_mute_test.dart +++ b/test/misskey_mute_test.dart @@ -9,7 +9,7 @@ void main() async { await userClient.mute.create(MuteCreateRequest(userId: newUser.id)); final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); - expect(userDetailed.isMuted, isTrue); + expect((userDetailed as UserDetailedNotMeWithRelations).isMuted, isTrue); }); test("delete", () async { @@ -18,6 +18,6 @@ void main() async { await userClient.mute.delete(MuteDeleteRequest(userId: newUser.id)); final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); - expect(userDetailed.isMuted, isFalse); + expect((userDetailed as UserDetailedNotMeWithRelations).isMuted, isFalse); }); } diff --git a/test/misskey_renote_mute_test.dart b/test/misskey_renote_mute_test.dart index c025d990..da02a16e 100644 --- a/test/misskey_renote_mute_test.dart +++ b/test/misskey_renote_mute_test.dart @@ -11,7 +11,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isRenoteMuted, + (userDetailed as UserDetailedNotMeWithRelations).isRenoteMuted, isTrue, ); }); @@ -25,7 +25,7 @@ void main() async { final userDetailed = await userClient.users.show(UsersShowRequest(userId: newUser.id)); expect( - userDetailed.isRenoteMuted, + (userDetailed as UserDetailedNotMeWithRelations).isRenoteMuted, isFalse, ); }); diff --git a/test/misskey_users_test.dart b/test/misskey_users_test.dart index 966176ee..56372798 100644 --- a/test/misskey_users_test.dart +++ b/test/misskey_users_test.dart @@ -12,16 +12,20 @@ void main() async { final response = await userClient.users.show(UsersShowRequest(userId: user.id)); expect(response.username, equals(user.username)); + expect(response, isA()); }); test("not me", () async { final response = await userClient.users.show(UsersShowRequest(userId: admin.id)); expect(response.username, equals(admin.username)); + expect(response, isA()); }); test("anonymous", () async { - await anonymousClient.users.show(UsersShowRequest(userId: user.id)); + final response = + await anonymousClient.users.show(UsersShowRequest(userId: user.id)); + expect(response, isA()); }); }); @@ -100,12 +104,14 @@ void main() async { final response = await userClient.users .search(UsersSearchRequest(query: user.username)); expect(response.map((e) => e.id), contains(user.id)); + expect(response, everyElement(isA())); }); test("lite", () async { final response = await userClient.users .search(UsersSearchRequest(query: user.username, detail: false)); expect(response.map((e) => e.id), contains(user.id)); + expect(response, everyElement(isA())); }); });