flutter-samples/lib/logics/entities/api/api_poetry.freezed.dart
2025-05-03 15:33:44 +08:00

375 lines
20 KiB
Dart

// dart format width=80
// 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 'api_poetry.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ApiPoetry implements DiagnosticableTreeMixin {
int get id; String get title; String get content; int get authorId; String get authorName; String get authorAvatar; String get authorBio; int get dynastyId; String get dynastyName; int get favorNum; int get shareNum; int get commentNum; int get collectNum; int get sealNum; int get honorPoints; int get version; bool get deleted; bool get favored;
/// Create a copy of ApiPoetry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ApiPoetryCopyWith<ApiPoetry> get copyWith => _$ApiPoetryCopyWithImpl<ApiPoetry>(this as ApiPoetry, _$identity);
/// Serializes this ApiPoetry to a JSON map.
Map<String, dynamic> toJson();
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ApiPoetry'))
..add(DiagnosticsProperty('id', id))..add(DiagnosticsProperty('title', title))..add(DiagnosticsProperty('content', content))..add(DiagnosticsProperty('authorId', authorId))..add(DiagnosticsProperty('authorName', authorName))..add(DiagnosticsProperty('authorAvatar', authorAvatar))..add(DiagnosticsProperty('authorBio', authorBio))..add(DiagnosticsProperty('dynastyId', dynastyId))..add(DiagnosticsProperty('dynastyName', dynastyName))..add(DiagnosticsProperty('favorNum', favorNum))..add(DiagnosticsProperty('shareNum', shareNum))..add(DiagnosticsProperty('commentNum', commentNum))..add(DiagnosticsProperty('collectNum', collectNum))..add(DiagnosticsProperty('sealNum', sealNum))..add(DiagnosticsProperty('honorPoints', honorPoints))..add(DiagnosticsProperty('version', version))..add(DiagnosticsProperty('deleted', deleted))..add(DiagnosticsProperty('favored', favored));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApiPoetry&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.content, content) || other.content == content)&&(identical(other.authorId, authorId) || other.authorId == authorId)&&(identical(other.authorName, authorName) || other.authorName == authorName)&&(identical(other.authorAvatar, authorAvatar) || other.authorAvatar == authorAvatar)&&(identical(other.authorBio, authorBio) || other.authorBio == authorBio)&&(identical(other.dynastyId, dynastyId) || other.dynastyId == dynastyId)&&(identical(other.dynastyName, dynastyName) || other.dynastyName == dynastyName)&&(identical(other.favorNum, favorNum) || other.favorNum == favorNum)&&(identical(other.shareNum, shareNum) || other.shareNum == shareNum)&&(identical(other.commentNum, commentNum) || other.commentNum == commentNum)&&(identical(other.collectNum, collectNum) || other.collectNum == collectNum)&&(identical(other.sealNum, sealNum) || other.sealNum == sealNum)&&(identical(other.honorPoints, honorPoints) || other.honorPoints == honorPoints)&&(identical(other.version, version) || other.version == version)&&(identical(other.deleted, deleted) || other.deleted == deleted)&&(identical(other.favored, favored) || other.favored == favored));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,title,content,authorId,authorName,authorAvatar,authorBio,dynastyId,dynastyName,favorNum,shareNum,commentNum,collectNum,sealNum,honorPoints,version,deleted,favored);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ApiPoetry(id: $id, title: $title, content: $content, authorId: $authorId, authorName: $authorName, authorAvatar: $authorAvatar, authorBio: $authorBio, dynastyId: $dynastyId, dynastyName: $dynastyName, favorNum: $favorNum, shareNum: $shareNum, commentNum: $commentNum, collectNum: $collectNum, sealNum: $sealNum, honorPoints: $honorPoints, version: $version, deleted: $deleted, favored: $favored)';
}
}
/// @nodoc
abstract mixin class $ApiPoetryCopyWith<$Res> {
factory $ApiPoetryCopyWith(ApiPoetry value, $Res Function(ApiPoetry) _then) = _$ApiPoetryCopyWithImpl;
@useResult
$Res call({
int id, String title, String content, int authorId, String authorName, String authorAvatar, String authorBio, int dynastyId, String dynastyName, int favorNum, int shareNum, int commentNum, int collectNum, int sealNum, int honorPoints, int version, bool deleted, bool favored
});
}
/// @nodoc
class _$ApiPoetryCopyWithImpl<$Res>
implements $ApiPoetryCopyWith<$Res> {
_$ApiPoetryCopyWithImpl(this._self, this._then);
final ApiPoetry _self;
final $Res Function(ApiPoetry) _then;
/// Create a copy of ApiPoetry
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? content = null,Object? authorId = null,Object? authorName = null,Object? authorAvatar = null,Object? authorBio = null,Object? dynastyId = null,Object? dynastyName = null,Object? favorNum = null,Object? shareNum = null,Object? commentNum = null,Object? collectNum = null,Object? sealNum = null,Object? honorPoints = null,Object? version = null,Object? deleted = null,Object? favored = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
as String,authorId: null == authorId ? _self.authorId : authorId // ignore: cast_nullable_to_non_nullable
as int,authorName: null == authorName ? _self.authorName : authorName // ignore: cast_nullable_to_non_nullable
as String,authorAvatar: null == authorAvatar ? _self.authorAvatar : authorAvatar // ignore: cast_nullable_to_non_nullable
as String,authorBio: null == authorBio ? _self.authorBio : authorBio // ignore: cast_nullable_to_non_nullable
as String,dynastyId: null == dynastyId ? _self.dynastyId : dynastyId // ignore: cast_nullable_to_non_nullable
as int,dynastyName: null == dynastyName ? _self.dynastyName : dynastyName // ignore: cast_nullable_to_non_nullable
as String,favorNum: null == favorNum ? _self.favorNum : favorNum // ignore: cast_nullable_to_non_nullable
as int,shareNum: null == shareNum ? _self.shareNum : shareNum // ignore: cast_nullable_to_non_nullable
as int,commentNum: null == commentNum ? _self.commentNum : commentNum // ignore: cast_nullable_to_non_nullable
as int,collectNum: null == collectNum ? _self.collectNum : collectNum // ignore: cast_nullable_to_non_nullable
as int,sealNum: null == sealNum ? _self.sealNum : sealNum // ignore: cast_nullable_to_non_nullable
as int,honorPoints: null == honorPoints ? _self.honorPoints : honorPoints // ignore: cast_nullable_to_non_nullable
as int,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as int,deleted: null == deleted ? _self.deleted : deleted // ignore: cast_nullable_to_non_nullable
as bool,favored: null == favored ? _self.favored : favored // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable(fieldRename: FieldRename.snake)
class _ApiPoetry with DiagnosticableTreeMixin implements ApiPoetry {
const _ApiPoetry({this.id = 0, this.title = '', this.content = '', this.authorId = 0, this.authorName = '', this.authorAvatar = '', this.authorBio = '', this.dynastyId = 0, this.dynastyName = '', this.favorNum = 0, this.shareNum = 0, this.commentNum = 0, this.collectNum = 0, this.sealNum = 0, this.honorPoints = 0, this.version = 0, this.deleted = false, this.favored = false});
factory _ApiPoetry.fromJson(Map<String, dynamic> json) => _$ApiPoetryFromJson(json);
@override@JsonKey() final int id;
@override@JsonKey() final String title;
@override@JsonKey() final String content;
@override@JsonKey() final int authorId;
@override@JsonKey() final String authorName;
@override@JsonKey() final String authorAvatar;
@override@JsonKey() final String authorBio;
@override@JsonKey() final int dynastyId;
@override@JsonKey() final String dynastyName;
@override@JsonKey() final int favorNum;
@override@JsonKey() final int shareNum;
@override@JsonKey() final int commentNum;
@override@JsonKey() final int collectNum;
@override@JsonKey() final int sealNum;
@override@JsonKey() final int honorPoints;
@override@JsonKey() final int version;
@override@JsonKey() final bool deleted;
@override@JsonKey() final bool favored;
/// Create a copy of ApiPoetry
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ApiPoetryCopyWith<_ApiPoetry> get copyWith => __$ApiPoetryCopyWithImpl<_ApiPoetry>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ApiPoetryToJson(this, );
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ApiPoetry'))
..add(DiagnosticsProperty('id', id))..add(DiagnosticsProperty('title', title))..add(DiagnosticsProperty('content', content))..add(DiagnosticsProperty('authorId', authorId))..add(DiagnosticsProperty('authorName', authorName))..add(DiagnosticsProperty('authorAvatar', authorAvatar))..add(DiagnosticsProperty('authorBio', authorBio))..add(DiagnosticsProperty('dynastyId', dynastyId))..add(DiagnosticsProperty('dynastyName', dynastyName))..add(DiagnosticsProperty('favorNum', favorNum))..add(DiagnosticsProperty('shareNum', shareNum))..add(DiagnosticsProperty('commentNum', commentNum))..add(DiagnosticsProperty('collectNum', collectNum))..add(DiagnosticsProperty('sealNum', sealNum))..add(DiagnosticsProperty('honorPoints', honorPoints))..add(DiagnosticsProperty('version', version))..add(DiagnosticsProperty('deleted', deleted))..add(DiagnosticsProperty('favored', favored));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApiPoetry&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.content, content) || other.content == content)&&(identical(other.authorId, authorId) || other.authorId == authorId)&&(identical(other.authorName, authorName) || other.authorName == authorName)&&(identical(other.authorAvatar, authorAvatar) || other.authorAvatar == authorAvatar)&&(identical(other.authorBio, authorBio) || other.authorBio == authorBio)&&(identical(other.dynastyId, dynastyId) || other.dynastyId == dynastyId)&&(identical(other.dynastyName, dynastyName) || other.dynastyName == dynastyName)&&(identical(other.favorNum, favorNum) || other.favorNum == favorNum)&&(identical(other.shareNum, shareNum) || other.shareNum == shareNum)&&(identical(other.commentNum, commentNum) || other.commentNum == commentNum)&&(identical(other.collectNum, collectNum) || other.collectNum == collectNum)&&(identical(other.sealNum, sealNum) || other.sealNum == sealNum)&&(identical(other.honorPoints, honorPoints) || other.honorPoints == honorPoints)&&(identical(other.version, version) || other.version == version)&&(identical(other.deleted, deleted) || other.deleted == deleted)&&(identical(other.favored, favored) || other.favored == favored));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,title,content,authorId,authorName,authorAvatar,authorBio,dynastyId,dynastyName,favorNum,shareNum,commentNum,collectNum,sealNum,honorPoints,version,deleted,favored);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ApiPoetry(id: $id, title: $title, content: $content, authorId: $authorId, authorName: $authorName, authorAvatar: $authorAvatar, authorBio: $authorBio, dynastyId: $dynastyId, dynastyName: $dynastyName, favorNum: $favorNum, shareNum: $shareNum, commentNum: $commentNum, collectNum: $collectNum, sealNum: $sealNum, honorPoints: $honorPoints, version: $version, deleted: $deleted, favored: $favored)';
}
}
/// @nodoc
abstract mixin class _$ApiPoetryCopyWith<$Res> implements $ApiPoetryCopyWith<$Res> {
factory _$ApiPoetryCopyWith(_ApiPoetry value, $Res Function(_ApiPoetry) _then) = __$ApiPoetryCopyWithImpl;
@override @useResult
$Res call({
int id, String title, String content, int authorId, String authorName, String authorAvatar, String authorBio, int dynastyId, String dynastyName, int favorNum, int shareNum, int commentNum, int collectNum, int sealNum, int honorPoints, int version, bool deleted, bool favored
});
}
/// @nodoc
class __$ApiPoetryCopyWithImpl<$Res>
implements _$ApiPoetryCopyWith<$Res> {
__$ApiPoetryCopyWithImpl(this._self, this._then);
final _ApiPoetry _self;
final $Res Function(_ApiPoetry) _then;
/// Create a copy of ApiPoetry
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? content = null,Object? authorId = null,Object? authorName = null,Object? authorAvatar = null,Object? authorBio = null,Object? dynastyId = null,Object? dynastyName = null,Object? favorNum = null,Object? shareNum = null,Object? commentNum = null,Object? collectNum = null,Object? sealNum = null,Object? honorPoints = null,Object? version = null,Object? deleted = null,Object? favored = null,}) {
return _then(_ApiPoetry(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
as String,authorId: null == authorId ? _self.authorId : authorId // ignore: cast_nullable_to_non_nullable
as int,authorName: null == authorName ? _self.authorName : authorName // ignore: cast_nullable_to_non_nullable
as String,authorAvatar: null == authorAvatar ? _self.authorAvatar : authorAvatar // ignore: cast_nullable_to_non_nullable
as String,authorBio: null == authorBio ? _self.authorBio : authorBio // ignore: cast_nullable_to_non_nullable
as String,dynastyId: null == dynastyId ? _self.dynastyId : dynastyId // ignore: cast_nullable_to_non_nullable
as int,dynastyName: null == dynastyName ? _self.dynastyName : dynastyName // ignore: cast_nullable_to_non_nullable
as String,favorNum: null == favorNum ? _self.favorNum : favorNum // ignore: cast_nullable_to_non_nullable
as int,shareNum: null == shareNum ? _self.shareNum : shareNum // ignore: cast_nullable_to_non_nullable
as int,commentNum: null == commentNum ? _self.commentNum : commentNum // ignore: cast_nullable_to_non_nullable
as int,collectNum: null == collectNum ? _self.collectNum : collectNum // ignore: cast_nullable_to_non_nullable
as int,sealNum: null == sealNum ? _self.sealNum : sealNum // ignore: cast_nullable_to_non_nullable
as int,honorPoints: null == honorPoints ? _self.honorPoints : honorPoints // ignore: cast_nullable_to_non_nullable
as int,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as int,deleted: null == deleted ? _self.deleted : deleted // ignore: cast_nullable_to_non_nullable
as bool,favored: null == favored ? _self.favored : favored // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
mixin _$ApiPoetryData implements DiagnosticableTreeMixin {
ApiPoetry get poetry;
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ApiPoetryDataCopyWith<ApiPoetryData> get copyWith => _$ApiPoetryDataCopyWithImpl<ApiPoetryData>(this as ApiPoetryData, _$identity);
/// Serializes this ApiPoetryData to a JSON map.
Map<String, dynamic> toJson();
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ApiPoetryData'))
..add(DiagnosticsProperty('poetry', poetry));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApiPoetryData&&(identical(other.poetry, poetry) || other.poetry == poetry));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,poetry);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ApiPoetryData(poetry: $poetry)';
}
}
/// @nodoc
abstract mixin class $ApiPoetryDataCopyWith<$Res> {
factory $ApiPoetryDataCopyWith(ApiPoetryData value, $Res Function(ApiPoetryData) _then) = _$ApiPoetryDataCopyWithImpl;
@useResult
$Res call({
ApiPoetry poetry
});
$ApiPoetryCopyWith<$Res> get poetry;
}
/// @nodoc
class _$ApiPoetryDataCopyWithImpl<$Res>
implements $ApiPoetryDataCopyWith<$Res> {
_$ApiPoetryDataCopyWithImpl(this._self, this._then);
final ApiPoetryData _self;
final $Res Function(ApiPoetryData) _then;
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? poetry = null,}) {
return _then(_self.copyWith(
poetry: null == poetry ? _self.poetry : poetry // ignore: cast_nullable_to_non_nullable
as ApiPoetry,
));
}
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ApiPoetryCopyWith<$Res> get poetry {
return $ApiPoetryCopyWith<$Res>(_self.poetry, (value) {
return _then(_self.copyWith(poetry: value));
});
}
}
/// @nodoc
@JsonSerializable(fieldRename: FieldRename.snake)
class _ApiPoetryData with DiagnosticableTreeMixin implements ApiPoetryData {
const _ApiPoetryData({required this.poetry});
factory _ApiPoetryData.fromJson(Map<String, dynamic> json) => _$ApiPoetryDataFromJson(json);
@override final ApiPoetry poetry;
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ApiPoetryDataCopyWith<_ApiPoetryData> get copyWith => __$ApiPoetryDataCopyWithImpl<_ApiPoetryData>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ApiPoetryDataToJson(this, );
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ApiPoetryData'))
..add(DiagnosticsProperty('poetry', poetry));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApiPoetryData&&(identical(other.poetry, poetry) || other.poetry == poetry));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,poetry);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ApiPoetryData(poetry: $poetry)';
}
}
/// @nodoc
abstract mixin class _$ApiPoetryDataCopyWith<$Res> implements $ApiPoetryDataCopyWith<$Res> {
factory _$ApiPoetryDataCopyWith(_ApiPoetryData value, $Res Function(_ApiPoetryData) _then) = __$ApiPoetryDataCopyWithImpl;
@override @useResult
$Res call({
ApiPoetry poetry
});
@override $ApiPoetryCopyWith<$Res> get poetry;
}
/// @nodoc
class __$ApiPoetryDataCopyWithImpl<$Res>
implements _$ApiPoetryDataCopyWith<$Res> {
__$ApiPoetryDataCopyWithImpl(this._self, this._then);
final _ApiPoetryData _self;
final $Res Function(_ApiPoetryData) _then;
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? poetry = null,}) {
return _then(_ApiPoetryData(
poetry: null == poetry ? _self.poetry : poetry // ignore: cast_nullable_to_non_nullable
as ApiPoetry,
));
}
/// Create a copy of ApiPoetryData
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ApiPoetryCopyWith<$Res> get poetry {
return $ApiPoetryCopyWith<$Res>(_self.poetry, (value) {
return _then(_self.copyWith(poetry: value));
});
}
}
// dart format on