Files

290 lines
10 KiB
Dart
Raw Permalink Normal View History

2026-07-27 14:42:23 +02:00
// 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 'update_record.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UpdateRecord {
String get id; DateTime get timestamp; bool get success; List<String> get packages; String get message;
/// Create a copy of UpdateRecord
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UpdateRecordCopyWith<UpdateRecord> get copyWith => _$UpdateRecordCopyWithImpl<UpdateRecord>(this as UpdateRecord, _$identity);
/// Serializes this UpdateRecord to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateRecord&&(identical(other.id, id) || other.id == id)&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp)&&(identical(other.success, success) || other.success == success)&&const DeepCollectionEquality().equals(other.packages, packages)&&(identical(other.message, message) || other.message == message));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,timestamp,success,const DeepCollectionEquality().hash(packages),message);
@override
String toString() {
return 'UpdateRecord(id: $id, timestamp: $timestamp, success: $success, packages: $packages, message: $message)';
}
}
/// @nodoc
abstract mixin class $UpdateRecordCopyWith<$Res> {
factory $UpdateRecordCopyWith(UpdateRecord value, $Res Function(UpdateRecord) _then) = _$UpdateRecordCopyWithImpl;
@useResult
$Res call({
String id, DateTime timestamp, bool success, List<String> packages, String message
});
}
/// @nodoc
class _$UpdateRecordCopyWithImpl<$Res>
implements $UpdateRecordCopyWith<$Res> {
_$UpdateRecordCopyWithImpl(this._self, this._then);
final UpdateRecord _self;
final $Res Function(UpdateRecord) _then;
/// Create a copy of UpdateRecord
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? timestamp = null,Object? success = null,Object? packages = null,Object? message = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,timestamp: null == timestamp ? _self.timestamp : timestamp // ignore: cast_nullable_to_non_nullable
as DateTime,success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool,packages: null == packages ? _self.packages : packages // ignore: cast_nullable_to_non_nullable
as List<String>,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [UpdateRecord].
extension UpdateRecordPatterns on UpdateRecord {
/// 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( _UpdateRecord value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _UpdateRecord() 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( _UpdateRecord value) $default,){
final _that = this;
switch (_that) {
case _UpdateRecord():
return $default(_that);}
}
/// 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( _UpdateRecord value)? $default,){
final _that = this;
switch (_that) {
case _UpdateRecord() 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( String id, DateTime timestamp, bool success, List<String> packages, String message)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _UpdateRecord() when $default != null:
return $default(_that.id,_that.timestamp,_that.success,_that.packages,_that.message);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( String id, DateTime timestamp, bool success, List<String> packages, String message) $default,) {final _that = this;
switch (_that) {
case _UpdateRecord():
return $default(_that.id,_that.timestamp,_that.success,_that.packages,_that.message);}
}
/// 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( String id, DateTime timestamp, bool success, List<String> packages, String message)? $default,) {final _that = this;
switch (_that) {
case _UpdateRecord() when $default != null:
return $default(_that.id,_that.timestamp,_that.success,_that.packages,_that.message);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _UpdateRecord implements UpdateRecord {
const _UpdateRecord({this.id = '', required this.timestamp, required this.success, final List<String> packages = const <String>[], this.message = ''}): _packages = packages;
factory _UpdateRecord.fromJson(Map<String, dynamic> json) => _$UpdateRecordFromJson(json);
@override@JsonKey() final String id;
@override final DateTime timestamp;
@override final bool success;
final List<String> _packages;
@override@JsonKey() List<String> get packages {
if (_packages is EqualUnmodifiableListView) return _packages;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_packages);
}
@override@JsonKey() final String message;
/// Create a copy of UpdateRecord
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UpdateRecordCopyWith<_UpdateRecord> get copyWith => __$UpdateRecordCopyWithImpl<_UpdateRecord>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UpdateRecordToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateRecord&&(identical(other.id, id) || other.id == id)&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp)&&(identical(other.success, success) || other.success == success)&&const DeepCollectionEquality().equals(other._packages, _packages)&&(identical(other.message, message) || other.message == message));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,timestamp,success,const DeepCollectionEquality().hash(_packages),message);
@override
String toString() {
return 'UpdateRecord(id: $id, timestamp: $timestamp, success: $success, packages: $packages, message: $message)';
}
}
/// @nodoc
abstract mixin class _$UpdateRecordCopyWith<$Res> implements $UpdateRecordCopyWith<$Res> {
factory _$UpdateRecordCopyWith(_UpdateRecord value, $Res Function(_UpdateRecord) _then) = __$UpdateRecordCopyWithImpl;
@override @useResult
$Res call({
String id, DateTime timestamp, bool success, List<String> packages, String message
});
}
/// @nodoc
class __$UpdateRecordCopyWithImpl<$Res>
implements _$UpdateRecordCopyWith<$Res> {
__$UpdateRecordCopyWithImpl(this._self, this._then);
final _UpdateRecord _self;
final $Res Function(_UpdateRecord) _then;
/// Create a copy of UpdateRecord
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? timestamp = null,Object? success = null,Object? packages = null,Object? message = null,}) {
return _then(_UpdateRecord(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,timestamp: null == timestamp ? _self.timestamp : timestamp // ignore: cast_nullable_to_non_nullable
as DateTime,success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool,packages: null == packages ? _self._packages : packages // ignore: cast_nullable_to_non_nullable
as List<String>,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on