338 lines
10 KiB
Dart
338 lines
10 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 'time_entry.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',
|
|
);
|
|
|
|
TimeEntry _$TimeEntryFromJson(Map<String, dynamic> json) {
|
|
return _TimeEntry.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$TimeEntry {
|
|
int get id => throw _privateConstructorUsedError;
|
|
int get projectId => throw _privateConstructorUsedError;
|
|
DateTime get startTime => throw _privateConstructorUsedError;
|
|
DateTime? get endTime => throw _privateConstructorUsedError;
|
|
int? get durationSeconds => throw _privateConstructorUsedError;
|
|
String? get note => throw _privateConstructorUsedError;
|
|
List<String> get tags => throw _privateConstructorUsedError;
|
|
DateTime get createdAt => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this TimeEntry to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of TimeEntry
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$TimeEntryCopyWith<TimeEntry> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $TimeEntryCopyWith<$Res> {
|
|
factory $TimeEntryCopyWith(TimeEntry value, $Res Function(TimeEntry) then) =
|
|
_$TimeEntryCopyWithImpl<$Res, TimeEntry>;
|
|
@useResult
|
|
$Res call({
|
|
int id,
|
|
int projectId,
|
|
DateTime startTime,
|
|
DateTime? endTime,
|
|
int? durationSeconds,
|
|
String? note,
|
|
List<String> tags,
|
|
DateTime createdAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$TimeEntryCopyWithImpl<$Res, $Val extends TimeEntry>
|
|
implements $TimeEntryCopyWith<$Res> {
|
|
_$TimeEntryCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of TimeEntry
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? projectId = null,
|
|
Object? startTime = null,
|
|
Object? endTime = freezed,
|
|
Object? durationSeconds = freezed,
|
|
Object? note = freezed,
|
|
Object? tags = null,
|
|
Object? createdAt = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
projectId: null == projectId
|
|
? _value.projectId
|
|
: projectId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startTime: null == startTime
|
|
? _value.startTime
|
|
: startTime // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endTime: freezed == endTime
|
|
? _value.endTime
|
|
: endTime // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
durationSeconds: freezed == durationSeconds
|
|
? _value.durationSeconds
|
|
: durationSeconds // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
note: freezed == note
|
|
? _value.note
|
|
: note // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
tags: null == tags
|
|
? _value.tags
|
|
: tags // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$TimeEntryImplCopyWith<$Res>
|
|
implements $TimeEntryCopyWith<$Res> {
|
|
factory _$$TimeEntryImplCopyWith(
|
|
_$TimeEntryImpl value,
|
|
$Res Function(_$TimeEntryImpl) then,
|
|
) = __$$TimeEntryImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
int id,
|
|
int projectId,
|
|
DateTime startTime,
|
|
DateTime? endTime,
|
|
int? durationSeconds,
|
|
String? note,
|
|
List<String> tags,
|
|
DateTime createdAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$TimeEntryImplCopyWithImpl<$Res>
|
|
extends _$TimeEntryCopyWithImpl<$Res, _$TimeEntryImpl>
|
|
implements _$$TimeEntryImplCopyWith<$Res> {
|
|
__$$TimeEntryImplCopyWithImpl(
|
|
_$TimeEntryImpl _value,
|
|
$Res Function(_$TimeEntryImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of TimeEntry
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? projectId = null,
|
|
Object? startTime = null,
|
|
Object? endTime = freezed,
|
|
Object? durationSeconds = freezed,
|
|
Object? note = freezed,
|
|
Object? tags = null,
|
|
Object? createdAt = null,
|
|
}) {
|
|
return _then(
|
|
_$TimeEntryImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
projectId: null == projectId
|
|
? _value.projectId
|
|
: projectId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startTime: null == startTime
|
|
? _value.startTime
|
|
: startTime // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endTime: freezed == endTime
|
|
? _value.endTime
|
|
: endTime // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
durationSeconds: freezed == durationSeconds
|
|
? _value.durationSeconds
|
|
: durationSeconds // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
note: freezed == note
|
|
? _value.note
|
|
: note // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
tags: null == tags
|
|
? _value._tags
|
|
: tags // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$TimeEntryImpl implements _TimeEntry {
|
|
const _$TimeEntryImpl({
|
|
required this.id,
|
|
required this.projectId,
|
|
required this.startTime,
|
|
this.endTime,
|
|
this.durationSeconds,
|
|
this.note,
|
|
final List<String> tags = const [],
|
|
required this.createdAt,
|
|
}) : _tags = tags;
|
|
|
|
factory _$TimeEntryImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$TimeEntryImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final int projectId;
|
|
@override
|
|
final DateTime startTime;
|
|
@override
|
|
final DateTime? endTime;
|
|
@override
|
|
final int? durationSeconds;
|
|
@override
|
|
final String? note;
|
|
final List<String> _tags;
|
|
@override
|
|
@JsonKey()
|
|
List<String> get tags {
|
|
if (_tags is EqualUnmodifiableListView) return _tags;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_tags);
|
|
}
|
|
|
|
@override
|
|
final DateTime createdAt;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TimeEntry(id: $id, projectId: $projectId, startTime: $startTime, endTime: $endTime, durationSeconds: $durationSeconds, note: $note, tags: $tags, createdAt: $createdAt)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$TimeEntryImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.projectId, projectId) ||
|
|
other.projectId == projectId) &&
|
|
(identical(other.startTime, startTime) ||
|
|
other.startTime == startTime) &&
|
|
(identical(other.endTime, endTime) || other.endTime == endTime) &&
|
|
(identical(other.durationSeconds, durationSeconds) ||
|
|
other.durationSeconds == durationSeconds) &&
|
|
(identical(other.note, note) || other.note == note) &&
|
|
const DeepCollectionEquality().equals(other._tags, _tags) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
projectId,
|
|
startTime,
|
|
endTime,
|
|
durationSeconds,
|
|
note,
|
|
const DeepCollectionEquality().hash(_tags),
|
|
createdAt,
|
|
);
|
|
|
|
/// Create a copy of TimeEntry
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$TimeEntryImplCopyWith<_$TimeEntryImpl> get copyWith =>
|
|
__$$TimeEntryImplCopyWithImpl<_$TimeEntryImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$TimeEntryImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _TimeEntry implements TimeEntry {
|
|
const factory _TimeEntry({
|
|
required final int id,
|
|
required final int projectId,
|
|
required final DateTime startTime,
|
|
final DateTime? endTime,
|
|
final int? durationSeconds,
|
|
final String? note,
|
|
final List<String> tags,
|
|
required final DateTime createdAt,
|
|
}) = _$TimeEntryImpl;
|
|
|
|
factory _TimeEntry.fromJson(Map<String, dynamic> json) =
|
|
_$TimeEntryImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
int get projectId;
|
|
@override
|
|
DateTime get startTime;
|
|
@override
|
|
DateTime? get endTime;
|
|
@override
|
|
int? get durationSeconds;
|
|
@override
|
|
String? get note;
|
|
@override
|
|
List<String> get tags;
|
|
@override
|
|
DateTime get createdAt;
|
|
|
|
/// Create a copy of TimeEntry
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$TimeEntryImplCopyWith<_$TimeEntryImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|