// 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 'pagination_params.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); PaginationParams _$PaginationParamsFromJson(Map json) { return _PaginationParams.fromJson(json); } /// @nodoc mixin _$PaginationParams { int get page => throw _privateConstructorUsedError; int get perPage => throw _privateConstructorUsedError; String? get search => throw _privateConstructorUsedError; String? get sortBy => throw _privateConstructorUsedError; String get sortOrder => throw _privateConstructorUsedError; Map? get filters => throw _privateConstructorUsedError; /// Serializes this PaginationParams to a JSON map. Map toJson() => throw _privateConstructorUsedError; /// Create a copy of PaginationParams /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $PaginationParamsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PaginationParamsCopyWith<$Res> { factory $PaginationParamsCopyWith( PaginationParams value, $Res Function(PaginationParams) then) = _$PaginationParamsCopyWithImpl<$Res, PaginationParams>; @useResult $Res call( {int page, int perPage, String? search, String? sortBy, String sortOrder, Map? filters}); } /// @nodoc class _$PaginationParamsCopyWithImpl<$Res, $Val extends PaginationParams> implements $PaginationParamsCopyWith<$Res> { _$PaginationParamsCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; /// Create a copy of PaginationParams /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? page = null, Object? perPage = null, Object? search = freezed, Object? sortBy = freezed, Object? sortOrder = null, Object? filters = freezed, }) { return _then(_value.copyWith( page: null == page ? _value.page : page // ignore: cast_nullable_to_non_nullable as int, perPage: null == perPage ? _value.perPage : perPage // ignore: cast_nullable_to_non_nullable as int, search: freezed == search ? _value.search : search // ignore: cast_nullable_to_non_nullable as String?, sortBy: freezed == sortBy ? _value.sortBy : sortBy // ignore: cast_nullable_to_non_nullable as String?, sortOrder: null == sortOrder ? _value.sortOrder : sortOrder // ignore: cast_nullable_to_non_nullable as String, filters: freezed == filters ? _value.filters : filters // ignore: cast_nullable_to_non_nullable as Map?, ) as $Val); } } /// @nodoc abstract class _$$PaginationParamsImplCopyWith<$Res> implements $PaginationParamsCopyWith<$Res> { factory _$$PaginationParamsImplCopyWith(_$PaginationParamsImpl value, $Res Function(_$PaginationParamsImpl) then) = __$$PaginationParamsImplCopyWithImpl<$Res>; @override @useResult $Res call( {int page, int perPage, String? search, String? sortBy, String sortOrder, Map? filters}); } /// @nodoc class __$$PaginationParamsImplCopyWithImpl<$Res> extends _$PaginationParamsCopyWithImpl<$Res, _$PaginationParamsImpl> implements _$$PaginationParamsImplCopyWith<$Res> { __$$PaginationParamsImplCopyWithImpl(_$PaginationParamsImpl _value, $Res Function(_$PaginationParamsImpl) _then) : super(_value, _then); /// Create a copy of PaginationParams /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? page = null, Object? perPage = null, Object? search = freezed, Object? sortBy = freezed, Object? sortOrder = null, Object? filters = freezed, }) { return _then(_$PaginationParamsImpl( page: null == page ? _value.page : page // ignore: cast_nullable_to_non_nullable as int, perPage: null == perPage ? _value.perPage : perPage // ignore: cast_nullable_to_non_nullable as int, search: freezed == search ? _value.search : search // ignore: cast_nullable_to_non_nullable as String?, sortBy: freezed == sortBy ? _value.sortBy : sortBy // ignore: cast_nullable_to_non_nullable as String?, sortOrder: null == sortOrder ? _value.sortOrder : sortOrder // ignore: cast_nullable_to_non_nullable as String, filters: freezed == filters ? _value._filters : filters // ignore: cast_nullable_to_non_nullable as Map?, )); } } /// @nodoc @JsonSerializable() class _$PaginationParamsImpl implements _PaginationParams { const _$PaginationParamsImpl( {this.page = 1, this.perPage = AppConstants.defaultPageSize, this.search, this.sortBy, this.sortOrder = 'asc', final Map? filters}) : _filters = filters; factory _$PaginationParamsImpl.fromJson(Map json) => _$$PaginationParamsImplFromJson(json); @override @JsonKey() final int page; @override @JsonKey() final int perPage; @override final String? search; @override final String? sortBy; @override @JsonKey() final String sortOrder; final Map? _filters; @override Map? get filters { final value = _filters; if (value == null) return null; if (_filters is EqualUnmodifiableMapView) return _filters; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(value); } @override String toString() { return 'PaginationParams(page: $page, perPage: $perPage, search: $search, sortBy: $sortBy, sortOrder: $sortOrder, filters: $filters)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaginationParamsImpl && (identical(other.page, page) || other.page == page) && (identical(other.perPage, perPage) || other.perPage == perPage) && (identical(other.search, search) || other.search == search) && (identical(other.sortBy, sortBy) || other.sortBy == sortBy) && (identical(other.sortOrder, sortOrder) || other.sortOrder == sortOrder) && const DeepCollectionEquality().equals(other._filters, _filters)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, page, perPage, search, sortBy, sortOrder, const DeepCollectionEquality().hash(_filters)); /// Create a copy of PaginationParams /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$PaginationParamsImplCopyWith<_$PaginationParamsImpl> get copyWith => __$$PaginationParamsImplCopyWithImpl<_$PaginationParamsImpl>( this, _$identity); @override Map toJson() { return _$$PaginationParamsImplToJson( this, ); } } abstract class _PaginationParams implements PaginationParams { const factory _PaginationParams( {final int page, final int perPage, final String? search, final String? sortBy, final String sortOrder, final Map? filters}) = _$PaginationParamsImpl; factory _PaginationParams.fromJson(Map json) = _$PaginationParamsImpl.fromJson; @override int get page; @override int get perPage; @override String? get search; @override String? get sortBy; @override String get sortOrder; @override Map? get filters; /// Create a copy of PaginationParams /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) _$$PaginationParamsImplCopyWith<_$PaginationParamsImpl> get copyWith => throw _privateConstructorUsedError; } PaginationMeta _$PaginationMetaFromJson(Map json) { return _PaginationMeta.fromJson(json); } /// @nodoc mixin _$PaginationMeta { int get currentPage => throw _privateConstructorUsedError; int get perPage => throw _privateConstructorUsedError; int get total => throw _privateConstructorUsedError; int get totalPages => throw _privateConstructorUsedError; bool get hasNext => throw _privateConstructorUsedError; bool get hasPrevious => throw _privateConstructorUsedError; /// Serializes this PaginationMeta to a JSON map. Map toJson() => throw _privateConstructorUsedError; /// Create a copy of PaginationMeta /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $PaginationMetaCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PaginationMetaCopyWith<$Res> { factory $PaginationMetaCopyWith( PaginationMeta value, $Res Function(PaginationMeta) then) = _$PaginationMetaCopyWithImpl<$Res, PaginationMeta>; @useResult $Res call( {int currentPage, int perPage, int total, int totalPages, bool hasNext, bool hasPrevious}); } /// @nodoc class _$PaginationMetaCopyWithImpl<$Res, $Val extends PaginationMeta> implements $PaginationMetaCopyWith<$Res> { _$PaginationMetaCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; /// Create a copy of PaginationMeta /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? currentPage = null, Object? perPage = null, Object? total = null, Object? totalPages = null, Object? hasNext = null, Object? hasPrevious = null, }) { return _then(_value.copyWith( currentPage: null == currentPage ? _value.currentPage : currentPage // ignore: cast_nullable_to_non_nullable as int, perPage: null == perPage ? _value.perPage : perPage // ignore: cast_nullable_to_non_nullable as int, total: null == total ? _value.total : total // ignore: cast_nullable_to_non_nullable as int, totalPages: null == totalPages ? _value.totalPages : totalPages // ignore: cast_nullable_to_non_nullable as int, hasNext: null == hasNext ? _value.hasNext : hasNext // ignore: cast_nullable_to_non_nullable as bool, hasPrevious: null == hasPrevious ? _value.hasPrevious : hasPrevious // ignore: cast_nullable_to_non_nullable as bool, ) as $Val); } } /// @nodoc abstract class _$$PaginationMetaImplCopyWith<$Res> implements $PaginationMetaCopyWith<$Res> { factory _$$PaginationMetaImplCopyWith(_$PaginationMetaImpl value, $Res Function(_$PaginationMetaImpl) then) = __$$PaginationMetaImplCopyWithImpl<$Res>; @override @useResult $Res call( {int currentPage, int perPage, int total, int totalPages, bool hasNext, bool hasPrevious}); } /// @nodoc class __$$PaginationMetaImplCopyWithImpl<$Res> extends _$PaginationMetaCopyWithImpl<$Res, _$PaginationMetaImpl> implements _$$PaginationMetaImplCopyWith<$Res> { __$$PaginationMetaImplCopyWithImpl( _$PaginationMetaImpl _value, $Res Function(_$PaginationMetaImpl) _then) : super(_value, _then); /// Create a copy of PaginationMeta /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? currentPage = null, Object? perPage = null, Object? total = null, Object? totalPages = null, Object? hasNext = null, Object? hasPrevious = null, }) { return _then(_$PaginationMetaImpl( currentPage: null == currentPage ? _value.currentPage : currentPage // ignore: cast_nullable_to_non_nullable as int, perPage: null == perPage ? _value.perPage : perPage // ignore: cast_nullable_to_non_nullable as int, total: null == total ? _value.total : total // ignore: cast_nullable_to_non_nullable as int, totalPages: null == totalPages ? _value.totalPages : totalPages // ignore: cast_nullable_to_non_nullable as int, hasNext: null == hasNext ? _value.hasNext : hasNext // ignore: cast_nullable_to_non_nullable as bool, hasPrevious: null == hasPrevious ? _value.hasPrevious : hasPrevious // ignore: cast_nullable_to_non_nullable as bool, )); } } /// @nodoc @JsonSerializable() class _$PaginationMetaImpl implements _PaginationMeta { const _$PaginationMetaImpl( {required this.currentPage, required this.perPage, required this.total, required this.totalPages, required this.hasNext, required this.hasPrevious}); factory _$PaginationMetaImpl.fromJson(Map json) => _$$PaginationMetaImplFromJson(json); @override final int currentPage; @override final int perPage; @override final int total; @override final int totalPages; @override final bool hasNext; @override final bool hasPrevious; @override String toString() { return 'PaginationMeta(currentPage: $currentPage, perPage: $perPage, total: $total, totalPages: $totalPages, hasNext: $hasNext, hasPrevious: $hasPrevious)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaginationMetaImpl && (identical(other.currentPage, currentPage) || other.currentPage == currentPage) && (identical(other.perPage, perPage) || other.perPage == perPage) && (identical(other.total, total) || other.total == total) && (identical(other.totalPages, totalPages) || other.totalPages == totalPages) && (identical(other.hasNext, hasNext) || other.hasNext == hasNext) && (identical(other.hasPrevious, hasPrevious) || other.hasPrevious == hasPrevious)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, currentPage, perPage, total, totalPages, hasNext, hasPrevious); /// Create a copy of PaginationMeta /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$PaginationMetaImplCopyWith<_$PaginationMetaImpl> get copyWith => __$$PaginationMetaImplCopyWithImpl<_$PaginationMetaImpl>( this, _$identity); @override Map toJson() { return _$$PaginationMetaImplToJson( this, ); } } abstract class _PaginationMeta implements PaginationMeta { const factory _PaginationMeta( {required final int currentPage, required final int perPage, required final int total, required final int totalPages, required final bool hasNext, required final bool hasPrevious}) = _$PaginationMetaImpl; factory _PaginationMeta.fromJson(Map json) = _$PaginationMetaImpl.fromJson; @override int get currentPage; @override int get perPage; @override int get total; @override int get totalPages; @override bool get hasNext; @override bool get hasPrevious; /// Create a copy of PaginationMeta /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) _$$PaginationMetaImplCopyWith<_$PaginationMetaImpl> get copyWith => throw _privateConstructorUsedError; } PagedResult _$PagedResultFromJson( Map json, T Function(Object?) fromJsonT) { return _PagedResult.fromJson(json, fromJsonT); } /// @nodoc mixin _$PagedResult { List get items => throw _privateConstructorUsedError; PaginationMeta get meta => throw _privateConstructorUsedError; /// Serializes this PagedResult to a JSON map. Map toJson(Object? Function(T) toJsonT) => throw _privateConstructorUsedError; /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $PagedResultCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PagedResultCopyWith { factory $PagedResultCopyWith( PagedResult value, $Res Function(PagedResult) then) = _$PagedResultCopyWithImpl>; @useResult $Res call({List items, PaginationMeta meta}); $PaginationMetaCopyWith<$Res> get meta; } /// @nodoc class _$PagedResultCopyWithImpl> implements $PagedResultCopyWith { _$PagedResultCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? items = null, Object? meta = null, }) { return _then(_value.copyWith( items: null == items ? _value.items : items // ignore: cast_nullable_to_non_nullable as List, meta: null == meta ? _value.meta : meta // ignore: cast_nullable_to_non_nullable as PaginationMeta, ) as $Val); } /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $PaginationMetaCopyWith<$Res> get meta { return $PaginationMetaCopyWith<$Res>(_value.meta, (value) { return _then(_value.copyWith(meta: value) as $Val); }); } } /// @nodoc abstract class _$$PagedResultImplCopyWith implements $PagedResultCopyWith { factory _$$PagedResultImplCopyWith(_$PagedResultImpl value, $Res Function(_$PagedResultImpl) then) = __$$PagedResultImplCopyWithImpl; @override @useResult $Res call({List items, PaginationMeta meta}); @override $PaginationMetaCopyWith<$Res> get meta; } /// @nodoc class __$$PagedResultImplCopyWithImpl extends _$PagedResultCopyWithImpl> implements _$$PagedResultImplCopyWith { __$$PagedResultImplCopyWithImpl( _$PagedResultImpl _value, $Res Function(_$PagedResultImpl) _then) : super(_value, _then); /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? items = null, Object? meta = null, }) { return _then(_$PagedResultImpl( items: null == items ? _value._items : items // ignore: cast_nullable_to_non_nullable as List, meta: null == meta ? _value.meta : meta // ignore: cast_nullable_to_non_nullable as PaginationMeta, )); } } /// @nodoc @JsonSerializable(genericArgumentFactories: true) class _$PagedResultImpl implements _PagedResult { const _$PagedResultImpl({required final List items, required this.meta}) : _items = items; factory _$PagedResultImpl.fromJson( Map json, T Function(Object?) fromJsonT) => _$$PagedResultImplFromJson(json, fromJsonT); final List _items; @override List get items { if (_items is EqualUnmodifiableListView) return _items; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_items); } @override final PaginationMeta meta; @override String toString() { return 'PagedResult<$T>(items: $items, meta: $meta)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PagedResultImpl && const DeepCollectionEquality().equals(other._items, _items) && (identical(other.meta, meta) || other.meta == meta)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(_items), meta); /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$PagedResultImplCopyWith> get copyWith => __$$PagedResultImplCopyWithImpl>( this, _$identity); @override Map toJson(Object? Function(T) toJsonT) { return _$$PagedResultImplToJson(this, toJsonT); } } abstract class _PagedResult implements PagedResult { const factory _PagedResult( {required final List items, required final PaginationMeta meta}) = _$PagedResultImpl; factory _PagedResult.fromJson( Map json, T Function(Object?) fromJsonT) = _$PagedResultImpl.fromJson; @override List get items; @override PaginationMeta get meta; /// Create a copy of PagedResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) _$$PagedResultImplCopyWith> get copyWith => throw _privateConstructorUsedError; }