Files
eatvio_app/lib/features/diary/services/diary_service.freezed.dart
2024-10-30 14:35:06 +03:00

221 lines
7.4 KiB
Dart

// 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 'diary_service.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');
ProductInMeal _$ProductInMealFromJson(Map<String, dynamic> json) {
return _ProductInMeal.fromJson(json);
}
/// @nodoc
mixin _$ProductInMeal {
@JsonKey(name: 'product_name')
String get productName => throw _privateConstructorUsedError;
@JsonKey(name: 'portion')
String get portion => throw _privateConstructorUsedError;
@JsonKey(name: 'quantity')
int get quantity => throw _privateConstructorUsedError;
/// Serializes this ProductInMeal to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProductInMeal
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProductInMealCopyWith<ProductInMeal> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProductInMealCopyWith<$Res> {
factory $ProductInMealCopyWith(
ProductInMeal value, $Res Function(ProductInMeal) then) =
_$ProductInMealCopyWithImpl<$Res, ProductInMeal>;
@useResult
$Res call(
{@JsonKey(name: 'product_name') String productName,
@JsonKey(name: 'portion') String portion,
@JsonKey(name: 'quantity') int quantity});
}
/// @nodoc
class _$ProductInMealCopyWithImpl<$Res, $Val extends ProductInMeal>
implements $ProductInMealCopyWith<$Res> {
_$ProductInMealCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProductInMeal
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productName = null,
Object? portion = null,
Object? quantity = null,
}) {
return _then(_value.copyWith(
productName: null == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String,
portion: null == portion
? _value.portion
: portion // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
) as $Val);
}
}
/// @nodoc
abstract class _$$ProductInMealImplCopyWith<$Res>
implements $ProductInMealCopyWith<$Res> {
factory _$$ProductInMealImplCopyWith(
_$ProductInMealImpl value, $Res Function(_$ProductInMealImpl) then) =
__$$ProductInMealImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'product_name') String productName,
@JsonKey(name: 'portion') String portion,
@JsonKey(name: 'quantity') int quantity});
}
/// @nodoc
class __$$ProductInMealImplCopyWithImpl<$Res>
extends _$ProductInMealCopyWithImpl<$Res, _$ProductInMealImpl>
implements _$$ProductInMealImplCopyWith<$Res> {
__$$ProductInMealImplCopyWithImpl(
_$ProductInMealImpl _value, $Res Function(_$ProductInMealImpl) _then)
: super(_value, _then);
/// Create a copy of ProductInMeal
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productName = null,
Object? portion = null,
Object? quantity = null,
}) {
return _then(_$ProductInMealImpl(
productName: null == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String,
portion: null == portion
? _value.portion
: portion // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ProductInMealImpl implements _ProductInMeal {
const _$ProductInMealImpl(
{@JsonKey(name: 'product_name') required this.productName,
@JsonKey(name: 'portion') required this.portion,
@JsonKey(name: 'quantity') required this.quantity});
factory _$ProductInMealImpl.fromJson(Map<String, dynamic> json) =>
_$$ProductInMealImplFromJson(json);
@override
@JsonKey(name: 'product_name')
final String productName;
@override
@JsonKey(name: 'portion')
final String portion;
@override
@JsonKey(name: 'quantity')
final int quantity;
@override
String toString() {
return 'ProductInMeal(productName: $productName, portion: $portion, quantity: $quantity)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProductInMealImpl &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.portion, portion) || other.portion == portion) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, productName, portion, quantity);
/// Create a copy of ProductInMeal
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProductInMealImplCopyWith<_$ProductInMealImpl> get copyWith =>
__$$ProductInMealImplCopyWithImpl<_$ProductInMealImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ProductInMealImplToJson(
this,
);
}
}
abstract class _ProductInMeal implements ProductInMeal {
const factory _ProductInMeal(
{@JsonKey(name: 'product_name') required final String productName,
@JsonKey(name: 'portion') required final String portion,
@JsonKey(name: 'quantity') required final int quantity}) =
_$ProductInMealImpl;
factory _ProductInMeal.fromJson(Map<String, dynamic> json) =
_$ProductInMealImpl.fromJson;
@override
@JsonKey(name: 'product_name')
String get productName;
@override
@JsonKey(name: 'portion')
String get portion;
@override
@JsonKey(name: 'quantity')
int get quantity;
/// Create a copy of ProductInMeal
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProductInMealImplCopyWith<_$ProductInMealImpl> get copyWith =>
throw _privateConstructorUsedError;
}