179 lines
7.0 KiB
Dart
179 lines
7.0 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_list.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ApiList<T> implements DiagnosticableTreeMixin {
|
|
|
|
String get cursor; int get page; int get size; int get total; List<T> get list;
|
|
/// Create a copy of ApiList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ApiListCopyWith<T, ApiList<T>> get copyWith => _$ApiListCopyWithImpl<T, ApiList<T>>(this as ApiList<T>, _$identity);
|
|
|
|
/// Serializes this ApiList to a JSON map.
|
|
Map<String, dynamic> toJson(Object? Function(T) toJsonT);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'ApiList<$T>'))
|
|
..add(DiagnosticsProperty('cursor', cursor))..add(DiagnosticsProperty('page', page))..add(DiagnosticsProperty('size', size))..add(DiagnosticsProperty('total', total))..add(DiagnosticsProperty('list', list));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApiList<T>&&(identical(other.cursor, cursor) || other.cursor == cursor)&&(identical(other.page, page) || other.page == page)&&(identical(other.size, size) || other.size == size)&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.list, list));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,cursor,page,size,total,const DeepCollectionEquality().hash(list));
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'ApiList<$T>(cursor: $cursor, page: $page, size: $size, total: $total, list: $list)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ApiListCopyWith<T,$Res> {
|
|
factory $ApiListCopyWith(ApiList<T> value, $Res Function(ApiList<T>) _then) = _$ApiListCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String cursor, int page, int size, int total, List<T> list
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$ApiListCopyWithImpl<T,$Res>
|
|
implements $ApiListCopyWith<T, $Res> {
|
|
_$ApiListCopyWithImpl(this._self, this._then);
|
|
|
|
final ApiList<T> _self;
|
|
final $Res Function(ApiList<T>) _then;
|
|
|
|
/// Create a copy of ApiList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? cursor = null,Object? page = null,Object? size = null,Object? total = null,Object? list = null,}) {
|
|
return _then(_self.copyWith(
|
|
cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable
|
|
as String,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
|
as int,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
|
as int,list: null == list ? _self.list : list // ignore: cast_nullable_to_non_nullable
|
|
as List<T>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
@JsonSerializable(genericArgumentFactories: true)
|
|
|
|
class _ApiList<T> with DiagnosticableTreeMixin implements ApiList<T> {
|
|
const _ApiList({this.cursor = '', this.page = 1, this.size = 10, this.total = 0, final List<T> list = const []}): _list = list;
|
|
factory _ApiList.fromJson(Map<String, dynamic> json,T Function(Object?) fromJsonT) => _$ApiListFromJson(json,fromJsonT);
|
|
|
|
@override@JsonKey() final String cursor;
|
|
@override@JsonKey() final int page;
|
|
@override@JsonKey() final int size;
|
|
@override@JsonKey() final int total;
|
|
final List<T> _list;
|
|
@override@JsonKey() List<T> get list {
|
|
if (_list is EqualUnmodifiableListView) return _list;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_list);
|
|
}
|
|
|
|
|
|
/// Create a copy of ApiList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ApiListCopyWith<T, _ApiList<T>> get copyWith => __$ApiListCopyWithImpl<T, _ApiList<T>>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson(Object? Function(T) toJsonT) {
|
|
return _$ApiListToJson<T>(this, toJsonT);
|
|
}
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'ApiList<$T>'))
|
|
..add(DiagnosticsProperty('cursor', cursor))..add(DiagnosticsProperty('page', page))..add(DiagnosticsProperty('size', size))..add(DiagnosticsProperty('total', total))..add(DiagnosticsProperty('list', list));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApiList<T>&&(identical(other.cursor, cursor) || other.cursor == cursor)&&(identical(other.page, page) || other.page == page)&&(identical(other.size, size) || other.size == size)&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._list, _list));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,cursor,page,size,total,const DeepCollectionEquality().hash(_list));
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'ApiList<$T>(cursor: $cursor, page: $page, size: $size, total: $total, list: $list)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ApiListCopyWith<T,$Res> implements $ApiListCopyWith<T, $Res> {
|
|
factory _$ApiListCopyWith(_ApiList<T> value, $Res Function(_ApiList<T>) _then) = __$ApiListCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String cursor, int page, int size, int total, List<T> list
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$ApiListCopyWithImpl<T,$Res>
|
|
implements _$ApiListCopyWith<T, $Res> {
|
|
__$ApiListCopyWithImpl(this._self, this._then);
|
|
|
|
final _ApiList<T> _self;
|
|
final $Res Function(_ApiList<T>) _then;
|
|
|
|
/// Create a copy of ApiList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? cursor = null,Object? page = null,Object? size = null,Object? total = null,Object? list = null,}) {
|
|
return _then(_ApiList<T>(
|
|
cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable
|
|
as String,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
|
as int,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
|
as int,list: null == list ? _self._list : list // ignore: cast_nullable_to_non_nullable
|
|
as List<T>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|