Files
eatvio_app/lib/features/diary/models/photo.freezed.dart
2024-09-09 18:18:35 +03:00

209 lines
6.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 'photo.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');
Photo _$PhotoFromJson(Map<String, dynamic> json) {
return _Photo.fromJson(json);
}
/// @nodoc
mixin _$Photo {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'original_name')
String get originalName => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError;
/// Serializes this Photo to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PhotoCopyWith<$Res> {
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
_$PhotoCopyWithImpl<$Res, Photo>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'original_name') String originalName,
String path});
}
/// @nodoc
class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
implements $PhotoCopyWith<$Res> {
_$PhotoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? originalName = null,
Object? path = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
originalName: null == originalName
? _value.originalName
: originalName // ignore: cast_nullable_to_non_nullable
as String,
path: null == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
factory _$$PhotoImplCopyWith(
_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
__$$PhotoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'original_name') String originalName,
String path});
}
/// @nodoc
class __$$PhotoImplCopyWithImpl<$Res>
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
implements _$$PhotoImplCopyWith<$Res> {
__$$PhotoImplCopyWithImpl(
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
: super(_value, _then);
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? originalName = null,
Object? path = null,
}) {
return _then(_$PhotoImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
originalName: null == originalName
? _value.originalName
: originalName // ignore: cast_nullable_to_non_nullable
as String,
path: null == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$PhotoImpl implements _Photo {
const _$PhotoImpl(
{required this.id,
@JsonKey(name: 'original_name') required this.originalName,
required this.path});
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
_$$PhotoImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'original_name')
final String originalName;
@override
final String path;
@override
String toString() {
return 'Photo(id: $id, originalName: $originalName, path: $path)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PhotoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.originalName, originalName) ||
other.originalName == originalName) &&
(identical(other.path, path) || other.path == path));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, originalName, path);
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
__$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$PhotoImplToJson(
this,
);
}
}
abstract class _Photo implements Photo {
const factory _Photo(
{required final int id,
@JsonKey(name: 'original_name') required final String originalName,
required final String path}) = _$PhotoImpl;
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'original_name')
String get originalName;
@override
String get path;
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
throw _privateConstructorUsedError;
}