Files
cutdex/lib/integrations/runtime/processing_resource_repository.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

1363 lines
39 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_repository.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ProcessingResourceArtifact implements DiagnosticableTreeMixin {
String get path;
Uri get url;
String get sha256;
int get bytes;
/// Create a copy of ProcessingResourceArtifact
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProcessingResourceArtifactCopyWith<ProcessingResourceArtifact>
get copyWith =>
_$ProcessingResourceArtifactCopyWithImpl<ProcessingResourceArtifact>(
this as ProcessingResourceArtifact,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
final _this = this as ProcessingResourceArtifact;
properties
..add(DiagnosticsProperty('type', 'ProcessingResourceArtifact'))
..add(DiagnosticsProperty('path', _this.path))
..add(DiagnosticsProperty('url', _this.url))
..add(DiagnosticsProperty('sha256', _this.sha256))
..add(DiagnosticsProperty('bytes', _this.bytes));
}
@override
bool operator ==(Object other) {
final _this = this as ProcessingResourceArtifact;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ProcessingResourceArtifact &&
(identical(other.path, _this.path) || other.path == _this.path) &&
(identical(other.url, _this.url) || other.url == _this.url) &&
(identical(other.sha256, _this.sha256) ||
other.sha256 == _this.sha256) &&
(identical(other.bytes, _this.bytes) ||
other.bytes == _this.bytes));
}
@override
int get hashCode {
final _this = this as ProcessingResourceArtifact;
return Object.hash(
runtimeType,
_this.path,
_this.url,
_this.sha256,
_this.bytes,
);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
final _this = this as ProcessingResourceArtifact;
return 'ProcessingResourceArtifact(path: ${_this.path}, url: ${_this.url}, sha256: ${_this.sha256}, bytes: ${_this.bytes})';
}
}
/// @nodoc
abstract mixin class $ProcessingResourceArtifactCopyWith<$Res> {
factory $ProcessingResourceArtifactCopyWith(
ProcessingResourceArtifact value,
$Res Function(ProcessingResourceArtifact) _then,
) = _$ProcessingResourceArtifactCopyWithImpl;
@useResult
$Res call({String path, Uri url, String sha256, int bytes});
}
/// @nodoc
class _$ProcessingResourceArtifactCopyWithImpl<$Res>
implements $ProcessingResourceArtifactCopyWith<$Res> {
_$ProcessingResourceArtifactCopyWithImpl(this._self, this._then);
final ProcessingResourceArtifact _self;
final $Res Function(ProcessingResourceArtifact) _then;
/// Create a copy of ProcessingResourceArtifact
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? path = null,
Object? url = null,
Object? sha256 = null,
Object? bytes = null,
}) {
return _then(
ProcessingResourceArtifact(
path: null == path
? _self.path
: path // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _self.url
: url // ignore: cast_nullable_to_non_nullable
as Uri,
sha256: null == sha256
? _self.sha256
: sha256 // ignore: cast_nullable_to_non_nullable
as String,
bytes: null == bytes
? _self.bytes
: bytes // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// Adds pattern-matching-related methods to [ProcessingResourceArtifact].
extension ProcessingResourceArtifactPatterns on ProcessingResourceArtifact {
/// 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(_ProcessingResourceArtifact value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact() 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(_ProcessingResourceArtifact value) $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact():
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(_ProcessingResourceArtifact value)? $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact() 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 path, Uri url, String sha256, int bytes)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact() when $default != null:
return $default(_that.path, _that.url, _that.sha256, _that.bytes);
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 path, Uri url, String sha256, int bytes) $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact():
return $default(_that.path, _that.url, _that.sha256, _that.bytes);
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(String path, Uri url, String sha256, int bytes)? $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceArtifact() when $default != null:
return $default(_that.path, _that.url, _that.sha256, _that.bytes);
case _:
return null;
}
}
}
/// @nodoc
class _ProcessingResourceArtifact extends ProcessingResourceArtifact
with DiagnosticableTreeMixin {
const _ProcessingResourceArtifact({
required this.path,
required this.url,
required this.sha256,
required this.bytes,
}) : super._();
@override
final String path;
@override
final Uri url;
@override
final String sha256;
@override
final int bytes;
/// Create a copy of ProcessingResourceArtifact
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProcessingResourceArtifactCopyWith<_ProcessingResourceArtifact>
get copyWith =>
__$ProcessingResourceArtifactCopyWithImpl<_ProcessingResourceArtifact>(
this,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ProcessingResourceArtifact'))
..add(DiagnosticsProperty('path', path))
..add(DiagnosticsProperty('url', url))
..add(DiagnosticsProperty('sha256', sha256))
..add(DiagnosticsProperty('bytes', bytes));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ProcessingResourceArtifact &&
(identical(other.path, path) || other.path == path) &&
(identical(other.url, url) || other.url == url) &&
(identical(other.sha256, sha256) || other.sha256 == sha256) &&
(identical(other.bytes, bytes) || other.bytes == bytes));
}
@override
int get hashCode {
return Object.hash(runtimeType, path, url, sha256, bytes);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'ProcessingResourceArtifact(path: $path, url: $url, sha256: $sha256, bytes: $bytes)';
}
}
/// @nodoc
abstract mixin class _$ProcessingResourceArtifactCopyWith<$Res>
implements $ProcessingResourceArtifactCopyWith<$Res> {
factory _$ProcessingResourceArtifactCopyWith(
_ProcessingResourceArtifact value,
$Res Function(_ProcessingResourceArtifact) _then,
) = __$ProcessingResourceArtifactCopyWithImpl;
@override
@useResult
$Res call({String path, Uri url, String sha256, int bytes});
}
/// @nodoc
class __$ProcessingResourceArtifactCopyWithImpl<$Res>
implements _$ProcessingResourceArtifactCopyWith<$Res> {
__$ProcessingResourceArtifactCopyWithImpl(this._self, this._then);
final _ProcessingResourceArtifact _self;
final $Res Function(_ProcessingResourceArtifact) _then;
/// Create a copy of ProcessingResourceArtifact
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? path = null,
Object? url = null,
Object? sha256 = null,
Object? bytes = null,
}) {
return _then(
_ProcessingResourceArtifact(
path: null == path
? _self.path
: path // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _self.url
: url // ignore: cast_nullable_to_non_nullable
as Uri,
sha256: null == sha256
? _self.sha256
: sha256 // ignore: cast_nullable_to_non_nullable
as String,
bytes: null == bytes
? _self.bytes
: bytes // ignore: cast_nullable_to_non_nullable
as int,
),
);
}
}
/// @nodoc
mixin _$ProcessingResourcePackage implements DiagnosticableTreeMixin {
ProcessingCapability get capability;
String get id;
String get version;
String get name;
String get description;
List<ProcessingResourceArtifact> get artifacts;
/// Create a copy of ProcessingResourcePackage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProcessingResourcePackageCopyWith<ProcessingResourcePackage> get copyWith =>
_$ProcessingResourcePackageCopyWithImpl<ProcessingResourcePackage>(
this as ProcessingResourcePackage,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
final _this = this as ProcessingResourcePackage;
properties
..add(DiagnosticsProperty('type', 'ProcessingResourcePackage'))
..add(DiagnosticsProperty('capability', _this.capability))
..add(DiagnosticsProperty('id', _this.id))
..add(DiagnosticsProperty('version', _this.version))
..add(DiagnosticsProperty('name', _this.name))
..add(DiagnosticsProperty('description', _this.description))
..add(DiagnosticsProperty('artifacts', _this.artifacts));
}
@override
bool operator ==(Object other) {
final _this = this as ProcessingResourcePackage;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ProcessingResourcePackage &&
(identical(other.capability, _this.capability) ||
other.capability == _this.capability) &&
(identical(other.id, _this.id) || other.id == _this.id) &&
(identical(other.version, _this.version) ||
other.version == _this.version) &&
(identical(other.name, _this.name) || other.name == _this.name) &&
(identical(other.description, _this.description) ||
other.description == _this.description) &&
const DeepCollectionEquality().equals(
other.artifacts,
_this.artifacts,
));
}
@override
int get hashCode {
final _this = this as ProcessingResourcePackage;
return Object.hash(
runtimeType,
_this.capability,
_this.id,
_this.version,
_this.name,
_this.description,
const DeepCollectionEquality().hash(_this.artifacts),
);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
final _this = this as ProcessingResourcePackage;
return 'ProcessingResourcePackage(capability: ${_this.capability}, id: ${_this.id}, version: ${_this.version}, name: ${_this.name}, description: ${_this.description}, artifacts: ${_this.artifacts})';
}
}
/// @nodoc
abstract mixin class $ProcessingResourcePackageCopyWith<$Res> {
factory $ProcessingResourcePackageCopyWith(
ProcessingResourcePackage value,
$Res Function(ProcessingResourcePackage) _then,
) = _$ProcessingResourcePackageCopyWithImpl;
@useResult
$Res call({
ProcessingCapability capability,
String id,
String version,
String name,
String description,
List<ProcessingResourceArtifact> artifacts,
});
}
/// @nodoc
class _$ProcessingResourcePackageCopyWithImpl<$Res>
implements $ProcessingResourcePackageCopyWith<$Res> {
_$ProcessingResourcePackageCopyWithImpl(this._self, this._then);
final ProcessingResourcePackage _self;
final $Res Function(ProcessingResourcePackage) _then;
/// Create a copy of ProcessingResourcePackage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? capability = null,
Object? id = null,
Object? version = null,
Object? name = null,
Object? description = null,
Object? artifacts = null,
}) {
return _then(
ProcessingResourcePackage(
capability: null == capability
? _self.capability
: capability // ignore: cast_nullable_to_non_nullable
as ProcessingCapability,
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as String,
version: null == version
? _self.version
: version // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _self.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _self.description
: description // ignore: cast_nullable_to_non_nullable
as String,
artifacts: null == artifacts
? _self.artifacts
: artifacts // ignore: cast_nullable_to_non_nullable
as List<ProcessingResourceArtifact>,
),
);
}
}
/// Adds pattern-matching-related methods to [ProcessingResourcePackage].
extension ProcessingResourcePackagePatterns on ProcessingResourcePackage {
/// 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(_ProcessingResourcePackage value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage() 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(_ProcessingResourcePackage value) $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage():
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(_ProcessingResourcePackage value)? $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage() 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(
ProcessingCapability capability,
String id,
String version,
String name,
String description,
List<ProcessingResourceArtifact> artifacts,
)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage() when $default != null:
return $default(
_that.capability,
_that.id,
_that.version,
_that.name,
_that.description,
_that.artifacts,
);
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(
ProcessingCapability capability,
String id,
String version,
String name,
String description,
List<ProcessingResourceArtifact> artifacts,
)
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage():
return $default(
_that.capability,
_that.id,
_that.version,
_that.name,
_that.description,
_that.artifacts,
);
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(
ProcessingCapability capability,
String id,
String version,
String name,
String description,
List<ProcessingResourceArtifact> artifacts,
)?
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourcePackage() when $default != null:
return $default(
_that.capability,
_that.id,
_that.version,
_that.name,
_that.description,
_that.artifacts,
);
case _:
return null;
}
}
}
/// @nodoc
class _ProcessingResourcePackage extends ProcessingResourcePackage
with DiagnosticableTreeMixin {
const _ProcessingResourcePackage({
required this.capability,
required this.id,
required this.version,
required this.name,
required this.description,
required List<ProcessingResourceArtifact> artifacts,
}) : _artifacts = artifacts,
super._();
@override
final ProcessingCapability capability;
@override
final String id;
@override
final String version;
@override
final String name;
@override
final String description;
final List<ProcessingResourceArtifact> _artifacts;
@override
List<ProcessingResourceArtifact> get artifacts {
if (_artifacts is EqualUnmodifiableListView) return _artifacts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_artifacts);
}
/// Create a copy of ProcessingResourcePackage
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProcessingResourcePackageCopyWith<_ProcessingResourcePackage>
get copyWith =>
__$ProcessingResourcePackageCopyWithImpl<_ProcessingResourcePackage>(
this,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ProcessingResourcePackage'))
..add(DiagnosticsProperty('capability', capability))
..add(DiagnosticsProperty('id', id))
..add(DiagnosticsProperty('version', version))
..add(DiagnosticsProperty('name', name))
..add(DiagnosticsProperty('description', description))
..add(DiagnosticsProperty('artifacts', artifacts));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ProcessingResourcePackage &&
(identical(other.capability, capability) ||
other.capability == capability) &&
(identical(other.id, id) || other.id == id) &&
(identical(other.version, version) || other.version == version) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.description, description) ||
other.description == description) &&
const DeepCollectionEquality().equals(other.artifacts, _artifacts));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
capability,
id,
version,
name,
description,
const DeepCollectionEquality().hash(_artifacts),
);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'ProcessingResourcePackage(capability: $capability, id: $id, version: $version, name: $name, description: $description, artifacts: $artifacts)';
}
}
/// @nodoc
abstract mixin class _$ProcessingResourcePackageCopyWith<$Res>
implements $ProcessingResourcePackageCopyWith<$Res> {
factory _$ProcessingResourcePackageCopyWith(
_ProcessingResourcePackage value,
$Res Function(_ProcessingResourcePackage) _then,
) = __$ProcessingResourcePackageCopyWithImpl;
@override
@useResult
$Res call({
ProcessingCapability capability,
String id,
String version,
String name,
String description,
List<ProcessingResourceArtifact> artifacts,
});
}
/// @nodoc
class __$ProcessingResourcePackageCopyWithImpl<$Res>
implements _$ProcessingResourcePackageCopyWith<$Res> {
__$ProcessingResourcePackageCopyWithImpl(this._self, this._then);
final _ProcessingResourcePackage _self;
final $Res Function(_ProcessingResourcePackage) _then;
/// Create a copy of ProcessingResourcePackage
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? capability = null,
Object? id = null,
Object? version = null,
Object? name = null,
Object? description = null,
Object? artifacts = null,
}) {
return _then(
_ProcessingResourcePackage(
capability: null == capability
? _self.capability
: capability // ignore: cast_nullable_to_non_nullable
as ProcessingCapability,
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as String,
version: null == version
? _self.version
: version // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _self.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _self.description
: description // ignore: cast_nullable_to_non_nullable
as String,
artifacts: null == artifacts
? _self._artifacts
: artifacts // ignore: cast_nullable_to_non_nullable
as List<ProcessingResourceArtifact>,
),
);
}
}
/// @nodoc
mixin _$ProcessingResourceInstall implements DiagnosticableTreeMixin {
ProcessingResourcePackage get package;
ProcessingResourceState get state;
int get downloadedBytes;
AppFailure? get error;
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProcessingResourceInstallCopyWith<ProcessingResourceInstall> get copyWith =>
_$ProcessingResourceInstallCopyWithImpl<ProcessingResourceInstall>(
this as ProcessingResourceInstall,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
final _this = this as ProcessingResourceInstall;
properties
..add(DiagnosticsProperty('type', 'ProcessingResourceInstall'))
..add(DiagnosticsProperty('package', _this.package))
..add(DiagnosticsProperty('state', _this.state))
..add(DiagnosticsProperty('downloadedBytes', _this.downloadedBytes))
..add(DiagnosticsProperty('error', _this.error));
}
@override
bool operator ==(Object other) {
final _this = this as ProcessingResourceInstall;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ProcessingResourceInstall &&
(identical(other.package, _this.package) ||
other.package == _this.package) &&
(identical(other.state, _this.state) ||
other.state == _this.state) &&
(identical(other.downloadedBytes, _this.downloadedBytes) ||
other.downloadedBytes == _this.downloadedBytes) &&
(identical(other.error, _this.error) ||
other.error == _this.error));
}
@override
int get hashCode {
final _this = this as ProcessingResourceInstall;
return Object.hash(
runtimeType,
_this.package,
_this.state,
_this.downloadedBytes,
_this.error,
);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
final _this = this as ProcessingResourceInstall;
return 'ProcessingResourceInstall(package: ${_this.package}, state: ${_this.state}, downloadedBytes: ${_this.downloadedBytes}, error: ${_this.error})';
}
}
/// @nodoc
abstract mixin class $ProcessingResourceInstallCopyWith<$Res> {
factory $ProcessingResourceInstallCopyWith(
ProcessingResourceInstall value,
$Res Function(ProcessingResourceInstall) _then,
) = _$ProcessingResourceInstallCopyWithImpl;
@useResult
$Res call({
ProcessingResourcePackage package,
ProcessingResourceState state,
int downloadedBytes,
AppFailure? error,
});
$ProcessingResourcePackageCopyWith<$Res> get package;
}
/// @nodoc
class _$ProcessingResourceInstallCopyWithImpl<$Res>
implements $ProcessingResourceInstallCopyWith<$Res> {
_$ProcessingResourceInstallCopyWithImpl(this._self, this._then);
final ProcessingResourceInstall _self;
final $Res Function(ProcessingResourceInstall) _then;
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? package = null,
Object? state = null,
Object? downloadedBytes = null,
Object? error = freezed,
}) {
return _then(
ProcessingResourceInstall(
package: null == package
? _self.package
: package // ignore: cast_nullable_to_non_nullable
as ProcessingResourcePackage,
state: null == state
? _self.state
: state // ignore: cast_nullable_to_non_nullable
as ProcessingResourceState,
downloadedBytes: null == downloadedBytes
? _self.downloadedBytes
: downloadedBytes // ignore: cast_nullable_to_non_nullable
as int,
error: freezed == error
? _self.error
: error // ignore: cast_nullable_to_non_nullable
as AppFailure?,
),
);
}
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ProcessingResourcePackageCopyWith<$Res> get package {
return $ProcessingResourcePackageCopyWith<$Res>(_self.package, (value) {
return _then(_self.copyWith(package: value));
});
}
}
/// Adds pattern-matching-related methods to [ProcessingResourceInstall].
extension ProcessingResourceInstallPatterns on ProcessingResourceInstall {
/// 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(_ProcessingResourceInstall value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall() 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(_ProcessingResourceInstall value) $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall():
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(_ProcessingResourceInstall value)? $default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall() 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(
ProcessingResourcePackage package,
ProcessingResourceState state,
int downloadedBytes,
AppFailure? error,
)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall() when $default != null:
return $default(
_that.package,
_that.state,
_that.downloadedBytes,
_that.error,
);
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(
ProcessingResourcePackage package,
ProcessingResourceState state,
int downloadedBytes,
AppFailure? error,
)
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall():
return $default(
_that.package,
_that.state,
_that.downloadedBytes,
_that.error,
);
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(
ProcessingResourcePackage package,
ProcessingResourceState state,
int downloadedBytes,
AppFailure? error,
)?
$default,
) {
final _that = this;
switch (_that) {
case _ProcessingResourceInstall() when $default != null:
return $default(
_that.package,
_that.state,
_that.downloadedBytes,
_that.error,
);
case _:
return null;
}
}
}
/// @nodoc
class _ProcessingResourceInstall extends ProcessingResourceInstall
with DiagnosticableTreeMixin {
const _ProcessingResourceInstall({
required this.package,
required this.state,
this.downloadedBytes = 0,
this.error,
}) : super._();
@override
final ProcessingResourcePackage package;
@override
final ProcessingResourceState state;
@override
@JsonKey()
final int downloadedBytes;
@override
final AppFailure? error;
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProcessingResourceInstallCopyWith<_ProcessingResourceInstall>
get copyWith =>
__$ProcessingResourceInstallCopyWithImpl<_ProcessingResourceInstall>(
this,
_$identity,
);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ProcessingResourceInstall'))
..add(DiagnosticsProperty('package', package))
..add(DiagnosticsProperty('state', state))
..add(DiagnosticsProperty('downloadedBytes', downloadedBytes))
..add(DiagnosticsProperty('error', error));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ProcessingResourceInstall &&
(identical(other.package, package) || other.package == package) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.downloadedBytes, downloadedBytes) ||
other.downloadedBytes == downloadedBytes) &&
(identical(other.error, error) || other.error == error));
}
@override
int get hashCode {
return Object.hash(runtimeType, package, state, downloadedBytes, error);
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'ProcessingResourceInstall(package: $package, state: $state, downloadedBytes: $downloadedBytes, error: $error)';
}
}
/// @nodoc
abstract mixin class _$ProcessingResourceInstallCopyWith<$Res>
implements $ProcessingResourceInstallCopyWith<$Res> {
factory _$ProcessingResourceInstallCopyWith(
_ProcessingResourceInstall value,
$Res Function(_ProcessingResourceInstall) _then,
) = __$ProcessingResourceInstallCopyWithImpl;
@override
@useResult
$Res call({
ProcessingResourcePackage package,
ProcessingResourceState state,
int downloadedBytes,
AppFailure? error,
});
@override
$ProcessingResourcePackageCopyWith<$Res> get package;
}
/// @nodoc
class __$ProcessingResourceInstallCopyWithImpl<$Res>
implements _$ProcessingResourceInstallCopyWith<$Res> {
__$ProcessingResourceInstallCopyWithImpl(this._self, this._then);
final _ProcessingResourceInstall _self;
final $Res Function(_ProcessingResourceInstall) _then;
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? package = null,
Object? state = null,
Object? downloadedBytes = null,
Object? error = freezed,
}) {
return _then(
_ProcessingResourceInstall(
package: null == package
? _self.package
: package // ignore: cast_nullable_to_non_nullable
as ProcessingResourcePackage,
state: null == state
? _self.state
: state // ignore: cast_nullable_to_non_nullable
as ProcessingResourceState,
downloadedBytes: null == downloadedBytes
? _self.downloadedBytes
: downloadedBytes // ignore: cast_nullable_to_non_nullable
as int,
error: freezed == error
? _self.error
: error // ignore: cast_nullable_to_non_nullable
as AppFailure?,
),
);
}
/// Create a copy of ProcessingResourceInstall
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ProcessingResourcePackageCopyWith<$Res> get package {
return $ProcessingResourcePackageCopyWith<$Res>(_self.package, (value) {
return _then(_self.copyWith(package: value));
});
}
}