// ignore_for_file: type=lint 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 data) { final result$data = {}; final l$infohash = data['infohash']; result$data['infohash'] = (l$infohash as String); return Variables$Mutation$MarkTorrentDownload._(result$data); } Map _$data; String get infohash => (_$data['infohash'] as String); Map toJson() { final result$data = {}; 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; } if (!(other is Variables$Mutation$MarkTorrentDownload) || 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 { 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 implements CopyWith$Variables$Mutation$MarkTorrentDownload { _CopyWithImpl$Variables$Mutation$MarkTorrentDownload( this._instance, this._then, ); final Variables$Mutation$MarkTorrentDownload _instance; final TRes Function(Variables$Mutation$MarkTorrentDownload) _then; static const _undefined = {}; 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 implements CopyWith$Variables$Mutation$MarkTorrentDownload { _CopyWithStubImpl$Variables$Mutation$MarkTorrentDownload(this._res); TRes _res; call({String? infohash}) => _res; } class Mutation$MarkTorrentDownload { Mutation$MarkTorrentDownload({ this.downloadTorrent, this.$__typename = 'Mutation', }); factory Mutation$MarkTorrentDownload.fromJson(Map 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)), $__typename: (l$$__typename as String), ); } final Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent; final String $__typename; Map toJson() { final _resultData = {}; final l$downloadTorrent = downloadTorrent; _resultData['downloadTorrent'] = l$downloadTorrent?.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; } @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; } if (!(other is Mutation$MarkTorrentDownload) || 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 get copyWith => CopyWith$Mutation$MarkTorrentDownload( this, (i) => i, ); } abstract class CopyWith$Mutation$MarkTorrentDownload { 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 get downloadTorrent; } class _CopyWithImpl$Mutation$MarkTorrentDownload implements CopyWith$Mutation$MarkTorrentDownload { _CopyWithImpl$Mutation$MarkTorrentDownload( this._instance, this._then, ); final Mutation$MarkTorrentDownload _instance; final TRes Function(Mutation$MarkTorrentDownload) _then; static const _undefined = {}; 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 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 implements CopyWith$Mutation$MarkTorrentDownload { _CopyWithStubImpl$Mutation$MarkTorrentDownload(this._res); TRes _res; call({ Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent, String? $__typename, }) => _res; CopyWith$Mutation$MarkTorrentDownload$downloadTorrent 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 data) => Mutation$MarkTorrentDownload.fromJson(data); typedef OnMutationCompleted$Mutation$MarkTorrentDownload = FutureOr Function( Map?, Mutation$MarkTorrentDownload?, ); class Options$Mutation$MarkTorrentDownload extends graphql.MutationOptions { Options$Mutation$MarkTorrentDownload({ String? operationName, required Variables$Mutation$MarkTorrentDownload variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted, graphql.OnMutationUpdate? update, graphql.OnError? onError, }) : onCompletedWithParsed = onCompleted, super( variables: variables.toJson(), operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null : (data) => onCompleted( data, data == null ? null : _parserFn$Mutation$MarkTorrentDownload(data), ), update: update, onError: onError, document: documentNodeMutationMarkTorrentDownload, parserFn: _parserFn$Mutation$MarkTorrentDownload, ); final OnMutationCompleted$Mutation$MarkTorrentDownload? onCompletedWithParsed; @override List get properties => [ ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed, ]; } class WatchOptions$Mutation$MarkTorrentDownload extends graphql.WatchQueryOptions { WatchOptions$Mutation$MarkTorrentDownload({ String? operationName, required Variables$Mutation$MarkTorrentDownload variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, bool carryForwardDataOnException = true, bool fetchResults = false, }) : super( variables: variables.toJson(), operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeMutationMarkTorrentDownload, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, parserFn: _parserFn$Mutation$MarkTorrentDownload, ); } extension ClientExtension$Mutation$MarkTorrentDownload on graphql.GraphQLClient { Future> mutate$MarkTorrentDownload( Options$Mutation$MarkTorrentDownload options) async => await this.mutate(options); graphql.ObservableQuery watchMutation$MarkTorrentDownload( WatchOptions$Mutation$MarkTorrentDownload options) => this.watchMutation(options); } class Mutation$MarkTorrentDownload$HookResult { Mutation$MarkTorrentDownload$HookResult( this.runMutation, this.result, ); final RunMutation$Mutation$MarkTorrentDownload runMutation; final graphql.QueryResult 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 useWatchMutation$MarkTorrentDownload( WatchOptions$Mutation$MarkTorrentDownload options) => graphql_flutter.useWatchMutation(options); class WidgetOptions$Mutation$MarkTorrentDownload extends graphql.MutationOptions { WidgetOptions$Mutation$MarkTorrentDownload({ String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, graphql.Context? context, OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted, graphql.OnMutationUpdate? update, graphql.OnError? onError, }) : onCompletedWithParsed = onCompleted, super( operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, onCompleted: onCompleted == null ? null : (data) => onCompleted( data, data == null ? null : _parserFn$Mutation$MarkTorrentDownload(data), ), update: update, onError: onError, document: documentNodeMutationMarkTorrentDownload, parserFn: _parserFn$Mutation$MarkTorrentDownload, ); final OnMutationCompleted$Mutation$MarkTorrentDownload? onCompletedWithParsed; @override List get properties => [ ...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed, ]; } typedef RunMutation$Mutation$MarkTorrentDownload = graphql.MultiSourceResult Function( Variables$Mutation$MarkTorrentDownload, { Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, }); typedef Builder$Mutation$MarkTorrentDownload = widgets.Widget Function( RunMutation$Mutation$MarkTorrentDownload, graphql.QueryResult?, ); class Mutation$MarkTorrentDownload$Widget extends graphql_flutter.Mutation { Mutation$MarkTorrentDownload$Widget({ widgets.Key? key, WidgetOptions$Mutation$MarkTorrentDownload? options, required Builder$Mutation$MarkTorrentDownload builder, }) : super( key: key, 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 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)), $__typename: (l$$__typename as String), ); } final Mutation$MarkTorrentDownload$downloadTorrent$task? task; final String $__typename; Map toJson() { final _resultData = {}; final l$task = task; _resultData['task'] = l$task?.toJson(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; } @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; } if (!(other is Mutation$MarkTorrentDownload$downloadTorrent) || 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 { 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 get task; } class _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent { _CopyWithImpl$Mutation$MarkTorrentDownload$downloadTorrent( this._instance, this._then, ); final Mutation$MarkTorrentDownload$downloadTorrent _instance; final TRes Function(Mutation$MarkTorrentDownload$downloadTorrent) _then; static const _undefined = {}; 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 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 implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent { _CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent(this._res); TRes _res; call({ Mutation$MarkTorrentDownload$downloadTorrent$task? task, String? $__typename, }) => _res; CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task 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 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 toJson() { final _resultData = {}; final l$id = id; _resultData['id'] = l$id; final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; } @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; } if (!(other is Mutation$MarkTorrentDownload$downloadTorrent$task) || 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 implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task { _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 = {}; 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 implements CopyWith$Mutation$MarkTorrentDownload$downloadTorrent$task { _CopyWithStubImpl$Mutation$MarkTorrentDownload$downloadTorrent$task( this._res); TRes _res; call({ String? id, String? $__typename, }) => _res; } 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 data) { final result$data = {}; if (data.containsKey('downloading')) { final l$downloading = data['downloading']; result$data['downloading'] = (l$downloading as bool?); } return Variables$Query$ListTorrents._(result$data); } Map _$data; bool? get downloading => (_$data['downloading'] as bool?); Map toJson() { final result$data = {}; if (_$data.containsKey('downloading')) { final l$downloading = downloading; result$data['downloading'] = l$downloading; } return result$data; } CopyWith$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 { 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 implements CopyWith$Variables$Query$ListTorrents { _CopyWithImpl$Variables$Query$ListTorrents( this._instance, this._then, ); final Variables$Query$ListTorrents _instance; final TRes Function(Variables$Query$ListTorrents) _then; static const _undefined = {}; TRes call({Object? downloading = _undefined}) => _then(Variables$Query$ListTorrents._({ ..._instance._$data, if (downloading != _undefined) 'downloading': (downloading as bool?), })); } class _CopyWithStubImpl$Variables$Query$ListTorrents implements CopyWith$Variables$Query$ListTorrents { _CopyWithStubImpl$Variables$Query$ListTorrents(this._res); TRes _res; call({bool? downloading}) => _res; } class Query$ListTorrents { Query$ListTorrents({ required this.torrents, this.$__typename = 'Query', }); factory Query$ListTorrents.fromJson(Map json) { final l$torrents = json['torrents']; final l$$__typename = json['__typename']; return Query$ListTorrents( torrents: (l$torrents as List) .map((e) => Query$ListTorrents$torrents.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), ); } final List torrents; final String $__typename; Map toJson() { final _resultData = {}; 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) || 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 on Query$ListTorrents { CopyWith$Query$ListTorrents get copyWith => CopyWith$Query$ListTorrents( this, (i) => i, ); } abstract class CopyWith$Query$ListTorrents { 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? torrents, String? $__typename, }); TRes torrents( Iterable Function( Iterable< CopyWith$Query$ListTorrents$torrents< Query$ListTorrents$torrents>>) _fn); } class _CopyWithImpl$Query$ListTorrents implements CopyWith$Query$ListTorrents { _CopyWithImpl$Query$ListTorrents( this._instance, this._then, ); final Query$ListTorrents _instance; final TRes Function(Query$ListTorrents) _then; static const _undefined = {}; TRes call({ Object? torrents = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListTorrents( torrents: torrents == _undefined || torrents == null ? _instance.torrents : (torrents as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); TRes torrents( Iterable Function( Iterable< CopyWith$Query$ListTorrents$torrents< Query$ListTorrents$torrents>>) _fn) => call( torrents: _fn(_instance.torrents .map((e) => CopyWith$Query$ListTorrents$torrents( e, (i) => i, ))).toList()); } class _CopyWithStubImpl$Query$ListTorrents implements CopyWith$Query$ListTorrents { _CopyWithStubImpl$Query$ListTorrents(this._res); TRes _res; call({ List? torrents, String? $__typename, }) => _res; torrents(_fn) => _res; } const documentNodeQueryListTorrents = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, name: NameNode(value: 'ListTorrents'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'downloading')), type: NamedTypeNode( name: NameNode(value: 'Boolean'), isNonNull: false, ), defaultValue: DefaultValueNode(value: null), directives: [], ) ], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'torrents'), alias: null, 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')), ) ]), ) ]), ) ], 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, ), 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, ), ]), ), 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 data) => Query$ListTorrents.fromJson(data); typedef OnQueryComplete$Query$ListTorrents = FutureOr Function( Map?, Query$ListTorrents?, ); class Options$Query$ListTorrents extends graphql.QueryOptions { Options$Query$ListTorrents({ String? operationName, Variables$Query$ListTorrents? variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, Query$ListTorrents? typedOptimisticResult, Duration? pollInterval, graphql.Context? context, OnQueryComplete$Query$ListTorrents? onComplete, graphql.OnQueryError? onError, }) : onCompleteWithParsed = onComplete, super( variables: variables?.toJson() ?? {}, operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), pollInterval: pollInterval, context: context, onComplete: onComplete == null ? null : (data) => onComplete( data, data == null ? null : _parserFn$Query$ListTorrents(data), ), onError: onError, document: documentNodeQueryListTorrents, parserFn: _parserFn$Query$ListTorrents, ); final OnQueryComplete$Query$ListTorrents? onCompleteWithParsed; @override List get properties => [ ...super.onComplete == null ? super.properties : super.properties.where((property) => property != onComplete), onCompleteWithParsed, ]; } class WatchOptions$Query$ListTorrents extends graphql.WatchQueryOptions { WatchOptions$Query$ListTorrents({ String? operationName, Variables$Query$ListTorrents? variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, Query$ListTorrents? typedOptimisticResult, graphql.Context? context, Duration? pollInterval, bool? eagerlyFetchResults, bool carryForwardDataOnException = true, bool fetchResults = false, }) : super( variables: variables?.toJson() ?? {}, operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), context: context, document: documentNodeQueryListTorrents, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, parserFn: _parserFn$Query$ListTorrents, ); } class FetchMoreOptions$Query$ListTorrents extends graphql.FetchMoreOptions { FetchMoreOptions$Query$ListTorrents({ required graphql.UpdateQuery updateQuery, Variables$Query$ListTorrents? variables, }) : super( updateQuery: updateQuery, variables: variables?.toJson() ?? {}, document: documentNodeQueryListTorrents, ); } extension ClientExtension$Query$ListTorrents on graphql.GraphQLClient { Future> query$ListTorrents( [Options$Query$ListTorrents? options]) async => await this.query(options ?? Options$Query$ListTorrents()); graphql.ObservableQuery watchQuery$ListTorrents( [WatchOptions$Query$ListTorrents? options]) => this.watchQuery(options ?? WatchOptions$Query$ListTorrents()); void writeQuery$ListTorrents({ required Query$ListTorrents data, Variables$Query$ListTorrents? variables, bool broadcast = true, }) => this.writeQuery( graphql.Request( operation: graphql.Operation(document: documentNodeQueryListTorrents), variables: variables?.toJson() ?? const {}, ), data: data.toJson(), broadcast: broadcast, ); 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 {}, ), optimistic: optimistic, ); return result == null ? null : Query$ListTorrents.fromJson(result); } } graphql_flutter.QueryHookResult useQuery$ListTorrents( [Options$Query$ListTorrents? options]) => graphql_flutter.useQuery(options ?? Options$Query$ListTorrents()); graphql.ObservableQuery useWatchQuery$ListTorrents( [WatchOptions$Query$ListTorrents? options]) => graphql_flutter.useWatchQuery(options ?? WatchOptions$Query$ListTorrents()); class Query$ListTorrents$Widget extends graphql_flutter.Query { Query$ListTorrents$Widget({ widgets.Key? key, Options$Query$ListTorrents? options, required graphql_flutter.QueryBuilder builder, }) : super( key: key, options: options ?? Options$Query$ListTorrents(), builder: builder, ); } class Query$ListTorrents$torrents { Query$ListTorrents$torrents({ required this.name, required this.infohash, required this.bytesCompleted, required this.bytesMissing, required this.peers, this.$__typename = 'Torrent', }); factory Query$ListTorrents$torrents.fromJson(Map json) { final l$name = json['name']; final l$infohash = json['infohash']; final l$bytesCompleted = json['bytesCompleted']; final l$bytesMissing = json['bytesMissing']; final l$peers = json['peers']; 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), peers: (l$peers as List) .map((e) => Query$ListTorrents$torrents$peers.fromJson( (e as Map))) .toList(), $__typename: (l$$__typename as String), ); } final String name; final String infohash; final int bytesCompleted; final int bytesMissing; final List peers; final String $__typename; Map toJson() { final _resultData = {}; final l$name = name; _resultData['name'] = l$name; final l$infohash = infohash; _resultData['infohash'] = l$infohash; final l$bytesCompleted = bytesCompleted; _resultData['bytesCompleted'] = l$bytesCompleted; final l$bytesMissing = bytesMissing; _resultData['bytesMissing'] = l$bytesMissing; final l$peers = peers; _resultData['peers'] = l$peers.map((e) => e.toJson()).toList(); final l$$__typename = $__typename; _resultData['__typename'] = l$$__typename; return _resultData; } @override int get hashCode { final l$name = name; final l$infohash = infohash; final l$bytesCompleted = bytesCompleted; final l$bytesMissing = bytesMissing; final l$peers = peers; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$infohash, l$bytesCompleted, l$bytesMissing, Object.hashAll(l$peers.map((v) => v)), l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (!(other is Query$ListTorrents$torrents) || 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; } 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; } } 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 get copyWith => CopyWith$Query$ListTorrents$torrents( this, (i) => i, ); } abstract class CopyWith$Query$ListTorrents$torrents { 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, List? peers, String? $__typename, }); TRes peers( Iterable Function( Iterable< CopyWith$Query$ListTorrents$torrents$peers< Query$ListTorrents$torrents$peers>>) _fn); } class _CopyWithImpl$Query$ListTorrents$torrents implements CopyWith$Query$ListTorrents$torrents { _CopyWithImpl$Query$ListTorrents$torrents( this._instance, this._then, ); final Query$ListTorrents$torrents _instance; final TRes Function(Query$ListTorrents$torrents) _then; static const _undefined = {}; TRes call({ Object? name = _undefined, Object? infohash = _undefined, Object? bytesCompleted = _undefined, Object? bytesMissing = _undefined, Object? peers = _undefined, 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), peers: peers == _undefined || peers == null ? _instance.peers : (peers as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); TRes peers( Iterable 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()); } class _CopyWithStubImpl$Query$ListTorrents$torrents implements CopyWith$Query$ListTorrents$torrents { _CopyWithStubImpl$Query$ListTorrents$torrents(this._res); TRes _res; call({ String? name, String? infohash, int? bytesCompleted, int? bytesMissing, List? 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 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 toJson() { final _resultData = {}; 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 get copyWith => CopyWith$Query$ListTorrents$torrents$peers( this, (i) => i, ); } abstract class CopyWith$Query$ListTorrents$torrents$peers { 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 implements CopyWith$Query$ListTorrents$torrents$peers { _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 = {}; 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 implements CopyWith$Query$ListTorrents$torrents$peers { _CopyWithStubImpl$Query$ListTorrents$torrents$peers(this._res); TRes _res; call({ String? ip, double? downloadRate, String? clientName, String? $__typename, }) => _res; }