Surface/lib/types/post.freezed.dart

2329 lines
73 KiB
Dart
Raw Normal View History

2024-11-08 16:09:46 +00:00
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'post.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(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<String, dynamic> 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;
2024-11-09 04:04:03 +00:00
Map<String, dynamic> get body => throw _privateConstructorUsedError;
2024-11-08 16:09:46 +00:00
String get language => throw _privateConstructorUsedError;
String? get alias => throw _privateConstructorUsedError;
2024-11-08 16:46:32 +00:00
String? get aliasPrefix => throw _privateConstructorUsedError;
2024-11-26 16:06:11 +00:00
List<SnPostTag> get tags => throw _privateConstructorUsedError;
2024-11-08 16:09:46 +00:00
List<dynamic> get categories => throw _privateConstructorUsedError;
2024-11-13 14:05:40 +00:00
List<SnPost>? get replies => throw _privateConstructorUsedError;
int? get replyId => throw _privateConstructorUsedError;
int? get repostId => throw _privateConstructorUsedError;
SnPost? get replyTo => throw _privateConstructorUsedError;
SnPost? get repostTo => throw _privateConstructorUsedError;
List<int>? get visibleUsersList => throw _privateConstructorUsedError;
List<int>? get invisibleUsersList => throw _privateConstructorUsedError;
2024-11-08 16:09:46 +00:00
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;
2024-11-08 16:09:46 +00:00
int get totalUpvote => throw _privateConstructorUsedError;
int get totalDownvote => throw _privateConstructorUsedError;
int get publisherId => throw _privateConstructorUsedError;
SnPublisher get publisher => throw _privateConstructorUsedError;
SnMetric get metric => throw _privateConstructorUsedError;
2024-11-09 04:04:03 +00:00
SnPostPreload? get preload => throw _privateConstructorUsedError;
2024-11-08 16:09:46 +00:00
/// Serializes this SnPost to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnPost
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SnPostCopyWith<SnPost> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SnPostCopyWith<$Res> {
factory $SnPostCopyWith(SnPost value, $Res Function(SnPost) then) =
_$SnPostCopyWithImpl<$Res, SnPost>;
@useResult
$Res call(
{int id,
DateTime createdAt,
DateTime updatedAt,
DateTime? deletedAt,
String type,
2024-11-09 04:04:03 +00:00
Map<String, dynamic> body,
2024-11-08 16:09:46 +00:00
String language,
String? alias,
2024-11-08 16:46:32 +00:00
String? aliasPrefix,
2024-11-26 16:06:11 +00:00
List<SnPostTag> tags,
2024-11-08 16:09:46 +00:00
List<dynamic> categories,
2024-11-13 14:05:40 +00:00
List<SnPost>? replies,
int? replyId,
int? repostId,
SnPost? replyTo,
SnPost? repostTo,
List<int>? visibleUsersList,
List<int>? invisibleUsersList,
2024-11-08 16:09:46 +00:00
int visibility,
DateTime? editedAt,
DateTime? pinnedAt,
DateTime? lockedAt,
bool isDraft,
DateTime? publishedAt,
DateTime? publishedUntil,
2024-11-08 16:09:46 +00:00
int totalUpvote,
int totalDownvote,
int publisherId,
SnPublisher publisher,
2024-11-09 04:04:03 +00:00
SnMetric metric,
SnPostPreload? preload});
2024-11-08 16:09:46 +00:00
2024-11-13 14:05:40 +00:00
$SnPostCopyWith<$Res>? get replyTo;
$SnPostCopyWith<$Res>? get repostTo;
2024-11-08 16:09:46 +00:00
$SnPublisherCopyWith<$Res> get publisher;
$SnMetricCopyWith<$Res> get metric;
2024-11-09 04:04:03 +00:00
$SnPostPreloadCopyWith<$Res>? get preload;
2024-11-08 16:09:46 +00:00
}
/// @nodoc
class _$SnPostCopyWithImpl<$Res, $Val extends SnPost>
implements $SnPostCopyWith<$Res> {
_$SnPostCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _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,
2024-11-09 04:04:03 +00:00
Object? body = null,
2024-11-08 16:09:46 +00:00
Object? language = null,
Object? alias = freezed,
2024-11-08 16:46:32 +00:00
Object? aliasPrefix = freezed,
2024-11-08 16:09:46 +00:00
Object? tags = null,
Object? categories = null,
Object? replies = freezed,
Object? replyId = freezed,
Object? repostId = 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,
2024-11-08 16:09:46 +00:00
Object? publishedUntil = freezed,
Object? totalUpvote = null,
Object? totalDownvote = null,
Object? publisherId = null,
Object? publisher = null,
Object? metric = null,
2024-11-09 04:04:03 +00:00
Object? preload = freezed,
2024-11-08 16:09:46 +00:00
}) {
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 String,
2024-11-09 04:04:03 +00:00
body: null == body
2024-11-08 16:09:46 +00:00
? _value.body
: body // ignore: cast_nullable_to_non_nullable
2024-11-09 04:04:03 +00:00
as Map<String, dynamic>,
2024-11-08 16:09:46 +00:00
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?,
2024-11-08 16:46:32 +00:00
aliasPrefix: freezed == aliasPrefix
2024-11-08 16:09:46 +00:00
? _value.aliasPrefix
: aliasPrefix // ignore: cast_nullable_to_non_nullable
2024-11-08 16:46:32 +00:00
as String?,
2024-11-08 16:09:46 +00:00
tags: null == tags
? _value.tags
: tags // ignore: cast_nullable_to_non_nullable
2024-11-26 16:06:11 +00:00
as List<SnPostTag>,
2024-11-08 16:09:46 +00:00
categories: null == categories
? _value.categories
: categories // ignore: cast_nullable_to_non_nullable
as List<dynamic>,
replies: freezed == replies
? _value.replies
: replies // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<SnPost>?,
2024-11-08 16:09:46 +00:00
replyId: freezed == replyId
? _value.replyId
: replyId // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as int?,
2024-11-08 16:09:46 +00:00
repostId: freezed == repostId
? _value.repostId
: repostId // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as int?,
2024-11-08 16:09:46 +00:00
replyTo: freezed == replyTo
? _value.replyTo
: replyTo // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as SnPost?,
2024-11-08 16:09:46 +00:00
repostTo: freezed == repostTo
? _value.repostTo
: repostTo // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as SnPost?,
2024-11-08 16:09:46 +00:00
visibleUsersList: freezed == visibleUsersList
? _value.visibleUsersList
: visibleUsersList // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<int>?,
2024-11-08 16:09:46 +00:00
invisibleUsersList: freezed == invisibleUsersList
? _value.invisibleUsersList
: invisibleUsersList // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<int>?,
2024-11-08 16:09:46 +00:00
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
2024-11-08 16:09:46 +00:00
? _value.publishedAt
: publishedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
2024-11-08 16:09:46 +00:00
publishedUntil: freezed == publishedUntil
? _value.publishedUntil
: publishedUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,
2024-11-08 16:09:46 +00:00
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,
publisherId: null == publisherId
? _value.publisherId
: publisherId // 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,
2024-11-09 04:04:03 +00:00
preload: freezed == preload
? _value.preload
: preload // ignore: cast_nullable_to_non_nullable
as SnPostPreload?,
2024-11-08 16:09:46 +00:00
) as $Val);
}
2024-11-13 14:05:40 +00:00
/// 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 (_value.replyTo == null) {
return null;
}
return $SnPostCopyWith<$Res>(_value.replyTo!, (value) {
return _then(_value.copyWith(replyTo: value) as $Val);
});
}
/// 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 (_value.repostTo == null) {
return null;
}
return $SnPostCopyWith<$Res>(_value.repostTo!, (value) {
return _then(_value.copyWith(repostTo: value) as $Val);
});
}
2024-11-08 16:09:46 +00:00
/// 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>(_value.publisher, (value) {
return _then(_value.copyWith(publisher: value) as $Val);
});
}
/// 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>(_value.metric, (value) {
return _then(_value.copyWith(metric: value) as $Val);
});
}
2024-11-09 04:04:03 +00:00
/// 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 (_value.preload == null) {
return null;
}
return $SnPostPreloadCopyWith<$Res>(_value.preload!, (value) {
return _then(_value.copyWith(preload: value) as $Val);
});
}
2024-11-08 16:09:46 +00:00
}
/// @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,
2024-11-09 04:04:03 +00:00
Map<String, dynamic> body,
2024-11-08 16:09:46 +00:00
String language,
String? alias,
2024-11-08 16:46:32 +00:00
String? aliasPrefix,
2024-11-26 16:06:11 +00:00
List<SnPostTag> tags,
2024-11-08 16:09:46 +00:00
List<dynamic> categories,
2024-11-13 14:05:40 +00:00
List<SnPost>? replies,
int? replyId,
int? repostId,
SnPost? replyTo,
SnPost? repostTo,
List<int>? visibleUsersList,
List<int>? invisibleUsersList,
2024-11-08 16:09:46 +00:00
int visibility,
DateTime? editedAt,
DateTime? pinnedAt,
DateTime? lockedAt,
bool isDraft,
DateTime? publishedAt,
DateTime? publishedUntil,
2024-11-08 16:09:46 +00:00
int totalUpvote,
int totalDownvote,
int publisherId,
SnPublisher publisher,
2024-11-09 04:04:03 +00:00
SnMetric metric,
SnPostPreload? preload});
2024-11-08 16:09:46 +00:00
2024-11-13 14:05:40 +00:00
@override
$SnPostCopyWith<$Res>? get replyTo;
@override
$SnPostCopyWith<$Res>? get repostTo;
2024-11-08 16:09:46 +00:00
@override
$SnPublisherCopyWith<$Res> get publisher;
@override
$SnMetricCopyWith<$Res> get metric;
2024-11-09 04:04:03 +00:00
@override
$SnPostPreloadCopyWith<$Res>? get preload;
2024-11-08 16:09:46 +00:00
}
/// @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,
2024-11-09 04:04:03 +00:00
Object? body = null,
2024-11-08 16:09:46 +00:00
Object? language = null,
Object? alias = freezed,
2024-11-08 16:46:32 +00:00
Object? aliasPrefix = freezed,
2024-11-08 16:09:46 +00:00
Object? tags = null,
Object? categories = null,
Object? replies = freezed,
Object? replyId = freezed,
Object? repostId = 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,
2024-11-08 16:09:46 +00:00
Object? publishedUntil = freezed,
Object? totalUpvote = null,
Object? totalDownvote = null,
Object? publisherId = null,
Object? publisher = null,
Object? metric = null,
2024-11-09 04:04:03 +00:00
Object? preload = freezed,
2024-11-08 16:09:46 +00:00
}) {
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,
2024-11-09 04:04:03 +00:00
body: null == body
? _value._body
2024-11-08 16:09:46 +00:00
: body // ignore: cast_nullable_to_non_nullable
2024-11-09 04:04:03 +00:00
as Map<String, dynamic>,
2024-11-08 16:09:46 +00:00
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?,
2024-11-08 16:46:32 +00:00
aliasPrefix: freezed == aliasPrefix
2024-11-08 16:09:46 +00:00
? _value.aliasPrefix
: aliasPrefix // ignore: cast_nullable_to_non_nullable
2024-11-08 16:46:32 +00:00
as String?,
2024-11-08 16:09:46 +00:00
tags: null == tags
? _value._tags
: tags // ignore: cast_nullable_to_non_nullable
2024-11-26 16:06:11 +00:00
as List<SnPostTag>,
2024-11-08 16:09:46 +00:00
categories: null == categories
? _value._categories
: categories // ignore: cast_nullable_to_non_nullable
as List<dynamic>,
replies: freezed == replies
2024-11-13 14:05:40 +00:00
? _value._replies
2024-11-08 16:09:46 +00:00
: replies // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<SnPost>?,
2024-11-08 16:09:46 +00:00
replyId: freezed == replyId
? _value.replyId
: replyId // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as int?,
2024-11-08 16:09:46 +00:00
repostId: freezed == repostId
? _value.repostId
: repostId // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as int?,
2024-11-08 16:09:46 +00:00
replyTo: freezed == replyTo
? _value.replyTo
: replyTo // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as SnPost?,
2024-11-08 16:09:46 +00:00
repostTo: freezed == repostTo
? _value.repostTo
: repostTo // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as SnPost?,
2024-11-08 16:09:46 +00:00
visibleUsersList: freezed == visibleUsersList
2024-11-13 14:05:40 +00:00
? _value._visibleUsersList
2024-11-08 16:09:46 +00:00
: visibleUsersList // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<int>?,
2024-11-08 16:09:46 +00:00
invisibleUsersList: freezed == invisibleUsersList
2024-11-13 14:05:40 +00:00
? _value._invisibleUsersList
2024-11-08 16:09:46 +00:00
: invisibleUsersList // ignore: cast_nullable_to_non_nullable
2024-11-13 14:05:40 +00:00
as List<int>?,
2024-11-08 16:09:46 +00:00
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
2024-11-08 16:09:46 +00:00
? _value.publishedAt
: publishedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
2024-11-08 16:09:46 +00:00
publishedUntil: freezed == publishedUntil
? _value.publishedUntil
: publishedUntil // ignore: cast_nullable_to_non_nullable
as DateTime?,
2024-11-08 16:09:46 +00:00
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,
publisherId: null == publisherId
? _value.publisherId
: publisherId // 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,
2024-11-09 04:04:03 +00:00
preload: freezed == preload
? _value.preload
: preload // ignore: cast_nullable_to_non_nullable
as SnPostPreload?,
2024-11-08 16:09:46 +00:00
));
}
}
/// @nodoc
@JsonSerializable()
2024-11-10 10:37:34 +00:00
class _$SnPostImpl extends _SnPost {
2024-11-08 16:09:46 +00:00
const _$SnPostImpl(
{required this.id,
required this.createdAt,
required this.updatedAt,
required this.deletedAt,
required this.type,
2024-11-09 04:04:03 +00:00
required final Map<String, dynamic> body,
2024-11-08 16:09:46 +00:00
required this.language,
required this.alias,
required this.aliasPrefix,
2024-11-26 16:06:11 +00:00
final List<SnPostTag> tags = const [],
2024-11-26 13:56:01 +00:00
final List<dynamic> categories = const [],
2024-11-13 14:05:40 +00:00
required final List<SnPost>? replies,
2024-11-08 16:09:46 +00:00
required this.replyId,
required this.repostId,
required this.replyTo,
required this.repostTo,
2024-11-13 14:05:40 +00:00
required final List<int>? visibleUsersList,
required final List<int>? invisibleUsersList,
2024-11-08 16:09:46 +00:00
required this.visibility,
required this.editedAt,
required this.pinnedAt,
required this.lockedAt,
required this.isDraft,
required this.publishedAt,
required this.publishedUntil,
required this.totalUpvote,
required this.totalDownvote,
required this.publisherId,
required this.publisher,
2024-11-09 04:04:03 +00:00
required this.metric,
this.preload})
: _body = body,
_tags = tags,
2024-11-10 10:37:34 +00:00
_categories = categories,
2024-11-13 14:05:40 +00:00
_replies = replies,
_visibleUsersList = visibleUsersList,
_invisibleUsersList = invisibleUsersList,
2024-11-10 10:37:34 +00:00
super._();
2024-11-08 16:09:46 +00:00
factory _$SnPostImpl.fromJson(Map<String, dynamic> json) =>
_$$SnPostImplFromJson(json);
@override
final int id;
@override
final DateTime createdAt;
@override
final DateTime updatedAt;
@override
final DateTime? deletedAt;
@override
final String type;
2024-11-09 04:04:03 +00:00
final Map<String, dynamic> _body;
2024-11-08 16:09:46 +00:00
@override
2024-11-09 04:04:03 +00:00
Map<String, dynamic> get body {
if (_body is EqualUnmodifiableMapView) return _body;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_body);
}
2024-11-08 16:09:46 +00:00
@override
final String language;
@override
final String? alias;
@override
2024-11-08 16:46:32 +00:00
final String? aliasPrefix;
2024-11-26 16:06:11 +00:00
final List<SnPostTag> _tags;
2024-11-08 16:09:46 +00:00
@override
2024-11-26 13:56:01 +00:00
@JsonKey()
2024-11-26 16:06:11 +00:00
List<SnPostTag> get tags {
2024-11-08 16:09:46 +00:00
if (_tags is EqualUnmodifiableListView) return _tags;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_tags);
}
final List<dynamic> _categories;
@override
2024-11-26 13:56:01 +00:00
@JsonKey()
2024-11-08 16:09:46 +00:00
List<dynamic> get categories {
if (_categories is EqualUnmodifiableListView) return _categories;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_categories);
}
2024-11-13 14:05:40 +00:00
final List<SnPost>? _replies;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
List<SnPost>? get replies {
final value = _replies;
if (value == null) return null;
if (_replies is EqualUnmodifiableListView) return _replies;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
final int? replyId;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
final int? repostId;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
final SnPost? replyTo;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
final SnPost? repostTo;
final List<int>? _visibleUsersList;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
List<int>? get visibleUsersList {
final value = _visibleUsersList;
if (value == null) return null;
if (_visibleUsersList is EqualUnmodifiableListView)
return _visibleUsersList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<int>? _invisibleUsersList;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
List<int>? get invisibleUsersList {
final value = _invisibleUsersList;
if (value == null) return null;
if (_invisibleUsersList is EqualUnmodifiableListView)
return _invisibleUsersList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
2024-11-08 16:09:46 +00:00
@override
final int visibility;
@override
final DateTime? editedAt;
@override
final DateTime? pinnedAt;
@override
final DateTime? lockedAt;
@override
final bool isDraft;
@override
final DateTime? publishedAt;
2024-11-08 16:09:46 +00:00
@override
final DateTime? publishedUntil;
2024-11-08 16:09:46 +00:00
@override
final int totalUpvote;
@override
final int totalDownvote;
@override
final int publisherId;
@override
final SnPublisher publisher;
@override
final SnMetric metric;
2024-11-09 04:04:03 +00:00
@override
final SnPostPreload? preload;
2024-11-08 16:09:46 +00:00
@override
String toString() {
2024-11-12 12:47:40 +00:00
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, 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, publisherId: $publisherId, publisher: $publisher, metric: $metric, preload: $preload)';
2024-11-08 16:09:46 +00:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SnPostImpl &&
(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) &&
2024-11-09 04:04:03 +00:00
const DeepCollectionEquality().equals(other._body, _body) &&
2024-11-08 16:09:46 +00:00
(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) &&
2024-11-13 14:05:40 +00:00
const DeepCollectionEquality().equals(other._replies, _replies) &&
(identical(other.replyId, replyId) || other.replyId == replyId) &&
(identical(other.repostId, repostId) ||
other.repostId == repostId) &&
(identical(other.replyTo, replyTo) || other.replyTo == replyTo) &&
(identical(other.repostTo, repostTo) ||
other.repostTo == repostTo) &&
2024-11-08 16:09:46 +00:00
const DeepCollectionEquality()
2024-11-13 14:05:40 +00:00
.equals(other._visibleUsersList, _visibleUsersList) &&
2024-11-08 16:09:46 +00:00
const DeepCollectionEquality()
2024-11-13 14:05:40 +00:00
.equals(other._invisibleUsersList, _invisibleUsersList) &&
2024-11-08 16:09:46 +00:00
(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) &&
2024-11-08 16:09:46 +00:00
(identical(other.totalUpvote, totalUpvote) ||
other.totalUpvote == totalUpvote) &&
(identical(other.totalDownvote, totalDownvote) ||
other.totalDownvote == totalDownvote) &&
(identical(other.publisherId, publisherId) ||
other.publisherId == publisherId) &&
(identical(other.publisher, publisher) ||
other.publisher == publisher) &&
2024-11-09 04:04:03 +00:00
(identical(other.metric, metric) || other.metric == metric) &&
(identical(other.preload, preload) || other.preload == preload));
2024-11-08 16:09:46 +00:00
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
id,
createdAt,
updatedAt,
deletedAt,
type,
2024-11-09 04:04:03 +00:00
const DeepCollectionEquality().hash(_body),
2024-11-08 16:09:46 +00:00
language,
alias,
aliasPrefix,
const DeepCollectionEquality().hash(_tags),
const DeepCollectionEquality().hash(_categories),
2024-11-13 14:05:40 +00:00
const DeepCollectionEquality().hash(_replies),
replyId,
repostId,
replyTo,
repostTo,
const DeepCollectionEquality().hash(_visibleUsersList),
const DeepCollectionEquality().hash(_invisibleUsersList),
2024-11-08 16:09:46 +00:00
visibility,
editedAt,
pinnedAt,
lockedAt,
isDraft,
publishedAt,
publishedUntil,
2024-11-08 16:09:46 +00:00
totalUpvote,
totalDownvote,
publisherId,
publisher,
2024-11-09 04:04:03 +00:00
metric,
preload
2024-11-08 16:09:46 +00:00
]);
/// 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<String, dynamic> toJson() {
return _$$SnPostImplToJson(
this,
);
}
}
2024-11-10 10:37:34 +00:00
abstract class _SnPost extends SnPost {
2024-11-08 16:09:46 +00:00
const factory _SnPost(
{required final int id,
required final DateTime createdAt,
required final DateTime updatedAt,
required final DateTime? deletedAt,
required final String type,
2024-11-09 04:04:03 +00:00
required final Map<String, dynamic> body,
2024-11-08 16:09:46 +00:00
required final String language,
required final String? alias,
2024-11-08 16:46:32 +00:00
required final String? aliasPrefix,
2024-11-26 16:06:11 +00:00
final List<SnPostTag> tags,
2024-11-26 13:56:01 +00:00
final List<dynamic> categories,
2024-11-13 14:05:40 +00:00
required final List<SnPost>? replies,
required final int? replyId,
required final int? repostId,
required final SnPost? replyTo,
required final SnPost? repostTo,
required final List<int>? visibleUsersList,
required final List<int>? invisibleUsersList,
2024-11-08 16:09:46 +00:00
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,
2024-11-08 16:09:46 +00:00
required final int totalUpvote,
required final int totalDownvote,
required final int publisherId,
required final SnPublisher publisher,
2024-11-09 04:04:03 +00:00
required final SnMetric metric,
final SnPostPreload? preload}) = _$SnPostImpl;
2024-11-10 10:37:34 +00:00
const _SnPost._() : super._();
2024-11-08 16:09:46 +00:00
factory _SnPost.fromJson(Map<String, dynamic> json) = _$SnPostImpl.fromJson;
@override
int get id;
@override
DateTime get createdAt;
@override
DateTime get updatedAt;
@override
DateTime? get deletedAt;
@override
String get type;
@override
2024-11-09 04:04:03 +00:00
Map<String, dynamic> get body;
2024-11-08 16:09:46 +00:00
@override
String get language;
@override
String? get alias;
@override
2024-11-08 16:46:32 +00:00
String? get aliasPrefix;
2024-11-08 16:09:46 +00:00
@override
2024-11-26 16:06:11 +00:00
List<SnPostTag> get tags;
2024-11-08 16:09:46 +00:00
@override
List<dynamic> get categories;
@override
2024-11-13 14:05:40 +00:00
List<SnPost>? get replies;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
int? get replyId;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
int? get repostId;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
SnPost? get replyTo;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
SnPost? get repostTo;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
List<int>? get visibleUsersList;
2024-11-08 16:09:46 +00:00
@override
2024-11-13 14:05:40 +00:00
List<int>? get invisibleUsersList;
2024-11-08 16:09:46 +00:00
@override
int get visibility;
@override
DateTime? get editedAt;
@override
DateTime? get pinnedAt;
@override
DateTime? get lockedAt;
@override
bool get isDraft;
@override
DateTime? get publishedAt;
2024-11-08 16:09:46 +00:00
@override
DateTime? get publishedUntil;
2024-11-08 16:09:46 +00:00
@override
int get totalUpvote;
@override
int get totalDownvote;
@override
int get publisherId;
@override
SnPublisher get publisher;
@override
SnMetric get metric;
2024-11-09 04:04:03 +00:00
@override
SnPostPreload? get preload;
2024-11-08 16:09:46 +00:00
/// 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;
}
2024-11-26 16:06:11 +00:00
SnPostTag _$SnPostTagFromJson(Map<String, dynamic> json) {
return _SnPostTag.fromJson(json);
}
/// @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<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnPostTag
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SnPostTagCopyWith<SnPostTag> get copyWith =>
throw _privateConstructorUsedError;
}
/// @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});
}
/// @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);
}
}
/// @nodoc
abstract class _$$SnPostTagImplCopyWith<$Res>
implements $SnPostTagCopyWith<$Res> {
factory _$$SnPostTagImplCopyWith(
_$SnPostTagImpl value, $Res Function(_$SnPostTagImpl) then) =
__$$SnPostTagImplCopyWithImpl<$Res>;
@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<String, dynamic> 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;
@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<String, dynamic> 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<String, dynamic> 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;
}
2024-11-09 04:04:03 +00:00
SnPostPreload _$SnPostPreloadFromJson(Map<String, dynamic> json) {
return _SnPostPreload.fromJson(json);
}
/// @nodoc
mixin _$SnPostPreload {
2024-11-25 16:00:09 +00:00
SnAttachment? get thumbnail => throw _privateConstructorUsedError;
2024-11-17 16:55:39 +00:00
List<SnAttachment?>? get attachments => throw _privateConstructorUsedError;
2024-11-09 04:04:03 +00:00
/// Serializes this SnPostPreload to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnPostPreload
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SnPostPreloadCopyWith<SnPostPreload> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SnPostPreloadCopyWith<$Res> {
factory $SnPostPreloadCopyWith(
SnPostPreload value, $Res Function(SnPostPreload) then) =
_$SnPostPreloadCopyWithImpl<$Res, SnPostPreload>;
@useResult
2024-11-25 16:00:09 +00:00
$Res call({SnAttachment? thumbnail, List<SnAttachment?>? attachments});
$SnAttachmentCopyWith<$Res>? get thumbnail;
2024-11-09 04:04:03 +00:00
}
/// @nodoc
class _$SnPostPreloadCopyWithImpl<$Res, $Val extends SnPostPreload>
implements $SnPostPreloadCopyWith<$Res> {
_$SnPostPreloadCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SnPostPreload
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2024-11-25 16:00:09 +00:00
Object? thumbnail = freezed,
2024-11-09 04:04:03 +00:00
Object? attachments = freezed,
}) {
return _then(_value.copyWith(
2024-11-25 16:00:09 +00:00
thumbnail: freezed == thumbnail
? _value.thumbnail
: thumbnail // ignore: cast_nullable_to_non_nullable
as SnAttachment?,
2024-11-09 04:04:03 +00:00
attachments: freezed == attachments
? _value.attachments
: attachments // ignore: cast_nullable_to_non_nullable
2024-11-17 16:55:39 +00:00
as List<SnAttachment?>?,
2024-11-09 04:04:03 +00:00
) as $Val);
}
2024-11-25 16:00:09 +00:00
/// 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 (_value.thumbnail == null) {
return null;
}
return $SnAttachmentCopyWith<$Res>(_value.thumbnail!, (value) {
return _then(_value.copyWith(thumbnail: value) as $Val);
});
}
2024-11-09 04:04:03 +00:00
}
/// @nodoc
abstract class _$$SnPostPreloadImplCopyWith<$Res>
implements $SnPostPreloadCopyWith<$Res> {
factory _$$SnPostPreloadImplCopyWith(
_$SnPostPreloadImpl value, $Res Function(_$SnPostPreloadImpl) then) =
__$$SnPostPreloadImplCopyWithImpl<$Res>;
@override
@useResult
2024-11-25 16:00:09 +00:00
$Res call({SnAttachment? thumbnail, List<SnAttachment?>? attachments});
@override
$SnAttachmentCopyWith<$Res>? get thumbnail;
2024-11-09 04:04:03 +00:00
}
/// @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({
2024-11-25 16:00:09 +00:00
Object? thumbnail = freezed,
2024-11-09 04:04:03 +00:00
Object? attachments = freezed,
}) {
return _then(_$SnPostPreloadImpl(
2024-11-25 16:00:09 +00:00
thumbnail: freezed == thumbnail
? _value.thumbnail
: thumbnail // ignore: cast_nullable_to_non_nullable
as SnAttachment?,
2024-11-09 04:04:03 +00:00
attachments: freezed == attachments
? _value._attachments
: attachments // ignore: cast_nullable_to_non_nullable
2024-11-17 16:55:39 +00:00
as List<SnAttachment?>?,
2024-11-09 04:04:03 +00:00
));
}
}
/// @nodoc
@JsonSerializable()
class _$SnPostPreloadImpl implements _SnPostPreload {
2024-11-25 16:00:09 +00:00
const _$SnPostPreloadImpl(
{required this.thumbnail,
required final List<SnAttachment?>? attachments})
2024-11-09 04:04:03 +00:00
: _attachments = attachments;
factory _$SnPostPreloadImpl.fromJson(Map<String, dynamic> json) =>
_$$SnPostPreloadImplFromJson(json);
2024-11-25 16:00:09 +00:00
@override
final SnAttachment? thumbnail;
2024-11-17 16:55:39 +00:00
final List<SnAttachment?>? _attachments;
2024-11-09 04:04:03 +00:00
@override
2024-11-17 16:55:39 +00:00
List<SnAttachment?>? get attachments {
2024-11-09 04:04:03 +00:00
final value = _attachments;
if (value == null) return null;
if (_attachments is EqualUnmodifiableListView) return _attachments;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
2024-11-25 16:00:09 +00:00
return 'SnPostPreload(thumbnail: $thumbnail, attachments: $attachments)';
2024-11-09 04:04:03 +00:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SnPostPreloadImpl &&
2024-11-25 16:00:09 +00:00
(identical(other.thumbnail, thumbnail) ||
other.thumbnail == thumbnail) &&
2024-11-09 04:04:03 +00:00
const DeepCollectionEquality()
.equals(other._attachments, _attachments));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
2024-11-25 16:00:09 +00:00
int get hashCode => Object.hash(runtimeType, thumbnail,
const DeepCollectionEquality().hash(_attachments));
2024-11-09 04:04:03 +00:00
/// 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<String, dynamic> toJson() {
return _$$SnPostPreloadImplToJson(
this,
);
}
}
abstract class _SnPostPreload implements SnPostPreload {
const factory _SnPostPreload(
2024-11-25 16:00:09 +00:00
{required final SnAttachment? thumbnail,
required final List<SnAttachment?>? attachments}) = _$SnPostPreloadImpl;
2024-11-09 04:04:03 +00:00
factory _SnPostPreload.fromJson(Map<String, dynamic> json) =
_$SnPostPreloadImpl.fromJson;
2024-11-25 16:00:09 +00:00
@override
SnAttachment? get thumbnail;
2024-11-09 04:04:03 +00:00
@override
2024-11-17 16:55:39 +00:00
List<SnAttachment?>? get attachments;
2024-11-09 04:04:03 +00:00
/// 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;
}
2024-11-08 16:09:46 +00:00
SnBody _$SnBodyFromJson(Map<String, dynamic> json) {
return _SnBody.fromJson(json);
}
/// @nodoc
mixin _$SnBody {
List<String> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnBody
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SnBodyCopyWith<SnBody> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SnBodyCopyWith<$Res> {
factory $SnBodyCopyWith(SnBody value, $Res Function(SnBody) then) =
_$SnBodyCopyWithImpl<$Res, SnBody>;
@useResult
$Res call(
{List<String> 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')
@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<String>,
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);
}
}
/// @nodoc
abstract class _$$SnBodyImplCopyWith<$Res> implements $SnBodyCopyWith<$Res> {
factory _$$SnBodyImplCopyWith(
_$SnBodyImpl value, $Res Function(_$SnBodyImpl) then) =
__$$SnBodyImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{List<String> attachments,
String content,
dynamic location,
dynamic thumbnail,
dynamic title});
}
/// @nodoc
class __$$SnBodyImplCopyWithImpl<$Res>
extends _$SnBodyCopyWithImpl<$Res, _$SnBodyImpl>
implements _$$SnBodyImplCopyWith<$Res> {
__$$SnBodyImplCopyWithImpl(
_$SnBodyImpl _value, $Res Function(_$SnBodyImpl) _then)
: super(_value, _then);
/// Create a copy of SnBody
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? attachments = null,
Object? content = null,
Object? location = freezed,
Object? thumbnail = freezed,
Object? title = freezed,
}) {
return _then(_$SnBodyImpl(
attachments: null == attachments
? _value._attachments
: attachments // ignore: cast_nullable_to_non_nullable
as List<String>,
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,
));
}
}
/// @nodoc
@JsonSerializable()
class _$SnBodyImpl implements _SnBody {
const _$SnBodyImpl(
{required final List<String> attachments,
required this.content,
required this.location,
required this.thumbnail,
required this.title})
: _attachments = attachments;
factory _$SnBodyImpl.fromJson(Map<String, dynamic> json) =>
_$$SnBodyImplFromJson(json);
final List<String> _attachments;
@override
List<String> get attachments {
if (_attachments is EqualUnmodifiableListView) return _attachments;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_attachments);
}
@override
final String content;
@override
final dynamic location;
@override
final dynamic thumbnail;
@override
final dynamic title;
@override
String toString() {
return 'SnBody(attachments: $attachments, content: $content, location: $location, thumbnail: $thumbnail, title: $title)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SnBodyImpl &&
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));
/// 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<String, dynamic> toJson() {
return _$$SnBodyImplToJson(
this,
);
}
}
abstract class _SnBody implements SnBody {
const factory _SnBody(
{required final List<String> attachments,
required final String content,
required final dynamic location,
required final dynamic thumbnail,
required final dynamic title}) = _$SnBodyImpl;
factory _SnBody.fromJson(Map<String, dynamic> json) = _$SnBodyImpl.fromJson;
@override
List<String> get attachments;
@override
String get content;
@override
dynamic get location;
@override
dynamic get thumbnail;
@override
dynamic get title;
/// 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<String, dynamic> json) {
return _SnMetric.fromJson(json);
}
/// @nodoc
mixin _$SnMetric {
int get replyCount => throw _privateConstructorUsedError;
int get reactionCount => throw _privateConstructorUsedError;
2024-11-12 12:47:40 +00:00
Map<String, int> get reactionList => throw _privateConstructorUsedError;
2024-11-08 16:09:46 +00:00
/// Serializes this SnMetric to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SnMetric
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SnMetricCopyWith<SnMetric> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SnMetricCopyWith<$Res> {
factory $SnMetricCopyWith(SnMetric value, $Res Function(SnMetric) then) =
_$SnMetricCopyWithImpl<$Res, SnMetric>;
@useResult
2024-11-12 12:47:40 +00:00
$Res call({int replyCount, int reactionCount, Map<String, int> reactionList});
2024-11-08 16:09:46 +00:00
}
/// @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')
@override
$Res call({
Object? replyCount = null,
Object? reactionCount = null,
2024-11-12 12:47:40 +00:00
Object? reactionList = null,
2024-11-08 16:09:46 +00:00
}) {
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,
2024-11-12 12:47:40 +00:00
reactionList: null == reactionList
? _value.reactionList
: reactionList // ignore: cast_nullable_to_non_nullable
as Map<String, int>,
2024-11-08 16:09:46 +00:00
) as $Val);
}
}
/// @nodoc
abstract class _$$SnMetricImplCopyWith<$Res>
implements $SnMetricCopyWith<$Res> {
factory _$$SnMetricImplCopyWith(
_$SnMetricImpl value, $Res Function(_$SnMetricImpl) then) =
__$$SnMetricImplCopyWithImpl<$Res>;
@override
@useResult
2024-11-12 12:47:40 +00:00
$Res call({int replyCount, int reactionCount, Map<String, int> reactionList});
2024-11-08 16:09:46 +00:00
}
/// @nodoc
class __$$SnMetricImplCopyWithImpl<$Res>
extends _$SnMetricCopyWithImpl<$Res, _$SnMetricImpl>
implements _$$SnMetricImplCopyWith<$Res> {
__$$SnMetricImplCopyWithImpl(
_$SnMetricImpl _value, $Res Function(_$SnMetricImpl) _then)
: super(_value, _then);
/// Create a copy of SnMetric
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? replyCount = null,
Object? reactionCount = null,
2024-11-12 12:47:40 +00:00
Object? reactionList = null,
2024-11-08 16:09:46 +00:00
}) {
return _then(_$SnMetricImpl(
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,
2024-11-12 12:47:40 +00:00
reactionList: null == reactionList
? _value._reactionList
: reactionList // ignore: cast_nullable_to_non_nullable
as Map<String, int>,
2024-11-08 16:09:46 +00:00
));
}
}
/// @nodoc
@JsonSerializable()
class _$SnMetricImpl implements _SnMetric {
2024-11-12 12:47:40 +00:00
const _$SnMetricImpl(
{required this.replyCount,
required this.reactionCount,
final Map<String, int> reactionList = const {}})
: _reactionList = reactionList;
2024-11-08 16:09:46 +00:00
factory _$SnMetricImpl.fromJson(Map<String, dynamic> json) =>
_$$SnMetricImplFromJson(json);
@override
final int replyCount;
@override
final int reactionCount;
2024-11-12 12:47:40 +00:00
final Map<String, int> _reactionList;
@override
@JsonKey()
Map<String, int> get reactionList {
if (_reactionList is EqualUnmodifiableMapView) return _reactionList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_reactionList);
}
2024-11-08 16:09:46 +00:00
@override
String toString() {
2024-11-12 12:47:40 +00:00
return 'SnMetric(replyCount: $replyCount, reactionCount: $reactionCount, reactionList: $reactionList)';
2024-11-08 16:09:46 +00:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SnMetricImpl &&
(identical(other.replyCount, replyCount) ||
other.replyCount == replyCount) &&
(identical(other.reactionCount, reactionCount) ||
2024-11-12 12:47:40 +00:00
other.reactionCount == reactionCount) &&
const DeepCollectionEquality()
.equals(other._reactionList, _reactionList));
2024-11-08 16:09:46 +00:00
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
2024-11-12 12:47:40 +00:00
int get hashCode => Object.hash(runtimeType, replyCount, reactionCount,
const DeepCollectionEquality().hash(_reactionList));
2024-11-08 16:09:46 +00:00
/// 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<String, dynamic> toJson() {
return _$$SnMetricImplToJson(
this,
);
}
}
abstract class _SnMetric implements SnMetric {
const factory _SnMetric(
{required final int replyCount,
2024-11-12 12:47:40 +00:00
required final int reactionCount,
final Map<String, int> reactionList}) = _$SnMetricImpl;
2024-11-08 16:09:46 +00:00
factory _SnMetric.fromJson(Map<String, dynamic> json) =
_$SnMetricImpl.fromJson;
@override
int get replyCount;
@override
int get reactionCount;
2024-11-12 12:47:40 +00:00
@override
Map<String, int> get reactionList;
2024-11-08 16:09:46 +00:00
/// 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<String, dynamic> 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<String, dynamic> 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<SnPublisher> 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);
}
}
/// @nodoc
abstract class _$$SnPublisherImplCopyWith<$Res>
implements $SnPublisherCopyWith<$Res> {
factory _$$SnPublisherImplCopyWith(
_$SnPublisherImpl value, $Res Function(_$SnPublisherImpl) then) =
__$$SnPublisherImplCopyWithImpl<$Res>;
@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 __$$SnPublisherImplCopyWithImpl<$Res>
extends _$SnPublisherCopyWithImpl<$Res, _$SnPublisherImpl>
implements _$$SnPublisherImplCopyWith<$Res> {
__$$SnPublisherImplCopyWithImpl(
_$SnPublisherImpl _value, $Res Function(_$SnPublisherImpl) _then)
: super(_value, _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(_$SnPublisherImpl(
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,
));
}
}
/// @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});
factory _$SnPublisherImpl.fromJson(Map<String, dynamic> json) =>
_$$SnPublisherImplFromJson(json);
@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)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SnPublisherImpl &&
(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);
/// 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<String, dynamic> toJson() {
return _$$SnPublisherImplToJson(
this,
);
}
}
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<String, dynamic> 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;
}