From 66aef442811f014367846d96698acdd0c97e592a Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 2 Mar 2025 15:22:24 +0800 Subject: [PATCH] :arrow_up: Upgrade freezed --- assets/translations/en-US.json | 3 +- assets/translations/zh-CN.json | 3 +- ios/Podfile.lock | 12 +- lib/controllers/chat_message_controller.dart | 1 + lib/types/account.dart | 14 +- lib/types/account.freezed.dart | 3159 +++++++------- lib/types/account.g.dart | 50 +- lib/types/attachment.dart | 16 +- lib/types/attachment.freezed.dart | 3668 ++++++++-------- lib/types/attachment.g.dart | 58 +- lib/types/auth.dart | 6 +- lib/types/auth.freezed.dart | 1121 +++-- lib/types/auth.g.dart | 18 +- lib/types/chat.dart | 10 +- lib/types/chat.freezed.dart | 2371 +++++------ lib/types/chat.g.dart | 32 +- lib/types/check_in.dart | 2 +- lib/types/check_in.freezed.dart | 355 +- lib/types/check_in.g.dart | 8 +- lib/types/link.dart | 2 +- lib/types/link.freezed.dart | 701 ++-- lib/types/link.g.dart | 5 +- lib/types/news.dart | 4 +- lib/types/news.freezed.dart | 871 ++-- lib/types/news.g.dart | 12 +- lib/types/notification.dart | 2 +- lib/types/notification.freezed.dart | 437 +- lib/types/notification.g.dart | 7 +- lib/types/poll.dart | 6 +- lib/types/poll.freezed.dart | 868 ++-- lib/types/poll.g.dart | 17 +- lib/types/post.dart | 16 +- lib/types/post.freezed.dart | 3703 +++++++++-------- lib/types/post.g.dart | 46 +- lib/types/realm.dart | 4 +- lib/types/realm.freezed.dart | 1053 +++-- lib/types/realm.g.dart | 12 +- lib/types/wallet.dart | 4 +- lib/types/wallet.freezed.dart | 839 ++-- lib/types/wallet.g.dart | 12 +- lib/types/websocket.dart | 2 +- lib/types/websocket.freezed.dart | 243 +- lib/types/websocket.g.dart | 8 +- lib/widgets/post/post_media_pending_list.dart | 3 +- pubspec.lock | 72 +- pubspec.yaml | 4 +- 46 files changed, 9870 insertions(+), 9990 deletions(-) diff --git a/assets/translations/en-US.json b/assets/translations/en-US.json index 4718f8a..ea3da23 100644 --- a/assets/translations/en-US.json +++ b/assets/translations/en-US.json @@ -735,5 +735,6 @@ "cacheSize": "Cache Size", "cacheDelete": "Clean Cache", "cacheDeleteDescription": "Remove the cached images and other resources from your disk, the content will be downloaded from server again.", - "cacheDeleted": "All cache has been cleaned up." + "cacheDeleted": "All cache has been cleaned up.", + "userNoDescription": "No description." } diff --git a/assets/translations/zh-CN.json b/assets/translations/zh-CN.json index ff9e43f..f86479d 100644 --- a/assets/translations/zh-CN.json +++ b/assets/translations/zh-CN.json @@ -733,5 +733,6 @@ "cacheSize": "缓存资源大小", "cacheDelete": "清除缓存", "cacheDeleteDescription": "从磁盘中移除缓存的图片和其他资源,内容将从服务器重新下载。", - "cacheDeleted": "所有缓存已被清除。" + "cacheDeleted": "所有缓存已被清除。", + "userNoDescription": "这个人很懒,没有留下什么……" } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bbb10f6..f4cc8a1 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -52,14 +52,14 @@ PODS: - Firebase/Messaging (11.8.0): - Firebase/CoreOnly - FirebaseMessaging (~> 11.8.0) - - firebase_analytics (11.4.3): + - firebase_analytics (11.4.4): - Firebase/Analytics (= 11.8.0) - firebase_core - Flutter - - firebase_core (3.12.0): + - firebase_core (3.12.1): - Firebase/CoreOnly (= 11.8.0) - Flutter - - firebase_messaging (15.2.3): + - firebase_messaging (15.2.4): - Firebase/Messaging (= 11.8.0) - firebase_core - Flutter @@ -404,9 +404,9 @@ SPEC CHECKSUMS: file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49 file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808 Firebase: d80354ed7f6df5f9aca55e9eb47cc4b634735eaf - firebase_analytics: 7ec1166af61987fa968766eb11587c562a5650ee - firebase_core: 6e223dfa350b2edceb729cea505eaaef59330682 - firebase_messaging: 07fde77ae28c08616a1d4d870450efc2b38cf40d + firebase_analytics: e3b6782e70e32b7fa18f7cd233e3201975dd86aa + firebase_core: ac395f994af4e28f6a38b59e05a88ca57abeb874 + firebase_messaging: 7e223f4ee7ca053bf4ce43748e84a6d774ec9728 FirebaseAnalytics: 4fd42def128146e24e480e89f310e3d8534ea42b FirebaseCore: 99fe0c4b44a39f37d99e6404e02009d2db5d718d FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629 diff --git a/lib/controllers/chat_message_controller.dart b/lib/controllers/chat_message_controller.dart index 686ee9a..312824e 100644 --- a/lib/controllers/chat_message_controller.dart +++ b/lib/controllers/chat_message_controller.dart @@ -184,6 +184,7 @@ class ChatMessageController extends ChangeNotifier { } else { messages.insert(0, message); } + notifyListeners(); await _applyMessage(message); notifyListeners(); diff --git a/lib/types/account.dart b/lib/types/account.dart index 6d8183c..cfea640 100644 --- a/lib/types/account.dart +++ b/lib/types/account.dart @@ -4,7 +4,7 @@ part 'account.freezed.dart'; part 'account.g.dart'; @freezed -class SnAccount with _$SnAccount { +abstract class SnAccount with _$SnAccount { const SnAccount._(); const factory SnAccount({ @@ -35,7 +35,7 @@ class SnAccount with _$SnAccount { } @freezed -class SnAccountContact with _$SnAccountContact { +abstract class SnAccountContact with _$SnAccountContact { const factory SnAccountContact({ required int accountId, required String content, @@ -54,7 +54,7 @@ class SnAccountContact with _$SnAccountContact { } @freezed -class SnAccountProfile with _$SnAccountProfile { +abstract class SnAccountProfile with _$SnAccountProfile { const factory SnAccountProfile({ required int id, required int accountId, @@ -73,7 +73,7 @@ class SnAccountProfile with _$SnAccountProfile { } @freezed -class SnRelationship with _$SnRelationship { +abstract class SnRelationship with _$SnRelationship { const factory SnRelationship({ required int id, required DateTime createdAt, @@ -92,7 +92,7 @@ class SnRelationship with _$SnRelationship { } @freezed -class SnAccountBadge with _$SnAccountBadge { +abstract class SnAccountBadge with _$SnAccountBadge { const factory SnAccountBadge({ required int id, required DateTime createdAt, @@ -108,7 +108,7 @@ class SnAccountBadge with _$SnAccountBadge { } @freezed -class SnAccountStatusInfo with _$SnAccountStatusInfo { +abstract class SnAccountStatusInfo with _$SnAccountStatusInfo { const factory SnAccountStatusInfo({ required bool isDisturbable, required bool isOnline, @@ -121,7 +121,7 @@ class SnAccountStatusInfo with _$SnAccountStatusInfo { } @freezed -class SnAbuseReport with _$SnAbuseReport { +abstract class SnAbuseReport with _$SnAbuseReport { const factory SnAbuseReport({ required int id, required DateTime createdAt, diff --git a/lib/types/account.freezed.dart b/lib/types/account.freezed.dart index e851eb4..48f74c1 100644 --- a/lib/types/account.freezed.dart +++ b/lib/types/account.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,52 +10,116 @@ part of 'account.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnAccount _$SnAccountFromJson(Map json) { - return _SnAccount.fromJson(json); -} - /// @nodoc mixin _$SnAccount { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - DateTime? get confirmedAt => throw _privateConstructorUsedError; - List? get contacts => throw _privateConstructorUsedError; - String get avatar => throw _privateConstructorUsedError; - String get banner => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get nick => throw _privateConstructorUsedError; - Map get permNodes => throw _privateConstructorUsedError; - String get language => throw _privateConstructorUsedError; - SnAccountProfile? get profile => throw _privateConstructorUsedError; - List get badges => throw _privateConstructorUsedError; - DateTime? get suspendedAt => throw _privateConstructorUsedError; - int? get affiliatedId => throw _privateConstructorUsedError; - int? get affiliatedTo => throw _privateConstructorUsedError; - int? get automatedBy => throw _privateConstructorUsedError; - int? get automatedId => throw _privateConstructorUsedError; - - /// Serializes this SnAccount to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + DateTime? get confirmedAt; + List? get contacts; + String get avatar; + String get banner; + String get description; + String get name; + String get nick; + Map get permNodes; + String get language; + SnAccountProfile? get profile; + List get badges; + DateTime? get suspendedAt; + int? get affiliatedId; + int? get affiliatedTo; + int? get automatedBy; + int? get automatedId; /// Create a copy of SnAccount /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnAccountCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnAccountCopyWithImpl(this as SnAccount, _$identity); + + /// Serializes this SnAccount to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAccount && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.confirmedAt, confirmedAt) || + other.confirmedAt == confirmedAt) && + const DeepCollectionEquality().equals(other.contacts, contacts) && + (identical(other.avatar, avatar) || other.avatar == avatar) && + (identical(other.banner, banner) || other.banner == banner) && + (identical(other.description, description) || + other.description == description) && + (identical(other.name, name) || other.name == name) && + (identical(other.nick, nick) || other.nick == nick) && + const DeepCollectionEquality().equals(other.permNodes, permNodes) && + (identical(other.language, language) || + other.language == language) && + (identical(other.profile, profile) || other.profile == profile) && + const DeepCollectionEquality().equals(other.badges, badges) && + (identical(other.suspendedAt, suspendedAt) || + other.suspendedAt == suspendedAt) && + (identical(other.affiliatedId, affiliatedId) || + other.affiliatedId == affiliatedId) && + (identical(other.affiliatedTo, affiliatedTo) || + other.affiliatedTo == affiliatedTo) && + (identical(other.automatedBy, automatedBy) || + other.automatedBy == automatedBy) && + (identical(other.automatedId, automatedId) || + other.automatedId == automatedId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + confirmedAt, + const DeepCollectionEquality().hash(contacts), + avatar, + banner, + description, + name, + nick, + const DeepCollectionEquality().hash(permNodes), + language, + profile, + const DeepCollectionEquality().hash(badges), + suspendedAt, + affiliatedId, + affiliatedTo, + automatedBy, + automatedId + ]); + + @override + String toString() { + return 'SnAccount(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, confirmedAt: $confirmedAt, contacts: $contacts, avatar: $avatar, banner: $banner, description: $description, name: $name, nick: $nick, permNodes: $permNodes, language: $language, profile: $profile, badges: $badges, suspendedAt: $suspendedAt, affiliatedId: $affiliatedId, affiliatedTo: $affiliatedTo, automatedBy: $automatedBy, automatedId: $automatedId)'; + } } /// @nodoc -abstract class $SnAccountCopyWith<$Res> { - factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) then) = - _$SnAccountCopyWithImpl<$Res, SnAccount>; +abstract mixin class $SnAccountCopyWith<$Res> { + factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = + _$SnAccountCopyWithImpl; @useResult $Res call( {int id, @@ -82,14 +147,11 @@ abstract class $SnAccountCopyWith<$Res> { } /// @nodoc -class _$SnAccountCopyWithImpl<$Res, $Val extends SnAccount> - implements $SnAccountCopyWith<$Res> { - _$SnAccountCopyWithImpl(this._value, this._then); +class _$SnAccountCopyWithImpl<$Res> implements $SnAccountCopyWith<$Res> { + _$SnAccountCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnAccount _self; + final $Res Function(SnAccount) _then; /// Create a copy of SnAccount /// with the given fields replaced by the non-null parameter values. @@ -117,88 +179,88 @@ class _$SnAccountCopyWithImpl<$Res, $Val extends SnAccount> Object? automatedBy = freezed, Object? automatedId = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, confirmedAt: freezed == confirmedAt - ? _value.confirmedAt + ? _self.confirmedAt : confirmedAt // ignore: cast_nullable_to_non_nullable as DateTime?, contacts: freezed == contacts - ? _value.contacts + ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable as List?, avatar: null == avatar - ? _value.avatar + ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String, banner: null == banner - ? _value.banner + ? _self.banner : banner // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, nick: null == nick - ? _value.nick + ? _self.nick : nick // ignore: cast_nullable_to_non_nullable as String, permNodes: null == permNodes - ? _value.permNodes + ? _self.permNodes : permNodes // ignore: cast_nullable_to_non_nullable as Map, language: null == language - ? _value.language + ? _self.language : language // ignore: cast_nullable_to_non_nullable as String, profile: freezed == profile - ? _value.profile + ? _self.profile : profile // ignore: cast_nullable_to_non_nullable as SnAccountProfile?, badges: null == badges - ? _value.badges + ? _self.badges : badges // ignore: cast_nullable_to_non_nullable as List, suspendedAt: freezed == suspendedAt - ? _value.suspendedAt + ? _self.suspendedAt : suspendedAt // ignore: cast_nullable_to_non_nullable as DateTime?, affiliatedId: freezed == affiliatedId - ? _value.affiliatedId + ? _self.affiliatedId : affiliatedId // ignore: cast_nullable_to_non_nullable as int?, affiliatedTo: freezed == affiliatedTo - ? _value.affiliatedTo + ? _self.affiliatedTo : affiliatedTo // ignore: cast_nullable_to_non_nullable as int?, automatedBy: freezed == automatedBy - ? _value.automatedBy + ? _self.automatedBy : automatedBy // ignore: cast_nullable_to_non_nullable as int?, automatedId: freezed == automatedId - ? _value.automatedId + ? _self.automatedId : automatedId // ignore: cast_nullable_to_non_nullable as int?, - ) as $Val); + )); } /// Create a copy of SnAccount @@ -206,173 +268,20 @@ class _$SnAccountCopyWithImpl<$Res, $Val extends SnAccount> @override @pragma('vm:prefer-inline') $SnAccountProfileCopyWith<$Res>? get profile { - if (_value.profile == null) { + if (_self.profile == null) { return null; } - return $SnAccountProfileCopyWith<$Res>(_value.profile!, (value) { - return _then(_value.copyWith(profile: value) as $Val); + return $SnAccountProfileCopyWith<$Res>(_self.profile!, (value) { + return _then(_self.copyWith(profile: value)); }); } } -/// @nodoc -abstract class _$$SnAccountImplCopyWith<$Res> - implements $SnAccountCopyWith<$Res> { - factory _$$SnAccountImplCopyWith( - _$SnAccountImpl value, $Res Function(_$SnAccountImpl) then) = - __$$SnAccountImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - DateTime? confirmedAt, - List? contacts, - String avatar, - String banner, - String description, - String name, - String nick, - Map permNodes, - String language, - SnAccountProfile? profile, - List badges, - DateTime? suspendedAt, - int? affiliatedId, - int? affiliatedTo, - int? automatedBy, - int? automatedId}); - - @override - $SnAccountProfileCopyWith<$Res>? get profile; -} - -/// @nodoc -class __$$SnAccountImplCopyWithImpl<$Res> - extends _$SnAccountCopyWithImpl<$Res, _$SnAccountImpl> - implements _$$SnAccountImplCopyWith<$Res> { - __$$SnAccountImplCopyWithImpl( - _$SnAccountImpl _value, $Res Function(_$SnAccountImpl) _then) - : super(_value, _then); - - /// Create a copy of SnAccount - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? confirmedAt = freezed, - Object? contacts = freezed, - Object? avatar = null, - Object? banner = null, - Object? description = null, - Object? name = null, - Object? nick = null, - Object? permNodes = null, - Object? language = null, - Object? profile = freezed, - Object? badges = null, - Object? suspendedAt = freezed, - Object? affiliatedId = freezed, - Object? affiliatedTo = freezed, - Object? automatedBy = freezed, - Object? automatedId = freezed, - }) { - return _then(_$SnAccountImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - confirmedAt: freezed == confirmedAt - ? _value.confirmedAt - : confirmedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - contacts: freezed == contacts - ? _value._contacts - : contacts // ignore: cast_nullable_to_non_nullable - as List?, - avatar: null == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String, - banner: null == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - nick: null == nick - ? _value.nick - : nick // ignore: cast_nullable_to_non_nullable - as String, - permNodes: null == permNodes - ? _value._permNodes - : permNodes // ignore: cast_nullable_to_non_nullable - as Map, - language: null == language - ? _value.language - : language // ignore: cast_nullable_to_non_nullable - as String, - profile: freezed == profile - ? _value.profile - : profile // ignore: cast_nullable_to_non_nullable - as SnAccountProfile?, - badges: null == badges - ? _value._badges - : badges // ignore: cast_nullable_to_non_nullable - as List, - suspendedAt: freezed == suspendedAt - ? _value.suspendedAt - : suspendedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - affiliatedId: freezed == affiliatedId - ? _value.affiliatedId - : affiliatedId // ignore: cast_nullable_to_non_nullable - as int?, - affiliatedTo: freezed == affiliatedTo - ? _value.affiliatedTo - : affiliatedTo // ignore: cast_nullable_to_non_nullable - as int?, - automatedBy: freezed == automatedBy - ? _value.automatedBy - : automatedBy // ignore: cast_nullable_to_non_nullable - as int?, - automatedId: freezed == automatedId - ? _value.automatedId - : automatedId // ignore: cast_nullable_to_non_nullable - as int?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnAccountImpl extends _SnAccount { - const _$SnAccountImpl( +class _SnAccount extends SnAccount { + const _SnAccount( {required this.id, required this.createdAt, required this.updatedAt, @@ -397,9 +306,8 @@ class _$SnAccountImpl extends _SnAccount { _permNodes = permNodes, _badges = badges, super._(); - - factory _$SnAccountImpl.fromJson(Map json) => - _$$SnAccountImplFromJson(json); + factory _SnAccount.fromJson(Map json) => + _$SnAccountFromJson(json); @override final int id; @@ -466,16 +374,26 @@ class _$SnAccountImpl extends _SnAccount { @override final int? automatedId; + /// Create a copy of SnAccount + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAccount(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, confirmedAt: $confirmedAt, contacts: $contacts, avatar: $avatar, banner: $banner, description: $description, name: $name, nick: $nick, permNodes: $permNodes, language: $language, profile: $profile, badges: $badges, suspendedAt: $suspendedAt, affiliatedId: $affiliatedId, affiliatedTo: $affiliatedTo, automatedBy: $automatedBy, automatedId: $automatedId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAccountCopyWith<_SnAccount> get copyWith => + __$SnAccountCopyWithImpl<_SnAccount>(this, _$identity); + + @override + Map toJson() { + return _$SnAccountToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAccountImpl && + other is _SnAccount && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -536,354 +454,207 @@ class _$SnAccountImpl extends _SnAccount { automatedId ]); - /// Create a copy of SnAccount - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAccountImplCopyWith<_$SnAccountImpl> get copyWith => - __$$SnAccountImplCopyWithImpl<_$SnAccountImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAccountImplToJson( - this, - ); + String toString() { + return 'SnAccount(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, confirmedAt: $confirmedAt, contacts: $contacts, avatar: $avatar, banner: $banner, description: $description, name: $name, nick: $nick, permNodes: $permNodes, language: $language, profile: $profile, badges: $badges, suspendedAt: $suspendedAt, affiliatedId: $affiliatedId, affiliatedTo: $affiliatedTo, automatedBy: $automatedBy, automatedId: $automatedId)'; } } -abstract class _SnAccount extends SnAccount { - const factory _SnAccount( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final DateTime? confirmedAt, - required final List? contacts, - final String avatar, - final String banner, - required final String description, - required final String name, - required final String nick, - final Map permNodes, - required final String language, - required final SnAccountProfile? profile, - final List badges, - required final DateTime? suspendedAt, - required final int? affiliatedId, - required final int? affiliatedTo, - required final int? automatedBy, - required final int? automatedId}) = _$SnAccountImpl; - const _SnAccount._() : super._(); - - factory _SnAccount.fromJson(Map json) = - _$SnAccountImpl.fromJson; +/// @nodoc +abstract mixin class _$SnAccountCopyWith<$Res> + implements $SnAccountCopyWith<$Res> { + factory _$SnAccountCopyWith( + _SnAccount value, $Res Function(_SnAccount) _then) = + __$SnAccountCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + DateTime? confirmedAt, + List? contacts, + String avatar, + String banner, + String description, + String name, + String nick, + Map permNodes, + String language, + SnAccountProfile? profile, + List badges, + DateTime? suspendedAt, + int? affiliatedId, + int? affiliatedTo, + int? automatedBy, + int? automatedId}); @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - DateTime? get confirmedAt; - @override - List? get contacts; - @override - String get avatar; - @override - String get banner; - @override - String get description; - @override - String get name; - @override - String get nick; - @override - Map get permNodes; - @override - String get language; - @override - SnAccountProfile? get profile; - @override - List get badges; - @override - DateTime? get suspendedAt; - @override - int? get affiliatedId; - @override - int? get affiliatedTo; - @override - int? get automatedBy; - @override - int? get automatedId; + $SnAccountProfileCopyWith<$Res>? get profile; +} + +/// @nodoc +class __$SnAccountCopyWithImpl<$Res> implements _$SnAccountCopyWith<$Res> { + __$SnAccountCopyWithImpl(this._self, this._then); + + final _SnAccount _self; + final $Res Function(_SnAccount) _then; /// Create a copy of SnAccount /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAccountImplCopyWith<_$SnAccountImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? confirmedAt = freezed, + Object? contacts = freezed, + Object? avatar = null, + Object? banner = null, + Object? description = null, + Object? name = null, + Object? nick = null, + Object? permNodes = null, + Object? language = null, + Object? profile = freezed, + Object? badges = null, + Object? suspendedAt = freezed, + Object? affiliatedId = freezed, + Object? affiliatedTo = freezed, + Object? automatedBy = freezed, + Object? automatedId = freezed, + }) { + return _then(_SnAccount( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + confirmedAt: freezed == confirmedAt + ? _self.confirmedAt + : confirmedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + contacts: freezed == contacts + ? _self._contacts + : contacts // ignore: cast_nullable_to_non_nullable + as List?, + avatar: null == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String, + banner: null == banner + ? _self.banner + : banner // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + nick: null == nick + ? _self.nick + : nick // ignore: cast_nullable_to_non_nullable + as String, + permNodes: null == permNodes + ? _self._permNodes + : permNodes // ignore: cast_nullable_to_non_nullable + as Map, + language: null == language + ? _self.language + : language // ignore: cast_nullable_to_non_nullable + as String, + profile: freezed == profile + ? _self.profile + : profile // ignore: cast_nullable_to_non_nullable + as SnAccountProfile?, + badges: null == badges + ? _self._badges + : badges // ignore: cast_nullable_to_non_nullable + as List, + suspendedAt: freezed == suspendedAt + ? _self.suspendedAt + : suspendedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + affiliatedId: freezed == affiliatedId + ? _self.affiliatedId + : affiliatedId // ignore: cast_nullable_to_non_nullable + as int?, + affiliatedTo: freezed == affiliatedTo + ? _self.affiliatedTo + : affiliatedTo // ignore: cast_nullable_to_non_nullable + as int?, + automatedBy: freezed == automatedBy + ? _self.automatedBy + : automatedBy // ignore: cast_nullable_to_non_nullable + as int?, + automatedId: freezed == automatedId + ? _self.automatedId + : automatedId // ignore: cast_nullable_to_non_nullable + as int?, + )); + } -SnAccountContact _$SnAccountContactFromJson(Map json) { - return _SnAccountContact.fromJson(json); + /// Create a copy of SnAccount + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountProfileCopyWith<$Res>? get profile { + if (_self.profile == null) { + return null; + } + + return $SnAccountProfileCopyWith<$Res>(_self.profile!, (value) { + return _then(_self.copyWith(profile: value)); + }); + } } /// @nodoc mixin _$SnAccountContact { - int get accountId => throw _privateConstructorUsedError; - String get content => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get id => throw _privateConstructorUsedError; - bool get isPrimary => throw _privateConstructorUsedError; - bool get isPublic => throw _privateConstructorUsedError; - int get type => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get verifiedAt => throw _privateConstructorUsedError; - - /// Serializes this SnAccountContact to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get accountId; + String get content; + DateTime get createdAt; + DateTime? get deletedAt; + int get id; + bool get isPrimary; + bool get isPublic; + int get type; + DateTime get updatedAt; + DateTime? get verifiedAt; /// Create a copy of SnAccountContact /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnAccountContactCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnAccountContactCopyWithImpl( + this as SnAccountContact, _$identity); -/// @nodoc -abstract class $SnAccountContactCopyWith<$Res> { - factory $SnAccountContactCopyWith( - SnAccountContact value, $Res Function(SnAccountContact) then) = - _$SnAccountContactCopyWithImpl<$Res, SnAccountContact>; - @useResult - $Res call( - {int accountId, - String content, - DateTime createdAt, - DateTime? deletedAt, - int id, - bool isPrimary, - bool isPublic, - int type, - DateTime updatedAt, - DateTime? verifiedAt}); -} - -/// @nodoc -class _$SnAccountContactCopyWithImpl<$Res, $Val extends SnAccountContact> - implements $SnAccountContactCopyWith<$Res> { - _$SnAccountContactCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAccountContact - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? accountId = null, - Object? content = null, - Object? createdAt = null, - Object? deletedAt = freezed, - Object? id = null, - Object? isPrimary = null, - Object? isPublic = null, - Object? type = null, - Object? updatedAt = null, - Object? verifiedAt = freezed, - }) { - return _then(_value.copyWith( - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - isPrimary: null == isPrimary - ? _value.isPrimary - : isPrimary // ignore: cast_nullable_to_non_nullable - as bool, - isPublic: null == isPublic - ? _value.isPublic - : isPublic // ignore: cast_nullable_to_non_nullable - as bool, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - verifiedAt: freezed == verifiedAt - ? _value.verifiedAt - : verifiedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnAccountContactImplCopyWith<$Res> - implements $SnAccountContactCopyWith<$Res> { - factory _$$SnAccountContactImplCopyWith(_$SnAccountContactImpl value, - $Res Function(_$SnAccountContactImpl) then) = - __$$SnAccountContactImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int accountId, - String content, - DateTime createdAt, - DateTime? deletedAt, - int id, - bool isPrimary, - bool isPublic, - int type, - DateTime updatedAt, - DateTime? verifiedAt}); -} - -/// @nodoc -class __$$SnAccountContactImplCopyWithImpl<$Res> - extends _$SnAccountContactCopyWithImpl<$Res, _$SnAccountContactImpl> - implements _$$SnAccountContactImplCopyWith<$Res> { - __$$SnAccountContactImplCopyWithImpl(_$SnAccountContactImpl _value, - $Res Function(_$SnAccountContactImpl) _then) - : super(_value, _then); - - /// Create a copy of SnAccountContact - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? accountId = null, - Object? content = null, - Object? createdAt = null, - Object? deletedAt = freezed, - Object? id = null, - Object? isPrimary = null, - Object? isPublic = null, - Object? type = null, - Object? updatedAt = null, - Object? verifiedAt = freezed, - }) { - return _then(_$SnAccountContactImpl( - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - isPrimary: null == isPrimary - ? _value.isPrimary - : isPrimary // ignore: cast_nullable_to_non_nullable - as bool, - isPublic: null == isPublic - ? _value.isPublic - : isPublic // ignore: cast_nullable_to_non_nullable - as bool, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - verifiedAt: freezed == verifiedAt - ? _value.verifiedAt - : verifiedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnAccountContactImpl implements _SnAccountContact { - const _$SnAccountContactImpl( - {required this.accountId, - required this.content, - required this.createdAt, - required this.deletedAt, - required this.id, - required this.isPrimary, - required this.isPublic, - required this.type, - required this.updatedAt, - required this.verifiedAt}); - - factory _$SnAccountContactImpl.fromJson(Map json) => - _$$SnAccountContactImplFromJson(json); - - @override - final int accountId; - @override - final String content; - @override - final DateTime createdAt; - @override - final DateTime? deletedAt; - @override - final int id; - @override - final bool isPrimary; - @override - final bool isPublic; - @override - final int type; - @override - final DateTime updatedAt; - @override - final DateTime? verifiedAt; - - @override - String toString() { - return 'SnAccountContact(accountId: $accountId, content: $content, createdAt: $createdAt, deletedAt: $deletedAt, id: $id, isPrimary: $isPrimary, isPublic: $isPublic, type: $type, updatedAt: $updatedAt, verifiedAt: $verifiedAt)'; - } + /// Serializes this SnAccountContact to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAccountContactImpl && + other is SnAccountContact && (identical(other.accountId, accountId) || other.accountId == accountId) && (identical(other.content, content) || other.content == content) && @@ -908,324 +679,307 @@ class _$SnAccountContactImpl implements _SnAccountContact { int get hashCode => Object.hash(runtimeType, accountId, content, createdAt, deletedAt, id, isPrimary, isPublic, type, updatedAt, verifiedAt); - /// Create a copy of SnAccountContact - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAccountContactImplCopyWith<_$SnAccountContactImpl> get copyWith => - __$$SnAccountContactImplCopyWithImpl<_$SnAccountContactImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAccountContactImplToJson( - this, - ); - } -} - -abstract class _SnAccountContact implements SnAccountContact { - const factory _SnAccountContact( - {required final int accountId, - required final String content, - required final DateTime createdAt, - required final DateTime? deletedAt, - required final int id, - required final bool isPrimary, - required final bool isPublic, - required final int type, - required final DateTime updatedAt, - required final DateTime? verifiedAt}) = _$SnAccountContactImpl; - - factory _SnAccountContact.fromJson(Map json) = - _$SnAccountContactImpl.fromJson; - - @override - int get accountId; - @override - String get content; - @override - DateTime get createdAt; - @override - DateTime? get deletedAt; - @override - int get id; - @override - bool get isPrimary; - @override - bool get isPublic; - @override - int get type; - @override - DateTime get updatedAt; - @override - DateTime? get verifiedAt; - - /// Create a copy of SnAccountContact - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAccountContactImplCopyWith<_$SnAccountContactImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAccountProfile _$SnAccountProfileFromJson(Map json) { - return _SnAccountProfile.fromJson(json); -} - -/// @nodoc -mixin _$SnAccountProfile { - int get id => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - DateTime? get birthday => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get experience => throw _privateConstructorUsedError; - String get firstName => throw _privateConstructorUsedError; - String get lastName => throw _privateConstructorUsedError; - DateTime? get lastSeenAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - - /// Serializes this SnAccountProfile to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnAccountProfile - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnAccountProfileCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAccountProfileCopyWith<$Res> { - factory $SnAccountProfileCopyWith( - SnAccountProfile value, $Res Function(SnAccountProfile) then) = - _$SnAccountProfileCopyWithImpl<$Res, SnAccountProfile>; - @useResult - $Res call( - {int id, - int accountId, - DateTime? birthday, - DateTime createdAt, - DateTime? deletedAt, - int experience, - String firstName, - String lastName, - DateTime? lastSeenAt, - DateTime updatedAt}); -} - -/// @nodoc -class _$SnAccountProfileCopyWithImpl<$Res, $Val extends SnAccountProfile> - implements $SnAccountProfileCopyWith<$Res> { - _$SnAccountProfileCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAccountProfile - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? accountId = null, - Object? birthday = freezed, - Object? createdAt = null, - Object? deletedAt = freezed, - Object? experience = null, - Object? firstName = null, - Object? lastName = null, - Object? lastSeenAt = freezed, - Object? updatedAt = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - experience: null == experience - ? _value.experience - : experience // ignore: cast_nullable_to_non_nullable - as int, - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - lastSeenAt: freezed == lastSeenAt - ? _value.lastSeenAt - : lastSeenAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + String toString() { + return 'SnAccountContact(accountId: $accountId, content: $content, createdAt: $createdAt, deletedAt: $deletedAt, id: $id, isPrimary: $isPrimary, isPublic: $isPublic, type: $type, updatedAt: $updatedAt, verifiedAt: $verifiedAt)'; } } /// @nodoc -abstract class _$$SnAccountProfileImplCopyWith<$Res> - implements $SnAccountProfileCopyWith<$Res> { - factory _$$SnAccountProfileImplCopyWith(_$SnAccountProfileImpl value, - $Res Function(_$SnAccountProfileImpl) then) = - __$$SnAccountProfileImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAccountContactCopyWith<$Res> { + factory $SnAccountContactCopyWith( + SnAccountContact value, $Res Function(SnAccountContact) _then) = + _$SnAccountContactCopyWithImpl; @useResult $Res call( - {int id, - int accountId, - DateTime? birthday, + {int accountId, + String content, DateTime createdAt, DateTime? deletedAt, - int experience, - String firstName, - String lastName, - DateTime? lastSeenAt, - DateTime updatedAt}); + int id, + bool isPrimary, + bool isPublic, + int type, + DateTime updatedAt, + DateTime? verifiedAt}); } /// @nodoc -class __$$SnAccountProfileImplCopyWithImpl<$Res> - extends _$SnAccountProfileCopyWithImpl<$Res, _$SnAccountProfileImpl> - implements _$$SnAccountProfileImplCopyWith<$Res> { - __$$SnAccountProfileImplCopyWithImpl(_$SnAccountProfileImpl _value, - $Res Function(_$SnAccountProfileImpl) _then) - : super(_value, _then); +class _$SnAccountContactCopyWithImpl<$Res> + implements $SnAccountContactCopyWith<$Res> { + _$SnAccountContactCopyWithImpl(this._self, this._then); - /// Create a copy of SnAccountProfile + final SnAccountContact _self; + final $Res Function(SnAccountContact) _then; + + /// Create a copy of SnAccountContact /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, Object? accountId = null, - Object? birthday = freezed, + Object? content = null, Object? createdAt = null, Object? deletedAt = freezed, - Object? experience = null, - Object? firstName = null, - Object? lastName = null, - Object? lastSeenAt = freezed, + Object? id = null, + Object? isPrimary = null, + Object? isPublic = null, + Object? type = null, Object? updatedAt = null, + Object? verifiedAt = freezed, }) { - return _then(_$SnAccountProfileImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, + return _then(_self.copyWith( accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, - birthday: freezed == birthday - ? _value.birthday - : birthday // ignore: cast_nullable_to_non_nullable - as DateTime?, + content: null == content + ? _self.content + : content // ignore: cast_nullable_to_non_nullable + as String, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, - experience: null == experience - ? _value.experience - : experience // ignore: cast_nullable_to_non_nullable + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + isPrimary: null == isPrimary + ? _self.isPrimary + : isPrimary // ignore: cast_nullable_to_non_nullable + as bool, + isPublic: null == isPublic + ? _self.isPublic + : isPublic // ignore: cast_nullable_to_non_nullable + as bool, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable as int, - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - lastSeenAt: freezed == lastSeenAt - ? _value.lastSeenAt - : lastSeenAt // ignore: cast_nullable_to_non_nullable - as DateTime?, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, + verifiedAt: freezed == verifiedAt + ? _self.verifiedAt + : verifiedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, )); } } /// @nodoc @JsonSerializable() -class _$SnAccountProfileImpl implements _SnAccountProfile { - const _$SnAccountProfileImpl( - {required this.id, - required this.accountId, - required this.birthday, +class _SnAccountContact implements SnAccountContact { + const _SnAccountContact( + {required this.accountId, + required this.content, required this.createdAt, required this.deletedAt, - required this.experience, - required this.firstName, - required this.lastName, - required this.lastSeenAt, - required this.updatedAt}); + required this.id, + required this.isPrimary, + required this.isPublic, + required this.type, + required this.updatedAt, + required this.verifiedAt}); + factory _SnAccountContact.fromJson(Map json) => + _$SnAccountContactFromJson(json); - factory _$SnAccountProfileImpl.fromJson(Map json) => - _$$SnAccountProfileImplFromJson(json); - - @override - final int id; @override final int accountId; @override - final DateTime? birthday; + final String content; @override final DateTime createdAt; @override final DateTime? deletedAt; @override - final int experience; + final int id; @override - final String firstName; + final bool isPrimary; @override - final String lastName; + final bool isPublic; @override - final DateTime? lastSeenAt; + final int type; @override final DateTime updatedAt; + @override + final DateTime? verifiedAt; + + /// Create a copy of SnAccountContact + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAccountContactCopyWith<_SnAccountContact> get copyWith => + __$SnAccountContactCopyWithImpl<_SnAccountContact>(this, _$identity); @override - String toString() { - return 'SnAccountProfile(id: $id, accountId: $accountId, birthday: $birthday, createdAt: $createdAt, deletedAt: $deletedAt, experience: $experience, firstName: $firstName, lastName: $lastName, lastSeenAt: $lastSeenAt, updatedAt: $updatedAt)'; + Map toJson() { + return _$SnAccountContactToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAccountProfileImpl && + other is _SnAccountContact && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.content, content) || other.content == content) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.id, id) || other.id == id) && + (identical(other.isPrimary, isPrimary) || + other.isPrimary == isPrimary) && + (identical(other.isPublic, isPublic) || + other.isPublic == isPublic) && + (identical(other.type, type) || other.type == type) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.verifiedAt, verifiedAt) || + other.verifiedAt == verifiedAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, accountId, content, createdAt, + deletedAt, id, isPrimary, isPublic, type, updatedAt, verifiedAt); + + @override + String toString() { + return 'SnAccountContact(accountId: $accountId, content: $content, createdAt: $createdAt, deletedAt: $deletedAt, id: $id, isPrimary: $isPrimary, isPublic: $isPublic, type: $type, updatedAt: $updatedAt, verifiedAt: $verifiedAt)'; + } +} + +/// @nodoc +abstract mixin class _$SnAccountContactCopyWith<$Res> + implements $SnAccountContactCopyWith<$Res> { + factory _$SnAccountContactCopyWith( + _SnAccountContact value, $Res Function(_SnAccountContact) _then) = + __$SnAccountContactCopyWithImpl; + @override + @useResult + $Res call( + {int accountId, + String content, + DateTime createdAt, + DateTime? deletedAt, + int id, + bool isPrimary, + bool isPublic, + int type, + DateTime updatedAt, + DateTime? verifiedAt}); +} + +/// @nodoc +class __$SnAccountContactCopyWithImpl<$Res> + implements _$SnAccountContactCopyWith<$Res> { + __$SnAccountContactCopyWithImpl(this._self, this._then); + + final _SnAccountContact _self; + final $Res Function(_SnAccountContact) _then; + + /// Create a copy of SnAccountContact + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? accountId = null, + Object? content = null, + Object? createdAt = null, + Object? deletedAt = freezed, + Object? id = null, + Object? isPrimary = null, + Object? isPublic = null, + Object? type = null, + Object? updatedAt = null, + Object? verifiedAt = freezed, + }) { + return _then(_SnAccountContact( + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + content: null == content + ? _self.content + : content // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + isPrimary: null == isPrimary + ? _self.isPrimary + : isPrimary // ignore: cast_nullable_to_non_nullable + as bool, + isPublic: null == isPublic + ? _self.isPublic + : isPublic // ignore: cast_nullable_to_non_nullable + as bool, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as int, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + verifiedAt: freezed == verifiedAt + ? _self.verifiedAt + : verifiedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + )); + } +} + +/// @nodoc +mixin _$SnAccountProfile { + int get id; + int get accountId; + DateTime? get birthday; + DateTime get createdAt; + DateTime? get deletedAt; + int get experience; + String get firstName; + String get lastName; + DateTime? get lastSeenAt; + DateTime get updatedAt; + + /// Create a copy of SnAccountProfile + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnAccountProfileCopyWith get copyWith => + _$SnAccountProfileCopyWithImpl( + this as SnAccountProfile, _$identity); + + /// Serializes this SnAccountProfile to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAccountProfile && (identical(other.id, id) || other.id == id) && (identical(other.accountId, accountId) || other.accountId == accountId) && @@ -1262,100 +1016,362 @@ class _$SnAccountProfileImpl implements _SnAccountProfile { lastSeenAt, updatedAt); - /// Create a copy of SnAccountProfile - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAccountProfileImplCopyWith<_$SnAccountProfileImpl> get copyWith => - __$$SnAccountProfileImplCopyWithImpl<_$SnAccountProfileImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAccountProfileImplToJson( - this, - ); + String toString() { + return 'SnAccountProfile(id: $id, accountId: $accountId, birthday: $birthday, createdAt: $createdAt, deletedAt: $deletedAt, experience: $experience, firstName: $firstName, lastName: $lastName, lastSeenAt: $lastSeenAt, updatedAt: $updatedAt)'; } } -abstract class _SnAccountProfile implements SnAccountProfile { - const factory _SnAccountProfile( - {required final int id, - required final int accountId, - required final DateTime? birthday, - required final DateTime createdAt, - required final DateTime? deletedAt, - required final int experience, - required final String firstName, - required final String lastName, - required final DateTime? lastSeenAt, - required final DateTime updatedAt}) = _$SnAccountProfileImpl; +/// @nodoc +abstract mixin class $SnAccountProfileCopyWith<$Res> { + factory $SnAccountProfileCopyWith( + SnAccountProfile value, $Res Function(SnAccountProfile) _then) = + _$SnAccountProfileCopyWithImpl; + @useResult + $Res call( + {int id, + int accountId, + DateTime? birthday, + DateTime createdAt, + DateTime? deletedAt, + int experience, + String firstName, + String lastName, + DateTime? lastSeenAt, + DateTime updatedAt}); +} - factory _SnAccountProfile.fromJson(Map json) = - _$SnAccountProfileImpl.fromJson; +/// @nodoc +class _$SnAccountProfileCopyWithImpl<$Res> + implements $SnAccountProfileCopyWith<$Res> { + _$SnAccountProfileCopyWithImpl(this._self, this._then); + + final SnAccountProfile _self; + final $Res Function(SnAccountProfile) _then; + + /// Create a copy of SnAccountProfile + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? accountId = null, + Object? birthday = freezed, + Object? createdAt = null, + Object? deletedAt = freezed, + Object? experience = null, + Object? firstName = null, + Object? lastName = null, + Object? lastSeenAt = freezed, + Object? updatedAt = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + birthday: freezed == birthday + ? _self.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + experience: null == experience + ? _self.experience + : experience // ignore: cast_nullable_to_non_nullable + as int, + firstName: null == firstName + ? _self.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: null == lastName + ? _self.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + lastSeenAt: freezed == lastSeenAt + ? _self.lastSeenAt + : lastSeenAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnAccountProfile implements SnAccountProfile { + const _SnAccountProfile( + {required this.id, + required this.accountId, + required this.birthday, + required this.createdAt, + required this.deletedAt, + required this.experience, + required this.firstName, + required this.lastName, + required this.lastSeenAt, + required this.updatedAt}); + factory _SnAccountProfile.fromJson(Map json) => + _$SnAccountProfileFromJson(json); @override - int get id; + final int id; @override - int get accountId; + final int accountId; @override - DateTime? get birthday; + final DateTime? birthday; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - int get experience; + final int experience; @override - String get firstName; + final String firstName; @override - String get lastName; + final String lastName; @override - DateTime? get lastSeenAt; + final DateTime? lastSeenAt; @override - DateTime get updatedAt; + final DateTime updatedAt; /// Create a copy of SnAccountProfile /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAccountProfileImplCopyWith<_$SnAccountProfileImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnAccountProfileCopyWith<_SnAccountProfile> get copyWith => + __$SnAccountProfileCopyWithImpl<_SnAccountProfile>(this, _$identity); + + @override + Map toJson() { + return _$SnAccountProfileToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnAccountProfile && + (identical(other.id, id) || other.id == id) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.birthday, birthday) || + other.birthday == birthday) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.experience, experience) || + other.experience == experience) && + (identical(other.firstName, firstName) || + other.firstName == firstName) && + (identical(other.lastName, lastName) || + other.lastName == lastName) && + (identical(other.lastSeenAt, lastSeenAt) || + other.lastSeenAt == lastSeenAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + accountId, + birthday, + createdAt, + deletedAt, + experience, + firstName, + lastName, + lastSeenAt, + updatedAt); + + @override + String toString() { + return 'SnAccountProfile(id: $id, accountId: $accountId, birthday: $birthday, createdAt: $createdAt, deletedAt: $deletedAt, experience: $experience, firstName: $firstName, lastName: $lastName, lastSeenAt: $lastSeenAt, updatedAt: $updatedAt)'; + } } -SnRelationship _$SnRelationshipFromJson(Map json) { - return _SnRelationship.fromJson(json); +/// @nodoc +abstract mixin class _$SnAccountProfileCopyWith<$Res> + implements $SnAccountProfileCopyWith<$Res> { + factory _$SnAccountProfileCopyWith( + _SnAccountProfile value, $Res Function(_SnAccountProfile) _then) = + __$SnAccountProfileCopyWithImpl; + @override + @useResult + $Res call( + {int id, + int accountId, + DateTime? birthday, + DateTime createdAt, + DateTime? deletedAt, + int experience, + String firstName, + String lastName, + DateTime? lastSeenAt, + DateTime updatedAt}); +} + +/// @nodoc +class __$SnAccountProfileCopyWithImpl<$Res> + implements _$SnAccountProfileCopyWith<$Res> { + __$SnAccountProfileCopyWithImpl(this._self, this._then); + + final _SnAccountProfile _self; + final $Res Function(_SnAccountProfile) _then; + + /// Create a copy of SnAccountProfile + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? accountId = null, + Object? birthday = freezed, + Object? createdAt = null, + Object? deletedAt = freezed, + Object? experience = null, + Object? firstName = null, + Object? lastName = null, + Object? lastSeenAt = freezed, + Object? updatedAt = null, + }) { + return _then(_SnAccountProfile( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + birthday: freezed == birthday + ? _self.birthday + : birthday // ignore: cast_nullable_to_non_nullable + as DateTime?, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + experience: null == experience + ? _self.experience + : experience // ignore: cast_nullable_to_non_nullable + as int, + firstName: null == firstName + ? _self.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: null == lastName + ? _self.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + lastSeenAt: freezed == lastSeenAt + ? _self.lastSeenAt + : lastSeenAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + )); + } } /// @nodoc mixin _$SnRelationship { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - int get relatedId => throw _privateConstructorUsedError; - SnAccount? get account => throw _privateConstructorUsedError; - SnAccount? get related => throw _privateConstructorUsedError; - int get status => throw _privateConstructorUsedError; - Map get permNodes => throw _privateConstructorUsedError; - - /// Serializes this SnRelationship to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get accountId; + int get relatedId; + SnAccount? get account; + SnAccount? get related; + int get status; + Map get permNodes; /// Create a copy of SnRelationship /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnRelationshipCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnRelationshipCopyWithImpl( + this as SnRelationship, _$identity); + + /// Serializes this SnRelationship to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnRelationship && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.relatedId, relatedId) || + other.relatedId == relatedId) && + (identical(other.account, account) || other.account == account) && + (identical(other.related, related) || other.related == related) && + (identical(other.status, status) || other.status == status) && + const DeepCollectionEquality().equals(other.permNodes, permNodes)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + accountId, + relatedId, + account, + related, + status, + const DeepCollectionEquality().hash(permNodes)); + + @override + String toString() { + return 'SnRelationship(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, accountId: $accountId, relatedId: $relatedId, account: $account, related: $related, status: $status, permNodes: $permNodes)'; + } } /// @nodoc -abstract class $SnRelationshipCopyWith<$Res> { +abstract mixin class $SnRelationshipCopyWith<$Res> { factory $SnRelationshipCopyWith( - SnRelationship value, $Res Function(SnRelationship) then) = - _$SnRelationshipCopyWithImpl<$Res, SnRelationship>; + SnRelationship value, $Res Function(SnRelationship) _then) = + _$SnRelationshipCopyWithImpl; @useResult $Res call( {int id, @@ -1374,14 +1390,12 @@ abstract class $SnRelationshipCopyWith<$Res> { } /// @nodoc -class _$SnRelationshipCopyWithImpl<$Res, $Val extends SnRelationship> +class _$SnRelationshipCopyWithImpl<$Res> implements $SnRelationshipCopyWith<$Res> { - _$SnRelationshipCopyWithImpl(this._value, this._then); + _$SnRelationshipCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnRelationship _self; + final $Res Function(SnRelationship) _then; /// Create a copy of SnRelationship /// with the given fields replaced by the non-null parameter values. @@ -1399,48 +1413,48 @@ class _$SnRelationshipCopyWithImpl<$Res, $Val extends SnRelationship> Object? status = null, Object? permNodes = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, relatedId: null == relatedId - ? _value.relatedId + ? _self.relatedId : relatedId // ignore: cast_nullable_to_non_nullable as int, account: freezed == account - ? _value.account + ? _self.account : account // ignore: cast_nullable_to_non_nullable as SnAccount?, related: freezed == related - ? _value.related + ? _self.related : related // ignore: cast_nullable_to_non_nullable as SnAccount?, status: null == status - ? _value.status + ? _self.status : status // ignore: cast_nullable_to_non_nullable as int, permNodes: null == permNodes - ? _value.permNodes + ? _self.permNodes : permNodes // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of SnRelationship @@ -1448,12 +1462,12 @@ class _$SnRelationshipCopyWithImpl<$Res, $Val extends SnRelationship> @override @pragma('vm:prefer-inline') $SnAccountCopyWith<$Res>? get account { - if (_value.account == null) { + if (_self.account == null) { return null; } - return $SnAccountCopyWith<$Res>(_value.account!, (value) { - return _then(_value.copyWith(account: value) as $Val); + return $SnAccountCopyWith<$Res>(_self.account!, (value) { + return _then(_self.copyWith(account: value)); }); } @@ -1462,115 +1476,20 @@ class _$SnRelationshipCopyWithImpl<$Res, $Val extends SnRelationship> @override @pragma('vm:prefer-inline') $SnAccountCopyWith<$Res>? get related { - if (_value.related == null) { + if (_self.related == null) { return null; } - return $SnAccountCopyWith<$Res>(_value.related!, (value) { - return _then(_value.copyWith(related: value) as $Val); + return $SnAccountCopyWith<$Res>(_self.related!, (value) { + return _then(_self.copyWith(related: value)); }); } } -/// @nodoc -abstract class _$$SnRelationshipImplCopyWith<$Res> - implements $SnRelationshipCopyWith<$Res> { - factory _$$SnRelationshipImplCopyWith(_$SnRelationshipImpl value, - $Res Function(_$SnRelationshipImpl) then) = - __$$SnRelationshipImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int accountId, - int relatedId, - SnAccount? account, - SnAccount? related, - int status, - Map permNodes}); - - @override - $SnAccountCopyWith<$Res>? get account; - @override - $SnAccountCopyWith<$Res>? get related; -} - -/// @nodoc -class __$$SnRelationshipImplCopyWithImpl<$Res> - extends _$SnRelationshipCopyWithImpl<$Res, _$SnRelationshipImpl> - implements _$$SnRelationshipImplCopyWith<$Res> { - __$$SnRelationshipImplCopyWithImpl( - _$SnRelationshipImpl _value, $Res Function(_$SnRelationshipImpl) _then) - : super(_value, _then); - - /// Create a copy of SnRelationship - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? accountId = null, - Object? relatedId = null, - Object? account = freezed, - Object? related = freezed, - Object? status = null, - Object? permNodes = null, - }) { - return _then(_$SnRelationshipImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - relatedId: null == relatedId - ? _value.relatedId - : relatedId // ignore: cast_nullable_to_non_nullable - as int, - account: freezed == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as SnAccount?, - related: freezed == related - ? _value.related - : related // ignore: cast_nullable_to_non_nullable - as SnAccount?, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as int, - permNodes: null == permNodes - ? _value._permNodes - : permNodes // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnRelationshipImpl implements _SnRelationship { - const _$SnRelationshipImpl( +class _SnRelationship implements SnRelationship { + const _SnRelationship( {required this.id, required this.createdAt, required this.updatedAt, @@ -1582,9 +1501,8 @@ class _$SnRelationshipImpl implements _SnRelationship { required this.status, final Map permNodes = const {}}) : _permNodes = permNodes; - - factory _$SnRelationshipImpl.fromJson(Map json) => - _$$SnRelationshipImplFromJson(json); + factory _SnRelationship.fromJson(Map json) => + _$SnRelationshipFromJson(json); @override final int id; @@ -1613,16 +1531,26 @@ class _$SnRelationshipImpl implements _SnRelationship { return EqualUnmodifiableMapView(_permNodes); } + /// Create a copy of SnRelationship + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnRelationship(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, accountId: $accountId, relatedId: $relatedId, account: $account, related: $related, status: $status, permNodes: $permNodes)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnRelationshipCopyWith<_SnRelationship> get copyWith => + __$SnRelationshipCopyWithImpl<_SnRelationship>(this, _$identity); + + @override + Map toJson() { + return _$SnRelationshipToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnRelationshipImpl && + other is _SnRelationship && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1656,171 +1584,196 @@ class _$SnRelationshipImpl implements _SnRelationship { status, const DeepCollectionEquality().hash(_permNodes)); - /// Create a copy of SnRelationship - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnRelationshipImplCopyWith<_$SnRelationshipImpl> get copyWith => - __$$SnRelationshipImplCopyWithImpl<_$SnRelationshipImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnRelationshipImplToJson( - this, - ); + String toString() { + return 'SnRelationship(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, accountId: $accountId, relatedId: $relatedId, account: $account, related: $related, status: $status, permNodes: $permNodes)'; } } -abstract class _SnRelationship implements SnRelationship { - const factory _SnRelationship( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int accountId, - required final int relatedId, - required final SnAccount? account, - required final SnAccount? related, - required final int status, - final Map permNodes}) = _$SnRelationshipImpl; - - factory _SnRelationship.fromJson(Map json) = - _$SnRelationshipImpl.fromJson; +/// @nodoc +abstract mixin class _$SnRelationshipCopyWith<$Res> + implements $SnRelationshipCopyWith<$Res> { + factory _$SnRelationshipCopyWith( + _SnRelationship value, $Res Function(_SnRelationship) _then) = + __$SnRelationshipCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int accountId, + int relatedId, + SnAccount? account, + SnAccount? related, + int status, + Map permNodes}); @override - int get id; + $SnAccountCopyWith<$Res>? get account; @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get accountId; - @override - int get relatedId; - @override - SnAccount? get account; - @override - SnAccount? get related; - @override - int get status; - @override - Map get permNodes; + $SnAccountCopyWith<$Res>? get related; +} + +/// @nodoc +class __$SnRelationshipCopyWithImpl<$Res> + implements _$SnRelationshipCopyWith<$Res> { + __$SnRelationshipCopyWithImpl(this._self, this._then); + + final _SnRelationship _self; + final $Res Function(_SnRelationship) _then; /// Create a copy of SnRelationship /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnRelationshipImplCopyWith<_$SnRelationshipImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? accountId = null, + Object? relatedId = null, + Object? account = freezed, + Object? related = freezed, + Object? status = null, + Object? permNodes = null, + }) { + return _then(_SnRelationship( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + relatedId: null == relatedId + ? _self.relatedId + : relatedId // ignore: cast_nullable_to_non_nullable + as int, + account: freezed == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as SnAccount?, + related: freezed == related + ? _self.related + : related // ignore: cast_nullable_to_non_nullable + as SnAccount?, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as int, + permNodes: null == permNodes + ? _self._permNodes + : permNodes // ignore: cast_nullable_to_non_nullable + as Map, + )); + } -SnAccountBadge _$SnAccountBadgeFromJson(Map json) { - return _SnAccountBadge.fromJson(json); + /// Create a copy of SnRelationship + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res>? get account { + if (_self.account == null) { + return null; + } + + return $SnAccountCopyWith<$Res>(_self.account!, (value) { + return _then(_self.copyWith(account: value)); + }); + } + + /// Create a copy of SnRelationship + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res>? get related { + if (_self.related == null) { + return null; + } + + return $SnAccountCopyWith<$Res>(_self.related!, (value) { + return _then(_self.copyWith(related: value)); + }); + } } /// @nodoc mixin _$SnAccountBadge { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - Map get metadata => throw _privateConstructorUsedError; - - /// Serializes this SnAccountBadge to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + dynamic get deletedAt; + String get type; + int get accountId; + Map get metadata; /// Create a copy of SnAccountBadge /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAccountBadgeCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAccountBadgeCopyWith<$Res> { - factory $SnAccountBadgeCopyWith( - SnAccountBadge value, $Res Function(SnAccountBadge) then) = - _$SnAccountBadgeCopyWithImpl<$Res, SnAccountBadge>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String type, - int accountId, - Map metadata}); -} - -/// @nodoc -class _$SnAccountBadgeCopyWithImpl<$Res, $Val extends SnAccountBadge> - implements $SnAccountBadgeCopyWith<$Res> { - _$SnAccountBadgeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAccountBadge - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAccountBadgeCopyWith get copyWith => + _$SnAccountBadgeCopyWithImpl( + this as SnAccountBadge, _$identity); + + /// Serializes this SnAccountBadge to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? type = null, - Object? accountId = null, - Object? metadata = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - metadata: null == metadata - ? _value.metadata - : metadata // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAccountBadge && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.type, type) || other.type == type) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + const DeepCollectionEquality().equals(other.metadata, metadata)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + type, + accountId, + const DeepCollectionEquality().hash(metadata)); + + @override + String toString() { + return 'SnAccountBadge(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, accountId: $accountId, metadata: $metadata)'; } } /// @nodoc -abstract class _$$SnAccountBadgeImplCopyWith<$Res> - implements $SnAccountBadgeCopyWith<$Res> { - factory _$$SnAccountBadgeImplCopyWith(_$SnAccountBadgeImpl value, - $Res Function(_$SnAccountBadgeImpl) then) = - __$$SnAccountBadgeImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAccountBadgeCopyWith<$Res> { + factory $SnAccountBadgeCopyWith( + SnAccountBadge value, $Res Function(SnAccountBadge) _then) = + _$SnAccountBadgeCopyWithImpl; @useResult $Res call( {int id, @@ -1833,12 +1786,12 @@ abstract class _$$SnAccountBadgeImplCopyWith<$Res> } /// @nodoc -class __$$SnAccountBadgeImplCopyWithImpl<$Res> - extends _$SnAccountBadgeCopyWithImpl<$Res, _$SnAccountBadgeImpl> - implements _$$SnAccountBadgeImplCopyWith<$Res> { - __$$SnAccountBadgeImplCopyWithImpl( - _$SnAccountBadgeImpl _value, $Res Function(_$SnAccountBadgeImpl) _then) - : super(_value, _then); +class _$SnAccountBadgeCopyWithImpl<$Res> + implements $SnAccountBadgeCopyWith<$Res> { + _$SnAccountBadgeCopyWithImpl(this._self, this._then); + + final SnAccountBadge _self; + final $Res Function(SnAccountBadge) _then; /// Create a copy of SnAccountBadge /// with the given fields replaced by the non-null parameter values. @@ -1853,33 +1806,33 @@ class __$$SnAccountBadgeImplCopyWithImpl<$Res> Object? accountId = null, Object? metadata = null, }) { - return _then(_$SnAccountBadgeImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as dynamic, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, metadata: null == metadata - ? _value._metadata + ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map, )); @@ -1888,8 +1841,8 @@ class __$$SnAccountBadgeImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAccountBadgeImpl implements _SnAccountBadge { - const _$SnAccountBadgeImpl( +class _SnAccountBadge implements SnAccountBadge { + const _SnAccountBadge( {required this.id, required this.createdAt, required this.updatedAt, @@ -1898,9 +1851,8 @@ class _$SnAccountBadgeImpl implements _SnAccountBadge { required this.accountId, final Map metadata = const {}}) : _metadata = metadata; - - factory _$SnAccountBadgeImpl.fromJson(Map json) => - _$$SnAccountBadgeImplFromJson(json); + factory _SnAccountBadge.fromJson(Map json) => + _$SnAccountBadgeFromJson(json); @override final int id; @@ -1923,16 +1875,26 @@ class _$SnAccountBadgeImpl implements _SnAccountBadge { return EqualUnmodifiableMapView(_metadata); } + /// Create a copy of SnAccountBadge + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAccountBadge(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, accountId: $accountId, metadata: $metadata)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAccountBadgeCopyWith<_SnAccountBadge> get copyWith => + __$SnAccountBadgeCopyWithImpl<_SnAccountBadge>(this, _$identity); + + @override + Map toJson() { + return _$SnAccountBadgeToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAccountBadgeImpl && + other is _SnAccountBadge && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1957,219 +1919,107 @@ class _$SnAccountBadgeImpl implements _SnAccountBadge { accountId, const DeepCollectionEquality().hash(_metadata)); - /// Create a copy of SnAccountBadge - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAccountBadgeImplCopyWith<_$SnAccountBadgeImpl> get copyWith => - __$$SnAccountBadgeImplCopyWithImpl<_$SnAccountBadgeImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAccountBadgeImplToJson( - this, - ); - } -} - -abstract class _SnAccountBadge implements SnAccountBadge { - const factory _SnAccountBadge( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final String type, - required final int accountId, - final Map metadata}) = _$SnAccountBadgeImpl; - - factory _SnAccountBadge.fromJson(Map json) = - _$SnAccountBadgeImpl.fromJson; - - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - dynamic get deletedAt; - @override - String get type; - @override - int get accountId; - @override - Map get metadata; - - /// Create a copy of SnAccountBadge - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAccountBadgeImplCopyWith<_$SnAccountBadgeImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAccountStatusInfo _$SnAccountStatusInfoFromJson(Map json) { - return _SnAccountStatusInfo.fromJson(json); -} - -/// @nodoc -mixin _$SnAccountStatusInfo { - bool get isDisturbable => throw _privateConstructorUsedError; - bool get isOnline => throw _privateConstructorUsedError; - DateTime? get lastSeenAt => throw _privateConstructorUsedError; - dynamic get status => throw _privateConstructorUsedError; - - /// Serializes this SnAccountStatusInfo to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnAccountStatusInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnAccountStatusInfoCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAccountStatusInfoCopyWith<$Res> { - factory $SnAccountStatusInfoCopyWith( - SnAccountStatusInfo value, $Res Function(SnAccountStatusInfo) then) = - _$SnAccountStatusInfoCopyWithImpl<$Res, SnAccountStatusInfo>; - @useResult - $Res call( - {bool isDisturbable, - bool isOnline, - DateTime? lastSeenAt, - dynamic status}); -} - -/// @nodoc -class _$SnAccountStatusInfoCopyWithImpl<$Res, $Val extends SnAccountStatusInfo> - implements $SnAccountStatusInfoCopyWith<$Res> { - _$SnAccountStatusInfoCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAccountStatusInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isDisturbable = null, - Object? isOnline = null, - Object? lastSeenAt = freezed, - Object? status = freezed, - }) { - return _then(_value.copyWith( - isDisturbable: null == isDisturbable - ? _value.isDisturbable - : isDisturbable // ignore: cast_nullable_to_non_nullable - as bool, - isOnline: null == isOnline - ? _value.isOnline - : isOnline // ignore: cast_nullable_to_non_nullable - as bool, - lastSeenAt: freezed == lastSeenAt - ? _value.lastSeenAt - : lastSeenAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - status: freezed == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + String toString() { + return 'SnAccountBadge(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, accountId: $accountId, metadata: $metadata)'; } } /// @nodoc -abstract class _$$SnAccountStatusInfoImplCopyWith<$Res> - implements $SnAccountStatusInfoCopyWith<$Res> { - factory _$$SnAccountStatusInfoImplCopyWith(_$SnAccountStatusInfoImpl value, - $Res Function(_$SnAccountStatusInfoImpl) then) = - __$$SnAccountStatusInfoImplCopyWithImpl<$Res>; +abstract mixin class _$SnAccountBadgeCopyWith<$Res> + implements $SnAccountBadgeCopyWith<$Res> { + factory _$SnAccountBadgeCopyWith( + _SnAccountBadge value, $Res Function(_SnAccountBadge) _then) = + __$SnAccountBadgeCopyWithImpl; @override @useResult $Res call( - {bool isDisturbable, - bool isOnline, - DateTime? lastSeenAt, - dynamic status}); + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String type, + int accountId, + Map metadata}); } /// @nodoc -class __$$SnAccountStatusInfoImplCopyWithImpl<$Res> - extends _$SnAccountStatusInfoCopyWithImpl<$Res, _$SnAccountStatusInfoImpl> - implements _$$SnAccountStatusInfoImplCopyWith<$Res> { - __$$SnAccountStatusInfoImplCopyWithImpl(_$SnAccountStatusInfoImpl _value, - $Res Function(_$SnAccountStatusInfoImpl) _then) - : super(_value, _then); +class __$SnAccountBadgeCopyWithImpl<$Res> + implements _$SnAccountBadgeCopyWith<$Res> { + __$SnAccountBadgeCopyWithImpl(this._self, this._then); - /// Create a copy of SnAccountStatusInfo + final _SnAccountBadge _self; + final $Res Function(_SnAccountBadge) _then; + + /// Create a copy of SnAccountBadge /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? isDisturbable = null, - Object? isOnline = null, - Object? lastSeenAt = freezed, - Object? status = freezed, + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? type = null, + Object? accountId = null, + Object? metadata = null, }) { - return _then(_$SnAccountStatusInfoImpl( - isDisturbable: null == isDisturbable - ? _value.isDisturbable - : isDisturbable // ignore: cast_nullable_to_non_nullable - as bool, - isOnline: null == isOnline - ? _value.isOnline - : isOnline // ignore: cast_nullable_to_non_nullable - as bool, - lastSeenAt: freezed == lastSeenAt - ? _value.lastSeenAt - : lastSeenAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - status: freezed == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable + return _then(_SnAccountBadge( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable as dynamic, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + metadata: null == metadata + ? _self._metadata + : metadata // ignore: cast_nullable_to_non_nullable + as Map, )); } } /// @nodoc -@JsonSerializable() -class _$SnAccountStatusInfoImpl implements _SnAccountStatusInfo { - const _$SnAccountStatusInfoImpl( - {required this.isDisturbable, - required this.isOnline, - required this.lastSeenAt, - required this.status}); +mixin _$SnAccountStatusInfo { + bool get isDisturbable; + bool get isOnline; + DateTime? get lastSeenAt; + dynamic get status; - factory _$SnAccountStatusInfoImpl.fromJson(Map json) => - _$$SnAccountStatusInfoImplFromJson(json); + /// Create a copy of SnAccountStatusInfo + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnAccountStatusInfoCopyWith get copyWith => + _$SnAccountStatusInfoCopyWithImpl( + this as SnAccountStatusInfo, _$identity); - @override - final bool isDisturbable; - @override - final bool isOnline; - @override - final DateTime? lastSeenAt; - @override - final dynamic status; - - @override - String toString() { - return 'SnAccountStatusInfo(isDisturbable: $isDisturbable, isOnline: $isOnline, lastSeenAt: $lastSeenAt, status: $status)'; - } + /// Serializes this SnAccountStatusInfo to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAccountStatusInfoImpl && + other is SnAccountStatusInfo && (identical(other.isDisturbable, isDisturbable) || other.isDisturbable == isDisturbable) && (identical(other.isOnline, isOnline) || @@ -2184,274 +2034,206 @@ class _$SnAccountStatusInfoImpl implements _SnAccountStatusInfo { int get hashCode => Object.hash(runtimeType, isDisturbable, isOnline, lastSeenAt, const DeepCollectionEquality().hash(status)); - /// Create a copy of SnAccountStatusInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAccountStatusInfoImplCopyWith<_$SnAccountStatusInfoImpl> get copyWith => - __$$SnAccountStatusInfoImplCopyWithImpl<_$SnAccountStatusInfoImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAccountStatusInfoImplToJson( - this, - ); - } -} - -abstract class _SnAccountStatusInfo implements SnAccountStatusInfo { - const factory _SnAccountStatusInfo( - {required final bool isDisturbable, - required final bool isOnline, - required final DateTime? lastSeenAt, - required final dynamic status}) = _$SnAccountStatusInfoImpl; - - factory _SnAccountStatusInfo.fromJson(Map json) = - _$SnAccountStatusInfoImpl.fromJson; - - @override - bool get isDisturbable; - @override - bool get isOnline; - @override - DateTime? get lastSeenAt; - @override - dynamic get status; - - /// Create a copy of SnAccountStatusInfo - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAccountStatusInfoImplCopyWith<_$SnAccountStatusInfoImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAbuseReport _$SnAbuseReportFromJson(Map json) { - return _SnAbuseReport.fromJson(json); -} - -/// @nodoc -mixin _$SnAbuseReport { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get resource => throw _privateConstructorUsedError; - String get reason => throw _privateConstructorUsedError; - String get status => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnAbuseReport to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnAbuseReport - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnAbuseReportCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAbuseReportCopyWith<$Res> { - factory $SnAbuseReportCopyWith( - SnAbuseReport value, $Res Function(SnAbuseReport) then) = - _$SnAbuseReportCopyWithImpl<$Res, SnAbuseReport>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String resource, - String reason, - String status, - int accountId}); -} - -/// @nodoc -class _$SnAbuseReportCopyWithImpl<$Res, $Val extends SnAbuseReport> - implements $SnAbuseReportCopyWith<$Res> { - _$SnAbuseReportCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAbuseReport - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? resource = null, - Object? reason = null, - Object? status = null, - Object? accountId = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - resource: null == resource - ? _value.resource - : resource // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + String toString() { + return 'SnAccountStatusInfo(isDisturbable: $isDisturbable, isOnline: $isOnline, lastSeenAt: $lastSeenAt, status: $status)'; } } /// @nodoc -abstract class _$$SnAbuseReportImplCopyWith<$Res> - implements $SnAbuseReportCopyWith<$Res> { - factory _$$SnAbuseReportImplCopyWith( - _$SnAbuseReportImpl value, $Res Function(_$SnAbuseReportImpl) then) = - __$$SnAbuseReportImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAccountStatusInfoCopyWith<$Res> { + factory $SnAccountStatusInfoCopyWith( + SnAccountStatusInfo value, $Res Function(SnAccountStatusInfo) _then) = + _$SnAccountStatusInfoCopyWithImpl; @useResult $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String resource, - String reason, - String status, - int accountId}); + {bool isDisturbable, + bool isOnline, + DateTime? lastSeenAt, + dynamic status}); } /// @nodoc -class __$$SnAbuseReportImplCopyWithImpl<$Res> - extends _$SnAbuseReportCopyWithImpl<$Res, _$SnAbuseReportImpl> - implements _$$SnAbuseReportImplCopyWith<$Res> { - __$$SnAbuseReportImplCopyWithImpl( - _$SnAbuseReportImpl _value, $Res Function(_$SnAbuseReportImpl) _then) - : super(_value, _then); +class _$SnAccountStatusInfoCopyWithImpl<$Res> + implements $SnAccountStatusInfoCopyWith<$Res> { + _$SnAccountStatusInfoCopyWithImpl(this._self, this._then); - /// Create a copy of SnAbuseReport + final SnAccountStatusInfo _self; + final $Res Function(SnAccountStatusInfo) _then; + + /// Create a copy of SnAccountStatusInfo /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? resource = null, - Object? reason = null, - Object? status = null, - Object? accountId = null, + Object? isDisturbable = null, + Object? isOnline = null, + Object? lastSeenAt = freezed, + Object? status = freezed, }) { - return _then(_$SnAbuseReportImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable + return _then(_self.copyWith( + isDisturbable: null == isDisturbable + ? _self.isDisturbable + : isDisturbable // ignore: cast_nullable_to_non_nullable + as bool, + isOnline: null == isOnline + ? _self.isOnline + : isOnline // ignore: cast_nullable_to_non_nullable + as bool, + lastSeenAt: freezed == lastSeenAt + ? _self.lastSeenAt + : lastSeenAt // ignore: cast_nullable_to_non_nullable as DateTime?, - resource: null == resource - ? _value.resource - : resource // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status + status: freezed == status + ? _self.status : status // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, + as dynamic, )); } } /// @nodoc @JsonSerializable() -class _$SnAbuseReportImpl implements _SnAbuseReport { - const _$SnAbuseReportImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.resource, - required this.reason, - required this.status, - required this.accountId}); - - factory _$SnAbuseReportImpl.fromJson(Map json) => - _$$SnAbuseReportImplFromJson(json); +class _SnAccountStatusInfo implements SnAccountStatusInfo { + const _SnAccountStatusInfo( + {required this.isDisturbable, + required this.isOnline, + required this.lastSeenAt, + required this.status}); + factory _SnAccountStatusInfo.fromJson(Map json) => + _$SnAccountStatusInfoFromJson(json); @override - final int id; + final bool isDisturbable; @override - final DateTime createdAt; + final bool isOnline; @override - final DateTime updatedAt; + final DateTime? lastSeenAt; @override - final DateTime? deletedAt; + final dynamic status; + + /// Create a copy of SnAccountStatusInfo + /// with the given fields replaced by the non-null parameter values. @override - final String resource; - @override - final String reason; - @override - final String status; - @override - final int accountId; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAccountStatusInfoCopyWith<_SnAccountStatusInfo> get copyWith => + __$SnAccountStatusInfoCopyWithImpl<_SnAccountStatusInfo>( + this, _$identity); @override - String toString() { - return 'SnAbuseReport(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resource: $resource, reason: $reason, status: $status, accountId: $accountId)'; + Map toJson() { + return _$SnAccountStatusInfoToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAbuseReportImpl && + other is _SnAccountStatusInfo && + (identical(other.isDisturbable, isDisturbable) || + other.isDisturbable == isDisturbable) && + (identical(other.isOnline, isOnline) || + other.isOnline == isOnline) && + (identical(other.lastSeenAt, lastSeenAt) || + other.lastSeenAt == lastSeenAt) && + const DeepCollectionEquality().equals(other.status, status)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, isDisturbable, isOnline, + lastSeenAt, const DeepCollectionEquality().hash(status)); + + @override + String toString() { + return 'SnAccountStatusInfo(isDisturbable: $isDisturbable, isOnline: $isOnline, lastSeenAt: $lastSeenAt, status: $status)'; + } +} + +/// @nodoc +abstract mixin class _$SnAccountStatusInfoCopyWith<$Res> + implements $SnAccountStatusInfoCopyWith<$Res> { + factory _$SnAccountStatusInfoCopyWith(_SnAccountStatusInfo value, + $Res Function(_SnAccountStatusInfo) _then) = + __$SnAccountStatusInfoCopyWithImpl; + @override + @useResult + $Res call( + {bool isDisturbable, + bool isOnline, + DateTime? lastSeenAt, + dynamic status}); +} + +/// @nodoc +class __$SnAccountStatusInfoCopyWithImpl<$Res> + implements _$SnAccountStatusInfoCopyWith<$Res> { + __$SnAccountStatusInfoCopyWithImpl(this._self, this._then); + + final _SnAccountStatusInfo _self; + final $Res Function(_SnAccountStatusInfo) _then; + + /// Create a copy of SnAccountStatusInfo + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? isDisturbable = null, + Object? isOnline = null, + Object? lastSeenAt = freezed, + Object? status = freezed, + }) { + return _then(_SnAccountStatusInfo( + isDisturbable: null == isDisturbable + ? _self.isDisturbable + : isDisturbable // ignore: cast_nullable_to_non_nullable + as bool, + isOnline: null == isOnline + ? _self.isOnline + : isOnline // ignore: cast_nullable_to_non_nullable + as bool, + lastSeenAt: freezed == lastSeenAt + ? _self.lastSeenAt + : lastSeenAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + status: freezed == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } +} + +/// @nodoc +mixin _$SnAbuseReport { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get resource; + String get reason; + String get status; + int get accountId; + + /// Create a copy of SnAbuseReport + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnAbuseReportCopyWith get copyWith => + _$SnAbuseReportCopyWithImpl( + this as SnAbuseReport, _$identity); + + /// Serializes this SnAbuseReport to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAbuseReport && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -2472,57 +2254,242 @@ class _$SnAbuseReportImpl implements _SnAbuseReport { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, resource, reason, status, accountId); - /// Create a copy of SnAbuseReport - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAbuseReportImplCopyWith<_$SnAbuseReportImpl> get copyWith => - __$$SnAbuseReportImplCopyWithImpl<_$SnAbuseReportImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAbuseReportImplToJson( - this, - ); + String toString() { + return 'SnAbuseReport(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resource: $resource, reason: $reason, status: $status, accountId: $accountId)'; } } -abstract class _SnAbuseReport implements SnAbuseReport { - const factory _SnAbuseReport( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String resource, - required final String reason, - required final String status, - required final int accountId}) = _$SnAbuseReportImpl; +/// @nodoc +abstract mixin class $SnAbuseReportCopyWith<$Res> { + factory $SnAbuseReportCopyWith( + SnAbuseReport value, $Res Function(SnAbuseReport) _then) = + _$SnAbuseReportCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String resource, + String reason, + String status, + int accountId}); +} - factory _SnAbuseReport.fromJson(Map json) = - _$SnAbuseReportImpl.fromJson; +/// @nodoc +class _$SnAbuseReportCopyWithImpl<$Res> + implements $SnAbuseReportCopyWith<$Res> { + _$SnAbuseReportCopyWithImpl(this._self, this._then); + + final SnAbuseReport _self; + final $Res Function(SnAbuseReport) _then; + + /// Create a copy of SnAbuseReport + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? resource = null, + Object? reason = null, + Object? status = null, + Object? accountId = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + resource: null == resource + ? _self.resource + : resource // ignore: cast_nullable_to_non_nullable + as String, + reason: null == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as String, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnAbuseReport implements SnAbuseReport { + const _SnAbuseReport( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.resource, + required this.reason, + required this.status, + required this.accountId}); + factory _SnAbuseReport.fromJson(Map json) => + _$SnAbuseReportFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - String get resource; + final String resource; @override - String get reason; + final String reason; @override - String get status; + final String status; @override - int get accountId; + final int accountId; /// Create a copy of SnAbuseReport /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAbuseReportImplCopyWith<_$SnAbuseReportImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnAbuseReportCopyWith<_SnAbuseReport> get copyWith => + __$SnAbuseReportCopyWithImpl<_SnAbuseReport>(this, _$identity); + + @override + Map toJson() { + return _$SnAbuseReportToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnAbuseReport && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.resource, resource) || + other.resource == resource) && + (identical(other.reason, reason) || other.reason == reason) && + (identical(other.status, status) || other.status == status) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, resource, reason, status, accountId); + + @override + String toString() { + return 'SnAbuseReport(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resource: $resource, reason: $reason, status: $status, accountId: $accountId)'; + } } + +/// @nodoc +abstract mixin class _$SnAbuseReportCopyWith<$Res> + implements $SnAbuseReportCopyWith<$Res> { + factory _$SnAbuseReportCopyWith( + _SnAbuseReport value, $Res Function(_SnAbuseReport) _then) = + __$SnAbuseReportCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String resource, + String reason, + String status, + int accountId}); +} + +/// @nodoc +class __$SnAbuseReportCopyWithImpl<$Res> + implements _$SnAbuseReportCopyWith<$Res> { + __$SnAbuseReportCopyWithImpl(this._self, this._then); + + final _SnAbuseReport _self; + final $Res Function(_SnAbuseReport) _then; + + /// Create a copy of SnAbuseReport + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? resource = null, + Object? reason = null, + Object? status = null, + Object? accountId = null, + }) { + return _then(_SnAbuseReport( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + resource: null == resource + ? _self.resource + : resource // ignore: cast_nullable_to_non_nullable + as String, + reason: null == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as String, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +// dart format on diff --git a/lib/types/account.g.dart b/lib/types/account.g.dart index 35c0206..9ca1d53 100644 --- a/lib/types/account.g.dart +++ b/lib/types/account.g.dart @@ -6,8 +6,7 @@ part of 'account.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnAccountImpl _$$SnAccountImplFromJson(Map json) => - _$SnAccountImpl( +_SnAccount _$SnAccountFromJson(Map json) => _SnAccount( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -43,7 +42,7 @@ _$SnAccountImpl _$$SnAccountImplFromJson(Map json) => automatedId: (json['automated_id'] as num?)?.toInt(), ); -Map _$$SnAccountImplToJson(_$SnAccountImpl instance) => +Map _$SnAccountToJson(_SnAccount instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -67,9 +66,8 @@ Map _$$SnAccountImplToJson(_$SnAccountImpl instance) => 'automated_id': instance.automatedId, }; -_$SnAccountContactImpl _$$SnAccountContactImplFromJson( - Map json) => - _$SnAccountContactImpl( +_SnAccountContact _$SnAccountContactFromJson(Map json) => + _SnAccountContact( accountId: (json['account_id'] as num).toInt(), content: json['content'] as String, createdAt: DateTime.parse(json['created_at'] as String), @@ -86,8 +84,7 @@ _$SnAccountContactImpl _$$SnAccountContactImplFromJson( : DateTime.parse(json['verified_at'] as String), ); -Map _$$SnAccountContactImplToJson( - _$SnAccountContactImpl instance) => +Map _$SnAccountContactToJson(_SnAccountContact instance) => { 'account_id': instance.accountId, 'content': instance.content, @@ -101,9 +98,8 @@ Map _$$SnAccountContactImplToJson( 'verified_at': instance.verifiedAt?.toIso8601String(), }; -_$SnAccountProfileImpl _$$SnAccountProfileImplFromJson( - Map json) => - _$SnAccountProfileImpl( +_SnAccountProfile _$SnAccountProfileFromJson(Map json) => + _SnAccountProfile( id: (json['id'] as num).toInt(), accountId: (json['account_id'] as num).toInt(), birthday: json['birthday'] == null @@ -122,8 +118,7 @@ _$SnAccountProfileImpl _$$SnAccountProfileImplFromJson( updatedAt: DateTime.parse(json['updated_at'] as String), ); -Map _$$SnAccountProfileImplToJson( - _$SnAccountProfileImpl instance) => +Map _$SnAccountProfileToJson(_SnAccountProfile instance) => { 'id': instance.id, 'account_id': instance.accountId, @@ -137,8 +132,8 @@ Map _$$SnAccountProfileImplToJson( 'updated_at': instance.updatedAt.toIso8601String(), }; -_$SnRelationshipImpl _$$SnRelationshipImplFromJson(Map json) => - _$SnRelationshipImpl( +_SnRelationship _$SnRelationshipFromJson(Map json) => + _SnRelationship( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -157,8 +152,7 @@ _$SnRelationshipImpl _$$SnRelationshipImplFromJson(Map json) => permNodes: json['perm_nodes'] as Map? ?? const {}, ); -Map _$$SnRelationshipImplToJson( - _$SnRelationshipImpl instance) => +Map _$SnRelationshipToJson(_SnRelationship instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -172,8 +166,8 @@ Map _$$SnRelationshipImplToJson( 'perm_nodes': instance.permNodes, }; -_$SnAccountBadgeImpl _$$SnAccountBadgeImplFromJson(Map json) => - _$SnAccountBadgeImpl( +_SnAccountBadge _$SnAccountBadgeFromJson(Map json) => + _SnAccountBadge( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -183,8 +177,7 @@ _$SnAccountBadgeImpl _$$SnAccountBadgeImplFromJson(Map json) => metadata: json['metadata'] as Map? ?? const {}, ); -Map _$$SnAccountBadgeImplToJson( - _$SnAccountBadgeImpl instance) => +Map _$SnAccountBadgeToJson(_SnAccountBadge instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -195,9 +188,8 @@ Map _$$SnAccountBadgeImplToJson( 'metadata': instance.metadata, }; -_$SnAccountStatusInfoImpl _$$SnAccountStatusInfoImplFromJson( - Map json) => - _$SnAccountStatusInfoImpl( +_SnAccountStatusInfo _$SnAccountStatusInfoFromJson(Map json) => + _SnAccountStatusInfo( isDisturbable: json['is_disturbable'] as bool, isOnline: json['is_online'] as bool, lastSeenAt: json['last_seen_at'] == null @@ -206,8 +198,8 @@ _$SnAccountStatusInfoImpl _$$SnAccountStatusInfoImplFromJson( status: json['status'], ); -Map _$$SnAccountStatusInfoImplToJson( - _$SnAccountStatusInfoImpl instance) => +Map _$SnAccountStatusInfoToJson( + _SnAccountStatusInfo instance) => { 'is_disturbable': instance.isDisturbable, 'is_online': instance.isOnline, @@ -215,8 +207,8 @@ Map _$$SnAccountStatusInfoImplToJson( 'status': instance.status, }; -_$SnAbuseReportImpl _$$SnAbuseReportImplFromJson(Map json) => - _$SnAbuseReportImpl( +_SnAbuseReport _$SnAbuseReportFromJson(Map json) => + _SnAbuseReport( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -229,7 +221,7 @@ _$SnAbuseReportImpl _$$SnAbuseReportImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnAbuseReportImplToJson(_$SnAbuseReportImpl instance) => +Map _$SnAbuseReportToJson(_SnAbuseReport instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/attachment.dart b/lib/types/attachment.dart index 0059337..8e0a30b 100644 --- a/lib/types/attachment.dart +++ b/lib/types/attachment.dart @@ -12,7 +12,7 @@ enum SnMediaType { } @freezed -class SnAttachment with _$SnAttachment { +abstract class SnAttachment with _$SnAttachment { const SnAttachment._(); const factory SnAttachment({ @@ -65,7 +65,7 @@ class SnAttachment with _$SnAttachment { } @freezed -class SnAttachmentFragment with _$SnAttachmentFragment { +abstract class SnAttachmentFragment with _$SnAttachmentFragment { const SnAttachmentFragment._(); const factory SnAttachmentFragment({ @@ -96,7 +96,7 @@ class SnAttachmentFragment with _$SnAttachmentFragment { } @freezed -class SnAttachmentPool with _$SnAttachmentPool { +abstract class SnAttachmentPool with _$SnAttachmentPool { const factory SnAttachmentPool({ required int id, required DateTime createdAt, @@ -113,7 +113,7 @@ class SnAttachmentPool with _$SnAttachmentPool { } @freezed -class SnAttachmentDestination with _$SnAttachmentDestination { +abstract class SnAttachmentDestination with _$SnAttachmentDestination { const factory SnAttachmentDestination({ @Default(0) int id, required String type, @@ -126,7 +126,7 @@ class SnAttachmentDestination with _$SnAttachmentDestination { } @freezed -class SnAttachmentBoost with _$SnAttachmentBoost { +abstract class SnAttachmentBoost with _$SnAttachmentBoost { const factory SnAttachmentBoost({ required int id, required DateTime createdAt, @@ -143,7 +143,7 @@ class SnAttachmentBoost with _$SnAttachmentBoost { } @freezed -class SnSticker with _$SnSticker { +abstract class SnSticker with _$SnSticker { const factory SnSticker({ required int id, required DateTime createdAt, @@ -162,7 +162,7 @@ class SnSticker with _$SnSticker { } @freezed -class SnStickerPack with _$SnStickerPack { +abstract class SnStickerPack with _$SnStickerPack { const factory SnStickerPack({ required int id, required DateTime createdAt, @@ -179,7 +179,7 @@ class SnStickerPack with _$SnStickerPack { } @freezed -class SnAttachmentBilling with _$SnAttachmentBilling { +abstract class SnAttachmentBilling with _$SnAttachmentBilling { const factory SnAttachmentBilling({ required int currentBytes, required int discountFileSize, diff --git a/lib/types/attachment.freezed.dart b/lib/types/attachment.freezed.dart index 35f60d0..1460a14 100644 --- a/lib/types/attachment.freezed.dart +++ b/lib/types/attachment.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,64 +10,157 @@ part of 'attachment.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnAttachment _$SnAttachmentFromJson(Map json) { - return _SnAttachment.fromJson(json); -} - /// @nodoc mixin _$SnAttachment { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get rid => throw _privateConstructorUsedError; - String get uuid => throw _privateConstructorUsedError; - int get size => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get alt => throw _privateConstructorUsedError; - String get mimetype => throw _privateConstructorUsedError; - String get hash => throw _privateConstructorUsedError; - int get destination => throw _privateConstructorUsedError; - int get refCount => throw _privateConstructorUsedError; - int get contentRating => throw _privateConstructorUsedError; - int get qualityRating => throw _privateConstructorUsedError; - DateTime? get cleanedAt => throw _privateConstructorUsedError; - bool get isAnalyzed => throw _privateConstructorUsedError; - bool get isSelfRef => throw _privateConstructorUsedError; - bool get isIndexable => throw _privateConstructorUsedError; - SnAttachment? get ref => throw _privateConstructorUsedError; - int? get refId => throw _privateConstructorUsedError; - SnAttachmentPool? get pool => throw _privateConstructorUsedError; - int? get poolId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - int? get thumbnailId => throw _privateConstructorUsedError; - SnAttachment? get thumbnail => throw _privateConstructorUsedError; - int? get compressedId => throw _privateConstructorUsedError; - SnAttachment? get compressed => throw _privateConstructorUsedError; - List get boosts => throw _privateConstructorUsedError; - Map get usermeta => throw _privateConstructorUsedError; - Map get metadata => throw _privateConstructorUsedError; - - /// Serializes this SnAttachment to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get rid; + String get uuid; + int get size; + String get name; + String get alt; + String get mimetype; + String get hash; + int get destination; + int get refCount; + int get contentRating; + int get qualityRating; + DateTime? get cleanedAt; + bool get isAnalyzed; + bool get isSelfRef; + bool get isIndexable; + SnAttachment? get ref; + int? get refId; + SnAttachmentPool? get pool; + int? get poolId; + int get accountId; + int? get thumbnailId; + SnAttachment? get thumbnail; + int? get compressedId; + SnAttachment? get compressed; + List get boosts; + Map get usermeta; + Map get metadata; /// Create a copy of SnAttachment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnAttachmentCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnAttachmentCopyWithImpl( + this as SnAttachment, _$identity); + + /// Serializes this SnAttachment to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAttachment && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.rid, rid) || other.rid == rid) && + (identical(other.uuid, uuid) || other.uuid == uuid) && + (identical(other.size, size) || other.size == size) && + (identical(other.name, name) || other.name == name) && + (identical(other.alt, alt) || other.alt == alt) && + (identical(other.mimetype, mimetype) || + other.mimetype == mimetype) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.destination, destination) || + other.destination == destination) && + (identical(other.refCount, refCount) || + other.refCount == refCount) && + (identical(other.contentRating, contentRating) || + other.contentRating == contentRating) && + (identical(other.qualityRating, qualityRating) || + other.qualityRating == qualityRating) && + (identical(other.cleanedAt, cleanedAt) || + other.cleanedAt == cleanedAt) && + (identical(other.isAnalyzed, isAnalyzed) || + other.isAnalyzed == isAnalyzed) && + (identical(other.isSelfRef, isSelfRef) || + other.isSelfRef == isSelfRef) && + (identical(other.isIndexable, isIndexable) || + other.isIndexable == isIndexable) && + (identical(other.ref, ref) || other.ref == ref) && + (identical(other.refId, refId) || other.refId == refId) && + (identical(other.pool, pool) || other.pool == pool) && + (identical(other.poolId, poolId) || other.poolId == poolId) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.thumbnailId, thumbnailId) || + other.thumbnailId == thumbnailId) && + (identical(other.thumbnail, thumbnail) || + other.thumbnail == thumbnail) && + (identical(other.compressedId, compressedId) || + other.compressedId == compressedId) && + (identical(other.compressed, compressed) || + other.compressed == compressed) && + const DeepCollectionEquality().equals(other.boosts, boosts) && + const DeepCollectionEquality().equals(other.usermeta, usermeta) && + const DeepCollectionEquality().equals(other.metadata, metadata)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + rid, + uuid, + size, + name, + alt, + mimetype, + hash, + destination, + refCount, + contentRating, + qualityRating, + cleanedAt, + isAnalyzed, + isSelfRef, + isIndexable, + ref, + refId, + pool, + poolId, + accountId, + thumbnailId, + thumbnail, + compressedId, + compressed, + const DeepCollectionEquality().hash(boosts), + const DeepCollectionEquality().hash(usermeta), + const DeepCollectionEquality().hash(metadata) + ]); + + @override + String toString() { + return 'SnAttachment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, destination: $destination, refCount: $refCount, contentRating: $contentRating, qualityRating: $qualityRating, cleanedAt: $cleanedAt, isAnalyzed: $isAnalyzed, isSelfRef: $isSelfRef, isIndexable: $isIndexable, ref: $ref, refId: $refId, pool: $pool, poolId: $poolId, accountId: $accountId, thumbnailId: $thumbnailId, thumbnail: $thumbnail, compressedId: $compressedId, compressed: $compressed, boosts: $boosts, usermeta: $usermeta, metadata: $metadata)'; + } } /// @nodoc -abstract class $SnAttachmentCopyWith<$Res> { +abstract mixin class $SnAttachmentCopyWith<$Res> { factory $SnAttachmentCopyWith( - SnAttachment value, $Res Function(SnAttachment) then) = - _$SnAttachmentCopyWithImpl<$Res, SnAttachment>; + SnAttachment value, $Res Function(SnAttachment) _then) = + _$SnAttachmentCopyWithImpl; @useResult $Res call( {int id, @@ -108,14 +202,11 @@ abstract class $SnAttachmentCopyWith<$Res> { } /// @nodoc -class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> - implements $SnAttachmentCopyWith<$Res> { - _$SnAttachmentCopyWithImpl(this._value, this._then); +class _$SnAttachmentCopyWithImpl<$Res> implements $SnAttachmentCopyWith<$Res> { + _$SnAttachmentCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnAttachment _self; + final $Res Function(SnAttachment) _then; /// Create a copy of SnAttachment /// with the given fields replaced by the non-null parameter values. @@ -154,132 +245,132 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> Object? usermeta = null, Object? metadata = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, rid: null == rid - ? _value.rid + ? _self.rid : rid // ignore: cast_nullable_to_non_nullable as String, uuid: null == uuid - ? _value.uuid + ? _self.uuid : uuid // ignore: cast_nullable_to_non_nullable as String, size: null == size - ? _value.size + ? _self.size : size // ignore: cast_nullable_to_non_nullable as int, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, alt: null == alt - ? _value.alt + ? _self.alt : alt // ignore: cast_nullable_to_non_nullable as String, mimetype: null == mimetype - ? _value.mimetype + ? _self.mimetype : mimetype // ignore: cast_nullable_to_non_nullable as String, hash: null == hash - ? _value.hash + ? _self.hash : hash // ignore: cast_nullable_to_non_nullable as String, destination: null == destination - ? _value.destination + ? _self.destination : destination // ignore: cast_nullable_to_non_nullable as int, refCount: null == refCount - ? _value.refCount + ? _self.refCount : refCount // ignore: cast_nullable_to_non_nullable as int, contentRating: null == contentRating - ? _value.contentRating + ? _self.contentRating : contentRating // ignore: cast_nullable_to_non_nullable as int, qualityRating: null == qualityRating - ? _value.qualityRating + ? _self.qualityRating : qualityRating // ignore: cast_nullable_to_non_nullable as int, cleanedAt: freezed == cleanedAt - ? _value.cleanedAt + ? _self.cleanedAt : cleanedAt // ignore: cast_nullable_to_non_nullable as DateTime?, isAnalyzed: null == isAnalyzed - ? _value.isAnalyzed + ? _self.isAnalyzed : isAnalyzed // ignore: cast_nullable_to_non_nullable as bool, isSelfRef: null == isSelfRef - ? _value.isSelfRef + ? _self.isSelfRef : isSelfRef // ignore: cast_nullable_to_non_nullable as bool, isIndexable: null == isIndexable - ? _value.isIndexable + ? _self.isIndexable : isIndexable // ignore: cast_nullable_to_non_nullable as bool, ref: freezed == ref - ? _value.ref + ? _self.ref : ref // ignore: cast_nullable_to_non_nullable as SnAttachment?, refId: freezed == refId - ? _value.refId + ? _self.refId : refId // ignore: cast_nullable_to_non_nullable as int?, pool: freezed == pool - ? _value.pool + ? _self.pool : pool // ignore: cast_nullable_to_non_nullable as SnAttachmentPool?, poolId: freezed == poolId - ? _value.poolId + ? _self.poolId : poolId // ignore: cast_nullable_to_non_nullable as int?, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, thumbnailId: freezed == thumbnailId - ? _value.thumbnailId + ? _self.thumbnailId : thumbnailId // ignore: cast_nullable_to_non_nullable as int?, thumbnail: freezed == thumbnail - ? _value.thumbnail + ? _self.thumbnail : thumbnail // ignore: cast_nullable_to_non_nullable as SnAttachment?, compressedId: freezed == compressedId - ? _value.compressedId + ? _self.compressedId : compressedId // ignore: cast_nullable_to_non_nullable as int?, compressed: freezed == compressed - ? _value.compressed + ? _self.compressed : compressed // ignore: cast_nullable_to_non_nullable as SnAttachment?, boosts: null == boosts - ? _value.boosts + ? _self.boosts : boosts // ignore: cast_nullable_to_non_nullable as List, usermeta: null == usermeta - ? _value.usermeta + ? _self.usermeta : usermeta // ignore: cast_nullable_to_non_nullable as Map, metadata: null == metadata - ? _value.metadata + ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map, - ) as $Val); + )); } /// Create a copy of SnAttachment @@ -287,12 +378,12 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res>? get ref { - if (_value.ref == null) { + if (_self.ref == null) { return null; } - return $SnAttachmentCopyWith<$Res>(_value.ref!, (value) { - return _then(_value.copyWith(ref: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.ref!, (value) { + return _then(_self.copyWith(ref: value)); }); } @@ -301,12 +392,12 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> @override @pragma('vm:prefer-inline') $SnAttachmentPoolCopyWith<$Res>? get pool { - if (_value.pool == null) { + if (_self.pool == null) { return null; } - return $SnAttachmentPoolCopyWith<$Res>(_value.pool!, (value) { - return _then(_value.copyWith(pool: value) as $Val); + return $SnAttachmentPoolCopyWith<$Res>(_self.pool!, (value) { + return _then(_self.copyWith(pool: value)); }); } @@ -315,12 +406,12 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res>? get thumbnail { - if (_value.thumbnail == null) { + if (_self.thumbnail == null) { return null; } - return $SnAttachmentCopyWith<$Res>(_value.thumbnail!, (value) { - return _then(_value.copyWith(thumbnail: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.thumbnail!, (value) { + return _then(_self.copyWith(thumbnail: value)); }); } @@ -329,245 +420,20 @@ class _$SnAttachmentCopyWithImpl<$Res, $Val extends SnAttachment> @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res>? get compressed { - if (_value.compressed == null) { + if (_self.compressed == null) { return null; } - return $SnAttachmentCopyWith<$Res>(_value.compressed!, (value) { - return _then(_value.copyWith(compressed: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.compressed!, (value) { + return _then(_self.copyWith(compressed: value)); }); } } -/// @nodoc -abstract class _$$SnAttachmentImplCopyWith<$Res> - implements $SnAttachmentCopyWith<$Res> { - factory _$$SnAttachmentImplCopyWith( - _$SnAttachmentImpl value, $Res Function(_$SnAttachmentImpl) then) = - __$$SnAttachmentImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String rid, - String uuid, - int size, - String name, - String alt, - String mimetype, - String hash, - int destination, - int refCount, - int contentRating, - int qualityRating, - DateTime? cleanedAt, - bool isAnalyzed, - bool isSelfRef, - bool isIndexable, - SnAttachment? ref, - int? refId, - SnAttachmentPool? pool, - int? poolId, - int accountId, - int? thumbnailId, - SnAttachment? thumbnail, - int? compressedId, - SnAttachment? compressed, - List boosts, - Map usermeta, - Map metadata}); - - @override - $SnAttachmentCopyWith<$Res>? get ref; - @override - $SnAttachmentPoolCopyWith<$Res>? get pool; - @override - $SnAttachmentCopyWith<$Res>? get thumbnail; - @override - $SnAttachmentCopyWith<$Res>? get compressed; -} - -/// @nodoc -class __$$SnAttachmentImplCopyWithImpl<$Res> - extends _$SnAttachmentCopyWithImpl<$Res, _$SnAttachmentImpl> - implements _$$SnAttachmentImplCopyWith<$Res> { - __$$SnAttachmentImplCopyWithImpl( - _$SnAttachmentImpl _value, $Res Function(_$SnAttachmentImpl) _then) - : super(_value, _then); - - /// Create a copy of SnAttachment - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? rid = null, - Object? uuid = null, - Object? size = null, - Object? name = null, - Object? alt = null, - Object? mimetype = null, - Object? hash = null, - Object? destination = null, - Object? refCount = null, - Object? contentRating = null, - Object? qualityRating = null, - Object? cleanedAt = freezed, - Object? isAnalyzed = null, - Object? isSelfRef = null, - Object? isIndexable = null, - Object? ref = freezed, - Object? refId = freezed, - Object? pool = freezed, - Object? poolId = freezed, - Object? accountId = null, - Object? thumbnailId = freezed, - Object? thumbnail = freezed, - Object? compressedId = freezed, - Object? compressed = freezed, - Object? boosts = null, - Object? usermeta = null, - Object? metadata = null, - }) { - return _then(_$SnAttachmentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - rid: null == rid - ? _value.rid - : rid // ignore: cast_nullable_to_non_nullable - as String, - uuid: null == uuid - ? _value.uuid - : uuid // ignore: cast_nullable_to_non_nullable - as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - alt: null == alt - ? _value.alt - : alt // ignore: cast_nullable_to_non_nullable - as String, - mimetype: null == mimetype - ? _value.mimetype - : mimetype // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - destination: null == destination - ? _value.destination - : destination // ignore: cast_nullable_to_non_nullable - as int, - refCount: null == refCount - ? _value.refCount - : refCount // ignore: cast_nullable_to_non_nullable - as int, - contentRating: null == contentRating - ? _value.contentRating - : contentRating // ignore: cast_nullable_to_non_nullable - as int, - qualityRating: null == qualityRating - ? _value.qualityRating - : qualityRating // ignore: cast_nullable_to_non_nullable - as int, - cleanedAt: freezed == cleanedAt - ? _value.cleanedAt - : cleanedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isAnalyzed: null == isAnalyzed - ? _value.isAnalyzed - : isAnalyzed // ignore: cast_nullable_to_non_nullable - as bool, - isSelfRef: null == isSelfRef - ? _value.isSelfRef - : isSelfRef // ignore: cast_nullable_to_non_nullable - as bool, - isIndexable: null == isIndexable - ? _value.isIndexable - : isIndexable // ignore: cast_nullable_to_non_nullable - as bool, - ref: freezed == ref - ? _value.ref - : ref // ignore: cast_nullable_to_non_nullable - as SnAttachment?, - refId: freezed == refId - ? _value.refId - : refId // ignore: cast_nullable_to_non_nullable - as int?, - pool: freezed == pool - ? _value.pool - : pool // ignore: cast_nullable_to_non_nullable - as SnAttachmentPool?, - poolId: freezed == poolId - ? _value.poolId - : poolId // ignore: cast_nullable_to_non_nullable - as int?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - thumbnailId: freezed == thumbnailId - ? _value.thumbnailId - : thumbnailId // ignore: cast_nullable_to_non_nullable - as int?, - thumbnail: freezed == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as SnAttachment?, - compressedId: freezed == compressedId - ? _value.compressedId - : compressedId // ignore: cast_nullable_to_non_nullable - as int?, - compressed: freezed == compressed - ? _value.compressed - : compressed // ignore: cast_nullable_to_non_nullable - as SnAttachment?, - boosts: null == boosts - ? _value._boosts - : boosts // ignore: cast_nullable_to_non_nullable - as List, - usermeta: null == usermeta - ? _value._usermeta - : usermeta // ignore: cast_nullable_to_non_nullable - as Map, - metadata: null == metadata - ? _value._metadata - : metadata // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnAttachmentImpl extends _SnAttachment { - const _$SnAttachmentImpl( +class _SnAttachment extends SnAttachment { + const _SnAttachment( {required this.id, required this.createdAt, required this.updatedAt, @@ -603,9 +469,8 @@ class _$SnAttachmentImpl extends _SnAttachment { _usermeta = usermeta, _metadata = metadata, super._(); - - factory _$SnAttachmentImpl.fromJson(Map json) => - _$$SnAttachmentImplFromJson(json); + factory _SnAttachment.fromJson(Map json) => + _$SnAttachmentFromJson(json); @override final int id; @@ -692,16 +557,26 @@ class _$SnAttachmentImpl extends _SnAttachment { return EqualUnmodifiableMapView(_metadata); } + /// Create a copy of SnAttachment + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAttachment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, destination: $destination, refCount: $refCount, contentRating: $contentRating, qualityRating: $qualityRating, cleanedAt: $cleanedAt, isAnalyzed: $isAnalyzed, isSelfRef: $isSelfRef, isIndexable: $isIndexable, ref: $ref, refId: $refId, pool: $pool, poolId: $poolId, accountId: $accountId, thumbnailId: $thumbnailId, thumbnail: $thumbnail, compressedId: $compressedId, compressed: $compressed, boosts: $boosts, usermeta: $usermeta, metadata: $metadata)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentCopyWith<_SnAttachment> get copyWith => + __$SnAttachmentCopyWithImpl<_SnAttachment>(this, _$identity); + + @override + Map toJson() { + return _$SnAttachmentToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentImpl && + other is _SnAttachment && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -789,284 +664,379 @@ class _$SnAttachmentImpl extends _SnAttachment { const DeepCollectionEquality().hash(_metadata) ]); - /// Create a copy of SnAttachment - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAttachmentImplCopyWith<_$SnAttachmentImpl> get copyWith => - __$$SnAttachmentImplCopyWithImpl<_$SnAttachmentImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAttachmentImplToJson( - this, - ); + String toString() { + return 'SnAttachment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, destination: $destination, refCount: $refCount, contentRating: $contentRating, qualityRating: $qualityRating, cleanedAt: $cleanedAt, isAnalyzed: $isAnalyzed, isSelfRef: $isSelfRef, isIndexable: $isIndexable, ref: $ref, refId: $refId, pool: $pool, poolId: $poolId, accountId: $accountId, thumbnailId: $thumbnailId, thumbnail: $thumbnail, compressedId: $compressedId, compressed: $compressed, boosts: $boosts, usermeta: $usermeta, metadata: $metadata)'; } } -abstract class _SnAttachment extends SnAttachment { - const factory _SnAttachment( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String rid, - required final String uuid, - required final int size, - required final String name, - required final String alt, - required final String mimetype, - required final String hash, - required final int destination, - required final int refCount, - final int contentRating, - final int qualityRating, - required final DateTime? cleanedAt, - required final bool isAnalyzed, - required final bool isSelfRef, - required final bool isIndexable, - required final SnAttachment? ref, - required final int? refId, - required final SnAttachmentPool? pool, - required final int? poolId, - required final int accountId, - final int? thumbnailId, - final SnAttachment? thumbnail, - final int? compressedId, - final SnAttachment? compressed, - final List boosts, - final Map usermeta, - final Map metadata}) = _$SnAttachmentImpl; - const _SnAttachment._() : super._(); - - factory _SnAttachment.fromJson(Map json) = - _$SnAttachmentImpl.fromJson; +/// @nodoc +abstract mixin class _$SnAttachmentCopyWith<$Res> + implements $SnAttachmentCopyWith<$Res> { + factory _$SnAttachmentCopyWith( + _SnAttachment value, $Res Function(_SnAttachment) _then) = + __$SnAttachmentCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String rid, + String uuid, + int size, + String name, + String alt, + String mimetype, + String hash, + int destination, + int refCount, + int contentRating, + int qualityRating, + DateTime? cleanedAt, + bool isAnalyzed, + bool isSelfRef, + bool isIndexable, + SnAttachment? ref, + int? refId, + SnAttachmentPool? pool, + int? poolId, + int accountId, + int? thumbnailId, + SnAttachment? thumbnail, + int? compressedId, + SnAttachment? compressed, + List boosts, + Map usermeta, + Map metadata}); @override - int get id; + $SnAttachmentCopyWith<$Res>? get ref; @override - DateTime get createdAt; + $SnAttachmentPoolCopyWith<$Res>? get pool; @override - DateTime get updatedAt; + $SnAttachmentCopyWith<$Res>? get thumbnail; @override - DateTime? get deletedAt; - @override - String get rid; - @override - String get uuid; - @override - int get size; - @override - String get name; - @override - String get alt; - @override - String get mimetype; - @override - String get hash; - @override - int get destination; - @override - int get refCount; - @override - int get contentRating; - @override - int get qualityRating; - @override - DateTime? get cleanedAt; - @override - bool get isAnalyzed; - @override - bool get isSelfRef; - @override - bool get isIndexable; - @override - SnAttachment? get ref; - @override - int? get refId; - @override - SnAttachmentPool? get pool; - @override - int? get poolId; - @override - int get accountId; - @override - int? get thumbnailId; - @override - SnAttachment? get thumbnail; - @override - int? get compressedId; - @override - SnAttachment? get compressed; - @override - List get boosts; - @override - Map get usermeta; - @override - Map get metadata; + $SnAttachmentCopyWith<$Res>? get compressed; +} + +/// @nodoc +class __$SnAttachmentCopyWithImpl<$Res> + implements _$SnAttachmentCopyWith<$Res> { + __$SnAttachmentCopyWithImpl(this._self, this._then); + + final _SnAttachment _self; + final $Res Function(_SnAttachment) _then; /// Create a copy of SnAttachment /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentImplCopyWith<_$SnAttachmentImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? rid = null, + Object? uuid = null, + Object? size = null, + Object? name = null, + Object? alt = null, + Object? mimetype = null, + Object? hash = null, + Object? destination = null, + Object? refCount = null, + Object? contentRating = null, + Object? qualityRating = null, + Object? cleanedAt = freezed, + Object? isAnalyzed = null, + Object? isSelfRef = null, + Object? isIndexable = null, + Object? ref = freezed, + Object? refId = freezed, + Object? pool = freezed, + Object? poolId = freezed, + Object? accountId = null, + Object? thumbnailId = freezed, + Object? thumbnail = freezed, + Object? compressedId = freezed, + Object? compressed = freezed, + Object? boosts = null, + Object? usermeta = null, + Object? metadata = null, + }) { + return _then(_SnAttachment( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + rid: null == rid + ? _self.rid + : rid // ignore: cast_nullable_to_non_nullable + as String, + uuid: null == uuid + ? _self.uuid + : uuid // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _self.size + : size // ignore: cast_nullable_to_non_nullable + as int, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + alt: null == alt + ? _self.alt + : alt // ignore: cast_nullable_to_non_nullable + as String, + mimetype: null == mimetype + ? _self.mimetype + : mimetype // ignore: cast_nullable_to_non_nullable + as String, + hash: null == hash + ? _self.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + destination: null == destination + ? _self.destination + : destination // ignore: cast_nullable_to_non_nullable + as int, + refCount: null == refCount + ? _self.refCount + : refCount // ignore: cast_nullable_to_non_nullable + as int, + contentRating: null == contentRating + ? _self.contentRating + : contentRating // ignore: cast_nullable_to_non_nullable + as int, + qualityRating: null == qualityRating + ? _self.qualityRating + : qualityRating // ignore: cast_nullable_to_non_nullable + as int, + cleanedAt: freezed == cleanedAt + ? _self.cleanedAt + : cleanedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isAnalyzed: null == isAnalyzed + ? _self.isAnalyzed + : isAnalyzed // ignore: cast_nullable_to_non_nullable + as bool, + isSelfRef: null == isSelfRef + ? _self.isSelfRef + : isSelfRef // ignore: cast_nullable_to_non_nullable + as bool, + isIndexable: null == isIndexable + ? _self.isIndexable + : isIndexable // ignore: cast_nullable_to_non_nullable + as bool, + ref: freezed == ref + ? _self.ref + : ref // ignore: cast_nullable_to_non_nullable + as SnAttachment?, + refId: freezed == refId + ? _self.refId + : refId // ignore: cast_nullable_to_non_nullable + as int?, + pool: freezed == pool + ? _self.pool + : pool // ignore: cast_nullable_to_non_nullable + as SnAttachmentPool?, + poolId: freezed == poolId + ? _self.poolId + : poolId // ignore: cast_nullable_to_non_nullable + as int?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + thumbnailId: freezed == thumbnailId + ? _self.thumbnailId + : thumbnailId // ignore: cast_nullable_to_non_nullable + as int?, + thumbnail: freezed == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as SnAttachment?, + compressedId: freezed == compressedId + ? _self.compressedId + : compressedId // ignore: cast_nullable_to_non_nullable + as int?, + compressed: freezed == compressed + ? _self.compressed + : compressed // ignore: cast_nullable_to_non_nullable + as SnAttachment?, + boosts: null == boosts + ? _self._boosts + : boosts // ignore: cast_nullable_to_non_nullable + as List, + usermeta: null == usermeta + ? _self._usermeta + : usermeta // ignore: cast_nullable_to_non_nullable + as Map, + metadata: null == metadata + ? _self._metadata + : metadata // ignore: cast_nullable_to_non_nullable + as Map, + )); + } -SnAttachmentFragment _$SnAttachmentFragmentFromJson(Map json) { - return _SnAttachmentFragment.fromJson(json); + /// Create a copy of SnAttachment + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res>? get ref { + if (_self.ref == null) { + return null; + } + + return $SnAttachmentCopyWith<$Res>(_self.ref!, (value) { + return _then(_self.copyWith(ref: value)); + }); + } + + /// Create a copy of SnAttachment + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentPoolCopyWith<$Res>? get pool { + if (_self.pool == null) { + return null; + } + + return $SnAttachmentPoolCopyWith<$Res>(_self.pool!, (value) { + return _then(_self.copyWith(pool: value)); + }); + } + + /// Create a copy of SnAttachment + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res>? get thumbnail { + if (_self.thumbnail == null) { + return null; + } + + return $SnAttachmentCopyWith<$Res>(_self.thumbnail!, (value) { + return _then(_self.copyWith(thumbnail: value)); + }); + } + + /// Create a copy of SnAttachment + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res>? get compressed { + if (_self.compressed == null) { + return null; + } + + return $SnAttachmentCopyWith<$Res>(_self.compressed!, (value) { + return _then(_self.copyWith(compressed: value)); + }); + } } /// @nodoc mixin _$SnAttachmentFragment { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get rid => throw _privateConstructorUsedError; - String get uuid => throw _privateConstructorUsedError; - int get size => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get alt => throw _privateConstructorUsedError; - String get mimetype => throw _privateConstructorUsedError; - String get hash => throw _privateConstructorUsedError; - String? get fingerprint => throw _privateConstructorUsedError; - Map get fileChunks => throw _privateConstructorUsedError; - List get fileChunksMissing => throw _privateConstructorUsedError; - - /// Serializes this SnAttachmentFragment to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get rid; + String get uuid; + int get size; + String get name; + String get alt; + String get mimetype; + String get hash; + String? get fingerprint; + Map get fileChunks; + List get fileChunksMissing; /// Create a copy of SnAttachmentFragment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAttachmentFragmentCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAttachmentFragmentCopyWith<$Res> { - factory $SnAttachmentFragmentCopyWith(SnAttachmentFragment value, - $Res Function(SnAttachmentFragment) then) = - _$SnAttachmentFragmentCopyWithImpl<$Res, SnAttachmentFragment>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String rid, - String uuid, - int size, - String name, - String alt, - String mimetype, - String hash, - String? fingerprint, - Map fileChunks, - List fileChunksMissing}); -} - -/// @nodoc -class _$SnAttachmentFragmentCopyWithImpl<$Res, - $Val extends SnAttachmentFragment> - implements $SnAttachmentFragmentCopyWith<$Res> { - _$SnAttachmentFragmentCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAttachmentFragment - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAttachmentFragmentCopyWith get copyWith => + _$SnAttachmentFragmentCopyWithImpl( + this as SnAttachmentFragment, _$identity); + + /// Serializes this SnAttachmentFragment to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? rid = null, - Object? uuid = null, - Object? size = null, - Object? name = null, - Object? alt = null, - Object? mimetype = null, - Object? hash = null, - Object? fingerprint = freezed, - Object? fileChunks = null, - Object? fileChunksMissing = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - rid: null == rid - ? _value.rid - : rid // ignore: cast_nullable_to_non_nullable - as String, - uuid: null == uuid - ? _value.uuid - : uuid // ignore: cast_nullable_to_non_nullable - as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - alt: null == alt - ? _value.alt - : alt // ignore: cast_nullable_to_non_nullable - as String, - mimetype: null == mimetype - ? _value.mimetype - : mimetype // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - fingerprint: freezed == fingerprint - ? _value.fingerprint - : fingerprint // ignore: cast_nullable_to_non_nullable - as String?, - fileChunks: null == fileChunks - ? _value.fileChunks - : fileChunks // ignore: cast_nullable_to_non_nullable - as Map, - fileChunksMissing: null == fileChunksMissing - ? _value.fileChunksMissing - : fileChunksMissing // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAttachmentFragment && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.rid, rid) || other.rid == rid) && + (identical(other.uuid, uuid) || other.uuid == uuid) && + (identical(other.size, size) || other.size == size) && + (identical(other.name, name) || other.name == name) && + (identical(other.alt, alt) || other.alt == alt) && + (identical(other.mimetype, mimetype) || + other.mimetype == mimetype) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.fingerprint, fingerprint) || + other.fingerprint == fingerprint) && + const DeepCollectionEquality() + .equals(other.fileChunks, fileChunks) && + const DeepCollectionEquality() + .equals(other.fileChunksMissing, fileChunksMissing)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + rid, + uuid, + size, + name, + alt, + mimetype, + hash, + fingerprint, + const DeepCollectionEquality().hash(fileChunks), + const DeepCollectionEquality().hash(fileChunksMissing)); + + @override + String toString() { + return 'SnAttachmentFragment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, fingerprint: $fingerprint, fileChunks: $fileChunks, fileChunksMissing: $fileChunksMissing)'; } } /// @nodoc -abstract class _$$SnAttachmentFragmentImplCopyWith<$Res> - implements $SnAttachmentFragmentCopyWith<$Res> { - factory _$$SnAttachmentFragmentImplCopyWith(_$SnAttachmentFragmentImpl value, - $Res Function(_$SnAttachmentFragmentImpl) then) = - __$$SnAttachmentFragmentImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAttachmentFragmentCopyWith<$Res> { + factory $SnAttachmentFragmentCopyWith(SnAttachmentFragment value, + $Res Function(SnAttachmentFragment) _then) = + _$SnAttachmentFragmentCopyWithImpl; @useResult $Res call( {int id, @@ -1086,12 +1056,12 @@ abstract class _$$SnAttachmentFragmentImplCopyWith<$Res> } /// @nodoc -class __$$SnAttachmentFragmentImplCopyWithImpl<$Res> - extends _$SnAttachmentFragmentCopyWithImpl<$Res, _$SnAttachmentFragmentImpl> - implements _$$SnAttachmentFragmentImplCopyWith<$Res> { - __$$SnAttachmentFragmentImplCopyWithImpl(_$SnAttachmentFragmentImpl _value, - $Res Function(_$SnAttachmentFragmentImpl) _then) - : super(_value, _then); +class _$SnAttachmentFragmentCopyWithImpl<$Res> + implements $SnAttachmentFragmentCopyWith<$Res> { + _$SnAttachmentFragmentCopyWithImpl(this._self, this._then); + + final SnAttachmentFragment _self; + final $Res Function(SnAttachmentFragment) _then; /// Create a copy of SnAttachmentFragment /// with the given fields replaced by the non-null parameter values. @@ -1113,61 +1083,61 @@ class __$$SnAttachmentFragmentImplCopyWithImpl<$Res> Object? fileChunks = null, Object? fileChunksMissing = null, }) { - return _then(_$SnAttachmentFragmentImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, rid: null == rid - ? _value.rid + ? _self.rid : rid // ignore: cast_nullable_to_non_nullable as String, uuid: null == uuid - ? _value.uuid + ? _self.uuid : uuid // ignore: cast_nullable_to_non_nullable as String, size: null == size - ? _value.size + ? _self.size : size // ignore: cast_nullable_to_non_nullable as int, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, alt: null == alt - ? _value.alt + ? _self.alt : alt // ignore: cast_nullable_to_non_nullable as String, mimetype: null == mimetype - ? _value.mimetype + ? _self.mimetype : mimetype // ignore: cast_nullable_to_non_nullable as String, hash: null == hash - ? _value.hash + ? _self.hash : hash // ignore: cast_nullable_to_non_nullable as String, fingerprint: freezed == fingerprint - ? _value.fingerprint + ? _self.fingerprint : fingerprint // ignore: cast_nullable_to_non_nullable as String?, fileChunks: null == fileChunks - ? _value._fileChunks + ? _self.fileChunks : fileChunks // ignore: cast_nullable_to_non_nullable as Map, fileChunksMissing: null == fileChunksMissing - ? _value._fileChunksMissing + ? _self.fileChunksMissing : fileChunksMissing // ignore: cast_nullable_to_non_nullable as List, )); @@ -1176,8 +1146,8 @@ class __$$SnAttachmentFragmentImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAttachmentFragmentImpl extends _SnAttachmentFragment { - const _$SnAttachmentFragmentImpl( +class _SnAttachmentFragment extends SnAttachmentFragment { + const _SnAttachmentFragment( {required this.id, required this.createdAt, required this.updatedAt, @@ -1195,9 +1165,8 @@ class _$SnAttachmentFragmentImpl extends _SnAttachmentFragment { : _fileChunks = fileChunks, _fileChunksMissing = fileChunksMissing, super._(); - - factory _$SnAttachmentFragmentImpl.fromJson(Map json) => - _$$SnAttachmentFragmentImplFromJson(json); + factory _SnAttachmentFragment.fromJson(Map json) => + _$SnAttachmentFragmentFromJson(json); @override final int id; @@ -1242,16 +1211,27 @@ class _$SnAttachmentFragmentImpl extends _SnAttachmentFragment { return EqualUnmodifiableListView(_fileChunksMissing); } + /// Create a copy of SnAttachmentFragment + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAttachmentFragment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, fingerprint: $fingerprint, fileChunks: $fileChunks, fileChunksMissing: $fileChunksMissing)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentFragmentCopyWith<_SnAttachmentFragment> get copyWith => + __$SnAttachmentFragmentCopyWithImpl<_SnAttachmentFragment>( + this, _$identity); + + @override + Map toJson() { + return _$SnAttachmentFragmentToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentFragmentImpl && + other is _SnAttachmentFragment && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1294,199 +1274,195 @@ class _$SnAttachmentFragmentImpl extends _SnAttachmentFragment { const DeepCollectionEquality().hash(_fileChunks), const DeepCollectionEquality().hash(_fileChunksMissing)); - /// Create a copy of SnAttachmentFragment - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAttachmentFragmentImplCopyWith<_$SnAttachmentFragmentImpl> - get copyWith => - __$$SnAttachmentFragmentImplCopyWithImpl<_$SnAttachmentFragmentImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAttachmentFragmentImplToJson( - this, - ); + String toString() { + return 'SnAttachmentFragment(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, rid: $rid, uuid: $uuid, size: $size, name: $name, alt: $alt, mimetype: $mimetype, hash: $hash, fingerprint: $fingerprint, fileChunks: $fileChunks, fileChunksMissing: $fileChunksMissing)'; } } -abstract class _SnAttachmentFragment extends SnAttachmentFragment { - const factory _SnAttachmentFragment( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String rid, - required final String uuid, - required final int size, - required final String name, - required final String alt, - required final String mimetype, - required final String hash, - final String? fingerprint, - final Map fileChunks, - final List fileChunksMissing}) = _$SnAttachmentFragmentImpl; - const _SnAttachmentFragment._() : super._(); +/// @nodoc +abstract mixin class _$SnAttachmentFragmentCopyWith<$Res> + implements $SnAttachmentFragmentCopyWith<$Res> { + factory _$SnAttachmentFragmentCopyWith(_SnAttachmentFragment value, + $Res Function(_SnAttachmentFragment) _then) = + __$SnAttachmentFragmentCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String rid, + String uuid, + int size, + String name, + String alt, + String mimetype, + String hash, + String? fingerprint, + Map fileChunks, + List fileChunksMissing}); +} - factory _SnAttachmentFragment.fromJson(Map json) = - _$SnAttachmentFragmentImpl.fromJson; +/// @nodoc +class __$SnAttachmentFragmentCopyWithImpl<$Res> + implements _$SnAttachmentFragmentCopyWith<$Res> { + __$SnAttachmentFragmentCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get rid; - @override - String get uuid; - @override - int get size; - @override - String get name; - @override - String get alt; - @override - String get mimetype; - @override - String get hash; - @override - String? get fingerprint; - @override - Map get fileChunks; - @override - List get fileChunksMissing; + final _SnAttachmentFragment _self; + final $Res Function(_SnAttachmentFragment) _then; /// Create a copy of SnAttachmentFragment /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentFragmentImplCopyWith<_$SnAttachmentFragmentImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SnAttachmentPool _$SnAttachmentPoolFromJson(Map json) { - return _SnAttachmentPool.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? rid = null, + Object? uuid = null, + Object? size = null, + Object? name = null, + Object? alt = null, + Object? mimetype = null, + Object? hash = null, + Object? fingerprint = freezed, + Object? fileChunks = null, + Object? fileChunksMissing = null, + }) { + return _then(_SnAttachmentFragment( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + rid: null == rid + ? _self.rid + : rid // ignore: cast_nullable_to_non_nullable + as String, + uuid: null == uuid + ? _self.uuid + : uuid // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _self.size + : size // ignore: cast_nullable_to_non_nullable + as int, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + alt: null == alt + ? _self.alt + : alt // ignore: cast_nullable_to_non_nullable + as String, + mimetype: null == mimetype + ? _self.mimetype + : mimetype // ignore: cast_nullable_to_non_nullable + as String, + hash: null == hash + ? _self.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + fingerprint: freezed == fingerprint + ? _self.fingerprint + : fingerprint // ignore: cast_nullable_to_non_nullable + as String?, + fileChunks: null == fileChunks + ? _self._fileChunks + : fileChunks // ignore: cast_nullable_to_non_nullable + as Map, + fileChunksMissing: null == fileChunksMissing + ? _self._fileChunksMissing + : fileChunksMissing // ignore: cast_nullable_to_non_nullable + as List, + )); + } } /// @nodoc mixin _$SnAttachmentPool { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - Map get config => throw _privateConstructorUsedError; - int? get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnAttachmentPool to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get alias; + String get name; + String get description; + Map get config; + int? get accountId; /// Create a copy of SnAttachmentPool /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAttachmentPoolCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAttachmentPoolCopyWith<$Res> { - factory $SnAttachmentPoolCopyWith( - SnAttachmentPool value, $Res Function(SnAttachmentPool) then) = - _$SnAttachmentPoolCopyWithImpl<$Res, SnAttachmentPool>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String alias, - String name, - String description, - Map config, - int? accountId}); -} - -/// @nodoc -class _$SnAttachmentPoolCopyWithImpl<$Res, $Val extends SnAttachmentPool> - implements $SnAttachmentPoolCopyWith<$Res> { - _$SnAttachmentPoolCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAttachmentPool - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAttachmentPoolCopyWith get copyWith => + _$SnAttachmentPoolCopyWithImpl( + this as SnAttachmentPool, _$identity); + + /// Serializes this SnAttachmentPool to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? config = null, - Object? accountId = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as Map, - accountId: freezed == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAttachmentPool && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.config, config) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + alias, + name, + description, + const DeepCollectionEquality().hash(config), + accountId); + + @override + String toString() { + return 'SnAttachmentPool(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, config: $config, accountId: $accountId)'; } } /// @nodoc -abstract class _$$SnAttachmentPoolImplCopyWith<$Res> - implements $SnAttachmentPoolCopyWith<$Res> { - factory _$$SnAttachmentPoolImplCopyWith(_$SnAttachmentPoolImpl value, - $Res Function(_$SnAttachmentPoolImpl) then) = - __$$SnAttachmentPoolImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAttachmentPoolCopyWith<$Res> { + factory $SnAttachmentPoolCopyWith( + SnAttachmentPool value, $Res Function(SnAttachmentPool) _then) = + _$SnAttachmentPoolCopyWithImpl; @useResult $Res call( {int id, @@ -1501,12 +1477,12 @@ abstract class _$$SnAttachmentPoolImplCopyWith<$Res> } /// @nodoc -class __$$SnAttachmentPoolImplCopyWithImpl<$Res> - extends _$SnAttachmentPoolCopyWithImpl<$Res, _$SnAttachmentPoolImpl> - implements _$$SnAttachmentPoolImplCopyWith<$Res> { - __$$SnAttachmentPoolImplCopyWithImpl(_$SnAttachmentPoolImpl _value, - $Res Function(_$SnAttachmentPoolImpl) _then) - : super(_value, _then); +class _$SnAttachmentPoolCopyWithImpl<$Res> + implements $SnAttachmentPoolCopyWith<$Res> { + _$SnAttachmentPoolCopyWithImpl(this._self, this._then); + + final SnAttachmentPool _self; + final $Res Function(SnAttachmentPool) _then; /// Create a copy of SnAttachmentPool /// with the given fields replaced by the non-null parameter values. @@ -1523,41 +1499,41 @@ class __$$SnAttachmentPoolImplCopyWithImpl<$Res> Object? config = null, Object? accountId = freezed, }) { - return _then(_$SnAttachmentPoolImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, alias: null == alias - ? _value.alias + ? _self.alias : alias // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, config: null == config - ? _value._config + ? _self.config : config // ignore: cast_nullable_to_non_nullable as Map, accountId: freezed == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int?, )); @@ -1566,8 +1542,8 @@ class __$$SnAttachmentPoolImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAttachmentPoolImpl implements _SnAttachmentPool { - const _$SnAttachmentPoolImpl( +class _SnAttachmentPool implements SnAttachmentPool { + const _SnAttachmentPool( {required this.id, required this.createdAt, required this.updatedAt, @@ -1578,9 +1554,8 @@ class _$SnAttachmentPoolImpl implements _SnAttachmentPool { required final Map config, required this.accountId}) : _config = config; - - factory _$SnAttachmentPoolImpl.fromJson(Map json) => - _$$SnAttachmentPoolImplFromJson(json); + factory _SnAttachmentPool.fromJson(Map json) => + _$SnAttachmentPoolFromJson(json); @override final int id; @@ -1607,16 +1582,26 @@ class _$SnAttachmentPoolImpl implements _SnAttachmentPool { @override final int? accountId; + /// Create a copy of SnAttachmentPool + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAttachmentPool(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, config: $config, accountId: $accountId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentPoolCopyWith<_SnAttachmentPool> get copyWith => + __$SnAttachmentPoolCopyWithImpl<_SnAttachmentPool>(this, _$identity); + + @override + Map toJson() { + return _$SnAttachmentPoolToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentPoolImpl && + other is _SnAttachmentPool && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1647,165 +1632,154 @@ class _$SnAttachmentPoolImpl implements _SnAttachmentPool { const DeepCollectionEquality().hash(_config), accountId); - /// Create a copy of SnAttachmentPool - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAttachmentPoolImplCopyWith<_$SnAttachmentPoolImpl> get copyWith => - __$$SnAttachmentPoolImplCopyWithImpl<_$SnAttachmentPoolImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAttachmentPoolImplToJson( - this, - ); + String toString() { + return 'SnAttachmentPool(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, config: $config, accountId: $accountId)'; } } -abstract class _SnAttachmentPool implements SnAttachmentPool { - const factory _SnAttachmentPool( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String alias, - required final String name, - required final String description, - required final Map config, - required final int? accountId}) = _$SnAttachmentPoolImpl; +/// @nodoc +abstract mixin class _$SnAttachmentPoolCopyWith<$Res> + implements $SnAttachmentPoolCopyWith<$Res> { + factory _$SnAttachmentPoolCopyWith( + _SnAttachmentPool value, $Res Function(_SnAttachmentPool) _then) = + __$SnAttachmentPoolCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String alias, + String name, + String description, + Map config, + int? accountId}); +} - factory _SnAttachmentPool.fromJson(Map json) = - _$SnAttachmentPoolImpl.fromJson; +/// @nodoc +class __$SnAttachmentPoolCopyWithImpl<$Res> + implements _$SnAttachmentPoolCopyWith<$Res> { + __$SnAttachmentPoolCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get alias; - @override - String get name; - @override - String get description; - @override - Map get config; - @override - int? get accountId; + final _SnAttachmentPool _self; + final $Res Function(_SnAttachmentPool) _then; /// Create a copy of SnAttachmentPool /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentPoolImplCopyWith<_$SnAttachmentPoolImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAttachmentDestination _$SnAttachmentDestinationFromJson( - Map json) { - return _SnAttachmentDestination.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? config = null, + Object? accountId = freezed, + }) { + return _then(_SnAttachmentPool( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + config: null == config + ? _self._config + : config // ignore: cast_nullable_to_non_nullable + as Map, + accountId: freezed == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int?, + )); + } } /// @nodoc mixin _$SnAttachmentDestination { - int get id => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - String get region => throw _privateConstructorUsedError; - bool get isBoost => throw _privateConstructorUsedError; - - /// Serializes this SnAttachmentDestination to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + String get type; + String get label; + String get region; + bool get isBoost; /// Create a copy of SnAttachmentDestination /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAttachmentDestinationCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAttachmentDestinationCopyWith<$Res> { - factory $SnAttachmentDestinationCopyWith(SnAttachmentDestination value, - $Res Function(SnAttachmentDestination) then) = - _$SnAttachmentDestinationCopyWithImpl<$Res, SnAttachmentDestination>; - @useResult - $Res call({int id, String type, String label, String region, bool isBoost}); -} - -/// @nodoc -class _$SnAttachmentDestinationCopyWithImpl<$Res, - $Val extends SnAttachmentDestination> - implements $SnAttachmentDestinationCopyWith<$Res> { - _$SnAttachmentDestinationCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAttachmentDestination - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAttachmentDestinationCopyWith get copyWith => + _$SnAttachmentDestinationCopyWithImpl( + this as SnAttachmentDestination, _$identity); + + /// Serializes this SnAttachmentDestination to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? type = null, - Object? label = null, - Object? region = null, - Object? isBoost = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - region: null == region - ? _value.region - : region // ignore: cast_nullable_to_non_nullable - as String, - isBoost: null == isBoost - ? _value.isBoost - : isBoost // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAttachmentDestination && + (identical(other.id, id) || other.id == id) && + (identical(other.type, type) || other.type == type) && + (identical(other.label, label) || other.label == label) && + (identical(other.region, region) || other.region == region) && + (identical(other.isBoost, isBoost) || other.isBoost == isBoost)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, id, type, label, region, isBoost); + + @override + String toString() { + return 'SnAttachmentDestination(id: $id, type: $type, label: $label, region: $region, isBoost: $isBoost)'; } } /// @nodoc -abstract class _$$SnAttachmentDestinationImplCopyWith<$Res> - implements $SnAttachmentDestinationCopyWith<$Res> { - factory _$$SnAttachmentDestinationImplCopyWith( - _$SnAttachmentDestinationImpl value, - $Res Function(_$SnAttachmentDestinationImpl) then) = - __$$SnAttachmentDestinationImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAttachmentDestinationCopyWith<$Res> { + factory $SnAttachmentDestinationCopyWith(SnAttachmentDestination value, + $Res Function(SnAttachmentDestination) _then) = + _$SnAttachmentDestinationCopyWithImpl; @useResult $Res call({int id, String type, String label, String region, bool isBoost}); } /// @nodoc -class __$$SnAttachmentDestinationImplCopyWithImpl<$Res> - extends _$SnAttachmentDestinationCopyWithImpl<$Res, - _$SnAttachmentDestinationImpl> - implements _$$SnAttachmentDestinationImplCopyWith<$Res> { - __$$SnAttachmentDestinationImplCopyWithImpl( - _$SnAttachmentDestinationImpl _value, - $Res Function(_$SnAttachmentDestinationImpl) _then) - : super(_value, _then); +class _$SnAttachmentDestinationCopyWithImpl<$Res> + implements $SnAttachmentDestinationCopyWith<$Res> { + _$SnAttachmentDestinationCopyWithImpl(this._self, this._then); + + final SnAttachmentDestination _self; + final $Res Function(SnAttachmentDestination) _then; /// Create a copy of SnAttachmentDestination /// with the given fields replaced by the non-null parameter values. @@ -1818,25 +1792,25 @@ class __$$SnAttachmentDestinationImplCopyWithImpl<$Res> Object? region = null, Object? isBoost = null, }) { - return _then(_$SnAttachmentDestinationImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, label: null == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, region: null == region - ? _value.region + ? _self.region : region // ignore: cast_nullable_to_non_nullable as String, isBoost: null == isBoost - ? _value.isBoost + ? _self.isBoost : isBoost // ignore: cast_nullable_to_non_nullable as bool, )); @@ -1845,16 +1819,15 @@ class __$$SnAttachmentDestinationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAttachmentDestinationImpl implements _SnAttachmentDestination { - const _$SnAttachmentDestinationImpl( +class _SnAttachmentDestination implements SnAttachmentDestination { + const _SnAttachmentDestination( {this.id = 0, required this.type, required this.label, required this.region, required this.isBoost}); - - factory _$SnAttachmentDestinationImpl.fromJson(Map json) => - _$$SnAttachmentDestinationImplFromJson(json); + factory _SnAttachmentDestination.fromJson(Map json) => + _$SnAttachmentDestinationFromJson(json); @override @JsonKey() @@ -1868,16 +1841,27 @@ class _$SnAttachmentDestinationImpl implements _SnAttachmentDestination { @override final bool isBoost; + /// Create a copy of SnAttachmentDestination + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAttachmentDestination(id: $id, type: $type, label: $label, region: $region, isBoost: $isBoost)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentDestinationCopyWith<_SnAttachmentDestination> get copyWith => + __$SnAttachmentDestinationCopyWithImpl<_SnAttachmentDestination>( + this, _$identity); + + @override + Map toJson() { + return _$SnAttachmentDestinationToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentDestinationImpl && + other is _SnAttachmentDestination && (identical(other.id, id) || other.id == id) && (identical(other.type, type) || other.type == type) && (identical(other.label, label) || other.label == label) && @@ -1890,308 +1874,95 @@ class _$SnAttachmentDestinationImpl implements _SnAttachmentDestination { int get hashCode => Object.hash(runtimeType, id, type, label, region, isBoost); - /// Create a copy of SnAttachmentDestination - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAttachmentDestinationImplCopyWith<_$SnAttachmentDestinationImpl> - get copyWith => __$$SnAttachmentDestinationImplCopyWithImpl< - _$SnAttachmentDestinationImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAttachmentDestinationImplToJson( - this, - ); + String toString() { + return 'SnAttachmentDestination(id: $id, type: $type, label: $label, region: $region, isBoost: $isBoost)'; } } -abstract class _SnAttachmentDestination implements SnAttachmentDestination { - const factory _SnAttachmentDestination( - {final int id, - required final String type, - required final String label, - required final String region, - required final bool isBoost}) = _$SnAttachmentDestinationImpl; +/// @nodoc +abstract mixin class _$SnAttachmentDestinationCopyWith<$Res> + implements $SnAttachmentDestinationCopyWith<$Res> { + factory _$SnAttachmentDestinationCopyWith(_SnAttachmentDestination value, + $Res Function(_SnAttachmentDestination) _then) = + __$SnAttachmentDestinationCopyWithImpl; + @override + @useResult + $Res call({int id, String type, String label, String region, bool isBoost}); +} - factory _SnAttachmentDestination.fromJson(Map json) = - _$SnAttachmentDestinationImpl.fromJson; +/// @nodoc +class __$SnAttachmentDestinationCopyWithImpl<$Res> + implements _$SnAttachmentDestinationCopyWith<$Res> { + __$SnAttachmentDestinationCopyWithImpl(this._self, this._then); - @override - int get id; - @override - String get type; - @override - String get label; - @override - String get region; - @override - bool get isBoost; + final _SnAttachmentDestination _self; + final $Res Function(_SnAttachmentDestination) _then; /// Create a copy of SnAttachmentDestination /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentDestinationImplCopyWith<_$SnAttachmentDestinationImpl> - get copyWith => throw _privateConstructorUsedError; -} - -SnAttachmentBoost _$SnAttachmentBoostFromJson(Map json) { - return _SnAttachmentBoost.fromJson(json); -} - -/// @nodoc -mixin _$SnAttachmentBoost { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get status => throw _privateConstructorUsedError; - int get destination => throw _privateConstructorUsedError; - int get attachmentId => throw _privateConstructorUsedError; - SnAttachment get attachment => throw _privateConstructorUsedError; - int get account => throw _privateConstructorUsedError; - - /// Serializes this SnAttachmentBoost to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnAttachmentBoostCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAttachmentBoostCopyWith<$Res> { - factory $SnAttachmentBoostCopyWith( - SnAttachmentBoost value, $Res Function(SnAttachmentBoost) then) = - _$SnAttachmentBoostCopyWithImpl<$Res, SnAttachmentBoost>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int status, - int destination, - int attachmentId, - SnAttachment attachment, - int account}); - - $SnAttachmentCopyWith<$Res> get attachment; -} - -/// @nodoc -class _$SnAttachmentBoostCopyWithImpl<$Res, $Val extends SnAttachmentBoost> - implements $SnAttachmentBoostCopyWith<$Res> { - _$SnAttachmentBoostCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') - @override $Res call({ Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? status = null, - Object? destination = null, - Object? attachmentId = null, - Object? attachment = null, - Object? account = null, + Object? type = null, + Object? label = null, + Object? region = null, + Object? isBoost = null, }) { - return _then(_value.copyWith( + return _then(_SnAttachmentDestination( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as int, - destination: null == destination - ? _value.destination - : destination // ignore: cast_nullable_to_non_nullable - as int, - attachmentId: null == attachmentId - ? _value.attachmentId - : attachmentId // ignore: cast_nullable_to_non_nullable - as int, - attachment: null == attachment - ? _value.attachment - : attachment // ignore: cast_nullable_to_non_nullable - as SnAttachment, - account: null == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } - - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnAttachmentCopyWith<$Res> get attachment { - return $SnAttachmentCopyWith<$Res>(_value.attachment, (value) { - return _then(_value.copyWith(attachment: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SnAttachmentBoostImplCopyWith<$Res> - implements $SnAttachmentBoostCopyWith<$Res> { - factory _$$SnAttachmentBoostImplCopyWith(_$SnAttachmentBoostImpl value, - $Res Function(_$SnAttachmentBoostImpl) then) = - __$$SnAttachmentBoostImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int status, - int destination, - int attachmentId, - SnAttachment attachment, - int account}); - - @override - $SnAttachmentCopyWith<$Res> get attachment; -} - -/// @nodoc -class __$$SnAttachmentBoostImplCopyWithImpl<$Res> - extends _$SnAttachmentBoostCopyWithImpl<$Res, _$SnAttachmentBoostImpl> - implements _$$SnAttachmentBoostImplCopyWith<$Res> { - __$$SnAttachmentBoostImplCopyWithImpl(_$SnAttachmentBoostImpl _value, - $Res Function(_$SnAttachmentBoostImpl) _then) - : super(_value, _then); - - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? status = null, - Object? destination = null, - Object? attachmentId = null, - Object? attachment = null, - Object? account = null, - }) { - return _then(_$SnAttachmentBoostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as int, - destination: null == destination - ? _value.destination - : destination // ignore: cast_nullable_to_non_nullable - as int, - attachmentId: null == attachmentId - ? _value.attachmentId - : attachmentId // ignore: cast_nullable_to_non_nullable - as int, - attachment: null == attachment - ? _value.attachment - : attachment // ignore: cast_nullable_to_non_nullable - as SnAttachment, - account: null == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as int, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + label: null == label + ? _self.label + : label // ignore: cast_nullable_to_non_nullable + as String, + region: null == region + ? _self.region + : region // ignore: cast_nullable_to_non_nullable + as String, + isBoost: null == isBoost + ? _self.isBoost + : isBoost // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc -@JsonSerializable() -class _$SnAttachmentBoostImpl implements _SnAttachmentBoost { - const _$SnAttachmentBoostImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.status, - required this.destination, - required this.attachmentId, - required this.attachment, - required this.account}); +mixin _$SnAttachmentBoost { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get status; + int get destination; + int get attachmentId; + SnAttachment get attachment; + int get account; - factory _$SnAttachmentBoostImpl.fromJson(Map json) => - _$$SnAttachmentBoostImplFromJson(json); + /// Create a copy of SnAttachmentBoost + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnAttachmentBoostCopyWith get copyWith => + _$SnAttachmentBoostCopyWithImpl( + this as SnAttachmentBoost, _$identity); - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final int status; - @override - final int destination; - @override - final int attachmentId; - @override - final SnAttachment attachment; - @override - final int account; - - @override - String toString() { - return 'SnAttachmentBoost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, status: $status, destination: $destination, attachmentId: $attachmentId, attachment: $attachment, account: $account)'; - } + /// Serializes this SnAttachmentBoost to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentBoostImpl && + other is SnAttachmentBoost && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -2214,126 +1985,41 @@ class _$SnAttachmentBoostImpl implements _SnAttachmentBoost { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, status, destination, attachmentId, attachment, account); - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAttachmentBoostImplCopyWith<_$SnAttachmentBoostImpl> get copyWith => - __$$SnAttachmentBoostImplCopyWithImpl<_$SnAttachmentBoostImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnAttachmentBoostImplToJson( - this, - ); + String toString() { + return 'SnAttachmentBoost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, status: $status, destination: $destination, attachmentId: $attachmentId, attachment: $attachment, account: $account)'; } } -abstract class _SnAttachmentBoost implements SnAttachmentBoost { - const factory _SnAttachmentBoost( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int status, - required final int destination, - required final int attachmentId, - required final SnAttachment attachment, - required final int account}) = _$SnAttachmentBoostImpl; - - factory _SnAttachmentBoost.fromJson(Map json) = - _$SnAttachmentBoostImpl.fromJson; - - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get status; - @override - int get destination; - @override - int get attachmentId; - @override - SnAttachment get attachment; - @override - int get account; - - /// Create a copy of SnAttachmentBoost - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentBoostImplCopyWith<_$SnAttachmentBoostImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnSticker _$SnStickerFromJson(Map json) { - return _SnSticker.fromJson(json); -} - /// @nodoc -mixin _$SnSticker { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - int get attachmentId => throw _privateConstructorUsedError; - SnAttachment get attachment => throw _privateConstructorUsedError; - int get packId => throw _privateConstructorUsedError; - SnStickerPack get pack => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnSticker to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnSticker - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnStickerCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnStickerCopyWith<$Res> { - factory $SnStickerCopyWith(SnSticker value, $Res Function(SnSticker) then) = - _$SnStickerCopyWithImpl<$Res, SnSticker>; +abstract mixin class $SnAttachmentBoostCopyWith<$Res> { + factory $SnAttachmentBoostCopyWith( + SnAttachmentBoost value, $Res Function(SnAttachmentBoost) _then) = + _$SnAttachmentBoostCopyWithImpl; @useResult $Res call( {int id, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, - String alias, - String name, + int status, + int destination, int attachmentId, SnAttachment attachment, - int packId, - SnStickerPack pack, - int accountId}); + int account}); $SnAttachmentCopyWith<$Res> get attachment; - $SnStickerPackCopyWith<$Res> get pack; } /// @nodoc -class _$SnStickerCopyWithImpl<$Res, $Val extends SnSticker> - implements $SnStickerCopyWith<$Res> { - _$SnStickerCopyWithImpl(this._value, this._then); +class _$SnAttachmentBoostCopyWithImpl<$Res> + implements $SnAttachmentBoostCopyWith<$Res> { + _$SnAttachmentBoostCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnAttachmentBoost _self; + final $Res Function(SnAttachmentBoost) _then; - /// Create a copy of SnSticker + /// Create a copy of SnAttachmentBoost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -2342,202 +2028,78 @@ class _$SnStickerCopyWithImpl<$Res, $Val extends SnSticker> Object? createdAt = null, Object? updatedAt = null, Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, + Object? status = null, + Object? destination = null, Object? attachmentId = null, Object? attachment = null, - Object? packId = null, - Object? pack = null, - Object? accountId = null, + Object? account = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as int, + destination: null == destination + ? _self.destination + : destination // ignore: cast_nullable_to_non_nullable + as int, attachmentId: null == attachmentId - ? _value.attachmentId + ? _self.attachmentId : attachmentId // ignore: cast_nullable_to_non_nullable as int, attachment: null == attachment - ? _value.attachment + ? _self.attachment : attachment // ignore: cast_nullable_to_non_nullable as SnAttachment, - packId: null == packId - ? _value.packId - : packId // ignore: cast_nullable_to_non_nullable + account: null == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable as int, - pack: null == pack - ? _value.pack - : pack // ignore: cast_nullable_to_non_nullable - as SnStickerPack, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + )); } - /// Create a copy of SnSticker + /// Create a copy of SnAttachmentBoost /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res> get attachment { - return $SnAttachmentCopyWith<$Res>(_value.attachment, (value) { - return _then(_value.copyWith(attachment: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); }); } - - /// Create a copy of SnSticker - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnStickerPackCopyWith<$Res> get pack { - return $SnStickerPackCopyWith<$Res>(_value.pack, (value) { - return _then(_value.copyWith(pack: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SnStickerImplCopyWith<$Res> - implements $SnStickerCopyWith<$Res> { - factory _$$SnStickerImplCopyWith( - _$SnStickerImpl value, $Res Function(_$SnStickerImpl) then) = - __$$SnStickerImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String alias, - String name, - int attachmentId, - SnAttachment attachment, - int packId, - SnStickerPack pack, - int accountId}); - - @override - $SnAttachmentCopyWith<$Res> get attachment; - @override - $SnStickerPackCopyWith<$Res> get pack; -} - -/// @nodoc -class __$$SnStickerImplCopyWithImpl<$Res> - extends _$SnStickerCopyWithImpl<$Res, _$SnStickerImpl> - implements _$$SnStickerImplCopyWith<$Res> { - __$$SnStickerImplCopyWithImpl( - _$SnStickerImpl _value, $Res Function(_$SnStickerImpl) _then) - : super(_value, _then); - - /// Create a copy of SnSticker - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? attachmentId = null, - Object? attachment = null, - Object? packId = null, - Object? pack = null, - Object? accountId = null, - }) { - return _then(_$SnStickerImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - attachmentId: null == attachmentId - ? _value.attachmentId - : attachmentId // ignore: cast_nullable_to_non_nullable - as int, - attachment: null == attachment - ? _value.attachment - : attachment // ignore: cast_nullable_to_non_nullable - as SnAttachment, - packId: null == packId - ? _value.packId - : packId // ignore: cast_nullable_to_non_nullable - as int, - pack: null == pack - ? _value.pack - : pack // ignore: cast_nullable_to_non_nullable - as SnStickerPack, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } } /// @nodoc @JsonSerializable() -class _$SnStickerImpl implements _SnSticker { - const _$SnStickerImpl( +class _SnAttachmentBoost implements SnAttachmentBoost { + const _SnAttachmentBoost( {required this.id, required this.createdAt, required this.updatedAt, required this.deletedAt, - required this.alias, - required this.name, + required this.status, + required this.destination, required this.attachmentId, required this.attachment, - required this.packId, - required this.pack, - required this.accountId}); - - factory _$SnStickerImpl.fromJson(Map json) => - _$$SnStickerImplFromJson(json); + required this.account}); + factory _SnAttachmentBoost.fromJson(Map json) => + _$SnAttachmentBoostFromJson(json); @override final int id; @@ -2548,30 +2110,190 @@ class _$SnStickerImpl implements _SnSticker { @override final DateTime? deletedAt; @override - final String alias; + final int status; @override - final String name; + final int destination; @override final int attachmentId; @override final SnAttachment attachment; @override - final int packId; + final int account; + + /// Create a copy of SnAttachmentBoost + /// with the given fields replaced by the non-null parameter values. @override - final SnStickerPack pack; - @override - final int accountId; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentBoostCopyWith<_SnAttachmentBoost> get copyWith => + __$SnAttachmentBoostCopyWithImpl<_SnAttachmentBoost>(this, _$identity); @override - String toString() { - return 'SnSticker(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, attachmentId: $attachmentId, attachment: $attachment, packId: $packId, pack: $pack, accountId: $accountId)'; + Map toJson() { + return _$SnAttachmentBoostToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnStickerImpl && + other is _SnAttachmentBoost && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.status, status) || other.status == status) && + (identical(other.destination, destination) || + other.destination == destination) && + (identical(other.attachmentId, attachmentId) || + other.attachmentId == attachmentId) && + (identical(other.attachment, attachment) || + other.attachment == attachment) && + (identical(other.account, account) || other.account == account)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, status, destination, attachmentId, attachment, account); + + @override + String toString() { + return 'SnAttachmentBoost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, status: $status, destination: $destination, attachmentId: $attachmentId, attachment: $attachment, account: $account)'; + } +} + +/// @nodoc +abstract mixin class _$SnAttachmentBoostCopyWith<$Res> + implements $SnAttachmentBoostCopyWith<$Res> { + factory _$SnAttachmentBoostCopyWith( + _SnAttachmentBoost value, $Res Function(_SnAttachmentBoost) _then) = + __$SnAttachmentBoostCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int status, + int destination, + int attachmentId, + SnAttachment attachment, + int account}); + + @override + $SnAttachmentCopyWith<$Res> get attachment; +} + +/// @nodoc +class __$SnAttachmentBoostCopyWithImpl<$Res> + implements _$SnAttachmentBoostCopyWith<$Res> { + __$SnAttachmentBoostCopyWithImpl(this._self, this._then); + + final _SnAttachmentBoost _self; + final $Res Function(_SnAttachmentBoost) _then; + + /// Create a copy of SnAttachmentBoost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? status = null, + Object? destination = null, + Object? attachmentId = null, + Object? attachment = null, + Object? account = null, + }) { + return _then(_SnAttachmentBoost( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as int, + destination: null == destination + ? _self.destination + : destination // ignore: cast_nullable_to_non_nullable + as int, + attachmentId: null == attachmentId + ? _self.attachmentId + : attachmentId // ignore: cast_nullable_to_non_nullable + as int, + attachment: null == attachment + ? _self.attachment + : attachment // ignore: cast_nullable_to_non_nullable + as SnAttachment, + account: null == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as int, + )); + } + + /// Create a copy of SnAttachmentBoost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res> get attachment { + return $SnAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); + }); + } +} + +/// @nodoc +mixin _$SnSticker { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get alias; + String get name; + int get attachmentId; + SnAttachment get attachment; + int get packId; + SnStickerPack get pack; + int get accountId; + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnStickerCopyWith get copyWith => + _$SnStickerCopyWithImpl(this as SnSticker, _$identity); + + /// Serializes this SnSticker to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnSticker && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -2607,187 +2329,418 @@ class _$SnStickerImpl implements _SnSticker { pack, accountId); - /// Create a copy of SnSticker - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnStickerImplCopyWith<_$SnStickerImpl> get copyWith => - __$$SnStickerImplCopyWithImpl<_$SnStickerImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnStickerImplToJson( - this, - ); + String toString() { + return 'SnSticker(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, attachmentId: $attachmentId, attachment: $attachment, packId: $packId, pack: $pack, accountId: $accountId)'; } } -abstract class _SnSticker implements SnSticker { - const factory _SnSticker( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String alias, - required final String name, - required final int attachmentId, - required final SnAttachment attachment, - required final int packId, - required final SnStickerPack pack, - required final int accountId}) = _$SnStickerImpl; +/// @nodoc +abstract mixin class $SnStickerCopyWith<$Res> { + factory $SnStickerCopyWith(SnSticker value, $Res Function(SnSticker) _then) = + _$SnStickerCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String alias, + String name, + int attachmentId, + SnAttachment attachment, + int packId, + SnStickerPack pack, + int accountId}); - factory _SnSticker.fromJson(Map json) = - _$SnStickerImpl.fromJson; + $SnAttachmentCopyWith<$Res> get attachment; + $SnStickerPackCopyWith<$Res> get pack; +} + +/// @nodoc +class _$SnStickerCopyWithImpl<$Res> implements $SnStickerCopyWith<$Res> { + _$SnStickerCopyWithImpl(this._self, this._then); + + final SnSticker _self; + final $Res Function(SnSticker) _then; + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? attachmentId = null, + Object? attachment = null, + Object? packId = null, + Object? pack = null, + Object? accountId = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + attachmentId: null == attachmentId + ? _self.attachmentId + : attachmentId // ignore: cast_nullable_to_non_nullable + as int, + attachment: null == attachment + ? _self.attachment + : attachment // ignore: cast_nullable_to_non_nullable + as SnAttachment, + packId: null == packId + ? _self.packId + : packId // ignore: cast_nullable_to_non_nullable + as int, + pack: null == pack + ? _self.pack + : pack // ignore: cast_nullable_to_non_nullable + as SnStickerPack, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res> get attachment { + return $SnAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); + }); + } + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnStickerPackCopyWith<$Res> get pack { + return $SnStickerPackCopyWith<$Res>(_self.pack, (value) { + return _then(_self.copyWith(pack: value)); + }); + } +} + +/// @nodoc +@JsonSerializable() +class _SnSticker implements SnSticker { + const _SnSticker( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.alias, + required this.name, + required this.attachmentId, + required this.attachment, + required this.packId, + required this.pack, + required this.accountId}); + factory _SnSticker.fromJson(Map json) => + _$SnStickerFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - String get alias; + final String alias; @override - String get name; + final String name; @override - int get attachmentId; + final int attachmentId; @override - SnAttachment get attachment; + final SnAttachment attachment; @override - int get packId; + final int packId; @override - SnStickerPack get pack; + final SnStickerPack pack; @override - int get accountId; + final int accountId; /// Create a copy of SnSticker /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnStickerImplCopyWith<_$SnStickerImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnStickerCopyWith<_SnSticker> get copyWith => + __$SnStickerCopyWithImpl<_SnSticker>(this, _$identity); + + @override + Map toJson() { + return _$SnStickerToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnSticker && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.attachmentId, attachmentId) || + other.attachmentId == attachmentId) && + (identical(other.attachment, attachment) || + other.attachment == attachment) && + (identical(other.packId, packId) || other.packId == packId) && + (identical(other.pack, pack) || other.pack == pack) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + alias, + name, + attachmentId, + attachment, + packId, + pack, + accountId); + + @override + String toString() { + return 'SnSticker(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, attachmentId: $attachmentId, attachment: $attachment, packId: $packId, pack: $pack, accountId: $accountId)'; + } } -SnStickerPack _$SnStickerPackFromJson(Map json) { - return _SnStickerPack.fromJson(json); +/// @nodoc +abstract mixin class _$SnStickerCopyWith<$Res> + implements $SnStickerCopyWith<$Res> { + factory _$SnStickerCopyWith( + _SnSticker value, $Res Function(_SnSticker) _then) = + __$SnStickerCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String alias, + String name, + int attachmentId, + SnAttachment attachment, + int packId, + SnStickerPack pack, + int accountId}); + + @override + $SnAttachmentCopyWith<$Res> get attachment; + @override + $SnStickerPackCopyWith<$Res> get pack; +} + +/// @nodoc +class __$SnStickerCopyWithImpl<$Res> implements _$SnStickerCopyWith<$Res> { + __$SnStickerCopyWithImpl(this._self, this._then); + + final _SnSticker _self; + final $Res Function(_SnSticker) _then; + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? attachmentId = null, + Object? attachment = null, + Object? packId = null, + Object? pack = null, + Object? accountId = null, + }) { + return _then(_SnSticker( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + attachmentId: null == attachmentId + ? _self.attachmentId + : attachmentId // ignore: cast_nullable_to_non_nullable + as int, + attachment: null == attachment + ? _self.attachment + : attachment // ignore: cast_nullable_to_non_nullable + as SnAttachment, + packId: null == packId + ? _self.packId + : packId // ignore: cast_nullable_to_non_nullable + as int, + pack: null == pack + ? _self.pack + : pack // ignore: cast_nullable_to_non_nullable + as SnStickerPack, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res> get attachment { + return $SnAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); + }); + } + + /// Create a copy of SnSticker + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnStickerPackCopyWith<$Res> get pack { + return $SnStickerPackCopyWith<$Res>(_self.pack, (value) { + return _then(_self.copyWith(pack: value)); + }); + } } /// @nodoc mixin _$SnStickerPack { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get prefix => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - List? get stickers => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnStickerPack to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get prefix; + String get name; + String get description; + List? get stickers; + int get accountId; /// Create a copy of SnStickerPack /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnStickerPackCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnStickerPackCopyWith<$Res> { - factory $SnStickerPackCopyWith( - SnStickerPack value, $Res Function(SnStickerPack) then) = - _$SnStickerPackCopyWithImpl<$Res, SnStickerPack>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String prefix, - String name, - String description, - List? stickers, - int accountId}); -} - -/// @nodoc -class _$SnStickerPackCopyWithImpl<$Res, $Val extends SnStickerPack> - implements $SnStickerPackCopyWith<$Res> { - _$SnStickerPackCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnStickerPack - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnStickerPackCopyWith get copyWith => + _$SnStickerPackCopyWithImpl( + this as SnStickerPack, _$identity); + + /// Serializes this SnStickerPack to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? prefix = null, - Object? name = null, - Object? description = null, - Object? stickers = freezed, - Object? accountId = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - prefix: null == prefix - ? _value.prefix - : prefix // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - stickers: freezed == stickers - ? _value.stickers - : stickers // ignore: cast_nullable_to_non_nullable - as List?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnStickerPack && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.prefix, prefix) || other.prefix == prefix) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.stickers, stickers) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + prefix, + name, + description, + const DeepCollectionEquality().hash(stickers), + accountId); + + @override + String toString() { + return 'SnStickerPack(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, prefix: $prefix, name: $name, description: $description, stickers: $stickers, accountId: $accountId)'; } } /// @nodoc -abstract class _$$SnStickerPackImplCopyWith<$Res> - implements $SnStickerPackCopyWith<$Res> { - factory _$$SnStickerPackImplCopyWith( - _$SnStickerPackImpl value, $Res Function(_$SnStickerPackImpl) then) = - __$$SnStickerPackImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnStickerPackCopyWith<$Res> { + factory $SnStickerPackCopyWith( + SnStickerPack value, $Res Function(SnStickerPack) _then) = + _$SnStickerPackCopyWithImpl; @useResult $Res call( {int id, @@ -2802,12 +2755,12 @@ abstract class _$$SnStickerPackImplCopyWith<$Res> } /// @nodoc -class __$$SnStickerPackImplCopyWithImpl<$Res> - extends _$SnStickerPackCopyWithImpl<$Res, _$SnStickerPackImpl> - implements _$$SnStickerPackImplCopyWith<$Res> { - __$$SnStickerPackImplCopyWithImpl( - _$SnStickerPackImpl _value, $Res Function(_$SnStickerPackImpl) _then) - : super(_value, _then); +class _$SnStickerPackCopyWithImpl<$Res> + implements $SnStickerPackCopyWith<$Res> { + _$SnStickerPackCopyWithImpl(this._self, this._then); + + final SnStickerPack _self; + final $Res Function(SnStickerPack) _then; /// Create a copy of SnStickerPack /// with the given fields replaced by the non-null parameter values. @@ -2824,41 +2777,41 @@ class __$$SnStickerPackImplCopyWithImpl<$Res> Object? stickers = freezed, Object? accountId = null, }) { - return _then(_$SnStickerPackImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, prefix: null == prefix - ? _value.prefix + ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, stickers: freezed == stickers - ? _value._stickers + ? _self.stickers : stickers // ignore: cast_nullable_to_non_nullable as List?, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, )); @@ -2867,8 +2820,8 @@ class __$$SnStickerPackImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnStickerPackImpl implements _SnStickerPack { - const _$SnStickerPackImpl( +class _SnStickerPack implements SnStickerPack { + const _SnStickerPack( {required this.id, required this.createdAt, required this.updatedAt, @@ -2879,9 +2832,8 @@ class _$SnStickerPackImpl implements _SnStickerPack { required final List? stickers, required this.accountId}) : _stickers = stickers; - - factory _$SnStickerPackImpl.fromJson(Map json) => - _$$SnStickerPackImplFromJson(json); + factory _SnStickerPack.fromJson(Map json) => + _$SnStickerPackFromJson(json); @override final int id; @@ -2910,16 +2862,26 @@ class _$SnStickerPackImpl implements _SnStickerPack { @override final int accountId; + /// Create a copy of SnStickerPack + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnStickerPack(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, prefix: $prefix, name: $name, description: $description, stickers: $stickers, accountId: $accountId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnStickerPackCopyWith<_SnStickerPack> get copyWith => + __$SnStickerPackCopyWithImpl<_SnStickerPack>(this, _$identity); + + @override + Map toJson() { + return _$SnStickerPackToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnStickerPackImpl && + other is _SnStickerPack && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -2950,202 +2912,118 @@ class _$SnStickerPackImpl implements _SnStickerPack { const DeepCollectionEquality().hash(_stickers), accountId); - /// Create a copy of SnStickerPack - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnStickerPackImplCopyWith<_$SnStickerPackImpl> get copyWith => - __$$SnStickerPackImplCopyWithImpl<_$SnStickerPackImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnStickerPackImplToJson( - this, - ); - } -} - -abstract class _SnStickerPack implements SnStickerPack { - const factory _SnStickerPack( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String prefix, - required final String name, - required final String description, - required final List? stickers, - required final int accountId}) = _$SnStickerPackImpl; - - factory _SnStickerPack.fromJson(Map json) = - _$SnStickerPackImpl.fromJson; - - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get prefix; - @override - String get name; - @override - String get description; - @override - List? get stickers; - @override - int get accountId; - - /// Create a copy of SnStickerPack - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnStickerPackImplCopyWith<_$SnStickerPackImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAttachmentBilling _$SnAttachmentBillingFromJson(Map json) { - return _SnAttachmentBilling.fromJson(json); -} - -/// @nodoc -mixin _$SnAttachmentBilling { - int get currentBytes => throw _privateConstructorUsedError; - int get discountFileSize => throw _privateConstructorUsedError; - double get includedRatio => throw _privateConstructorUsedError; - - /// Serializes this SnAttachmentBilling to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnAttachmentBilling - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnAttachmentBillingCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAttachmentBillingCopyWith<$Res> { - factory $SnAttachmentBillingCopyWith( - SnAttachmentBilling value, $Res Function(SnAttachmentBilling) then) = - _$SnAttachmentBillingCopyWithImpl<$Res, SnAttachmentBilling>; - @useResult - $Res call({int currentBytes, int discountFileSize, double includedRatio}); -} - -/// @nodoc -class _$SnAttachmentBillingCopyWithImpl<$Res, $Val extends SnAttachmentBilling> - implements $SnAttachmentBillingCopyWith<$Res> { - _$SnAttachmentBillingCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAttachmentBilling - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? currentBytes = null, - Object? discountFileSize = null, - Object? includedRatio = null, - }) { - return _then(_value.copyWith( - currentBytes: null == currentBytes - ? _value.currentBytes - : currentBytes // ignore: cast_nullable_to_non_nullable - as int, - discountFileSize: null == discountFileSize - ? _value.discountFileSize - : discountFileSize // ignore: cast_nullable_to_non_nullable - as int, - includedRatio: null == includedRatio - ? _value.includedRatio - : includedRatio // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + String toString() { + return 'SnStickerPack(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, prefix: $prefix, name: $name, description: $description, stickers: $stickers, accountId: $accountId)'; } } /// @nodoc -abstract class _$$SnAttachmentBillingImplCopyWith<$Res> - implements $SnAttachmentBillingCopyWith<$Res> { - factory _$$SnAttachmentBillingImplCopyWith(_$SnAttachmentBillingImpl value, - $Res Function(_$SnAttachmentBillingImpl) then) = - __$$SnAttachmentBillingImplCopyWithImpl<$Res>; +abstract mixin class _$SnStickerPackCopyWith<$Res> + implements $SnStickerPackCopyWith<$Res> { + factory _$SnStickerPackCopyWith( + _SnStickerPack value, $Res Function(_SnStickerPack) _then) = + __$SnStickerPackCopyWithImpl; @override @useResult - $Res call({int currentBytes, int discountFileSize, double includedRatio}); + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String prefix, + String name, + String description, + List? stickers, + int accountId}); } /// @nodoc -class __$$SnAttachmentBillingImplCopyWithImpl<$Res> - extends _$SnAttachmentBillingCopyWithImpl<$Res, _$SnAttachmentBillingImpl> - implements _$$SnAttachmentBillingImplCopyWith<$Res> { - __$$SnAttachmentBillingImplCopyWithImpl(_$SnAttachmentBillingImpl _value, - $Res Function(_$SnAttachmentBillingImpl) _then) - : super(_value, _then); +class __$SnStickerPackCopyWithImpl<$Res> + implements _$SnStickerPackCopyWith<$Res> { + __$SnStickerPackCopyWithImpl(this._self, this._then); - /// Create a copy of SnAttachmentBilling + final _SnStickerPack _self; + final $Res Function(_SnStickerPack) _then; + + /// Create a copy of SnStickerPack /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? currentBytes = null, - Object? discountFileSize = null, - Object? includedRatio = null, + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? prefix = null, + Object? name = null, + Object? description = null, + Object? stickers = freezed, + Object? accountId = null, }) { - return _then(_$SnAttachmentBillingImpl( - currentBytes: null == currentBytes - ? _value.currentBytes - : currentBytes // ignore: cast_nullable_to_non_nullable + return _then(_SnStickerPack( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable as int, - discountFileSize: null == discountFileSize - ? _value.discountFileSize - : discountFileSize // ignore: cast_nullable_to_non_nullable + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + prefix: null == prefix + ? _self.prefix + : prefix // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + stickers: freezed == stickers + ? _self._stickers + : stickers // ignore: cast_nullable_to_non_nullable + as List?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable as int, - includedRatio: null == includedRatio - ? _value.includedRatio - : includedRatio // ignore: cast_nullable_to_non_nullable - as double, )); } } /// @nodoc -@JsonSerializable() -class _$SnAttachmentBillingImpl implements _SnAttachmentBilling { - const _$SnAttachmentBillingImpl( - {required this.currentBytes, - required this.discountFileSize, - required this.includedRatio}); +mixin _$SnAttachmentBilling { + int get currentBytes; + int get discountFileSize; + double get includedRatio; - factory _$SnAttachmentBillingImpl.fromJson(Map json) => - _$$SnAttachmentBillingImplFromJson(json); + /// Create a copy of SnAttachmentBilling + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnAttachmentBillingCopyWith get copyWith => + _$SnAttachmentBillingCopyWithImpl( + this as SnAttachmentBilling, _$identity); - @override - final int currentBytes; - @override - final int discountFileSize; - @override - final double includedRatio; - - @override - String toString() { - return 'SnAttachmentBilling(currentBytes: $currentBytes, discountFileSize: $discountFileSize, includedRatio: $includedRatio)'; - } + /// Serializes this SnAttachmentBilling to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAttachmentBillingImpl && + other is SnAttachmentBilling && (identical(other.currentBytes, currentBytes) || other.currentBytes == currentBytes) && (identical(other.discountFileSize, discountFileSize) || @@ -3159,43 +3037,155 @@ class _$SnAttachmentBillingImpl implements _SnAttachmentBilling { int get hashCode => Object.hash(runtimeType, currentBytes, discountFileSize, includedRatio); + @override + String toString() { + return 'SnAttachmentBilling(currentBytes: $currentBytes, discountFileSize: $discountFileSize, includedRatio: $includedRatio)'; + } +} + +/// @nodoc +abstract mixin class $SnAttachmentBillingCopyWith<$Res> { + factory $SnAttachmentBillingCopyWith( + SnAttachmentBilling value, $Res Function(SnAttachmentBilling) _then) = + _$SnAttachmentBillingCopyWithImpl; + @useResult + $Res call({int currentBytes, int discountFileSize, double includedRatio}); +} + +/// @nodoc +class _$SnAttachmentBillingCopyWithImpl<$Res> + implements $SnAttachmentBillingCopyWith<$Res> { + _$SnAttachmentBillingCopyWithImpl(this._self, this._then); + + final SnAttachmentBilling _self; + final $Res Function(SnAttachmentBilling) _then; + /// Create a copy of SnAttachmentBilling /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override @pragma('vm:prefer-inline') - _$$SnAttachmentBillingImplCopyWith<_$SnAttachmentBillingImpl> get copyWith => - __$$SnAttachmentBillingImplCopyWithImpl<_$SnAttachmentBillingImpl>( + @override + $Res call({ + Object? currentBytes = null, + Object? discountFileSize = null, + Object? includedRatio = null, + }) { + return _then(_self.copyWith( + currentBytes: null == currentBytes + ? _self.currentBytes + : currentBytes // ignore: cast_nullable_to_non_nullable + as int, + discountFileSize: null == discountFileSize + ? _self.discountFileSize + : discountFileSize // ignore: cast_nullable_to_non_nullable + as int, + includedRatio: null == includedRatio + ? _self.includedRatio + : includedRatio // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnAttachmentBilling implements SnAttachmentBilling { + const _SnAttachmentBilling( + {required this.currentBytes, + required this.discountFileSize, + required this.includedRatio}); + factory _SnAttachmentBilling.fromJson(Map json) => + _$SnAttachmentBillingFromJson(json); + + @override + final int currentBytes; + @override + final int discountFileSize; + @override + final double includedRatio; + + /// Create a copy of SnAttachmentBilling + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAttachmentBillingCopyWith<_SnAttachmentBilling> get copyWith => + __$SnAttachmentBillingCopyWithImpl<_SnAttachmentBilling>( this, _$identity); @override Map toJson() { - return _$$SnAttachmentBillingImplToJson( + return _$SnAttachmentBillingToJson( this, ); } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnAttachmentBilling && + (identical(other.currentBytes, currentBytes) || + other.currentBytes == currentBytes) && + (identical(other.discountFileSize, discountFileSize) || + other.discountFileSize == discountFileSize) && + (identical(other.includedRatio, includedRatio) || + other.includedRatio == includedRatio)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, currentBytes, discountFileSize, includedRatio); + + @override + String toString() { + return 'SnAttachmentBilling(currentBytes: $currentBytes, discountFileSize: $discountFileSize, includedRatio: $includedRatio)'; + } } -abstract class _SnAttachmentBilling implements SnAttachmentBilling { - const factory _SnAttachmentBilling( - {required final int currentBytes, - required final int discountFileSize, - required final double includedRatio}) = _$SnAttachmentBillingImpl; +/// @nodoc +abstract mixin class _$SnAttachmentBillingCopyWith<$Res> + implements $SnAttachmentBillingCopyWith<$Res> { + factory _$SnAttachmentBillingCopyWith(_SnAttachmentBilling value, + $Res Function(_SnAttachmentBilling) _then) = + __$SnAttachmentBillingCopyWithImpl; + @override + @useResult + $Res call({int currentBytes, int discountFileSize, double includedRatio}); +} - factory _SnAttachmentBilling.fromJson(Map json) = - _$SnAttachmentBillingImpl.fromJson; +/// @nodoc +class __$SnAttachmentBillingCopyWithImpl<$Res> + implements _$SnAttachmentBillingCopyWith<$Res> { + __$SnAttachmentBillingCopyWithImpl(this._self, this._then); - @override - int get currentBytes; - @override - int get discountFileSize; - @override - double get includedRatio; + final _SnAttachmentBilling _self; + final $Res Function(_SnAttachmentBilling) _then; /// Create a copy of SnAttachmentBilling /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAttachmentBillingImplCopyWith<_$SnAttachmentBillingImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? currentBytes = null, + Object? discountFileSize = null, + Object? includedRatio = null, + }) { + return _then(_SnAttachmentBilling( + currentBytes: null == currentBytes + ? _self.currentBytes + : currentBytes // ignore: cast_nullable_to_non_nullable + as int, + discountFileSize: null == discountFileSize + ? _self.discountFileSize + : discountFileSize // ignore: cast_nullable_to_non_nullable + as int, + includedRatio: null == includedRatio + ? _self.includedRatio + : includedRatio // ignore: cast_nullable_to_non_nullable + as double, + )); + } } + +// dart format on diff --git a/lib/types/attachment.g.dart b/lib/types/attachment.g.dart index 492aa7b..984a128 100644 --- a/lib/types/attachment.g.dart +++ b/lib/types/attachment.g.dart @@ -6,8 +6,8 @@ part of 'attachment.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnAttachmentImpl _$$SnAttachmentImplFromJson(Map json) => - _$SnAttachmentImpl( +_SnAttachment _$SnAttachmentFromJson(Map json) => + _SnAttachment( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -57,7 +57,7 @@ _$SnAttachmentImpl _$$SnAttachmentImplFromJson(Map json) => metadata: json['metadata'] as Map? ?? const {}, ); -Map _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) => +Map _$SnAttachmentToJson(_SnAttachment instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -92,9 +92,9 @@ Map _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) => 'metadata': instance.metadata, }; -_$SnAttachmentFragmentImpl _$$SnAttachmentFragmentImplFromJson( +_SnAttachmentFragment _$SnAttachmentFragmentFromJson( Map json) => - _$SnAttachmentFragmentImpl( + _SnAttachmentFragment( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -119,8 +119,8 @@ _$SnAttachmentFragmentImpl _$$SnAttachmentFragmentImplFromJson( const [], ); -Map _$$SnAttachmentFragmentImplToJson( - _$SnAttachmentFragmentImpl instance) => +Map _$SnAttachmentFragmentToJson( + _SnAttachmentFragment instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -138,9 +138,8 @@ Map _$$SnAttachmentFragmentImplToJson( 'file_chunks_missing': instance.fileChunksMissing, }; -_$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson( - Map json) => - _$SnAttachmentPoolImpl( +_SnAttachmentPool _$SnAttachmentPoolFromJson(Map json) => + _SnAttachmentPool( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -154,8 +153,7 @@ _$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson( accountId: (json['account_id'] as num?)?.toInt(), ); -Map _$$SnAttachmentPoolImplToJson( - _$SnAttachmentPoolImpl instance) => +Map _$SnAttachmentPoolToJson(_SnAttachmentPool instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -168,9 +166,9 @@ Map _$$SnAttachmentPoolImplToJson( 'account_id': instance.accountId, }; -_$SnAttachmentDestinationImpl _$$SnAttachmentDestinationImplFromJson( +_SnAttachmentDestination _$SnAttachmentDestinationFromJson( Map json) => - _$SnAttachmentDestinationImpl( + _SnAttachmentDestination( id: (json['id'] as num?)?.toInt() ?? 0, type: json['type'] as String, label: json['label'] as String, @@ -178,8 +176,8 @@ _$SnAttachmentDestinationImpl _$$SnAttachmentDestinationImplFromJson( isBoost: json['is_boost'] as bool, ); -Map _$$SnAttachmentDestinationImplToJson( - _$SnAttachmentDestinationImpl instance) => +Map _$SnAttachmentDestinationToJson( + _SnAttachmentDestination instance) => { 'id': instance.id, 'type': instance.type, @@ -188,9 +186,8 @@ Map _$$SnAttachmentDestinationImplToJson( 'is_boost': instance.isBoost, }; -_$SnAttachmentBoostImpl _$$SnAttachmentBoostImplFromJson( - Map json) => - _$SnAttachmentBoostImpl( +_SnAttachmentBoost _$SnAttachmentBoostFromJson(Map json) => + _SnAttachmentBoost( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -205,8 +202,7 @@ _$SnAttachmentBoostImpl _$$SnAttachmentBoostImplFromJson( account: (json['account'] as num).toInt(), ); -Map _$$SnAttachmentBoostImplToJson( - _$SnAttachmentBoostImpl instance) => +Map _$SnAttachmentBoostToJson(_SnAttachmentBoost instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -219,8 +215,7 @@ Map _$$SnAttachmentBoostImplToJson( 'account': instance.account, }; -_$SnStickerImpl _$$SnStickerImplFromJson(Map json) => - _$SnStickerImpl( +_SnSticker _$SnStickerFromJson(Map json) => _SnSticker( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -237,7 +232,7 @@ _$SnStickerImpl _$$SnStickerImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnStickerImplToJson(_$SnStickerImpl instance) => +Map _$SnStickerToJson(_SnSticker instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -252,8 +247,8 @@ Map _$$SnStickerImplToJson(_$SnStickerImpl instance) => 'account_id': instance.accountId, }; -_$SnStickerPackImpl _$$SnStickerPackImplFromJson(Map json) => - _$SnStickerPackImpl( +_SnStickerPack _$SnStickerPackFromJson(Map json) => + _SnStickerPack( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -269,7 +264,7 @@ _$SnStickerPackImpl _$$SnStickerPackImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnStickerPackImplToJson(_$SnStickerPackImpl instance) => +Map _$SnStickerPackToJson(_SnStickerPack instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -282,16 +277,15 @@ Map _$$SnStickerPackImplToJson(_$SnStickerPackImpl instance) => 'account_id': instance.accountId, }; -_$SnAttachmentBillingImpl _$$SnAttachmentBillingImplFromJson( - Map json) => - _$SnAttachmentBillingImpl( +_SnAttachmentBilling _$SnAttachmentBillingFromJson(Map json) => + _SnAttachmentBilling( currentBytes: (json['current_bytes'] as num).toInt(), discountFileSize: (json['discount_file_size'] as num).toInt(), includedRatio: (json['included_ratio'] as num).toDouble(), ); -Map _$$SnAttachmentBillingImplToJson( - _$SnAttachmentBillingImpl instance) => +Map _$SnAttachmentBillingToJson( + _SnAttachmentBilling instance) => { 'current_bytes': instance.currentBytes, 'discount_file_size': instance.discountFileSize, diff --git a/lib/types/auth.dart b/lib/types/auth.dart index 5bcdead..513b516 100644 --- a/lib/types/auth.dart +++ b/lib/types/auth.dart @@ -4,7 +4,7 @@ part 'auth.freezed.dart'; part 'auth.g.dart'; @freezed -class SnAuthResult with _$SnAuthResult { +abstract class SnAuthResult with _$SnAuthResult { const factory SnAuthResult({ required bool isFinished, required SnAuthTicket? ticket, @@ -15,7 +15,7 @@ class SnAuthResult with _$SnAuthResult { } @freezed -class SnAuthTicket with _$SnAuthTicket { +abstract class SnAuthTicket with _$SnAuthTicket { const factory SnAuthTicket({ required int id, required DateTime createdAt, @@ -41,7 +41,7 @@ class SnAuthTicket with _$SnAuthTicket { } @freezed -class SnAuthFactor with _$SnAuthFactor { +abstract class SnAuthFactor with _$SnAuthFactor { const factory SnAuthFactor({ required int id, required DateTime createdAt, diff --git a/lib/types/auth.freezed.dart b/lib/types/auth.freezed.dart index 8fda77e..ec66113 100644 --- a/lib/types/auth.freezed.dart +++ b/lib/types/auth.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,152 +10,30 @@ part of 'auth.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnAuthResult _$SnAuthResultFromJson(Map json) { - return _SnAuthResult.fromJson(json); -} - /// @nodoc mixin _$SnAuthResult { - bool get isFinished => throw _privateConstructorUsedError; - SnAuthTicket? get ticket => throw _privateConstructorUsedError; - - /// Serializes this SnAuthResult to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + bool get isFinished; + SnAuthTicket? get ticket; /// Create a copy of SnAuthResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnAuthResultCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnAuthResultCopyWithImpl( + this as SnAuthResult, _$identity); -/// @nodoc -abstract class $SnAuthResultCopyWith<$Res> { - factory $SnAuthResultCopyWith( - SnAuthResult value, $Res Function(SnAuthResult) then) = - _$SnAuthResultCopyWithImpl<$Res, SnAuthResult>; - @useResult - $Res call({bool isFinished, SnAuthTicket? ticket}); - - $SnAuthTicketCopyWith<$Res>? get ticket; -} - -/// @nodoc -class _$SnAuthResultCopyWithImpl<$Res, $Val extends SnAuthResult> - implements $SnAuthResultCopyWith<$Res> { - _$SnAuthResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAuthResult - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isFinished = null, - Object? ticket = freezed, - }) { - return _then(_value.copyWith( - isFinished: null == isFinished - ? _value.isFinished - : isFinished // ignore: cast_nullable_to_non_nullable - as bool, - ticket: freezed == ticket - ? _value.ticket - : ticket // ignore: cast_nullable_to_non_nullable - as SnAuthTicket?, - ) as $Val); - } - - /// Create a copy of SnAuthResult - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnAuthTicketCopyWith<$Res>? get ticket { - if (_value.ticket == null) { - return null; - } - - return $SnAuthTicketCopyWith<$Res>(_value.ticket!, (value) { - return _then(_value.copyWith(ticket: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SnAuthResultImplCopyWith<$Res> - implements $SnAuthResultCopyWith<$Res> { - factory _$$SnAuthResultImplCopyWith( - _$SnAuthResultImpl value, $Res Function(_$SnAuthResultImpl) then) = - __$$SnAuthResultImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({bool isFinished, SnAuthTicket? ticket}); - - @override - $SnAuthTicketCopyWith<$Res>? get ticket; -} - -/// @nodoc -class __$$SnAuthResultImplCopyWithImpl<$Res> - extends _$SnAuthResultCopyWithImpl<$Res, _$SnAuthResultImpl> - implements _$$SnAuthResultImplCopyWith<$Res> { - __$$SnAuthResultImplCopyWithImpl( - _$SnAuthResultImpl _value, $Res Function(_$SnAuthResultImpl) _then) - : super(_value, _then); - - /// Create a copy of SnAuthResult - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isFinished = null, - Object? ticket = freezed, - }) { - return _then(_$SnAuthResultImpl( - isFinished: null == isFinished - ? _value.isFinished - : isFinished // ignore: cast_nullable_to_non_nullable - as bool, - ticket: freezed == ticket - ? _value.ticket - : ticket // ignore: cast_nullable_to_non_nullable - as SnAuthTicket?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnAuthResultImpl implements _SnAuthResult { - const _$SnAuthResultImpl({required this.isFinished, required this.ticket}); - - factory _$SnAuthResultImpl.fromJson(Map json) => - _$$SnAuthResultImplFromJson(json); - - @override - final bool isFinished; - @override - final SnAuthTicket? ticket; - - @override - String toString() { - return 'SnAuthResult(isFinished: $isFinished, ticket: $ticket)'; - } + /// Serializes this SnAuthResult to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAuthResultImpl && + other is SnAuthResult && (identical(other.isFinished, isFinished) || other.isFinished == isFinished) && (identical(other.ticket, ticket) || other.ticket == ticket)); @@ -164,216 +43,272 @@ class _$SnAuthResultImpl implements _SnAuthResult { @override int get hashCode => Object.hash(runtimeType, isFinished, ticket); - /// Create a copy of SnAuthResult - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAuthResultImplCopyWith<_$SnAuthResultImpl> get copyWith => - __$$SnAuthResultImplCopyWithImpl<_$SnAuthResultImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAuthResultImplToJson( - this, - ); + String toString() { + return 'SnAuthResult(isFinished: $isFinished, ticket: $ticket)'; } } -abstract class _SnAuthResult implements SnAuthResult { - const factory _SnAuthResult( - {required final bool isFinished, - required final SnAuthTicket? ticket}) = _$SnAuthResultImpl; +/// @nodoc +abstract mixin class $SnAuthResultCopyWith<$Res> { + factory $SnAuthResultCopyWith( + SnAuthResult value, $Res Function(SnAuthResult) _then) = + _$SnAuthResultCopyWithImpl; + @useResult + $Res call({bool isFinished, SnAuthTicket? ticket}); - factory _SnAuthResult.fromJson(Map json) = - _$SnAuthResultImpl.fromJson; + $SnAuthTicketCopyWith<$Res>? get ticket; +} + +/// @nodoc +class _$SnAuthResultCopyWithImpl<$Res> implements $SnAuthResultCopyWith<$Res> { + _$SnAuthResultCopyWithImpl(this._self, this._then); + + final SnAuthResult _self; + final $Res Function(SnAuthResult) _then; + + /// Create a copy of SnAuthResult + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? isFinished = null, + Object? ticket = freezed, + }) { + return _then(_self.copyWith( + isFinished: null == isFinished + ? _self.isFinished + : isFinished // ignore: cast_nullable_to_non_nullable + as bool, + ticket: freezed == ticket + ? _self.ticket + : ticket // ignore: cast_nullable_to_non_nullable + as SnAuthTicket?, + )); + } + + /// Create a copy of SnAuthResult + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAuthTicketCopyWith<$Res>? get ticket { + if (_self.ticket == null) { + return null; + } + + return $SnAuthTicketCopyWith<$Res>(_self.ticket!, (value) { + return _then(_self.copyWith(ticket: value)); + }); + } +} + +/// @nodoc +@JsonSerializable() +class _SnAuthResult implements SnAuthResult { + const _SnAuthResult({required this.isFinished, required this.ticket}); + factory _SnAuthResult.fromJson(Map json) => + _$SnAuthResultFromJson(json); @override - bool get isFinished; + final bool isFinished; @override - SnAuthTicket? get ticket; + final SnAuthTicket? ticket; /// Create a copy of SnAuthResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAuthResultImplCopyWith<_$SnAuthResultImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnAuthResultCopyWith<_SnAuthResult> get copyWith => + __$SnAuthResultCopyWithImpl<_SnAuthResult>(this, _$identity); + + @override + Map toJson() { + return _$SnAuthResultToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnAuthResult && + (identical(other.isFinished, isFinished) || + other.isFinished == isFinished) && + (identical(other.ticket, ticket) || other.ticket == ticket)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, isFinished, ticket); + + @override + String toString() { + return 'SnAuthResult(isFinished: $isFinished, ticket: $ticket)'; + } } -SnAuthTicket _$SnAuthTicketFromJson(Map json) { - return _SnAuthTicket.fromJson(json); +/// @nodoc +abstract mixin class _$SnAuthResultCopyWith<$Res> + implements $SnAuthResultCopyWith<$Res> { + factory _$SnAuthResultCopyWith( + _SnAuthResult value, $Res Function(_SnAuthResult) _then) = + __$SnAuthResultCopyWithImpl; + @override + @useResult + $Res call({bool isFinished, SnAuthTicket? ticket}); + + @override + $SnAuthTicketCopyWith<$Res>? get ticket; +} + +/// @nodoc +class __$SnAuthResultCopyWithImpl<$Res> + implements _$SnAuthResultCopyWith<$Res> { + __$SnAuthResultCopyWithImpl(this._self, this._then); + + final _SnAuthResult _self; + final $Res Function(_SnAuthResult) _then; + + /// Create a copy of SnAuthResult + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? isFinished = null, + Object? ticket = freezed, + }) { + return _then(_SnAuthResult( + isFinished: null == isFinished + ? _self.isFinished + : isFinished // ignore: cast_nullable_to_non_nullable + as bool, + ticket: freezed == ticket + ? _self.ticket + : ticket // ignore: cast_nullable_to_non_nullable + as SnAuthTicket?, + )); + } + + /// Create a copy of SnAuthResult + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAuthTicketCopyWith<$Res>? get ticket { + if (_self.ticket == null) { + return null; + } + + return $SnAuthTicketCopyWith<$Res>(_self.ticket!, (value) { + return _then(_self.copyWith(ticket: value)); + }); + } } /// @nodoc mixin _$SnAuthTicket { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get stepRemain => throw _privateConstructorUsedError; - String? get grantToken => throw _privateConstructorUsedError; - String? get accessToken => throw _privateConstructorUsedError; - String? get refreshToken => throw _privateConstructorUsedError; - String get ipAddress => throw _privateConstructorUsedError; - String get location => throw _privateConstructorUsedError; - String get userAgent => throw _privateConstructorUsedError; - DateTime? get expiredAt => throw _privateConstructorUsedError; - DateTime? get lastGrantAt => throw _privateConstructorUsedError; - DateTime? get availableAt => throw _privateConstructorUsedError; - String? get nonce => throw _privateConstructorUsedError; - int? get accountId => throw _privateConstructorUsedError; - List get factorTrail => throw _privateConstructorUsedError; - - /// Serializes this SnAuthTicket to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get stepRemain; + String? get grantToken; + String? get accessToken; + String? get refreshToken; + String get ipAddress; + String get location; + String get userAgent; + DateTime? get expiredAt; + DateTime? get lastGrantAt; + DateTime? get availableAt; + String? get nonce; + int? get accountId; + List get factorTrail; /// Create a copy of SnAuthTicket /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAuthTicketCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAuthTicketCopyWith<$Res> { - factory $SnAuthTicketCopyWith( - SnAuthTicket value, $Res Function(SnAuthTicket) then) = - _$SnAuthTicketCopyWithImpl<$Res, SnAuthTicket>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int stepRemain, - String? grantToken, - String? accessToken, - String? refreshToken, - String ipAddress, - String location, - String userAgent, - DateTime? expiredAt, - DateTime? lastGrantAt, - DateTime? availableAt, - String? nonce, - int? accountId, - List factorTrail}); -} - -/// @nodoc -class _$SnAuthTicketCopyWithImpl<$Res, $Val extends SnAuthTicket> - implements $SnAuthTicketCopyWith<$Res> { - _$SnAuthTicketCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAuthTicket - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAuthTicketCopyWith get copyWith => + _$SnAuthTicketCopyWithImpl( + this as SnAuthTicket, _$identity); + + /// Serializes this SnAuthTicket to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? stepRemain = null, - Object? grantToken = freezed, - Object? accessToken = freezed, - Object? refreshToken = freezed, - Object? ipAddress = null, - Object? location = null, - Object? userAgent = null, - Object? expiredAt = freezed, - Object? lastGrantAt = freezed, - Object? availableAt = freezed, - Object? nonce = freezed, - Object? accountId = freezed, - Object? factorTrail = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - stepRemain: null == stepRemain - ? _value.stepRemain - : stepRemain // ignore: cast_nullable_to_non_nullable - as int, - grantToken: freezed == grantToken - ? _value.grantToken - : grantToken // ignore: cast_nullable_to_non_nullable - as String?, - accessToken: freezed == accessToken - ? _value.accessToken - : accessToken // ignore: cast_nullable_to_non_nullable - as String?, - refreshToken: freezed == refreshToken - ? _value.refreshToken - : refreshToken // ignore: cast_nullable_to_non_nullable - as String?, - ipAddress: null == ipAddress - ? _value.ipAddress - : ipAddress // ignore: cast_nullable_to_non_nullable - as String, - location: null == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String, - userAgent: null == userAgent - ? _value.userAgent - : userAgent // ignore: cast_nullable_to_non_nullable - as String, - expiredAt: freezed == expiredAt - ? _value.expiredAt - : expiredAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lastGrantAt: freezed == lastGrantAt - ? _value.lastGrantAt - : lastGrantAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - availableAt: freezed == availableAt - ? _value.availableAt - : availableAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - nonce: freezed == nonce - ? _value.nonce - : nonce // ignore: cast_nullable_to_non_nullable - as String?, - accountId: freezed == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int?, - factorTrail: null == factorTrail - ? _value.factorTrail - : factorTrail // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAuthTicket && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.stepRemain, stepRemain) || + other.stepRemain == stepRemain) && + (identical(other.grantToken, grantToken) || + other.grantToken == grantToken) && + (identical(other.accessToken, accessToken) || + other.accessToken == accessToken) && + (identical(other.refreshToken, refreshToken) || + other.refreshToken == refreshToken) && + (identical(other.ipAddress, ipAddress) || + other.ipAddress == ipAddress) && + (identical(other.location, location) || + other.location == location) && + (identical(other.userAgent, userAgent) || + other.userAgent == userAgent) && + (identical(other.expiredAt, expiredAt) || + other.expiredAt == expiredAt) && + (identical(other.lastGrantAt, lastGrantAt) || + other.lastGrantAt == lastGrantAt) && + (identical(other.availableAt, availableAt) || + other.availableAt == availableAt) && + (identical(other.nonce, nonce) || other.nonce == nonce) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + const DeepCollectionEquality() + .equals(other.factorTrail, factorTrail)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + stepRemain, + grantToken, + accessToken, + refreshToken, + ipAddress, + location, + userAgent, + expiredAt, + lastGrantAt, + availableAt, + nonce, + accountId, + const DeepCollectionEquality().hash(factorTrail)); + + @override + String toString() { + return 'SnAuthTicket(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stepRemain: $stepRemain, grantToken: $grantToken, accessToken: $accessToken, refreshToken: $refreshToken, ipAddress: $ipAddress, location: $location, userAgent: $userAgent, expiredAt: $expiredAt, lastGrantAt: $lastGrantAt, availableAt: $availableAt, nonce: $nonce, accountId: $accountId, factorTrail: $factorTrail)'; } } /// @nodoc -abstract class _$$SnAuthTicketImplCopyWith<$Res> - implements $SnAuthTicketCopyWith<$Res> { - factory _$$SnAuthTicketImplCopyWith( - _$SnAuthTicketImpl value, $Res Function(_$SnAuthTicketImpl) then) = - __$$SnAuthTicketImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAuthTicketCopyWith<$Res> { + factory $SnAuthTicketCopyWith( + SnAuthTicket value, $Res Function(SnAuthTicket) _then) = + _$SnAuthTicketCopyWithImpl; @useResult $Res call( {int id, @@ -396,12 +331,11 @@ abstract class _$$SnAuthTicketImplCopyWith<$Res> } /// @nodoc -class __$$SnAuthTicketImplCopyWithImpl<$Res> - extends _$SnAuthTicketCopyWithImpl<$Res, _$SnAuthTicketImpl> - implements _$$SnAuthTicketImplCopyWith<$Res> { - __$$SnAuthTicketImplCopyWithImpl( - _$SnAuthTicketImpl _value, $Res Function(_$SnAuthTicketImpl) _then) - : super(_value, _then); +class _$SnAuthTicketCopyWithImpl<$Res> implements $SnAuthTicketCopyWith<$Res> { + _$SnAuthTicketCopyWithImpl(this._self, this._then); + + final SnAuthTicket _self; + final $Res Function(SnAuthTicket) _then; /// Create a copy of SnAuthTicket /// with the given fields replaced by the non-null parameter values. @@ -426,73 +360,73 @@ class __$$SnAuthTicketImplCopyWithImpl<$Res> Object? accountId = freezed, Object? factorTrail = null, }) { - return _then(_$SnAuthTicketImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, stepRemain: null == stepRemain - ? _value.stepRemain + ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable as int, grantToken: freezed == grantToken - ? _value.grantToken + ? _self.grantToken : grantToken // ignore: cast_nullable_to_non_nullable as String?, accessToken: freezed == accessToken - ? _value.accessToken + ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable as String?, refreshToken: freezed == refreshToken - ? _value.refreshToken + ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String?, ipAddress: null == ipAddress - ? _value.ipAddress + ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable as String, location: null == location - ? _value.location + ? _self.location : location // ignore: cast_nullable_to_non_nullable as String, userAgent: null == userAgent - ? _value.userAgent + ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable as String, expiredAt: freezed == expiredAt - ? _value.expiredAt + ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as DateTime?, lastGrantAt: freezed == lastGrantAt - ? _value.lastGrantAt + ? _self.lastGrantAt : lastGrantAt // ignore: cast_nullable_to_non_nullable as DateTime?, availableAt: freezed == availableAt - ? _value.availableAt + ? _self.availableAt : availableAt // ignore: cast_nullable_to_non_nullable as DateTime?, nonce: freezed == nonce - ? _value.nonce + ? _self.nonce : nonce // ignore: cast_nullable_to_non_nullable as String?, accountId: freezed == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int?, factorTrail: null == factorTrail - ? _value._factorTrail + ? _self.factorTrail : factorTrail // ignore: cast_nullable_to_non_nullable as List, )); @@ -501,8 +435,8 @@ class __$$SnAuthTicketImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAuthTicketImpl implements _SnAuthTicket { - const _$SnAuthTicketImpl( +class _SnAuthTicket implements SnAuthTicket { + const _SnAuthTicket( {required this.id, required this.createdAt, required this.updatedAt, @@ -521,9 +455,8 @@ class _$SnAuthTicketImpl implements _SnAuthTicket { required this.accountId, final List factorTrail = const []}) : _factorTrail = factorTrail; - - factory _$SnAuthTicketImpl.fromJson(Map json) => - _$$SnAuthTicketImplFromJson(json); + factory _SnAuthTicket.fromJson(Map json) => + _$SnAuthTicketFromJson(json); @override final int id; @@ -566,16 +499,26 @@ class _$SnAuthTicketImpl implements _SnAuthTicket { return EqualUnmodifiableListView(_factorTrail); } + /// Create a copy of SnAuthTicket + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAuthTicket(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stepRemain: $stepRemain, grantToken: $grantToken, accessToken: $accessToken, refreshToken: $refreshToken, ipAddress: $ipAddress, location: $location, userAgent: $userAgent, expiredAt: $expiredAt, lastGrantAt: $lastGrantAt, availableAt: $availableAt, nonce: $nonce, accountId: $accountId, factorTrail: $factorTrail)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAuthTicketCopyWith<_SnAuthTicket> get copyWith => + __$SnAuthTicketCopyWithImpl<_SnAuthTicket>(this, _$identity); + + @override + Map toJson() { + return _$SnAuthTicketToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAuthTicketImpl && + other is _SnAuthTicket && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -632,191 +575,199 @@ class _$SnAuthTicketImpl implements _SnAuthTicket { accountId, const DeepCollectionEquality().hash(_factorTrail)); - /// Create a copy of SnAuthTicket - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAuthTicketImplCopyWith<_$SnAuthTicketImpl> get copyWith => - __$$SnAuthTicketImplCopyWithImpl<_$SnAuthTicketImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAuthTicketImplToJson( - this, - ); + String toString() { + return 'SnAuthTicket(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stepRemain: $stepRemain, grantToken: $grantToken, accessToken: $accessToken, refreshToken: $refreshToken, ipAddress: $ipAddress, location: $location, userAgent: $userAgent, expiredAt: $expiredAt, lastGrantAt: $lastGrantAt, availableAt: $availableAt, nonce: $nonce, accountId: $accountId, factorTrail: $factorTrail)'; } } -abstract class _SnAuthTicket implements SnAuthTicket { - const factory _SnAuthTicket( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int stepRemain, - required final String? grantToken, - required final String? accessToken, - required final String? refreshToken, - required final String ipAddress, - required final String location, - required final String userAgent, - required final DateTime? expiredAt, - required final DateTime? lastGrantAt, - required final DateTime? availableAt, - required final String? nonce, - required final int? accountId, - final List factorTrail}) = _$SnAuthTicketImpl; +/// @nodoc +abstract mixin class _$SnAuthTicketCopyWith<$Res> + implements $SnAuthTicketCopyWith<$Res> { + factory _$SnAuthTicketCopyWith( + _SnAuthTicket value, $Res Function(_SnAuthTicket) _then) = + __$SnAuthTicketCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int stepRemain, + String? grantToken, + String? accessToken, + String? refreshToken, + String ipAddress, + String location, + String userAgent, + DateTime? expiredAt, + DateTime? lastGrantAt, + DateTime? availableAt, + String? nonce, + int? accountId, + List factorTrail}); +} - factory _SnAuthTicket.fromJson(Map json) = - _$SnAuthTicketImpl.fromJson; +/// @nodoc +class __$SnAuthTicketCopyWithImpl<$Res> + implements _$SnAuthTicketCopyWith<$Res> { + __$SnAuthTicketCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get stepRemain; - @override - String? get grantToken; - @override - String? get accessToken; - @override - String? get refreshToken; - @override - String get ipAddress; - @override - String get location; - @override - String get userAgent; - @override - DateTime? get expiredAt; - @override - DateTime? get lastGrantAt; - @override - DateTime? get availableAt; - @override - String? get nonce; - @override - int? get accountId; - @override - List get factorTrail; + final _SnAuthTicket _self; + final $Res Function(_SnAuthTicket) _then; /// Create a copy of SnAuthTicket /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAuthTicketImplCopyWith<_$SnAuthTicketImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnAuthFactor _$SnAuthFactorFromJson(Map json) { - return _SnAuthFactor.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? stepRemain = null, + Object? grantToken = freezed, + Object? accessToken = freezed, + Object? refreshToken = freezed, + Object? ipAddress = null, + Object? location = null, + Object? userAgent = null, + Object? expiredAt = freezed, + Object? lastGrantAt = freezed, + Object? availableAt = freezed, + Object? nonce = freezed, + Object? accountId = freezed, + Object? factorTrail = null, + }) { + return _then(_SnAuthTicket( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + stepRemain: null == stepRemain + ? _self.stepRemain + : stepRemain // ignore: cast_nullable_to_non_nullable + as int, + grantToken: freezed == grantToken + ? _self.grantToken + : grantToken // ignore: cast_nullable_to_non_nullable + as String?, + accessToken: freezed == accessToken + ? _self.accessToken + : accessToken // ignore: cast_nullable_to_non_nullable + as String?, + refreshToken: freezed == refreshToken + ? _self.refreshToken + : refreshToken // ignore: cast_nullable_to_non_nullable + as String?, + ipAddress: null == ipAddress + ? _self.ipAddress + : ipAddress // ignore: cast_nullable_to_non_nullable + as String, + location: null == location + ? _self.location + : location // ignore: cast_nullable_to_non_nullable + as String, + userAgent: null == userAgent + ? _self.userAgent + : userAgent // ignore: cast_nullable_to_non_nullable + as String, + expiredAt: freezed == expiredAt + ? _self.expiredAt + : expiredAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lastGrantAt: freezed == lastGrantAt + ? _self.lastGrantAt + : lastGrantAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + availableAt: freezed == availableAt + ? _self.availableAt + : availableAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + nonce: freezed == nonce + ? _self.nonce + : nonce // ignore: cast_nullable_to_non_nullable + as String?, + accountId: freezed == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int?, + factorTrail: null == factorTrail + ? _self._factorTrail + : factorTrail // ignore: cast_nullable_to_non_nullable + as List, + )); + } } /// @nodoc mixin _$SnAuthFactor { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get type => throw _privateConstructorUsedError; - Map? get config => throw _privateConstructorUsedError; - int? get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnAuthFactor to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get type; + Map? get config; + int? get accountId; /// Create a copy of SnAuthFactor /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnAuthFactorCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnAuthFactorCopyWith<$Res> { - factory $SnAuthFactorCopyWith( - SnAuthFactor value, $Res Function(SnAuthFactor) then) = - _$SnAuthFactorCopyWithImpl<$Res, SnAuthFactor>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int type, - Map? config, - int? accountId}); -} - -/// @nodoc -class _$SnAuthFactorCopyWithImpl<$Res, $Val extends SnAuthFactor> - implements $SnAuthFactorCopyWith<$Res> { - _$SnAuthFactorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnAuthFactor - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnAuthFactorCopyWith get copyWith => + _$SnAuthFactorCopyWithImpl( + this as SnAuthFactor, _$identity); + + /// Serializes this SnAuthFactor to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? type = null, - Object? config = freezed, - Object? accountId = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - config: freezed == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as Map?, - accountId: freezed == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnAuthFactor && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.type, type) || other.type == type) && + const DeepCollectionEquality().equals(other.config, config) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, type, const DeepCollectionEquality().hash(config), accountId); + + @override + String toString() { + return 'SnAuthFactor(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, config: $config, accountId: $accountId)'; } } /// @nodoc -abstract class _$$SnAuthFactorImplCopyWith<$Res> - implements $SnAuthFactorCopyWith<$Res> { - factory _$$SnAuthFactorImplCopyWith( - _$SnAuthFactorImpl value, $Res Function(_$SnAuthFactorImpl) then) = - __$$SnAuthFactorImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnAuthFactorCopyWith<$Res> { + factory $SnAuthFactorCopyWith( + SnAuthFactor value, $Res Function(SnAuthFactor) _then) = + _$SnAuthFactorCopyWithImpl; @useResult $Res call( {int id, @@ -829,12 +780,11 @@ abstract class _$$SnAuthFactorImplCopyWith<$Res> } /// @nodoc -class __$$SnAuthFactorImplCopyWithImpl<$Res> - extends _$SnAuthFactorCopyWithImpl<$Res, _$SnAuthFactorImpl> - implements _$$SnAuthFactorImplCopyWith<$Res> { - __$$SnAuthFactorImplCopyWithImpl( - _$SnAuthFactorImpl _value, $Res Function(_$SnAuthFactorImpl) _then) - : super(_value, _then); +class _$SnAuthFactorCopyWithImpl<$Res> implements $SnAuthFactorCopyWith<$Res> { + _$SnAuthFactorCopyWithImpl(this._self, this._then); + + final SnAuthFactor _self; + final $Res Function(SnAuthFactor) _then; /// Create a copy of SnAuthFactor /// with the given fields replaced by the non-null parameter values. @@ -849,33 +799,33 @@ class __$$SnAuthFactorImplCopyWithImpl<$Res> Object? config = freezed, Object? accountId = freezed, }) { - return _then(_$SnAuthFactorImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as int, config: freezed == config - ? _value._config + ? _self.config : config // ignore: cast_nullable_to_non_nullable as Map?, accountId: freezed == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int?, )); @@ -884,8 +834,8 @@ class __$$SnAuthFactorImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnAuthFactorImpl implements _SnAuthFactor { - const _$SnAuthFactorImpl( +class _SnAuthFactor implements SnAuthFactor { + const _SnAuthFactor( {required this.id, required this.createdAt, required this.updatedAt, @@ -894,9 +844,8 @@ class _$SnAuthFactorImpl implements _SnAuthFactor { required final Map? config, required this.accountId}) : _config = config; - - factory _$SnAuthFactorImpl.fromJson(Map json) => - _$$SnAuthFactorImplFromJson(json); + factory _SnAuthFactor.fromJson(Map json) => + _$SnAuthFactorFromJson(json); @override final int id; @@ -921,16 +870,26 @@ class _$SnAuthFactorImpl implements _SnAuthFactor { @override final int? accountId; + /// Create a copy of SnAuthFactor + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnAuthFactor(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, config: $config, accountId: $accountId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnAuthFactorCopyWith<_SnAuthFactor> get copyWith => + __$SnAuthFactorCopyWithImpl<_SnAuthFactor>(this, _$identity); + + @override + Map toJson() { + return _$SnAuthFactorToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnAuthFactorImpl && + other is _SnAuthFactor && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -949,54 +908,82 @@ class _$SnAuthFactorImpl implements _SnAuthFactor { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, type, const DeepCollectionEquality().hash(_config), accountId); - /// Create a copy of SnAuthFactor - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnAuthFactorImplCopyWith<_$SnAuthFactorImpl> get copyWith => - __$$SnAuthFactorImplCopyWithImpl<_$SnAuthFactorImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnAuthFactorImplToJson( - this, - ); + String toString() { + return 'SnAuthFactor(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, config: $config, accountId: $accountId)'; } } -abstract class _SnAuthFactor implements SnAuthFactor { - const factory _SnAuthFactor( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int type, - required final Map? config, - required final int? accountId}) = _$SnAuthFactorImpl; +/// @nodoc +abstract mixin class _$SnAuthFactorCopyWith<$Res> + implements $SnAuthFactorCopyWith<$Res> { + factory _$SnAuthFactorCopyWith( + _SnAuthFactor value, $Res Function(_SnAuthFactor) _then) = + __$SnAuthFactorCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int type, + Map? config, + int? accountId}); +} - factory _SnAuthFactor.fromJson(Map json) = - _$SnAuthFactorImpl.fromJson; +/// @nodoc +class __$SnAuthFactorCopyWithImpl<$Res> + implements _$SnAuthFactorCopyWith<$Res> { + __$SnAuthFactorCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get type; - @override - Map? get config; - @override - int? get accountId; + final _SnAuthFactor _self; + final $Res Function(_SnAuthFactor) _then; /// Create a copy of SnAuthFactor /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnAuthFactorImplCopyWith<_$SnAuthFactorImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? type = null, + Object? config = freezed, + Object? accountId = freezed, + }) { + return _then(_SnAuthFactor( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as int, + config: freezed == config + ? _self._config + : config // ignore: cast_nullable_to_non_nullable + as Map?, + accountId: freezed == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int?, + )); + } } + +// dart format on diff --git a/lib/types/auth.g.dart b/lib/types/auth.g.dart index a8a8a38..90c105f 100644 --- a/lib/types/auth.g.dart +++ b/lib/types/auth.g.dart @@ -6,22 +6,22 @@ part of 'auth.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnAuthResultImpl _$$SnAuthResultImplFromJson(Map json) => - _$SnAuthResultImpl( +_SnAuthResult _$SnAuthResultFromJson(Map json) => + _SnAuthResult( isFinished: json['is_finished'] as bool, ticket: json['ticket'] == null ? null : SnAuthTicket.fromJson(json['ticket'] as Map), ); -Map _$$SnAuthResultImplToJson(_$SnAuthResultImpl instance) => +Map _$SnAuthResultToJson(_SnAuthResult instance) => { 'is_finished': instance.isFinished, 'ticket': instance.ticket?.toJson(), }; -_$SnAuthTicketImpl _$$SnAuthTicketImplFromJson(Map json) => - _$SnAuthTicketImpl( +_SnAuthTicket _$SnAuthTicketFromJson(Map json) => + _SnAuthTicket( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -52,7 +52,7 @@ _$SnAuthTicketImpl _$$SnAuthTicketImplFromJson(Map json) => const [], ); -Map _$$SnAuthTicketImplToJson(_$SnAuthTicketImpl instance) => +Map _$SnAuthTicketToJson(_SnAuthTicket instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -73,8 +73,8 @@ Map _$$SnAuthTicketImplToJson(_$SnAuthTicketImpl instance) => 'factor_trail': instance.factorTrail, }; -_$SnAuthFactorImpl _$$SnAuthFactorImplFromJson(Map json) => - _$SnAuthFactorImpl( +_SnAuthFactor _$SnAuthFactorFromJson(Map json) => + _SnAuthFactor( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -86,7 +86,7 @@ _$SnAuthFactorImpl _$$SnAuthFactorImplFromJson(Map json) => accountId: (json['account_id'] as num?)?.toInt(), ); -Map _$$SnAuthFactorImplToJson(_$SnAuthFactorImpl instance) => +Map _$SnAuthFactorToJson(_SnAuthFactor instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/chat.dart b/lib/types/chat.dart index 8cd3a9c..5b8e9fa 100644 --- a/lib/types/chat.dart +++ b/lib/types/chat.dart @@ -8,7 +8,7 @@ part 'chat.freezed.dart'; part 'chat.g.dart'; @freezed -class SnChannel with _$SnChannel { +abstract class SnChannel with _$SnChannel { const SnChannel._(); const factory SnChannel({ @@ -37,7 +37,7 @@ class SnChannel with _$SnChannel { } @freezed -class SnChannelMember with _$SnChannelMember { +abstract class SnChannelMember with _$SnChannelMember { const SnChannelMember._(); const factory SnChannelMember({ @@ -61,7 +61,7 @@ class SnChannelMember with _$SnChannelMember { } @freezed -class SnChatMessage with _$SnChatMessage { +abstract class SnChatMessage with _$SnChatMessage { const SnChatMessage._(); const factory SnChatMessage({ @@ -86,7 +86,7 @@ class SnChatMessage with _$SnChatMessage { } @freezed -class SnChatMessagePreload with _$SnChatMessagePreload { +abstract class SnChatMessagePreload with _$SnChatMessagePreload { const SnChatMessagePreload._(); const factory SnChatMessagePreload({ @@ -99,7 +99,7 @@ class SnChatMessagePreload with _$SnChatMessagePreload { } @freezed -class SnChatCall with _$SnChatCall { +abstract class SnChatCall with _$SnChatCall { const factory SnChatCall({ required int id, required DateTime createdAt, diff --git a/lib/types/chat.freezed.dart b/lib/types/chat.freezed.dart index cf1d8b1..128f476 100644 --- a/lib/types/chat.freezed.dart +++ b/lib/types/chat.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,47 +10,95 @@ part of 'chat.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnChannel _$SnChannelFromJson(Map json) { - return _SnChannel.fromJson(json); -} - /// @nodoc mixin _$SnChannel { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - List? get members => throw _privateConstructorUsedError; - List? get messages => throw _privateConstructorUsedError; - int get type => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - SnRealm? get realm => throw _privateConstructorUsedError; - int? get realmId => throw _privateConstructorUsedError; - bool get isPublic => throw _privateConstructorUsedError; - bool get isCommunity => throw _privateConstructorUsedError; - - /// Serializes this SnChannel to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + dynamic get deletedAt; + String get alias; + String get name; + String get description; + List? get members; + List? get messages; + int get type; + int get accountId; + SnRealm? get realm; + int? get realmId; + bool get isPublic; + bool get isCommunity; /// Create a copy of SnChannel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnChannelCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnChannelCopyWithImpl(this as SnChannel, _$identity); + + /// Serializes this SnChannel to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnChannel && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.members, members) && + const DeepCollectionEquality().equals(other.messages, messages) && + (identical(other.type, type) || other.type == type) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.realm, realm) || other.realm == realm) && + (identical(other.realmId, realmId) || other.realmId == realmId) && + (identical(other.isPublic, isPublic) || + other.isPublic == isPublic) && + (identical(other.isCommunity, isCommunity) || + other.isCommunity == isCommunity)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + alias, + name, + description, + const DeepCollectionEquality().hash(members), + const DeepCollectionEquality().hash(messages), + type, + accountId, + realm, + realmId, + isPublic, + isCommunity); + + @override + String toString() { + return 'SnChannel(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, messages: $messages, type: $type, accountId: $accountId, realm: $realm, realmId: $realmId, isPublic: $isPublic, isCommunity: $isCommunity)'; + } } /// @nodoc -abstract class $SnChannelCopyWith<$Res> { - factory $SnChannelCopyWith(SnChannel value, $Res Function(SnChannel) then) = - _$SnChannelCopyWithImpl<$Res, SnChannel>; +abstract mixin class $SnChannelCopyWith<$Res> { + factory $SnChannelCopyWith(SnChannel value, $Res Function(SnChannel) _then) = + _$SnChannelCopyWithImpl; @useResult $Res call( {int id, @@ -72,14 +121,11 @@ abstract class $SnChannelCopyWith<$Res> { } /// @nodoc -class _$SnChannelCopyWithImpl<$Res, $Val extends SnChannel> - implements $SnChannelCopyWith<$Res> { - _$SnChannelCopyWithImpl(this._value, this._then); +class _$SnChannelCopyWithImpl<$Res> implements $SnChannelCopyWith<$Res> { + _$SnChannelCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnChannel _self; + final $Res Function(SnChannel) _then; /// Create a copy of SnChannel /// with the given fields replaced by the non-null parameter values. @@ -102,68 +148,68 @@ class _$SnChannelCopyWithImpl<$Res, $Val extends SnChannel> Object? isPublic = null, Object? isCommunity = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as dynamic, alias: null == alias - ? _value.alias + ? _self.alias : alias // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, members: freezed == members - ? _value.members + ? _self.members : members // ignore: cast_nullable_to_non_nullable as List?, messages: freezed == messages - ? _value.messages + ? _self.messages : messages // ignore: cast_nullable_to_non_nullable as List?, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as int, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, realm: freezed == realm - ? _value.realm + ? _self.realm : realm // ignore: cast_nullable_to_non_nullable as SnRealm?, realmId: freezed == realmId - ? _value.realmId + ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable as int?, isPublic: null == isPublic - ? _value.isPublic + ? _self.isPublic : isPublic // ignore: cast_nullable_to_non_nullable as bool, isCommunity: null == isCommunity - ? _value.isCommunity + ? _self.isCommunity : isCommunity // ignore: cast_nullable_to_non_nullable as bool, - ) as $Val); + )); } /// Create a copy of SnChannel @@ -171,143 +217,20 @@ class _$SnChannelCopyWithImpl<$Res, $Val extends SnChannel> @override @pragma('vm:prefer-inline') $SnRealmCopyWith<$Res>? get realm { - if (_value.realm == null) { + if (_self.realm == null) { return null; } - return $SnRealmCopyWith<$Res>(_value.realm!, (value) { - return _then(_value.copyWith(realm: value) as $Val); + return $SnRealmCopyWith<$Res>(_self.realm!, (value) { + return _then(_self.copyWith(realm: value)); }); } } -/// @nodoc -abstract class _$$SnChannelImplCopyWith<$Res> - implements $SnChannelCopyWith<$Res> { - factory _$$SnChannelImplCopyWith( - _$SnChannelImpl value, $Res Function(_$SnChannelImpl) then) = - __$$SnChannelImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String alias, - String name, - String description, - List? members, - List? messages, - int type, - int accountId, - SnRealm? realm, - int? realmId, - bool isPublic, - bool isCommunity}); - - @override - $SnRealmCopyWith<$Res>? get realm; -} - -/// @nodoc -class __$$SnChannelImplCopyWithImpl<$Res> - extends _$SnChannelCopyWithImpl<$Res, _$SnChannelImpl> - implements _$$SnChannelImplCopyWith<$Res> { - __$$SnChannelImplCopyWithImpl( - _$SnChannelImpl _value, $Res Function(_$SnChannelImpl) _then) - : super(_value, _then); - - /// Create a copy of SnChannel - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? members = freezed, - Object? messages = freezed, - Object? type = null, - Object? accountId = null, - Object? realm = freezed, - Object? realmId = freezed, - Object? isPublic = null, - Object? isCommunity = null, - }) { - return _then(_$SnChannelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - members: freezed == members - ? _value._members - : members // ignore: cast_nullable_to_non_nullable - as List?, - messages: freezed == messages - ? _value._messages - : messages // ignore: cast_nullable_to_non_nullable - as List?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - realm: freezed == realm - ? _value.realm - : realm // ignore: cast_nullable_to_non_nullable - as SnRealm?, - realmId: freezed == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int?, - isPublic: null == isPublic - ? _value.isPublic - : isPublic // ignore: cast_nullable_to_non_nullable - as bool, - isCommunity: null == isCommunity - ? _value.isCommunity - : isCommunity // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnChannelImpl extends _SnChannel { - const _$SnChannelImpl( +class _SnChannel extends SnChannel { + const _SnChannel( {required this.id, required this.createdAt, required this.updatedAt, @@ -326,9 +249,8 @@ class _$SnChannelImpl extends _SnChannel { : _members = members, _messages = messages, super._(); - - factory _$SnChannelImpl.fromJson(Map json) => - _$$SnChannelImplFromJson(json); + factory _SnChannel.fromJson(Map json) => + _$SnChannelFromJson(json); @override final int id; @@ -377,16 +299,26 @@ class _$SnChannelImpl extends _SnChannel { @override final bool isCommunity; + /// Create a copy of SnChannel + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnChannel(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, messages: $messages, type: $type, accountId: $accountId, realm: $realm, realmId: $realmId, isPublic: $isPublic, isCommunity: $isCommunity)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnChannelCopyWith<_SnChannel> get copyWith => + __$SnChannelCopyWithImpl<_SnChannel>(this, _$identity); + + @override + Map toJson() { + return _$SnChannelToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnChannelImpl && + other is _SnChannel && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -430,425 +362,180 @@ class _$SnChannelImpl extends _SnChannel { isPublic, isCommunity); - /// Create a copy of SnChannel - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnChannelImplCopyWith<_$SnChannelImpl> get copyWith => - __$$SnChannelImplCopyWithImpl<_$SnChannelImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnChannelImplToJson( - this, - ); + String toString() { + return 'SnChannel(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, messages: $messages, type: $type, accountId: $accountId, realm: $realm, realmId: $realmId, isPublic: $isPublic, isCommunity: $isCommunity)'; } } -abstract class _SnChannel extends SnChannel { - const factory _SnChannel( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final String alias, - required final String name, - required final String description, - required final List? members, - final List? messages, - required final int type, - required final int accountId, - required final SnRealm? realm, - required final int? realmId, - required final bool isPublic, - required final bool isCommunity}) = _$SnChannelImpl; - const _SnChannel._() : super._(); - - factory _SnChannel.fromJson(Map json) = - _$SnChannelImpl.fromJson; +/// @nodoc +abstract mixin class _$SnChannelCopyWith<$Res> + implements $SnChannelCopyWith<$Res> { + factory _$SnChannelCopyWith( + _SnChannel value, $Res Function(_SnChannel) _then) = + __$SnChannelCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String alias, + String name, + String description, + List? members, + List? messages, + int type, + int accountId, + SnRealm? realm, + int? realmId, + bool isPublic, + bool isCommunity}); @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - dynamic get deletedAt; - @override - String get alias; - @override - String get name; - @override - String get description; - @override - List? get members; - @override - List? get messages; - @override - int get type; - @override - int get accountId; - @override - SnRealm? get realm; - @override - int? get realmId; - @override - bool get isPublic; - @override - bool get isCommunity; + $SnRealmCopyWith<$Res>? get realm; +} + +/// @nodoc +class __$SnChannelCopyWithImpl<$Res> implements _$SnChannelCopyWith<$Res> { + __$SnChannelCopyWithImpl(this._self, this._then); + + final _SnChannel _self; + final $Res Function(_SnChannel) _then; /// Create a copy of SnChannel /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnChannelImplCopyWith<_$SnChannelImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? members = freezed, + Object? messages = freezed, + Object? type = null, + Object? accountId = null, + Object? realm = freezed, + Object? realmId = freezed, + Object? isPublic = null, + Object? isCommunity = null, + }) { + return _then(_SnChannel( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + members: freezed == members + ? _self._members + : members // ignore: cast_nullable_to_non_nullable + as List?, + messages: freezed == messages + ? _self._messages + : messages // ignore: cast_nullable_to_non_nullable + as List?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + realm: freezed == realm + ? _self.realm + : realm // ignore: cast_nullable_to_non_nullable + as SnRealm?, + realmId: freezed == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int?, + isPublic: null == isPublic + ? _self.isPublic + : isPublic // ignore: cast_nullable_to_non_nullable + as bool, + isCommunity: null == isCommunity + ? _self.isCommunity + : isCommunity // ignore: cast_nullable_to_non_nullable + as bool, + )); + } -SnChannelMember _$SnChannelMemberFromJson(Map json) { - return _SnChannelMember.fromJson(json); + /// Create a copy of SnChannel + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnRealmCopyWith<$Res>? get realm { + if (_self.realm == null) { + return null; + } + + return $SnRealmCopyWith<$Res>(_self.realm!, (value) { + return _then(_self.copyWith(realm: value)); + }); + } } /// @nodoc mixin _$SnChannelMember { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get channelId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - String? get nick => throw _privateConstructorUsedError; - SnChannel? get channel => throw _privateConstructorUsedError; - SnAccount? get account => throw _privateConstructorUsedError; - int get notify => throw _privateConstructorUsedError; - int get powerLevel => throw _privateConstructorUsedError; - dynamic get calls => throw _privateConstructorUsedError; - dynamic get events => throw _privateConstructorUsedError; - - /// Serializes this SnChannelMember to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get channelId; + int get accountId; + String? get nick; + SnChannel? get channel; + SnAccount? get account; + int get notify; + int get powerLevel; + dynamic get calls; + dynamic get events; /// Create a copy of SnChannelMember /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnChannelMemberCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnChannelMemberCopyWithImpl( + this as SnChannelMember, _$identity); -/// @nodoc -abstract class $SnChannelMemberCopyWith<$Res> { - factory $SnChannelMemberCopyWith( - SnChannelMember value, $Res Function(SnChannelMember) then) = - _$SnChannelMemberCopyWithImpl<$Res, SnChannelMember>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int channelId, - int accountId, - String? nick, - SnChannel? channel, - SnAccount? account, - int notify, - int powerLevel, - dynamic calls, - dynamic events}); - - $SnChannelCopyWith<$Res>? get channel; - $SnAccountCopyWith<$Res>? get account; -} - -/// @nodoc -class _$SnChannelMemberCopyWithImpl<$Res, $Val extends SnChannelMember> - implements $SnChannelMemberCopyWith<$Res> { - _$SnChannelMemberCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnChannelMember - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? channelId = null, - Object? accountId = null, - Object? nick = freezed, - Object? channel = freezed, - Object? account = freezed, - Object? notify = null, - Object? powerLevel = null, - Object? calls = freezed, - Object? events = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - channelId: null == channelId - ? _value.channelId - : channelId // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - nick: freezed == nick - ? _value.nick - : nick // ignore: cast_nullable_to_non_nullable - as String?, - channel: freezed == channel - ? _value.channel - : channel // ignore: cast_nullable_to_non_nullable - as SnChannel?, - account: freezed == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as SnAccount?, - notify: null == notify - ? _value.notify - : notify // ignore: cast_nullable_to_non_nullable - as int, - powerLevel: null == powerLevel - ? _value.powerLevel - : powerLevel // ignore: cast_nullable_to_non_nullable - as int, - calls: freezed == calls - ? _value.calls - : calls // ignore: cast_nullable_to_non_nullable - as dynamic, - events: freezed == events - ? _value.events - : events // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); - } - - /// Create a copy of SnChannelMember - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnChannelCopyWith<$Res>? get channel { - if (_value.channel == null) { - return null; - } - - return $SnChannelCopyWith<$Res>(_value.channel!, (value) { - return _then(_value.copyWith(channel: value) as $Val); - }); - } - - /// Create a copy of SnChannelMember - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnAccountCopyWith<$Res>? get account { - if (_value.account == null) { - return null; - } - - return $SnAccountCopyWith<$Res>(_value.account!, (value) { - return _then(_value.copyWith(account: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SnChannelMemberImplCopyWith<$Res> - implements $SnChannelMemberCopyWith<$Res> { - factory _$$SnChannelMemberImplCopyWith(_$SnChannelMemberImpl value, - $Res Function(_$SnChannelMemberImpl) then) = - __$$SnChannelMemberImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int channelId, - int accountId, - String? nick, - SnChannel? channel, - SnAccount? account, - int notify, - int powerLevel, - dynamic calls, - dynamic events}); - - @override - $SnChannelCopyWith<$Res>? get channel; - @override - $SnAccountCopyWith<$Res>? get account; -} - -/// @nodoc -class __$$SnChannelMemberImplCopyWithImpl<$Res> - extends _$SnChannelMemberCopyWithImpl<$Res, _$SnChannelMemberImpl> - implements _$$SnChannelMemberImplCopyWith<$Res> { - __$$SnChannelMemberImplCopyWithImpl( - _$SnChannelMemberImpl _value, $Res Function(_$SnChannelMemberImpl) _then) - : super(_value, _then); - - /// Create a copy of SnChannelMember - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? channelId = null, - Object? accountId = null, - Object? nick = freezed, - Object? channel = freezed, - Object? account = freezed, - Object? notify = null, - Object? powerLevel = null, - Object? calls = freezed, - Object? events = freezed, - }) { - return _then(_$SnChannelMemberImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - channelId: null == channelId - ? _value.channelId - : channelId // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - nick: freezed == nick - ? _value.nick - : nick // ignore: cast_nullable_to_non_nullable - as String?, - channel: freezed == channel - ? _value.channel - : channel // ignore: cast_nullable_to_non_nullable - as SnChannel?, - account: freezed == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as SnAccount?, - notify: null == notify - ? _value.notify - : notify // ignore: cast_nullable_to_non_nullable - as int, - powerLevel: null == powerLevel - ? _value.powerLevel - : powerLevel // ignore: cast_nullable_to_non_nullable - as int, - calls: freezed == calls - ? _value.calls - : calls // ignore: cast_nullable_to_non_nullable - as dynamic, - events: freezed == events - ? _value.events - : events // ignore: cast_nullable_to_non_nullable - as dynamic, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnChannelMemberImpl extends _SnChannelMember { - const _$SnChannelMemberImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.channelId, - required this.accountId, - required this.nick, - required this.channel, - required this.account, - this.notify = 0, - required this.powerLevel, - this.calls, - this.events}) - : super._(); - - factory _$SnChannelMemberImpl.fromJson(Map json) => - _$$SnChannelMemberImplFromJson(json); - - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final int channelId; - @override - final int accountId; - @override - final String? nick; - @override - final SnChannel? channel; - @override - final SnAccount? account; - @override - @JsonKey() - final int notify; - @override - final int powerLevel; - @override - final dynamic calls; - @override - final dynamic events; - - @override - String toString() { - return 'SnChannelMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, channelId: $channelId, accountId: $accountId, nick: $nick, channel: $channel, account: $account, notify: $notify, powerLevel: $powerLevel, calls: $calls, events: $events)'; - } + /// Serializes this SnChannelMember to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnChannelMemberImpl && + other is SnChannelMember && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -888,114 +575,490 @@ class _$SnChannelMemberImpl extends _SnChannelMember { const DeepCollectionEquality().hash(calls), const DeepCollectionEquality().hash(events)); - /// Create a copy of SnChannelMember - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnChannelMemberImplCopyWith<_$SnChannelMemberImpl> get copyWith => - __$$SnChannelMemberImplCopyWithImpl<_$SnChannelMemberImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnChannelMemberImplToJson( - this, - ); + String toString() { + return 'SnChannelMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, channelId: $channelId, accountId: $accountId, nick: $nick, channel: $channel, account: $account, notify: $notify, powerLevel: $powerLevel, calls: $calls, events: $events)'; } } -abstract class _SnChannelMember extends SnChannelMember { - const factory _SnChannelMember( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int channelId, - required final int accountId, - required final String? nick, - required final SnChannel? channel, - required final SnAccount? account, - final int notify, - required final int powerLevel, - final dynamic calls, - final dynamic events}) = _$SnChannelMemberImpl; - const _SnChannelMember._() : super._(); +/// @nodoc +abstract mixin class $SnChannelMemberCopyWith<$Res> { + factory $SnChannelMemberCopyWith( + SnChannelMember value, $Res Function(SnChannelMember) _then) = + _$SnChannelMemberCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int channelId, + int accountId, + String? nick, + SnChannel? channel, + SnAccount? account, + int notify, + int powerLevel, + dynamic calls, + dynamic events}); - factory _SnChannelMember.fromJson(Map json) = - _$SnChannelMemberImpl.fromJson; + $SnChannelCopyWith<$Res>? get channel; + $SnAccountCopyWith<$Res>? get account; +} + +/// @nodoc +class _$SnChannelMemberCopyWithImpl<$Res> + implements $SnChannelMemberCopyWith<$Res> { + _$SnChannelMemberCopyWithImpl(this._self, this._then); + + final SnChannelMember _self; + final $Res Function(SnChannelMember) _then; + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? channelId = null, + Object? accountId = null, + Object? nick = freezed, + Object? channel = freezed, + Object? account = freezed, + Object? notify = null, + Object? powerLevel = null, + Object? calls = freezed, + Object? events = freezed, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + channelId: null == channelId + ? _self.channelId + : channelId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + nick: freezed == nick + ? _self.nick + : nick // ignore: cast_nullable_to_non_nullable + as String?, + channel: freezed == channel + ? _self.channel + : channel // ignore: cast_nullable_to_non_nullable + as SnChannel?, + account: freezed == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as SnAccount?, + notify: null == notify + ? _self.notify + : notify // ignore: cast_nullable_to_non_nullable + as int, + powerLevel: null == powerLevel + ? _self.powerLevel + : powerLevel // ignore: cast_nullable_to_non_nullable + as int, + calls: freezed == calls + ? _self.calls + : calls // ignore: cast_nullable_to_non_nullable + as dynamic, + events: freezed == events + ? _self.events + : events // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChannelCopyWith<$Res>? get channel { + if (_self.channel == null) { + return null; + } + + return $SnChannelCopyWith<$Res>(_self.channel!, (value) { + return _then(_self.copyWith(channel: value)); + }); + } + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res>? get account { + if (_self.account == null) { + return null; + } + + return $SnAccountCopyWith<$Res>(_self.account!, (value) { + return _then(_self.copyWith(account: value)); + }); + } +} + +/// @nodoc +@JsonSerializable() +class _SnChannelMember extends SnChannelMember { + const _SnChannelMember( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.channelId, + required this.accountId, + required this.nick, + required this.channel, + required this.account, + this.notify = 0, + required this.powerLevel, + this.calls, + this.events}) + : super._(); + factory _SnChannelMember.fromJson(Map json) => + _$SnChannelMemberFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - int get channelId; + final int channelId; @override - int get accountId; + final int accountId; @override - String? get nick; + final String? nick; @override - SnChannel? get channel; + final SnChannel? channel; @override - SnAccount? get account; + final SnAccount? account; @override - int get notify; + @JsonKey() + final int notify; @override - int get powerLevel; + final int powerLevel; @override - dynamic get calls; + final dynamic calls; @override - dynamic get events; + final dynamic events; /// Create a copy of SnChannelMember /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnChannelMemberImplCopyWith<_$SnChannelMemberImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnChannelMemberCopyWith<_SnChannelMember> get copyWith => + __$SnChannelMemberCopyWithImpl<_SnChannelMember>(this, _$identity); + + @override + Map toJson() { + return _$SnChannelMemberToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnChannelMember && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.channelId, channelId) || + other.channelId == channelId) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.nick, nick) || other.nick == nick) && + (identical(other.channel, channel) || other.channel == channel) && + (identical(other.account, account) || other.account == account) && + (identical(other.notify, notify) || other.notify == notify) && + (identical(other.powerLevel, powerLevel) || + other.powerLevel == powerLevel) && + const DeepCollectionEquality().equals(other.calls, calls) && + const DeepCollectionEquality().equals(other.events, events)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + channelId, + accountId, + nick, + channel, + account, + notify, + powerLevel, + const DeepCollectionEquality().hash(calls), + const DeepCollectionEquality().hash(events)); + + @override + String toString() { + return 'SnChannelMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, channelId: $channelId, accountId: $accountId, nick: $nick, channel: $channel, account: $account, notify: $notify, powerLevel: $powerLevel, calls: $calls, events: $events)'; + } } -SnChatMessage _$SnChatMessageFromJson(Map json) { - return _SnChatMessage.fromJson(json); +/// @nodoc +abstract mixin class _$SnChannelMemberCopyWith<$Res> + implements $SnChannelMemberCopyWith<$Res> { + factory _$SnChannelMemberCopyWith( + _SnChannelMember value, $Res Function(_SnChannelMember) _then) = + __$SnChannelMemberCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int channelId, + int accountId, + String? nick, + SnChannel? channel, + SnAccount? account, + int notify, + int powerLevel, + dynamic calls, + dynamic events}); + + @override + $SnChannelCopyWith<$Res>? get channel; + @override + $SnAccountCopyWith<$Res>? get account; +} + +/// @nodoc +class __$SnChannelMemberCopyWithImpl<$Res> + implements _$SnChannelMemberCopyWith<$Res> { + __$SnChannelMemberCopyWithImpl(this._self, this._then); + + final _SnChannelMember _self; + final $Res Function(_SnChannelMember) _then; + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? channelId = null, + Object? accountId = null, + Object? nick = freezed, + Object? channel = freezed, + Object? account = freezed, + Object? notify = null, + Object? powerLevel = null, + Object? calls = freezed, + Object? events = freezed, + }) { + return _then(_SnChannelMember( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + channelId: null == channelId + ? _self.channelId + : channelId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + nick: freezed == nick + ? _self.nick + : nick // ignore: cast_nullable_to_non_nullable + as String?, + channel: freezed == channel + ? _self.channel + : channel // ignore: cast_nullable_to_non_nullable + as SnChannel?, + account: freezed == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as SnAccount?, + notify: null == notify + ? _self.notify + : notify // ignore: cast_nullable_to_non_nullable + as int, + powerLevel: null == powerLevel + ? _self.powerLevel + : powerLevel // ignore: cast_nullable_to_non_nullable + as int, + calls: freezed == calls + ? _self.calls + : calls // ignore: cast_nullable_to_non_nullable + as dynamic, + events: freezed == events + ? _self.events + : events // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChannelCopyWith<$Res>? get channel { + if (_self.channel == null) { + return null; + } + + return $SnChannelCopyWith<$Res>(_self.channel!, (value) { + return _then(_self.copyWith(channel: value)); + }); + } + + /// Create a copy of SnChannelMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res>? get account { + if (_self.account == null) { + return null; + } + + return $SnAccountCopyWith<$Res>(_self.account!, (value) { + return _then(_self.copyWith(account: value)); + }); + } } /// @nodoc mixin _$SnChatMessage { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get uuid => throw _privateConstructorUsedError; - Map get body => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - SnChannel get channel => throw _privateConstructorUsedError; - SnChannelMember get sender => throw _privateConstructorUsedError; - int get channelId => throw _privateConstructorUsedError; - int get senderId => throw _privateConstructorUsedError; - int? get quoteEventId => throw _privateConstructorUsedError; - int? get relatedEventId => throw _privateConstructorUsedError; - SnChatMessagePreload? get preload => throw _privateConstructorUsedError; - - /// Serializes this SnChatMessage to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get uuid; + Map get body; + String get type; + SnChannel get channel; + SnChannelMember get sender; + int get channelId; + int get senderId; + int? get quoteEventId; + int? get relatedEventId; + SnChatMessagePreload? get preload; /// Create a copy of SnChatMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnChatMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnChatMessageCopyWithImpl( + this as SnChatMessage, _$identity); + + /// Serializes this SnChatMessage to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnChatMessage && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.uuid, uuid) || other.uuid == uuid) && + const DeepCollectionEquality().equals(other.body, body) && + (identical(other.type, type) || other.type == type) && + (identical(other.channel, channel) || other.channel == channel) && + (identical(other.sender, sender) || other.sender == sender) && + (identical(other.channelId, channelId) || + other.channelId == channelId) && + (identical(other.senderId, senderId) || + other.senderId == senderId) && + (identical(other.quoteEventId, quoteEventId) || + other.quoteEventId == quoteEventId) && + (identical(other.relatedEventId, relatedEventId) || + other.relatedEventId == relatedEventId) && + (identical(other.preload, preload) || other.preload == preload)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + uuid, + const DeepCollectionEquality().hash(body), + type, + channel, + sender, + channelId, + senderId, + quoteEventId, + relatedEventId, + preload); + + @override + String toString() { + return 'SnChatMessage(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, uuid: $uuid, body: $body, type: $type, channel: $channel, sender: $sender, channelId: $channelId, senderId: $senderId, quoteEventId: $quoteEventId, relatedEventId: $relatedEventId, preload: $preload)'; + } } /// @nodoc -abstract class $SnChatMessageCopyWith<$Res> { +abstract mixin class $SnChatMessageCopyWith<$Res> { factory $SnChatMessageCopyWith( - SnChatMessage value, $Res Function(SnChatMessage) then) = - _$SnChatMessageCopyWithImpl<$Res, SnChatMessage>; + SnChatMessage value, $Res Function(SnChatMessage) _then) = + _$SnChatMessageCopyWithImpl; @useResult $Res call( {int id, @@ -1019,14 +1082,12 @@ abstract class $SnChatMessageCopyWith<$Res> { } /// @nodoc -class _$SnChatMessageCopyWithImpl<$Res, $Val extends SnChatMessage> +class _$SnChatMessageCopyWithImpl<$Res> implements $SnChatMessageCopyWith<$Res> { - _$SnChatMessageCopyWithImpl(this._value, this._then); + _$SnChatMessageCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnChatMessage _self; + final $Res Function(SnChatMessage) _then; /// Create a copy of SnChatMessage /// with the given fields replaced by the non-null parameter values. @@ -1048,64 +1109,64 @@ class _$SnChatMessageCopyWithImpl<$Res, $Val extends SnChatMessage> Object? relatedEventId = freezed, Object? preload = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, uuid: null == uuid - ? _value.uuid + ? _self.uuid : uuid // ignore: cast_nullable_to_non_nullable as String, body: null == body - ? _value.body + ? _self.body : body // ignore: cast_nullable_to_non_nullable as Map, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, channel: null == channel - ? _value.channel + ? _self.channel : channel // ignore: cast_nullable_to_non_nullable as SnChannel, sender: null == sender - ? _value.sender + ? _self.sender : sender // ignore: cast_nullable_to_non_nullable as SnChannelMember, channelId: null == channelId - ? _value.channelId + ? _self.channelId : channelId // ignore: cast_nullable_to_non_nullable as int, senderId: null == senderId - ? _value.senderId + ? _self.senderId : senderId // ignore: cast_nullable_to_non_nullable as int, quoteEventId: freezed == quoteEventId - ? _value.quoteEventId + ? _self.quoteEventId : quoteEventId // ignore: cast_nullable_to_non_nullable as int?, relatedEventId: freezed == relatedEventId - ? _value.relatedEventId + ? _self.relatedEventId : relatedEventId // ignore: cast_nullable_to_non_nullable as int?, preload: freezed == preload - ? _value.preload + ? _self.preload : preload // ignore: cast_nullable_to_non_nullable as SnChatMessagePreload?, - ) as $Val); + )); } /// Create a copy of SnChatMessage @@ -1113,8 +1174,8 @@ class _$SnChatMessageCopyWithImpl<$Res, $Val extends SnChatMessage> @override @pragma('vm:prefer-inline') $SnChannelCopyWith<$Res> get channel { - return $SnChannelCopyWith<$Res>(_value.channel, (value) { - return _then(_value.copyWith(channel: value) as $Val); + return $SnChannelCopyWith<$Res>(_self.channel, (value) { + return _then(_self.copyWith(channel: value)); }); } @@ -1123,8 +1184,8 @@ class _$SnChatMessageCopyWithImpl<$Res, $Val extends SnChatMessage> @override @pragma('vm:prefer-inline') $SnChannelMemberCopyWith<$Res> get sender { - return $SnChannelMemberCopyWith<$Res>(_value.sender, (value) { - return _then(_value.copyWith(sender: value) as $Val); + return $SnChannelMemberCopyWith<$Res>(_self.sender, (value) { + return _then(_self.copyWith(sender: value)); }); } @@ -1133,141 +1194,20 @@ class _$SnChatMessageCopyWithImpl<$Res, $Val extends SnChatMessage> @override @pragma('vm:prefer-inline') $SnChatMessagePreloadCopyWith<$Res>? get preload { - if (_value.preload == null) { + if (_self.preload == null) { return null; } - return $SnChatMessagePreloadCopyWith<$Res>(_value.preload!, (value) { - return _then(_value.copyWith(preload: value) as $Val); + return $SnChatMessagePreloadCopyWith<$Res>(_self.preload!, (value) { + return _then(_self.copyWith(preload: value)); }); } } -/// @nodoc -abstract class _$$SnChatMessageImplCopyWith<$Res> - implements $SnChatMessageCopyWith<$Res> { - factory _$$SnChatMessageImplCopyWith( - _$SnChatMessageImpl value, $Res Function(_$SnChatMessageImpl) then) = - __$$SnChatMessageImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String uuid, - Map body, - String type, - SnChannel channel, - SnChannelMember sender, - int channelId, - int senderId, - int? quoteEventId, - int? relatedEventId, - SnChatMessagePreload? preload}); - - @override - $SnChannelCopyWith<$Res> get channel; - @override - $SnChannelMemberCopyWith<$Res> get sender; - @override - $SnChatMessagePreloadCopyWith<$Res>? get preload; -} - -/// @nodoc -class __$$SnChatMessageImplCopyWithImpl<$Res> - extends _$SnChatMessageCopyWithImpl<$Res, _$SnChatMessageImpl> - implements _$$SnChatMessageImplCopyWith<$Res> { - __$$SnChatMessageImplCopyWithImpl( - _$SnChatMessageImpl _value, $Res Function(_$SnChatMessageImpl) _then) - : super(_value, _then); - - /// Create a copy of SnChatMessage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? uuid = null, - Object? body = null, - Object? type = null, - Object? channel = null, - Object? sender = null, - Object? channelId = null, - Object? senderId = null, - Object? quoteEventId = freezed, - Object? relatedEventId = freezed, - Object? preload = freezed, - }) { - return _then(_$SnChatMessageImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - uuid: null == uuid - ? _value.uuid - : uuid // ignore: cast_nullable_to_non_nullable - as String, - body: null == body - ? _value._body - : body // ignore: cast_nullable_to_non_nullable - as Map, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - channel: null == channel - ? _value.channel - : channel // ignore: cast_nullable_to_non_nullable - as SnChannel, - sender: null == sender - ? _value.sender - : sender // ignore: cast_nullable_to_non_nullable - as SnChannelMember, - channelId: null == channelId - ? _value.channelId - : channelId // ignore: cast_nullable_to_non_nullable - as int, - senderId: null == senderId - ? _value.senderId - : senderId // ignore: cast_nullable_to_non_nullable - as int, - quoteEventId: freezed == quoteEventId - ? _value.quoteEventId - : quoteEventId // ignore: cast_nullable_to_non_nullable - as int?, - relatedEventId: freezed == relatedEventId - ? _value.relatedEventId - : relatedEventId // ignore: cast_nullable_to_non_nullable - as int?, - preload: freezed == preload - ? _value.preload - : preload // ignore: cast_nullable_to_non_nullable - as SnChatMessagePreload?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnChatMessageImpl extends _SnChatMessage { - const _$SnChatMessageImpl( +class _SnChatMessage extends SnChatMessage { + const _SnChatMessage( {required this.id, required this.createdAt, required this.updatedAt, @@ -1284,9 +1224,8 @@ class _$SnChatMessageImpl extends _SnChatMessage { this.preload}) : _body = body, super._(); - - factory _$SnChatMessageImpl.fromJson(Map json) => - _$$SnChatMessageImplFromJson(json); + factory _SnChatMessage.fromJson(Map json) => + _$SnChatMessageFromJson(json); @override final int id; @@ -1324,16 +1263,26 @@ class _$SnChatMessageImpl extends _SnChatMessage { @override final SnChatMessagePreload? preload; + /// Create a copy of SnChatMessage + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnChatMessage(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, uuid: $uuid, body: $body, type: $type, channel: $channel, sender: $sender, channelId: $channelId, senderId: $senderId, quoteEventId: $quoteEventId, relatedEventId: $relatedEventId, preload: $preload)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnChatMessageCopyWith<_SnChatMessage> get copyWith => + __$SnChatMessageCopyWithImpl<_SnChatMessage>(this, _$identity); + + @override + Map toJson() { + return _$SnChatMessageToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnChatMessageImpl && + other is _SnChatMessage && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1376,104 +1325,210 @@ class _$SnChatMessageImpl extends _SnChatMessage { relatedEventId, preload); - /// Create a copy of SnChatMessage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnChatMessageImplCopyWith<_$SnChatMessageImpl> get copyWith => - __$$SnChatMessageImplCopyWithImpl<_$SnChatMessageImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnChatMessageImplToJson( - this, - ); + String toString() { + return 'SnChatMessage(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, uuid: $uuid, body: $body, type: $type, channel: $channel, sender: $sender, channelId: $channelId, senderId: $senderId, quoteEventId: $quoteEventId, relatedEventId: $relatedEventId, preload: $preload)'; } } -abstract class _SnChatMessage extends SnChatMessage { - const factory _SnChatMessage( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String uuid, - final Map body, - required final String type, - required final SnChannel channel, - required final SnChannelMember sender, - required final int channelId, - required final int senderId, - required final int? quoteEventId, - required final int? relatedEventId, - final SnChatMessagePreload? preload}) = _$SnChatMessageImpl; - const _SnChatMessage._() : super._(); - - factory _SnChatMessage.fromJson(Map json) = - _$SnChatMessageImpl.fromJson; +/// @nodoc +abstract mixin class _$SnChatMessageCopyWith<$Res> + implements $SnChatMessageCopyWith<$Res> { + factory _$SnChatMessageCopyWith( + _SnChatMessage value, $Res Function(_SnChatMessage) _then) = + __$SnChatMessageCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String uuid, + Map body, + String type, + SnChannel channel, + SnChannelMember sender, + int channelId, + int senderId, + int? quoteEventId, + int? relatedEventId, + SnChatMessagePreload? preload}); @override - int get id; + $SnChannelCopyWith<$Res> get channel; @override - DateTime get createdAt; + $SnChannelMemberCopyWith<$Res> get sender; @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get uuid; - @override - Map get body; - @override - String get type; - @override - SnChannel get channel; - @override - SnChannelMember get sender; - @override - int get channelId; - @override - int get senderId; - @override - int? get quoteEventId; - @override - int? get relatedEventId; - @override - SnChatMessagePreload? get preload; + $SnChatMessagePreloadCopyWith<$Res>? get preload; +} + +/// @nodoc +class __$SnChatMessageCopyWithImpl<$Res> + implements _$SnChatMessageCopyWith<$Res> { + __$SnChatMessageCopyWithImpl(this._self, this._then); + + final _SnChatMessage _self; + final $Res Function(_SnChatMessage) _then; /// Create a copy of SnChatMessage /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnChatMessageImplCopyWith<_$SnChatMessageImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? uuid = null, + Object? body = null, + Object? type = null, + Object? channel = null, + Object? sender = null, + Object? channelId = null, + Object? senderId = null, + Object? quoteEventId = freezed, + Object? relatedEventId = freezed, + Object? preload = freezed, + }) { + return _then(_SnChatMessage( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + uuid: null == uuid + ? _self.uuid + : uuid // ignore: cast_nullable_to_non_nullable + as String, + body: null == body + ? _self._body + : body // ignore: cast_nullable_to_non_nullable + as Map, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + channel: null == channel + ? _self.channel + : channel // ignore: cast_nullable_to_non_nullable + as SnChannel, + sender: null == sender + ? _self.sender + : sender // ignore: cast_nullable_to_non_nullable + as SnChannelMember, + channelId: null == channelId + ? _self.channelId + : channelId // ignore: cast_nullable_to_non_nullable + as int, + senderId: null == senderId + ? _self.senderId + : senderId // ignore: cast_nullable_to_non_nullable + as int, + quoteEventId: freezed == quoteEventId + ? _self.quoteEventId + : quoteEventId // ignore: cast_nullable_to_non_nullable + as int?, + relatedEventId: freezed == relatedEventId + ? _self.relatedEventId + : relatedEventId // ignore: cast_nullable_to_non_nullable + as int?, + preload: freezed == preload + ? _self.preload + : preload // ignore: cast_nullable_to_non_nullable + as SnChatMessagePreload?, + )); + } -SnChatMessagePreload _$SnChatMessagePreloadFromJson(Map json) { - return _SnChatMessagePreload.fromJson(json); + /// Create a copy of SnChatMessage + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChannelCopyWith<$Res> get channel { + return $SnChannelCopyWith<$Res>(_self.channel, (value) { + return _then(_self.copyWith(channel: value)); + }); + } + + /// Create a copy of SnChatMessage + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChannelMemberCopyWith<$Res> get sender { + return $SnChannelMemberCopyWith<$Res>(_self.sender, (value) { + return _then(_self.copyWith(sender: value)); + }); + } + + /// Create a copy of SnChatMessage + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChatMessagePreloadCopyWith<$Res>? get preload { + if (_self.preload == null) { + return null; + } + + return $SnChatMessagePreloadCopyWith<$Res>(_self.preload!, (value) { + return _then(_self.copyWith(preload: value)); + }); + } } /// @nodoc mixin _$SnChatMessagePreload { - List? get attachments => throw _privateConstructorUsedError; - SnChatMessage? get quoteEvent => throw _privateConstructorUsedError; - - /// Serializes this SnChatMessagePreload to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List? get attachments; + SnChatMessage? get quoteEvent; /// Create a copy of SnChatMessagePreload /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnChatMessagePreloadCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnChatMessagePreloadCopyWithImpl( + this as SnChatMessagePreload, _$identity); + + /// Serializes this SnChatMessagePreload to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnChatMessagePreload && + const DeepCollectionEquality() + .equals(other.attachments, attachments) && + (identical(other.quoteEvent, quoteEvent) || + other.quoteEvent == quoteEvent)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, + const DeepCollectionEquality().hash(attachments), quoteEvent); + + @override + String toString() { + return 'SnChatMessagePreload(attachments: $attachments, quoteEvent: $quoteEvent)'; + } } /// @nodoc -abstract class $SnChatMessagePreloadCopyWith<$Res> { +abstract mixin class $SnChatMessagePreloadCopyWith<$Res> { factory $SnChatMessagePreloadCopyWith(SnChatMessagePreload value, - $Res Function(SnChatMessagePreload) then) = - _$SnChatMessagePreloadCopyWithImpl<$Res, SnChatMessagePreload>; + $Res Function(SnChatMessagePreload) _then) = + _$SnChatMessagePreloadCopyWithImpl; @useResult $Res call({List? attachments, SnChatMessage? quoteEvent}); @@ -1481,15 +1536,12 @@ abstract class $SnChatMessagePreloadCopyWith<$Res> { } /// @nodoc -class _$SnChatMessagePreloadCopyWithImpl<$Res, - $Val extends SnChatMessagePreload> +class _$SnChatMessagePreloadCopyWithImpl<$Res> implements $SnChatMessagePreloadCopyWith<$Res> { - _$SnChatMessagePreloadCopyWithImpl(this._value, this._then); + _$SnChatMessagePreloadCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnChatMessagePreload _self; + final $Res Function(SnChatMessagePreload) _then; /// Create a copy of SnChatMessagePreload /// with the given fields replaced by the non-null parameter values. @@ -1499,16 +1551,16 @@ class _$SnChatMessagePreloadCopyWithImpl<$Res, Object? attachments = freezed, Object? quoteEvent = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( attachments: freezed == attachments - ? _value.attachments + ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, quoteEvent: freezed == quoteEvent - ? _value.quoteEvent + ? _self.quoteEvent : quoteEvent // ignore: cast_nullable_to_non_nullable as SnChatMessage?, - ) as $Val); + )); } /// Create a copy of SnChatMessagePreload @@ -1516,69 +1568,25 @@ class _$SnChatMessagePreloadCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $SnChatMessageCopyWith<$Res>? get quoteEvent { - if (_value.quoteEvent == null) { + if (_self.quoteEvent == null) { return null; } - return $SnChatMessageCopyWith<$Res>(_value.quoteEvent!, (value) { - return _then(_value.copyWith(quoteEvent: value) as $Val); + return $SnChatMessageCopyWith<$Res>(_self.quoteEvent!, (value) { + return _then(_self.copyWith(quoteEvent: value)); }); } } -/// @nodoc -abstract class _$$SnChatMessagePreloadImplCopyWith<$Res> - implements $SnChatMessagePreloadCopyWith<$Res> { - factory _$$SnChatMessagePreloadImplCopyWith(_$SnChatMessagePreloadImpl value, - $Res Function(_$SnChatMessagePreloadImpl) then) = - __$$SnChatMessagePreloadImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({List? attachments, SnChatMessage? quoteEvent}); - - @override - $SnChatMessageCopyWith<$Res>? get quoteEvent; -} - -/// @nodoc -class __$$SnChatMessagePreloadImplCopyWithImpl<$Res> - extends _$SnChatMessagePreloadCopyWithImpl<$Res, _$SnChatMessagePreloadImpl> - implements _$$SnChatMessagePreloadImplCopyWith<$Res> { - __$$SnChatMessagePreloadImplCopyWithImpl(_$SnChatMessagePreloadImpl _value, - $Res Function(_$SnChatMessagePreloadImpl) _then) - : super(_value, _then); - - /// Create a copy of SnChatMessagePreload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? attachments = freezed, - Object? quoteEvent = freezed, - }) { - return _then(_$SnChatMessagePreloadImpl( - attachments: freezed == attachments - ? _value._attachments - : attachments // ignore: cast_nullable_to_non_nullable - as List?, - quoteEvent: freezed == quoteEvent - ? _value.quoteEvent - : quoteEvent // ignore: cast_nullable_to_non_nullable - as SnChatMessage?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnChatMessagePreloadImpl extends _SnChatMessagePreload { - const _$SnChatMessagePreloadImpl( +class _SnChatMessagePreload extends SnChatMessagePreload { + const _SnChatMessagePreload( {final List? attachments, this.quoteEvent}) : _attachments = attachments, super._(); - - factory _$SnChatMessagePreloadImpl.fromJson(Map json) => - _$$SnChatMessagePreloadImplFromJson(json); + factory _SnChatMessagePreload.fromJson(Map json) => + _$SnChatMessagePreloadFromJson(json); final List? _attachments; @override @@ -1593,16 +1601,27 @@ class _$SnChatMessagePreloadImpl extends _SnChatMessagePreload { @override final SnChatMessage? quoteEvent; + /// Create a copy of SnChatMessagePreload + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnChatMessagePreload(attachments: $attachments, quoteEvent: $quoteEvent)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnChatMessagePreloadCopyWith<_SnChatMessagePreload> get copyWith => + __$SnChatMessagePreloadCopyWithImpl<_SnChatMessagePreload>( + this, _$identity); + + @override + Map toJson() { + return _$SnChatMessagePreloadToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnChatMessagePreloadImpl && + other is _SnChatMessagePreload && const DeepCollectionEquality() .equals(other._attachments, _attachments) && (identical(other.quoteEvent, quoteEvent) || @@ -1614,78 +1633,142 @@ class _$SnChatMessagePreloadImpl extends _SnChatMessagePreload { int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_attachments), quoteEvent); - /// Create a copy of SnChatMessagePreload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnChatMessagePreloadImplCopyWith<_$SnChatMessagePreloadImpl> - get copyWith => - __$$SnChatMessagePreloadImplCopyWithImpl<_$SnChatMessagePreloadImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnChatMessagePreloadImplToJson( - this, - ); + String toString() { + return 'SnChatMessagePreload(attachments: $attachments, quoteEvent: $quoteEvent)'; } } -abstract class _SnChatMessagePreload extends SnChatMessagePreload { - const factory _SnChatMessagePreload( - {final List? attachments, - final SnChatMessage? quoteEvent}) = _$SnChatMessagePreloadImpl; - const _SnChatMessagePreload._() : super._(); - - factory _SnChatMessagePreload.fromJson(Map json) = - _$SnChatMessagePreloadImpl.fromJson; +/// @nodoc +abstract mixin class _$SnChatMessagePreloadCopyWith<$Res> + implements $SnChatMessagePreloadCopyWith<$Res> { + factory _$SnChatMessagePreloadCopyWith(_SnChatMessagePreload value, + $Res Function(_SnChatMessagePreload) _then) = + __$SnChatMessagePreloadCopyWithImpl; + @override + @useResult + $Res call({List? attachments, SnChatMessage? quoteEvent}); @override - List? get attachments; - @override - SnChatMessage? get quoteEvent; + $SnChatMessageCopyWith<$Res>? get quoteEvent; +} + +/// @nodoc +class __$SnChatMessagePreloadCopyWithImpl<$Res> + implements _$SnChatMessagePreloadCopyWith<$Res> { + __$SnChatMessagePreloadCopyWithImpl(this._self, this._then); + + final _SnChatMessagePreload _self; + final $Res Function(_SnChatMessagePreload) _then; /// Create a copy of SnChatMessagePreload /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnChatMessagePreloadImplCopyWith<_$SnChatMessagePreloadImpl> - get copyWith => throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? attachments = freezed, + Object? quoteEvent = freezed, + }) { + return _then(_SnChatMessagePreload( + attachments: freezed == attachments + ? _self._attachments + : attachments // ignore: cast_nullable_to_non_nullable + as List?, + quoteEvent: freezed == quoteEvent + ? _self.quoteEvent + : quoteEvent // ignore: cast_nullable_to_non_nullable + as SnChatMessage?, + )); + } -SnChatCall _$SnChatCallFromJson(Map json) { - return _SnChatCall.fromJson(json); + /// Create a copy of SnChatMessagePreload + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChatMessageCopyWith<$Res>? get quoteEvent { + if (_self.quoteEvent == null) { + return null; + } + + return $SnChatMessageCopyWith<$Res>(_self.quoteEvent!, (value) { + return _then(_self.copyWith(quoteEvent: value)); + }); + } } /// @nodoc mixin _$SnChatCall { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - DateTime? get endedAt => throw _privateConstructorUsedError; - String get externalId => throw _privateConstructorUsedError; - int get founderId => throw _privateConstructorUsedError; - int get channelId => throw _privateConstructorUsedError; - SnChannelMember get founder => throw _privateConstructorUsedError; - List get participants => throw _privateConstructorUsedError; - - /// Serializes this SnChatCall to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + DateTime? get endedAt; + String get externalId; + int get founderId; + int get channelId; + SnChannelMember get founder; + List get participants; /// Create a copy of SnChatCall /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnChatCallCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnChatCallCopyWithImpl(this as SnChatCall, _$identity); + + /// Serializes this SnChatCall to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnChatCall && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.endedAt, endedAt) || other.endedAt == endedAt) && + (identical(other.externalId, externalId) || + other.externalId == externalId) && + (identical(other.founderId, founderId) || + other.founderId == founderId) && + (identical(other.channelId, channelId) || + other.channelId == channelId) && + (identical(other.founder, founder) || other.founder == founder) && + const DeepCollectionEquality() + .equals(other.participants, participants)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + endedAt, + externalId, + founderId, + channelId, + founder, + const DeepCollectionEquality().hash(participants)); + + @override + String toString() { + return 'SnChatCall(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, endedAt: $endedAt, externalId: $externalId, founderId: $founderId, channelId: $channelId, founder: $founder, participants: $participants)'; + } } /// @nodoc -abstract class $SnChatCallCopyWith<$Res> { +abstract mixin class $SnChatCallCopyWith<$Res> { factory $SnChatCallCopyWith( - SnChatCall value, $Res Function(SnChatCall) then) = - _$SnChatCallCopyWithImpl<$Res, SnChatCall>; + SnChatCall value, $Res Function(SnChatCall) _then) = + _$SnChatCallCopyWithImpl; @useResult $Res call( {int id, @@ -1703,14 +1786,11 @@ abstract class $SnChatCallCopyWith<$Res> { } /// @nodoc -class _$SnChatCallCopyWithImpl<$Res, $Val extends SnChatCall> - implements $SnChatCallCopyWith<$Res> { - _$SnChatCallCopyWithImpl(this._value, this._then); +class _$SnChatCallCopyWithImpl<$Res> implements $SnChatCallCopyWith<$Res> { + _$SnChatCallCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnChatCall _self; + final $Res Function(SnChatCall) _then; /// Create a copy of SnChatCall /// with the given fields replaced by the non-null parameter values. @@ -1728,48 +1808,48 @@ class _$SnChatCallCopyWithImpl<$Res, $Val extends SnChatCall> Object? founder = null, Object? participants = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, endedAt: freezed == endedAt - ? _value.endedAt + ? _self.endedAt : endedAt // ignore: cast_nullable_to_non_nullable as DateTime?, externalId: null == externalId - ? _value.externalId + ? _self.externalId : externalId // ignore: cast_nullable_to_non_nullable as String, founderId: null == founderId - ? _value.founderId + ? _self.founderId : founderId // ignore: cast_nullable_to_non_nullable as int, channelId: null == channelId - ? _value.channelId + ? _self.channelId : channelId // ignore: cast_nullable_to_non_nullable as int, founder: null == founder - ? _value.founder + ? _self.founder : founder // ignore: cast_nullable_to_non_nullable as SnChannelMember, participants: null == participants - ? _value.participants + ? _self.participants : participants // ignore: cast_nullable_to_non_nullable as List, - ) as $Val); + )); } /// Create a copy of SnChatCall @@ -1777,109 +1857,16 @@ class _$SnChatCallCopyWithImpl<$Res, $Val extends SnChatCall> @override @pragma('vm:prefer-inline') $SnChannelMemberCopyWith<$Res> get founder { - return $SnChannelMemberCopyWith<$Res>(_value.founder, (value) { - return _then(_value.copyWith(founder: value) as $Val); + return $SnChannelMemberCopyWith<$Res>(_self.founder, (value) { + return _then(_self.copyWith(founder: value)); }); } } -/// @nodoc -abstract class _$$SnChatCallImplCopyWith<$Res> - implements $SnChatCallCopyWith<$Res> { - factory _$$SnChatCallImplCopyWith( - _$SnChatCallImpl value, $Res Function(_$SnChatCallImpl) then) = - __$$SnChatCallImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - DateTime? endedAt, - String externalId, - int founderId, - int channelId, - SnChannelMember founder, - List participants}); - - @override - $SnChannelMemberCopyWith<$Res> get founder; -} - -/// @nodoc -class __$$SnChatCallImplCopyWithImpl<$Res> - extends _$SnChatCallCopyWithImpl<$Res, _$SnChatCallImpl> - implements _$$SnChatCallImplCopyWith<$Res> { - __$$SnChatCallImplCopyWithImpl( - _$SnChatCallImpl _value, $Res Function(_$SnChatCallImpl) _then) - : super(_value, _then); - - /// Create a copy of SnChatCall - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? endedAt = freezed, - Object? externalId = null, - Object? founderId = null, - Object? channelId = null, - Object? founder = null, - Object? participants = null, - }) { - return _then(_$SnChatCallImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - endedAt: freezed == endedAt - ? _value.endedAt - : endedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - externalId: null == externalId - ? _value.externalId - : externalId // ignore: cast_nullable_to_non_nullable - as String, - founderId: null == founderId - ? _value.founderId - : founderId // ignore: cast_nullable_to_non_nullable - as int, - channelId: null == channelId - ? _value.channelId - : channelId // ignore: cast_nullable_to_non_nullable - as int, - founder: null == founder - ? _value.founder - : founder // ignore: cast_nullable_to_non_nullable - as SnChannelMember, - participants: null == participants - ? _value._participants - : participants // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnChatCallImpl implements _SnChatCall { - const _$SnChatCallImpl( +class _SnChatCall implements SnChatCall { + const _SnChatCall( {required this.id, required this.createdAt, required this.updatedAt, @@ -1891,9 +1878,8 @@ class _$SnChatCallImpl implements _SnChatCall { required this.founder, final List participants = const []}) : _participants = participants; - - factory _$SnChatCallImpl.fromJson(Map json) => - _$$SnChatCallImplFromJson(json); + factory _SnChatCall.fromJson(Map json) => + _$SnChatCallFromJson(json); @override final int id; @@ -1922,16 +1908,26 @@ class _$SnChatCallImpl implements _SnChatCall { return EqualUnmodifiableListView(_participants); } + /// Create a copy of SnChatCall + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnChatCall(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, endedAt: $endedAt, externalId: $externalId, founderId: $founderId, channelId: $channelId, founder: $founder, participants: $participants)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnChatCallCopyWith<_SnChatCall> get copyWith => + __$SnChatCallCopyWithImpl<_SnChatCall>(this, _$identity); + + @override + Map toJson() { + return _$SnChatCallToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnChatCallImpl && + other is _SnChatCall && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1966,63 +1962,112 @@ class _$SnChatCallImpl implements _SnChatCall { founder, const DeepCollectionEquality().hash(_participants)); - /// Create a copy of SnChatCall - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnChatCallImplCopyWith<_$SnChatCallImpl> get copyWith => - __$$SnChatCallImplCopyWithImpl<_$SnChatCallImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnChatCallImplToJson( - this, - ); + String toString() { + return 'SnChatCall(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, endedAt: $endedAt, externalId: $externalId, founderId: $founderId, channelId: $channelId, founder: $founder, participants: $participants)'; } } -abstract class _SnChatCall implements SnChatCall { - const factory _SnChatCall( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final DateTime? endedAt, - required final String externalId, - required final int founderId, - required final int channelId, - required final SnChannelMember founder, - final List participants}) = _$SnChatCallImpl; - - factory _SnChatCall.fromJson(Map json) = - _$SnChatCallImpl.fromJson; +/// @nodoc +abstract mixin class _$SnChatCallCopyWith<$Res> + implements $SnChatCallCopyWith<$Res> { + factory _$SnChatCallCopyWith( + _SnChatCall value, $Res Function(_SnChatCall) _then) = + __$SnChatCallCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + DateTime? endedAt, + String externalId, + int founderId, + int channelId, + SnChannelMember founder, + List participants}); @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - DateTime? get endedAt; - @override - String get externalId; - @override - int get founderId; - @override - int get channelId; - @override - SnChannelMember get founder; - @override - List get participants; + $SnChannelMemberCopyWith<$Res> get founder; +} + +/// @nodoc +class __$SnChatCallCopyWithImpl<$Res> implements _$SnChatCallCopyWith<$Res> { + __$SnChatCallCopyWithImpl(this._self, this._then); + + final _SnChatCall _self; + final $Res Function(_SnChatCall) _then; /// Create a copy of SnChatCall /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnChatCallImplCopyWith<_$SnChatCallImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? endedAt = freezed, + Object? externalId = null, + Object? founderId = null, + Object? channelId = null, + Object? founder = null, + Object? participants = null, + }) { + return _then(_SnChatCall( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + endedAt: freezed == endedAt + ? _self.endedAt + : endedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + externalId: null == externalId + ? _self.externalId + : externalId // ignore: cast_nullable_to_non_nullable + as String, + founderId: null == founderId + ? _self.founderId + : founderId // ignore: cast_nullable_to_non_nullable + as int, + channelId: null == channelId + ? _self.channelId + : channelId // ignore: cast_nullable_to_non_nullable + as int, + founder: null == founder + ? _self.founder + : founder // ignore: cast_nullable_to_non_nullable + as SnChannelMember, + participants: null == participants + ? _self._participants + : participants // ignore: cast_nullable_to_non_nullable + as List, + )); + } + + /// Create a copy of SnChatCall + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnChannelMemberCopyWith<$Res> get founder { + return $SnChannelMemberCopyWith<$Res>(_self.founder, (value) { + return _then(_self.copyWith(founder: value)); + }); + } } + +// dart format on diff --git a/lib/types/chat.g.dart b/lib/types/chat.g.dart index cfc423b..1775f83 100644 --- a/lib/types/chat.g.dart +++ b/lib/types/chat.g.dart @@ -6,8 +6,7 @@ part of 'chat.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnChannelImpl _$$SnChannelImplFromJson(Map json) => - _$SnChannelImpl( +_SnChannel _$SnChannelFromJson(Map json) => _SnChannel( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -31,7 +30,7 @@ _$SnChannelImpl _$$SnChannelImplFromJson(Map json) => isCommunity: json['is_community'] as bool, ); -Map _$$SnChannelImplToJson(_$SnChannelImpl instance) => +Map _$SnChannelToJson(_SnChannel instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -50,9 +49,8 @@ Map _$$SnChannelImplToJson(_$SnChannelImpl instance) => 'is_community': instance.isCommunity, }; -_$SnChannelMemberImpl _$$SnChannelMemberImplFromJson( - Map json) => - _$SnChannelMemberImpl( +_SnChannelMember _$SnChannelMemberFromJson(Map json) => + _SnChannelMember( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -74,8 +72,7 @@ _$SnChannelMemberImpl _$$SnChannelMemberImplFromJson( events: json['events'], ); -Map _$$SnChannelMemberImplToJson( - _$SnChannelMemberImpl instance) => +Map _$SnChannelMemberToJson(_SnChannelMember instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -92,8 +89,8 @@ Map _$$SnChannelMemberImplToJson( 'events': instance.events, }; -_$SnChatMessageImpl _$$SnChatMessageImplFromJson(Map json) => - _$SnChatMessageImpl( +_SnChatMessage _$SnChatMessageFromJson(Map json) => + _SnChatMessage( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -115,7 +112,7 @@ _$SnChatMessageImpl _$$SnChatMessageImplFromJson(Map json) => json['preload'] as Map), ); -Map _$$SnChatMessageImplToJson(_$SnChatMessageImpl instance) => +Map _$SnChatMessageToJson(_SnChatMessage instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -133,9 +130,9 @@ Map _$$SnChatMessageImplToJson(_$SnChatMessageImpl instance) => 'preload': instance.preload?.toJson(), }; -_$SnChatMessagePreloadImpl _$$SnChatMessagePreloadImplFromJson( +_SnChatMessagePreload _$SnChatMessagePreloadFromJson( Map json) => - _$SnChatMessagePreloadImpl( + _SnChatMessagePreload( attachments: (json['attachments'] as List?) ?.map((e) => e == null ? null @@ -146,15 +143,14 @@ _$SnChatMessagePreloadImpl _$$SnChatMessagePreloadImplFromJson( : SnChatMessage.fromJson(json['quote_event'] as Map), ); -Map _$$SnChatMessagePreloadImplToJson( - _$SnChatMessagePreloadImpl instance) => +Map _$SnChatMessagePreloadToJson( + _SnChatMessagePreload instance) => { 'attachments': instance.attachments?.map((e) => e?.toJson()).toList(), 'quote_event': instance.quoteEvent?.toJson(), }; -_$SnChatCallImpl _$$SnChatCallImplFromJson(Map json) => - _$SnChatCallImpl( +_SnChatCall _$SnChatCallFromJson(Map json) => _SnChatCall( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -172,7 +168,7 @@ _$SnChatCallImpl _$$SnChatCallImplFromJson(Map json) => participants: json['participants'] as List? ?? const [], ); -Map _$$SnChatCallImplToJson(_$SnChatCallImpl instance) => +Map _$SnChatCallToJson(_SnChatCall instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/check_in.dart b/lib/types/check_in.dart index 057198a..0065523 100644 --- a/lib/types/check_in.dart +++ b/lib/types/check_in.dart @@ -14,7 +14,7 @@ final List kCheckInResultTierSymbols = [ ].map((e) => e.tr()).toList(); @freezed -class SnCheckInRecord with _$SnCheckInRecord { +abstract class SnCheckInRecord with _$SnCheckInRecord { const SnCheckInRecord._(); const factory SnCheckInRecord({ diff --git a/lib/types/check_in.freezed.dart b/lib/types/check_in.freezed.dart index 383b7e7..c21c4a5 100644 --- a/lib/types/check_in.freezed.dart +++ b/lib/types/check_in.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,128 +10,81 @@ part of 'check_in.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnCheckInRecord _$SnCheckInRecordFromJson(Map json) { - return _SnCheckInRecord.fromJson(json); -} - /// @nodoc mixin _$SnCheckInRecord { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get resultTier => throw _privateConstructorUsedError; - int get resultExperience => throw _privateConstructorUsedError; - double get resultCoin => throw _privateConstructorUsedError; - List get resultModifiers => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnCheckInRecord to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get resultTier; + int get resultExperience; + double get resultCoin; + List get resultModifiers; + int get accountId; /// Create a copy of SnCheckInRecord /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnCheckInRecordCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnCheckInRecordCopyWith<$Res> { - factory $SnCheckInRecordCopyWith( - SnCheckInRecord value, $Res Function(SnCheckInRecord) then) = - _$SnCheckInRecordCopyWithImpl<$Res, SnCheckInRecord>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int resultTier, - int resultExperience, - double resultCoin, - List resultModifiers, - int accountId}); -} - -/// @nodoc -class _$SnCheckInRecordCopyWithImpl<$Res, $Val extends SnCheckInRecord> - implements $SnCheckInRecordCopyWith<$Res> { - _$SnCheckInRecordCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnCheckInRecord - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnCheckInRecordCopyWith get copyWith => + _$SnCheckInRecordCopyWithImpl( + this as SnCheckInRecord, _$identity); + + /// Serializes this SnCheckInRecord to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? resultTier = null, - Object? resultExperience = null, - Object? resultCoin = null, - Object? resultModifiers = null, - Object? accountId = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - resultTier: null == resultTier - ? _value.resultTier - : resultTier // ignore: cast_nullable_to_non_nullable - as int, - resultExperience: null == resultExperience - ? _value.resultExperience - : resultExperience // ignore: cast_nullable_to_non_nullable - as int, - resultCoin: null == resultCoin - ? _value.resultCoin - : resultCoin // ignore: cast_nullable_to_non_nullable - as double, - resultModifiers: null == resultModifiers - ? _value.resultModifiers - : resultModifiers // ignore: cast_nullable_to_non_nullable - as List, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnCheckInRecord && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.resultTier, resultTier) || + other.resultTier == resultTier) && + (identical(other.resultExperience, resultExperience) || + other.resultExperience == resultExperience) && + (identical(other.resultCoin, resultCoin) || + other.resultCoin == resultCoin) && + const DeepCollectionEquality() + .equals(other.resultModifiers, resultModifiers) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + resultTier, + resultExperience, + resultCoin, + const DeepCollectionEquality().hash(resultModifiers), + accountId); + + @override + String toString() { + return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)'; } } /// @nodoc -abstract class _$$SnCheckInRecordImplCopyWith<$Res> - implements $SnCheckInRecordCopyWith<$Res> { - factory _$$SnCheckInRecordImplCopyWith(_$SnCheckInRecordImpl value, - $Res Function(_$SnCheckInRecordImpl) then) = - __$$SnCheckInRecordImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnCheckInRecordCopyWith<$Res> { + factory $SnCheckInRecordCopyWith( + SnCheckInRecord value, $Res Function(SnCheckInRecord) _then) = + _$SnCheckInRecordCopyWithImpl; @useResult $Res call( {int id, @@ -145,12 +99,12 @@ abstract class _$$SnCheckInRecordImplCopyWith<$Res> } /// @nodoc -class __$$SnCheckInRecordImplCopyWithImpl<$Res> - extends _$SnCheckInRecordCopyWithImpl<$Res, _$SnCheckInRecordImpl> - implements _$$SnCheckInRecordImplCopyWith<$Res> { - __$$SnCheckInRecordImplCopyWithImpl( - _$SnCheckInRecordImpl _value, $Res Function(_$SnCheckInRecordImpl) _then) - : super(_value, _then); +class _$SnCheckInRecordCopyWithImpl<$Res> + implements $SnCheckInRecordCopyWith<$Res> { + _$SnCheckInRecordCopyWithImpl(this._self, this._then); + + final SnCheckInRecord _self; + final $Res Function(SnCheckInRecord) _then; /// Create a copy of SnCheckInRecord /// with the given fields replaced by the non-null parameter values. @@ -167,41 +121,41 @@ class __$$SnCheckInRecordImplCopyWithImpl<$Res> Object? resultModifiers = null, Object? accountId = null, }) { - return _then(_$SnCheckInRecordImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, resultTier: null == resultTier - ? _value.resultTier + ? _self.resultTier : resultTier // ignore: cast_nullable_to_non_nullable as int, resultExperience: null == resultExperience - ? _value.resultExperience + ? _self.resultExperience : resultExperience // ignore: cast_nullable_to_non_nullable as int, resultCoin: null == resultCoin - ? _value.resultCoin + ? _self.resultCoin : resultCoin // ignore: cast_nullable_to_non_nullable as double, resultModifiers: null == resultModifiers - ? _value._resultModifiers + ? _self.resultModifiers : resultModifiers // ignore: cast_nullable_to_non_nullable as List, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, )); @@ -210,8 +164,8 @@ class __$$SnCheckInRecordImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnCheckInRecordImpl extends _SnCheckInRecord { - const _$SnCheckInRecordImpl( +class _SnCheckInRecord extends SnCheckInRecord { + const _SnCheckInRecord( {required this.id, required this.createdAt, required this.updatedAt, @@ -223,9 +177,8 @@ class _$SnCheckInRecordImpl extends _SnCheckInRecord { required this.accountId}) : _resultModifiers = resultModifiers, super._(); - - factory _$SnCheckInRecordImpl.fromJson(Map json) => - _$$SnCheckInRecordImplFromJson(json); + factory _SnCheckInRecord.fromJson(Map json) => + _$SnCheckInRecordFromJson(json); @override final int id; @@ -252,16 +205,26 @@ class _$SnCheckInRecordImpl extends _SnCheckInRecord { @override final int accountId; + /// Create a copy of SnCheckInRecord + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnCheckInRecordCopyWith<_SnCheckInRecord> get copyWith => + __$SnCheckInRecordCopyWithImpl<_SnCheckInRecord>(this, _$identity); + + @override + Map toJson() { + return _$SnCheckInRecordToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnCheckInRecordImpl && + other is _SnCheckInRecord && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -295,62 +258,94 @@ class _$SnCheckInRecordImpl extends _SnCheckInRecord { const DeepCollectionEquality().hash(_resultModifiers), accountId); - /// Create a copy of SnCheckInRecord - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnCheckInRecordImplCopyWith<_$SnCheckInRecordImpl> get copyWith => - __$$SnCheckInRecordImplCopyWithImpl<_$SnCheckInRecordImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnCheckInRecordImplToJson( - this, - ); + String toString() { + return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)'; } } -abstract class _SnCheckInRecord extends SnCheckInRecord { - const factory _SnCheckInRecord( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int resultTier, - required final int resultExperience, - required final double resultCoin, - required final List resultModifiers, - required final int accountId}) = _$SnCheckInRecordImpl; - const _SnCheckInRecord._() : super._(); +/// @nodoc +abstract mixin class _$SnCheckInRecordCopyWith<$Res> + implements $SnCheckInRecordCopyWith<$Res> { + factory _$SnCheckInRecordCopyWith( + _SnCheckInRecord value, $Res Function(_SnCheckInRecord) _then) = + __$SnCheckInRecordCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int resultTier, + int resultExperience, + double resultCoin, + List resultModifiers, + int accountId}); +} - factory _SnCheckInRecord.fromJson(Map json) = - _$SnCheckInRecordImpl.fromJson; +/// @nodoc +class __$SnCheckInRecordCopyWithImpl<$Res> + implements _$SnCheckInRecordCopyWith<$Res> { + __$SnCheckInRecordCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get resultTier; - @override - int get resultExperience; - @override - double get resultCoin; - @override - List get resultModifiers; - @override - int get accountId; + final _SnCheckInRecord _self; + final $Res Function(_SnCheckInRecord) _then; /// Create a copy of SnCheckInRecord /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnCheckInRecordImplCopyWith<_$SnCheckInRecordImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? resultTier = null, + Object? resultExperience = null, + Object? resultCoin = null, + Object? resultModifiers = null, + Object? accountId = null, + }) { + return _then(_SnCheckInRecord( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + resultTier: null == resultTier + ? _self.resultTier + : resultTier // ignore: cast_nullable_to_non_nullable + as int, + resultExperience: null == resultExperience + ? _self.resultExperience + : resultExperience // ignore: cast_nullable_to_non_nullable + as int, + resultCoin: null == resultCoin + ? _self.resultCoin + : resultCoin // ignore: cast_nullable_to_non_nullable + as double, + resultModifiers: null == resultModifiers + ? _self._resultModifiers + : resultModifiers // ignore: cast_nullable_to_non_nullable + as List, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/lib/types/check_in.g.dart b/lib/types/check_in.g.dart index 9e710e6..8bde620 100644 --- a/lib/types/check_in.g.dart +++ b/lib/types/check_in.g.dart @@ -6,9 +6,8 @@ part of 'check_in.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnCheckInRecordImpl _$$SnCheckInRecordImplFromJson( - Map json) => - _$SnCheckInRecordImpl( +_SnCheckInRecord _$SnCheckInRecordFromJson(Map json) => + _SnCheckInRecord( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -24,8 +23,7 @@ _$SnCheckInRecordImpl _$$SnCheckInRecordImplFromJson( accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnCheckInRecordImplToJson( - _$SnCheckInRecordImpl instance) => +Map _$SnCheckInRecordToJson(_SnCheckInRecord instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/link.dart b/lib/types/link.dart index c5f4c30..96cd171 100644 --- a/lib/types/link.dart +++ b/lib/types/link.dart @@ -4,7 +4,7 @@ part 'link.g.dart'; part 'link.freezed.dart'; @freezed -class SnLinkMeta with _$SnLinkMeta { +abstract class SnLinkMeta with _$SnLinkMeta { const SnLinkMeta._(); const factory SnLinkMeta({ diff --git a/lib/types/link.freezed.dart b/lib/types/link.freezed.dart index 1f0bb7d..cd032f1 100644 --- a/lib/types/link.freezed.dart +++ b/lib/types/link.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,332 +10,41 @@ part of 'link.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnLinkMeta _$SnLinkMetaFromJson(Map json) { - return _SnLinkMeta.fromJson(json); -} - /// @nodoc mixin _$SnLinkMeta { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get entryId => throw _privateConstructorUsedError; - String? get icon => throw _privateConstructorUsedError; - String get url => throw _privateConstructorUsedError; - String? get title => throw _privateConstructorUsedError; - String? get image => throw _privateConstructorUsedError; - String? get video => throw _privateConstructorUsedError; - String? get audio => throw _privateConstructorUsedError; - String? get description => throw _privateConstructorUsedError; - String? get siteName => throw _privateConstructorUsedError; - String? get type => throw _privateConstructorUsedError; - - /// Serializes this SnLinkMeta to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get entryId; + String? get icon; + String get url; + String? get title; + String? get image; + String? get video; + String? get audio; + String? get description; + String? get siteName; + String? get type; /// Create a copy of SnLinkMeta /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnLinkMetaCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnLinkMetaCopyWithImpl(this as SnLinkMeta, _$identity); -/// @nodoc -abstract class $SnLinkMetaCopyWith<$Res> { - factory $SnLinkMetaCopyWith( - SnLinkMeta value, $Res Function(SnLinkMeta) then) = - _$SnLinkMetaCopyWithImpl<$Res, SnLinkMeta>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String entryId, - String? icon, - String url, - String? title, - String? image, - String? video, - String? audio, - String? description, - String? siteName, - String? type}); -} - -/// @nodoc -class _$SnLinkMetaCopyWithImpl<$Res, $Val extends SnLinkMeta> - implements $SnLinkMetaCopyWith<$Res> { - _$SnLinkMetaCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnLinkMeta - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? entryId = null, - Object? icon = freezed, - Object? url = null, - Object? title = freezed, - Object? image = freezed, - Object? video = freezed, - Object? audio = freezed, - Object? description = freezed, - Object? siteName = freezed, - Object? type = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - entryId: null == entryId - ? _value.entryId - : entryId // ignore: cast_nullable_to_non_nullable - as String, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - video: freezed == video - ? _value.video - : video // ignore: cast_nullable_to_non_nullable - as String?, - audio: freezed == audio - ? _value.audio - : audio // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - siteName: freezed == siteName - ? _value.siteName - : siteName // ignore: cast_nullable_to_non_nullable - as String?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnLinkMetaImplCopyWith<$Res> - implements $SnLinkMetaCopyWith<$Res> { - factory _$$SnLinkMetaImplCopyWith( - _$SnLinkMetaImpl value, $Res Function(_$SnLinkMetaImpl) then) = - __$$SnLinkMetaImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String entryId, - String? icon, - String url, - String? title, - String? image, - String? video, - String? audio, - String? description, - String? siteName, - String? type}); -} - -/// @nodoc -class __$$SnLinkMetaImplCopyWithImpl<$Res> - extends _$SnLinkMetaCopyWithImpl<$Res, _$SnLinkMetaImpl> - implements _$$SnLinkMetaImplCopyWith<$Res> { - __$$SnLinkMetaImplCopyWithImpl( - _$SnLinkMetaImpl _value, $Res Function(_$SnLinkMetaImpl) _then) - : super(_value, _then); - - /// Create a copy of SnLinkMeta - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? entryId = null, - Object? icon = freezed, - Object? url = null, - Object? title = freezed, - Object? image = freezed, - Object? video = freezed, - Object? audio = freezed, - Object? description = freezed, - Object? siteName = freezed, - Object? type = freezed, - }) { - return _then(_$SnLinkMetaImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - entryId: null == entryId - ? _value.entryId - : entryId // ignore: cast_nullable_to_non_nullable - as String, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - video: freezed == video - ? _value.video - : video // ignore: cast_nullable_to_non_nullable - as String?, - audio: freezed == audio - ? _value.audio - : audio // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - siteName: freezed == siteName - ? _value.siteName - : siteName // ignore: cast_nullable_to_non_nullable - as String?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnLinkMetaImpl extends _SnLinkMeta { - const _$SnLinkMetaImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.entryId, - required this.icon, - required this.url, - required this.title, - required this.image, - required this.video, - required this.audio, - required this.description, - required this.siteName, - required this.type}) - : super._(); - - factory _$SnLinkMetaImpl.fromJson(Map json) => - _$$SnLinkMetaImplFromJson(json); - - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final String entryId; - @override - final String? icon; - @override - final String url; - @override - final String? title; - @override - final String? image; - @override - final String? video; - @override - final String? audio; - @override - final String? description; - @override - final String? siteName; - @override - final String? type; - - @override - String toString() { - return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)'; - } + /// Serializes this SnLinkMeta to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnLinkMetaImpl && + other is SnLinkMeta && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -375,76 +85,351 @@ class _$SnLinkMetaImpl extends _SnLinkMeta { siteName, type); - /// Create a copy of SnLinkMeta - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnLinkMetaImplCopyWith<_$SnLinkMetaImpl> get copyWith => - __$$SnLinkMetaImplCopyWithImpl<_$SnLinkMetaImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnLinkMetaImplToJson( - this, - ); + String toString() { + return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)'; } } -abstract class _SnLinkMeta extends SnLinkMeta { - const factory _SnLinkMeta( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String entryId, - required final String? icon, - required final String url, - required final String? title, - required final String? image, - required final String? video, - required final String? audio, - required final String? description, - required final String? siteName, - required final String? type}) = _$SnLinkMetaImpl; - const _SnLinkMeta._() : super._(); +/// @nodoc +abstract mixin class $SnLinkMetaCopyWith<$Res> { + factory $SnLinkMetaCopyWith( + SnLinkMeta value, $Res Function(SnLinkMeta) _then) = + _$SnLinkMetaCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String entryId, + String? icon, + String url, + String? title, + String? image, + String? video, + String? audio, + String? description, + String? siteName, + String? type}); +} - factory _SnLinkMeta.fromJson(Map json) = - _$SnLinkMetaImpl.fromJson; +/// @nodoc +class _$SnLinkMetaCopyWithImpl<$Res> implements $SnLinkMetaCopyWith<$Res> { + _$SnLinkMetaCopyWithImpl(this._self, this._then); + + final SnLinkMeta _self; + final $Res Function(SnLinkMeta) _then; + + /// Create a copy of SnLinkMeta + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? entryId = null, + Object? icon = freezed, + Object? url = null, + Object? title = freezed, + Object? image = freezed, + Object? video = freezed, + Object? audio = freezed, + Object? description = freezed, + Object? siteName = freezed, + Object? type = freezed, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + entryId: null == entryId + ? _self.entryId + : entryId // ignore: cast_nullable_to_non_nullable + as String, + icon: freezed == icon + ? _self.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + title: freezed == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + image: freezed == image + ? _self.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + video: freezed == video + ? _self.video + : video // ignore: cast_nullable_to_non_nullable + as String?, + audio: freezed == audio + ? _self.audio + : audio // ignore: cast_nullable_to_non_nullable + as String?, + description: freezed == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + siteName: freezed == siteName + ? _self.siteName + : siteName // ignore: cast_nullable_to_non_nullable + as String?, + type: freezed == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnLinkMeta extends SnLinkMeta { + const _SnLinkMeta( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.entryId, + required this.icon, + required this.url, + required this.title, + required this.image, + required this.video, + required this.audio, + required this.description, + required this.siteName, + required this.type}) + : super._(); + factory _SnLinkMeta.fromJson(Map json) => + _$SnLinkMetaFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - String get entryId; + final String entryId; @override - String? get icon; + final String? icon; @override - String get url; + final String url; @override - String? get title; + final String? title; @override - String? get image; + final String? image; @override - String? get video; + final String? video; @override - String? get audio; + final String? audio; @override - String? get description; + final String? description; @override - String? get siteName; + final String? siteName; @override - String? get type; + final String? type; /// Create a copy of SnLinkMeta /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnLinkMetaImplCopyWith<_$SnLinkMetaImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnLinkMetaCopyWith<_SnLinkMeta> get copyWith => + __$SnLinkMetaCopyWithImpl<_SnLinkMeta>(this, _$identity); + + @override + Map toJson() { + return _$SnLinkMetaToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnLinkMeta && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.entryId, entryId) || other.entryId == entryId) && + (identical(other.icon, icon) || other.icon == icon) && + (identical(other.url, url) || other.url == url) && + (identical(other.title, title) || other.title == title) && + (identical(other.image, image) || other.image == image) && + (identical(other.video, video) || other.video == video) && + (identical(other.audio, audio) || other.audio == audio) && + (identical(other.description, description) || + other.description == description) && + (identical(other.siteName, siteName) || + other.siteName == siteName) && + (identical(other.type, type) || other.type == type)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + entryId, + icon, + url, + title, + image, + video, + audio, + description, + siteName, + type); + + @override + String toString() { + return 'SnLinkMeta(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, entryId: $entryId, icon: $icon, url: $url, title: $title, image: $image, video: $video, audio: $audio, description: $description, siteName: $siteName, type: $type)'; + } } + +/// @nodoc +abstract mixin class _$SnLinkMetaCopyWith<$Res> + implements $SnLinkMetaCopyWith<$Res> { + factory _$SnLinkMetaCopyWith( + _SnLinkMeta value, $Res Function(_SnLinkMeta) _then) = + __$SnLinkMetaCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String entryId, + String? icon, + String url, + String? title, + String? image, + String? video, + String? audio, + String? description, + String? siteName, + String? type}); +} + +/// @nodoc +class __$SnLinkMetaCopyWithImpl<$Res> implements _$SnLinkMetaCopyWith<$Res> { + __$SnLinkMetaCopyWithImpl(this._self, this._then); + + final _SnLinkMeta _self; + final $Res Function(_SnLinkMeta) _then; + + /// Create a copy of SnLinkMeta + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? entryId = null, + Object? icon = freezed, + Object? url = null, + Object? title = freezed, + Object? image = freezed, + Object? video = freezed, + Object? audio = freezed, + Object? description = freezed, + Object? siteName = freezed, + Object? type = freezed, + }) { + return _then(_SnLinkMeta( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + entryId: null == entryId + ? _self.entryId + : entryId // ignore: cast_nullable_to_non_nullable + as String, + icon: freezed == icon + ? _self.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + title: freezed == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + image: freezed == image + ? _self.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + video: freezed == video + ? _self.video + : video // ignore: cast_nullable_to_non_nullable + as String?, + audio: freezed == audio + ? _self.audio + : audio // ignore: cast_nullable_to_non_nullable + as String?, + description: freezed == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + siteName: freezed == siteName + ? _self.siteName + : siteName // ignore: cast_nullable_to_non_nullable + as String?, + type: freezed == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/lib/types/link.g.dart b/lib/types/link.g.dart index 3629d5a..890e439 100644 --- a/lib/types/link.g.dart +++ b/lib/types/link.g.dart @@ -6,8 +6,7 @@ part of 'link.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnLinkMetaImpl _$$SnLinkMetaImplFromJson(Map json) => - _$SnLinkMetaImpl( +_SnLinkMeta _$SnLinkMetaFromJson(Map json) => _SnLinkMeta( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -26,7 +25,7 @@ _$SnLinkMetaImpl _$$SnLinkMetaImplFromJson(Map json) => type: json['type'] as String?, ); -Map _$$SnLinkMetaImplToJson(_$SnLinkMetaImpl instance) => +Map _$SnLinkMetaToJson(_SnLinkMeta instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/news.dart b/lib/types/news.dart index 289753d..83f4138 100644 --- a/lib/types/news.dart +++ b/lib/types/news.dart @@ -4,7 +4,7 @@ part 'news.freezed.dart'; part 'news.g.dart'; @freezed -class SnNewsSource with _$SnNewsSource { +abstract class SnNewsSource with _$SnNewsSource { const factory SnNewsSource({ required String id, required String label, @@ -18,7 +18,7 @@ class SnNewsSource with _$SnNewsSource { } @freezed -class SnNewsArticle with _$SnNewsArticle { +abstract class SnNewsArticle with _$SnNewsArticle { const factory SnNewsArticle({ required int id, required DateTime createdAt, diff --git a/lib/types/news.freezed.dart b/lib/types/news.freezed.dart index c7d682c..5887bc8 100644 --- a/lib/types/news.freezed.dart +++ b/lib/types/news.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,107 +10,58 @@ part of 'news.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnNewsSource _$SnNewsSourceFromJson(Map json) { - return _SnNewsSource.fromJson(json); -} - /// @nodoc mixin _$SnNewsSource { - String get id => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - String get source => throw _privateConstructorUsedError; - int get depth => throw _privateConstructorUsedError; - bool get enabled => throw _privateConstructorUsedError; - - /// Serializes this SnNewsSource to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get id; + String get label; + String get type; + String get source; + int get depth; + bool get enabled; /// Create a copy of SnNewsSource /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnNewsSourceCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnNewsSourceCopyWith<$Res> { - factory $SnNewsSourceCopyWith( - SnNewsSource value, $Res Function(SnNewsSource) then) = - _$SnNewsSourceCopyWithImpl<$Res, SnNewsSource>; - @useResult - $Res call( - {String id, - String label, - String type, - String source, - int depth, - bool enabled}); -} - -/// @nodoc -class _$SnNewsSourceCopyWithImpl<$Res, $Val extends SnNewsSource> - implements $SnNewsSourceCopyWith<$Res> { - _$SnNewsSourceCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnNewsSource - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnNewsSourceCopyWith get copyWith => + _$SnNewsSourceCopyWithImpl( + this as SnNewsSource, _$identity); + + /// Serializes this SnNewsSource to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? label = null, - Object? type = null, - Object? source = null, - Object? depth = null, - Object? enabled = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - source: null == source - ? _value.source - : source // ignore: cast_nullable_to_non_nullable - as String, - depth: null == depth - ? _value.depth - : depth // ignore: cast_nullable_to_non_nullable - as int, - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnNewsSource && + (identical(other.id, id) || other.id == id) && + (identical(other.label, label) || other.label == label) && + (identical(other.type, type) || other.type == type) && + (identical(other.source, source) || other.source == source) && + (identical(other.depth, depth) || other.depth == depth) && + (identical(other.enabled, enabled) || other.enabled == enabled)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, id, label, type, source, depth, enabled); + + @override + String toString() { + return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)'; } } /// @nodoc -abstract class _$$SnNewsSourceImplCopyWith<$Res> - implements $SnNewsSourceCopyWith<$Res> { - factory _$$SnNewsSourceImplCopyWith( - _$SnNewsSourceImpl value, $Res Function(_$SnNewsSourceImpl) then) = - __$$SnNewsSourceImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnNewsSourceCopyWith<$Res> { + factory $SnNewsSourceCopyWith( + SnNewsSource value, $Res Function(SnNewsSource) _then) = + _$SnNewsSourceCopyWithImpl; @useResult $Res call( {String id, @@ -121,12 +73,11 @@ abstract class _$$SnNewsSourceImplCopyWith<$Res> } /// @nodoc -class __$$SnNewsSourceImplCopyWithImpl<$Res> - extends _$SnNewsSourceCopyWithImpl<$Res, _$SnNewsSourceImpl> - implements _$$SnNewsSourceImplCopyWith<$Res> { - __$$SnNewsSourceImplCopyWithImpl( - _$SnNewsSourceImpl _value, $Res Function(_$SnNewsSourceImpl) _then) - : super(_value, _then); +class _$SnNewsSourceCopyWithImpl<$Res> implements $SnNewsSourceCopyWith<$Res> { + _$SnNewsSourceCopyWithImpl(this._self, this._then); + + final SnNewsSource _self; + final $Res Function(SnNewsSource) _then; /// Create a copy of SnNewsSource /// with the given fields replaced by the non-null parameter values. @@ -140,29 +91,29 @@ class __$$SnNewsSourceImplCopyWithImpl<$Res> Object? depth = null, Object? enabled = null, }) { - return _then(_$SnNewsSourceImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, label: null == label - ? _value.label + ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, source: null == source - ? _value.source + ? _self.source : source // ignore: cast_nullable_to_non_nullable as String, depth: null == depth - ? _value.depth + ? _self.depth : depth // ignore: cast_nullable_to_non_nullable as int, enabled: null == enabled - ? _value.enabled + ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool, )); @@ -171,17 +122,16 @@ class __$$SnNewsSourceImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnNewsSourceImpl implements _SnNewsSource { - const _$SnNewsSourceImpl( +class _SnNewsSource implements SnNewsSource { + const _SnNewsSource( {required this.id, required this.label, required this.type, required this.source, required this.depth, required this.enabled}); - - factory _$SnNewsSourceImpl.fromJson(Map json) => - _$$SnNewsSourceImplFromJson(json); + factory _SnNewsSource.fromJson(Map json) => + _$SnNewsSourceFromJson(json); @override final String id; @@ -196,16 +146,26 @@ class _$SnNewsSourceImpl implements _SnNewsSource { @override final bool enabled; + /// Create a copy of SnNewsSource + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnNewsSourceCopyWith<_SnNewsSource> get copyWith => + __$SnNewsSourceCopyWithImpl<_SnNewsSource>(this, _$identity); + + @override + Map toJson() { + return _$SnNewsSourceToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnNewsSourceImpl && + other is _SnNewsSource && (identical(other.id, id) || other.id == id) && (identical(other.label, label) || other.label == label) && (identical(other.type, type) || other.type == type) && @@ -219,343 +179,109 @@ class _$SnNewsSourceImpl implements _SnNewsSource { int get hashCode => Object.hash(runtimeType, id, label, type, source, depth, enabled); - /// Create a copy of SnNewsSource - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnNewsSourceImplCopyWith<_$SnNewsSourceImpl> get copyWith => - __$$SnNewsSourceImplCopyWithImpl<_$SnNewsSourceImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnNewsSourceImplToJson( - this, - ); - } -} - -abstract class _SnNewsSource implements SnNewsSource { - const factory _SnNewsSource( - {required final String id, - required final String label, - required final String type, - required final String source, - required final int depth, - required final bool enabled}) = _$SnNewsSourceImpl; - - factory _SnNewsSource.fromJson(Map json) = - _$SnNewsSourceImpl.fromJson; - - @override - String get id; - @override - String get label; - @override - String get type; - @override - String get source; - @override - int get depth; - @override - bool get enabled; - - /// Create a copy of SnNewsSource - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnNewsSourceImplCopyWith<_$SnNewsSourceImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnNewsArticle _$SnNewsArticleFromJson(Map json) { - return _SnNewsArticle.fromJson(json); -} - -/// @nodoc -mixin _$SnNewsArticle { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - String get thumbnail => throw _privateConstructorUsedError; - String get title => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get content => throw _privateConstructorUsedError; - String get url => throw _privateConstructorUsedError; - String get hash => throw _privateConstructorUsedError; - String get source => throw _privateConstructorUsedError; - DateTime? get publishedAt => throw _privateConstructorUsedError; - - /// Serializes this SnNewsArticle to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnNewsArticle - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnNewsArticleCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnNewsArticleCopyWith<$Res> { - factory $SnNewsArticleCopyWith( - SnNewsArticle value, $Res Function(SnNewsArticle) then) = - _$SnNewsArticleCopyWithImpl<$Res, SnNewsArticle>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String thumbnail, - String title, - String description, - String content, - String url, - String hash, - String source, - DateTime? publishedAt}); -} - -/// @nodoc -class _$SnNewsArticleCopyWithImpl<$Res, $Val extends SnNewsArticle> - implements $SnNewsArticleCopyWith<$Res> { - _$SnNewsArticleCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnNewsArticle - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? thumbnail = null, - Object? title = null, - Object? description = null, - Object? content = null, - Object? url = null, - Object? hash = null, - Object? source = null, - Object? publishedAt = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - thumbnail: null == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - source: null == source - ? _value.source - : source // ignore: cast_nullable_to_non_nullable - as String, - publishedAt: freezed == publishedAt - ? _value.publishedAt - : publishedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + String toString() { + return 'SnNewsSource(id: $id, label: $label, type: $type, source: $source, depth: $depth, enabled: $enabled)'; } } /// @nodoc -abstract class _$$SnNewsArticleImplCopyWith<$Res> - implements $SnNewsArticleCopyWith<$Res> { - factory _$$SnNewsArticleImplCopyWith( - _$SnNewsArticleImpl value, $Res Function(_$SnNewsArticleImpl) then) = - __$$SnNewsArticleImplCopyWithImpl<$Res>; +abstract mixin class _$SnNewsSourceCopyWith<$Res> + implements $SnNewsSourceCopyWith<$Res> { + factory _$SnNewsSourceCopyWith( + _SnNewsSource value, $Res Function(_SnNewsSource) _then) = + __$SnNewsSourceCopyWithImpl; @override @useResult $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String thumbnail, - String title, - String description, - String content, - String url, - String hash, + {String id, + String label, + String type, String source, - DateTime? publishedAt}); + int depth, + bool enabled}); } /// @nodoc -class __$$SnNewsArticleImplCopyWithImpl<$Res> - extends _$SnNewsArticleCopyWithImpl<$Res, _$SnNewsArticleImpl> - implements _$$SnNewsArticleImplCopyWith<$Res> { - __$$SnNewsArticleImplCopyWithImpl( - _$SnNewsArticleImpl _value, $Res Function(_$SnNewsArticleImpl) _then) - : super(_value, _then); +class __$SnNewsSourceCopyWithImpl<$Res> + implements _$SnNewsSourceCopyWith<$Res> { + __$SnNewsSourceCopyWithImpl(this._self, this._then); - /// Create a copy of SnNewsArticle + final _SnNewsSource _self; + final $Res Function(_SnNewsSource) _then; + + /// Create a copy of SnNewsSource /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? thumbnail = null, - Object? title = null, - Object? description = null, - Object? content = null, - Object? url = null, - Object? hash = null, + Object? label = null, + Object? type = null, Object? source = null, - Object? publishedAt = freezed, + Object? depth = null, + Object? enabled = null, }) { - return _then(_$SnNewsArticleImpl( + return _then(_SnNewsSource( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - thumbnail: null == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable + label: null == label + ? _self.label + : label // ignore: cast_nullable_to_non_nullable as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _value.hash - : hash // ignore: cast_nullable_to_non_nullable + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable as String, source: null == source - ? _value.source + ? _self.source : source // ignore: cast_nullable_to_non_nullable as String, - publishedAt: freezed == publishedAt - ? _value.publishedAt - : publishedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, + depth: null == depth + ? _self.depth + : depth // ignore: cast_nullable_to_non_nullable + as int, + enabled: null == enabled + ? _self.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc -@JsonSerializable() -class _$SnNewsArticleImpl implements _SnNewsArticle { - const _$SnNewsArticleImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.thumbnail, - required this.title, - required this.description, - required this.content, - required this.url, - required this.hash, - required this.source, - required this.publishedAt}); +mixin _$SnNewsArticle { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + dynamic get deletedAt; + String get thumbnail; + String get title; + String get description; + String get content; + String get url; + String get hash; + String get source; + DateTime? get publishedAt; - factory _$SnNewsArticleImpl.fromJson(Map json) => - _$$SnNewsArticleImplFromJson(json); + /// Create a copy of SnNewsArticle + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnNewsArticleCopyWith get copyWith => + _$SnNewsArticleCopyWithImpl( + this as SnNewsArticle, _$identity); - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final dynamic deletedAt; - @override - final String thumbnail; - @override - final String title; - @override - final String description; - @override - final String content; - @override - final String url; - @override - final String hash; - @override - final String source; - @override - final DateTime? publishedAt; - - @override - String toString() { - return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)'; - } + /// Serializes this SnNewsArticle to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnNewsArticleImpl && + other is SnNewsArticle && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -592,69 +318,318 @@ class _$SnNewsArticleImpl implements _SnNewsArticle { source, publishedAt); - /// Create a copy of SnNewsArticle - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnNewsArticleImplCopyWith<_$SnNewsArticleImpl> get copyWith => - __$$SnNewsArticleImplCopyWithImpl<_$SnNewsArticleImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnNewsArticleImplToJson( - this, - ); + String toString() { + return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)'; } } -abstract class _SnNewsArticle implements SnNewsArticle { - const factory _SnNewsArticle( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final String thumbnail, - required final String title, - required final String description, - required final String content, - required final String url, - required final String hash, - required final String source, - required final DateTime? publishedAt}) = _$SnNewsArticleImpl; +/// @nodoc +abstract mixin class $SnNewsArticleCopyWith<$Res> { + factory $SnNewsArticleCopyWith( + SnNewsArticle value, $Res Function(SnNewsArticle) _then) = + _$SnNewsArticleCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String thumbnail, + String title, + String description, + String content, + String url, + String hash, + String source, + DateTime? publishedAt}); +} - factory _SnNewsArticle.fromJson(Map json) = - _$SnNewsArticleImpl.fromJson; +/// @nodoc +class _$SnNewsArticleCopyWithImpl<$Res> + implements $SnNewsArticleCopyWith<$Res> { + _$SnNewsArticleCopyWithImpl(this._self, this._then); + + final SnNewsArticle _self; + final $Res Function(SnNewsArticle) _then; + + /// Create a copy of SnNewsArticle + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? thumbnail = null, + Object? title = null, + Object? description = null, + Object? content = null, + Object? url = null, + Object? hash = null, + Object? source = null, + Object? publishedAt = freezed, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + thumbnail: null == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as String, + title: null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + content: null == content + ? _self.content + : content // ignore: cast_nullable_to_non_nullable + as String, + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + hash: null == hash + ? _self.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + source: null == source + ? _self.source + : source // ignore: cast_nullable_to_non_nullable + as String, + publishedAt: freezed == publishedAt + ? _self.publishedAt + : publishedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnNewsArticle implements SnNewsArticle { + const _SnNewsArticle( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.thumbnail, + required this.title, + required this.description, + required this.content, + required this.url, + required this.hash, + required this.source, + required this.publishedAt}); + factory _SnNewsArticle.fromJson(Map json) => + _$SnNewsArticleFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - dynamic get deletedAt; + final dynamic deletedAt; @override - String get thumbnail; + final String thumbnail; @override - String get title; + final String title; @override - String get description; + final String description; @override - String get content; + final String content; @override - String get url; + final String url; @override - String get hash; + final String hash; @override - String get source; + final String source; @override - DateTime? get publishedAt; + final DateTime? publishedAt; /// Create a copy of SnNewsArticle /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnNewsArticleImplCopyWith<_$SnNewsArticleImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnNewsArticleCopyWith<_SnNewsArticle> get copyWith => + __$SnNewsArticleCopyWithImpl<_SnNewsArticle>(this, _$identity); + + @override + Map toJson() { + return _$SnNewsArticleToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnNewsArticle && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.thumbnail, thumbnail) || + other.thumbnail == thumbnail) && + (identical(other.title, title) || other.title == title) && + (identical(other.description, description) || + other.description == description) && + (identical(other.content, content) || other.content == content) && + (identical(other.url, url) || other.url == url) && + (identical(other.hash, hash) || other.hash == hash) && + (identical(other.source, source) || other.source == source) && + (identical(other.publishedAt, publishedAt) || + other.publishedAt == publishedAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + thumbnail, + title, + description, + content, + url, + hash, + source, + publishedAt); + + @override + String toString() { + return 'SnNewsArticle(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, thumbnail: $thumbnail, title: $title, description: $description, content: $content, url: $url, hash: $hash, source: $source, publishedAt: $publishedAt)'; + } } + +/// @nodoc +abstract mixin class _$SnNewsArticleCopyWith<$Res> + implements $SnNewsArticleCopyWith<$Res> { + factory _$SnNewsArticleCopyWith( + _SnNewsArticle value, $Res Function(_SnNewsArticle) _then) = + __$SnNewsArticleCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String thumbnail, + String title, + String description, + String content, + String url, + String hash, + String source, + DateTime? publishedAt}); +} + +/// @nodoc +class __$SnNewsArticleCopyWithImpl<$Res> + implements _$SnNewsArticleCopyWith<$Res> { + __$SnNewsArticleCopyWithImpl(this._self, this._then); + + final _SnNewsArticle _self; + final $Res Function(_SnNewsArticle) _then; + + /// Create a copy of SnNewsArticle + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? thumbnail = null, + Object? title = null, + Object? description = null, + Object? content = null, + Object? url = null, + Object? hash = null, + Object? source = null, + Object? publishedAt = freezed, + }) { + return _then(_SnNewsArticle( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + thumbnail: null == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as String, + title: null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + content: null == content + ? _self.content + : content // ignore: cast_nullable_to_non_nullable + as String, + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + hash: null == hash + ? _self.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + source: null == source + ? _self.source + : source // ignore: cast_nullable_to_non_nullable + as String, + publishedAt: freezed == publishedAt + ? _self.publishedAt + : publishedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + )); + } +} + +// dart format on diff --git a/lib/types/news.g.dart b/lib/types/news.g.dart index c8b43ed..35815bb 100644 --- a/lib/types/news.g.dart +++ b/lib/types/news.g.dart @@ -6,8 +6,8 @@ part of 'news.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnNewsSourceImpl _$$SnNewsSourceImplFromJson(Map json) => - _$SnNewsSourceImpl( +_SnNewsSource _$SnNewsSourceFromJson(Map json) => + _SnNewsSource( id: json['id'] as String, label: json['label'] as String, type: json['type'] as String, @@ -16,7 +16,7 @@ _$SnNewsSourceImpl _$$SnNewsSourceImplFromJson(Map json) => enabled: json['enabled'] as bool, ); -Map _$$SnNewsSourceImplToJson(_$SnNewsSourceImpl instance) => +Map _$SnNewsSourceToJson(_SnNewsSource instance) => { 'id': instance.id, 'label': instance.label, @@ -26,8 +26,8 @@ Map _$$SnNewsSourceImplToJson(_$SnNewsSourceImpl instance) => 'enabled': instance.enabled, }; -_$SnNewsArticleImpl _$$SnNewsArticleImplFromJson(Map json) => - _$SnNewsArticleImpl( +_SnNewsArticle _$SnNewsArticleFromJson(Map json) => + _SnNewsArticle( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -44,7 +44,7 @@ _$SnNewsArticleImpl _$$SnNewsArticleImplFromJson(Map json) => : DateTime.parse(json['published_at'] as String), ); -Map _$$SnNewsArticleImplToJson(_$SnNewsArticleImpl instance) => +Map _$SnNewsArticleToJson(_SnNewsArticle instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/notification.dart b/lib/types/notification.dart index d878b3c..c9934ae 100644 --- a/lib/types/notification.dart +++ b/lib/types/notification.dart @@ -4,7 +4,7 @@ part 'notification.freezed.dart'; part 'notification.g.dart'; @freezed -class SnNotification with _$SnNotification { +abstract class SnNotification with _$SnNotification { const factory SnNotification({ required int id, required DateTime createdAt, diff --git a/lib/types/notification.freezed.dart b/lib/types/notification.freezed.dart index 75c295e..3c9d14b 100644 --- a/lib/types/notification.freezed.dart +++ b/lib/types/notification.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,156 +10,92 @@ part of 'notification.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnNotification _$SnNotificationFromJson(Map json) { - return _SnNotification.fromJson(json); -} - /// @nodoc mixin _$SnNotification { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get topic => throw _privateConstructorUsedError; - String get title => throw _privateConstructorUsedError; - String? get subtitle => throw _privateConstructorUsedError; - String get body => throw _privateConstructorUsedError; - Map get metadata => throw _privateConstructorUsedError; - int get priority => throw _privateConstructorUsedError; - int? get senderId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - DateTime? get readAt => throw _privateConstructorUsedError; - - /// Serializes this SnNotification to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get topic; + String get title; + String? get subtitle; + String get body; + Map get metadata; + int get priority; + int? get senderId; + int get accountId; + DateTime? get readAt; /// Create a copy of SnNotification /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnNotificationCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnNotificationCopyWith<$Res> { - factory $SnNotificationCopyWith( - SnNotification value, $Res Function(SnNotification) then) = - _$SnNotificationCopyWithImpl<$Res, SnNotification>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String topic, - String title, - String? subtitle, - String body, - Map metadata, - int priority, - int? senderId, - int accountId, - DateTime? readAt}); -} - -/// @nodoc -class _$SnNotificationCopyWithImpl<$Res, $Val extends SnNotification> - implements $SnNotificationCopyWith<$Res> { - _$SnNotificationCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnNotification - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnNotificationCopyWith get copyWith => + _$SnNotificationCopyWithImpl( + this as SnNotification, _$identity); + + /// Serializes this SnNotification to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? topic = null, - Object? title = null, - Object? subtitle = freezed, - Object? body = null, - Object? metadata = null, - Object? priority = null, - Object? senderId = freezed, - Object? accountId = null, - Object? readAt = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - topic: null == topic - ? _value.topic - : topic // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - subtitle: freezed == subtitle - ? _value.subtitle - : subtitle // ignore: cast_nullable_to_non_nullable - as String?, - body: null == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String, - metadata: null == metadata - ? _value.metadata - : metadata // ignore: cast_nullable_to_non_nullable - as Map, - priority: null == priority - ? _value.priority - : priority // ignore: cast_nullable_to_non_nullable - as int, - senderId: freezed == senderId - ? _value.senderId - : senderId // ignore: cast_nullable_to_non_nullable - as int?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - readAt: freezed == readAt - ? _value.readAt - : readAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnNotification && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.topic, topic) || other.topic == topic) && + (identical(other.title, title) || other.title == title) && + (identical(other.subtitle, subtitle) || + other.subtitle == subtitle) && + (identical(other.body, body) || other.body == body) && + const DeepCollectionEquality().equals(other.metadata, metadata) && + (identical(other.priority, priority) || + other.priority == priority) && + (identical(other.senderId, senderId) || + other.senderId == senderId) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.readAt, readAt) || other.readAt == readAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + topic, + title, + subtitle, + body, + const DeepCollectionEquality().hash(metadata), + priority, + senderId, + accountId, + readAt); + + @override + String toString() { + return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)'; } } /// @nodoc -abstract class _$$SnNotificationImplCopyWith<$Res> - implements $SnNotificationCopyWith<$Res> { - factory _$$SnNotificationImplCopyWith(_$SnNotificationImpl value, - $Res Function(_$SnNotificationImpl) then) = - __$$SnNotificationImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnNotificationCopyWith<$Res> { + factory $SnNotificationCopyWith( + SnNotification value, $Res Function(SnNotification) _then) = + _$SnNotificationCopyWithImpl; @useResult $Res call( {int id, @@ -177,12 +114,12 @@ abstract class _$$SnNotificationImplCopyWith<$Res> } /// @nodoc -class __$$SnNotificationImplCopyWithImpl<$Res> - extends _$SnNotificationCopyWithImpl<$Res, _$SnNotificationImpl> - implements _$$SnNotificationImplCopyWith<$Res> { - __$$SnNotificationImplCopyWithImpl( - _$SnNotificationImpl _value, $Res Function(_$SnNotificationImpl) _then) - : super(_value, _then); +class _$SnNotificationCopyWithImpl<$Res> + implements $SnNotificationCopyWith<$Res> { + _$SnNotificationCopyWithImpl(this._self, this._then); + + final SnNotification _self; + final $Res Function(SnNotification) _then; /// Create a copy of SnNotification /// with the given fields replaced by the non-null parameter values. @@ -203,57 +140,57 @@ class __$$SnNotificationImplCopyWithImpl<$Res> Object? accountId = null, Object? readAt = freezed, }) { - return _then(_$SnNotificationImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, topic: null == topic - ? _value.topic + ? _self.topic : topic // ignore: cast_nullable_to_non_nullable as String, title: null == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, subtitle: freezed == subtitle - ? _value.subtitle + ? _self.subtitle : subtitle // ignore: cast_nullable_to_non_nullable as String?, body: null == body - ? _value.body + ? _self.body : body // ignore: cast_nullable_to_non_nullable as String, metadata: null == metadata - ? _value._metadata + ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map, priority: null == priority - ? _value.priority + ? _self.priority : priority // ignore: cast_nullable_to_non_nullable as int, senderId: freezed == senderId - ? _value.senderId + ? _self.senderId : senderId // ignore: cast_nullable_to_non_nullable as int?, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, readAt: freezed == readAt - ? _value.readAt + ? _self.readAt : readAt // ignore: cast_nullable_to_non_nullable as DateTime?, )); @@ -262,8 +199,8 @@ class __$$SnNotificationImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnNotificationImpl implements _SnNotification { - const _$SnNotificationImpl( +class _SnNotification implements SnNotification { + const _SnNotification( {required this.id, required this.createdAt, required this.updatedAt, @@ -278,9 +215,8 @@ class _$SnNotificationImpl implements _SnNotification { required this.accountId, required this.readAt}) : _metadata = metadata; - - factory _$SnNotificationImpl.fromJson(Map json) => - _$$SnNotificationImplFromJson(json); + factory _SnNotification.fromJson(Map json) => + _$SnNotificationFromJson(json); @override final int id; @@ -316,16 +252,26 @@ class _$SnNotificationImpl implements _SnNotification { @override final DateTime? readAt; + /// Create a copy of SnNotification + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnNotificationCopyWith<_SnNotification> get copyWith => + __$SnNotificationCopyWithImpl<_SnNotification>(this, _$identity); + + @override + Map toJson() { + return _$SnNotificationToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnNotificationImpl && + other is _SnNotification && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -366,73 +312,118 @@ class _$SnNotificationImpl implements _SnNotification { accountId, readAt); - /// Create a copy of SnNotification - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnNotificationImplCopyWith<_$SnNotificationImpl> get copyWith => - __$$SnNotificationImplCopyWithImpl<_$SnNotificationImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnNotificationImplToJson( - this, - ); + String toString() { + return 'SnNotification(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, topic: $topic, title: $title, subtitle: $subtitle, body: $body, metadata: $metadata, priority: $priority, senderId: $senderId, accountId: $accountId, readAt: $readAt)'; } } -abstract class _SnNotification implements SnNotification { - const factory _SnNotification( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String topic, - required final String title, - required final String? subtitle, - required final String body, - final Map metadata, - required final int priority, - required final int? senderId, - required final int accountId, - required final DateTime? readAt}) = _$SnNotificationImpl; +/// @nodoc +abstract mixin class _$SnNotificationCopyWith<$Res> + implements $SnNotificationCopyWith<$Res> { + factory _$SnNotificationCopyWith( + _SnNotification value, $Res Function(_SnNotification) _then) = + __$SnNotificationCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String topic, + String title, + String? subtitle, + String body, + Map metadata, + int priority, + int? senderId, + int accountId, + DateTime? readAt}); +} - factory _SnNotification.fromJson(Map json) = - _$SnNotificationImpl.fromJson; +/// @nodoc +class __$SnNotificationCopyWithImpl<$Res> + implements _$SnNotificationCopyWith<$Res> { + __$SnNotificationCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get topic; - @override - String get title; - @override - String? get subtitle; - @override - String get body; - @override - Map get metadata; - @override - int get priority; - @override - int? get senderId; - @override - int get accountId; - @override - DateTime? get readAt; + final _SnNotification _self; + final $Res Function(_SnNotification) _then; /// Create a copy of SnNotification /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnNotificationImplCopyWith<_$SnNotificationImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? topic = null, + Object? title = null, + Object? subtitle = freezed, + Object? body = null, + Object? metadata = null, + Object? priority = null, + Object? senderId = freezed, + Object? accountId = null, + Object? readAt = freezed, + }) { + return _then(_SnNotification( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + topic: null == topic + ? _self.topic + : topic // ignore: cast_nullable_to_non_nullable + as String, + title: null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + subtitle: freezed == subtitle + ? _self.subtitle + : subtitle // ignore: cast_nullable_to_non_nullable + as String?, + body: null == body + ? _self.body + : body // ignore: cast_nullable_to_non_nullable + as String, + metadata: null == metadata + ? _self._metadata + : metadata // ignore: cast_nullable_to_non_nullable + as Map, + priority: null == priority + ? _self.priority + : priority // ignore: cast_nullable_to_non_nullable + as int, + senderId: freezed == senderId + ? _self.senderId + : senderId // ignore: cast_nullable_to_non_nullable + as int?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + readAt: freezed == readAt + ? _self.readAt + : readAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + )); + } } + +// dart format on diff --git a/lib/types/notification.g.dart b/lib/types/notification.g.dart index 078d378..23ea9af 100644 --- a/lib/types/notification.g.dart +++ b/lib/types/notification.g.dart @@ -6,8 +6,8 @@ part of 'notification.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnNotificationImpl _$$SnNotificationImplFromJson(Map json) => - _$SnNotificationImpl( +_SnNotification _$SnNotificationFromJson(Map json) => + _SnNotification( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -27,8 +27,7 @@ _$SnNotificationImpl _$$SnNotificationImplFromJson(Map json) => : DateTime.parse(json['read_at'] as String), ); -Map _$$SnNotificationImplToJson( - _$SnNotificationImpl instance) => +Map _$SnNotificationToJson(_SnNotification instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/poll.dart b/lib/types/poll.dart index 6f449fc..ba4b3d8 100644 --- a/lib/types/poll.dart +++ b/lib/types/poll.dart @@ -4,7 +4,7 @@ part 'poll.freezed.dart'; part 'poll.g.dart'; @freezed -class SnPoll with _$SnPoll { +abstract class SnPoll with _$SnPoll { const factory SnPoll({ required int id, required DateTime createdAt, @@ -20,7 +20,7 @@ class SnPoll with _$SnPoll { } @freezed -class SnPollMetric with _$SnPollMetric { +abstract class SnPollMetric with _$SnPollMetric { const factory SnPollMetric({ required int totalAnswer, @Default({}) Map byOptions, @@ -32,7 +32,7 @@ class SnPollMetric with _$SnPollMetric { } @freezed -class SnPollOption with _$SnPollOption { +abstract class SnPollOption with _$SnPollOption { const factory SnPollOption({ required String id, required String icon, diff --git a/lib/types/poll.freezed.dart b/lib/types/poll.freezed.dart index bc63e22..d62fa03 100644 --- a/lib/types/poll.freezed.dart +++ b/lib/types/poll.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,39 +10,71 @@ part of 'poll.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnPoll _$SnPollFromJson(Map json) { - return _SnPoll.fromJson(json); -} - /// @nodoc mixin _$SnPoll { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - dynamic get expiredAt => throw _privateConstructorUsedError; - List get options => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - SnPollMetric get metric => throw _privateConstructorUsedError; - - /// Serializes this SnPoll to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + dynamic get deletedAt; + dynamic get expiredAt; + List get options; + int get accountId; + SnPollMetric get metric; /// Create a copy of SnPoll /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnPollCopyWith get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $SnPollCopyWith get copyWith => + _$SnPollCopyWithImpl(this as SnPoll, _$identity); + + /// Serializes this SnPoll to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPoll && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + const DeepCollectionEquality().equals(other.expiredAt, expiredAt) && + const DeepCollectionEquality().equals(other.options, options) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.metric, metric) || other.metric == metric)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + const DeepCollectionEquality().hash(expiredAt), + const DeepCollectionEquality().hash(options), + accountId, + metric); + + @override + String toString() { + return 'SnPoll(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, expiredAt: $expiredAt, options: $options, accountId: $accountId, metric: $metric)'; + } } /// @nodoc -abstract class $SnPollCopyWith<$Res> { - factory $SnPollCopyWith(SnPoll value, $Res Function(SnPoll) then) = - _$SnPollCopyWithImpl<$Res, SnPoll>; +abstract mixin class $SnPollCopyWith<$Res> { + factory $SnPollCopyWith(SnPoll value, $Res Function(SnPoll) _then) = + _$SnPollCopyWithImpl; @useResult $Res call( {int id, @@ -57,14 +90,11 @@ abstract class $SnPollCopyWith<$Res> { } /// @nodoc -class _$SnPollCopyWithImpl<$Res, $Val extends SnPoll> - implements $SnPollCopyWith<$Res> { - _$SnPollCopyWithImpl(this._value, this._then); +class _$SnPollCopyWithImpl<$Res> implements $SnPollCopyWith<$Res> { + _$SnPollCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnPoll _self; + final $Res Function(SnPoll) _then; /// Create a copy of SnPoll /// with the given fields replaced by the non-null parameter values. @@ -80,40 +110,40 @@ class _$SnPollCopyWithImpl<$Res, $Val extends SnPoll> Object? accountId = null, Object? metric = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as dynamic, expiredAt: freezed == expiredAt - ? _value.expiredAt + ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable as dynamic, options: null == options - ? _value.options + ? _self.options : options // ignore: cast_nullable_to_non_nullable as List, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, metric: null == metric - ? _value.metric + ? _self.metric : metric // ignore: cast_nullable_to_non_nullable as SnPollMetric, - ) as $Val); + )); } /// Create a copy of SnPoll @@ -121,96 +151,16 @@ class _$SnPollCopyWithImpl<$Res, $Val extends SnPoll> @override @pragma('vm:prefer-inline') $SnPollMetricCopyWith<$Res> get metric { - return $SnPollMetricCopyWith<$Res>(_value.metric, (value) { - return _then(_value.copyWith(metric: value) as $Val); + return $SnPollMetricCopyWith<$Res>(_self.metric, (value) { + return _then(_self.copyWith(metric: value)); }); } } -/// @nodoc -abstract class _$$SnPollImplCopyWith<$Res> implements $SnPollCopyWith<$Res> { - factory _$$SnPollImplCopyWith( - _$SnPollImpl value, $Res Function(_$SnPollImpl) then) = - __$$SnPollImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - dynamic expiredAt, - List options, - int accountId, - SnPollMetric metric}); - - @override - $SnPollMetricCopyWith<$Res> get metric; -} - -/// @nodoc -class __$$SnPollImplCopyWithImpl<$Res> - extends _$SnPollCopyWithImpl<$Res, _$SnPollImpl> - implements _$$SnPollImplCopyWith<$Res> { - __$$SnPollImplCopyWithImpl( - _$SnPollImpl _value, $Res Function(_$SnPollImpl) _then) - : super(_value, _then); - - /// Create a copy of SnPoll - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? expiredAt = freezed, - Object? options = null, - Object? accountId = null, - Object? metric = null, - }) { - return _then(_$SnPollImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - expiredAt: freezed == expiredAt - ? _value.expiredAt - : expiredAt // ignore: cast_nullable_to_non_nullable - as dynamic, - options: null == options - ? _value._options - : options // ignore: cast_nullable_to_non_nullable - as List, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - metric: null == metric - ? _value.metric - : metric // ignore: cast_nullable_to_non_nullable - as SnPollMetric, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnPollImpl implements _SnPoll { - const _$SnPollImpl( +class _SnPoll implements SnPoll { + const _SnPoll( {required this.id, required this.createdAt, required this.updatedAt, @@ -220,9 +170,7 @@ class _$SnPollImpl implements _SnPoll { required this.accountId, required this.metric}) : _options = options; - - factory _$SnPollImpl.fromJson(Map json) => - _$$SnPollImplFromJson(json); + factory _SnPoll.fromJson(Map json) => _$SnPollFromJson(json); @override final int id; @@ -247,16 +195,26 @@ class _$SnPollImpl implements _SnPoll { @override final SnPollMetric metric; + /// Create a copy of SnPoll + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnPoll(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, expiredAt: $expiredAt, options: $options, accountId: $accountId, metric: $metric)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPollCopyWith<_SnPoll> get copyWith => + __$SnPollCopyWithImpl<_SnPoll>(this, _$identity); + + @override + Map toJson() { + return _$SnPollToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPollImpl && + other is _SnPoll && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -283,136 +241,148 @@ class _$SnPollImpl implements _SnPoll { accountId, metric); - /// Create a copy of SnPoll - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPollImplCopyWith<_$SnPollImpl> get copyWith => - __$$SnPollImplCopyWithImpl<_$SnPollImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPollImplToJson( - this, - ); + String toString() { + return 'SnPoll(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, expiredAt: $expiredAt, options: $options, accountId: $accountId, metric: $metric)'; } } -abstract class _SnPoll implements SnPoll { - const factory _SnPoll( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final dynamic expiredAt, - required final List options, - required final int accountId, - required final SnPollMetric metric}) = _$SnPollImpl; - - factory _SnPoll.fromJson(Map json) = _$SnPollImpl.fromJson; +/// @nodoc +abstract mixin class _$SnPollCopyWith<$Res> implements $SnPollCopyWith<$Res> { + factory _$SnPollCopyWith(_SnPoll value, $Res Function(_SnPoll) _then) = + __$SnPollCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + dynamic expiredAt, + List options, + int accountId, + SnPollMetric metric}); @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - dynamic get deletedAt; - @override - dynamic get expiredAt; - @override - List get options; - @override - int get accountId; - @override - SnPollMetric get metric; + $SnPollMetricCopyWith<$Res> get metric; +} + +/// @nodoc +class __$SnPollCopyWithImpl<$Res> implements _$SnPollCopyWith<$Res> { + __$SnPollCopyWithImpl(this._self, this._then); + + final _SnPoll _self; + final $Res Function(_SnPoll) _then; /// Create a copy of SnPoll /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPollImplCopyWith<_$SnPollImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? expiredAt = freezed, + Object? options = null, + Object? accountId = null, + Object? metric = null, + }) { + return _then(_SnPoll( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + expiredAt: freezed == expiredAt + ? _self.expiredAt + : expiredAt // ignore: cast_nullable_to_non_nullable + as dynamic, + options: null == options + ? _self._options + : options // ignore: cast_nullable_to_non_nullable + as List, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + metric: null == metric + ? _self.metric + : metric // ignore: cast_nullable_to_non_nullable + as SnPollMetric, + )); + } -SnPollMetric _$SnPollMetricFromJson(Map json) { - return _SnPollMetric.fromJson(json); + /// Create a copy of SnPoll + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPollMetricCopyWith<$Res> get metric { + return $SnPollMetricCopyWith<$Res>(_self.metric, (value) { + return _then(_self.copyWith(metric: value)); + }); + } } /// @nodoc mixin _$SnPollMetric { - int get totalAnswer => throw _privateConstructorUsedError; - Map get byOptions => throw _privateConstructorUsedError; - Map get byOptionsPercentage => - throw _privateConstructorUsedError; - - /// Serializes this SnPollMetric to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get totalAnswer; + Map get byOptions; + Map get byOptionsPercentage; /// Create a copy of SnPollMetric /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnPollMetricCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnPollMetricCopyWith<$Res> { - factory $SnPollMetricCopyWith( - SnPollMetric value, $Res Function(SnPollMetric) then) = - _$SnPollMetricCopyWithImpl<$Res, SnPollMetric>; - @useResult - $Res call( - {int totalAnswer, - Map byOptions, - Map byOptionsPercentage}); -} - -/// @nodoc -class _$SnPollMetricCopyWithImpl<$Res, $Val extends SnPollMetric> - implements $SnPollMetricCopyWith<$Res> { - _$SnPollMetricCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnPollMetric - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnPollMetricCopyWith get copyWith => + _$SnPollMetricCopyWithImpl( + this as SnPollMetric, _$identity); + + /// Serializes this SnPollMetric to a JSON map. + Map toJson(); + @override - $Res call({ - Object? totalAnswer = null, - Object? byOptions = null, - Object? byOptionsPercentage = null, - }) { - return _then(_value.copyWith( - totalAnswer: null == totalAnswer - ? _value.totalAnswer - : totalAnswer // ignore: cast_nullable_to_non_nullable - as int, - byOptions: null == byOptions - ? _value.byOptions - : byOptions // ignore: cast_nullable_to_non_nullable - as Map, - byOptionsPercentage: null == byOptionsPercentage - ? _value.byOptionsPercentage - : byOptionsPercentage // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPollMetric && + (identical(other.totalAnswer, totalAnswer) || + other.totalAnswer == totalAnswer) && + const DeepCollectionEquality().equals(other.byOptions, byOptions) && + const DeepCollectionEquality() + .equals(other.byOptionsPercentage, byOptionsPercentage)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + totalAnswer, + const DeepCollectionEquality().hash(byOptions), + const DeepCollectionEquality().hash(byOptionsPercentage)); + + @override + String toString() { + return 'SnPollMetric(totalAnswer: $totalAnswer, byOptions: $byOptions, byOptionsPercentage: $byOptionsPercentage)'; } } /// @nodoc -abstract class _$$SnPollMetricImplCopyWith<$Res> - implements $SnPollMetricCopyWith<$Res> { - factory _$$SnPollMetricImplCopyWith( - _$SnPollMetricImpl value, $Res Function(_$SnPollMetricImpl) then) = - __$$SnPollMetricImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnPollMetricCopyWith<$Res> { + factory $SnPollMetricCopyWith( + SnPollMetric value, $Res Function(SnPollMetric) _then) = + _$SnPollMetricCopyWithImpl; @useResult $Res call( {int totalAnswer, @@ -421,12 +391,11 @@ abstract class _$$SnPollMetricImplCopyWith<$Res> } /// @nodoc -class __$$SnPollMetricImplCopyWithImpl<$Res> - extends _$SnPollMetricCopyWithImpl<$Res, _$SnPollMetricImpl> - implements _$$SnPollMetricImplCopyWith<$Res> { - __$$SnPollMetricImplCopyWithImpl( - _$SnPollMetricImpl _value, $Res Function(_$SnPollMetricImpl) _then) - : super(_value, _then); +class _$SnPollMetricCopyWithImpl<$Res> implements $SnPollMetricCopyWith<$Res> { + _$SnPollMetricCopyWithImpl(this._self, this._then); + + final SnPollMetric _self; + final $Res Function(SnPollMetric) _then; /// Create a copy of SnPollMetric /// with the given fields replaced by the non-null parameter values. @@ -437,17 +406,17 @@ class __$$SnPollMetricImplCopyWithImpl<$Res> Object? byOptions = null, Object? byOptionsPercentage = null, }) { - return _then(_$SnPollMetricImpl( + return _then(_self.copyWith( totalAnswer: null == totalAnswer - ? _value.totalAnswer + ? _self.totalAnswer : totalAnswer // ignore: cast_nullable_to_non_nullable as int, byOptions: null == byOptions - ? _value._byOptions + ? _self.byOptions : byOptions // ignore: cast_nullable_to_non_nullable as Map, byOptionsPercentage: null == byOptionsPercentage - ? _value._byOptionsPercentage + ? _self.byOptionsPercentage : byOptionsPercentage // ignore: cast_nullable_to_non_nullable as Map, )); @@ -456,16 +425,15 @@ class __$$SnPollMetricImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnPollMetricImpl implements _SnPollMetric { - const _$SnPollMetricImpl( +class _SnPollMetric implements SnPollMetric { + const _SnPollMetric( {required this.totalAnswer, final Map byOptions = const {}, final Map byOptionsPercentage = const {}}) : _byOptions = byOptions, _byOptionsPercentage = byOptionsPercentage; - - factory _$SnPollMetricImpl.fromJson(Map json) => - _$$SnPollMetricImplFromJson(json); + factory _SnPollMetric.fromJson(Map json) => + _$SnPollMetricFromJson(json); @override final int totalAnswer; @@ -488,16 +456,26 @@ class _$SnPollMetricImpl implements _SnPollMetric { return EqualUnmodifiableMapView(_byOptionsPercentage); } + /// Create a copy of SnPollMetric + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnPollMetric(totalAnswer: $totalAnswer, byOptions: $byOptions, byOptionsPercentage: $byOptionsPercentage)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPollMetricCopyWith<_SnPollMetric> get copyWith => + __$SnPollMetricCopyWithImpl<_SnPollMetric>(this, _$identity); + + @override + Map toJson() { + return _$SnPollMetricToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPollMetricImpl && + other is _SnPollMetric && (identical(other.totalAnswer, totalAnswer) || other.totalAnswer == totalAnswer) && const DeepCollectionEquality() @@ -514,198 +492,83 @@ class _$SnPollMetricImpl implements _SnPollMetric { const DeepCollectionEquality().hash(_byOptions), const DeepCollectionEquality().hash(_byOptionsPercentage)); - /// Create a copy of SnPollMetric - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPollMetricImplCopyWith<_$SnPollMetricImpl> get copyWith => - __$$SnPollMetricImplCopyWithImpl<_$SnPollMetricImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPollMetricImplToJson( - this, - ); - } -} - -abstract class _SnPollMetric implements SnPollMetric { - const factory _SnPollMetric( - {required final int totalAnswer, - final Map byOptions, - final Map byOptionsPercentage}) = _$SnPollMetricImpl; - - factory _SnPollMetric.fromJson(Map json) = - _$SnPollMetricImpl.fromJson; - - @override - int get totalAnswer; - @override - Map get byOptions; - @override - Map get byOptionsPercentage; - - /// Create a copy of SnPollMetric - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPollMetricImplCopyWith<_$SnPollMetricImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnPollOption _$SnPollOptionFromJson(Map json) { - return _SnPollOption.fromJson(json); -} - -/// @nodoc -mixin _$SnPollOption { - String get id => throw _privateConstructorUsedError; - String get icon => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - - /// Serializes this SnPollOption to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnPollOption - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnPollOptionCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnPollOptionCopyWith<$Res> { - factory $SnPollOptionCopyWith( - SnPollOption value, $Res Function(SnPollOption) then) = - _$SnPollOptionCopyWithImpl<$Res, SnPollOption>; - @useResult - $Res call({String id, String icon, String name, String description}); -} - -/// @nodoc -class _$SnPollOptionCopyWithImpl<$Res, $Val extends SnPollOption> - implements $SnPollOptionCopyWith<$Res> { - _$SnPollOptionCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnPollOption - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? icon = null, - Object? name = null, - Object? description = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - icon: null == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + String toString() { + return 'SnPollMetric(totalAnswer: $totalAnswer, byOptions: $byOptions, byOptionsPercentage: $byOptionsPercentage)'; } } /// @nodoc -abstract class _$$SnPollOptionImplCopyWith<$Res> - implements $SnPollOptionCopyWith<$Res> { - factory _$$SnPollOptionImplCopyWith( - _$SnPollOptionImpl value, $Res Function(_$SnPollOptionImpl) then) = - __$$SnPollOptionImplCopyWithImpl<$Res>; +abstract mixin class _$SnPollMetricCopyWith<$Res> + implements $SnPollMetricCopyWith<$Res> { + factory _$SnPollMetricCopyWith( + _SnPollMetric value, $Res Function(_SnPollMetric) _then) = + __$SnPollMetricCopyWithImpl; @override @useResult - $Res call({String id, String icon, String name, String description}); + $Res call( + {int totalAnswer, + Map byOptions, + Map byOptionsPercentage}); } /// @nodoc -class __$$SnPollOptionImplCopyWithImpl<$Res> - extends _$SnPollOptionCopyWithImpl<$Res, _$SnPollOptionImpl> - implements _$$SnPollOptionImplCopyWith<$Res> { - __$$SnPollOptionImplCopyWithImpl( - _$SnPollOptionImpl _value, $Res Function(_$SnPollOptionImpl) _then) - : super(_value, _then); +class __$SnPollMetricCopyWithImpl<$Res> + implements _$SnPollMetricCopyWith<$Res> { + __$SnPollMetricCopyWithImpl(this._self, this._then); - /// Create a copy of SnPollOption + final _SnPollMetric _self; + final $Res Function(_SnPollMetric) _then; + + /// Create a copy of SnPollMetric /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? id = null, - Object? icon = null, - Object? name = null, - Object? description = null, + Object? totalAnswer = null, + Object? byOptions = null, + Object? byOptionsPercentage = null, }) { - return _then(_$SnPollOptionImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - icon: null == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, + return _then(_SnPollMetric( + totalAnswer: null == totalAnswer + ? _self.totalAnswer + : totalAnswer // ignore: cast_nullable_to_non_nullable + as int, + byOptions: null == byOptions + ? _self._byOptions + : byOptions // ignore: cast_nullable_to_non_nullable + as Map, + byOptionsPercentage: null == byOptionsPercentage + ? _self._byOptionsPercentage + : byOptionsPercentage // ignore: cast_nullable_to_non_nullable + as Map, )); } } /// @nodoc -@JsonSerializable() -class _$SnPollOptionImpl implements _SnPollOption { - const _$SnPollOptionImpl( - {required this.id, - required this.icon, - required this.name, - required this.description}); +mixin _$SnPollOption { + String get id; + String get icon; + String get name; + String get description; - factory _$SnPollOptionImpl.fromJson(Map json) => - _$$SnPollOptionImplFromJson(json); + /// Create a copy of SnPollOption + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnPollOptionCopyWith get copyWith => + _$SnPollOptionCopyWithImpl( + this as SnPollOption, _$identity); - @override - final String id; - @override - final String icon; - @override - final String name; - @override - final String description; - - @override - String toString() { - return 'SnPollOption(id: $id, icon: $icon, name: $name, description: $description)'; - } + /// Serializes this SnPollOption to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPollOptionImpl && + other is SnPollOption && (identical(other.id, id) || other.id == id) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.name, name) || other.name == name) && @@ -717,45 +580,164 @@ class _$SnPollOptionImpl implements _SnPollOption { @override int get hashCode => Object.hash(runtimeType, id, icon, name, description); - /// Create a copy of SnPollOption - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPollOptionImplCopyWith<_$SnPollOptionImpl> get copyWith => - __$$SnPollOptionImplCopyWithImpl<_$SnPollOptionImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPollOptionImplToJson( - this, - ); + String toString() { + return 'SnPollOption(id: $id, icon: $icon, name: $name, description: $description)'; } } -abstract class _SnPollOption implements SnPollOption { - const factory _SnPollOption( - {required final String id, - required final String icon, - required final String name, - required final String description}) = _$SnPollOptionImpl; +/// @nodoc +abstract mixin class $SnPollOptionCopyWith<$Res> { + factory $SnPollOptionCopyWith( + SnPollOption value, $Res Function(SnPollOption) _then) = + _$SnPollOptionCopyWithImpl; + @useResult + $Res call({String id, String icon, String name, String description}); +} - factory _SnPollOption.fromJson(Map json) = - _$SnPollOptionImpl.fromJson; +/// @nodoc +class _$SnPollOptionCopyWithImpl<$Res> implements $SnPollOptionCopyWith<$Res> { + _$SnPollOptionCopyWithImpl(this._self, this._then); + + final SnPollOption _self; + final $Res Function(SnPollOption) _then; + + /// Create a copy of SnPollOption + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? icon = null, + Object? name = null, + Object? description = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + icon: null == icon + ? _self.icon + : icon // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnPollOption implements SnPollOption { + const _SnPollOption( + {required this.id, + required this.icon, + required this.name, + required this.description}); + factory _SnPollOption.fromJson(Map json) => + _$SnPollOptionFromJson(json); @override - String get id; + final String id; @override - String get icon; + final String icon; @override - String get name; + final String name; @override - String get description; + final String description; /// Create a copy of SnPollOption /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPollOptionImplCopyWith<_$SnPollOptionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnPollOptionCopyWith<_SnPollOption> get copyWith => + __$SnPollOptionCopyWithImpl<_SnPollOption>(this, _$identity); + + @override + Map toJson() { + return _$SnPollOptionToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnPollOption && + (identical(other.id, id) || other.id == id) && + (identical(other.icon, icon) || other.icon == icon) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, icon, name, description); + + @override + String toString() { + return 'SnPollOption(id: $id, icon: $icon, name: $name, description: $description)'; + } } + +/// @nodoc +abstract mixin class _$SnPollOptionCopyWith<$Res> + implements $SnPollOptionCopyWith<$Res> { + factory _$SnPollOptionCopyWith( + _SnPollOption value, $Res Function(_SnPollOption) _then) = + __$SnPollOptionCopyWithImpl; + @override + @useResult + $Res call({String id, String icon, String name, String description}); +} + +/// @nodoc +class __$SnPollOptionCopyWithImpl<$Res> + implements _$SnPollOptionCopyWith<$Res> { + __$SnPollOptionCopyWithImpl(this._self, this._then); + + final _SnPollOption _self; + final $Res Function(_SnPollOption) _then; + + /// Create a copy of SnPollOption + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? icon = null, + Object? name = null, + Object? description = null, + }) { + return _then(_SnPollOption( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + icon: null == icon + ? _self.icon + : icon // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/lib/types/poll.g.dart b/lib/types/poll.g.dart index 94dba79..a3eb19b 100644 --- a/lib/types/poll.g.dart +++ b/lib/types/poll.g.dart @@ -6,7 +6,7 @@ part of 'poll.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnPollImpl _$$SnPollImplFromJson(Map json) => _$SnPollImpl( +_SnPoll _$SnPollFromJson(Map json) => _SnPoll( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -19,8 +19,7 @@ _$SnPollImpl _$$SnPollImplFromJson(Map json) => _$SnPollImpl( metric: SnPollMetric.fromJson(json['metric'] as Map), ); -Map _$$SnPollImplToJson(_$SnPollImpl instance) => - { +Map _$SnPollToJson(_SnPoll instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), @@ -31,8 +30,8 @@ Map _$$SnPollImplToJson(_$SnPollImpl instance) => 'metric': instance.metric.toJson(), }; -_$SnPollMetricImpl _$$SnPollMetricImplFromJson(Map json) => - _$SnPollMetricImpl( +_SnPollMetric _$SnPollMetricFromJson(Map json) => + _SnPollMetric( totalAnswer: (json['total_answer'] as num).toInt(), byOptions: (json['by_options'] as Map?)?.map( (k, e) => MapEntry(k, (e as num).toInt()), @@ -45,22 +44,22 @@ _$SnPollMetricImpl _$$SnPollMetricImplFromJson(Map json) => const {}, ); -Map _$$SnPollMetricImplToJson(_$SnPollMetricImpl instance) => +Map _$SnPollMetricToJson(_SnPollMetric instance) => { 'total_answer': instance.totalAnswer, 'by_options': instance.byOptions, 'by_options_percentage': instance.byOptionsPercentage, }; -_$SnPollOptionImpl _$$SnPollOptionImplFromJson(Map json) => - _$SnPollOptionImpl( +_SnPollOption _$SnPollOptionFromJson(Map json) => + _SnPollOption( id: json['id'] as String, icon: json['icon'] as String, name: json['name'] as String, description: json['description'] as String, ); -Map _$$SnPollOptionImplToJson(_$SnPollOptionImpl instance) => +Map _$SnPollOptionToJson(_SnPollOption instance) => { 'id': instance.id, 'icon': instance.icon, diff --git a/lib/types/post.dart b/lib/types/post.dart index 76741c1..e829749 100644 --- a/lib/types/post.dart +++ b/lib/types/post.dart @@ -7,7 +7,7 @@ part 'post.freezed.dart'; part 'post.g.dart'; @freezed -class SnPost with _$SnPost { +abstract class SnPost with _$SnPost { const SnPost._(); const factory SnPost({ @@ -57,7 +57,7 @@ class SnPost with _$SnPost { } @freezed -class SnPostTag with _$SnPostTag { +abstract class SnPostTag with _$SnPostTag { const factory SnPostTag({ required int id, required DateTime createdAt, @@ -74,7 +74,7 @@ class SnPostTag with _$SnPostTag { } @freezed -class SnPostCategory with _$SnPostCategory { +abstract class SnPostCategory with _$SnPostCategory { const factory SnPostCategory({ required int id, required DateTime createdAt, @@ -91,7 +91,7 @@ class SnPostCategory with _$SnPostCategory { } @freezed -class SnPostPreload with _$SnPostPreload { +abstract class SnPostPreload with _$SnPostPreload { const factory SnPostPreload({ required SnAttachment? thumbnail, required List? attachments, @@ -105,7 +105,7 @@ class SnPostPreload with _$SnPostPreload { } @freezed -class SnBody with _$SnBody { +abstract class SnBody with _$SnBody { const factory SnBody({ required List attachments, required String content, @@ -118,7 +118,7 @@ class SnBody with _$SnBody { } @freezed -class SnMetric with _$SnMetric { +abstract class SnMetric with _$SnMetric { const factory SnMetric({ required int replyCount, required int reactionCount, @@ -130,7 +130,7 @@ class SnMetric with _$SnMetric { } @freezed -class SnPublisher with _$SnPublisher { +abstract class SnPublisher with _$SnPublisher { const factory SnPublisher({ required int id, required DateTime createdAt, @@ -153,7 +153,7 @@ class SnPublisher with _$SnPublisher { } @freezed -class SnSubscription with _$SnSubscription { +abstract class SnSubscription with _$SnSubscription { const factory SnSubscription({ required int id, required DateTime createdAt, diff --git a/lib/types/post.freezed.dart b/lib/types/post.freezed.dart index 3c23e14..7c3b3b1 100644 --- a/lib/types/post.freezed.dart +++ b/lib/types/post.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,66 +10,172 @@ part of 'post.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnPost _$SnPostFromJson(Map json) { - return _SnPost.fromJson(json); -} - /// @nodoc mixin _$SnPost { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - Map get body => throw _privateConstructorUsedError; - String get language => throw _privateConstructorUsedError; - String? get alias => throw _privateConstructorUsedError; - String? get aliasPrefix => throw _privateConstructorUsedError; - List get tags => throw _privateConstructorUsedError; - List get categories => throw _privateConstructorUsedError; - List? get replies => throw _privateConstructorUsedError; - int? get replyId => throw _privateConstructorUsedError; - int? get repostId => throw _privateConstructorUsedError; - int? get realmId => throw _privateConstructorUsedError; - SnPost? get replyTo => throw _privateConstructorUsedError; - SnPost? get repostTo => throw _privateConstructorUsedError; - List? get visibleUsersList => throw _privateConstructorUsedError; - List? get invisibleUsersList => throw _privateConstructorUsedError; - int get visibility => throw _privateConstructorUsedError; - DateTime? get editedAt => throw _privateConstructorUsedError; - DateTime? get pinnedAt => throw _privateConstructorUsedError; - DateTime? get lockedAt => throw _privateConstructorUsedError; - bool get isDraft => throw _privateConstructorUsedError; - DateTime? get publishedAt => throw _privateConstructorUsedError; - DateTime? get publishedUntil => throw _privateConstructorUsedError; - int get totalUpvote => throw _privateConstructorUsedError; - int get totalDownvote => throw _privateConstructorUsedError; - int get totalViews => throw _privateConstructorUsedError; - int get totalAggregatedViews => throw _privateConstructorUsedError; - int get publisherId => throw _privateConstructorUsedError; - int? get pollId => throw _privateConstructorUsedError; - SnPublisher get publisher => throw _privateConstructorUsedError; - SnMetric get metric => throw _privateConstructorUsedError; - SnPostPreload? get preload => throw _privateConstructorUsedError; - - /// Serializes this SnPost to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get type; + Map get body; + String get language; + String? get alias; + String? get aliasPrefix; + List get tags; + List get categories; + List? get replies; + int? get replyId; + int? get repostId; + int? get realmId; + SnPost? get replyTo; + SnPost? get repostTo; + List? get visibleUsersList; + List? get invisibleUsersList; + int get visibility; + DateTime? get editedAt; + DateTime? get pinnedAt; + DateTime? get lockedAt; + bool get isDraft; + DateTime? get publishedAt; + DateTime? get publishedUntil; + int get totalUpvote; + int get totalDownvote; + int get totalViews; + int get totalAggregatedViews; + int get publisherId; + int? get pollId; + SnPublisher get publisher; + SnMetric get metric; + SnPostPreload? get preload; /// Create a copy of SnPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnPostCopyWith get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $SnPostCopyWith get copyWith => + _$SnPostCopyWithImpl(this as SnPost, _$identity); + + /// Serializes this SnPost to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPost && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.type, type) || other.type == type) && + const DeepCollectionEquality().equals(other.body, body) && + (identical(other.language, language) || + other.language == language) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.aliasPrefix, aliasPrefix) || + other.aliasPrefix == aliasPrefix) && + const DeepCollectionEquality().equals(other.tags, tags) && + const DeepCollectionEquality() + .equals(other.categories, categories) && + const DeepCollectionEquality().equals(other.replies, replies) && + (identical(other.replyId, replyId) || other.replyId == replyId) && + (identical(other.repostId, repostId) || + other.repostId == repostId) && + (identical(other.realmId, realmId) || other.realmId == realmId) && + (identical(other.replyTo, replyTo) || other.replyTo == replyTo) && + (identical(other.repostTo, repostTo) || + other.repostTo == repostTo) && + const DeepCollectionEquality() + .equals(other.visibleUsersList, visibleUsersList) && + const DeepCollectionEquality() + .equals(other.invisibleUsersList, invisibleUsersList) && + (identical(other.visibility, visibility) || + other.visibility == visibility) && + (identical(other.editedAt, editedAt) || + other.editedAt == editedAt) && + (identical(other.pinnedAt, pinnedAt) || + other.pinnedAt == pinnedAt) && + (identical(other.lockedAt, lockedAt) || + other.lockedAt == lockedAt) && + (identical(other.isDraft, isDraft) || other.isDraft == isDraft) && + (identical(other.publishedAt, publishedAt) || + other.publishedAt == publishedAt) && + (identical(other.publishedUntil, publishedUntil) || + other.publishedUntil == publishedUntil) && + (identical(other.totalUpvote, totalUpvote) || + other.totalUpvote == totalUpvote) && + (identical(other.totalDownvote, totalDownvote) || + other.totalDownvote == totalDownvote) && + (identical(other.totalViews, totalViews) || + other.totalViews == totalViews) && + (identical(other.totalAggregatedViews, totalAggregatedViews) || + other.totalAggregatedViews == totalAggregatedViews) && + (identical(other.publisherId, publisherId) || + other.publisherId == publisherId) && + (identical(other.pollId, pollId) || other.pollId == pollId) && + (identical(other.publisher, publisher) || + other.publisher == publisher) && + (identical(other.metric, metric) || other.metric == metric) && + (identical(other.preload, preload) || other.preload == preload)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + type, + const DeepCollectionEquality().hash(body), + language, + alias, + aliasPrefix, + const DeepCollectionEquality().hash(tags), + const DeepCollectionEquality().hash(categories), + const DeepCollectionEquality().hash(replies), + replyId, + repostId, + realmId, + replyTo, + repostTo, + const DeepCollectionEquality().hash(visibleUsersList), + const DeepCollectionEquality().hash(invisibleUsersList), + visibility, + editedAt, + pinnedAt, + lockedAt, + isDraft, + publishedAt, + publishedUntil, + totalUpvote, + totalDownvote, + totalViews, + totalAggregatedViews, + publisherId, + pollId, + publisher, + metric, + preload + ]); + + @override + String toString() { + return 'SnPost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, body: $body, language: $language, alias: $alias, aliasPrefix: $aliasPrefix, tags: $tags, categories: $categories, replies: $replies, replyId: $replyId, repostId: $repostId, realmId: $realmId, replyTo: $replyTo, repostTo: $repostTo, visibleUsersList: $visibleUsersList, invisibleUsersList: $invisibleUsersList, visibility: $visibility, editedAt: $editedAt, pinnedAt: $pinnedAt, lockedAt: $lockedAt, isDraft: $isDraft, publishedAt: $publishedAt, publishedUntil: $publishedUntil, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, totalViews: $totalViews, totalAggregatedViews: $totalAggregatedViews, publisherId: $publisherId, pollId: $pollId, publisher: $publisher, metric: $metric, preload: $preload)'; + } } /// @nodoc -abstract class $SnPostCopyWith<$Res> { - factory $SnPostCopyWith(SnPost value, $Res Function(SnPost) then) = - _$SnPostCopyWithImpl<$Res, SnPost>; +abstract mixin class $SnPostCopyWith<$Res> { + factory $SnPostCopyWith(SnPost value, $Res Function(SnPost) _then) = + _$SnPostCopyWithImpl; @useResult $Res call( {int id, @@ -115,14 +222,11 @@ abstract class $SnPostCopyWith<$Res> { } /// @nodoc -class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> - implements $SnPostCopyWith<$Res> { - _$SnPostCopyWithImpl(this._value, this._then); +class _$SnPostCopyWithImpl<$Res> implements $SnPostCopyWith<$Res> { + _$SnPostCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnPost _self; + final $Res Function(SnPost) _then; /// Create a copy of SnPost /// with the given fields replaced by the non-null parameter values. @@ -165,148 +269,148 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> Object? metric = null, Object? preload = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, type: null == type - ? _value.type + ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, body: null == body - ? _value.body + ? _self.body : body // ignore: cast_nullable_to_non_nullable as Map, language: null == language - ? _value.language + ? _self.language : language // ignore: cast_nullable_to_non_nullable as String, alias: freezed == alias - ? _value.alias + ? _self.alias : alias // ignore: cast_nullable_to_non_nullable as String?, aliasPrefix: freezed == aliasPrefix - ? _value.aliasPrefix + ? _self.aliasPrefix : aliasPrefix // ignore: cast_nullable_to_non_nullable as String?, tags: null == tags - ? _value.tags + ? _self.tags : tags // ignore: cast_nullable_to_non_nullable as List, categories: null == categories - ? _value.categories + ? _self.categories : categories // ignore: cast_nullable_to_non_nullable as List, replies: freezed == replies - ? _value.replies + ? _self.replies : replies // ignore: cast_nullable_to_non_nullable as List?, replyId: freezed == replyId - ? _value.replyId + ? _self.replyId : replyId // ignore: cast_nullable_to_non_nullable as int?, repostId: freezed == repostId - ? _value.repostId + ? _self.repostId : repostId // ignore: cast_nullable_to_non_nullable as int?, realmId: freezed == realmId - ? _value.realmId + ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable as int?, replyTo: freezed == replyTo - ? _value.replyTo + ? _self.replyTo : replyTo // ignore: cast_nullable_to_non_nullable as SnPost?, repostTo: freezed == repostTo - ? _value.repostTo + ? _self.repostTo : repostTo // ignore: cast_nullable_to_non_nullable as SnPost?, visibleUsersList: freezed == visibleUsersList - ? _value.visibleUsersList + ? _self.visibleUsersList : visibleUsersList // ignore: cast_nullable_to_non_nullable as List?, invisibleUsersList: freezed == invisibleUsersList - ? _value.invisibleUsersList + ? _self.invisibleUsersList : invisibleUsersList // ignore: cast_nullable_to_non_nullable as List?, visibility: null == visibility - ? _value.visibility + ? _self.visibility : visibility // ignore: cast_nullable_to_non_nullable as int, editedAt: freezed == editedAt - ? _value.editedAt + ? _self.editedAt : editedAt // ignore: cast_nullable_to_non_nullable as DateTime?, pinnedAt: freezed == pinnedAt - ? _value.pinnedAt + ? _self.pinnedAt : pinnedAt // ignore: cast_nullable_to_non_nullable as DateTime?, lockedAt: freezed == lockedAt - ? _value.lockedAt + ? _self.lockedAt : lockedAt // ignore: cast_nullable_to_non_nullable as DateTime?, isDraft: null == isDraft - ? _value.isDraft + ? _self.isDraft : isDraft // ignore: cast_nullable_to_non_nullable as bool, publishedAt: freezed == publishedAt - ? _value.publishedAt + ? _self.publishedAt : publishedAt // ignore: cast_nullable_to_non_nullable as DateTime?, publishedUntil: freezed == publishedUntil - ? _value.publishedUntil + ? _self.publishedUntil : publishedUntil // ignore: cast_nullable_to_non_nullable as DateTime?, totalUpvote: null == totalUpvote - ? _value.totalUpvote + ? _self.totalUpvote : totalUpvote // ignore: cast_nullable_to_non_nullable as int, totalDownvote: null == totalDownvote - ? _value.totalDownvote + ? _self.totalDownvote : totalDownvote // ignore: cast_nullable_to_non_nullable as int, totalViews: null == totalViews - ? _value.totalViews + ? _self.totalViews : totalViews // ignore: cast_nullable_to_non_nullable as int, totalAggregatedViews: null == totalAggregatedViews - ? _value.totalAggregatedViews + ? _self.totalAggregatedViews : totalAggregatedViews // ignore: cast_nullable_to_non_nullable as int, publisherId: null == publisherId - ? _value.publisherId + ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable as int, pollId: freezed == pollId - ? _value.pollId + ? _self.pollId : pollId // ignore: cast_nullable_to_non_nullable as int?, publisher: null == publisher - ? _value.publisher + ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable as SnPublisher, metric: null == metric - ? _value.metric + ? _self.metric : metric // ignore: cast_nullable_to_non_nullable as SnMetric, preload: freezed == preload - ? _value.preload + ? _self.preload : preload // ignore: cast_nullable_to_non_nullable as SnPostPreload?, - ) as $Val); + )); } /// Create a copy of SnPost @@ -314,12 +418,12 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> @override @pragma('vm:prefer-inline') $SnPostCopyWith<$Res>? get replyTo { - if (_value.replyTo == null) { + if (_self.replyTo == null) { return null; } - return $SnPostCopyWith<$Res>(_value.replyTo!, (value) { - return _then(_value.copyWith(replyTo: value) as $Val); + return $SnPostCopyWith<$Res>(_self.replyTo!, (value) { + return _then(_self.copyWith(replyTo: value)); }); } @@ -328,12 +432,12 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> @override @pragma('vm:prefer-inline') $SnPostCopyWith<$Res>? get repostTo { - if (_value.repostTo == null) { + if (_self.repostTo == null) { return null; } - return $SnPostCopyWith<$Res>(_value.repostTo!, (value) { - return _then(_value.copyWith(repostTo: value) as $Val); + return $SnPostCopyWith<$Res>(_self.repostTo!, (value) { + return _then(_self.copyWith(repostTo: value)); }); } @@ -342,8 +446,8 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> @override @pragma('vm:prefer-inline') $SnPublisherCopyWith<$Res> get publisher { - return $SnPublisherCopyWith<$Res>(_value.publisher, (value) { - return _then(_value.copyWith(publisher: value) as $Val); + return $SnPublisherCopyWith<$Res>(_self.publisher, (value) { + return _then(_self.copyWith(publisher: value)); }); } @@ -352,8 +456,8 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> @override @pragma('vm:prefer-inline') $SnMetricCopyWith<$Res> get metric { - return $SnMetricCopyWith<$Res>(_value.metric, (value) { - return _then(_value.copyWith(metric: value) as $Val); + return $SnMetricCopyWith<$Res>(_self.metric, (value) { + return _then(_self.copyWith(metric: value)); }); } @@ -362,270 +466,20 @@ class _$SnPostCopyWithImpl<$Res, $Val extends SnPost> @override @pragma('vm:prefer-inline') $SnPostPreloadCopyWith<$Res>? get preload { - if (_value.preload == null) { + if (_self.preload == null) { return null; } - return $SnPostPreloadCopyWith<$Res>(_value.preload!, (value) { - return _then(_value.copyWith(preload: value) as $Val); + return $SnPostPreloadCopyWith<$Res>(_self.preload!, (value) { + return _then(_self.copyWith(preload: value)); }); } } -/// @nodoc -abstract class _$$SnPostImplCopyWith<$Res> implements $SnPostCopyWith<$Res> { - factory _$$SnPostImplCopyWith( - _$SnPostImpl value, $Res Function(_$SnPostImpl) then) = - __$$SnPostImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String type, - Map body, - String language, - String? alias, - String? aliasPrefix, - List tags, - List categories, - List? replies, - int? replyId, - int? repostId, - int? realmId, - SnPost? replyTo, - SnPost? repostTo, - List? visibleUsersList, - List? invisibleUsersList, - int visibility, - DateTime? editedAt, - DateTime? pinnedAt, - DateTime? lockedAt, - bool isDraft, - DateTime? publishedAt, - DateTime? publishedUntil, - int totalUpvote, - int totalDownvote, - int totalViews, - int totalAggregatedViews, - int publisherId, - int? pollId, - SnPublisher publisher, - SnMetric metric, - SnPostPreload? preload}); - - @override - $SnPostCopyWith<$Res>? get replyTo; - @override - $SnPostCopyWith<$Res>? get repostTo; - @override - $SnPublisherCopyWith<$Res> get publisher; - @override - $SnMetricCopyWith<$Res> get metric; - @override - $SnPostPreloadCopyWith<$Res>? get preload; -} - -/// @nodoc -class __$$SnPostImplCopyWithImpl<$Res> - extends _$SnPostCopyWithImpl<$Res, _$SnPostImpl> - implements _$$SnPostImplCopyWith<$Res> { - __$$SnPostImplCopyWithImpl( - _$SnPostImpl _value, $Res Function(_$SnPostImpl) _then) - : super(_value, _then); - - /// Create a copy of SnPost - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? type = null, - Object? body = null, - Object? language = null, - Object? alias = freezed, - Object? aliasPrefix = freezed, - Object? tags = null, - Object? categories = null, - Object? replies = freezed, - Object? replyId = freezed, - Object? repostId = freezed, - Object? realmId = freezed, - Object? replyTo = freezed, - Object? repostTo = freezed, - Object? visibleUsersList = freezed, - Object? invisibleUsersList = freezed, - Object? visibility = null, - Object? editedAt = freezed, - Object? pinnedAt = freezed, - Object? lockedAt = freezed, - Object? isDraft = null, - Object? publishedAt = freezed, - Object? publishedUntil = freezed, - Object? totalUpvote = null, - Object? totalDownvote = null, - Object? totalViews = null, - Object? totalAggregatedViews = null, - Object? publisherId = null, - Object? pollId = freezed, - Object? publisher = null, - Object? metric = null, - Object? preload = freezed, - }) { - return _then(_$SnPostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - body: null == body - ? _value._body - : body // ignore: cast_nullable_to_non_nullable - as Map, - language: null == language - ? _value.language - : language // ignore: cast_nullable_to_non_nullable - as String, - alias: freezed == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String?, - aliasPrefix: freezed == aliasPrefix - ? _value.aliasPrefix - : aliasPrefix // ignore: cast_nullable_to_non_nullable - as String?, - tags: null == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - categories: null == categories - ? _value._categories - : categories // ignore: cast_nullable_to_non_nullable - as List, - replies: freezed == replies - ? _value._replies - : replies // ignore: cast_nullable_to_non_nullable - as List?, - replyId: freezed == replyId - ? _value.replyId - : replyId // ignore: cast_nullable_to_non_nullable - as int?, - repostId: freezed == repostId - ? _value.repostId - : repostId // ignore: cast_nullable_to_non_nullable - as int?, - realmId: freezed == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int?, - replyTo: freezed == replyTo - ? _value.replyTo - : replyTo // ignore: cast_nullable_to_non_nullable - as SnPost?, - repostTo: freezed == repostTo - ? _value.repostTo - : repostTo // ignore: cast_nullable_to_non_nullable - as SnPost?, - visibleUsersList: freezed == visibleUsersList - ? _value._visibleUsersList - : visibleUsersList // ignore: cast_nullable_to_non_nullable - as List?, - invisibleUsersList: freezed == invisibleUsersList - ? _value._invisibleUsersList - : invisibleUsersList // ignore: cast_nullable_to_non_nullable - as List?, - visibility: null == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as int, - editedAt: freezed == editedAt - ? _value.editedAt - : editedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - pinnedAt: freezed == pinnedAt - ? _value.pinnedAt - : pinnedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - lockedAt: freezed == lockedAt - ? _value.lockedAt - : lockedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isDraft: null == isDraft - ? _value.isDraft - : isDraft // ignore: cast_nullable_to_non_nullable - as bool, - publishedAt: freezed == publishedAt - ? _value.publishedAt - : publishedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - publishedUntil: freezed == publishedUntil - ? _value.publishedUntil - : publishedUntil // ignore: cast_nullable_to_non_nullable - as DateTime?, - totalUpvote: null == totalUpvote - ? _value.totalUpvote - : totalUpvote // ignore: cast_nullable_to_non_nullable - as int, - totalDownvote: null == totalDownvote - ? _value.totalDownvote - : totalDownvote // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalAggregatedViews: null == totalAggregatedViews - ? _value.totalAggregatedViews - : totalAggregatedViews // ignore: cast_nullable_to_non_nullable - as int, - publisherId: null == publisherId - ? _value.publisherId - : publisherId // ignore: cast_nullable_to_non_nullable - as int, - pollId: freezed == pollId - ? _value.pollId - : pollId // ignore: cast_nullable_to_non_nullable - as int?, - publisher: null == publisher - ? _value.publisher - : publisher // ignore: cast_nullable_to_non_nullable - as SnPublisher, - metric: null == metric - ? _value.metric - : metric // ignore: cast_nullable_to_non_nullable - as SnMetric, - preload: freezed == preload - ? _value.preload - : preload // ignore: cast_nullable_to_non_nullable - as SnPostPreload?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnPostImpl extends _SnPost { - const _$SnPostImpl( +class _SnPost extends SnPost { + const _SnPost( {required this.id, required this.createdAt, required this.updatedAt, @@ -668,9 +522,7 @@ class _$SnPostImpl extends _SnPost { _visibleUsersList = visibleUsersList, _invisibleUsersList = invisibleUsersList, super._(); - - factory _$SnPostImpl.fromJson(Map json) => - _$$SnPostImplFromJson(json); + factory _SnPost.fromJson(Map json) => _$SnPostFromJson(json); @override final int id; @@ -791,16 +643,26 @@ class _$SnPostImpl extends _SnPost { @override final SnPostPreload? preload; + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnPost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, body: $body, language: $language, alias: $alias, aliasPrefix: $aliasPrefix, tags: $tags, categories: $categories, replies: $replies, replyId: $replyId, repostId: $repostId, realmId: $realmId, replyTo: $replyTo, repostTo: $repostTo, visibleUsersList: $visibleUsersList, invisibleUsersList: $invisibleUsersList, visibility: $visibility, editedAt: $editedAt, pinnedAt: $pinnedAt, lockedAt: $lockedAt, isDraft: $isDraft, publishedAt: $publishedAt, publishedUntil: $publishedUntil, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, totalViews: $totalViews, totalAggregatedViews: $totalAggregatedViews, publisherId: $publisherId, pollId: $pollId, publisher: $publisher, metric: $metric, preload: $preload)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPostCopyWith<_SnPost> get copyWith => + __$SnPostCopyWithImpl<_SnPost>(this, _$identity); + + @override + Map toJson() { + return _$SnPostToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPostImpl && + other is _SnPost && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -901,476 +763,384 @@ class _$SnPostImpl extends _SnPost { preload ]); - /// Create a copy of SnPost - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPostImplCopyWith<_$SnPostImpl> get copyWith => - __$$SnPostImplCopyWithImpl<_$SnPostImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPostImplToJson( - this, - ); + String toString() { + return 'SnPost(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, body: $body, language: $language, alias: $alias, aliasPrefix: $aliasPrefix, tags: $tags, categories: $categories, replies: $replies, replyId: $replyId, repostId: $repostId, realmId: $realmId, replyTo: $replyTo, repostTo: $repostTo, visibleUsersList: $visibleUsersList, invisibleUsersList: $invisibleUsersList, visibility: $visibility, editedAt: $editedAt, pinnedAt: $pinnedAt, lockedAt: $lockedAt, isDraft: $isDraft, publishedAt: $publishedAt, publishedUntil: $publishedUntil, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, totalViews: $totalViews, totalAggregatedViews: $totalAggregatedViews, publisherId: $publisherId, pollId: $pollId, publisher: $publisher, metric: $metric, preload: $preload)'; } } -abstract class _SnPost extends SnPost { - const factory _SnPost( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String type, - required final Map body, - required final String language, - required final String? alias, - required final String? aliasPrefix, - final List tags, - final List categories, - required final List? replies, - required final int? replyId, - required final int? repostId, - required final int? realmId, - required final SnPost? replyTo, - required final SnPost? repostTo, - required final List? visibleUsersList, - required final List? invisibleUsersList, - required final int visibility, - required final DateTime? editedAt, - required final DateTime? pinnedAt, - required final DateTime? lockedAt, - required final bool isDraft, - required final DateTime? publishedAt, - required final DateTime? publishedUntil, - required final int totalUpvote, - required final int totalDownvote, - final int totalViews, - final int totalAggregatedViews, - required final int publisherId, - required final int? pollId, - required final SnPublisher publisher, - required final SnMetric metric, - final SnPostPreload? preload}) = _$SnPostImpl; - const _SnPost._() : super._(); - - factory _SnPost.fromJson(Map json) = _$SnPostImpl.fromJson; +/// @nodoc +abstract mixin class _$SnPostCopyWith<$Res> implements $SnPostCopyWith<$Res> { + factory _$SnPostCopyWith(_SnPost value, $Res Function(_SnPost) _then) = + __$SnPostCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String type, + Map body, + String language, + String? alias, + String? aliasPrefix, + List tags, + List categories, + List? replies, + int? replyId, + int? repostId, + int? realmId, + SnPost? replyTo, + SnPost? repostTo, + List? visibleUsersList, + List? invisibleUsersList, + int visibility, + DateTime? editedAt, + DateTime? pinnedAt, + DateTime? lockedAt, + bool isDraft, + DateTime? publishedAt, + DateTime? publishedUntil, + int totalUpvote, + int totalDownvote, + int totalViews, + int totalAggregatedViews, + int publisherId, + int? pollId, + SnPublisher publisher, + SnMetric metric, + SnPostPreload? preload}); @override - int get id; + $SnPostCopyWith<$Res>? get replyTo; @override - DateTime get createdAt; + $SnPostCopyWith<$Res>? get repostTo; @override - DateTime get updatedAt; + $SnPublisherCopyWith<$Res> get publisher; @override - DateTime? get deletedAt; + $SnMetricCopyWith<$Res> get metric; @override - String get type; - @override - Map get body; - @override - String get language; - @override - String? get alias; - @override - String? get aliasPrefix; - @override - List get tags; - @override - List get categories; - @override - List? get replies; - @override - int? get replyId; - @override - int? get repostId; - @override - int? get realmId; - @override - SnPost? get replyTo; - @override - SnPost? get repostTo; - @override - List? get visibleUsersList; - @override - List? get invisibleUsersList; - @override - int get visibility; - @override - DateTime? get editedAt; - @override - DateTime? get pinnedAt; - @override - DateTime? get lockedAt; - @override - bool get isDraft; - @override - DateTime? get publishedAt; - @override - DateTime? get publishedUntil; - @override - int get totalUpvote; - @override - int get totalDownvote; - @override - int get totalViews; - @override - int get totalAggregatedViews; - @override - int get publisherId; - @override - int? get pollId; - @override - SnPublisher get publisher; - @override - SnMetric get metric; - @override - SnPostPreload? get preload; + $SnPostPreloadCopyWith<$Res>? get preload; +} + +/// @nodoc +class __$SnPostCopyWithImpl<$Res> implements _$SnPostCopyWith<$Res> { + __$SnPostCopyWithImpl(this._self, this._then); + + final _SnPost _self; + final $Res Function(_SnPost) _then; /// Create a copy of SnPost /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPostImplCopyWith<_$SnPostImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? type = null, + Object? body = null, + Object? language = null, + Object? alias = freezed, + Object? aliasPrefix = freezed, + Object? tags = null, + Object? categories = null, + Object? replies = freezed, + Object? replyId = freezed, + Object? repostId = freezed, + Object? realmId = freezed, + Object? replyTo = freezed, + Object? repostTo = freezed, + Object? visibleUsersList = freezed, + Object? invisibleUsersList = freezed, + Object? visibility = null, + Object? editedAt = freezed, + Object? pinnedAt = freezed, + Object? lockedAt = freezed, + Object? isDraft = null, + Object? publishedAt = freezed, + Object? publishedUntil = freezed, + Object? totalUpvote = null, + Object? totalDownvote = null, + Object? totalViews = null, + Object? totalAggregatedViews = null, + Object? publisherId = null, + Object? pollId = freezed, + Object? publisher = null, + Object? metric = null, + Object? preload = freezed, + }) { + return _then(_SnPost( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + body: null == body + ? _self._body + : body // ignore: cast_nullable_to_non_nullable + as Map, + language: null == language + ? _self.language + : language // ignore: cast_nullable_to_non_nullable + as String, + alias: freezed == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String?, + aliasPrefix: freezed == aliasPrefix + ? _self.aliasPrefix + : aliasPrefix // ignore: cast_nullable_to_non_nullable + as String?, + tags: null == tags + ? _self._tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + categories: null == categories + ? _self._categories + : categories // ignore: cast_nullable_to_non_nullable + as List, + replies: freezed == replies + ? _self._replies + : replies // ignore: cast_nullable_to_non_nullable + as List?, + replyId: freezed == replyId + ? _self.replyId + : replyId // ignore: cast_nullable_to_non_nullable + as int?, + repostId: freezed == repostId + ? _self.repostId + : repostId // ignore: cast_nullable_to_non_nullable + as int?, + realmId: freezed == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int?, + replyTo: freezed == replyTo + ? _self.replyTo + : replyTo // ignore: cast_nullable_to_non_nullable + as SnPost?, + repostTo: freezed == repostTo + ? _self.repostTo + : repostTo // ignore: cast_nullable_to_non_nullable + as SnPost?, + visibleUsersList: freezed == visibleUsersList + ? _self._visibleUsersList + : visibleUsersList // ignore: cast_nullable_to_non_nullable + as List?, + invisibleUsersList: freezed == invisibleUsersList + ? _self._invisibleUsersList + : invisibleUsersList // ignore: cast_nullable_to_non_nullable + as List?, + visibility: null == visibility + ? _self.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as int, + editedAt: freezed == editedAt + ? _self.editedAt + : editedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + pinnedAt: freezed == pinnedAt + ? _self.pinnedAt + : pinnedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + lockedAt: freezed == lockedAt + ? _self.lockedAt + : lockedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isDraft: null == isDraft + ? _self.isDraft + : isDraft // ignore: cast_nullable_to_non_nullable + as bool, + publishedAt: freezed == publishedAt + ? _self.publishedAt + : publishedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + publishedUntil: freezed == publishedUntil + ? _self.publishedUntil + : publishedUntil // ignore: cast_nullable_to_non_nullable + as DateTime?, + totalUpvote: null == totalUpvote + ? _self.totalUpvote + : totalUpvote // ignore: cast_nullable_to_non_nullable + as int, + totalDownvote: null == totalDownvote + ? _self.totalDownvote + : totalDownvote // ignore: cast_nullable_to_non_nullable + as int, + totalViews: null == totalViews + ? _self.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalAggregatedViews: null == totalAggregatedViews + ? _self.totalAggregatedViews + : totalAggregatedViews // ignore: cast_nullable_to_non_nullable + as int, + publisherId: null == publisherId + ? _self.publisherId + : publisherId // ignore: cast_nullable_to_non_nullable + as int, + pollId: freezed == pollId + ? _self.pollId + : pollId // ignore: cast_nullable_to_non_nullable + as int?, + publisher: null == publisher + ? _self.publisher + : publisher // ignore: cast_nullable_to_non_nullable + as SnPublisher, + metric: null == metric + ? _self.metric + : metric // ignore: cast_nullable_to_non_nullable + as SnMetric, + preload: freezed == preload + ? _self.preload + : preload // ignore: cast_nullable_to_non_nullable + as SnPostPreload?, + )); + } -SnPostTag _$SnPostTagFromJson(Map json) { - return _SnPostTag.fromJson(json); + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPostCopyWith<$Res>? get replyTo { + if (_self.replyTo == null) { + return null; + } + + return $SnPostCopyWith<$Res>(_self.replyTo!, (value) { + return _then(_self.copyWith(replyTo: value)); + }); + } + + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPostCopyWith<$Res>? get repostTo { + if (_self.repostTo == null) { + return null; + } + + return $SnPostCopyWith<$Res>(_self.repostTo!, (value) { + return _then(_self.copyWith(repostTo: value)); + }); + } + + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPublisherCopyWith<$Res> get publisher { + return $SnPublisherCopyWith<$Res>(_self.publisher, (value) { + return _then(_self.copyWith(publisher: value)); + }); + } + + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnMetricCopyWith<$Res> get metric { + return $SnMetricCopyWith<$Res>(_self.metric, (value) { + return _then(_self.copyWith(metric: value)); + }); + } + + /// Create a copy of SnPost + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPostPreloadCopyWith<$Res>? get preload { + if (_self.preload == null) { + return null; + } + + return $SnPostPreloadCopyWith<$Res>(_self.preload!, (value) { + return _then(_self.copyWith(preload: value)); + }); + } } /// @nodoc mixin _$SnPostTag { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - dynamic get posts => throw _privateConstructorUsedError; - - /// Serializes this SnPostTag to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + dynamic get deletedAt; + String get alias; + String get name; + String get description; + dynamic get posts; /// Create a copy of SnPostTag /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnPostTagCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnPostTagCopyWithImpl(this as SnPostTag, _$identity); -/// @nodoc -abstract class $SnPostTagCopyWith<$Res> { - factory $SnPostTagCopyWith(SnPostTag value, $Res Function(SnPostTag) then) = - _$SnPostTagCopyWithImpl<$Res, SnPostTag>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String alias, - String name, - String description, - dynamic posts}); -} + /// Serializes this SnPostTag to a JSON map. + Map toJson(); -/// @nodoc -class _$SnPostTagCopyWithImpl<$Res, $Val extends SnPostTag> - implements $SnPostTagCopyWith<$Res> { - _$SnPostTagCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnPostTag - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? posts = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - posts: freezed == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPostTag && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.posts, posts)); } -} -/// @nodoc -abstract class _$$SnPostTagImplCopyWith<$Res> - implements $SnPostTagCopyWith<$Res> { - factory _$$SnPostTagImplCopyWith( - _$SnPostTagImpl value, $Res Function(_$SnPostTagImpl) then) = - __$$SnPostTagImplCopyWithImpl<$Res>; + @JsonKey(includeFromJson: false, includeToJson: false) @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String alias, - String name, - String description, - dynamic posts}); -} - -/// @nodoc -class __$$SnPostTagImplCopyWithImpl<$Res> - extends _$SnPostTagCopyWithImpl<$Res, _$SnPostTagImpl> - implements _$$SnPostTagImplCopyWith<$Res> { - __$$SnPostTagImplCopyWithImpl( - _$SnPostTagImpl _value, $Res Function(_$SnPostTagImpl) _then) - : super(_value, _then); - - /// Create a copy of SnPostTag - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? posts = freezed, - }) { - return _then(_$SnPostTagImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - posts: freezed == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as dynamic, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnPostTagImpl implements _SnPostTag { - const _$SnPostTagImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.alias, - required this.name, - required this.description, - required this.posts}); - - factory _$SnPostTagImpl.fromJson(Map json) => - _$$SnPostTagImplFromJson(json); - - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final dynamic deletedAt; - @override - final String alias; - @override - final String name; - @override - final String description; - @override - final dynamic posts; + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + alias, + name, + description, + const DeepCollectionEquality().hash(posts)); @override String toString() { return 'SnPostTag(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, posts: $posts)'; } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SnPostTagImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.createdAt, createdAt) || - other.createdAt == createdAt) && - (identical(other.updatedAt, updatedAt) || - other.updatedAt == updatedAt) && - const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && - (identical(other.alias, alias) || other.alias == alias) && - (identical(other.name, name) || other.name == name) && - (identical(other.description, description) || - other.description == description) && - const DeepCollectionEquality().equals(other.posts, posts)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - createdAt, - updatedAt, - const DeepCollectionEquality().hash(deletedAt), - alias, - name, - description, - const DeepCollectionEquality().hash(posts)); - - /// Create a copy of SnPostTag - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SnPostTagImplCopyWith<_$SnPostTagImpl> get copyWith => - __$$SnPostTagImplCopyWithImpl<_$SnPostTagImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPostTagImplToJson( - this, - ); - } -} - -abstract class _SnPostTag implements SnPostTag { - const factory _SnPostTag( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final String alias, - required final String name, - required final String description, - required final dynamic posts}) = _$SnPostTagImpl; - - factory _SnPostTag.fromJson(Map json) = - _$SnPostTagImpl.fromJson; - - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - dynamic get deletedAt; - @override - String get alias; - @override - String get name; - @override - String get description; - @override - dynamic get posts; - - /// Create a copy of SnPostTag - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPostTagImplCopyWith<_$SnPostTagImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnPostCategory _$SnPostCategoryFromJson(Map json) { - return _SnPostCategory.fromJson(json); } /// @nodoc -mixin _$SnPostCategory { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - dynamic get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - dynamic get posts => throw _privateConstructorUsedError; - - /// Serializes this SnPostCategory to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnPostCategory - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnPostCategoryCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnPostCategoryCopyWith<$Res> { - factory $SnPostCategoryCopyWith( - SnPostCategory value, $Res Function(SnPostCategory) then) = - _$SnPostCategoryCopyWithImpl<$Res, SnPostCategory>; +abstract mixin class $SnPostTagCopyWith<$Res> { + factory $SnPostTagCopyWith(SnPostTag value, $Res Function(SnPostTag) _then) = + _$SnPostTagCopyWithImpl; @useResult $Res call( {int id, @@ -1384,16 +1154,13 @@ abstract class $SnPostCategoryCopyWith<$Res> { } /// @nodoc -class _$SnPostCategoryCopyWithImpl<$Res, $Val extends SnPostCategory> - implements $SnPostCategoryCopyWith<$Res> { - _$SnPostCategoryCopyWithImpl(this._value, this._then); +class _$SnPostTagCopyWithImpl<$Res> implements $SnPostTagCopyWith<$Res> { + _$SnPostTagCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnPostTag _self; + final $Res Function(SnPostTag) _then; - /// Create a copy of SnPostCategory + /// Create a copy of SnPostTag /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -1407,115 +1174,37 @@ class _$SnPostCategoryCopyWithImpl<$Res, $Val extends SnPostCategory> Object? description = null, Object? posts = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as dynamic, alias: null == alias - ? _value.alias + ? _self.alias : alias // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, posts: freezed == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnPostCategoryImplCopyWith<$Res> - implements $SnPostCategoryCopyWith<$Res> { - factory _$$SnPostCategoryImplCopyWith(_$SnPostCategoryImpl value, - $Res Function(_$SnPostCategoryImpl) then) = - __$$SnPostCategoryImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - dynamic deletedAt, - String alias, - String name, - String description, - dynamic posts}); -} - -/// @nodoc -class __$$SnPostCategoryImplCopyWithImpl<$Res> - extends _$SnPostCategoryCopyWithImpl<$Res, _$SnPostCategoryImpl> - implements _$$SnPostCategoryImplCopyWith<$Res> { - __$$SnPostCategoryImplCopyWithImpl( - _$SnPostCategoryImpl _value, $Res Function(_$SnPostCategoryImpl) _then) - : super(_value, _then); - - /// Create a copy of SnPostCategory - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? posts = freezed, - }) { - return _then(_$SnPostCategoryImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as dynamic, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - posts: freezed == posts - ? _value.posts + ? _self.posts : posts // ignore: cast_nullable_to_non_nullable as dynamic, )); @@ -1524,8 +1213,8 @@ class __$$SnPostCategoryImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnPostCategoryImpl implements _SnPostCategory { - const _$SnPostCategoryImpl( +class _SnPostTag implements SnPostTag { + const _SnPostTag( {required this.id, required this.createdAt, required this.updatedAt, @@ -1534,9 +1223,8 @@ class _$SnPostCategoryImpl implements _SnPostCategory { required this.name, required this.description, required this.posts}); - - factory _$SnPostCategoryImpl.fromJson(Map json) => - _$$SnPostCategoryImplFromJson(json); + factory _SnPostTag.fromJson(Map json) => + _$SnPostTagFromJson(json); @override final int id; @@ -1555,16 +1243,26 @@ class _$SnPostCategoryImpl implements _SnPostCategory { @override final dynamic posts; + /// Create a copy of SnPostTag + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnPostCategory(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, posts: $posts)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPostTagCopyWith<_SnPostTag> get copyWith => + __$SnPostTagCopyWithImpl<_SnPostTag>(this, _$identity); + + @override + Map toJson() { + return _$SnPostTagToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPostCategoryImpl && + other is _SnPostTag && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -1591,89 +1289,435 @@ class _$SnPostCategoryImpl implements _SnPostCategory { description, const DeepCollectionEquality().hash(posts)); - /// Create a copy of SnPostCategory - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPostCategoryImplCopyWith<_$SnPostCategoryImpl> get copyWith => - __$$SnPostCategoryImplCopyWithImpl<_$SnPostCategoryImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnPostCategoryImplToJson( - this, - ); + String toString() { + return 'SnPostTag(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, posts: $posts)'; } } -abstract class _SnPostCategory implements SnPostCategory { - const factory _SnPostCategory( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final dynamic deletedAt, - required final String alias, - required final String name, - required final String description, - required final dynamic posts}) = _$SnPostCategoryImpl; - - factory _SnPostCategory.fromJson(Map json) = - _$SnPostCategoryImpl.fromJson; - +/// @nodoc +abstract mixin class _$SnPostTagCopyWith<$Res> + implements $SnPostTagCopyWith<$Res> { + factory _$SnPostTagCopyWith( + _SnPostTag value, $Res Function(_SnPostTag) _then) = + __$SnPostTagCopyWithImpl; @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String alias, + String name, + String description, + dynamic posts}); +} + +/// @nodoc +class __$SnPostTagCopyWithImpl<$Res> implements _$SnPostTagCopyWith<$Res> { + __$SnPostTagCopyWithImpl(this._self, this._then); + + final _SnPostTag _self; + final $Res Function(_SnPostTag) _then; + + /// Create a copy of SnPostTag + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? posts = freezed, + }) { + return _then(_SnPostTag( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + posts: freezed == posts + ? _self.posts + : posts // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } +} + +/// @nodoc +mixin _$SnPostCategory { int get id; - @override DateTime get createdAt; - @override DateTime get updatedAt; - @override dynamic get deletedAt; - @override String get alias; - @override String get name; - @override String get description; - @override dynamic get posts; /// Create a copy of SnPostCategory /// with the given fields replaced by the non-null parameter values. - @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPostCategoryImplCopyWith<_$SnPostCategoryImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $SnPostCategoryCopyWith get copyWith => + _$SnPostCategoryCopyWithImpl( + this as SnPostCategory, _$identity); + + /// Serializes this SnPostCategory to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPostCategory && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.posts, posts)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + alias, + name, + description, + const DeepCollectionEquality().hash(posts)); + + @override + String toString() { + return 'SnPostCategory(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, posts: $posts)'; + } } -SnPostPreload _$SnPostPreloadFromJson(Map json) { - return _SnPostPreload.fromJson(json); +/// @nodoc +abstract mixin class $SnPostCategoryCopyWith<$Res> { + factory $SnPostCategoryCopyWith( + SnPostCategory value, $Res Function(SnPostCategory) _then) = + _$SnPostCategoryCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String alias, + String name, + String description, + dynamic posts}); +} + +/// @nodoc +class _$SnPostCategoryCopyWithImpl<$Res> + implements $SnPostCategoryCopyWith<$Res> { + _$SnPostCategoryCopyWithImpl(this._self, this._then); + + final SnPostCategory _self; + final $Res Function(SnPostCategory) _then; + + /// Create a copy of SnPostCategory + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? posts = freezed, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + posts: freezed == posts + ? _self.posts + : posts // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnPostCategory implements SnPostCategory { + const _SnPostCategory( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.alias, + required this.name, + required this.description, + required this.posts}); + factory _SnPostCategory.fromJson(Map json) => + _$SnPostCategoryFromJson(json); + + @override + final int id; + @override + final DateTime createdAt; + @override + final DateTime updatedAt; + @override + final dynamic deletedAt; + @override + final String alias; + @override + final String name; + @override + final String description; + @override + final dynamic posts; + + /// Create a copy of SnPostCategory + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPostCategoryCopyWith<_SnPostCategory> get copyWith => + __$SnPostCategoryCopyWithImpl<_SnPostCategory>(this, _$identity); + + @override + Map toJson() { + return _$SnPostCategoryToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnPostCategory && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + const DeepCollectionEquality().equals(other.deletedAt, deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.posts, posts)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + const DeepCollectionEquality().hash(deletedAt), + alias, + name, + description, + const DeepCollectionEquality().hash(posts)); + + @override + String toString() { + return 'SnPostCategory(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, posts: $posts)'; + } +} + +/// @nodoc +abstract mixin class _$SnPostCategoryCopyWith<$Res> + implements $SnPostCategoryCopyWith<$Res> { + factory _$SnPostCategoryCopyWith( + _SnPostCategory value, $Res Function(_SnPostCategory) _then) = + __$SnPostCategoryCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + dynamic deletedAt, + String alias, + String name, + String description, + dynamic posts}); +} + +/// @nodoc +class __$SnPostCategoryCopyWithImpl<$Res> + implements _$SnPostCategoryCopyWith<$Res> { + __$SnPostCategoryCopyWithImpl(this._self, this._then); + + final _SnPostCategory _self; + final $Res Function(_SnPostCategory) _then; + + /// Create a copy of SnPostCategory + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? posts = freezed, + }) { + return _then(_SnPostCategory( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as dynamic, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + posts: freezed == posts + ? _self.posts + : posts // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } } /// @nodoc mixin _$SnPostPreload { - SnAttachment? get thumbnail => throw _privateConstructorUsedError; - List? get attachments => throw _privateConstructorUsedError; - SnAttachment? get video => throw _privateConstructorUsedError; - SnPoll? get poll => throw _privateConstructorUsedError; - SnRealm? get realm => throw _privateConstructorUsedError; - - /// Serializes this SnPostPreload to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + SnAttachment? get thumbnail; + List? get attachments; + SnAttachment? get video; + SnPoll? get poll; + SnRealm? get realm; /// Create a copy of SnPostPreload /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnPostPreloadCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnPostPreloadCopyWithImpl( + this as SnPostPreload, _$identity); + + /// Serializes this SnPostPreload to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnPostPreload && + (identical(other.thumbnail, thumbnail) || + other.thumbnail == thumbnail) && + const DeepCollectionEquality() + .equals(other.attachments, attachments) && + (identical(other.video, video) || other.video == video) && + (identical(other.poll, poll) || other.poll == poll) && + (identical(other.realm, realm) || other.realm == realm)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, thumbnail, + const DeepCollectionEquality().hash(attachments), video, poll, realm); + + @override + String toString() { + return 'SnPostPreload(thumbnail: $thumbnail, attachments: $attachments, video: $video, poll: $poll, realm: $realm)'; + } } /// @nodoc -abstract class $SnPostPreloadCopyWith<$Res> { +abstract mixin class $SnPostPreloadCopyWith<$Res> { factory $SnPostPreloadCopyWith( - SnPostPreload value, $Res Function(SnPostPreload) then) = - _$SnPostPreloadCopyWithImpl<$Res, SnPostPreload>; + SnPostPreload value, $Res Function(SnPostPreload) _then) = + _$SnPostPreloadCopyWithImpl; @useResult $Res call( {SnAttachment? thumbnail, @@ -1689,14 +1733,12 @@ abstract class $SnPostPreloadCopyWith<$Res> { } /// @nodoc -class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> +class _$SnPostPreloadCopyWithImpl<$Res> implements $SnPostPreloadCopyWith<$Res> { - _$SnPostPreloadCopyWithImpl(this._value, this._then); + _$SnPostPreloadCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnPostPreload _self; + final $Res Function(SnPostPreload) _then; /// Create a copy of SnPostPreload /// with the given fields replaced by the non-null parameter values. @@ -1709,28 +1751,28 @@ class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> Object? poll = freezed, Object? realm = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( thumbnail: freezed == thumbnail - ? _value.thumbnail + ? _self.thumbnail : thumbnail // ignore: cast_nullable_to_non_nullable as SnAttachment?, attachments: freezed == attachments - ? _value.attachments + ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, video: freezed == video - ? _value.video + ? _self.video : video // ignore: cast_nullable_to_non_nullable as SnAttachment?, poll: freezed == poll - ? _value.poll + ? _self.poll : poll // ignore: cast_nullable_to_non_nullable as SnPoll?, realm: freezed == realm - ? _value.realm + ? _self.realm : realm // ignore: cast_nullable_to_non_nullable as SnRealm?, - ) as $Val); + )); } /// Create a copy of SnPostPreload @@ -1738,12 +1780,12 @@ class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res>? get thumbnail { - if (_value.thumbnail == null) { + if (_self.thumbnail == null) { return null; } - return $SnAttachmentCopyWith<$Res>(_value.thumbnail!, (value) { - return _then(_value.copyWith(thumbnail: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.thumbnail!, (value) { + return _then(_self.copyWith(thumbnail: value)); }); } @@ -1752,12 +1794,12 @@ class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> @override @pragma('vm:prefer-inline') $SnAttachmentCopyWith<$Res>? get video { - if (_value.video == null) { + if (_self.video == null) { return null; } - return $SnAttachmentCopyWith<$Res>(_value.video!, (value) { - return _then(_value.copyWith(video: value) as $Val); + return $SnAttachmentCopyWith<$Res>(_self.video!, (value) { + return _then(_self.copyWith(video: value)); }); } @@ -1766,12 +1808,12 @@ class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> @override @pragma('vm:prefer-inline') $SnPollCopyWith<$Res>? get poll { - if (_value.poll == null) { + if (_self.poll == null) { return null; } - return $SnPollCopyWith<$Res>(_value.poll!, (value) { - return _then(_value.copyWith(poll: value) as $Val); + return $SnPollCopyWith<$Res>(_self.poll!, (value) { + return _then(_self.copyWith(poll: value)); }); } @@ -1780,98 +1822,28 @@ class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload> @override @pragma('vm:prefer-inline') $SnRealmCopyWith<$Res>? get realm { - if (_value.realm == null) { + if (_self.realm == null) { return null; } - return $SnRealmCopyWith<$Res>(_value.realm!, (value) { - return _then(_value.copyWith(realm: value) as $Val); + return $SnRealmCopyWith<$Res>(_self.realm!, (value) { + return _then(_self.copyWith(realm: value)); }); } } -/// @nodoc -abstract class _$$SnPostPreloadImplCopyWith<$Res> - implements $SnPostPreloadCopyWith<$Res> { - factory _$$SnPostPreloadImplCopyWith( - _$SnPostPreloadImpl value, $Res Function(_$SnPostPreloadImpl) then) = - __$$SnPostPreloadImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {SnAttachment? thumbnail, - List? attachments, - SnAttachment? video, - SnPoll? poll, - SnRealm? realm}); - - @override - $SnAttachmentCopyWith<$Res>? get thumbnail; - @override - $SnAttachmentCopyWith<$Res>? get video; - @override - $SnPollCopyWith<$Res>? get poll; - @override - $SnRealmCopyWith<$Res>? get realm; -} - -/// @nodoc -class __$$SnPostPreloadImplCopyWithImpl<$Res> - extends _$SnPostPreloadCopyWithImpl<$Res, _$SnPostPreloadImpl> - implements _$$SnPostPreloadImplCopyWith<$Res> { - __$$SnPostPreloadImplCopyWithImpl( - _$SnPostPreloadImpl _value, $Res Function(_$SnPostPreloadImpl) _then) - : super(_value, _then); - - /// Create a copy of SnPostPreload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? thumbnail = freezed, - Object? attachments = freezed, - Object? video = freezed, - Object? poll = freezed, - Object? realm = freezed, - }) { - return _then(_$SnPostPreloadImpl( - thumbnail: freezed == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as SnAttachment?, - attachments: freezed == attachments - ? _value._attachments - : attachments // ignore: cast_nullable_to_non_nullable - as List?, - video: freezed == video - ? _value.video - : video // ignore: cast_nullable_to_non_nullable - as SnAttachment?, - poll: freezed == poll - ? _value.poll - : poll // ignore: cast_nullable_to_non_nullable - as SnPoll?, - realm: freezed == realm - ? _value.realm - : realm // ignore: cast_nullable_to_non_nullable - as SnRealm?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnPostPreloadImpl implements _SnPostPreload { - const _$SnPostPreloadImpl( +class _SnPostPreload implements SnPostPreload { + const _SnPostPreload( {required this.thumbnail, required final List? attachments, required this.video, required this.poll, required this.realm}) : _attachments = attachments; - - factory _$SnPostPreloadImpl.fromJson(Map json) => - _$$SnPostPreloadImplFromJson(json); + factory _SnPostPreload.fromJson(Map json) => + _$SnPostPreloadFromJson(json); @override final SnAttachment? thumbnail; @@ -1892,16 +1864,26 @@ class _$SnPostPreloadImpl implements _SnPostPreload { @override final SnRealm? realm; + /// Create a copy of SnPostPreload + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnPostPreload(thumbnail: $thumbnail, attachments: $attachments, video: $video, poll: $poll, realm: $realm)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPostPreloadCopyWith<_SnPostPreload> get copyWith => + __$SnPostPreloadCopyWithImpl<_SnPostPreload>(this, _$identity); + + @override + Map toJson() { + return _$SnPostPreloadToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPostPreloadImpl && + other is _SnPostPreload && (identical(other.thumbnail, thumbnail) || other.thumbnail == thumbnail) && const DeepCollectionEquality() @@ -1916,138 +1898,188 @@ class _$SnPostPreloadImpl implements _SnPostPreload { int get hashCode => Object.hash(runtimeType, thumbnail, const DeepCollectionEquality().hash(_attachments), video, poll, realm); - /// Create a copy of SnPostPreload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPostPreloadImplCopyWith<_$SnPostPreloadImpl> get copyWith => - __$$SnPostPreloadImplCopyWithImpl<_$SnPostPreloadImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPostPreloadImplToJson( - this, - ); + String toString() { + return 'SnPostPreload(thumbnail: $thumbnail, attachments: $attachments, video: $video, poll: $poll, realm: $realm)'; } } -abstract class _SnPostPreload implements SnPostPreload { - const factory _SnPostPreload( - {required final SnAttachment? thumbnail, - required final List? attachments, - required final SnAttachment? video, - required final SnPoll? poll, - required final SnRealm? realm}) = _$SnPostPreloadImpl; - - factory _SnPostPreload.fromJson(Map json) = - _$SnPostPreloadImpl.fromJson; +/// @nodoc +abstract mixin class _$SnPostPreloadCopyWith<$Res> + implements $SnPostPreloadCopyWith<$Res> { + factory _$SnPostPreloadCopyWith( + _SnPostPreload value, $Res Function(_SnPostPreload) _then) = + __$SnPostPreloadCopyWithImpl; + @override + @useResult + $Res call( + {SnAttachment? thumbnail, + List? attachments, + SnAttachment? video, + SnPoll? poll, + SnRealm? realm}); @override - SnAttachment? get thumbnail; + $SnAttachmentCopyWith<$Res>? get thumbnail; @override - List? get attachments; + $SnAttachmentCopyWith<$Res>? get video; @override - SnAttachment? get video; + $SnPollCopyWith<$Res>? get poll; @override - SnPoll? get poll; - @override - SnRealm? get realm; + $SnRealmCopyWith<$Res>? get realm; +} + +/// @nodoc +class __$SnPostPreloadCopyWithImpl<$Res> + implements _$SnPostPreloadCopyWith<$Res> { + __$SnPostPreloadCopyWithImpl(this._self, this._then); + + final _SnPostPreload _self; + final $Res Function(_SnPostPreload) _then; /// Create a copy of SnPostPreload /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPostPreloadImplCopyWith<_$SnPostPreloadImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? thumbnail = freezed, + Object? attachments = freezed, + Object? video = freezed, + Object? poll = freezed, + Object? realm = freezed, + }) { + return _then(_SnPostPreload( + thumbnail: freezed == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as SnAttachment?, + attachments: freezed == attachments + ? _self._attachments + : attachments // ignore: cast_nullable_to_non_nullable + as List?, + video: freezed == video + ? _self.video + : video // ignore: cast_nullable_to_non_nullable + as SnAttachment?, + poll: freezed == poll + ? _self.poll + : poll // ignore: cast_nullable_to_non_nullable + as SnPoll?, + realm: freezed == realm + ? _self.realm + : realm // ignore: cast_nullable_to_non_nullable + as SnRealm?, + )); + } -SnBody _$SnBodyFromJson(Map json) { - return _SnBody.fromJson(json); + /// Create a copy of SnPostPreload + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res>? get thumbnail { + if (_self.thumbnail == null) { + return null; + } + + return $SnAttachmentCopyWith<$Res>(_self.thumbnail!, (value) { + return _then(_self.copyWith(thumbnail: value)); + }); + } + + /// Create a copy of SnPostPreload + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAttachmentCopyWith<$Res>? get video { + if (_self.video == null) { + return null; + } + + return $SnAttachmentCopyWith<$Res>(_self.video!, (value) { + return _then(_self.copyWith(video: value)); + }); + } + + /// Create a copy of SnPostPreload + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnPollCopyWith<$Res>? get poll { + if (_self.poll == null) { + return null; + } + + return $SnPollCopyWith<$Res>(_self.poll!, (value) { + return _then(_self.copyWith(poll: value)); + }); + } + + /// Create a copy of SnPostPreload + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnRealmCopyWith<$Res>? get realm { + if (_self.realm == null) { + return null; + } + + return $SnRealmCopyWith<$Res>(_self.realm!, (value) { + return _then(_self.copyWith(realm: value)); + }); + } } /// @nodoc mixin _$SnBody { - List get attachments => throw _privateConstructorUsedError; - String get content => throw _privateConstructorUsedError; - dynamic get location => throw _privateConstructorUsedError; - dynamic get thumbnail => throw _privateConstructorUsedError; - dynamic get title => throw _privateConstructorUsedError; - - /// Serializes this SnBody to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + List get attachments; + String get content; + dynamic get location; + dynamic get thumbnail; + dynamic get title; /// Create a copy of SnBody /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnBodyCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnBodyCopyWith<$Res> { - factory $SnBodyCopyWith(SnBody value, $Res Function(SnBody) then) = - _$SnBodyCopyWithImpl<$Res, SnBody>; - @useResult - $Res call( - {List attachments, - String content, - dynamic location, - dynamic thumbnail, - dynamic title}); -} - -/// @nodoc -class _$SnBodyCopyWithImpl<$Res, $Val extends SnBody> - implements $SnBodyCopyWith<$Res> { - _$SnBodyCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnBody - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnBodyCopyWith get copyWith => + _$SnBodyCopyWithImpl(this as SnBody, _$identity); + + /// Serializes this SnBody to a JSON map. + Map toJson(); + @override - $Res call({ - Object? attachments = null, - Object? content = null, - Object? location = freezed, - Object? thumbnail = freezed, - Object? title = freezed, - }) { - return _then(_value.copyWith( - attachments: null == attachments - ? _value.attachments - : attachments // ignore: cast_nullable_to_non_nullable - as List, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - location: freezed == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as dynamic, - thumbnail: freezed == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as dynamic, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnBody && + const DeepCollectionEquality() + .equals(other.attachments, attachments) && + (identical(other.content, content) || other.content == content) && + const DeepCollectionEquality().equals(other.location, location) && + const DeepCollectionEquality().equals(other.thumbnail, thumbnail) && + const DeepCollectionEquality().equals(other.title, title)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(attachments), + content, + const DeepCollectionEquality().hash(location), + const DeepCollectionEquality().hash(thumbnail), + const DeepCollectionEquality().hash(title)); + + @override + String toString() { + return 'SnBody(attachments: $attachments, content: $content, location: $location, thumbnail: $thumbnail, title: $title)'; } } /// @nodoc -abstract class _$$SnBodyImplCopyWith<$Res> implements $SnBodyCopyWith<$Res> { - factory _$$SnBodyImplCopyWith( - _$SnBodyImpl value, $Res Function(_$SnBodyImpl) then) = - __$$SnBodyImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnBodyCopyWith<$Res> { + factory $SnBodyCopyWith(SnBody value, $Res Function(SnBody) _then) = + _$SnBodyCopyWithImpl; @useResult $Res call( {List attachments, @@ -2058,12 +2090,11 @@ abstract class _$$SnBodyImplCopyWith<$Res> implements $SnBodyCopyWith<$Res> { } /// @nodoc -class __$$SnBodyImplCopyWithImpl<$Res> - extends _$SnBodyCopyWithImpl<$Res, _$SnBodyImpl> - implements _$$SnBodyImplCopyWith<$Res> { - __$$SnBodyImplCopyWithImpl( - _$SnBodyImpl _value, $Res Function(_$SnBodyImpl) _then) - : super(_value, _then); +class _$SnBodyCopyWithImpl<$Res> implements $SnBodyCopyWith<$Res> { + _$SnBodyCopyWithImpl(this._self, this._then); + + final SnBody _self; + final $Res Function(SnBody) _then; /// Create a copy of SnBody /// with the given fields replaced by the non-null parameter values. @@ -2076,25 +2107,25 @@ class __$$SnBodyImplCopyWithImpl<$Res> Object? thumbnail = freezed, Object? title = freezed, }) { - return _then(_$SnBodyImpl( + return _then(_self.copyWith( attachments: null == attachments - ? _value._attachments + ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List, content: null == content - ? _value.content + ? _self.content : content // ignore: cast_nullable_to_non_nullable as String, location: freezed == location - ? _value.location + ? _self.location : location // ignore: cast_nullable_to_non_nullable as dynamic, thumbnail: freezed == thumbnail - ? _value.thumbnail + ? _self.thumbnail : thumbnail // ignore: cast_nullable_to_non_nullable as dynamic, title: freezed == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as dynamic, )); @@ -2103,17 +2134,15 @@ class __$$SnBodyImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnBodyImpl implements _SnBody { - const _$SnBodyImpl( +class _SnBody implements SnBody { + const _SnBody( {required final List attachments, required this.content, required this.location, required this.thumbnail, required this.title}) : _attachments = attachments; - - factory _$SnBodyImpl.fromJson(Map json) => - _$$SnBodyImplFromJson(json); + factory _SnBody.fromJson(Map json) => _$SnBodyFromJson(json); final List _attachments; @override @@ -2132,16 +2161,26 @@ class _$SnBodyImpl implements _SnBody { @override final dynamic title; + /// Create a copy of SnBody + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnBody(attachments: $attachments, content: $content, location: $location, thumbnail: $thumbnail, title: $title)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnBodyCopyWith<_SnBody> get copyWith => + __$SnBodyCopyWithImpl<_SnBody>(this, _$identity); + + @override + Map toJson() { + return _$SnBodyToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnBodyImpl && + other is _SnBody && const DeepCollectionEquality() .equals(other._attachments, _attachments) && (identical(other.content, content) || other.content == content) && @@ -2160,133 +2199,123 @@ class _$SnBodyImpl implements _SnBody { const DeepCollectionEquality().hash(thumbnail), const DeepCollectionEquality().hash(title)); - /// Create a copy of SnBody - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnBodyImplCopyWith<_$SnBodyImpl> get copyWith => - __$$SnBodyImplCopyWithImpl<_$SnBodyImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnBodyImplToJson( - this, - ); + String toString() { + return 'SnBody(attachments: $attachments, content: $content, location: $location, thumbnail: $thumbnail, title: $title)'; } } -abstract class _SnBody implements SnBody { - const factory _SnBody( - {required final List attachments, - required final String content, - required final dynamic location, - required final dynamic thumbnail, - required final dynamic title}) = _$SnBodyImpl; +/// @nodoc +abstract mixin class _$SnBodyCopyWith<$Res> implements $SnBodyCopyWith<$Res> { + factory _$SnBodyCopyWith(_SnBody value, $Res Function(_SnBody) _then) = + __$SnBodyCopyWithImpl; + @override + @useResult + $Res call( + {List attachments, + String content, + dynamic location, + dynamic thumbnail, + dynamic title}); +} - factory _SnBody.fromJson(Map json) = _$SnBodyImpl.fromJson; +/// @nodoc +class __$SnBodyCopyWithImpl<$Res> implements _$SnBodyCopyWith<$Res> { + __$SnBodyCopyWithImpl(this._self, this._then); - @override - List get attachments; - @override - String get content; - @override - dynamic get location; - @override - dynamic get thumbnail; - @override - dynamic get title; + final _SnBody _self; + final $Res Function(_SnBody) _then; /// Create a copy of SnBody /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnBodyImplCopyWith<_$SnBodyImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnMetric _$SnMetricFromJson(Map json) { - return _SnMetric.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? attachments = null, + Object? content = null, + Object? location = freezed, + Object? thumbnail = freezed, + Object? title = freezed, + }) { + return _then(_SnBody( + attachments: null == attachments + ? _self._attachments + : attachments // ignore: cast_nullable_to_non_nullable + as List, + content: null == content + ? _self.content + : content // ignore: cast_nullable_to_non_nullable + as String, + location: freezed == location + ? _self.location + : location // ignore: cast_nullable_to_non_nullable + as dynamic, + thumbnail: freezed == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as dynamic, + title: freezed == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } } /// @nodoc mixin _$SnMetric { - int get replyCount => throw _privateConstructorUsedError; - int get reactionCount => throw _privateConstructorUsedError; - Map get reactionList => throw _privateConstructorUsedError; - - /// Serializes this SnMetric to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get replyCount; + int get reactionCount; + Map get reactionList; /// Create a copy of SnMetric /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnMetricCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnMetricCopyWith<$Res> { - factory $SnMetricCopyWith(SnMetric value, $Res Function(SnMetric) then) = - _$SnMetricCopyWithImpl<$Res, SnMetric>; - @useResult - $Res call({int replyCount, int reactionCount, Map reactionList}); -} - -/// @nodoc -class _$SnMetricCopyWithImpl<$Res, $Val extends SnMetric> - implements $SnMetricCopyWith<$Res> { - _$SnMetricCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnMetric - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnMetricCopyWith get copyWith => + _$SnMetricCopyWithImpl(this as SnMetric, _$identity); + + /// Serializes this SnMetric to a JSON map. + Map toJson(); + @override - $Res call({ - Object? replyCount = null, - Object? reactionCount = null, - Object? reactionList = null, - }) { - return _then(_value.copyWith( - replyCount: null == replyCount - ? _value.replyCount - : replyCount // ignore: cast_nullable_to_non_nullable - as int, - reactionCount: null == reactionCount - ? _value.reactionCount - : reactionCount // ignore: cast_nullable_to_non_nullable - as int, - reactionList: null == reactionList - ? _value.reactionList - : reactionList // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnMetric && + (identical(other.replyCount, replyCount) || + other.replyCount == replyCount) && + (identical(other.reactionCount, reactionCount) || + other.reactionCount == reactionCount) && + const DeepCollectionEquality() + .equals(other.reactionList, reactionList)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, replyCount, reactionCount, + const DeepCollectionEquality().hash(reactionList)); + + @override + String toString() { + return 'SnMetric(replyCount: $replyCount, reactionCount: $reactionCount, reactionList: $reactionList)'; } } /// @nodoc -abstract class _$$SnMetricImplCopyWith<$Res> - implements $SnMetricCopyWith<$Res> { - factory _$$SnMetricImplCopyWith( - _$SnMetricImpl value, $Res Function(_$SnMetricImpl) then) = - __$$SnMetricImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnMetricCopyWith<$Res> { + factory $SnMetricCopyWith(SnMetric value, $Res Function(SnMetric) _then) = + _$SnMetricCopyWithImpl; @useResult $Res call({int replyCount, int reactionCount, Map reactionList}); } /// @nodoc -class __$$SnMetricImplCopyWithImpl<$Res> - extends _$SnMetricCopyWithImpl<$Res, _$SnMetricImpl> - implements _$$SnMetricImplCopyWith<$Res> { - __$$SnMetricImplCopyWithImpl( - _$SnMetricImpl _value, $Res Function(_$SnMetricImpl) _then) - : super(_value, _then); +class _$SnMetricCopyWithImpl<$Res> implements $SnMetricCopyWith<$Res> { + _$SnMetricCopyWithImpl(this._self, this._then); + + final SnMetric _self; + final $Res Function(SnMetric) _then; /// Create a copy of SnMetric /// with the given fields replaced by the non-null parameter values. @@ -2297,17 +2326,17 @@ class __$$SnMetricImplCopyWithImpl<$Res> Object? reactionCount = null, Object? reactionList = null, }) { - return _then(_$SnMetricImpl( + return _then(_self.copyWith( replyCount: null == replyCount - ? _value.replyCount + ? _self.replyCount : replyCount // ignore: cast_nullable_to_non_nullable as int, reactionCount: null == reactionCount - ? _value.reactionCount + ? _self.reactionCount : reactionCount // ignore: cast_nullable_to_non_nullable as int, reactionList: null == reactionList - ? _value._reactionList + ? _self.reactionList : reactionList // ignore: cast_nullable_to_non_nullable as Map, )); @@ -2316,15 +2345,14 @@ class __$$SnMetricImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnMetricImpl implements _SnMetric { - const _$SnMetricImpl( +class _SnMetric implements SnMetric { + const _SnMetric( {required this.replyCount, required this.reactionCount, final Map reactionList = const {}}) : _reactionList = reactionList; - - factory _$SnMetricImpl.fromJson(Map json) => - _$$SnMetricImplFromJson(json); + factory _SnMetric.fromJson(Map json) => + _$SnMetricFromJson(json); @override final int replyCount; @@ -2339,16 +2367,26 @@ class _$SnMetricImpl implements _SnMetric { return EqualUnmodifiableMapView(_reactionList); } + /// Create a copy of SnMetric + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnMetric(replyCount: $replyCount, reactionCount: $reactionCount, reactionList: $reactionList)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnMetricCopyWith<_SnMetric> get copyWith => + __$SnMetricCopyWithImpl<_SnMetric>(this, _$identity); + + @override + Map toJson() { + return _$SnMetricToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnMetricImpl && + other is _SnMetric && (identical(other.replyCount, replyCount) || other.replyCount == replyCount) && (identical(other.reactionCount, reactionCount) || @@ -2362,366 +2400,87 @@ class _$SnMetricImpl implements _SnMetric { int get hashCode => Object.hash(runtimeType, replyCount, reactionCount, const DeepCollectionEquality().hash(_reactionList)); - /// Create a copy of SnMetric - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnMetricImplCopyWith<_$SnMetricImpl> get copyWith => - __$$SnMetricImplCopyWithImpl<_$SnMetricImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnMetricImplToJson( - this, - ); - } -} - -abstract class _SnMetric implements SnMetric { - const factory _SnMetric( - {required final int replyCount, - required final int reactionCount, - final Map reactionList}) = _$SnMetricImpl; - - factory _SnMetric.fromJson(Map json) = - _$SnMetricImpl.fromJson; - - @override - int get replyCount; - @override - int get reactionCount; - @override - Map get reactionList; - - /// Create a copy of SnMetric - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnMetricImplCopyWith<_$SnMetricImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnPublisher _$SnPublisherFromJson(Map json) { - return _SnPublisher.fromJson(json); -} - -/// @nodoc -mixin _$SnPublisher { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get type => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get nick => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get avatar => throw _privateConstructorUsedError; - String get banner => throw _privateConstructorUsedError; - int get totalUpvote => throw _privateConstructorUsedError; - int get totalDownvote => throw _privateConstructorUsedError; - int? get realmId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnPublisher to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnPublisher - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnPublisherCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnPublisherCopyWith<$Res> { - factory $SnPublisherCopyWith( - SnPublisher value, $Res Function(SnPublisher) then) = - _$SnPublisherCopyWithImpl<$Res, SnPublisher>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int type, - String name, - String nick, - String description, - String avatar, - String banner, - int totalUpvote, - int totalDownvote, - int? realmId, - int accountId}); -} - -/// @nodoc -class _$SnPublisherCopyWithImpl<$Res, $Val extends SnPublisher> - implements $SnPublisherCopyWith<$Res> { - _$SnPublisherCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnPublisher - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? type = null, - Object? name = null, - Object? nick = null, - Object? description = null, - Object? avatar = null, - Object? banner = null, - Object? totalUpvote = null, - Object? totalDownvote = null, - Object? realmId = freezed, - Object? accountId = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - nick: null == nick - ? _value.nick - : nick // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - avatar: null == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String, - banner: null == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String, - totalUpvote: null == totalUpvote - ? _value.totalUpvote - : totalUpvote // ignore: cast_nullable_to_non_nullable - as int, - totalDownvote: null == totalDownvote - ? _value.totalDownvote - : totalDownvote // ignore: cast_nullable_to_non_nullable - as int, - realmId: freezed == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + String toString() { + return 'SnMetric(replyCount: $replyCount, reactionCount: $reactionCount, reactionList: $reactionList)'; } } /// @nodoc -abstract class _$$SnPublisherImplCopyWith<$Res> - implements $SnPublisherCopyWith<$Res> { - factory _$$SnPublisherImplCopyWith( - _$SnPublisherImpl value, $Res Function(_$SnPublisherImpl) then) = - __$$SnPublisherImplCopyWithImpl<$Res>; +abstract mixin class _$SnMetricCopyWith<$Res> + implements $SnMetricCopyWith<$Res> { + factory _$SnMetricCopyWith(_SnMetric value, $Res Function(_SnMetric) _then) = + __$SnMetricCopyWithImpl; @override @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int type, - String name, - String nick, - String description, - String avatar, - String banner, - int totalUpvote, - int totalDownvote, - int? realmId, - int accountId}); + $Res call({int replyCount, int reactionCount, Map reactionList}); } /// @nodoc -class __$$SnPublisherImplCopyWithImpl<$Res> - extends _$SnPublisherCopyWithImpl<$Res, _$SnPublisherImpl> - implements _$$SnPublisherImplCopyWith<$Res> { - __$$SnPublisherImplCopyWithImpl( - _$SnPublisherImpl _value, $Res Function(_$SnPublisherImpl) _then) - : super(_value, _then); +class __$SnMetricCopyWithImpl<$Res> implements _$SnMetricCopyWith<$Res> { + __$SnMetricCopyWithImpl(this._self, this._then); - /// Create a copy of SnPublisher + final _SnMetric _self; + final $Res Function(_SnMetric) _then; + + /// Create a copy of SnMetric /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override + @pragma('vm:prefer-inline') $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? type = null, - Object? name = null, - Object? nick = null, - Object? description = null, - Object? avatar = null, - Object? banner = null, - Object? totalUpvote = null, - Object? totalDownvote = null, - Object? realmId = freezed, - Object? accountId = null, + Object? replyCount = null, + Object? reactionCount = null, + Object? reactionList = null, }) { - return _then(_$SnPublisherImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable + return _then(_SnMetric( + replyCount: null == replyCount + ? _self.replyCount + : replyCount // ignore: cast_nullable_to_non_nullable as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - nick: null == nick - ? _value.nick - : nick // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - avatar: null == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String, - banner: null == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String, - totalUpvote: null == totalUpvote - ? _value.totalUpvote - : totalUpvote // ignore: cast_nullable_to_non_nullable - as int, - totalDownvote: null == totalDownvote - ? _value.totalDownvote - : totalDownvote // ignore: cast_nullable_to_non_nullable - as int, - realmId: freezed == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable + reactionCount: null == reactionCount + ? _self.reactionCount + : reactionCount // ignore: cast_nullable_to_non_nullable as int, + reactionList: null == reactionList + ? _self._reactionList + : reactionList // ignore: cast_nullable_to_non_nullable + as Map, )); } } /// @nodoc -@JsonSerializable() -class _$SnPublisherImpl implements _SnPublisher { - const _$SnPublisherImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.type, - required this.name, - required this.nick, - required this.description, - required this.avatar, - required this.banner, - required this.totalUpvote, - required this.totalDownvote, - required this.realmId, - required this.accountId}); +mixin _$SnPublisher { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get type; + String get name; + String get nick; + String get description; + String get avatar; + String get banner; + int get totalUpvote; + int get totalDownvote; + int? get realmId; + int get accountId; - factory _$SnPublisherImpl.fromJson(Map json) => - _$$SnPublisherImplFromJson(json); + /// Create a copy of SnPublisher + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnPublisherCopyWith get copyWith => + _$SnPublisherCopyWithImpl(this as SnPublisher, _$identity); - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final int type; - @override - final String name; - @override - final String nick; - @override - final String description; - @override - final String avatar; - @override - final String banner; - @override - final int totalUpvote; - @override - final int totalDownvote; - @override - final int? realmId; - @override - final int accountId; - - @override - String toString() { - return 'SnPublisher(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, name: $name, nick: $nick, description: $description, avatar: $avatar, banner: $banner, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, realmId: $realmId, accountId: $accountId)'; - } + /// Serializes this SnPublisher to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnPublisherImpl && + other is SnPublisher && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -2764,128 +2523,43 @@ class _$SnPublisherImpl implements _SnPublisher { realmId, accountId); - /// Create a copy of SnPublisher - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnPublisherImplCopyWith<_$SnPublisherImpl> get copyWith => - __$$SnPublisherImplCopyWithImpl<_$SnPublisherImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnPublisherImplToJson( - this, - ); + String toString() { + return 'SnPublisher(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, name: $name, nick: $nick, description: $description, avatar: $avatar, banner: $banner, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, realmId: $realmId, accountId: $accountId)'; } } -abstract class _SnPublisher implements SnPublisher { - const factory _SnPublisher( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int type, - required final String name, - required final String nick, - required final String description, - required final String avatar, - required final String banner, - required final int totalUpvote, - required final int totalDownvote, - required final int? realmId, - required final int accountId}) = _$SnPublisherImpl; - - factory _SnPublisher.fromJson(Map json) = - _$SnPublisherImpl.fromJson; - - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - int get type; - @override - String get name; - @override - String get nick; - @override - String get description; - @override - String get avatar; - @override - String get banner; - @override - int get totalUpvote; - @override - int get totalDownvote; - @override - int? get realmId; - @override - int get accountId; - - /// Create a copy of SnPublisher - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnPublisherImplCopyWith<_$SnPublisherImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnSubscription _$SnSubscriptionFromJson(Map json) { - return _SnSubscription.fromJson(json); -} - /// @nodoc -mixin _$SnSubscription { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get followerId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnSubscription to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of SnSubscription - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnSubscriptionCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnSubscriptionCopyWith<$Res> { - factory $SnSubscriptionCopyWith( - SnSubscription value, $Res Function(SnSubscription) then) = - _$SnSubscriptionCopyWithImpl<$Res, SnSubscription>; +abstract mixin class $SnPublisherCopyWith<$Res> { + factory $SnPublisherCopyWith( + SnPublisher value, $Res Function(SnPublisher) _then) = + _$SnPublisherCopyWithImpl; @useResult $Res call( {int id, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, - int followerId, + int type, + String name, + String nick, + String description, + String avatar, + String banner, + int totalUpvote, + int totalDownvote, + int? realmId, int accountId}); } /// @nodoc -class _$SnSubscriptionCopyWithImpl<$Res, $Val extends SnSubscription> - implements $SnSubscriptionCopyWith<$Res> { - _$SnSubscriptionCopyWithImpl(this._value, this._then); +class _$SnPublisherCopyWithImpl<$Res> implements $SnPublisherCopyWith<$Res> { + _$SnPublisherCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnPublisher _self; + final $Res Function(SnPublisher) _then; - /// Create a copy of SnSubscription + /// Create a copy of SnPublisher /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -2894,98 +2568,72 @@ class _$SnSubscriptionCopyWithImpl<$Res, $Val extends SnSubscription> Object? createdAt = null, Object? updatedAt = null, Object? deletedAt = freezed, - Object? followerId = null, + Object? type = null, + Object? name = null, + Object? nick = null, + Object? description = null, + Object? avatar = null, + Object? banner = null, + Object? totalUpvote = null, + Object? totalDownvote = null, + Object? realmId = freezed, Object? accountId = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, - followerId: null == followerId - ? _value.followerId - : followerId // ignore: cast_nullable_to_non_nullable + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable as int, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + nick: null == nick + ? _self.nick + : nick // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + avatar: null == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String, + banner: null == banner + ? _self.banner + : banner // ignore: cast_nullable_to_non_nullable + as String, + totalUpvote: null == totalUpvote + ? _self.totalUpvote + : totalUpvote // ignore: cast_nullable_to_non_nullable + as int, + totalDownvote: null == totalDownvote + ? _self.totalDownvote + : totalDownvote // ignore: cast_nullable_to_non_nullable + as int, + realmId: freezed == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int?, accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnSubscriptionImplCopyWith<$Res> - implements $SnSubscriptionCopyWith<$Res> { - factory _$$SnSubscriptionImplCopyWith(_$SnSubscriptionImpl value, - $Res Function(_$SnSubscriptionImpl) then) = - __$$SnSubscriptionImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int followerId, - int accountId}); -} - -/// @nodoc -class __$$SnSubscriptionImplCopyWithImpl<$Res> - extends _$SnSubscriptionCopyWithImpl<$Res, _$SnSubscriptionImpl> - implements _$$SnSubscriptionImplCopyWith<$Res> { - __$$SnSubscriptionImplCopyWithImpl( - _$SnSubscriptionImpl _value, $Res Function(_$SnSubscriptionImpl) _then) - : super(_value, _then); - - /// Create a copy of SnSubscription - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? followerId = null, - Object? accountId = null, - }) { - return _then(_$SnSubscriptionImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - followerId: null == followerId - ? _value.followerId - : followerId // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, )); @@ -2994,17 +2642,24 @@ class __$$SnSubscriptionImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnSubscriptionImpl implements _SnSubscription { - const _$SnSubscriptionImpl( +class _SnPublisher implements SnPublisher { + const _SnPublisher( {required this.id, required this.createdAt, required this.updatedAt, required this.deletedAt, - required this.followerId, + required this.type, + required this.name, + required this.nick, + required this.description, + required this.avatar, + required this.banner, + required this.totalUpvote, + required this.totalDownvote, + required this.realmId, required this.accountId}); - - factory _$SnSubscriptionImpl.fromJson(Map json) => - _$$SnSubscriptionImplFromJson(json); + factory _SnPublisher.fromJson(Map json) => + _$SnPublisherFromJson(json); @override final int id; @@ -3015,20 +2670,232 @@ class _$SnSubscriptionImpl implements _SnSubscription { @override final DateTime? deletedAt; @override - final int followerId; + final int type; + @override + final String name; + @override + final String nick; + @override + final String description; + @override + final String avatar; + @override + final String banner; + @override + final int totalUpvote; + @override + final int totalDownvote; + @override + final int? realmId; @override final int accountId; + /// Create a copy of SnPublisher + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnSubscription(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, followerId: $followerId, accountId: $accountId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnPublisherCopyWith<_SnPublisher> get copyWith => + __$SnPublisherCopyWithImpl<_SnPublisher>(this, _$identity); + + @override + Map toJson() { + return _$SnPublisherToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnSubscriptionImpl && + other is _SnPublisher && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.type, type) || other.type == type) && + (identical(other.name, name) || other.name == name) && + (identical(other.nick, nick) || other.nick == nick) && + (identical(other.description, description) || + other.description == description) && + (identical(other.avatar, avatar) || other.avatar == avatar) && + (identical(other.banner, banner) || other.banner == banner) && + (identical(other.totalUpvote, totalUpvote) || + other.totalUpvote == totalUpvote) && + (identical(other.totalDownvote, totalDownvote) || + other.totalDownvote == totalDownvote) && + (identical(other.realmId, realmId) || other.realmId == realmId) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + type, + name, + nick, + description, + avatar, + banner, + totalUpvote, + totalDownvote, + realmId, + accountId); + + @override + String toString() { + return 'SnPublisher(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, type: $type, name: $name, nick: $nick, description: $description, avatar: $avatar, banner: $banner, totalUpvote: $totalUpvote, totalDownvote: $totalDownvote, realmId: $realmId, accountId: $accountId)'; + } +} + +/// @nodoc +abstract mixin class _$SnPublisherCopyWith<$Res> + implements $SnPublisherCopyWith<$Res> { + factory _$SnPublisherCopyWith( + _SnPublisher value, $Res Function(_SnPublisher) _then) = + __$SnPublisherCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int type, + String name, + String nick, + String description, + String avatar, + String banner, + int totalUpvote, + int totalDownvote, + int? realmId, + int accountId}); +} + +/// @nodoc +class __$SnPublisherCopyWithImpl<$Res> implements _$SnPublisherCopyWith<$Res> { + __$SnPublisherCopyWithImpl(this._self, this._then); + + final _SnPublisher _self; + final $Res Function(_SnPublisher) _then; + + /// Create a copy of SnPublisher + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? type = null, + Object? name = null, + Object? nick = null, + Object? description = null, + Object? avatar = null, + Object? banner = null, + Object? totalUpvote = null, + Object? totalDownvote = null, + Object? realmId = freezed, + Object? accountId = null, + }) { + return _then(_SnPublisher( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as int, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + nick: null == nick + ? _self.nick + : nick // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + avatar: null == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String, + banner: null == banner + ? _self.banner + : banner // ignore: cast_nullable_to_non_nullable + as String, + totalUpvote: null == totalUpvote + ? _self.totalUpvote + : totalUpvote // ignore: cast_nullable_to_non_nullable + as int, + totalDownvote: null == totalDownvote + ? _self.totalDownvote + : totalDownvote // ignore: cast_nullable_to_non_nullable + as int, + realmId: freezed == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +mixin _$SnSubscription { + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get followerId; + int get accountId; + + /// Create a copy of SnSubscription + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $SnSubscriptionCopyWith get copyWith => + _$SnSubscriptionCopyWithImpl( + this as SnSubscription, _$identity); + + /// Serializes this SnSubscription to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnSubscription && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -3047,52 +2914,210 @@ class _$SnSubscriptionImpl implements _SnSubscription { int get hashCode => Object.hash( runtimeType, id, createdAt, updatedAt, deletedAt, followerId, accountId); - /// Create a copy of SnSubscription - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnSubscriptionImplCopyWith<_$SnSubscriptionImpl> get copyWith => - __$$SnSubscriptionImplCopyWithImpl<_$SnSubscriptionImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$SnSubscriptionImplToJson( - this, - ); + String toString() { + return 'SnSubscription(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, followerId: $followerId, accountId: $accountId)'; } } -abstract class _SnSubscription implements SnSubscription { - const factory _SnSubscription( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int followerId, - required final int accountId}) = _$SnSubscriptionImpl; +/// @nodoc +abstract mixin class $SnSubscriptionCopyWith<$Res> { + factory $SnSubscriptionCopyWith( + SnSubscription value, $Res Function(SnSubscription) _then) = + _$SnSubscriptionCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int followerId, + int accountId}); +} - factory _SnSubscription.fromJson(Map json) = - _$SnSubscriptionImpl.fromJson; +/// @nodoc +class _$SnSubscriptionCopyWithImpl<$Res> + implements $SnSubscriptionCopyWith<$Res> { + _$SnSubscriptionCopyWithImpl(this._self, this._then); + + final SnSubscription _self; + final $Res Function(SnSubscription) _then; + + /// Create a copy of SnSubscription + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? followerId = null, + Object? accountId = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + followerId: null == followerId + ? _self.followerId + : followerId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnSubscription implements SnSubscription { + const _SnSubscription( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.followerId, + required this.accountId}); + factory _SnSubscription.fromJson(Map json) => + _$SnSubscriptionFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - int get followerId; + final int followerId; @override - int get accountId; + final int accountId; /// Create a copy of SnSubscription /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnSubscriptionImplCopyWith<_$SnSubscriptionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnSubscriptionCopyWith<_SnSubscription> get copyWith => + __$SnSubscriptionCopyWithImpl<_SnSubscription>(this, _$identity); + + @override + Map toJson() { + return _$SnSubscriptionToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnSubscription && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.followerId, followerId) || + other.followerId == followerId) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, id, createdAt, updatedAt, deletedAt, followerId, accountId); + + @override + String toString() { + return 'SnSubscription(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, followerId: $followerId, accountId: $accountId)'; + } } + +/// @nodoc +abstract mixin class _$SnSubscriptionCopyWith<$Res> + implements $SnSubscriptionCopyWith<$Res> { + factory _$SnSubscriptionCopyWith( + _SnSubscription value, $Res Function(_SnSubscription) _then) = + __$SnSubscriptionCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int followerId, + int accountId}); +} + +/// @nodoc +class __$SnSubscriptionCopyWithImpl<$Res> + implements _$SnSubscriptionCopyWith<$Res> { + __$SnSubscriptionCopyWithImpl(this._self, this._then); + + final _SnSubscription _self; + final $Res Function(_SnSubscription) _then; + + /// Create a copy of SnSubscription + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? followerId = null, + Object? accountId = null, + }) { + return _then(_SnSubscription( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + followerId: null == followerId + ? _self.followerId + : followerId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +// dart format on diff --git a/lib/types/post.g.dart b/lib/types/post.g.dart index c48bbc9..15026bb 100644 --- a/lib/types/post.g.dart +++ b/lib/types/post.g.dart @@ -6,7 +6,7 @@ part of 'post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnPostImpl _$$SnPostImplFromJson(Map json) => _$SnPostImpl( +_SnPost _$SnPostFromJson(Map json) => _SnPost( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -76,8 +76,7 @@ _$SnPostImpl _$$SnPostImplFromJson(Map json) => _$SnPostImpl( : SnPostPreload.fromJson(json['preload'] as Map), ); -Map _$$SnPostImplToJson(_$SnPostImpl instance) => - { +Map _$SnPostToJson(_SnPost instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), @@ -115,8 +114,7 @@ Map _$$SnPostImplToJson(_$SnPostImpl instance) => 'preload': instance.preload?.toJson(), }; -_$SnPostTagImpl _$$SnPostTagImplFromJson(Map json) => - _$SnPostTagImpl( +_SnPostTag _$SnPostTagFromJson(Map json) => _SnPostTag( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -127,7 +125,7 @@ _$SnPostTagImpl _$$SnPostTagImplFromJson(Map json) => posts: json['posts'], ); -Map _$$SnPostTagImplToJson(_$SnPostTagImpl instance) => +Map _$SnPostTagToJson(_SnPostTag instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -139,8 +137,8 @@ Map _$$SnPostTagImplToJson(_$SnPostTagImpl instance) => 'posts': instance.posts, }; -_$SnPostCategoryImpl _$$SnPostCategoryImplFromJson(Map json) => - _$SnPostCategoryImpl( +_SnPostCategory _$SnPostCategoryFromJson(Map json) => + _SnPostCategory( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -151,8 +149,7 @@ _$SnPostCategoryImpl _$$SnPostCategoryImplFromJson(Map json) => posts: json['posts'], ); -Map _$$SnPostCategoryImplToJson( - _$SnPostCategoryImpl instance) => +Map _$SnPostCategoryToJson(_SnPostCategory instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -164,8 +161,8 @@ Map _$$SnPostCategoryImplToJson( 'posts': instance.posts, }; -_$SnPostPreloadImpl _$$SnPostPreloadImplFromJson(Map json) => - _$SnPostPreloadImpl( +_SnPostPreload _$SnPostPreloadFromJson(Map json) => + _SnPostPreload( thumbnail: json['thumbnail'] == null ? null : SnAttachment.fromJson(json['thumbnail'] as Map), @@ -185,7 +182,7 @@ _$SnPostPreloadImpl _$$SnPostPreloadImplFromJson(Map json) => : SnRealm.fromJson(json['realm'] as Map), ); -Map _$$SnPostPreloadImplToJson(_$SnPostPreloadImpl instance) => +Map _$SnPostPreloadToJson(_SnPostPreload instance) => { 'thumbnail': instance.thumbnail?.toJson(), 'attachments': instance.attachments?.map((e) => e?.toJson()).toList(), @@ -194,7 +191,7 @@ Map _$$SnPostPreloadImplToJson(_$SnPostPreloadImpl instance) => 'realm': instance.realm?.toJson(), }; -_$SnBodyImpl _$$SnBodyImplFromJson(Map json) => _$SnBodyImpl( +_SnBody _$SnBodyFromJson(Map json) => _SnBody( attachments: (json['attachments'] as List) .map((e) => e as String) .toList(), @@ -204,8 +201,7 @@ _$SnBodyImpl _$$SnBodyImplFromJson(Map json) => _$SnBodyImpl( title: json['title'], ); -Map _$$SnBodyImplToJson(_$SnBodyImpl instance) => - { +Map _$SnBodyToJson(_SnBody instance) => { 'attachments': instance.attachments, 'content': instance.content, 'location': instance.location, @@ -213,8 +209,7 @@ Map _$$SnBodyImplToJson(_$SnBodyImpl instance) => 'title': instance.title, }; -_$SnMetricImpl _$$SnMetricImplFromJson(Map json) => - _$SnMetricImpl( +_SnMetric _$SnMetricFromJson(Map json) => _SnMetric( replyCount: (json['reply_count'] as num).toInt(), reactionCount: (json['reaction_count'] as num).toInt(), reactionList: (json['reaction_list'] as Map?)?.map( @@ -223,15 +218,13 @@ _$SnMetricImpl _$$SnMetricImplFromJson(Map json) => const {}, ); -Map _$$SnMetricImplToJson(_$SnMetricImpl instance) => - { +Map _$SnMetricToJson(_SnMetric instance) => { 'reply_count': instance.replyCount, 'reaction_count': instance.reactionCount, 'reaction_list': instance.reactionList, }; -_$SnPublisherImpl _$$SnPublisherImplFromJson(Map json) => - _$SnPublisherImpl( +_SnPublisher _$SnPublisherFromJson(Map json) => _SnPublisher( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -250,7 +243,7 @@ _$SnPublisherImpl _$$SnPublisherImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnPublisherImplToJson(_$SnPublisherImpl instance) => +Map _$SnPublisherToJson(_SnPublisher instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -268,8 +261,8 @@ Map _$$SnPublisherImplToJson(_$SnPublisherImpl instance) => 'account_id': instance.accountId, }; -_$SnSubscriptionImpl _$$SnSubscriptionImplFromJson(Map json) => - _$SnSubscriptionImpl( +_SnSubscription _$SnSubscriptionFromJson(Map json) => + _SnSubscription( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -280,8 +273,7 @@ _$SnSubscriptionImpl _$$SnSubscriptionImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnSubscriptionImplToJson( - _$SnSubscriptionImpl instance) => +Map _$SnSubscriptionToJson(_SnSubscription instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/realm.dart b/lib/types/realm.dart index c1ac6cd..00dd7e4 100644 --- a/lib/types/realm.dart +++ b/lib/types/realm.dart @@ -5,7 +5,7 @@ part 'realm.freezed.dart'; part 'realm.g.dart'; @freezed -class SnRealmMember with _$SnRealmMember { +abstract class SnRealmMember with _$SnRealmMember { const factory SnRealmMember({ required int id, required DateTime createdAt, @@ -23,7 +23,7 @@ class SnRealmMember with _$SnRealmMember { } @freezed -class SnRealm with _$SnRealm { +abstract class SnRealm with _$SnRealm { const SnRealm._(); const factory SnRealm({ diff --git a/lib/types/realm.freezed.dart b/lib/types/realm.freezed.dart index 153a1cf..36d480a 100644 --- a/lib/types/realm.freezed.dart +++ b/lib/types/realm.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,279 +10,37 @@ part of 'realm.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnRealmMember _$SnRealmMemberFromJson(Map json) { - return _SnRealmMember.fromJson(json); -} - /// @nodoc mixin _$SnRealmMember { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - int get realmId => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - SnRealm get realm => throw _privateConstructorUsedError; - SnAccount get account => throw _privateConstructorUsedError; - int get powerLevel => throw _privateConstructorUsedError; - - /// Serializes this SnRealmMember to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + int get realmId; + int get accountId; + SnRealm get realm; + SnAccount get account; + int get powerLevel; /// Create a copy of SnRealmMember /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnRealmMemberCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnRealmMemberCopyWithImpl( + this as SnRealmMember, _$identity); -/// @nodoc -abstract class $SnRealmMemberCopyWith<$Res> { - factory $SnRealmMemberCopyWith( - SnRealmMember value, $Res Function(SnRealmMember) then) = - _$SnRealmMemberCopyWithImpl<$Res, SnRealmMember>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int realmId, - int accountId, - SnRealm realm, - SnAccount account, - int powerLevel}); - - $SnRealmCopyWith<$Res> get realm; - $SnAccountCopyWith<$Res> get account; -} - -/// @nodoc -class _$SnRealmMemberCopyWithImpl<$Res, $Val extends SnRealmMember> - implements $SnRealmMemberCopyWith<$Res> { - _$SnRealmMemberCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnRealmMember - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? realmId = null, - Object? accountId = null, - Object? realm = null, - Object? account = null, - Object? powerLevel = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - realmId: null == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - realm: null == realm - ? _value.realm - : realm // ignore: cast_nullable_to_non_nullable - as SnRealm, - account: null == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as SnAccount, - powerLevel: null == powerLevel - ? _value.powerLevel - : powerLevel // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } - - /// Create a copy of SnRealmMember - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnRealmCopyWith<$Res> get realm { - return $SnRealmCopyWith<$Res>(_value.realm, (value) { - return _then(_value.copyWith(realm: value) as $Val); - }); - } - - /// Create a copy of SnRealmMember - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SnAccountCopyWith<$Res> get account { - return $SnAccountCopyWith<$Res>(_value.account, (value) { - return _then(_value.copyWith(account: value) as $Val); - }); - } -} - -/// @nodoc -abstract class _$$SnRealmMemberImplCopyWith<$Res> - implements $SnRealmMemberCopyWith<$Res> { - factory _$$SnRealmMemberImplCopyWith( - _$SnRealmMemberImpl value, $Res Function(_$SnRealmMemberImpl) then) = - __$$SnRealmMemberImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - int realmId, - int accountId, - SnRealm realm, - SnAccount account, - int powerLevel}); - - @override - $SnRealmCopyWith<$Res> get realm; - @override - $SnAccountCopyWith<$Res> get account; -} - -/// @nodoc -class __$$SnRealmMemberImplCopyWithImpl<$Res> - extends _$SnRealmMemberCopyWithImpl<$Res, _$SnRealmMemberImpl> - implements _$$SnRealmMemberImplCopyWith<$Res> { - __$$SnRealmMemberImplCopyWithImpl( - _$SnRealmMemberImpl _value, $Res Function(_$SnRealmMemberImpl) _then) - : super(_value, _then); - - /// Create a copy of SnRealmMember - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? realmId = null, - Object? accountId = null, - Object? realm = null, - Object? account = null, - Object? powerLevel = null, - }) { - return _then(_$SnRealmMemberImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - realmId: null == realmId - ? _value.realmId - : realmId // ignore: cast_nullable_to_non_nullable - as int, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - realm: null == realm - ? _value.realm - : realm // ignore: cast_nullable_to_non_nullable - as SnRealm, - account: null == account - ? _value.account - : account // ignore: cast_nullable_to_non_nullable - as SnAccount, - powerLevel: null == powerLevel - ? _value.powerLevel - : powerLevel // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnRealmMemberImpl implements _SnRealmMember { - const _$SnRealmMemberImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.realmId, - required this.accountId, - required this.realm, - required this.account, - required this.powerLevel}); - - factory _$SnRealmMemberImpl.fromJson(Map json) => - _$$SnRealmMemberImplFromJson(json); - - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final int realmId; - @override - final int accountId; - @override - final SnRealm realm; - @override - final SnAccount account; - @override - final int powerLevel; - - @override - String toString() { - return 'SnRealmMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, accountId: $accountId, realm: $realm, account: $account, powerLevel: $powerLevel)'; - } + /// Serializes this SnRealmMember to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnRealmMemberImpl && + other is SnRealmMember && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -303,220 +62,397 @@ class _$SnRealmMemberImpl implements _SnRealmMember { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, realmId, accountId, realm, account, powerLevel); - /// Create a copy of SnRealmMember - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnRealmMemberImplCopyWith<_$SnRealmMemberImpl> get copyWith => - __$$SnRealmMemberImplCopyWithImpl<_$SnRealmMemberImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnRealmMemberImplToJson( - this, - ); + String toString() { + return 'SnRealmMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, accountId: $accountId, realm: $realm, account: $account, powerLevel: $powerLevel)'; } } -abstract class _SnRealmMember implements SnRealmMember { - const factory _SnRealmMember( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final int realmId, - required final int accountId, - required final SnRealm realm, - required final SnAccount account, - required final int powerLevel}) = _$SnRealmMemberImpl; +/// @nodoc +abstract mixin class $SnRealmMemberCopyWith<$Res> { + factory $SnRealmMemberCopyWith( + SnRealmMember value, $Res Function(SnRealmMember) _then) = + _$SnRealmMemberCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int realmId, + int accountId, + SnRealm realm, + SnAccount account, + int powerLevel}); - factory _SnRealmMember.fromJson(Map json) = - _$SnRealmMemberImpl.fromJson; + $SnRealmCopyWith<$Res> get realm; + $SnAccountCopyWith<$Res> get account; +} + +/// @nodoc +class _$SnRealmMemberCopyWithImpl<$Res> + implements $SnRealmMemberCopyWith<$Res> { + _$SnRealmMemberCopyWithImpl(this._self, this._then); + + final SnRealmMember _self; + final $Res Function(SnRealmMember) _then; + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? realmId = null, + Object? accountId = null, + Object? realm = null, + Object? account = null, + Object? powerLevel = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + realmId: null == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + realm: null == realm + ? _self.realm + : realm // ignore: cast_nullable_to_non_nullable + as SnRealm, + account: null == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as SnAccount, + powerLevel: null == powerLevel + ? _self.powerLevel + : powerLevel // ignore: cast_nullable_to_non_nullable + as int, + )); + } + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnRealmCopyWith<$Res> get realm { + return $SnRealmCopyWith<$Res>(_self.realm, (value) { + return _then(_self.copyWith(realm: value)); + }); + } + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res> get account { + return $SnAccountCopyWith<$Res>(_self.account, (value) { + return _then(_self.copyWith(account: value)); + }); + } +} + +/// @nodoc +@JsonSerializable() +class _SnRealmMember implements SnRealmMember { + const _SnRealmMember( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.realmId, + required this.accountId, + required this.realm, + required this.account, + required this.powerLevel}); + factory _SnRealmMember.fromJson(Map json) => + _$SnRealmMemberFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - int get realmId; + final int realmId; @override - int get accountId; + final int accountId; @override - SnRealm get realm; + final SnRealm realm; @override - SnAccount get account; + final SnAccount account; @override - int get powerLevel; + final int powerLevel; /// Create a copy of SnRealmMember /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnRealmMemberImplCopyWith<_$SnRealmMemberImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnRealmMemberCopyWith<_SnRealmMember> get copyWith => + __$SnRealmMemberCopyWithImpl<_SnRealmMember>(this, _$identity); + + @override + Map toJson() { + return _$SnRealmMemberToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnRealmMember && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.realmId, realmId) || other.realmId == realmId) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.realm, realm) || other.realm == realm) && + (identical(other.account, account) || other.account == account) && + (identical(other.powerLevel, powerLevel) || + other.powerLevel == powerLevel)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, realmId, accountId, realm, account, powerLevel); + + @override + String toString() { + return 'SnRealmMember(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, accountId: $accountId, realm: $realm, account: $account, powerLevel: $powerLevel)'; + } } -SnRealm _$SnRealmFromJson(Map json) { - return _SnRealm.fromJson(json); +/// @nodoc +abstract mixin class _$SnRealmMemberCopyWith<$Res> + implements $SnRealmMemberCopyWith<$Res> { + factory _$SnRealmMemberCopyWith( + _SnRealmMember value, $Res Function(_SnRealmMember) _then) = + __$SnRealmMemberCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + int realmId, + int accountId, + SnRealm realm, + SnAccount account, + int powerLevel}); + + @override + $SnRealmCopyWith<$Res> get realm; + @override + $SnAccountCopyWith<$Res> get account; +} + +/// @nodoc +class __$SnRealmMemberCopyWithImpl<$Res> + implements _$SnRealmMemberCopyWith<$Res> { + __$SnRealmMemberCopyWithImpl(this._self, this._then); + + final _SnRealmMember _self; + final $Res Function(_SnRealmMember) _then; + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? realmId = null, + Object? accountId = null, + Object? realm = null, + Object? account = null, + Object? powerLevel = null, + }) { + return _then(_SnRealmMember( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + realmId: null == realmId + ? _self.realmId + : realmId // ignore: cast_nullable_to_non_nullable + as int, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + realm: null == realm + ? _self.realm + : realm // ignore: cast_nullable_to_non_nullable + as SnRealm, + account: null == account + ? _self.account + : account // ignore: cast_nullable_to_non_nullable + as SnAccount, + powerLevel: null == powerLevel + ? _self.powerLevel + : powerLevel // ignore: cast_nullable_to_non_nullable + as int, + )); + } + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnRealmCopyWith<$Res> get realm { + return $SnRealmCopyWith<$Res>(_self.realm, (value) { + return _then(_self.copyWith(realm: value)); + }); + } + + /// Create a copy of SnRealmMember + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnAccountCopyWith<$Res> get account { + return $SnAccountCopyWith<$Res>(_self.account, (value) { + return _then(_self.copyWith(account: value)); + }); + } } /// @nodoc mixin _$SnRealm { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get alias => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - List? get members => throw _privateConstructorUsedError; - String? get avatar => throw _privateConstructorUsedError; - String? get banner => throw _privateConstructorUsedError; - Map? get accessPolicy => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - bool get isPublic => throw _privateConstructorUsedError; - bool get isCommunity => throw _privateConstructorUsedError; - int get popularity => throw _privateConstructorUsedError; - - /// Serializes this SnRealm to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get alias; + String get name; + String get description; + List? get members; + String? get avatar; + String? get banner; + Map? get accessPolicy; + int get accountId; + bool get isPublic; + bool get isCommunity; + int get popularity; /// Create a copy of SnRealm /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SnRealmCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnRealmCopyWith<$Res> { - factory $SnRealmCopyWith(SnRealm value, $Res Function(SnRealm) then) = - _$SnRealmCopyWithImpl<$Res, SnRealm>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String alias, - String name, - String description, - List? members, - String? avatar, - String? banner, - Map? accessPolicy, - int accountId, - bool isPublic, - bool isCommunity, - int popularity}); -} - -/// @nodoc -class _$SnRealmCopyWithImpl<$Res, $Val extends SnRealm> - implements $SnRealmCopyWith<$Res> { - _$SnRealmCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnRealm - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SnRealmCopyWith get copyWith => + _$SnRealmCopyWithImpl(this as SnRealm, _$identity); + + /// Serializes this SnRealm to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? alias = null, - Object? name = null, - Object? description = null, - Object? members = freezed, - Object? avatar = freezed, - Object? banner = freezed, - Object? accessPolicy = freezed, - Object? accountId = null, - Object? isPublic = null, - Object? isCommunity = null, - Object? popularity = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - alias: null == alias - ? _value.alias - : alias // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - members: freezed == members - ? _value.members - : members // ignore: cast_nullable_to_non_nullable - as List?, - avatar: freezed == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - accessPolicy: freezed == accessPolicy - ? _value.accessPolicy - : accessPolicy // ignore: cast_nullable_to_non_nullable - as Map?, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - isPublic: null == isPublic - ? _value.isPublic - : isPublic // ignore: cast_nullable_to_non_nullable - as bool, - isCommunity: null == isCommunity - ? _value.isCommunity - : isCommunity // ignore: cast_nullable_to_non_nullable - as bool, - popularity: null == popularity - ? _value.popularity - : popularity // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnRealm && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.alias, alias) || other.alias == alias) && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + const DeepCollectionEquality().equals(other.members, members) && + (identical(other.avatar, avatar) || other.avatar == avatar) && + (identical(other.banner, banner) || other.banner == banner) && + const DeepCollectionEquality() + .equals(other.accessPolicy, accessPolicy) && + (identical(other.accountId, accountId) || + other.accountId == accountId) && + (identical(other.isPublic, isPublic) || + other.isPublic == isPublic) && + (identical(other.isCommunity, isCommunity) || + other.isCommunity == isCommunity) && + (identical(other.popularity, popularity) || + other.popularity == popularity)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdAt, + updatedAt, + deletedAt, + alias, + name, + description, + const DeepCollectionEquality().hash(members), + avatar, + banner, + const DeepCollectionEquality().hash(accessPolicy), + accountId, + isPublic, + isCommunity, + popularity); + + @override + String toString() { + return 'SnRealm(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, avatar: $avatar, banner: $banner, accessPolicy: $accessPolicy, accountId: $accountId, isPublic: $isPublic, isCommunity: $isCommunity, popularity: $popularity)'; } } /// @nodoc -abstract class _$$SnRealmImplCopyWith<$Res> implements $SnRealmCopyWith<$Res> { - factory _$$SnRealmImplCopyWith( - _$SnRealmImpl value, $Res Function(_$SnRealmImpl) then) = - __$$SnRealmImplCopyWithImpl<$Res>; - @override +abstract mixin class $SnRealmCopyWith<$Res> { + factory $SnRealmCopyWith(SnRealm value, $Res Function(SnRealm) _then) = + _$SnRealmCopyWithImpl; @useResult $Res call( {int id, @@ -537,12 +473,11 @@ abstract class _$$SnRealmImplCopyWith<$Res> implements $SnRealmCopyWith<$Res> { } /// @nodoc -class __$$SnRealmImplCopyWithImpl<$Res> - extends _$SnRealmCopyWithImpl<$Res, _$SnRealmImpl> - implements _$$SnRealmImplCopyWith<$Res> { - __$$SnRealmImplCopyWithImpl( - _$SnRealmImpl _value, $Res Function(_$SnRealmImpl) _then) - : super(_value, _then); +class _$SnRealmCopyWithImpl<$Res> implements $SnRealmCopyWith<$Res> { + _$SnRealmCopyWithImpl(this._self, this._then); + + final SnRealm _self; + final $Res Function(SnRealm) _then; /// Create a copy of SnRealm /// with the given fields replaced by the non-null parameter values. @@ -565,65 +500,65 @@ class __$$SnRealmImplCopyWithImpl<$Res> Object? isCommunity = null, Object? popularity = null, }) { - return _then(_$SnRealmImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, alias: null == alias - ? _value.alias + ? _self.alias : alias // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, members: freezed == members - ? _value._members + ? _self.members : members // ignore: cast_nullable_to_non_nullable as List?, avatar: freezed == avatar - ? _value.avatar + ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String?, banner: freezed == banner - ? _value.banner + ? _self.banner : banner // ignore: cast_nullable_to_non_nullable as String?, accessPolicy: freezed == accessPolicy - ? _value._accessPolicy + ? _self.accessPolicy : accessPolicy // ignore: cast_nullable_to_non_nullable as Map?, accountId: null == accountId - ? _value.accountId + ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable as int, isPublic: null == isPublic - ? _value.isPublic + ? _self.isPublic : isPublic // ignore: cast_nullable_to_non_nullable as bool, isCommunity: null == isCommunity - ? _value.isCommunity + ? _self.isCommunity : isCommunity // ignore: cast_nullable_to_non_nullable as bool, popularity: null == popularity - ? _value.popularity + ? _self.popularity : popularity // ignore: cast_nullable_to_non_nullable as int, )); @@ -632,8 +567,8 @@ class __$$SnRealmImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$SnRealmImpl extends _SnRealm { - const _$SnRealmImpl( +class _SnRealm extends SnRealm { + const _SnRealm( {required this.id, required this.createdAt, required this.updatedAt, @@ -652,9 +587,8 @@ class _$SnRealmImpl extends _SnRealm { : _members = members, _accessPolicy = accessPolicy, super._(); - - factory _$SnRealmImpl.fromJson(Map json) => - _$$SnRealmImplFromJson(json); + factory _SnRealm.fromJson(Map json) => + _$SnRealmFromJson(json); @override final int id; @@ -704,16 +638,26 @@ class _$SnRealmImpl extends _SnRealm { @JsonKey() final int popularity; + /// Create a copy of SnRealm + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnRealm(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, avatar: $avatar, banner: $banner, accessPolicy: $accessPolicy, accountId: $accountId, isPublic: $isPublic, isCommunity: $isCommunity, popularity: $popularity)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnRealmCopyWith<_SnRealm> get copyWith => + __$SnRealmCopyWithImpl<_SnRealm>(this, _$identity); + + @override + Map toJson() { + return _$SnRealmToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnRealmImpl && + other is _SnRealm && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -760,78 +704,127 @@ class _$SnRealmImpl extends _SnRealm { isCommunity, popularity); - /// Create a copy of SnRealm - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnRealmImplCopyWith<_$SnRealmImpl> get copyWith => - __$$SnRealmImplCopyWithImpl<_$SnRealmImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnRealmImplToJson( - this, - ); + String toString() { + return 'SnRealm(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, alias: $alias, name: $name, description: $description, members: $members, avatar: $avatar, banner: $banner, accessPolicy: $accessPolicy, accountId: $accountId, isPublic: $isPublic, isCommunity: $isCommunity, popularity: $popularity)'; } } -abstract class _SnRealm extends SnRealm { - const factory _SnRealm( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String alias, - required final String name, - required final String description, - final List? members, - required final String? avatar, - required final String? banner, - required final Map? accessPolicy, - required final int accountId, - required final bool isPublic, - required final bool isCommunity, - final int popularity}) = _$SnRealmImpl; - const _SnRealm._() : super._(); +/// @nodoc +abstract mixin class _$SnRealmCopyWith<$Res> implements $SnRealmCopyWith<$Res> { + factory _$SnRealmCopyWith(_SnRealm value, $Res Function(_SnRealm) _then) = + __$SnRealmCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String alias, + String name, + String description, + List? members, + String? avatar, + String? banner, + Map? accessPolicy, + int accountId, + bool isPublic, + bool isCommunity, + int popularity}); +} - factory _SnRealm.fromJson(Map json) = _$SnRealmImpl.fromJson; +/// @nodoc +class __$SnRealmCopyWithImpl<$Res> implements _$SnRealmCopyWith<$Res> { + __$SnRealmCopyWithImpl(this._self, this._then); - @override - int get id; - @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get alias; - @override - String get name; - @override - String get description; - @override - List? get members; - @override - String? get avatar; - @override - String? get banner; - @override - Map? get accessPolicy; - @override - int get accountId; - @override - bool get isPublic; - @override - bool get isCommunity; - @override - int get popularity; + final _SnRealm _self; + final $Res Function(_SnRealm) _then; /// Create a copy of SnRealm /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnRealmImplCopyWith<_$SnRealmImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? alias = null, + Object? name = null, + Object? description = null, + Object? members = freezed, + Object? avatar = freezed, + Object? banner = freezed, + Object? accessPolicy = freezed, + Object? accountId = null, + Object? isPublic = null, + Object? isCommunity = null, + Object? popularity = null, + }) { + return _then(_SnRealm( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + alias: null == alias + ? _self.alias + : alias // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + members: freezed == members + ? _self._members + : members // ignore: cast_nullable_to_non_nullable + as List?, + avatar: freezed == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String?, + banner: freezed == banner + ? _self.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + accessPolicy: freezed == accessPolicy + ? _self._accessPolicy + : accessPolicy // ignore: cast_nullable_to_non_nullable + as Map?, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + isPublic: null == isPublic + ? _self.isPublic + : isPublic // ignore: cast_nullable_to_non_nullable + as bool, + isCommunity: null == isCommunity + ? _self.isCommunity + : isCommunity // ignore: cast_nullable_to_non_nullable + as bool, + popularity: null == popularity + ? _self.popularity + : popularity // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/lib/types/realm.g.dart b/lib/types/realm.g.dart index 055aee8..4960a34 100644 --- a/lib/types/realm.g.dart +++ b/lib/types/realm.g.dart @@ -6,8 +6,8 @@ part of 'realm.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnRealmMemberImpl _$$SnRealmMemberImplFromJson(Map json) => - _$SnRealmMemberImpl( +_SnRealmMember _$SnRealmMemberFromJson(Map json) => + _SnRealmMember( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -21,7 +21,7 @@ _$SnRealmMemberImpl _$$SnRealmMemberImplFromJson(Map json) => powerLevel: (json['power_level'] as num).toInt(), ); -Map _$$SnRealmMemberImplToJson(_$SnRealmMemberImpl instance) => +Map _$SnRealmMemberToJson(_SnRealmMember instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), @@ -34,8 +34,7 @@ Map _$$SnRealmMemberImplToJson(_$SnRealmMemberImpl instance) => 'power_level': instance.powerLevel, }; -_$SnRealmImpl _$$SnRealmImplFromJson(Map json) => - _$SnRealmImpl( +_SnRealm _$SnRealmFromJson(Map json) => _SnRealm( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -57,8 +56,7 @@ _$SnRealmImpl _$$SnRealmImplFromJson(Map json) => popularity: (json['popularity'] as num?)?.toInt() ?? 0, ); -Map _$$SnRealmImplToJson(_$SnRealmImpl instance) => - { +Map _$SnRealmToJson(_SnRealm instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), diff --git a/lib/types/wallet.dart b/lib/types/wallet.dart index 7f199c0..df0b732 100644 --- a/lib/types/wallet.dart +++ b/lib/types/wallet.dart @@ -4,7 +4,7 @@ part 'wallet.freezed.dart'; part 'wallet.g.dart'; @freezed -class SnWallet with _$SnWallet { +abstract class SnWallet with _$SnWallet { const factory SnWallet({ required int id, required DateTime createdAt, @@ -19,7 +19,7 @@ class SnWallet with _$SnWallet { } @freezed -class SnTransaction with _$SnTransaction { +abstract class SnTransaction with _$SnTransaction { const factory SnTransaction({ required int id, required DateTime createdAt, diff --git a/lib/types/wallet.freezed.dart b/lib/types/wallet.freezed.dart index 35413aa..1a5c9ff 100644 --- a/lib/types/wallet.freezed.dart +++ b/lib/types/wallet.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,218 +10,34 @@ part of 'wallet.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -SnWallet _$SnWalletFromJson(Map json) { - return _SnWallet.fromJson(json); -} - /// @nodoc mixin _$SnWallet { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get balance => throw _privateConstructorUsedError; - String get password => throw _privateConstructorUsedError; - int get accountId => throw _privateConstructorUsedError; - - /// Serializes this SnWallet to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get balance; + String get password; + int get accountId; /// Create a copy of SnWallet /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnWalletCopyWith get copyWith => - throw _privateConstructorUsedError; -} + _$SnWalletCopyWithImpl(this as SnWallet, _$identity); -/// @nodoc -abstract class $SnWalletCopyWith<$Res> { - factory $SnWalletCopyWith(SnWallet value, $Res Function(SnWallet) then) = - _$SnWalletCopyWithImpl<$Res, SnWallet>; - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String balance, - String password, - int accountId}); -} - -/// @nodoc -class _$SnWalletCopyWithImpl<$Res, $Val extends SnWallet> - implements $SnWalletCopyWith<$Res> { - _$SnWalletCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SnWallet - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? balance = null, - Object? password = null, - Object? accountId = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - balance: null == balance - ? _value.balance - : balance // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnWalletImplCopyWith<$Res> - implements $SnWalletCopyWith<$Res> { - factory _$$SnWalletImplCopyWith( - _$SnWalletImpl value, $Res Function(_$SnWalletImpl) then) = - __$$SnWalletImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String balance, - String password, - int accountId}); -} - -/// @nodoc -class __$$SnWalletImplCopyWithImpl<$Res> - extends _$SnWalletCopyWithImpl<$Res, _$SnWalletImpl> - implements _$$SnWalletImplCopyWith<$Res> { - __$$SnWalletImplCopyWithImpl( - _$SnWalletImpl _value, $Res Function(_$SnWalletImpl) _then) - : super(_value, _then); - - /// Create a copy of SnWallet - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? balance = null, - Object? password = null, - Object? accountId = null, - }) { - return _then(_$SnWalletImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - balance: null == balance - ? _value.balance - : balance // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnWalletImpl implements _SnWallet { - const _$SnWalletImpl( - {required this.id, - required this.createdAt, - required this.updatedAt, - required this.deletedAt, - required this.balance, - required this.password, - required this.accountId}); - - factory _$SnWalletImpl.fromJson(Map json) => - _$$SnWalletImplFromJson(json); - - @override - final int id; - @override - final DateTime createdAt; - @override - final DateTime updatedAt; - @override - final DateTime? deletedAt; - @override - final String balance; - @override - final String password; - @override - final int accountId; - - @override - String toString() { - return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)'; - } + /// Serializes this SnWallet to a JSON map. + Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnWalletImpl && + other is SnWallet && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -240,90 +57,284 @@ class _$SnWalletImpl implements _SnWallet { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, balance, password, accountId); - /// Create a copy of SnWallet - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnWalletImplCopyWith<_$SnWalletImpl> get copyWith => - __$$SnWalletImplCopyWithImpl<_$SnWalletImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnWalletImplToJson( - this, - ); + String toString() { + return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)'; } } -abstract class _SnWallet implements SnWallet { - const factory _SnWallet( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String balance, - required final String password, - required final int accountId}) = _$SnWalletImpl; +/// @nodoc +abstract mixin class $SnWalletCopyWith<$Res> { + factory $SnWalletCopyWith(SnWallet value, $Res Function(SnWallet) _then) = + _$SnWalletCopyWithImpl; + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String balance, + String password, + int accountId}); +} - factory _SnWallet.fromJson(Map json) = - _$SnWalletImpl.fromJson; +/// @nodoc +class _$SnWalletCopyWithImpl<$Res> implements $SnWalletCopyWith<$Res> { + _$SnWalletCopyWithImpl(this._self, this._then); + + final SnWallet _self; + final $Res Function(SnWallet) _then; + + /// Create a copy of SnWallet + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? balance = null, + Object? password = null, + Object? accountId = null, + }) { + return _then(_self.copyWith( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + balance: null == balance + ? _self.balance + : balance // ignore: cast_nullable_to_non_nullable + as String, + password: null == password + ? _self.password + : password // ignore: cast_nullable_to_non_nullable + as String, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _SnWallet implements SnWallet { + const _SnWallet( + {required this.id, + required this.createdAt, + required this.updatedAt, + required this.deletedAt, + required this.balance, + required this.password, + required this.accountId}); + factory _SnWallet.fromJson(Map json) => + _$SnWalletFromJson(json); @override - int get id; + final int id; @override - DateTime get createdAt; + final DateTime createdAt; @override - DateTime get updatedAt; + final DateTime updatedAt; @override - DateTime? get deletedAt; + final DateTime? deletedAt; @override - String get balance; + final String balance; @override - String get password; + final String password; @override - int get accountId; + final int accountId; /// Create a copy of SnWallet /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnWalletImplCopyWith<_$SnWalletImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + _$SnWalletCopyWith<_SnWallet> get copyWith => + __$SnWalletCopyWithImpl<_SnWallet>(this, _$identity); + + @override + Map toJson() { + return _$SnWalletToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _SnWallet && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.balance, balance) || other.balance == balance) && + (identical(other.password, password) || + other.password == password) && + (identical(other.accountId, accountId) || + other.accountId == accountId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, balance, password, accountId); + + @override + String toString() { + return 'SnWallet(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, balance: $balance, password: $password, accountId: $accountId)'; + } } -SnTransaction _$SnTransactionFromJson(Map json) { - return _SnTransaction.fromJson(json); +/// @nodoc +abstract mixin class _$SnWalletCopyWith<$Res> + implements $SnWalletCopyWith<$Res> { + factory _$SnWalletCopyWith(_SnWallet value, $Res Function(_SnWallet) _then) = + __$SnWalletCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String balance, + String password, + int accountId}); +} + +/// @nodoc +class __$SnWalletCopyWithImpl<$Res> implements _$SnWalletCopyWith<$Res> { + __$SnWalletCopyWithImpl(this._self, this._then); + + final _SnWallet _self; + final $Res Function(_SnWallet) _then; + + /// Create a copy of SnWallet + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? balance = null, + Object? password = null, + Object? accountId = null, + }) { + return _then(_SnWallet( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + balance: null == balance + ? _self.balance + : balance // ignore: cast_nullable_to_non_nullable + as String, + password: null == password + ? _self.password + : password // ignore: cast_nullable_to_non_nullable + as String, + accountId: null == accountId + ? _self.accountId + : accountId // ignore: cast_nullable_to_non_nullable + as int, + )); + } } /// @nodoc mixin _$SnTransaction { - int get id => throw _privateConstructorUsedError; - DateTime get createdAt => throw _privateConstructorUsedError; - DateTime get updatedAt => throw _privateConstructorUsedError; - DateTime? get deletedAt => throw _privateConstructorUsedError; - String get remark => throw _privateConstructorUsedError; - String get amount => throw _privateConstructorUsedError; - SnWallet? get payer => throw _privateConstructorUsedError; - SnWallet? get payee => throw _privateConstructorUsedError; - int? get payerId => throw _privateConstructorUsedError; - int? get payeeId => throw _privateConstructorUsedError; - - /// Serializes this SnTransaction to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get id; + DateTime get createdAt; + DateTime get updatedAt; + DateTime? get deletedAt; + String get remark; + String get amount; + SnWallet? get payer; + SnWallet? get payee; + int? get payerId; + int? get payeeId; /// Create a copy of SnTransaction /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $SnTransactionCopyWith get copyWith => - throw _privateConstructorUsedError; + _$SnTransactionCopyWithImpl( + this as SnTransaction, _$identity); + + /// Serializes this SnTransaction to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SnTransaction && + (identical(other.id, id) || other.id == id) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.remark, remark) || other.remark == remark) && + (identical(other.amount, amount) || other.amount == amount) && + (identical(other.payer, payer) || other.payer == payer) && + (identical(other.payee, payee) || other.payee == payee) && + (identical(other.payerId, payerId) || other.payerId == payerId) && + (identical(other.payeeId, payeeId) || other.payeeId == payeeId)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, + deletedAt, remark, amount, payer, payee, payerId, payeeId); + + @override + String toString() { + return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)'; + } } /// @nodoc -abstract class $SnTransactionCopyWith<$Res> { +abstract mixin class $SnTransactionCopyWith<$Res> { factory $SnTransactionCopyWith( - SnTransaction value, $Res Function(SnTransaction) then) = - _$SnTransactionCopyWithImpl<$Res, SnTransaction>; + SnTransaction value, $Res Function(SnTransaction) _then) = + _$SnTransactionCopyWithImpl; @useResult $Res call( {int id, @@ -342,14 +353,12 @@ abstract class $SnTransactionCopyWith<$Res> { } /// @nodoc -class _$SnTransactionCopyWithImpl<$Res, $Val extends SnTransaction> +class _$SnTransactionCopyWithImpl<$Res> implements $SnTransactionCopyWith<$Res> { - _$SnTransactionCopyWithImpl(this._value, this._then); + _$SnTransactionCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SnTransaction _self; + final $Res Function(SnTransaction) _then; /// Create a copy of SnTransaction /// with the given fields replaced by the non-null parameter values. @@ -367,48 +376,48 @@ class _$SnTransactionCopyWithImpl<$Res, $Val extends SnTransaction> Object? payerId = freezed, Object? payeeId = freezed, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, deletedAt: freezed == deletedAt - ? _value.deletedAt + ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, remark: null == remark - ? _value.remark + ? _self.remark : remark // ignore: cast_nullable_to_non_nullable as String, amount: null == amount - ? _value.amount + ? _self.amount : amount // ignore: cast_nullable_to_non_nullable as String, payer: freezed == payer - ? _value.payer + ? _self.payer : payer // ignore: cast_nullable_to_non_nullable as SnWallet?, payee: freezed == payee - ? _value.payee + ? _self.payee : payee // ignore: cast_nullable_to_non_nullable as SnWallet?, payerId: freezed == payerId - ? _value.payerId + ? _self.payerId : payerId // ignore: cast_nullable_to_non_nullable as int?, payeeId: freezed == payeeId - ? _value.payeeId + ? _self.payeeId : payeeId // ignore: cast_nullable_to_non_nullable as int?, - ) as $Val); + )); } /// Create a copy of SnTransaction @@ -416,12 +425,12 @@ class _$SnTransactionCopyWithImpl<$Res, $Val extends SnTransaction> @override @pragma('vm:prefer-inline') $SnWalletCopyWith<$Res>? get payer { - if (_value.payer == null) { + if (_self.payer == null) { return null; } - return $SnWalletCopyWith<$Res>(_value.payer!, (value) { - return _then(_value.copyWith(payer: value) as $Val); + return $SnWalletCopyWith<$Res>(_self.payer!, (value) { + return _then(_self.copyWith(payer: value)); }); } @@ -430,115 +439,20 @@ class _$SnTransactionCopyWithImpl<$Res, $Val extends SnTransaction> @override @pragma('vm:prefer-inline') $SnWalletCopyWith<$Res>? get payee { - if (_value.payee == null) { + if (_self.payee == null) { return null; } - return $SnWalletCopyWith<$Res>(_value.payee!, (value) { - return _then(_value.copyWith(payee: value) as $Val); + return $SnWalletCopyWith<$Res>(_self.payee!, (value) { + return _then(_self.copyWith(payee: value)); }); } } -/// @nodoc -abstract class _$$SnTransactionImplCopyWith<$Res> - implements $SnTransactionCopyWith<$Res> { - factory _$$SnTransactionImplCopyWith( - _$SnTransactionImpl value, $Res Function(_$SnTransactionImpl) then) = - __$$SnTransactionImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {int id, - DateTime createdAt, - DateTime updatedAt, - DateTime? deletedAt, - String remark, - String amount, - SnWallet? payer, - SnWallet? payee, - int? payerId, - int? payeeId}); - - @override - $SnWalletCopyWith<$Res>? get payer; - @override - $SnWalletCopyWith<$Res>? get payee; -} - -/// @nodoc -class __$$SnTransactionImplCopyWithImpl<$Res> - extends _$SnTransactionCopyWithImpl<$Res, _$SnTransactionImpl> - implements _$$SnTransactionImplCopyWith<$Res> { - __$$SnTransactionImplCopyWithImpl( - _$SnTransactionImpl _value, $Res Function(_$SnTransactionImpl) _then) - : super(_value, _then); - - /// Create a copy of SnTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdAt = null, - Object? updatedAt = null, - Object? deletedAt = freezed, - Object? remark = null, - Object? amount = null, - Object? payer = freezed, - Object? payee = freezed, - Object? payerId = freezed, - Object? payeeId = freezed, - }) { - return _then(_$SnTransactionImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - deletedAt: freezed == deletedAt - ? _value.deletedAt - : deletedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - remark: null == remark - ? _value.remark - : remark // ignore: cast_nullable_to_non_nullable - as String, - amount: null == amount - ? _value.amount - : amount // ignore: cast_nullable_to_non_nullable - as String, - payer: freezed == payer - ? _value.payer - : payer // ignore: cast_nullable_to_non_nullable - as SnWallet?, - payee: freezed == payee - ? _value.payee - : payee // ignore: cast_nullable_to_non_nullable - as SnWallet?, - payerId: freezed == payerId - ? _value.payerId - : payerId // ignore: cast_nullable_to_non_nullable - as int?, - payeeId: freezed == payeeId - ? _value.payeeId - : payeeId // ignore: cast_nullable_to_non_nullable - as int?, - )); - } -} - /// @nodoc @JsonSerializable() -class _$SnTransactionImpl implements _SnTransaction { - const _$SnTransactionImpl( +class _SnTransaction implements SnTransaction { + const _SnTransaction( {required this.id, required this.createdAt, required this.updatedAt, @@ -549,9 +463,8 @@ class _$SnTransactionImpl implements _SnTransaction { required this.payee, required this.payerId, required this.payeeId}); - - factory _$SnTransactionImpl.fromJson(Map json) => - _$$SnTransactionImplFromJson(json); + factory _SnTransaction.fromJson(Map json) => + _$SnTransactionFromJson(json); @override final int id; @@ -574,16 +487,26 @@ class _$SnTransactionImpl implements _SnTransaction { @override final int? payeeId; + /// Create a copy of SnTransaction + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SnTransactionCopyWith<_SnTransaction> get copyWith => + __$SnTransactionCopyWithImpl<_SnTransaction>(this, _$identity); + + @override + Map toJson() { + return _$SnTransactionToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnTransactionImpl && + other is _SnTransaction && (identical(other.id, id) || other.id == id) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && @@ -604,63 +527,133 @@ class _$SnTransactionImpl implements _SnTransaction { int get hashCode => Object.hash(runtimeType, id, createdAt, updatedAt, deletedAt, remark, amount, payer, payee, payerId, payeeId); - /// Create a copy of SnTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$SnTransactionImplCopyWith<_$SnTransactionImpl> get copyWith => - __$$SnTransactionImplCopyWithImpl<_$SnTransactionImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnTransactionImplToJson( - this, - ); + String toString() { + return 'SnTransaction(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, remark: $remark, amount: $amount, payer: $payer, payee: $payee, payerId: $payerId, payeeId: $payeeId)'; } } -abstract class _SnTransaction implements SnTransaction { - const factory _SnTransaction( - {required final int id, - required final DateTime createdAt, - required final DateTime updatedAt, - required final DateTime? deletedAt, - required final String remark, - required final String amount, - required final SnWallet? payer, - required final SnWallet? payee, - required final int? payerId, - required final int? payeeId}) = _$SnTransactionImpl; - - factory _SnTransaction.fromJson(Map json) = - _$SnTransactionImpl.fromJson; +/// @nodoc +abstract mixin class _$SnTransactionCopyWith<$Res> + implements $SnTransactionCopyWith<$Res> { + factory _$SnTransactionCopyWith( + _SnTransaction value, $Res Function(_SnTransaction) _then) = + __$SnTransactionCopyWithImpl; + @override + @useResult + $Res call( + {int id, + DateTime createdAt, + DateTime updatedAt, + DateTime? deletedAt, + String remark, + String amount, + SnWallet? payer, + SnWallet? payee, + int? payerId, + int? payeeId}); @override - int get id; + $SnWalletCopyWith<$Res>? get payer; @override - DateTime get createdAt; - @override - DateTime get updatedAt; - @override - DateTime? get deletedAt; - @override - String get remark; - @override - String get amount; - @override - SnWallet? get payer; - @override - SnWallet? get payee; - @override - int? get payerId; - @override - int? get payeeId; + $SnWalletCopyWith<$Res>? get payee; +} + +/// @nodoc +class __$SnTransactionCopyWithImpl<$Res> + implements _$SnTransactionCopyWith<$Res> { + __$SnTransactionCopyWithImpl(this._self, this._then); + + final _SnTransaction _self; + final $Res Function(_SnTransaction) _then; /// Create a copy of SnTransaction /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnTransactionImplCopyWith<_$SnTransactionImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? deletedAt = freezed, + Object? remark = null, + Object? amount = null, + Object? payer = freezed, + Object? payee = freezed, + Object? payerId = freezed, + Object? payeeId = freezed, + }) { + return _then(_SnTransaction( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + remark: null == remark + ? _self.remark + : remark // ignore: cast_nullable_to_non_nullable + as String, + amount: null == amount + ? _self.amount + : amount // ignore: cast_nullable_to_non_nullable + as String, + payer: freezed == payer + ? _self.payer + : payer // ignore: cast_nullable_to_non_nullable + as SnWallet?, + payee: freezed == payee + ? _self.payee + : payee // ignore: cast_nullable_to_non_nullable + as SnWallet?, + payerId: freezed == payerId + ? _self.payerId + : payerId // ignore: cast_nullable_to_non_nullable + as int?, + payeeId: freezed == payeeId + ? _self.payeeId + : payeeId // ignore: cast_nullable_to_non_nullable + as int?, + )); + } + + /// Create a copy of SnTransaction + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnWalletCopyWith<$Res>? get payer { + if (_self.payer == null) { + return null; + } + + return $SnWalletCopyWith<$Res>(_self.payer!, (value) { + return _then(_self.copyWith(payer: value)); + }); + } + + /// Create a copy of SnTransaction + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $SnWalletCopyWith<$Res>? get payee { + if (_self.payee == null) { + return null; + } + + return $SnWalletCopyWith<$Res>(_self.payee!, (value) { + return _then(_self.copyWith(payee: value)); + }); + } } + +// dart format on diff --git a/lib/types/wallet.g.dart b/lib/types/wallet.g.dart index e4fa420..9263345 100644 --- a/lib/types/wallet.g.dart +++ b/lib/types/wallet.g.dart @@ -6,8 +6,7 @@ part of 'wallet.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnWalletImpl _$$SnWalletImplFromJson(Map json) => - _$SnWalletImpl( +_SnWallet _$SnWalletFromJson(Map json) => _SnWallet( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -19,8 +18,7 @@ _$SnWalletImpl _$$SnWalletImplFromJson(Map json) => accountId: (json['account_id'] as num).toInt(), ); -Map _$$SnWalletImplToJson(_$SnWalletImpl instance) => - { +Map _$SnWalletToJson(_SnWallet instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), @@ -30,8 +28,8 @@ Map _$$SnWalletImplToJson(_$SnWalletImpl instance) => 'account_id': instance.accountId, }; -_$SnTransactionImpl _$$SnTransactionImplFromJson(Map json) => - _$SnTransactionImpl( +_SnTransaction _$SnTransactionFromJson(Map json) => + _SnTransaction( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -50,7 +48,7 @@ _$SnTransactionImpl _$$SnTransactionImplFromJson(Map json) => payeeId: (json['payee_id'] as num?)?.toInt(), ); -Map _$$SnTransactionImplToJson(_$SnTransactionImpl instance) => +Map _$SnTransactionToJson(_SnTransaction instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), diff --git a/lib/types/websocket.dart b/lib/types/websocket.dart index 481500c..ad27449 100644 --- a/lib/types/websocket.dart +++ b/lib/types/websocket.dart @@ -4,7 +4,7 @@ part 'websocket.freezed.dart'; part 'websocket.g.dart'; @freezed -class WebSocketPackage with _$WebSocketPackage { +abstract class WebSocketPackage with _$WebSocketPackage { const factory WebSocketPackage({ @JsonKey(name: 'w') @Default('unknown') String method, @JsonKey(name: 'e') String? endpoint, diff --git a/lib/types/websocket.freezed.dart b/lib/types/websocket.freezed.dart index 246e455..cd341f9 100644 --- a/lib/types/websocket.freezed.dart +++ b/lib/types/websocket.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,97 +10,59 @@ part of 'websocket.dart'; // FreezedGenerator // ************************************************************************** +// dart format off 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#adding-getters-and-methods-to-our-models'); - -WebSocketPackage _$WebSocketPackageFromJson(Map json) { - return _WebSocketPackage.fromJson(json); -} - /// @nodoc mixin _$WebSocketPackage { @JsonKey(name: 'w') - String get method => throw _privateConstructorUsedError; + String get method; @JsonKey(name: 'e') - String? get endpoint => throw _privateConstructorUsedError; + String? get endpoint; @JsonKey(name: 'm') - String? get message => throw _privateConstructorUsedError; + String? get message; @JsonKey(name: 'p') - Map? get payload => throw _privateConstructorUsedError; - - /// Serializes this WebSocketPackage to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map? get payload; /// Create a copy of WebSocketPackage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $WebSocketPackageCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WebSocketPackageCopyWith<$Res> { - factory $WebSocketPackageCopyWith( - WebSocketPackage value, $Res Function(WebSocketPackage) then) = - _$WebSocketPackageCopyWithImpl<$Res, WebSocketPackage>; - @useResult - $Res call( - {@JsonKey(name: 'w') String method, - @JsonKey(name: 'e') String? endpoint, - @JsonKey(name: 'm') String? message, - @JsonKey(name: 'p') Map? payload}); -} - -/// @nodoc -class _$WebSocketPackageCopyWithImpl<$Res, $Val extends WebSocketPackage> - implements $WebSocketPackageCopyWith<$Res> { - _$WebSocketPackageCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of WebSocketPackage - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $WebSocketPackageCopyWith get copyWith => + _$WebSocketPackageCopyWithImpl( + this as WebSocketPackage, _$identity); + + /// Serializes this WebSocketPackage to a JSON map. + Map toJson(); + @override - $Res call({ - Object? method = null, - Object? endpoint = freezed, - Object? message = freezed, - Object? payload = freezed, - }) { - return _then(_value.copyWith( - method: null == method - ? _value.method - : method // ignore: cast_nullable_to_non_nullable - as String, - endpoint: freezed == endpoint - ? _value.endpoint - : endpoint // ignore: cast_nullable_to_non_nullable - as String?, - message: freezed == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String?, - payload: freezed == payload - ? _value.payload - : payload // ignore: cast_nullable_to_non_nullable - as Map?, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is WebSocketPackage && + (identical(other.method, method) || other.method == method) && + (identical(other.endpoint, endpoint) || + other.endpoint == endpoint) && + (identical(other.message, message) || other.message == message) && + const DeepCollectionEquality().equals(other.payload, payload)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, method, endpoint, message, + const DeepCollectionEquality().hash(payload)); + + @override + String toString() { + return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)'; } } /// @nodoc -abstract class _$$WebSocketPackageImplCopyWith<$Res> - implements $WebSocketPackageCopyWith<$Res> { - factory _$$WebSocketPackageImplCopyWith(_$WebSocketPackageImpl value, - $Res Function(_$WebSocketPackageImpl) then) = - __$$WebSocketPackageImplCopyWithImpl<$Res>; - @override +abstract mixin class $WebSocketPackageCopyWith<$Res> { + factory $WebSocketPackageCopyWith( + WebSocketPackage value, $Res Function(WebSocketPackage) _then) = + _$WebSocketPackageCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'w') String method, @@ -109,12 +72,12 @@ abstract class _$$WebSocketPackageImplCopyWith<$Res> } /// @nodoc -class __$$WebSocketPackageImplCopyWithImpl<$Res> - extends _$WebSocketPackageCopyWithImpl<$Res, _$WebSocketPackageImpl> - implements _$$WebSocketPackageImplCopyWith<$Res> { - __$$WebSocketPackageImplCopyWithImpl(_$WebSocketPackageImpl _value, - $Res Function(_$WebSocketPackageImpl) _then) - : super(_value, _then); +class _$WebSocketPackageCopyWithImpl<$Res> + implements $WebSocketPackageCopyWith<$Res> { + _$WebSocketPackageCopyWithImpl(this._self, this._then); + + final WebSocketPackage _self; + final $Res Function(WebSocketPackage) _then; /// Create a copy of WebSocketPackage /// with the given fields replaced by the non-null parameter values. @@ -126,21 +89,21 @@ class __$$WebSocketPackageImplCopyWithImpl<$Res> Object? message = freezed, Object? payload = freezed, }) { - return _then(_$WebSocketPackageImpl( + return _then(_self.copyWith( method: null == method - ? _value.method + ? _self.method : method // ignore: cast_nullable_to_non_nullable as String, endpoint: freezed == endpoint - ? _value.endpoint + ? _self.endpoint : endpoint // ignore: cast_nullable_to_non_nullable as String?, message: freezed == message - ? _value.message + ? _self.message : message // ignore: cast_nullable_to_non_nullable as String?, payload: freezed == payload - ? _value._payload + ? _self.payload : payload // ignore: cast_nullable_to_non_nullable as Map?, )); @@ -149,16 +112,15 @@ class __$$WebSocketPackageImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$WebSocketPackageImpl implements _WebSocketPackage { - const _$WebSocketPackageImpl( +class _WebSocketPackage implements WebSocketPackage { + const _WebSocketPackage( {@JsonKey(name: 'w') this.method = 'unknown', @JsonKey(name: 'e') this.endpoint, @JsonKey(name: 'm') this.message, @JsonKey(name: 'p') final Map? payload = const {}}) : _payload = payload; - - factory _$WebSocketPackageImpl.fromJson(Map json) => - _$$WebSocketPackageImplFromJson(json); + factory _WebSocketPackage.fromJson(Map json) => + _$WebSocketPackageFromJson(json); @override @JsonKey(name: 'w') @@ -180,16 +142,26 @@ class _$WebSocketPackageImpl implements _WebSocketPackage { return EqualUnmodifiableMapView(value); } + /// Create a copy of WebSocketPackage + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$WebSocketPackageCopyWith<_WebSocketPackage> get copyWith => + __$WebSocketPackageCopyWithImpl<_WebSocketPackage>(this, _$identity); + + @override + Map toJson() { + return _$WebSocketPackageToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$WebSocketPackageImpl && + other is _WebSocketPackage && (identical(other.method, method) || other.method == method) && (identical(other.endpoint, endpoint) || other.endpoint == endpoint) && @@ -202,51 +174,64 @@ class _$WebSocketPackageImpl implements _WebSocketPackage { int get hashCode => Object.hash(runtimeType, method, endpoint, message, const DeepCollectionEquality().hash(_payload)); - /// Create a copy of WebSocketPackage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$WebSocketPackageImplCopyWith<_$WebSocketPackageImpl> get copyWith => - __$$WebSocketPackageImplCopyWithImpl<_$WebSocketPackageImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$WebSocketPackageImplToJson( - this, - ); + String toString() { + return 'WebSocketPackage(method: $method, endpoint: $endpoint, message: $message, payload: $payload)'; } } -abstract class _WebSocketPackage implements WebSocketPackage { - const factory _WebSocketPackage( - {@JsonKey(name: 'w') final String method, - @JsonKey(name: 'e') final String? endpoint, - @JsonKey(name: 'm') final String? message, - @JsonKey(name: 'p') final Map? payload}) = - _$WebSocketPackageImpl; +/// @nodoc +abstract mixin class _$WebSocketPackageCopyWith<$Res> + implements $WebSocketPackageCopyWith<$Res> { + factory _$WebSocketPackageCopyWith( + _WebSocketPackage value, $Res Function(_WebSocketPackage) _then) = + __$WebSocketPackageCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'w') String method, + @JsonKey(name: 'e') String? endpoint, + @JsonKey(name: 'm') String? message, + @JsonKey(name: 'p') Map? payload}); +} - factory _WebSocketPackage.fromJson(Map json) = - _$WebSocketPackageImpl.fromJson; +/// @nodoc +class __$WebSocketPackageCopyWithImpl<$Res> + implements _$WebSocketPackageCopyWith<$Res> { + __$WebSocketPackageCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'w') - String get method; - @override - @JsonKey(name: 'e') - String? get endpoint; - @override - @JsonKey(name: 'm') - String? get message; - @override - @JsonKey(name: 'p') - Map? get payload; + final _WebSocketPackage _self; + final $Res Function(_WebSocketPackage) _then; /// Create a copy of WebSocketPackage /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$WebSocketPackageImplCopyWith<_$WebSocketPackageImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? method = null, + Object? endpoint = freezed, + Object? message = freezed, + Object? payload = freezed, + }) { + return _then(_WebSocketPackage( + method: null == method + ? _self.method + : method // ignore: cast_nullable_to_non_nullable + as String, + endpoint: freezed == endpoint + ? _self.endpoint + : endpoint // ignore: cast_nullable_to_non_nullable + as String?, + message: freezed == message + ? _self.message + : message // ignore: cast_nullable_to_non_nullable + as String?, + payload: freezed == payload + ? _self._payload + : payload // ignore: cast_nullable_to_non_nullable + as Map?, + )); + } } + +// dart format on diff --git a/lib/types/websocket.g.dart b/lib/types/websocket.g.dart index c1e3b09..c979a88 100644 --- a/lib/types/websocket.g.dart +++ b/lib/types/websocket.g.dart @@ -6,17 +6,15 @@ part of 'websocket.dart'; // JsonSerializableGenerator // ************************************************************************** -_$WebSocketPackageImpl _$$WebSocketPackageImplFromJson( - Map json) => - _$WebSocketPackageImpl( +_WebSocketPackage _$WebSocketPackageFromJson(Map json) => + _WebSocketPackage( method: json['w'] as String? ?? 'unknown', endpoint: json['e'] as String?, message: json['m'] as String?, payload: json['p'] as Map? ?? const {}, ); -Map _$$WebSocketPackageImplToJson( - _$WebSocketPackageImpl instance) => +Map _$WebSocketPackageToJson(_WebSocketPackage instance) => { 'w': instance.method, 'e': instance.endpoint, diff --git a/lib/widgets/post/post_media_pending_list.dart b/lib/widgets/post/post_media_pending_list.dart index dc3d1a6..f93eaeb 100644 --- a/lib/widgets/post/post_media_pending_list.dart +++ b/lib/widgets/post/post_media_pending_list.dart @@ -406,8 +406,9 @@ class _PostMediaPendingItem extends StatelessWidget { FutureBuilder( future: media.length(), builder: (context, snapshot) { - if (!snapshot.hasData) + if (!snapshot.hasData) { return const SizedBox.shrink(); + } return Text( snapshot.data!.formatBytes(), style: GoogleFonts.robotoMono(fontSize: 13), diff --git a/pubspec.lock b/pubspec.lock index 4a68546..ad4c980 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "401dd18096f5eaa140404ccbbbf346f83c850e6f27049698a7ee75a3488ddb32" + sha256: "7fd72d77a7487c26faab1d274af23fb008763ddc10800261abbfb2c067f183d5" url: "https://pub.dev" source: hosted - version: "1.3.52" + version: "1.3.53" analyzer: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: archive - sha256: "528579c7e4579719f04b21eeeeddfd73a18b31dabc22766893b7d1be7f49b967" + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.0.4" args: dependency: transitive description: @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: built_value - sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" + sha256: "8b158ab94ec6913e480dc3f752418348b5ae099eb75868b5f4775f0572999c61" url: "https://pub.dev" source: hosted - version: "8.9.3" + version: "8.9.4" cached_network_image: dependency: "direct main" description: @@ -373,10 +373,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da" + sha256: "610739247975c2d0de43482afa13ec1018f63c9fddf97ef3d8dc895faa3b4543" url: "https://pub.dev" source: hosted - version: "11.3.0" + version: "11.3.2" device_info_plus_platform_interface: dependency: transitive description: @@ -525,10 +525,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "9467b7c4eedf0bd4c9306b0ec12455b278f6366962be061d0978a446c103c111" + sha256: "7423298f08f6fc8cce05792bae329f9a93653fc9c08712831b1a55540127995d" url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "9.0.2" file_saver: dependency: "direct main" description: @@ -573,34 +573,34 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: "6abce50b79729d8a13c3d4ae05ac612d5ef2f57394330bc5e581ca0e762325f4" + sha256: "81a582e9348216fcf6b30878487369325bf78b8ddd752ed176949c8e4fd4aaac" url: "https://pub.dev" source: hosted - version: "11.4.3" + version: "11.4.4" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: cd9ae65870bf23ab7e63a04fe9c1b38522fd3556a8c32288afd3f5cb10d4b8f4 + sha256: "5ae7bd4a551b67009cd0676f5407331b202eaf16e0a80dcf7b40cd0a34a18746" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.3.4" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "5654ed7e39d7a8099e60748924327159785512d78d913e965f9ca93c533af910" + sha256: "15fd7459fea2a00958dbf9b86cd8ad14d3ce2db13950308af7c7717e89ccc5c2" url: "https://pub.dev" source: hosted - version: "0.5.10+9" + version: "0.5.10+10" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "6a4ea0f1d533443c8afc3d809cd36a4e2b8f2e2e711f697974f55bb31d71d1b8" + sha256: f4d8f49574a4e396f34567f3eec4d38ab9c3910818dec22ca42b2a467c685d8b url: "https://pub.dev" source: hosted - version: "3.12.0" + version: "3.12.1" firebase_core_platform_interface: dependency: transitive description: @@ -613,34 +613,34 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: e47f5c2776de018fa19bc9f6f723df136bc75cdb164d64b65305babd715c8e41 + sha256: faa5a76f6380a9b90b53bc3bdcb85bc7926a382e0709b9b5edac9f7746651493 url: "https://pub.dev" source: hosted - version: "2.21.0" + version: "2.21.1" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "8755a083a20bac4485e8b46d223f6f2eab34e659a76a75f8cf3cded53bc98a15" + sha256: "5fc345c6341f9dc69fd0ffcbf508c784fd6d1b9e9f249587f30434dd8b6aa281" url: "https://pub.dev" source: hosted - version: "15.2.3" + version: "15.2.4" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "8cc771079677460de53ad8fcca5bc3074d58c5fc4f9d89b19585e5bfd9c64292" + sha256: a935924cf40925985c8049df4968b1dde5c704f570f3ce380b31d3de6990dd94 url: "https://pub.dev" source: hosted - version: "4.6.3" + version: "4.6.4" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: caa73059b0396c97f691683c4cfc3f897c8543801579b7dd4851c431d8e4e091 + sha256: fafebf6a1921931334f3f10edb5037a5712288efdd022881e2d093e5654a2fd4 url: "https://pub.dev" source: hosted - version: "3.10.3" + version: "3.10.4" fixnum: dependency: transitive description: @@ -839,10 +839,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" + sha256: "1c2b787f99bdca1f3718543f81d38aa1b124817dfeb9fb196201bea85b6134bf" url: "https://pub.dev" source: hosted - version: "2.0.24" + version: "2.0.26" flutter_shaders: dependency: transitive description: @@ -897,10 +897,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "532008570b7fd20310db8cb9c8ebc5bafd5aa4e52c4358db4e5ddc29f74f4be3" + sha256: a3d6429368603a591ca7c1795799a247998fb213ded509070c2c59708b25df31 url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" freezed_annotation: dependency: "direct main" description: @@ -945,10 +945,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "04539267a740931c6d4479a10d466717ca5901c6fdfd3fcda09391bbb8ebd651" + sha256: f02fd7d2a4dc512fec615529824fdd217fecb3a3d3de68360293a551f21634b3 url: "https://pub.dev" source: hosted - version: "14.8.0" + version: "14.8.1" google_fonts: dependency: "direct main" description: @@ -2342,10 +2342,10 @@ packages: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web_socket: dependency: transitive description: @@ -2382,10 +2382,10 @@ packages: dependency: transitive description: name: win32_registry - sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" + sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "2.1.0" workmanager: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 02081b3..2647432 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -146,8 +146,8 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^5.0.0 build_runner: ^2.4.15 - freezed: ^3.0.1 - json_serializable: ^6.8.0 + freezed: ^3.0.2 + json_serializable: ^6.9.4 icons_launcher: ^3.0.0 flutter_native_splash: ^2.4.2 flutter_launcher_icons: ^0.14.1