Files
tm_app/lib/data/services/model/feedback_stats/feedback_stats.freezed.dart
T
2025-08-27 09:40:48 +03:30

290 lines
12 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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 'feedback_stats.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$FeedbackStats {
@JsonKey(name: 'company_id') String? get companyId;@JsonKey(name: 'last_updated') int? get lastUpdated;@JsonKey(name: 'total_dislikes') int? get totalDislikes;@JsonKey(name: 'total_feedback') int? get totalFeedback;@JsonKey(name: 'total_likes') int? get totalLikes;
/// Create a copy of FeedbackStats
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$FeedbackStatsCopyWith<FeedbackStats> get copyWith => _$FeedbackStatsCopyWithImpl<FeedbackStats>(this as FeedbackStats, _$identity);
/// Serializes this FeedbackStats to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is FeedbackStats&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated)&&(identical(other.totalDislikes, totalDislikes) || other.totalDislikes == totalDislikes)&&(identical(other.totalFeedback, totalFeedback) || other.totalFeedback == totalFeedback)&&(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,companyId,lastUpdated,totalDislikes,totalFeedback,totalLikes);
@override
String toString() {
return 'FeedbackStats(companyId: $companyId, lastUpdated: $lastUpdated, totalDislikes: $totalDislikes, totalFeedback: $totalFeedback, totalLikes: $totalLikes)';
}
}
/// @nodoc
abstract mixin class $FeedbackStatsCopyWith<$Res> {
factory $FeedbackStatsCopyWith(FeedbackStats value, $Res Function(FeedbackStats) _then) = _$FeedbackStatsCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'last_updated') int? lastUpdated,@JsonKey(name: 'total_dislikes') int? totalDislikes,@JsonKey(name: 'total_feedback') int? totalFeedback,@JsonKey(name: 'total_likes') int? totalLikes
});
}
/// @nodoc
class _$FeedbackStatsCopyWithImpl<$Res>
implements $FeedbackStatsCopyWith<$Res> {
_$FeedbackStatsCopyWithImpl(this._self, this._then);
final FeedbackStats _self;
final $Res Function(FeedbackStats) _then;
/// Create a copy of FeedbackStats
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? companyId = freezed,Object? lastUpdated = freezed,Object? totalDislikes = freezed,Object? totalFeedback = freezed,Object? totalLikes = freezed,}) {
return _then(_self.copyWith(
companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String?,lastUpdated: freezed == lastUpdated ? _self.lastUpdated : lastUpdated // ignore: cast_nullable_to_non_nullable
as int?,totalDislikes: freezed == totalDislikes ? _self.totalDislikes : totalDislikes // ignore: cast_nullable_to_non_nullable
as int?,totalFeedback: freezed == totalFeedback ? _self.totalFeedback : totalFeedback // ignore: cast_nullable_to_non_nullable
as int?,totalLikes: freezed == totalLikes ? _self.totalLikes : totalLikes // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [FeedbackStats].
extension FeedbackStatsPatterns on FeedbackStats {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _FeedbackStats value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _FeedbackStats() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _FeedbackStats value) $default,){
final _that = this;
switch (_that) {
case _FeedbackStats():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _FeedbackStats value)? $default,){
final _that = this;
switch (_that) {
case _FeedbackStats() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'last_updated') int? lastUpdated, @JsonKey(name: 'total_dislikes') int? totalDislikes, @JsonKey(name: 'total_feedback') int? totalFeedback, @JsonKey(name: 'total_likes') int? totalLikes)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _FeedbackStats() when $default != null:
return $default(_that.companyId,_that.lastUpdated,_that.totalDislikes,_that.totalFeedback,_that.totalLikes);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'last_updated') int? lastUpdated, @JsonKey(name: 'total_dislikes') int? totalDislikes, @JsonKey(name: 'total_feedback') int? totalFeedback, @JsonKey(name: 'total_likes') int? totalLikes) $default,) {final _that = this;
switch (_that) {
case _FeedbackStats():
return $default(_that.companyId,_that.lastUpdated,_that.totalDislikes,_that.totalFeedback,_that.totalLikes);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'company_id') String? companyId, @JsonKey(name: 'last_updated') int? lastUpdated, @JsonKey(name: 'total_dislikes') int? totalDislikes, @JsonKey(name: 'total_feedback') int? totalFeedback, @JsonKey(name: 'total_likes') int? totalLikes)? $default,) {final _that = this;
switch (_that) {
case _FeedbackStats() when $default != null:
return $default(_that.companyId,_that.lastUpdated,_that.totalDislikes,_that.totalFeedback,_that.totalLikes);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _FeedbackStats implements FeedbackStats {
const _FeedbackStats({@JsonKey(name: 'company_id') required this.companyId, @JsonKey(name: 'last_updated') required this.lastUpdated, @JsonKey(name: 'total_dislikes') required this.totalDislikes, @JsonKey(name: 'total_feedback') required this.totalFeedback, @JsonKey(name: 'total_likes') required this.totalLikes});
factory _FeedbackStats.fromJson(Map<String, dynamic> json) => _$FeedbackStatsFromJson(json);
@override@JsonKey(name: 'company_id') final String? companyId;
@override@JsonKey(name: 'last_updated') final int? lastUpdated;
@override@JsonKey(name: 'total_dislikes') final int? totalDislikes;
@override@JsonKey(name: 'total_feedback') final int? totalFeedback;
@override@JsonKey(name: 'total_likes') final int? totalLikes;
/// Create a copy of FeedbackStats
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$FeedbackStatsCopyWith<_FeedbackStats> get copyWith => __$FeedbackStatsCopyWithImpl<_FeedbackStats>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$FeedbackStatsToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _FeedbackStats&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.lastUpdated, lastUpdated) || other.lastUpdated == lastUpdated)&&(identical(other.totalDislikes, totalDislikes) || other.totalDislikes == totalDislikes)&&(identical(other.totalFeedback, totalFeedback) || other.totalFeedback == totalFeedback)&&(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,companyId,lastUpdated,totalDislikes,totalFeedback,totalLikes);
@override
String toString() {
return 'FeedbackStats(companyId: $companyId, lastUpdated: $lastUpdated, totalDislikes: $totalDislikes, totalFeedback: $totalFeedback, totalLikes: $totalLikes)';
}
}
/// @nodoc
abstract mixin class _$FeedbackStatsCopyWith<$Res> implements $FeedbackStatsCopyWith<$Res> {
factory _$FeedbackStatsCopyWith(_FeedbackStats value, $Res Function(_FeedbackStats) _then) = __$FeedbackStatsCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'company_id') String? companyId,@JsonKey(name: 'last_updated') int? lastUpdated,@JsonKey(name: 'total_dislikes') int? totalDislikes,@JsonKey(name: 'total_feedback') int? totalFeedback,@JsonKey(name: 'total_likes') int? totalLikes
});
}
/// @nodoc
class __$FeedbackStatsCopyWithImpl<$Res>
implements _$FeedbackStatsCopyWith<$Res> {
__$FeedbackStatsCopyWithImpl(this._self, this._then);
final _FeedbackStats _self;
final $Res Function(_FeedbackStats) _then;
/// Create a copy of FeedbackStats
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? companyId = freezed,Object? lastUpdated = freezed,Object? totalDislikes = freezed,Object? totalFeedback = freezed,Object? totalLikes = freezed,}) {
return _then(_FeedbackStats(
companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String?,lastUpdated: freezed == lastUpdated ? _self.lastUpdated : lastUpdated // ignore: cast_nullable_to_non_nullable
as int?,totalDislikes: freezed == totalDislikes ? _self.totalDislikes : totalDislikes // ignore: cast_nullable_to_non_nullable
as int?,totalFeedback: freezed == totalFeedback ? _self.totalFeedback : totalFeedback // ignore: cast_nullable_to_non_nullable
as int?,totalLikes: freezed == totalLikes ? _self.totalLikes : totalLikes // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on