tstor/ui/lib/api/torrent.graphql.dart

1652 lines
52 KiB
Dart
Raw Permalink Normal View History

2024-04-27 11:00:34 +00:00
// ignore_for_file: type=lint
2024-04-24 17:36:33 +00:00
import 'dart:async';
import 'package:flutter/widgets.dart' as widgets;
import 'package:gql/ast.dart';
import 'package:graphql/client.dart' as graphql;
import 'package:graphql_flutter/graphql_flutter.dart' as graphql_flutter;
2024-08-15 08:23:44 +00:00
import 'schema.graphql.dart';
2024-04-24 17:36:33 +00:00
class Variables$Mutation$MarkTorrentDownload {
2024-08-15 08:23:44 +00:00
factory Variables$Mutation$MarkTorrentDownload({
required String infohash,
Enum$TorrentPriority? priority,
}) =>
2024-04-24 17:36:33 +00:00
Variables$Mutation$MarkTorrentDownload._({
r'infohash': infohash,
2024-08-15 08:23:44 +00:00
if (priority != null) r'priority': priority,
2024-04-24 17:36:33 +00:00
});
Variables$Mutation$MarkTorrentDownload._(this._$data);
factory Variables$Mutation$MarkTorrentDownload.fromJson(
Map<String, dynamic> data) {
final result$data = <String, dynamic>{};
final l$infohash = data['infohash'];
result$data['infohash'] = (l$infohash as String);
2024-08-15 08:23:44 +00:00
if (data.containsKey('priority')) {
final l$priority = data['priority'];
result$data['priority'] =
fromJson$Enum$TorrentPriority((l$priority as String));
}
2024-04-24 17:36:33 +00:00
return Variables$Mutation$MarkTorrentDownload._(result$data);
}
Map<String, dynamic> _$data;
String get infohash => (_$data['infohash'] as String);
2024-08-15 08:23:44 +00:00
Enum$TorrentPriority? get priority =>
(_$data['priority'] as Enum$TorrentPriority?);
2024-04-24 17:36:33 +00:00
Map<String, dynamic> toJson() {
final result$data = <String, dynamic>{};
final l$infohash = infohash;
result$data['infohash'] = l$infohash;
2024-08-15 08:23:44 +00:00
if (_$data.containsKey('priority')) {
final l$priority = priority;
result$data['priority'] =
toJson$Enum$TorrentPriority((l$priority as Enum$TorrentPriority));
}
2024-04-24 17:36:33 +00:00
return result$data;
}
CopyWith$Variables$Mutation$MarkTorrentDownload<
Variables$Mutation$MarkTorrentDownload>
get copyWith => CopyWith$Variables$Mutation$MarkTorrentDownload(
this,
(i) => i,
);
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-04-27 11:00:34 +00:00
if (!(other is Variables$Mutation$MarkTorrentDownload) ||
2024-04-24 17:36:33 +00:00
runtimeType != other.runtimeType) {
return false;
}
final l$infohash = infohash;
final lOther$infohash = other.infohash;
if (l$infohash != lOther$infohash) {
return false;
}
2024-08-15 08:23:44 +00:00
final l$priority = priority;
final lOther$priority = other.priority;
if (_$data.containsKey('priority') !=
other._$data.containsKey('priority')) {
return false;
}
if (l$priority != lOther$priority) {
return false;
}
2024-04-24 17:36:33 +00:00
return true;
}
@override
int get hashCode {
final l$infohash = infohash;
2024-08-15 08:23:44 +00:00
final l$priority = priority;
return Object.hashAll([
l$infohash,
_$data.containsKey('priority') ? l$priority : const {},
]);
2024-04-24 17:36:33 +00:00
}
}
abstract class CopyWith$Variables$Mutation$MarkTorrentDownload<TRes> {
factory CopyWith$Variables$Mutation$MarkTorrentDownload(
Variables$Mutation$MarkTorrentDownload instance,
TRes Function(Variables$Mutation$MarkTorrentDownload) then,
) = _CopyWithImpl$Variables$Mutation$MarkTorrentDownload;
factory CopyWith$Variables$Mutation$MarkTorrentDownload.stub(TRes res) =
_CopyWithStubImpl$Variables$Mutation$MarkTorrentDownload;
2024-08-15 08:23:44 +00:00
TRes call({
String? infohash,
Enum$TorrentPriority? priority,
});
2024-04-24 17:36:33 +00:00
}
class _CopyWithImpl$Variables$Mutation$MarkTorrentDownload<TRes>
implements CopyWith$Variables$Mutation$MarkTorrentDownload<TRes> {
_CopyWithImpl$Variables$Mutation$MarkTorrentDownload(
this._instance,
this._then,
);
final Variables$Mutation$MarkTorrentDownload _instance;
final TRes Function(Variables$Mutation$MarkTorrentDownload) _then;
static const _undefined = <dynamic, dynamic>{};
2024-08-15 08:23:44 +00:00
TRes call({
Object? infohash = _undefined,
Object? priority = _undefined,
}) =>
2024-04-24 17:36:33 +00:00
_then(Variables$Mutation$MarkTorrentDownload._({
..._instance._$data,
if (infohash != _undefined && infohash != null)
'infohash': (infohash as String),
2024-08-15 08:23:44 +00:00
if (priority != _undefined && priority != null)
'priority': (priority as Enum$TorrentPriority),
2024-04-24 17:36:33 +00:00
}));
}
class _CopyWithStubImpl$Variables$Mutation$MarkTorrentDownload<TRes>
implements CopyWith$Variables$Mutation$MarkTorrentDownload<TRes> {
_CopyWithStubImpl$Variables$Mutation$MarkTorrentDownload(this._res);
2024-04-27 11:00:34 +00:00
TRes _res;
2024-04-24 17:36:33 +00:00
2024-08-15 08:23:44 +00:00
call({
String? infohash,
Enum$TorrentPriority? priority,
}) =>
_res;
2024-04-24 17:36:33 +00:00
}
class Mutation$MarkTorrentDownload {
Mutation$MarkTorrentDownload({
2024-08-15 08:23:44 +00:00
this.torrentDaemon,
2024-04-24 17:36:33 +00:00
this.$__typename = 'Mutation',
});
factory Mutation$MarkTorrentDownload.fromJson(Map<String, dynamic> json) {
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = json['torrentDaemon'];
2024-04-24 17:36:33 +00:00
final l$$__typename = json['__typename'];
return Mutation$MarkTorrentDownload(
2024-08-15 08:23:44 +00:00
torrentDaemon: l$torrentDaemon == null
2024-04-24 17:36:33 +00:00
? null
2024-08-15 08:23:44 +00:00
: Mutation$MarkTorrentDownload$torrentDaemon.fromJson(
(l$torrentDaemon as Map<String, dynamic>)),
2024-04-24 17:36:33 +00:00
$__typename: (l$$__typename as String),
);
}
2024-08-15 08:23:44 +00:00
final Mutation$MarkTorrentDownload$torrentDaemon? torrentDaemon;
2024-04-24 17:36:33 +00:00
final String $__typename;
Map<String, dynamic> toJson() {
2024-04-27 11:00:34 +00:00
final _resultData = <String, dynamic>{};
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
_resultData['torrentDaemon'] = l$torrentDaemon?.toJson();
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
2024-04-27 11:00:34 +00:00
_resultData['__typename'] = l$$__typename;
return _resultData;
2024-04-24 17:36:33 +00:00
}
@override
int get hashCode {
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
return Object.hashAll([
2024-08-15 08:23:44 +00:00
l$torrentDaemon,
2024-04-24 17:36:33 +00:00
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-04-27 11:00:34 +00:00
if (!(other is Mutation$MarkTorrentDownload) ||
2024-04-24 17:36:33 +00:00
runtimeType != other.runtimeType) {
return false;
}
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
final lOther$torrentDaemon = other.torrentDaemon;
if (l$torrentDaemon != lOther$torrentDaemon) {
2024-04-24 17:36:33 +00:00
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
extension UtilityExtension$Mutation$MarkTorrentDownload
on Mutation$MarkTorrentDownload {
CopyWith$Mutation$MarkTorrentDownload<Mutation$MarkTorrentDownload>
get copyWith => CopyWith$Mutation$MarkTorrentDownload(
this,
(i) => i,
);
}
abstract class CopyWith$Mutation$MarkTorrentDownload<TRes> {
factory CopyWith$Mutation$MarkTorrentDownload(
Mutation$MarkTorrentDownload instance,
TRes Function(Mutation$MarkTorrentDownload) then,
) = _CopyWithImpl$Mutation$MarkTorrentDownload;
factory CopyWith$Mutation$MarkTorrentDownload.stub(TRes res) =
_CopyWithStubImpl$Mutation$MarkTorrentDownload;
TRes call({
2024-08-15 08:23:44 +00:00
Mutation$MarkTorrentDownload$torrentDaemon? torrentDaemon,
2024-04-24 17:36:33 +00:00
String? $__typename,
});
2024-08-15 08:23:44 +00:00
CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> get torrentDaemon;
2024-04-24 17:36:33 +00:00
}
class _CopyWithImpl$Mutation$MarkTorrentDownload<TRes>
implements CopyWith$Mutation$MarkTorrentDownload<TRes> {
_CopyWithImpl$Mutation$MarkTorrentDownload(
this._instance,
this._then,
);
final Mutation$MarkTorrentDownload _instance;
final TRes Function(Mutation$MarkTorrentDownload) _then;
static const _undefined = <dynamic, dynamic>{};
TRes call({
2024-08-15 08:23:44 +00:00
Object? torrentDaemon = _undefined,
2024-04-24 17:36:33 +00:00
Object? $__typename = _undefined,
}) =>
_then(Mutation$MarkTorrentDownload(
2024-08-15 08:23:44 +00:00
torrentDaemon: torrentDaemon == _undefined
? _instance.torrentDaemon
: (torrentDaemon as Mutation$MarkTorrentDownload$torrentDaemon?),
2024-04-24 17:36:33 +00:00
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
2024-08-15 08:23:44 +00:00
CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> get torrentDaemon {
final local$torrentDaemon = _instance.torrentDaemon;
return local$torrentDaemon == null
? CopyWith$Mutation$MarkTorrentDownload$torrentDaemon.stub(
2024-04-24 17:36:33 +00:00
_then(_instance))
2024-08-15 08:23:44 +00:00
: CopyWith$Mutation$MarkTorrentDownload$torrentDaemon(
local$torrentDaemon, (e) => call(torrentDaemon: e));
2024-04-24 17:36:33 +00:00
}
}
class _CopyWithStubImpl$Mutation$MarkTorrentDownload<TRes>
implements CopyWith$Mutation$MarkTorrentDownload<TRes> {
_CopyWithStubImpl$Mutation$MarkTorrentDownload(this._res);
2024-04-27 11:00:34 +00:00
TRes _res;
2024-04-24 17:36:33 +00:00
call({
2024-08-15 08:23:44 +00:00
Mutation$MarkTorrentDownload$torrentDaemon? torrentDaemon,
2024-04-24 17:36:33 +00:00
String? $__typename,
}) =>
_res;
2024-08-15 08:23:44 +00:00
CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> get torrentDaemon =>
CopyWith$Mutation$MarkTorrentDownload$torrentDaemon.stub(_res);
2024-04-24 17:36:33 +00:00
}
const documentNodeMutationMarkTorrentDownload = DocumentNode(definitions: [
OperationDefinitionNode(
type: OperationType.mutation,
name: NameNode(value: 'MarkTorrentDownload'),
variableDefinitions: [
VariableDefinitionNode(
variable: VariableNode(name: NameNode(value: 'infohash')),
type: NamedTypeNode(
name: NameNode(value: 'String'),
isNonNull: true,
),
defaultValue: DefaultValueNode(value: null),
directives: [],
2024-08-15 08:23:44 +00:00
),
VariableDefinitionNode(
variable: VariableNode(name: NameNode(value: 'priority')),
type: NamedTypeNode(
name: NameNode(value: 'TorrentPriority'),
isNonNull: true,
),
defaultValue: DefaultValueNode(
value: EnumValueNode(name: NameNode(value: 'NORMAL'))),
directives: [],
),
2024-04-24 17:36:33 +00:00
],
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'torrentDaemon'),
2024-04-24 17:36:33 +00:00
alias: null,
2024-08-15 08:23:44 +00:00
arguments: [],
2024-04-24 17:36:33 +00:00
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'setTorrentPriority'),
2024-04-24 17:36:33 +00:00
alias: null,
2024-08-15 08:23:44 +00:00
arguments: [
ArgumentNode(
name: NameNode(value: 'infohash'),
value: VariableNode(name: NameNode(value: 'infohash')),
2024-04-24 17:36:33 +00:00
),
2024-08-15 08:23:44 +00:00
ArgumentNode(
name: NameNode(value: 'priority'),
value: VariableNode(name: NameNode(value: 'priority')),
2024-04-24 17:36:33 +00:00
),
2024-08-15 08:23:44 +00:00
],
directives: [],
selectionSet: null,
2024-04-24 17:36:33 +00:00
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
]);
Mutation$MarkTorrentDownload _parserFn$Mutation$MarkTorrentDownload(
Map<String, dynamic> data) =>
Mutation$MarkTorrentDownload.fromJson(data);
typedef OnMutationCompleted$Mutation$MarkTorrentDownload = FutureOr<void>
Function(
Map<String, dynamic>?,
Mutation$MarkTorrentDownload?,
);
class Options$Mutation$MarkTorrentDownload
extends graphql.MutationOptions<Mutation$MarkTorrentDownload> {
Options$Mutation$MarkTorrentDownload({
2024-04-27 11:00:34 +00:00
String? operationName,
2024-04-24 17:36:33 +00:00
required Variables$Mutation$MarkTorrentDownload variables,
2024-04-27 11:00:34 +00:00
graphql.FetchPolicy? fetchPolicy,
graphql.ErrorPolicy? errorPolicy,
graphql.CacheRereadPolicy? cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
Object? optimisticResult,
Mutation$MarkTorrentDownload? typedOptimisticResult,
2024-04-27 11:00:34 +00:00
graphql.Context? context,
2024-04-24 17:36:33 +00:00
OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted,
2024-04-27 11:00:34 +00:00
graphql.OnMutationUpdate<Mutation$MarkTorrentDownload>? update,
graphql.OnError? onError,
2024-04-24 17:36:33 +00:00
}) : onCompletedWithParsed = onCompleted,
super(
variables: variables.toJson(),
2024-04-27 11:00:34 +00:00
operationName: operationName,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
cacheRereadPolicy: cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
2024-04-27 11:00:34 +00:00
context: context,
2024-04-24 17:36:33 +00:00
onCompleted: onCompleted == null
? null
: (data) => onCompleted(
data,
data == null
? null
: _parserFn$Mutation$MarkTorrentDownload(data),
),
2024-04-27 11:00:34 +00:00
update: update,
onError: onError,
2024-04-24 17:36:33 +00:00
document: documentNodeMutationMarkTorrentDownload,
parserFn: _parserFn$Mutation$MarkTorrentDownload,
);
final OnMutationCompleted$Mutation$MarkTorrentDownload? onCompletedWithParsed;
@override
List<Object?> get properties => [
...super.onCompleted == null
? super.properties
: super.properties.where((property) => property != onCompleted),
onCompletedWithParsed,
];
}
class WatchOptions$Mutation$MarkTorrentDownload
extends graphql.WatchQueryOptions<Mutation$MarkTorrentDownload> {
WatchOptions$Mutation$MarkTorrentDownload({
2024-04-27 11:00:34 +00:00
String? operationName,
2024-04-24 17:36:33 +00:00
required Variables$Mutation$MarkTorrentDownload variables,
2024-04-27 11:00:34 +00:00
graphql.FetchPolicy? fetchPolicy,
graphql.ErrorPolicy? errorPolicy,
graphql.CacheRereadPolicy? cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
Object? optimisticResult,
Mutation$MarkTorrentDownload? typedOptimisticResult,
2024-04-27 11:00:34 +00:00
graphql.Context? context,
Duration? pollInterval,
bool? eagerlyFetchResults,
bool carryForwardDataOnException = true,
bool fetchResults = false,
2024-04-24 17:36:33 +00:00
}) : super(
variables: variables.toJson(),
2024-04-27 11:00:34 +00:00
operationName: operationName,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
cacheRereadPolicy: cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
2024-04-27 11:00:34 +00:00
context: context,
2024-04-24 17:36:33 +00:00
document: documentNodeMutationMarkTorrentDownload,
2024-04-27 11:00:34 +00:00
pollInterval: pollInterval,
eagerlyFetchResults: eagerlyFetchResults,
carryForwardDataOnException: carryForwardDataOnException,
fetchResults: fetchResults,
2024-04-24 17:36:33 +00:00
parserFn: _parserFn$Mutation$MarkTorrentDownload,
);
}
extension ClientExtension$Mutation$MarkTorrentDownload
on graphql.GraphQLClient {
Future<graphql.QueryResult<Mutation$MarkTorrentDownload>>
mutate$MarkTorrentDownload(
Options$Mutation$MarkTorrentDownload options) async =>
2024-04-27 11:00:34 +00:00
await this.mutate(options);
2024-04-24 17:36:33 +00:00
graphql.ObservableQuery<Mutation$MarkTorrentDownload>
watchMutation$MarkTorrentDownload(
WatchOptions$Mutation$MarkTorrentDownload options) =>
2024-04-27 11:00:34 +00:00
this.watchMutation(options);
2024-04-24 17:36:33 +00:00
}
class Mutation$MarkTorrentDownload$HookResult {
Mutation$MarkTorrentDownload$HookResult(
this.runMutation,
this.result,
);
final RunMutation$Mutation$MarkTorrentDownload runMutation;
final graphql.QueryResult<Mutation$MarkTorrentDownload> result;
}
Mutation$MarkTorrentDownload$HookResult useMutation$MarkTorrentDownload(
[WidgetOptions$Mutation$MarkTorrentDownload? options]) {
final result = graphql_flutter
.useMutation(options ?? WidgetOptions$Mutation$MarkTorrentDownload());
return Mutation$MarkTorrentDownload$HookResult(
(variables, {optimisticResult, typedOptimisticResult}) =>
result.runMutation(
variables.toJson(),
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
),
result.result,
);
}
graphql.ObservableQuery<Mutation$MarkTorrentDownload>
useWatchMutation$MarkTorrentDownload(
WatchOptions$Mutation$MarkTorrentDownload options) =>
graphql_flutter.useWatchMutation(options);
class WidgetOptions$Mutation$MarkTorrentDownload
extends graphql.MutationOptions<Mutation$MarkTorrentDownload> {
WidgetOptions$Mutation$MarkTorrentDownload({
2024-04-27 11:00:34 +00:00
String? operationName,
graphql.FetchPolicy? fetchPolicy,
graphql.ErrorPolicy? errorPolicy,
graphql.CacheRereadPolicy? cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
Object? optimisticResult,
Mutation$MarkTorrentDownload? typedOptimisticResult,
2024-04-27 11:00:34 +00:00
graphql.Context? context,
2024-04-24 17:36:33 +00:00
OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted,
2024-04-27 11:00:34 +00:00
graphql.OnMutationUpdate<Mutation$MarkTorrentDownload>? update,
graphql.OnError? onError,
2024-04-24 17:36:33 +00:00
}) : onCompletedWithParsed = onCompleted,
super(
2024-04-27 11:00:34 +00:00
operationName: operationName,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
cacheRereadPolicy: cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
2024-04-27 11:00:34 +00:00
context: context,
2024-04-24 17:36:33 +00:00
onCompleted: onCompleted == null
? null
: (data) => onCompleted(
data,
data == null
? null
: _parserFn$Mutation$MarkTorrentDownload(data),
),
2024-04-27 11:00:34 +00:00
update: update,
onError: onError,
2024-04-24 17:36:33 +00:00
document: documentNodeMutationMarkTorrentDownload,
parserFn: _parserFn$Mutation$MarkTorrentDownload,
);
final OnMutationCompleted$Mutation$MarkTorrentDownload? onCompletedWithParsed;
@override
List<Object?> get properties => [
...super.onCompleted == null
? super.properties
: super.properties.where((property) => property != onCompleted),
onCompletedWithParsed,
];
}
typedef RunMutation$Mutation$MarkTorrentDownload
= graphql.MultiSourceResult<Mutation$MarkTorrentDownload> Function(
Variables$Mutation$MarkTorrentDownload, {
Object? optimisticResult,
Mutation$MarkTorrentDownload? typedOptimisticResult,
});
typedef Builder$Mutation$MarkTorrentDownload = widgets.Widget Function(
RunMutation$Mutation$MarkTorrentDownload,
graphql.QueryResult<Mutation$MarkTorrentDownload>?,
);
class Mutation$MarkTorrentDownload$Widget
extends graphql_flutter.Mutation<Mutation$MarkTorrentDownload> {
Mutation$MarkTorrentDownload$Widget({
2024-04-27 11:00:34 +00:00
widgets.Key? key,
2024-04-24 17:36:33 +00:00
WidgetOptions$Mutation$MarkTorrentDownload? options,
required Builder$Mutation$MarkTorrentDownload builder,
}) : super(
2024-04-27 11:00:34 +00:00
key: key,
2024-04-24 17:36:33 +00:00
options: options ?? WidgetOptions$Mutation$MarkTorrentDownload(),
builder: (
run,
result,
) =>
builder(
(
variables, {
optimisticResult,
typedOptimisticResult,
}) =>
run(
variables.toJson(),
optimisticResult:
optimisticResult ?? typedOptimisticResult?.toJson(),
),
result,
),
);
}
2024-08-15 08:23:44 +00:00
class Mutation$MarkTorrentDownload$torrentDaemon {
Mutation$MarkTorrentDownload$torrentDaemon({
required this.setTorrentPriority,
this.$__typename = 'TorrentDaemonMutation',
2024-04-24 17:36:33 +00:00
});
2024-08-15 08:23:44 +00:00
factory Mutation$MarkTorrentDownload$torrentDaemon.fromJson(
2024-04-24 17:36:33 +00:00
Map<String, dynamic> json) {
2024-08-15 08:23:44 +00:00
final l$setTorrentPriority = json['setTorrentPriority'];
2024-04-24 17:36:33 +00:00
final l$$__typename = json['__typename'];
2024-08-15 08:23:44 +00:00
return Mutation$MarkTorrentDownload$torrentDaemon(
setTorrentPriority: (l$setTorrentPriority as bool),
2024-04-24 17:36:33 +00:00
$__typename: (l$$__typename as String),
);
}
2024-08-15 08:23:44 +00:00
final bool setTorrentPriority;
2024-04-24 17:36:33 +00:00
final String $__typename;
Map<String, dynamic> toJson() {
2024-04-27 11:00:34 +00:00
final _resultData = <String, dynamic>{};
2024-08-15 08:23:44 +00:00
final l$setTorrentPriority = setTorrentPriority;
_resultData['setTorrentPriority'] = l$setTorrentPriority;
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
2024-04-27 11:00:34 +00:00
_resultData['__typename'] = l$$__typename;
return _resultData;
2024-04-24 17:36:33 +00:00
}
@override
int get hashCode {
2024-08-15 08:23:44 +00:00
final l$setTorrentPriority = setTorrentPriority;
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
return Object.hashAll([
2024-08-15 08:23:44 +00:00
l$setTorrentPriority,
2024-04-24 17:36:33 +00:00
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-08-15 08:23:44 +00:00
if (!(other is Mutation$MarkTorrentDownload$torrentDaemon) ||
2024-04-24 17:36:33 +00:00
runtimeType != other.runtimeType) {
return false;
}
2024-08-15 08:23:44 +00:00
final l$setTorrentPriority = setTorrentPriority;
final lOther$setTorrentPriority = other.setTorrentPriority;
if (l$setTorrentPriority != lOther$setTorrentPriority) {
2024-04-24 17:36:33 +00:00
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
2024-08-15 08:23:44 +00:00
extension UtilityExtension$Mutation$MarkTorrentDownload$torrentDaemon
on Mutation$MarkTorrentDownload$torrentDaemon {
CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<
Mutation$MarkTorrentDownload$torrentDaemon>
get copyWith => CopyWith$Mutation$MarkTorrentDownload$torrentDaemon(
2024-04-24 17:36:33 +00:00
this,
(i) => i,
);
}
2024-08-15 08:23:44 +00:00
abstract class CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> {
factory CopyWith$Mutation$MarkTorrentDownload$torrentDaemon(
Mutation$MarkTorrentDownload$torrentDaemon instance,
TRes Function(Mutation$MarkTorrentDownload$torrentDaemon) then,
) = _CopyWithImpl$Mutation$MarkTorrentDownload$torrentDaemon;
2024-04-24 17:36:33 +00:00
2024-08-15 08:23:44 +00:00
factory CopyWith$Mutation$MarkTorrentDownload$torrentDaemon.stub(TRes res) =
_CopyWithStubImpl$Mutation$MarkTorrentDownload$torrentDaemon;
2024-04-24 17:36:33 +00:00
TRes call({
2024-08-15 08:23:44 +00:00
bool? setTorrentPriority,
2024-04-24 17:36:33 +00:00
String? $__typename,
});
}
2024-08-15 08:23:44 +00:00
class _CopyWithImpl$Mutation$MarkTorrentDownload$torrentDaemon<TRes>
implements CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> {
_CopyWithImpl$Mutation$MarkTorrentDownload$torrentDaemon(
2024-04-24 17:36:33 +00:00
this._instance,
this._then,
);
2024-08-15 08:23:44 +00:00
final Mutation$MarkTorrentDownload$torrentDaemon _instance;
2024-04-24 17:36:33 +00:00
2024-08-15 08:23:44 +00:00
final TRes Function(Mutation$MarkTorrentDownload$torrentDaemon) _then;
2024-04-24 17:36:33 +00:00
static const _undefined = <dynamic, dynamic>{};
TRes call({
2024-08-15 08:23:44 +00:00
Object? setTorrentPriority = _undefined,
2024-04-24 17:36:33 +00:00
Object? $__typename = _undefined,
}) =>
2024-08-15 08:23:44 +00:00
_then(Mutation$MarkTorrentDownload$torrentDaemon(
setTorrentPriority:
setTorrentPriority == _undefined || setTorrentPriority == null
? _instance.setTorrentPriority
: (setTorrentPriority as bool),
2024-04-24 17:36:33 +00:00
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
}
2024-08-15 08:23:44 +00:00
class _CopyWithStubImpl$Mutation$MarkTorrentDownload$torrentDaemon<TRes>
implements CopyWith$Mutation$MarkTorrentDownload$torrentDaemon<TRes> {
_CopyWithStubImpl$Mutation$MarkTorrentDownload$torrentDaemon(this._res);
2024-04-24 17:36:33 +00:00
2024-04-27 11:00:34 +00:00
TRes _res;
2024-04-24 17:36:33 +00:00
call({
2024-08-15 08:23:44 +00:00
bool? setTorrentPriority,
2024-04-24 17:36:33 +00:00
String? $__typename,
}) =>
_res;
}
class Query$ListTorrents {
Query$ListTorrents({
2024-08-15 08:23:44 +00:00
this.torrentDaemon,
2024-04-24 17:36:33 +00:00
this.$__typename = 'Query',
});
factory Query$ListTorrents.fromJson(Map<String, dynamic> json) {
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = json['torrentDaemon'];
2024-04-24 17:36:33 +00:00
final l$$__typename = json['__typename'];
return Query$ListTorrents(
2024-08-15 08:23:44 +00:00
torrentDaemon: l$torrentDaemon == null
? null
: Query$ListTorrents$torrentDaemon.fromJson(
(l$torrentDaemon as Map<String, dynamic>)),
2024-04-24 17:36:33 +00:00
$__typename: (l$$__typename as String),
);
}
2024-08-15 08:23:44 +00:00
final Query$ListTorrents$torrentDaemon? torrentDaemon;
2024-04-24 17:36:33 +00:00
final String $__typename;
Map<String, dynamic> toJson() {
2024-04-27 11:00:34 +00:00
final _resultData = <String, dynamic>{};
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
_resultData['torrentDaemon'] = l$torrentDaemon?.toJson();
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
2024-04-27 11:00:34 +00:00
_resultData['__typename'] = l$$__typename;
return _resultData;
2024-04-24 17:36:33 +00:00
}
@override
int get hashCode {
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
return Object.hashAll([
2024-08-15 08:23:44 +00:00
l$torrentDaemon,
2024-04-24 17:36:33 +00:00
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-04-27 11:00:34 +00:00
if (!(other is Query$ListTorrents) || runtimeType != other.runtimeType) {
2024-04-24 17:36:33 +00:00
return false;
}
2024-08-15 08:23:44 +00:00
final l$torrentDaemon = torrentDaemon;
final lOther$torrentDaemon = other.torrentDaemon;
if (l$torrentDaemon != lOther$torrentDaemon) {
2024-04-24 17:36:33 +00:00
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
extension UtilityExtension$Query$ListTorrents on Query$ListTorrents {
CopyWith$Query$ListTorrents<Query$ListTorrents> get copyWith =>
CopyWith$Query$ListTorrents(
this,
(i) => i,
);
}
abstract class CopyWith$Query$ListTorrents<TRes> {
factory CopyWith$Query$ListTorrents(
Query$ListTorrents instance,
TRes Function(Query$ListTorrents) then,
) = _CopyWithImpl$Query$ListTorrents;
factory CopyWith$Query$ListTorrents.stub(TRes res) =
_CopyWithStubImpl$Query$ListTorrents;
TRes call({
2024-08-15 08:23:44 +00:00
Query$ListTorrents$torrentDaemon? torrentDaemon,
2024-04-24 17:36:33 +00:00
String? $__typename,
});
2024-08-15 08:23:44 +00:00
CopyWith$Query$ListTorrents$torrentDaemon<TRes> get torrentDaemon;
2024-04-24 17:36:33 +00:00
}
class _CopyWithImpl$Query$ListTorrents<TRes>
implements CopyWith$Query$ListTorrents<TRes> {
_CopyWithImpl$Query$ListTorrents(
this._instance,
this._then,
);
final Query$ListTorrents _instance;
final TRes Function(Query$ListTorrents) _then;
static const _undefined = <dynamic, dynamic>{};
TRes call({
2024-08-15 08:23:44 +00:00
Object? torrentDaemon = _undefined,
2024-04-24 17:36:33 +00:00
Object? $__typename = _undefined,
}) =>
_then(Query$ListTorrents(
2024-08-15 08:23:44 +00:00
torrentDaemon: torrentDaemon == _undefined
? _instance.torrentDaemon
: (torrentDaemon as Query$ListTorrents$torrentDaemon?),
2024-04-24 17:36:33 +00:00
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
2024-08-15 08:23:44 +00:00
CopyWith$Query$ListTorrents$torrentDaemon<TRes> get torrentDaemon {
final local$torrentDaemon = _instance.torrentDaemon;
return local$torrentDaemon == null
? CopyWith$Query$ListTorrents$torrentDaemon.stub(_then(_instance))
: CopyWith$Query$ListTorrents$torrentDaemon(
local$torrentDaemon, (e) => call(torrentDaemon: e));
}
2024-04-24 17:36:33 +00:00
}
class _CopyWithStubImpl$Query$ListTorrents<TRes>
implements CopyWith$Query$ListTorrents<TRes> {
_CopyWithStubImpl$Query$ListTorrents(this._res);
2024-04-27 11:00:34 +00:00
TRes _res;
2024-04-24 17:36:33 +00:00
call({
2024-08-15 08:23:44 +00:00
Query$ListTorrents$torrentDaemon? torrentDaemon,
2024-04-24 17:36:33 +00:00
String? $__typename,
}) =>
_res;
2024-08-15 08:23:44 +00:00
CopyWith$Query$ListTorrents$torrentDaemon<TRes> get torrentDaemon =>
CopyWith$Query$ListTorrents$torrentDaemon.stub(_res);
2024-04-24 17:36:33 +00:00
}
const documentNodeQueryListTorrents = DocumentNode(definitions: [
OperationDefinitionNode(
type: OperationType.query,
name: NameNode(value: 'ListTorrents'),
2024-08-15 08:23:44 +00:00
variableDefinitions: [],
2024-04-24 17:36:33 +00:00
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'torrentDaemon'),
2024-04-24 17:36:33 +00:00
alias: null,
2024-08-15 08:23:44 +00:00
arguments: [],
2024-04-24 17:36:33 +00:00
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'torrents'),
2024-04-27 11:00:34 +00:00
alias: null,
arguments: [],
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'name'),
2024-04-27 11:00:34 +00:00
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'infohash'),
2024-04-27 11:00:34 +00:00
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
2024-08-15 08:23:44 +00:00
name: NameNode(value: 'bytesCompleted'),
2024-04-27 11:00:34 +00:00
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
2024-08-15 08:23:44 +00:00
FieldNode(
name: NameNode(value: 'bytesMissing'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: 'peers'),
alias: null,
arguments: [],
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
name: NameNode(value: 'ip'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: 'downloadRate'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: 'clientName'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
2024-04-27 11:00:34 +00:00
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
2024-04-24 17:36:33 +00:00
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
),
]);
Query$ListTorrents _parserFn$Query$ListTorrents(Map<String, dynamic> data) =>
Query$ListTorrents.fromJson(data);
typedef OnQueryComplete$Query$ListTorrents = FutureOr<void> Function(
Map<String, dynamic>?,
Query$ListTorrents?,
);
class Options$Query$ListTorrents
extends graphql.QueryOptions<Query$ListTorrents> {
Options$Query$ListTorrents({
2024-04-27 11:00:34 +00:00
String? operationName,
graphql.FetchPolicy? fetchPolicy,
graphql.ErrorPolicy? errorPolicy,
graphql.CacheRereadPolicy? cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
Object? optimisticResult,
Query$ListTorrents? typedOptimisticResult,
2024-04-27 11:00:34 +00:00
Duration? pollInterval,
graphql.Context? context,
2024-04-24 17:36:33 +00:00
OnQueryComplete$Query$ListTorrents? onComplete,
2024-04-27 11:00:34 +00:00
graphql.OnQueryError? onError,
2024-04-24 17:36:33 +00:00
}) : onCompleteWithParsed = onComplete,
super(
2024-04-27 11:00:34 +00:00
operationName: operationName,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
cacheRereadPolicy: cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
2024-04-27 11:00:34 +00:00
pollInterval: pollInterval,
context: context,
2024-04-24 17:36:33 +00:00
onComplete: onComplete == null
? null
: (data) => onComplete(
data,
data == null ? null : _parserFn$Query$ListTorrents(data),
),
2024-04-27 11:00:34 +00:00
onError: onError,
2024-04-24 17:36:33 +00:00
document: documentNodeQueryListTorrents,
parserFn: _parserFn$Query$ListTorrents,
);
final OnQueryComplete$Query$ListTorrents? onCompleteWithParsed;
@override
List<Object?> get properties => [
...super.onComplete == null
? super.properties
: super.properties.where((property) => property != onComplete),
onCompleteWithParsed,
];
}
class WatchOptions$Query$ListTorrents
extends graphql.WatchQueryOptions<Query$ListTorrents> {
WatchOptions$Query$ListTorrents({
2024-04-27 11:00:34 +00:00
String? operationName,
graphql.FetchPolicy? fetchPolicy,
graphql.ErrorPolicy? errorPolicy,
graphql.CacheRereadPolicy? cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
Object? optimisticResult,
Query$ListTorrents? typedOptimisticResult,
2024-04-27 11:00:34 +00:00
graphql.Context? context,
Duration? pollInterval,
bool? eagerlyFetchResults,
bool carryForwardDataOnException = true,
bool fetchResults = false,
2024-04-24 17:36:33 +00:00
}) : super(
2024-04-27 11:00:34 +00:00
operationName: operationName,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
cacheRereadPolicy: cacheRereadPolicy,
2024-04-24 17:36:33 +00:00
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
2024-04-27 11:00:34 +00:00
context: context,
2024-04-24 17:36:33 +00:00
document: documentNodeQueryListTorrents,
2024-04-27 11:00:34 +00:00
pollInterval: pollInterval,
eagerlyFetchResults: eagerlyFetchResults,
carryForwardDataOnException: carryForwardDataOnException,
fetchResults: fetchResults,
2024-04-24 17:36:33 +00:00
parserFn: _parserFn$Query$ListTorrents,
);
}
class FetchMoreOptions$Query$ListTorrents extends graphql.FetchMoreOptions {
2024-08-15 08:23:44 +00:00
FetchMoreOptions$Query$ListTorrents(
{required graphql.UpdateQuery updateQuery})
: super(
2024-04-27 11:00:34 +00:00
updateQuery: updateQuery,
2024-04-24 17:36:33 +00:00
document: documentNodeQueryListTorrents,
);
}
extension ClientExtension$Query$ListTorrents on graphql.GraphQLClient {
Future<graphql.QueryResult<Query$ListTorrents>> query$ListTorrents(
[Options$Query$ListTorrents? options]) async =>
2024-04-27 11:00:34 +00:00
await this.query(options ?? Options$Query$ListTorrents());
2024-04-24 17:36:33 +00:00
graphql.ObservableQuery<Query$ListTorrents> watchQuery$ListTorrents(
[WatchOptions$Query$ListTorrents? options]) =>
2024-04-27 11:00:34 +00:00
this.watchQuery(options ?? WatchOptions$Query$ListTorrents());
2024-04-24 17:36:33 +00:00
void writeQuery$ListTorrents({
required Query$ListTorrents data,
bool broadcast = true,
}) =>
2024-04-27 11:00:34 +00:00
this.writeQuery(
graphql.Request(
2024-08-15 08:23:44 +00:00
operation:
graphql.Operation(document: documentNodeQueryListTorrents)),
2024-04-24 17:36:33 +00:00
data: data.toJson(),
broadcast: broadcast,
);
2024-08-15 08:23:44 +00:00
Query$ListTorrents? readQuery$ListTorrents({bool optimistic = true}) {
2024-04-27 11:00:34 +00:00
final result = this.readQuery(
graphql.Request(
2024-08-15 08:23:44 +00:00
operation:
graphql.Operation(document: documentNodeQueryListTorrents)),
2024-04-24 17:36:33 +00:00
optimistic: optimistic,
);
return result == null ? null : Query$ListTorrents.fromJson(result);
}
}
graphql_flutter.QueryHookResult<Query$ListTorrents> useQuery$ListTorrents(
[Options$Query$ListTorrents? options]) =>
graphql_flutter.useQuery(options ?? Options$Query$ListTorrents());
graphql.ObservableQuery<Query$ListTorrents> useWatchQuery$ListTorrents(
[WatchOptions$Query$ListTorrents? options]) =>
graphql_flutter.useWatchQuery(options ?? WatchOptions$Query$ListTorrents());
class Query$ListTorrents$Widget
extends graphql_flutter.Query<Query$ListTorrents> {
Query$ListTorrents$Widget({
2024-04-27 11:00:34 +00:00
widgets.Key? key,
2024-04-24 17:36:33 +00:00
Options$Query$ListTorrents? options,
2024-04-27 11:00:34 +00:00
required graphql_flutter.QueryBuilder<Query$ListTorrents> builder,
2024-04-24 17:36:33 +00:00
}) : super(
2024-04-27 11:00:34 +00:00
key: key,
2024-04-24 17:36:33 +00:00
options: options ?? Options$Query$ListTorrents(),
2024-04-27 11:00:34 +00:00
builder: builder,
2024-04-24 17:36:33 +00:00
);
}
2024-08-15 08:23:44 +00:00
class Query$ListTorrents$torrentDaemon {
Query$ListTorrents$torrentDaemon({
required this.torrents,
this.$__typename = 'TorrentDaemonQuery',
});
factory Query$ListTorrents$torrentDaemon.fromJson(Map<String, dynamic> json) {
final l$torrents = json['torrents'];
final l$$__typename = json['__typename'];
return Query$ListTorrents$torrentDaemon(
torrents: (l$torrents as List<dynamic>)
.map((e) => Query$ListTorrents$torrentDaemon$torrents.fromJson(
(e as Map<String, dynamic>)))
.toList(),
$__typename: (l$$__typename as String),
);
}
final List<Query$ListTorrents$torrentDaemon$torrents> torrents;
final String $__typename;
Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{};
final l$torrents = torrents;
_resultData['torrents'] = l$torrents.map((e) => e.toJson()).toList();
final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename;
return _resultData;
}
@override
int get hashCode {
final l$torrents = torrents;
final l$$__typename = $__typename;
return Object.hashAll([
Object.hashAll(l$torrents.map((v) => v)),
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (!(other is Query$ListTorrents$torrentDaemon) ||
runtimeType != other.runtimeType) {
return false;
}
final l$torrents = torrents;
final lOther$torrents = other.torrents;
if (l$torrents.length != lOther$torrents.length) {
return false;
}
for (int i = 0; i < l$torrents.length; i++) {
final l$torrents$entry = l$torrents[i];
final lOther$torrents$entry = lOther$torrents[i];
if (l$torrents$entry != lOther$torrents$entry) {
return false;
}
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
extension UtilityExtension$Query$ListTorrents$torrentDaemon
on Query$ListTorrents$torrentDaemon {
CopyWith$Query$ListTorrents$torrentDaemon<Query$ListTorrents$torrentDaemon>
get copyWith => CopyWith$Query$ListTorrents$torrentDaemon(
this,
(i) => i,
);
}
abstract class CopyWith$Query$ListTorrents$torrentDaemon<TRes> {
factory CopyWith$Query$ListTorrents$torrentDaemon(
Query$ListTorrents$torrentDaemon instance,
TRes Function(Query$ListTorrents$torrentDaemon) then,
) = _CopyWithImpl$Query$ListTorrents$torrentDaemon;
factory CopyWith$Query$ListTorrents$torrentDaemon.stub(TRes res) =
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon;
TRes call({
List<Query$ListTorrents$torrentDaemon$torrents>? torrents,
String? $__typename,
});
TRes torrents(
Iterable<Query$ListTorrents$torrentDaemon$torrents> Function(
Iterable<
CopyWith$Query$ListTorrents$torrentDaemon$torrents<
Query$ListTorrents$torrentDaemon$torrents>>)
_fn);
}
class _CopyWithImpl$Query$ListTorrents$torrentDaemon<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon<TRes> {
_CopyWithImpl$Query$ListTorrents$torrentDaemon(
this._instance,
this._then,
);
final Query$ListTorrents$torrentDaemon _instance;
final TRes Function(Query$ListTorrents$torrentDaemon) _then;
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? torrents = _undefined,
Object? $__typename = _undefined,
}) =>
_then(Query$ListTorrents$torrentDaemon(
torrents: torrents == _undefined || torrents == null
? _instance.torrents
: (torrents as List<Query$ListTorrents$torrentDaemon$torrents>),
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
TRes torrents(
Iterable<Query$ListTorrents$torrentDaemon$torrents> Function(
Iterable<
CopyWith$Query$ListTorrents$torrentDaemon$torrents<
Query$ListTorrents$torrentDaemon$torrents>>)
_fn) =>
call(
torrents: _fn(_instance.torrents
.map((e) => CopyWith$Query$ListTorrents$torrentDaemon$torrents(
e,
(i) => i,
))).toList());
}
class _CopyWithStubImpl$Query$ListTorrents$torrentDaemon<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon<TRes> {
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon(this._res);
TRes _res;
call({
List<Query$ListTorrents$torrentDaemon$torrents>? torrents,
String? $__typename,
}) =>
_res;
torrents(_fn) => _res;
}
class Query$ListTorrents$torrentDaemon$torrents {
Query$ListTorrents$torrentDaemon$torrents({
2024-04-24 17:36:33 +00:00
required this.name,
required this.infohash,
required this.bytesCompleted,
required this.bytesMissing,
2024-04-27 11:00:34 +00:00
required this.peers,
2024-04-24 17:36:33 +00:00
this.$__typename = 'Torrent',
});
2024-08-15 08:23:44 +00:00
factory Query$ListTorrents$torrentDaemon$torrents.fromJson(
Map<String, dynamic> json) {
2024-04-24 17:36:33 +00:00
final l$name = json['name'];
final l$infohash = json['infohash'];
final l$bytesCompleted = json['bytesCompleted'];
final l$bytesMissing = json['bytesMissing'];
2024-04-27 11:00:34 +00:00
final l$peers = json['peers'];
2024-04-24 17:36:33 +00:00
final l$$__typename = json['__typename'];
2024-08-15 08:23:44 +00:00
return Query$ListTorrents$torrentDaemon$torrents(
2024-04-24 17:36:33 +00:00
name: (l$name as String),
infohash: (l$infohash as String),
bytesCompleted: (l$bytesCompleted as int),
bytesMissing: (l$bytesMissing as int),
2024-04-27 11:00:34 +00:00
peers: (l$peers as List<dynamic>)
2024-08-15 08:23:44 +00:00
.map((e) => Query$ListTorrents$torrentDaemon$torrents$peers.fromJson(
2024-04-27 11:00:34 +00:00
(e as Map<String, dynamic>)))
.toList(),
2024-04-24 17:36:33 +00:00
$__typename: (l$$__typename as String),
);
}
final String name;
final String infohash;
final int bytesCompleted;
final int bytesMissing;
2024-08-15 08:23:44 +00:00
final List<Query$ListTorrents$torrentDaemon$torrents$peers> peers;
2024-04-27 11:00:34 +00:00
2024-04-24 17:36:33 +00:00
final String $__typename;
Map<String, dynamic> toJson() {
2024-04-27 11:00:34 +00:00
final _resultData = <String, dynamic>{};
2024-04-24 17:36:33 +00:00
final l$name = name;
2024-04-27 11:00:34 +00:00
_resultData['name'] = l$name;
2024-04-24 17:36:33 +00:00
final l$infohash = infohash;
2024-04-27 11:00:34 +00:00
_resultData['infohash'] = l$infohash;
2024-04-24 17:36:33 +00:00
final l$bytesCompleted = bytesCompleted;
2024-04-27 11:00:34 +00:00
_resultData['bytesCompleted'] = l$bytesCompleted;
2024-04-24 17:36:33 +00:00
final l$bytesMissing = bytesMissing;
2024-04-27 11:00:34 +00:00
_resultData['bytesMissing'] = l$bytesMissing;
final l$peers = peers;
_resultData['peers'] = l$peers.map((e) => e.toJson()).toList();
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
2024-04-27 11:00:34 +00:00
_resultData['__typename'] = l$$__typename;
return _resultData;
2024-04-24 17:36:33 +00:00
}
@override
int get hashCode {
final l$name = name;
final l$infohash = infohash;
final l$bytesCompleted = bytesCompleted;
final l$bytesMissing = bytesMissing;
2024-04-27 11:00:34 +00:00
final l$peers = peers;
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
return Object.hashAll([
l$name,
l$infohash,
l$bytesCompleted,
l$bytesMissing,
2024-04-27 11:00:34 +00:00
Object.hashAll(l$peers.map((v) => v)),
2024-04-24 17:36:33 +00:00
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-08-15 08:23:44 +00:00
if (!(other is Query$ListTorrents$torrentDaemon$torrents) ||
2024-04-24 17:36:33 +00:00
runtimeType != other.runtimeType) {
return false;
}
final l$name = name;
final lOther$name = other.name;
if (l$name != lOther$name) {
return false;
}
final l$infohash = infohash;
final lOther$infohash = other.infohash;
if (l$infohash != lOther$infohash) {
return false;
}
final l$bytesCompleted = bytesCompleted;
final lOther$bytesCompleted = other.bytesCompleted;
if (l$bytesCompleted != lOther$bytesCompleted) {
return false;
}
final l$bytesMissing = bytesMissing;
final lOther$bytesMissing = other.bytesMissing;
if (l$bytesMissing != lOther$bytesMissing) {
return false;
}
2024-04-27 11:00:34 +00:00
final l$peers = peers;
final lOther$peers = other.peers;
if (l$peers.length != lOther$peers.length) {
return false;
}
for (int i = 0; i < l$peers.length; i++) {
final l$peers$entry = l$peers[i];
final lOther$peers$entry = lOther$peers[i];
if (l$peers$entry != lOther$peers$entry) {
return false;
}
}
2024-04-24 17:36:33 +00:00
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
2024-08-15 08:23:44 +00:00
extension UtilityExtension$Query$ListTorrents$torrentDaemon$torrents
on Query$ListTorrents$torrentDaemon$torrents {
CopyWith$Query$ListTorrents$torrentDaemon$torrents<
Query$ListTorrents$torrentDaemon$torrents>
get copyWith => CopyWith$Query$ListTorrents$torrentDaemon$torrents(
2024-04-24 17:36:33 +00:00
this,
(i) => i,
);
}
2024-08-15 08:23:44 +00:00
abstract class CopyWith$Query$ListTorrents$torrentDaemon$torrents<TRes> {
factory CopyWith$Query$ListTorrents$torrentDaemon$torrents(
Query$ListTorrents$torrentDaemon$torrents instance,
TRes Function(Query$ListTorrents$torrentDaemon$torrents) then,
) = _CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents;
2024-04-24 17:36:33 +00:00
2024-08-15 08:23:44 +00:00
factory CopyWith$Query$ListTorrents$torrentDaemon$torrents.stub(TRes res) =
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents;
2024-04-24 17:36:33 +00:00
TRes call({
String? name,
String? infohash,
int? bytesCompleted,
int? bytesMissing,
2024-08-15 08:23:44 +00:00
List<Query$ListTorrents$torrentDaemon$torrents$peers>? peers,
2024-04-24 17:36:33 +00:00
String? $__typename,
});
2024-04-27 11:00:34 +00:00
TRes peers(
2024-08-15 08:23:44 +00:00
Iterable<Query$ListTorrents$torrentDaemon$torrents$peers> Function(
2024-04-27 11:00:34 +00:00
Iterable<
2024-08-15 08:23:44 +00:00
CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<
Query$ListTorrents$torrentDaemon$torrents$peers>>)
2024-04-27 11:00:34 +00:00
_fn);
2024-04-24 17:36:33 +00:00
}
2024-08-15 08:23:44 +00:00
class _CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon$torrents<TRes> {
_CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents(
2024-04-24 17:36:33 +00:00
this._instance,
this._then,
);
2024-08-15 08:23:44 +00:00
final Query$ListTorrents$torrentDaemon$torrents _instance;
2024-04-24 17:36:33 +00:00
2024-08-15 08:23:44 +00:00
final TRes Function(Query$ListTorrents$torrentDaemon$torrents) _then;
2024-04-24 17:36:33 +00:00
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? name = _undefined,
Object? infohash = _undefined,
Object? bytesCompleted = _undefined,
Object? bytesMissing = _undefined,
2024-04-27 11:00:34 +00:00
Object? peers = _undefined,
2024-04-24 17:36:33 +00:00
Object? $__typename = _undefined,
}) =>
2024-08-15 08:23:44 +00:00
_then(Query$ListTorrents$torrentDaemon$torrents(
2024-04-24 17:36:33 +00:00
name: name == _undefined || name == null
? _instance.name
: (name as String),
infohash: infohash == _undefined || infohash == null
? _instance.infohash
: (infohash as String),
bytesCompleted: bytesCompleted == _undefined || bytesCompleted == null
? _instance.bytesCompleted
: (bytesCompleted as int),
bytesMissing: bytesMissing == _undefined || bytesMissing == null
? _instance.bytesMissing
: (bytesMissing as int),
2024-04-27 11:00:34 +00:00
peers: peers == _undefined || peers == null
? _instance.peers
2024-08-15 08:23:44 +00:00
: (peers as List<Query$ListTorrents$torrentDaemon$torrents$peers>),
2024-04-24 17:36:33 +00:00
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
2024-04-27 11:00:34 +00:00
TRes peers(
2024-08-15 08:23:44 +00:00
Iterable<Query$ListTorrents$torrentDaemon$torrents$peers> Function(
2024-04-27 11:00:34 +00:00
Iterable<
2024-08-15 08:23:44 +00:00
CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<
Query$ListTorrents$torrentDaemon$torrents$peers>>)
2024-04-27 11:00:34 +00:00
_fn) =>
call(
2024-08-15 08:23:44 +00:00
peers: _fn(_instance.peers.map(
(e) => CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers(
2024-04-27 11:00:34 +00:00
e,
(i) => i,
))).toList());
2024-04-24 17:36:33 +00:00
}
2024-08-15 08:23:44 +00:00
class _CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon$torrents<TRes> {
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents(this._res);
2024-04-24 17:36:33 +00:00
2024-04-27 11:00:34 +00:00
TRes _res;
2024-04-24 17:36:33 +00:00
call({
String? name,
String? infohash,
int? bytesCompleted,
int? bytesMissing,
2024-08-15 08:23:44 +00:00
List<Query$ListTorrents$torrentDaemon$torrents$peers>? peers,
2024-04-27 11:00:34 +00:00
String? $__typename,
}) =>
_res;
peers(_fn) => _res;
}
2024-08-15 08:23:44 +00:00
class Query$ListTorrents$torrentDaemon$torrents$peers {
Query$ListTorrents$torrentDaemon$torrents$peers({
2024-04-27 11:00:34 +00:00
required this.ip,
required this.downloadRate,
required this.clientName,
this.$__typename = 'TorrentPeer',
});
2024-08-15 08:23:44 +00:00
factory Query$ListTorrents$torrentDaemon$torrents$peers.fromJson(
2024-04-27 11:00:34 +00:00
Map<String, dynamic> json) {
final l$ip = json['ip'];
final l$downloadRate = json['downloadRate'];
final l$clientName = json['clientName'];
final l$$__typename = json['__typename'];
2024-08-15 08:23:44 +00:00
return Query$ListTorrents$torrentDaemon$torrents$peers(
2024-04-27 11:00:34 +00:00
ip: (l$ip as String),
downloadRate: (l$downloadRate as num).toDouble(),
clientName: (l$clientName as String),
$__typename: (l$$__typename as String),
);
}
final String ip;
final double downloadRate;
final String clientName;
final String $__typename;
Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{};
final l$ip = ip;
_resultData['ip'] = l$ip;
final l$downloadRate = downloadRate;
_resultData['downloadRate'] = l$downloadRate;
final l$clientName = clientName;
_resultData['clientName'] = l$clientName;
final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename;
return _resultData;
}
@override
int get hashCode {
final l$ip = ip;
final l$downloadRate = downloadRate;
final l$clientName = clientName;
final l$$__typename = $__typename;
return Object.hashAll([
l$ip,
l$downloadRate,
l$clientName,
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
2024-08-15 08:23:44 +00:00
if (!(other is Query$ListTorrents$torrentDaemon$torrents$peers) ||
2024-04-27 11:00:34 +00:00
runtimeType != other.runtimeType) {
return false;
}
final l$ip = ip;
final lOther$ip = other.ip;
if (l$ip != lOther$ip) {
return false;
}
final l$downloadRate = downloadRate;
final lOther$downloadRate = other.downloadRate;
if (l$downloadRate != lOther$downloadRate) {
return false;
}
final l$clientName = clientName;
final lOther$clientName = other.clientName;
if (l$clientName != lOther$clientName) {
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
2024-08-15 08:23:44 +00:00
extension UtilityExtension$Query$ListTorrents$torrentDaemon$torrents$peers
on Query$ListTorrents$torrentDaemon$torrents$peers {
CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<
Query$ListTorrents$torrentDaemon$torrents$peers>
get copyWith => CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers(
2024-04-27 11:00:34 +00:00
this,
(i) => i,
);
}
2024-08-15 08:23:44 +00:00
abstract class CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<TRes> {
factory CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers(
Query$ListTorrents$torrentDaemon$torrents$peers instance,
TRes Function(Query$ListTorrents$torrentDaemon$torrents$peers) then,
) = _CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents$peers;
2024-04-27 11:00:34 +00:00
2024-08-15 08:23:44 +00:00
factory CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers.stub(
TRes res) =
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents$peers;
2024-04-27 11:00:34 +00:00
TRes call({
String? ip,
double? downloadRate,
String? clientName,
String? $__typename,
});
}
2024-08-15 08:23:44 +00:00
class _CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents$peers<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<TRes> {
_CopyWithImpl$Query$ListTorrents$torrentDaemon$torrents$peers(
2024-04-27 11:00:34 +00:00
this._instance,
this._then,
);
2024-08-15 08:23:44 +00:00
final Query$ListTorrents$torrentDaemon$torrents$peers _instance;
2024-04-27 11:00:34 +00:00
2024-08-15 08:23:44 +00:00
final TRes Function(Query$ListTorrents$torrentDaemon$torrents$peers) _then;
2024-04-27 11:00:34 +00:00
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? ip = _undefined,
Object? downloadRate = _undefined,
Object? clientName = _undefined,
Object? $__typename = _undefined,
}) =>
2024-08-15 08:23:44 +00:00
_then(Query$ListTorrents$torrentDaemon$torrents$peers(
2024-04-27 11:00:34 +00:00
ip: ip == _undefined || ip == null ? _instance.ip : (ip as String),
downloadRate: downloadRate == _undefined || downloadRate == null
? _instance.downloadRate
: (downloadRate as double),
clientName: clientName == _undefined || clientName == null
? _instance.clientName
: (clientName as String),
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
}
2024-08-15 08:23:44 +00:00
class _CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents$peers<TRes>
implements CopyWith$Query$ListTorrents$torrentDaemon$torrents$peers<TRes> {
_CopyWithStubImpl$Query$ListTorrents$torrentDaemon$torrents$peers(this._res);
2024-04-27 11:00:34 +00:00
TRes _res;
call({
String? ip,
double? downloadRate,
String? clientName,
2024-04-24 17:36:33 +00:00
String? $__typename,
}) =>
_res;
}