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 = {}; @override 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); final TRes _res; @override 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 = {}; @override 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), )); @override 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); final TRes _res; @override call({ Mutation$MarkTorrentDownload$downloadTorrent? downloadTorrent, String? $__typename, }) => _res; @override 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({ super.operationName, required Variables$Mutation$MarkTorrentDownload variables, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, super.context, OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted, super.update, super.onError, }) : onCompletedWithParsed = onCompleted, super( variables: variables.toJson(), optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), onCompleted: onCompleted == null ? null : (data) => onCompleted( data, data == null ? null : _parserFn$Mutation$MarkTorrentDownload(data), ), 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({ super.operationName, required Variables$Mutation$MarkTorrentDownload variables, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, super.context, super.pollInterval, super.eagerlyFetchResults, super.carryForwardDataOnException, super.fetchResults, }) : super( variables: variables.toJson(), optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), document: documentNodeMutationMarkTorrentDownload, parserFn: _parserFn$Mutation$MarkTorrentDownload, ); } extension ClientExtension$Mutation$MarkTorrentDownload on graphql.GraphQLClient { Future> mutate$MarkTorrentDownload( Options$Mutation$MarkTorrentDownload options) async => await mutate(options); graphql.ObservableQuery watchMutation$MarkTorrentDownload( WatchOptions$Mutation$MarkTorrentDownload options) => 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({ super.operationName, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Mutation$MarkTorrentDownload? typedOptimisticResult, super.context, OnMutationCompleted$Mutation$MarkTorrentDownload? onCompleted, super.update, super.onError, }) : onCompletedWithParsed = onCompleted, super( optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), onCompleted: onCompleted == null ? null : (data) => onCompleted( data, data == null ? null : _parserFn$Mutation$MarkTorrentDownload(data), ), 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({ super.key, WidgetOptions$Mutation$MarkTorrentDownload? options, required Builder$Mutation$MarkTorrentDownload builder, }) : super( 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 = {}; @override 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), )); @override 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); final TRes _res; @override call({ Mutation$MarkTorrentDownload$downloadTorrent$task? task, String? $__typename, }) => _res; @override 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 = {}; @override 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); final TRes _res; @override call({ String? id, String? $__typename, }) => _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 = {}; @override 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), )); @override 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); final TRes _res; @override call({ List? torrents, String? $__typename, }) => _res; @override torrents(fn) => _res; } const documentNodeQueryListTorrents = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, name: NameNode(value: 'ListTorrents'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'torrents'), alias: null, arguments: [], 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: '__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({ super.operationName, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Query$ListTorrents? typedOptimisticResult, super.pollInterval, super.context, OnQueryComplete$Query$ListTorrents? onComplete, super.onError, }) : onCompleteWithParsed = onComplete, super( optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), onComplete: onComplete == null ? null : (data) => onComplete( data, data == null ? null : _parserFn$Query$ListTorrents(data), ), 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({ super.operationName, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Query$ListTorrents? typedOptimisticResult, super.context, super.pollInterval, super.eagerlyFetchResults, super.carryForwardDataOnException, super.fetchResults, }) : super( optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), document: documentNodeQueryListTorrents, parserFn: _parserFn$Query$ListTorrents, ); } class FetchMoreOptions$Query$ListTorrents extends graphql.FetchMoreOptions { FetchMoreOptions$Query$ListTorrents( {required super.updateQuery}) : super( document: documentNodeQueryListTorrents, ); } extension ClientExtension$Query$ListTorrents on graphql.GraphQLClient { Future> query$ListTorrents( [Options$Query$ListTorrents? options]) async => await query(options ?? Options$Query$ListTorrents()); graphql.ObservableQuery watchQuery$ListTorrents( [WatchOptions$Query$ListTorrents? options]) => watchQuery(options ?? WatchOptions$Query$ListTorrents()); void writeQuery$ListTorrents({ required Query$ListTorrents data, bool broadcast = true, }) => writeQuery( const graphql.Request( operation: graphql.Operation(document: documentNodeQueryListTorrents)), data: data.toJson(), broadcast: broadcast, ); Query$ListTorrents? readQuery$ListTorrents({bool optimistic = true}) { final result = readQuery( const graphql.Request( operation: graphql.Operation(document: documentNodeQueryListTorrents)), 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({ super.key, Options$Query$ListTorrents? options, required super.builder, }) : super( options: options ?? Options$Query$ListTorrents(), ); } class Query$ListTorrents$torrents { Query$ListTorrents$torrents({ required this.name, required this.infohash, required this.bytesCompleted, required this.bytesMissing, 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$$__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), $__typename: (l$$__typename as String), ); } final String name; final String infohash; final int bytesCompleted; final int bytesMissing; 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$$__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$$__typename = $__typename; return Object.hashAll([ l$name, l$infohash, l$bytesCompleted, l$bytesMissing, 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$$__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, String? $__typename, }); } 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 = {}; @override TRes call({ Object? name = _undefined, Object? infohash = _undefined, Object? bytesCompleted = _undefined, Object? bytesMissing = _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), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Query$ListTorrents$torrents implements CopyWith$Query$ListTorrents$torrents { _CopyWithStubImpl$Query$ListTorrents$torrents(this._res); final TRes _res; @override call({ String? name, String? infohash, int? bytesCompleted, int? bytesMissing, String? $__typename, }) => _res; }