Files
cutdex/lib/integrations/runtime/processing_resource_state.freezed.dart
lingjhf 27e77fff39 feat: initial Cutdex application
Add the Flutter video editing application with project management, media
import, timeline editing, preview, AI assistance, diagnostics and settings.

Include shared UI and native host packages, platform runners, application
tests and release tooling.

Provide usage and contribution guides, the MIT license and third-party
notices. Exclude local credentials, build outputs and validation data.
2026-10-05 23:36:23 +08:00

581 lines
19 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
// 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 'processing_resource_state.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ProcessingResourcesSnapshot {
List<ProcessingResourceInstall> get installs;
Set<ProcessingCapability> get paused;
Map<ProcessingCapability, int> get rates;
bool get subtitleDownloading;
bool get subtitlePaused;
int get subtitleDownloadedBytes;
int get subtitleTotalBytes;
int get subtitleBytesPerSecond;
/// Create a copy of ProcessingResourcesSnapshot
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProcessingResourcesSnapshotCopyWith<ProcessingResourcesSnapshot>
get copyWith =>
_$ProcessingResourcesSnapshotCopyWithImpl<ProcessingResourcesSnapshot>(
this as ProcessingResourcesSnapshot,
_$identity,
);
@override
bool operator ==(Object other) {
final _this = this as ProcessingResourcesSnapshot;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ProcessingResourcesSnapshot &&
const DeepCollectionEquality().equals(
other.installs,
_this.installs,
) &&
const DeepCollectionEquality().equals(other.paused, _this.paused) &&
const DeepCollectionEquality().equals(other.rates, _this.rates) &&
(identical(other.subtitleDownloading, _this.subtitleDownloading) ||
other.subtitleDownloading == _this.subtitleDownloading) &&
(identical(other.subtitlePaused, _this.subtitlePaused) ||
other.subtitlePaused == _this.subtitlePaused) &&
(identical(
other.subtitleDownloadedBytes,
_this.subtitleDownloadedBytes,
) ||
other.subtitleDownloadedBytes ==
_this.subtitleDownloadedBytes) &&
(identical(other.subtitleTotalBytes, _this.subtitleTotalBytes) ||
other.subtitleTotalBytes == _this.subtitleTotalBytes) &&
(identical(
other.subtitleBytesPerSecond,
_this.subtitleBytesPerSecond,
) ||
other.subtitleBytesPerSecond == _this.subtitleBytesPerSecond));
}
@override
int get hashCode {
final _this = this as ProcessingResourcesSnapshot;
return Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_this.installs),
const DeepCollectionEquality().hash(_this.paused),
const DeepCollectionEquality().hash(_this.rates),
_this.subtitleDownloading,
_this.subtitlePaused,
_this.subtitleDownloadedBytes,
_this.subtitleTotalBytes,
_this.subtitleBytesPerSecond,
);
}
@override
String toString() {
final _this = this as ProcessingResourcesSnapshot;
return 'ProcessingResourcesSnapshot(installs: ${_this.installs}, paused: ${_this.paused}, rates: ${_this.rates}, subtitleDownloading: ${_this.subtitleDownloading}, subtitlePaused: ${_this.subtitlePaused}, subtitleDownloadedBytes: ${_this.subtitleDownloadedBytes}, subtitleTotalBytes: ${_this.subtitleTotalBytes}, subtitleBytesPerSecond: ${_this.subtitleBytesPerSecond})';
}
}
/// @nodoc
abstract mixin class $ProcessingResourcesSnapshotCopyWith<$Res> {
factory $ProcessingResourcesSnapshotCopyWith(
ProcessingResourcesSnapshot value,
$Res Function(ProcessingResourcesSnapshot) _then,
) = _$ProcessingResourcesSnapshotCopyWithImpl;
@useResult
$Res call({
List<ProcessingResourceInstall> installs,
Set<ProcessingCapability> paused,
Map<ProcessingCapability, int> rates,
bool subtitleDownloading,
bool subtitlePaused,
int subtitleDownloadedBytes,
int subtitleTotalBytes,
int subtitleBytesPerSecond,
});
}
/// @nodoc
class _$ProcessingResourcesSnapshotCopyWithImpl<$Res>
implements $ProcessingResourcesSnapshotCopyWith<$Res> {
_$ProcessingResourcesSnapshotCopyWithImpl(this._self, this._then);
final ProcessingResourcesSnapshot _self;
final $Res Function(ProcessingResourcesSnapshot) _then;
/// Create a copy of ProcessingResourcesSnapshot
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? installs = null,
Object? paused = null,
Object? rates = null,
Object? subtitleDownloading = null,
Object? subtitlePaused = null,
Object? subtitleDownloadedBytes = null,
Object? subtitleTotalBytes = null,
Object? subtitleBytesPerSecond = null,
}) {
return _then(
ProcessingResourcesSnapshot(
installs: null == installs
? _self.installs
: installs // ignore: cast_nullable_to_non_nullable
as List<ProcessingResourceInstall>,
paused: null == paused
? _self.paused
: paused // ignore: cast_nullable_to_non_nullable
as Set<ProcessingCapability>,
rates: null == rates
? _self.rates
: rates // ignore: cast_nullable_to_non_nullable
as Map<ProcessingCapability, int>,
subtitleDownloading: null == subtitleDownloading
? _self.subtitleDownloading
: subtitleDownloading // ignore: cast_nullable_to_non_nullable
as bool,
subtitlePaused: null == subtitlePaused
? _self.subtitlePaused
: subtitlePaused // ignore: cast_nullable_to_non_nullable
as bool,
subtitleDownloadedBytes: null == subtitleDownloadedBytes
? _self.subtitleDownloadedBytes
: subtitleDownloadedBytes // ignore: cast_nullable_to_non_nullable
as int,
subtitleTotalBytes: null == subtitleTotalBytes
? _self.subtitleTotalBytes
: subtitleTotalBytes // ignore: cast_nullable_to_non_nullable
as int,
subtitleBytesPerSecond: null == subtitleBytesPerSecond
? _self.subtitleBytesPerSecond
: subtitleBytesPerSecond // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// Adds pattern-matching-related methods to [ProcessingResourcesSnapshot].
extension ProcessingResourcesSnapshotPatterns on ProcessingResourcesSnapshot {
/// 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(_ProcessingResourcesSnapshot value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot() 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(_ProcessingResourcesSnapshot value) $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot():
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(_ProcessingResourcesSnapshot value)? $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot() 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(
List<ProcessingResourceInstall> installs,
Set<ProcessingCapability> paused,
Map<ProcessingCapability, int> rates,
bool subtitleDownloading,
bool subtitlePaused,
int subtitleDownloadedBytes,
int subtitleTotalBytes,
int subtitleBytesPerSecond,
)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot() when $default != null:
return $default(
_that.installs,
_that.paused,
_that.rates,
_that.subtitleDownloading,
_that.subtitlePaused,
_that.subtitleDownloadedBytes,
_that.subtitleTotalBytes,
_that.subtitleBytesPerSecond,
);
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(
List<ProcessingResourceInstall> installs,
Set<ProcessingCapability> paused,
Map<ProcessingCapability, int> rates,
bool subtitleDownloading,
bool subtitlePaused,
int subtitleDownloadedBytes,
int subtitleTotalBytes,
int subtitleBytesPerSecond,
)
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot():
return $default(
_that.installs,
_that.paused,
_that.rates,
_that.subtitleDownloading,
_that.subtitlePaused,
_that.subtitleDownloadedBytes,
_that.subtitleTotalBytes,
_that.subtitleBytesPerSecond,
);
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(
List<ProcessingResourceInstall> installs,
Set<ProcessingCapability> paused,
Map<ProcessingCapability, int> rates,
bool subtitleDownloading,
bool subtitlePaused,
int subtitleDownloadedBytes,
int subtitleTotalBytes,
int subtitleBytesPerSecond,
)?
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcesSnapshot() when $default != null:
return $default(
_that.installs,
_that.paused,
_that.rates,
_that.subtitleDownloading,
_that.subtitlePaused,
_that.subtitleDownloadedBytes,
_that.subtitleTotalBytes,
_that.subtitleBytesPerSecond,
);
case _:
return null;
}
}
}
/// @nodoc
class _ProcessingResourcesSnapshot implements ProcessingResourcesSnapshot {
const _ProcessingResourcesSnapshot({
List<ProcessingResourceInstall> installs = const [],
Set<ProcessingCapability> paused = const {},
Map<ProcessingCapability, int> rates = const {},
this.subtitleDownloading = false,
this.subtitlePaused = false,
this.subtitleDownloadedBytes = 0,
this.subtitleTotalBytes = 0,
this.subtitleBytesPerSecond = 0,
}) : _installs = installs,
_paused = paused,
_rates = rates;
final List<ProcessingResourceInstall> _installs;
@override
@JsonKey()
List<ProcessingResourceInstall> get installs {
if (_installs is EqualUnmodifiableListView) return _installs;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_installs);
}
final Set<ProcessingCapability> _paused;
@override
@JsonKey()
Set<ProcessingCapability> get paused {
if (_paused is EqualUnmodifiableSetView) return _paused;
// ignore: implicit_dynamic_type
return EqualUnmodifiableSetView(_paused);
}
final Map<ProcessingCapability, int> _rates;
@override
@JsonKey()
Map<ProcessingCapability, int> get rates {
if (_rates is EqualUnmodifiableMapView) return _rates;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_rates);
}
@override
@JsonKey()
final bool subtitleDownloading;
@override
@JsonKey()
final bool subtitlePaused;
@override
@JsonKey()
final int subtitleDownloadedBytes;
@override
@JsonKey()
final int subtitleTotalBytes;
@override
@JsonKey()
final int subtitleBytesPerSecond;
/// Create a copy of ProcessingResourcesSnapshot
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProcessingResourcesSnapshotCopyWith<_ProcessingResourcesSnapshot>
get copyWith =>
__$ProcessingResourcesSnapshotCopyWithImpl<_ProcessingResourcesSnapshot>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ProcessingResourcesSnapshot &&
const DeepCollectionEquality().equals(other.installs, _installs) &&
const DeepCollectionEquality().equals(other.paused, _paused) &&
const DeepCollectionEquality().equals(other.rates, _rates) &&
(identical(other.subtitleDownloading, subtitleDownloading) ||
other.subtitleDownloading == subtitleDownloading) &&
(identical(other.subtitlePaused, subtitlePaused) ||
other.subtitlePaused == subtitlePaused) &&
(identical(
other.subtitleDownloadedBytes,
subtitleDownloadedBytes,
) ||
other.subtitleDownloadedBytes == subtitleDownloadedBytes) &&
(identical(other.subtitleTotalBytes, subtitleTotalBytes) ||
other.subtitleTotalBytes == subtitleTotalBytes) &&
(identical(other.subtitleBytesPerSecond, subtitleBytesPerSecond) ||
other.subtitleBytesPerSecond == subtitleBytesPerSecond));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_installs),
const DeepCollectionEquality().hash(_paused),
const DeepCollectionEquality().hash(_rates),
subtitleDownloading,
subtitlePaused,
subtitleDownloadedBytes,
subtitleTotalBytes,
subtitleBytesPerSecond,
);
}
@override
String toString() {
return 'ProcessingResourcesSnapshot(installs: $installs, paused: $paused, rates: $rates, subtitleDownloading: $subtitleDownloading, subtitlePaused: $subtitlePaused, subtitleDownloadedBytes: $subtitleDownloadedBytes, subtitleTotalBytes: $subtitleTotalBytes, subtitleBytesPerSecond: $subtitleBytesPerSecond)';
}
}
/// @nodoc
abstract mixin class _$ProcessingResourcesSnapshotCopyWith<$Res>
implements $ProcessingResourcesSnapshotCopyWith<$Res> {
factory _$ProcessingResourcesSnapshotCopyWith(
_ProcessingResourcesSnapshot value,
$Res Function(_ProcessingResourcesSnapshot) _then,
) = __$ProcessingResourcesSnapshotCopyWithImpl;
@override
@useResult
$Res call({
List<ProcessingResourceInstall> installs,
Set<ProcessingCapability> paused,
Map<ProcessingCapability, int> rates,
bool subtitleDownloading,
bool subtitlePaused,
int subtitleDownloadedBytes,
int subtitleTotalBytes,
int subtitleBytesPerSecond,
});
}
/// @nodoc
class __$ProcessingResourcesSnapshotCopyWithImpl<$Res>
implements _$ProcessingResourcesSnapshotCopyWith<$Res> {
__$ProcessingResourcesSnapshotCopyWithImpl(this._self, this._then);
final _ProcessingResourcesSnapshot _self;
final $Res Function(_ProcessingResourcesSnapshot) _then;
/// Create a copy of ProcessingResourcesSnapshot
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? installs = null,
Object? paused = null,
Object? rates = null,
Object? subtitleDownloading = null,
Object? subtitlePaused = null,
Object? subtitleDownloadedBytes = null,
Object? subtitleTotalBytes = null,
Object? subtitleBytesPerSecond = null,
}) {
return _then(
_ProcessingResourcesSnapshot(
installs: null == installs
? _self._installs
: installs // ignore: cast_nullable_to_non_nullable
as List<ProcessingResourceInstall>,
paused: null == paused
? _self._paused
: paused // ignore: cast_nullable_to_non_nullable
as Set<ProcessingCapability>,
rates: null == rates
? _self._rates
: rates // ignore: cast_nullable_to_non_nullable
as Map<ProcessingCapability, int>,
subtitleDownloading: null == subtitleDownloading
? _self.subtitleDownloading
: subtitleDownloading // ignore: cast_nullable_to_non_nullable
as bool,
subtitlePaused: null == subtitlePaused
? _self.subtitlePaused
: subtitlePaused // ignore: cast_nullable_to_non_nullable
as bool,
subtitleDownloadedBytes: null == subtitleDownloadedBytes
? _self.subtitleDownloadedBytes
: subtitleDownloadedBytes // ignore: cast_nullable_to_non_nullable
as int,
subtitleTotalBytes: null == subtitleTotalBytes
? _self.subtitleTotalBytes
: subtitleTotalBytes // ignore: cast_nullable_to_non_nullable
as int,
subtitleBytesPerSecond: null == subtitleBytesPerSecond
? _self.subtitleBytesPerSecond
: subtitleBytesPerSecond // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}