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;
|
|
|
|
|
|
|
|
class Variables$Mutation$MarkTorrentDownload {
|
|
|
|
factory Variables$Mutation$MarkTorrentDownload({required String infohash}) =>
|
|
|
|
Variables$Mutation$MarkTorrentDownload._({
|
|
|
|
r'infohash': infohash,
|
|
|
|
});
|
|
|
|
|
|
|
|
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);
|
|
|
|
return Variables$Mutation$MarkTorrentDownload._(result$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$data;
|
|
|
|
|
|
|
|
String get infohash => (_$data['infohash'] as String);
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final result$data = <String, dynamic>{};
|
|
|
|
final l$infohash = infohash;
|
|
|
|
result$data['infohash'] = l$infohash;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode {
|
|
|
|
final l$infohash = infohash;
|
|
|
|
return Object.hashAll([l$infohash]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
TRes call({String? infohash});
|
|
|
|
}
|
|
|
|
|
|
|
|
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>{};
|
|
|
|
|
|
|
|
TRes call({Object? infohash = _undefined}) =>
|
|
|
|
_then(Variables$Mutation$MarkTorrentDownload._({
|
|
|
|
..._instance._$data,
|
|
|
|
if (infohash != _undefined && infohash != null)
|
|
|
|
'infohash': (infohash as String),
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
call({String? infohash}) => _res;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Mutation$MarkTorrentDownload {
|
|
|
|
Mutation$MarkTorrentDownload({
|
|
|
|
this.downloadTorrent,
|
|
|
|
this.$__typename = 'Mutation',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Mutation$MarkTorrentDownload.fromJson(Map<String, dynamic> json) {
|
|
|
|
final l$downloadTorrent = json['downloadTorrent'];
|
|
|
|
final l$$__typename = json['__typename'];
|
|
|
|
return Mutation$MarkTorrentDownload(
|
|
|
|
downloadTorrent: l$downloadTorrent == null
|
|
|
|
? null
|
|
|
|
: Mutation$MarkTorrentDownload$downloadTorrent.fromJson(
|
|
|
|
(l$downloadTorrent as Map<String, dynamic>)),
|
|
|
|
$__typename: (l$$__typename as String),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
final Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent;
|
|
|
|
|
|
|
|
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$downloadTorrent = downloadTorrent;
|
2024-04-27 11:00:34 +00:00
|
|
|
_resultData['downloadTorrent'] = l$downloadTorrent?.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 {
|
|
|
|
final l$downloadTorrent = downloadTorrent;
|
|
|
|
final l$$__typename = $__typename;
|
|
|
|
return Object.hashAll([
|
|
|
|
l$downloadTorrent,
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
final l$downloadTorrent = downloadTorrent;
|
|
|
|
final lOther$downloadTorrent = other.downloadTorrent;
|
|
|
|
if (l$downloadTorrent != lOther$downloadTorrent) {
|
|
|
|
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({
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent,
|
|
|
|
String? $__typename,
|
|
|
|
});
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes>
|
|
|
|
get downloadTorrent;
|
|
|
|
}
|
|
|
|
|
|
|
|
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({
|
|
|
|
Object? downloadTorrent = _undefined,
|
|
|
|
Object? $__typename = _undefined,
|
|
|
|
}) =>
|
|
|
|
_then(Mutation$MarkTorrentDownload(
|
|
|
|
downloadTorrent: downloadTorrent == _undefined
|
|
|
|
? _instance.downloadTorrent
|
|
|
|
: (downloadTorrent
|
|
|
|
as Mutation$MarkTorrentDownload$downloadTorrent?),
|
|
|
|
$__typename: $__typename == _undefined || $__typename == null
|
|
|
|
? _instance.$__typename
|
|
|
|
: ($__typename as String),
|
|
|
|
));
|
|
|
|
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes>
|
|
|
|
get downloadTorrent {
|
|
|
|
final local$downloadTorrent = _instance.downloadTorrent;
|
|
|
|
return local$downloadTorrent == null
|
|
|
|
? CopyWith$Mutation$MarkTorrentDownload$downloadTorrent.stub(
|
|
|
|
_then(_instance))
|
|
|
|
: CopyWith$Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
local$downloadTorrent, (e) => call(downloadTorrent: e));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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({
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent,
|
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes>
|
|
|
|
get downloadTorrent =>
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent.stub(_res);
|
|
|
|
}
|
|
|
|
|
|
|
|
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: [],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: SelectionSetNode(selections: [
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'downloadTorrent'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [
|
|
|
|
ArgumentNode(
|
|
|
|
name: NameNode(value: 'infohash'),
|
|
|
|
value: VariableNode(name: NameNode(value: 'infohash')),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: SelectionSetNode(selections: [
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'task'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: SelectionSetNode(selections: [
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'id'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: '__typename'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
class Mutation$MarkTorrentDownload$downloadTorrent {
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent({
|
|
|
|
this.task,
|
|
|
|
this.$__typename = 'DownloadTorrentResponse',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Mutation$MarkTorrentDownload$downloadTorrent.fromJson(
|
|
|
|
Map<String, dynamic> json) {
|
|
|
|
final l$task = json['task'];
|
|
|
|
final l$$__typename = json['__typename'];
|
|
|
|
return Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
task: l$task == null
|
|
|
|
? null
|
|
|
|
: Mutation$MarkTorrentDownload$downloadTorrent$task.fromJson(
|
|
|
|
(l$task as Map<String, dynamic>)),
|
|
|
|
$__typename: (l$$__typename as String),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
final Mutation$MarkTorrentDownload$downloadTorrent$task? task;
|
|
|
|
|
|
|
|
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$task = task;
|
2024-04-27 11:00:34 +00:00
|
|
|
_resultData['task'] = l$task?.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 {
|
|
|
|
final l$task = task;
|
|
|
|
final l$$__typename = $__typename;
|
|
|
|
return Object.hashAll([
|
|
|
|
l$task,
|
|
|
|
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$downloadTorrent) ||
|
2024-04-24 17:36:33 +00:00
|
|
|
runtimeType != other.runtimeType) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
final l$task = task;
|
|
|
|
final lOther$task = other.task;
|
|
|
|
if (l$task != lOther$task) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
final l$$__typename = $__typename;
|
|
|
|
final lOther$$__typename = other.$__typename;
|
|
|
|
if (l$$__typename != lOther$$__typename) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension UtilityExtension$Mutation$MarkTorrentDownload$downloadTorrent
|
|
|
|
on Mutation$MarkTorrentDownload$downloadTorrent {
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent>
|
|
|
|
get copyWith => CopyWith$Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
this,
|
|
|
|
(i) => i,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes> {
|
|
|
|
factory CopyWith$Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent instance,
|
|
|
|
TRes Function(Mutation$MarkTorrentDownload$downloadTorrent) then,
|
|
|
|
) = _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent;
|
|
|
|
|
|
|
|
factory CopyWith$Mutation$MarkTorrentDownload$downloadTorrent.stub(TRes res) =
|
|
|
|
_CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent;
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent$task? task,
|
|
|
|
String? $__typename,
|
|
|
|
});
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes> get task;
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent<TRes>
|
|
|
|
implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes> {
|
|
|
|
_CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
this._instance,
|
|
|
|
this._then,
|
|
|
|
);
|
|
|
|
|
|
|
|
final Mutation$MarkTorrentDownload$downloadTorrent _instance;
|
|
|
|
|
|
|
|
final TRes Function(Mutation$MarkTorrentDownload$downloadTorrent) _then;
|
|
|
|
|
|
|
|
static const _undefined = <dynamic, dynamic>{};
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
Object? task = _undefined,
|
|
|
|
Object? $__typename = _undefined,
|
|
|
|
}) =>
|
|
|
|
_then(Mutation$MarkTorrentDownload$downloadTorrent(
|
|
|
|
task: task == _undefined
|
|
|
|
? _instance.task
|
|
|
|
: (task as Mutation$MarkTorrentDownload$downloadTorrent$task?),
|
|
|
|
$__typename: $__typename == _undefined || $__typename == null
|
|
|
|
? _instance.$__typename
|
|
|
|
: ($__typename as String),
|
|
|
|
));
|
|
|
|
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes> get task {
|
|
|
|
final local$task = _instance.task;
|
|
|
|
return local$task == null
|
|
|
|
? CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task.stub(
|
|
|
|
_then(_instance))
|
|
|
|
: CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
local$task, (e) => call(task: e));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent<TRes>
|
|
|
|
implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent<TRes> {
|
|
|
|
_CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent(this._res);
|
|
|
|
|
2024-04-27 11:00:34 +00:00
|
|
|
TRes _res;
|
2024-04-24 17:36:33 +00:00
|
|
|
|
|
|
|
call({
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent$task? task,
|
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes> get task =>
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task.stub(_res);
|
|
|
|
}
|
|
|
|
|
|
|
|
class Mutation$MarkTorrentDownload$downloadTorrent$task {
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent$task({
|
|
|
|
required this.id,
|
|
|
|
this.$__typename = 'Task',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Mutation$MarkTorrentDownload$downloadTorrent$task.fromJson(
|
|
|
|
Map<String, dynamic> json) {
|
|
|
|
final l$id = json['id'];
|
|
|
|
final l$$__typename = json['__typename'];
|
|
|
|
return Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
id: (l$id as String),
|
|
|
|
$__typename: (l$$__typename as String),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
final String id;
|
|
|
|
|
|
|
|
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$id = id;
|
2024-04-27 11:00:34 +00:00
|
|
|
_resultData['id'] = l$id;
|
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$id = id;
|
|
|
|
final l$$__typename = $__typename;
|
|
|
|
return Object.hashAll([
|
|
|
|
l$id,
|
|
|
|
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$downloadTorrent$task) ||
|
2024-04-24 17:36:33 +00:00
|
|
|
runtimeType != other.runtimeType) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
final l$id = id;
|
|
|
|
final lOther$id = other.id;
|
|
|
|
if (l$id != lOther$id) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
final l$$__typename = $__typename;
|
|
|
|
final lOther$$__typename = other.$__typename;
|
|
|
|
if (l$$__typename != lOther$$__typename) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension UtilityExtension$Mutation$MarkTorrentDownload$downloadTorrent$task
|
|
|
|
on Mutation$MarkTorrentDownload$downloadTorrent$task {
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent$task>
|
|
|
|
get copyWith =>
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
this,
|
|
|
|
(i) => i,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<
|
|
|
|
TRes> {
|
|
|
|
factory CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
Mutation$MarkTorrentDownload$downloadTorrent$task instance,
|
|
|
|
TRes Function(Mutation$MarkTorrentDownload$downloadTorrent$task) then,
|
|
|
|
) = _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent$task;
|
|
|
|
|
|
|
|
factory CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task.stub(
|
|
|
|
TRes res) =
|
|
|
|
_CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent$task;
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
String? id,
|
|
|
|
String? $__typename,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes>
|
|
|
|
implements
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes> {
|
|
|
|
_CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
this._instance,
|
|
|
|
this._then,
|
|
|
|
);
|
|
|
|
|
|
|
|
final Mutation$MarkTorrentDownload$downloadTorrent$task _instance;
|
|
|
|
|
|
|
|
final TRes Function(Mutation$MarkTorrentDownload$downloadTorrent$task) _then;
|
|
|
|
|
|
|
|
static const _undefined = <dynamic, dynamic>{};
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
Object? id = _undefined,
|
|
|
|
Object? $__typename = _undefined,
|
|
|
|
}) =>
|
|
|
|
_then(Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
id: id == _undefined || id == null ? _instance.id : (id as String),
|
|
|
|
$__typename: $__typename == _undefined || $__typename == null
|
|
|
|
? _instance.$__typename
|
|
|
|
: ($__typename as String),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes>
|
|
|
|
implements
|
|
|
|
CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task<TRes> {
|
|
|
|
_CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent$task(
|
|
|
|
this._res);
|
|
|
|
|
2024-04-27 11:00:34 +00:00
|
|
|
TRes _res;
|
2024-04-24 17:36:33 +00:00
|
|
|
|
|
|
|
call({
|
|
|
|
String? id,
|
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
}
|
|
|
|
|
2024-04-27 11:00:34 +00:00
|
|
|
class Variables$Query$ListTorrents {
|
|
|
|
factory Variables$Query$ListTorrents({bool? downloading}) =>
|
|
|
|
Variables$Query$ListTorrents._({
|
|
|
|
if (downloading != null) r'downloading': downloading,
|
|
|
|
});
|
|
|
|
|
|
|
|
Variables$Query$ListTorrents._(this._$data);
|
|
|
|
|
|
|
|
factory Variables$Query$ListTorrents.fromJson(Map<String, dynamic> data) {
|
|
|
|
final result$data = <String, dynamic>{};
|
|
|
|
if (data.containsKey('downloading')) {
|
|
|
|
final l$downloading = data['downloading'];
|
|
|
|
result$data['downloading'] = (l$downloading as bool?);
|
|
|
|
}
|
|
|
|
return Variables$Query$ListTorrents._(result$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$data;
|
|
|
|
|
|
|
|
bool? get downloading => (_$data['downloading'] as bool?);
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final result$data = <String, dynamic>{};
|
|
|
|
if (_$data.containsKey('downloading')) {
|
|
|
|
final l$downloading = downloading;
|
|
|
|
result$data['downloading'] = l$downloading;
|
|
|
|
}
|
|
|
|
return result$data;
|
|
|
|
}
|
|
|
|
|
|
|
|
CopyWith$Variables$Query$ListTorrents<Variables$Query$ListTorrents>
|
|
|
|
get copyWith => CopyWith$Variables$Query$ListTorrents(
|
|
|
|
this,
|
|
|
|
(i) => i,
|
|
|
|
);
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
if (identical(this, other)) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(other is Variables$Query$ListTorrents) ||
|
|
|
|
runtimeType != other.runtimeType) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
final l$downloading = downloading;
|
|
|
|
final lOther$downloading = other.downloading;
|
|
|
|
if (_$data.containsKey('downloading') !=
|
|
|
|
other._$data.containsKey('downloading')) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (l$downloading != lOther$downloading) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode {
|
|
|
|
final l$downloading = downloading;
|
|
|
|
return Object.hashAll(
|
|
|
|
[_$data.containsKey('downloading') ? l$downloading : const {}]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class CopyWith$Variables$Query$ListTorrents<TRes> {
|
|
|
|
factory CopyWith$Variables$Query$ListTorrents(
|
|
|
|
Variables$Query$ListTorrents instance,
|
|
|
|
TRes Function(Variables$Query$ListTorrents) then,
|
|
|
|
) = _CopyWithImpl$Variables$Query$ListTorrents;
|
|
|
|
|
|
|
|
factory CopyWith$Variables$Query$ListTorrents.stub(TRes res) =
|
|
|
|
_CopyWithStubImpl$Variables$Query$ListTorrents;
|
|
|
|
|
|
|
|
TRes call({bool? downloading});
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithImpl$Variables$Query$ListTorrents<TRes>
|
|
|
|
implements CopyWith$Variables$Query$ListTorrents<TRes> {
|
|
|
|
_CopyWithImpl$Variables$Query$ListTorrents(
|
|
|
|
this._instance,
|
|
|
|
this._then,
|
|
|
|
);
|
|
|
|
|
|
|
|
final Variables$Query$ListTorrents _instance;
|
|
|
|
|
|
|
|
final TRes Function(Variables$Query$ListTorrents) _then;
|
|
|
|
|
|
|
|
static const _undefined = <dynamic, dynamic>{};
|
|
|
|
|
|
|
|
TRes call({Object? downloading = _undefined}) =>
|
|
|
|
_then(Variables$Query$ListTorrents._({
|
|
|
|
..._instance._$data,
|
|
|
|
if (downloading != _undefined) 'downloading': (downloading as bool?),
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithStubImpl$Variables$Query$ListTorrents<TRes>
|
|
|
|
implements CopyWith$Variables$Query$ListTorrents<TRes> {
|
|
|
|
_CopyWithStubImpl$Variables$Query$ListTorrents(this._res);
|
|
|
|
|
|
|
|
TRes _res;
|
|
|
|
|
|
|
|
call({bool? downloading}) => _res;
|
|
|
|
}
|
|
|
|
|
2024-04-24 17:36:33 +00:00
|
|
|
class Query$ListTorrents {
|
|
|
|
Query$ListTorrents({
|
|
|
|
required this.torrents,
|
|
|
|
this.$__typename = 'Query',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Query$ListTorrents.fromJson(Map<String, dynamic> json) {
|
|
|
|
final l$torrents = json['torrents'];
|
|
|
|
final l$$__typename = json['__typename'];
|
|
|
|
return Query$ListTorrents(
|
|
|
|
torrents: (l$torrents as List<dynamic>)
|
|
|
|
.map((e) =>
|
|
|
|
Query$ListTorrents$torrents.fromJson((e as Map<String, dynamic>)))
|
|
|
|
.toList(),
|
|
|
|
$__typename: (l$$__typename as String),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
final List<Query$ListTorrents$torrents> torrents;
|
|
|
|
|
|
|
|
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$torrents = torrents;
|
2024-04-27 11:00:34 +00:00
|
|
|
_resultData['torrents'] = l$torrents.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$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;
|
|
|
|
}
|
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;
|
|
|
|
}
|
|
|
|
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 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({
|
|
|
|
List<Query$ListTorrents$torrents>? torrents,
|
|
|
|
String? $__typename,
|
|
|
|
});
|
|
|
|
TRes torrents(
|
|
|
|
Iterable<Query$ListTorrents$torrents> Function(
|
|
|
|
Iterable<
|
|
|
|
CopyWith$Query$ListTorrents$torrents<
|
|
|
|
Query$ListTorrents$torrents>>)
|
2024-04-27 11:00:34 +00:00
|
|
|
_fn);
|
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({
|
|
|
|
Object? torrents = _undefined,
|
|
|
|
Object? $__typename = _undefined,
|
|
|
|
}) =>
|
|
|
|
_then(Query$ListTorrents(
|
|
|
|
torrents: torrents == _undefined || torrents == null
|
|
|
|
? _instance.torrents
|
|
|
|
: (torrents as List<Query$ListTorrents$torrents>),
|
|
|
|
$__typename: $__typename == _undefined || $__typename == null
|
|
|
|
? _instance.$__typename
|
|
|
|
: ($__typename as String),
|
|
|
|
));
|
|
|
|
|
|
|
|
TRes torrents(
|
|
|
|
Iterable<Query$ListTorrents$torrents> Function(
|
|
|
|
Iterable<
|
|
|
|
CopyWith$Query$ListTorrents$torrents<
|
|
|
|
Query$ListTorrents$torrents>>)
|
2024-04-27 11:00:34 +00:00
|
|
|
_fn) =>
|
2024-04-24 17:36:33 +00:00
|
|
|
call(
|
2024-04-27 11:00:34 +00:00
|
|
|
torrents: _fn(_instance.torrents
|
2024-04-24 17:36:33 +00:00
|
|
|
.map((e) => CopyWith$Query$ListTorrents$torrents(
|
|
|
|
e,
|
|
|
|
(i) => i,
|
|
|
|
))).toList());
|
|
|
|
}
|
|
|
|
|
|
|
|
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({
|
|
|
|
List<Query$ListTorrents$torrents>? torrents,
|
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
|
2024-04-27 11:00:34 +00:00
|
|
|
torrents(_fn) => _res;
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const documentNodeQueryListTorrents = DocumentNode(definitions: [
|
|
|
|
OperationDefinitionNode(
|
|
|
|
type: OperationType.query,
|
|
|
|
name: NameNode(value: 'ListTorrents'),
|
2024-04-27 11:00:34 +00:00
|
|
|
variableDefinitions: [
|
|
|
|
VariableDefinitionNode(
|
|
|
|
variable: VariableNode(name: NameNode(value: 'downloading')),
|
|
|
|
type: NamedTypeNode(
|
|
|
|
name: NameNode(value: 'Boolean'),
|
|
|
|
isNonNull: false,
|
|
|
|
),
|
|
|
|
defaultValue: DefaultValueNode(value: null),
|
|
|
|
directives: [],
|
|
|
|
)
|
|
|
|
],
|
2024-04-24 17:36:33 +00:00
|
|
|
directives: [],
|
|
|
|
selectionSet: SelectionSetNode(selections: [
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'torrents'),
|
|
|
|
alias: null,
|
2024-04-27 11:00:34 +00:00
|
|
|
arguments: [
|
|
|
|
ArgumentNode(
|
|
|
|
name: NameNode(value: 'filter'),
|
|
|
|
value: ObjectValueNode(fields: [
|
|
|
|
ObjectFieldNode(
|
|
|
|
name: NameNode(value: 'downloading'),
|
|
|
|
value: ObjectValueNode(fields: [
|
|
|
|
ObjectFieldNode(
|
|
|
|
name: NameNode(value: 'eq'),
|
|
|
|
value: VariableNode(name: NameNode(value: 'downloading')),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
],
|
2024-04-24 17:36:33 +00:00
|
|
|
directives: [],
|
|
|
|
selectionSet: SelectionSetNode(selections: [
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'name'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'infohash'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'bytesCompleted'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
|
|
|
FieldNode(
|
|
|
|
name: NameNode(value: 'bytesMissing'),
|
|
|
|
alias: null,
|
|
|
|
arguments: [],
|
|
|
|
directives: [],
|
|
|
|
selectionSet: null,
|
|
|
|
),
|
2024-04-27 11:00:34 +00:00
|
|
|
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-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,
|
|
|
|
Variables$Query$ListTorrents? variables,
|
|
|
|
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
|
|
|
variables: variables?.toJson() ?? {},
|
|
|
|
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,
|
|
|
|
Variables$Query$ListTorrents? variables,
|
|
|
|
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
|
|
|
variables: variables?.toJson() ?? {},
|
|
|
|
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-04-27 11:00:34 +00:00
|
|
|
FetchMoreOptions$Query$ListTorrents({
|
|
|
|
required graphql.UpdateQuery updateQuery,
|
|
|
|
Variables$Query$ListTorrents? variables,
|
|
|
|
}) : super(
|
|
|
|
updateQuery: updateQuery,
|
|
|
|
variables: variables?.toJson() ?? {},
|
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,
|
2024-04-27 11:00:34 +00:00
|
|
|
Variables$Query$ListTorrents? variables,
|
2024-04-24 17:36:33 +00:00
|
|
|
bool broadcast = true,
|
|
|
|
}) =>
|
2024-04-27 11:00:34 +00:00
|
|
|
this.writeQuery(
|
|
|
|
graphql.Request(
|
|
|
|
operation: graphql.Operation(document: documentNodeQueryListTorrents),
|
|
|
|
variables: variables?.toJson() ?? const {},
|
|
|
|
),
|
2024-04-24 17:36:33 +00:00
|
|
|
data: data.toJson(),
|
|
|
|
broadcast: broadcast,
|
|
|
|
);
|
2024-04-27 11:00:34 +00:00
|
|
|
Query$ListTorrents? readQuery$ListTorrents({
|
|
|
|
Variables$Query$ListTorrents? variables,
|
|
|
|
bool optimistic = true,
|
|
|
|
}) {
|
|
|
|
final result = this.readQuery(
|
|
|
|
graphql.Request(
|
|
|
|
operation: graphql.Operation(document: documentNodeQueryListTorrents),
|
|
|
|
variables: variables?.toJson() ?? const {},
|
|
|
|
),
|
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
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
class Query$ListTorrents$torrents {
|
|
|
|
Query$ListTorrents$torrents({
|
|
|
|
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',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Query$ListTorrents$torrents.fromJson(Map<String, dynamic> json) {
|
|
|
|
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'];
|
|
|
|
return Query$ListTorrents$torrents(
|
|
|
|
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>)
|
|
|
|
.map((e) => Query$ListTorrents$torrents$peers.fromJson(
|
|
|
|
(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-04-27 11:00:34 +00:00
|
|
|
final List<Query$ListTorrents$torrents$peers> peers;
|
|
|
|
|
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-04-27 11:00:34 +00:00
|
|
|
if (!(other is Query$ListTorrents$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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension UtilityExtension$Query$ListTorrents$torrents
|
|
|
|
on Query$ListTorrents$torrents {
|
|
|
|
CopyWith$Query$ListTorrents$torrents<Query$ListTorrents$torrents>
|
|
|
|
get copyWith => CopyWith$Query$ListTorrents$torrents(
|
|
|
|
this,
|
|
|
|
(i) => i,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class CopyWith$Query$ListTorrents$torrents<TRes> {
|
|
|
|
factory CopyWith$Query$ListTorrents$torrents(
|
|
|
|
Query$ListTorrents$torrents instance,
|
|
|
|
TRes Function(Query$ListTorrents$torrents) then,
|
|
|
|
) = _CopyWithImpl$Query$ListTorrents$torrents;
|
|
|
|
|
|
|
|
factory CopyWith$Query$ListTorrents$torrents.stub(TRes res) =
|
|
|
|
_CopyWithStubImpl$Query$ListTorrents$torrents;
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
String? name,
|
|
|
|
String? infohash,
|
|
|
|
int? bytesCompleted,
|
|
|
|
int? bytesMissing,
|
2024-04-27 11:00:34 +00:00
|
|
|
List<Query$ListTorrents$torrents$peers>? peers,
|
2024-04-24 17:36:33 +00:00
|
|
|
String? $__typename,
|
|
|
|
});
|
2024-04-27 11:00:34 +00:00
|
|
|
TRes peers(
|
|
|
|
Iterable<Query$ListTorrents$torrents$peers> Function(
|
|
|
|
Iterable<
|
|
|
|
CopyWith$Query$ListTorrents$torrents$peers<
|
|
|
|
Query$ListTorrents$torrents$peers>>)
|
|
|
|
_fn);
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithImpl$Query$ListTorrents$torrents<TRes>
|
|
|
|
implements CopyWith$Query$ListTorrents$torrents<TRes> {
|
|
|
|
_CopyWithImpl$Query$ListTorrents$torrents(
|
|
|
|
this._instance,
|
|
|
|
this._then,
|
|
|
|
);
|
|
|
|
|
|
|
|
final Query$ListTorrents$torrents _instance;
|
|
|
|
|
|
|
|
final TRes Function(Query$ListTorrents$torrents) _then;
|
|
|
|
|
|
|
|
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,
|
|
|
|
}) =>
|
|
|
|
_then(Query$ListTorrents$torrents(
|
|
|
|
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
|
|
|
|
: (peers as List<Query$ListTorrents$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(
|
|
|
|
Iterable<Query$ListTorrents$torrents$peers> Function(
|
|
|
|
Iterable<
|
|
|
|
CopyWith$Query$ListTorrents$torrents$peers<
|
|
|
|
Query$ListTorrents$torrents$peers>>)
|
|
|
|
_fn) =>
|
|
|
|
call(
|
|
|
|
peers: _fn(_instance.peers
|
|
|
|
.map((e) => CopyWith$Query$ListTorrents$torrents$peers(
|
|
|
|
e,
|
|
|
|
(i) => i,
|
|
|
|
))).toList());
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithStubImpl$Query$ListTorrents$torrents<TRes>
|
|
|
|
implements CopyWith$Query$ListTorrents$torrents<TRes> {
|
|
|
|
_CopyWithStubImpl$Query$ListTorrents$torrents(this._res);
|
|
|
|
|
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-04-27 11:00:34 +00:00
|
|
|
List<Query$ListTorrents$torrents$peers>? peers,
|
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
|
|
|
|
peers(_fn) => _res;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Query$ListTorrents$torrents$peers {
|
|
|
|
Query$ListTorrents$torrents$peers({
|
|
|
|
required this.ip,
|
|
|
|
required this.downloadRate,
|
|
|
|
required this.clientName,
|
|
|
|
this.$__typename = 'TorrentPeer',
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Query$ListTorrents$torrents$peers.fromJson(
|
|
|
|
Map<String, dynamic> json) {
|
|
|
|
final l$ip = json['ip'];
|
|
|
|
final l$downloadRate = json['downloadRate'];
|
|
|
|
final l$clientName = json['clientName'];
|
|
|
|
final l$$__typename = json['__typename'];
|
|
|
|
return Query$ListTorrents$torrents$peers(
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
if (!(other is Query$ListTorrents$torrents$peers) ||
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension UtilityExtension$Query$ListTorrents$torrents$peers
|
|
|
|
on Query$ListTorrents$torrents$peers {
|
|
|
|
CopyWith$Query$ListTorrents$torrents$peers<Query$ListTorrents$torrents$peers>
|
|
|
|
get copyWith => CopyWith$Query$ListTorrents$torrents$peers(
|
|
|
|
this,
|
|
|
|
(i) => i,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class CopyWith$Query$ListTorrents$torrents$peers<TRes> {
|
|
|
|
factory CopyWith$Query$ListTorrents$torrents$peers(
|
|
|
|
Query$ListTorrents$torrents$peers instance,
|
|
|
|
TRes Function(Query$ListTorrents$torrents$peers) then,
|
|
|
|
) = _CopyWithImpl$Query$ListTorrents$torrents$peers;
|
|
|
|
|
|
|
|
factory CopyWith$Query$ListTorrents$torrents$peers.stub(TRes res) =
|
|
|
|
_CopyWithStubImpl$Query$ListTorrents$torrents$peers;
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
String? ip,
|
|
|
|
double? downloadRate,
|
|
|
|
String? clientName,
|
|
|
|
String? $__typename,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithImpl$Query$ListTorrents$torrents$peers<TRes>
|
|
|
|
implements CopyWith$Query$ListTorrents$torrents$peers<TRes> {
|
|
|
|
_CopyWithImpl$Query$ListTorrents$torrents$peers(
|
|
|
|
this._instance,
|
|
|
|
this._then,
|
|
|
|
);
|
|
|
|
|
|
|
|
final Query$ListTorrents$torrents$peers _instance;
|
|
|
|
|
|
|
|
final TRes Function(Query$ListTorrents$torrents$peers) _then;
|
|
|
|
|
|
|
|
static const _undefined = <dynamic, dynamic>{};
|
|
|
|
|
|
|
|
TRes call({
|
|
|
|
Object? ip = _undefined,
|
|
|
|
Object? downloadRate = _undefined,
|
|
|
|
Object? clientName = _undefined,
|
|
|
|
Object? $__typename = _undefined,
|
|
|
|
}) =>
|
|
|
|
_then(Query$ListTorrents$torrents$peers(
|
|
|
|
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),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CopyWithStubImpl$Query$ListTorrents$torrents$peers<TRes>
|
|
|
|
implements CopyWith$Query$ListTorrents$torrents$peers<TRes> {
|
|
|
|
_CopyWithStubImpl$Query$ListTorrents$torrents$peers(this._res);
|
|
|
|
|
|
|
|
TRes _res;
|
|
|
|
|
|
|
|
call({
|
|
|
|
String? ip,
|
|
|
|
double? downloadRate,
|
|
|
|
String? clientName,
|
2024-04-24 17:36:33 +00:00
|
|
|
String? $__typename,
|
|
|
|
}) =>
|
|
|
|
_res;
|
|
|
|
}
|