import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:graphql_flutter/graphql_flutter.dart' as graphql_flutter; class Fragment$File { Fragment$File({ required this.name, required this.size, required this.$__typename, }); factory Fragment$File.fromJson(Map json) { switch (json["__typename"] as String) { case "SimpleFile": return Fragment$File$$SimpleFile.fromJson(json); case "TorrentFileEntry": return Fragment$File$$TorrentFileEntry.fromJson(json); default: final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$File( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } } final String name; final int size; final String $__typename; Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$File || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$File on Fragment$File { CopyWith$Fragment$File get copyWith => CopyWith$Fragment$File( this, (i) => i, ); _T when<_T>({ required _T Function(Fragment$File$$SimpleFile) simpleFile, required _T Function(Fragment$File$$TorrentFileEntry) torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "SimpleFile": return simpleFile(this as Fragment$File$$SimpleFile); case "TorrentFileEntry": return torrentFileEntry(this as Fragment$File$$TorrentFileEntry); default: return orElse(); } } _T maybeWhen<_T>({ _T Function(Fragment$File$$SimpleFile)? simpleFile, _T Function(Fragment$File$$TorrentFileEntry)? torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "SimpleFile": if (simpleFile != null) { return simpleFile(this as Fragment$File$$SimpleFile); } else { return orElse(); } case "TorrentFileEntry": if (torrentFileEntry != null) { return torrentFileEntry(this as Fragment$File$$TorrentFileEntry); } else { return orElse(); } default: return orElse(); } } } abstract class CopyWith$Fragment$File { factory CopyWith$Fragment$File( Fragment$File instance, TRes Function(Fragment$File) then, ) = _CopyWithImpl$Fragment$File; factory CopyWith$Fragment$File.stub(TRes res) = _CopyWithStubImpl$Fragment$File; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$File implements CopyWith$Fragment$File { _CopyWithImpl$Fragment$File( this._instance, this._then, ); final Fragment$File _instance; final TRes Function(Fragment$File) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$File( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$File implements CopyWith$Fragment$File { _CopyWithStubImpl$Fragment$File(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } const fragmentDefinitionFile = FragmentDefinitionNode( name: NameNode(value: 'File'), typeCondition: TypeConditionNode( on: NamedTypeNode( name: NameNode(value: 'File'), isNonNull: false, )), directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], selectionSet: null, ), FieldNode( name: NameNode(value: 'size'), alias: null, arguments: [], directives: [], selectionSet: null, ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ); const documentNodeFragmentFile = DocumentNode(definitions: [ fragmentDefinitionFile, ]); extension ClientExtension$Fragment$File on graphql.GraphQLClient { void writeFragment$File({ required Fragment$File data, required Map idFields, bool broadcast = true, }) => writeFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'File', document: documentNodeFragmentFile, ), ), data: data.toJson(), broadcast: broadcast, ); Fragment$File? readFragment$File({ required Map idFields, bool optimistic = true, }) { final result = readFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'File', document: documentNodeFragmentFile, ), ), optimistic: optimistic, ); return result == null ? null : Fragment$File.fromJson(result); } } class Fragment$File$$SimpleFile implements Fragment$File { Fragment$File$$SimpleFile({ required this.name, required this.size, this.$__typename = 'SimpleFile', }); factory Fragment$File$$SimpleFile.fromJson(Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$File$$SimpleFile( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final int size; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$File$$SimpleFile || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$File$$SimpleFile on Fragment$File$$SimpleFile { CopyWith$Fragment$File$$SimpleFile get copyWith => CopyWith$Fragment$File$$SimpleFile( this, (i) => i, ); } abstract class CopyWith$Fragment$File$$SimpleFile { factory CopyWith$Fragment$File$$SimpleFile( Fragment$File$$SimpleFile instance, TRes Function(Fragment$File$$SimpleFile) then, ) = _CopyWithImpl$Fragment$File$$SimpleFile; factory CopyWith$Fragment$File$$SimpleFile.stub(TRes res) = _CopyWithStubImpl$Fragment$File$$SimpleFile; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$File$$SimpleFile implements CopyWith$Fragment$File$$SimpleFile { _CopyWithImpl$Fragment$File$$SimpleFile( this._instance, this._then, ); final Fragment$File$$SimpleFile _instance; final TRes Function(Fragment$File$$SimpleFile) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$File$$SimpleFile( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$File$$SimpleFile implements CopyWith$Fragment$File$$SimpleFile { _CopyWithStubImpl$Fragment$File$$SimpleFile(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } class Fragment$File$$TorrentFileEntry implements Fragment$File { Fragment$File$$TorrentFileEntry({ required this.name, required this.size, this.$__typename = 'TorrentFileEntry', }); factory Fragment$File$$TorrentFileEntry.fromJson(Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$File$$TorrentFileEntry( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final int size; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$File$$TorrentFileEntry || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$File$$TorrentFileEntry on Fragment$File$$TorrentFileEntry { CopyWith$Fragment$File$$TorrentFileEntry get copyWith => CopyWith$Fragment$File$$TorrentFileEntry( this, (i) => i, ); } abstract class CopyWith$Fragment$File$$TorrentFileEntry { factory CopyWith$Fragment$File$$TorrentFileEntry( Fragment$File$$TorrentFileEntry instance, TRes Function(Fragment$File$$TorrentFileEntry) then, ) = _CopyWithImpl$Fragment$File$$TorrentFileEntry; factory CopyWith$Fragment$File$$TorrentFileEntry.stub(TRes res) = _CopyWithStubImpl$Fragment$File$$TorrentFileEntry; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$File$$TorrentFileEntry implements CopyWith$Fragment$File$$TorrentFileEntry { _CopyWithImpl$Fragment$File$$TorrentFileEntry( this._instance, this._then, ); final Fragment$File$$TorrentFileEntry _instance; final TRes Function(Fragment$File$$TorrentFileEntry) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$File$$TorrentFileEntry( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$File$$TorrentFileEntry implements CopyWith$Fragment$File$$TorrentFileEntry { _CopyWithStubImpl$Fragment$File$$TorrentFileEntry(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } class Fragment$TorrentDir { Fragment$TorrentDir({ required this.name, required this.torrent, this.$__typename = 'TorrentFS', }); factory Fragment$TorrentDir.fromJson(Map json) { final l$name = json['name']; final l$torrent = json['torrent']; final l$$__typename = json['__typename']; return Fragment$TorrentDir( name: (l$name as String), torrent: Fragment$TorrentDir$torrent.fromJson( (l$torrent as Map)), $__typename: (l$$__typename as String), ); } final String name; final Fragment$TorrentDir$torrent torrent; final String $__typename; Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$torrent = torrent; resultData['torrent'] = l$torrent.toJson(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$torrent = torrent; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$torrent, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$TorrentDir || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$torrent = torrent; final lOther$torrent = other.torrent; if (l$torrent != lOther$torrent) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$TorrentDir on Fragment$TorrentDir { CopyWith$Fragment$TorrentDir get copyWith => CopyWith$Fragment$TorrentDir( this, (i) => i, ); } abstract class CopyWith$Fragment$TorrentDir { factory CopyWith$Fragment$TorrentDir( Fragment$TorrentDir instance, TRes Function(Fragment$TorrentDir) then, ) = _CopyWithImpl$Fragment$TorrentDir; factory CopyWith$Fragment$TorrentDir.stub(TRes res) = _CopyWithStubImpl$Fragment$TorrentDir; TRes call({ String? name, Fragment$TorrentDir$torrent? torrent, String? $__typename, }); CopyWith$Fragment$TorrentDir$torrent get torrent; } class _CopyWithImpl$Fragment$TorrentDir implements CopyWith$Fragment$TorrentDir { _CopyWithImpl$Fragment$TorrentDir( this._instance, this._then, ); final Fragment$TorrentDir _instance; final TRes Function(Fragment$TorrentDir) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? torrent = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$TorrentDir( name: name == _undefined || name == null ? _instance.name : (name as String), torrent: torrent == _undefined || torrent == null ? _instance.torrent : (torrent as Fragment$TorrentDir$torrent), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); @override CopyWith$Fragment$TorrentDir$torrent get torrent { final local$torrent = _instance.torrent; return CopyWith$Fragment$TorrentDir$torrent( local$torrent, (e) => call(torrent: e)); } } class _CopyWithStubImpl$Fragment$TorrentDir implements CopyWith$Fragment$TorrentDir { _CopyWithStubImpl$Fragment$TorrentDir(this._res); final TRes _res; @override call({ String? name, Fragment$TorrentDir$torrent? torrent, String? $__typename, }) => _res; @override CopyWith$Fragment$TorrentDir$torrent get torrent => CopyWith$Fragment$TorrentDir$torrent.stub(_res); } const fragmentDefinitionTorrentDir = FragmentDefinitionNode( name: NameNode(value: 'TorrentDir'), typeCondition: TypeConditionNode( on: NamedTypeNode( name: NameNode(value: 'TorrentFS'), isNonNull: false, )), directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], selectionSet: null, ), FieldNode( name: NameNode(value: 'torrent'), 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: 'torrentFilePath'), 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, ), ]), ); const documentNodeFragmentTorrentDir = DocumentNode(definitions: [ fragmentDefinitionTorrentDir, ]); extension ClientExtension$Fragment$TorrentDir on graphql.GraphQLClient { void writeFragment$TorrentDir({ required Fragment$TorrentDir data, required Map idFields, bool broadcast = true, }) => writeFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'TorrentDir', document: documentNodeFragmentTorrentDir, ), ), data: data.toJson(), broadcast: broadcast, ); Fragment$TorrentDir? readFragment$TorrentDir({ required Map idFields, bool optimistic = true, }) { final result = readFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'TorrentDir', document: documentNodeFragmentTorrentDir, ), ), optimistic: optimistic, ); return result == null ? null : Fragment$TorrentDir.fromJson(result); } } class Fragment$TorrentDir$torrent { Fragment$TorrentDir$torrent({ required this.name, required this.infohash, required this.bytesCompleted, required this.torrentFilePath, required this.bytesMissing, this.$__typename = 'Torrent', }); factory Fragment$TorrentDir$torrent.fromJson(Map json) { final l$name = json['name']; final l$infohash = json['infohash']; final l$bytesCompleted = json['bytesCompleted']; final l$torrentFilePath = json['torrentFilePath']; final l$bytesMissing = json['bytesMissing']; final l$$__typename = json['__typename']; return Fragment$TorrentDir$torrent( name: (l$name as String), infohash: (l$infohash as String), bytesCompleted: (l$bytesCompleted as int), torrentFilePath: (l$torrentFilePath as String), bytesMissing: (l$bytesMissing as int), $__typename: (l$$__typename as String), ); } final String name; final String infohash; final int bytesCompleted; final String torrentFilePath; 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$torrentFilePath = torrentFilePath; resultData['torrentFilePath'] = l$torrentFilePath; 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$torrentFilePath = torrentFilePath; final l$bytesMissing = bytesMissing; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$infohash, l$bytesCompleted, l$torrentFilePath, l$bytesMissing, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$TorrentDir$torrent || 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$torrentFilePath = torrentFilePath; final lOther$torrentFilePath = other.torrentFilePath; if (l$torrentFilePath != lOther$torrentFilePath) { 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$Fragment$TorrentDir$torrent on Fragment$TorrentDir$torrent { CopyWith$Fragment$TorrentDir$torrent get copyWith => CopyWith$Fragment$TorrentDir$torrent( this, (i) => i, ); } abstract class CopyWith$Fragment$TorrentDir$torrent { factory CopyWith$Fragment$TorrentDir$torrent( Fragment$TorrentDir$torrent instance, TRes Function(Fragment$TorrentDir$torrent) then, ) = _CopyWithImpl$Fragment$TorrentDir$torrent; factory CopyWith$Fragment$TorrentDir$torrent.stub(TRes res) = _CopyWithStubImpl$Fragment$TorrentDir$torrent; TRes call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }); } class _CopyWithImpl$Fragment$TorrentDir$torrent implements CopyWith$Fragment$TorrentDir$torrent { _CopyWithImpl$Fragment$TorrentDir$torrent( this._instance, this._then, ); final Fragment$TorrentDir$torrent _instance; final TRes Function(Fragment$TorrentDir$torrent) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? infohash = _undefined, Object? bytesCompleted = _undefined, Object? torrentFilePath = _undefined, Object? bytesMissing = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$TorrentDir$torrent( 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), torrentFilePath: torrentFilePath == _undefined || torrentFilePath == null ? _instance.torrentFilePath : (torrentFilePath as String), bytesMissing: bytesMissing == _undefined || bytesMissing == null ? _instance.bytesMissing : (bytesMissing as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$TorrentDir$torrent implements CopyWith$Fragment$TorrentDir$torrent { _CopyWithStubImpl$Fragment$TorrentDir$torrent(this._res); final TRes _res; @override call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }) => _res; } class Fragment$ArchiveDir { Fragment$ArchiveDir({ required this.name, required this.size, this.$__typename = 'ArchiveFS', }); factory Fragment$ArchiveDir.fromJson(Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$ArchiveDir( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } final String name; final int size; final String $__typename; Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$ArchiveDir || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$ArchiveDir on Fragment$ArchiveDir { CopyWith$Fragment$ArchiveDir get copyWith => CopyWith$Fragment$ArchiveDir( this, (i) => i, ); } abstract class CopyWith$Fragment$ArchiveDir { factory CopyWith$Fragment$ArchiveDir( Fragment$ArchiveDir instance, TRes Function(Fragment$ArchiveDir) then, ) = _CopyWithImpl$Fragment$ArchiveDir; factory CopyWith$Fragment$ArchiveDir.stub(TRes res) = _CopyWithStubImpl$Fragment$ArchiveDir; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$ArchiveDir implements CopyWith$Fragment$ArchiveDir { _CopyWithImpl$Fragment$ArchiveDir( this._instance, this._then, ); final Fragment$ArchiveDir _instance; final TRes Function(Fragment$ArchiveDir) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$ArchiveDir( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$ArchiveDir implements CopyWith$Fragment$ArchiveDir { _CopyWithStubImpl$Fragment$ArchiveDir(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } const fragmentDefinitionArchiveDir = FragmentDefinitionNode( name: NameNode(value: 'ArchiveDir'), typeCondition: TypeConditionNode( on: NamedTypeNode( name: NameNode(value: 'ArchiveFS'), isNonNull: false, )), directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], selectionSet: null, ), FieldNode( name: NameNode(value: 'size'), alias: null, arguments: [], directives: [], selectionSet: null, ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ); const documentNodeFragmentArchiveDir = DocumentNode(definitions: [ fragmentDefinitionArchiveDir, ]); extension ClientExtension$Fragment$ArchiveDir on graphql.GraphQLClient { void writeFragment$ArchiveDir({ required Fragment$ArchiveDir data, required Map idFields, bool broadcast = true, }) => writeFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'ArchiveDir', document: documentNodeFragmentArchiveDir, ), ), data: data.toJson(), broadcast: broadcast, ); Fragment$ArchiveDir? readFragment$ArchiveDir({ required Map idFields, bool optimistic = true, }) { final result = readFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'ArchiveDir', document: documentNodeFragmentArchiveDir, ), ), optimistic: optimistic, ); return result == null ? null : Fragment$ArchiveDir.fromJson(result); } } class Fragment$DirEntry { Fragment$DirEntry({ required this.name, required this.$__typename, }); factory Fragment$DirEntry.fromJson(Map json) { switch (json["__typename"] as String) { case "ArchiveFS": return Fragment$DirEntry$$ArchiveFS.fromJson(json); case "ResolverFS": return Fragment$DirEntry$$ResolverFS.fromJson(json); case "SimpleDir": return Fragment$DirEntry$$SimpleDir.fromJson(json); case "SimpleFile": return Fragment$DirEntry$$SimpleFile.fromJson(json); case "TorrentFS": return Fragment$DirEntry$$TorrentFS.fromJson(json); case "TorrentFileEntry": return Fragment$DirEntry$$TorrentFileEntry.fromJson(json); default: final l$name = json['name']; final l$$__typename = json['__typename']; return Fragment$DirEntry( name: (l$name as String), $__typename: (l$$__typename as String), ); } } final String name; final String $__typename; Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry on Fragment$DirEntry { CopyWith$Fragment$DirEntry get copyWith => CopyWith$Fragment$DirEntry( this, (i) => i, ); _T when<_T>({ required _T Function(Fragment$DirEntry$$ArchiveFS) archiveFS, required _T Function(Fragment$DirEntry$$ResolverFS) resolverFS, required _T Function(Fragment$DirEntry$$SimpleDir) simpleDir, required _T Function(Fragment$DirEntry$$SimpleFile) simpleFile, required _T Function(Fragment$DirEntry$$TorrentFS) torrentFS, required _T Function(Fragment$DirEntry$$TorrentFileEntry) torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "ArchiveFS": return archiveFS(this as Fragment$DirEntry$$ArchiveFS); case "ResolverFS": return resolverFS(this as Fragment$DirEntry$$ResolverFS); case "SimpleDir": return simpleDir(this as Fragment$DirEntry$$SimpleDir); case "SimpleFile": return simpleFile(this as Fragment$DirEntry$$SimpleFile); case "TorrentFS": return torrentFS(this as Fragment$DirEntry$$TorrentFS); case "TorrentFileEntry": return torrentFileEntry(this as Fragment$DirEntry$$TorrentFileEntry); default: return orElse(); } } _T maybeWhen<_T>({ _T Function(Fragment$DirEntry$$ArchiveFS)? archiveFS, _T Function(Fragment$DirEntry$$ResolverFS)? resolverFS, _T Function(Fragment$DirEntry$$SimpleDir)? simpleDir, _T Function(Fragment$DirEntry$$SimpleFile)? simpleFile, _T Function(Fragment$DirEntry$$TorrentFS)? torrentFS, _T Function(Fragment$DirEntry$$TorrentFileEntry)? torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "ArchiveFS": if (archiveFS != null) { return archiveFS(this as Fragment$DirEntry$$ArchiveFS); } else { return orElse(); } case "ResolverFS": if (resolverFS != null) { return resolverFS(this as Fragment$DirEntry$$ResolverFS); } else { return orElse(); } case "SimpleDir": if (simpleDir != null) { return simpleDir(this as Fragment$DirEntry$$SimpleDir); } else { return orElse(); } case "SimpleFile": if (simpleFile != null) { return simpleFile(this as Fragment$DirEntry$$SimpleFile); } else { return orElse(); } case "TorrentFS": if (torrentFS != null) { return torrentFS(this as Fragment$DirEntry$$TorrentFS); } else { return orElse(); } case "TorrentFileEntry": if (torrentFileEntry != null) { return torrentFileEntry(this as Fragment$DirEntry$$TorrentFileEntry); } else { return orElse(); } default: return orElse(); } } } abstract class CopyWith$Fragment$DirEntry { factory CopyWith$Fragment$DirEntry( Fragment$DirEntry instance, TRes Function(Fragment$DirEntry) then, ) = _CopyWithImpl$Fragment$DirEntry; factory CopyWith$Fragment$DirEntry.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry implements CopyWith$Fragment$DirEntry { _CopyWithImpl$Fragment$DirEntry( this._instance, this._then, ); final Fragment$DirEntry _instance; final TRes Function(Fragment$DirEntry) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry implements CopyWith$Fragment$DirEntry { _CopyWithStubImpl$Fragment$DirEntry(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; } const fragmentDefinitionDirEntry = FragmentDefinitionNode( name: NameNode(value: 'DirEntry'), typeCondition: TypeConditionNode( on: NamedTypeNode( name: NameNode(value: 'FsEntry'), isNonNull: false, )), directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], selectionSet: null, ), FragmentSpreadNode( name: NameNode(value: 'TorrentDir'), directives: [], ), FragmentSpreadNode( name: NameNode(value: 'ArchiveDir'), directives: [], ), FragmentSpreadNode( name: NameNode(value: 'File'), directives: [], ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ); const documentNodeFragmentDirEntry = DocumentNode(definitions: [ fragmentDefinitionDirEntry, fragmentDefinitionTorrentDir, fragmentDefinitionArchiveDir, fragmentDefinitionFile, ]); extension ClientExtension$Fragment$DirEntry on graphql.GraphQLClient { void writeFragment$DirEntry({ required Fragment$DirEntry data, required Map idFields, bool broadcast = true, }) => writeFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'DirEntry', document: documentNodeFragmentDirEntry, ), ), data: data.toJson(), broadcast: broadcast, ); Fragment$DirEntry? readFragment$DirEntry({ required Map idFields, bool optimistic = true, }) { final result = readFragment( graphql.FragmentRequest( idFields: idFields, fragment: const graphql.Fragment( fragmentName: 'DirEntry', document: documentNodeFragmentDirEntry, ), ), optimistic: optimistic, ); return result == null ? null : Fragment$DirEntry.fromJson(result); } } class Fragment$DirEntry$$ArchiveFS implements Fragment$ArchiveDir, Fragment$DirEntry { Fragment$DirEntry$$ArchiveFS({ required this.name, required this.size, this.$__typename = 'ArchiveFS', }); factory Fragment$DirEntry$$ArchiveFS.fromJson(Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$ArchiveFS( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final int size; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$ArchiveFS || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$ArchiveFS on Fragment$DirEntry$$ArchiveFS { CopyWith$Fragment$DirEntry$$ArchiveFS get copyWith => CopyWith$Fragment$DirEntry$$ArchiveFS( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$ArchiveFS { factory CopyWith$Fragment$DirEntry$$ArchiveFS( Fragment$DirEntry$$ArchiveFS instance, TRes Function(Fragment$DirEntry$$ArchiveFS) then, ) = _CopyWithImpl$Fragment$DirEntry$$ArchiveFS; factory CopyWith$Fragment$DirEntry$$ArchiveFS.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$ArchiveFS implements CopyWith$Fragment$DirEntry$$ArchiveFS { _CopyWithImpl$Fragment$DirEntry$$ArchiveFS( this._instance, this._then, ); final Fragment$DirEntry$$ArchiveFS _instance; final TRes Function(Fragment$DirEntry$$ArchiveFS) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$ArchiveFS( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS implements CopyWith$Fragment$DirEntry$$ArchiveFS { _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } class Fragment$DirEntry$$ResolverFS implements Fragment$DirEntry { Fragment$DirEntry$$ResolverFS({ required this.name, this.$__typename = 'ResolverFS', }); factory Fragment$DirEntry$$ResolverFS.fromJson(Map json) { final l$name = json['name']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$ResolverFS( name: (l$name as String), $__typename: (l$$__typename as String), ); } @override final String name; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$ResolverFS || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$ResolverFS on Fragment$DirEntry$$ResolverFS { CopyWith$Fragment$DirEntry$$ResolverFS get copyWith => CopyWith$Fragment$DirEntry$$ResolverFS( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$ResolverFS { factory CopyWith$Fragment$DirEntry$$ResolverFS( Fragment$DirEntry$$ResolverFS instance, TRes Function(Fragment$DirEntry$$ResolverFS) then, ) = _CopyWithImpl$Fragment$DirEntry$$ResolverFS; factory CopyWith$Fragment$DirEntry$$ResolverFS.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$ResolverFS implements CopyWith$Fragment$DirEntry$$ResolverFS { _CopyWithImpl$Fragment$DirEntry$$ResolverFS( this._instance, this._then, ); final Fragment$DirEntry$$ResolverFS _instance; final TRes Function(Fragment$DirEntry$$ResolverFS) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$ResolverFS( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS implements CopyWith$Fragment$DirEntry$$ResolverFS { _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; } class Fragment$DirEntry$$SimpleDir implements Fragment$DirEntry { Fragment$DirEntry$$SimpleDir({ required this.name, this.$__typename = 'SimpleDir', }); factory Fragment$DirEntry$$SimpleDir.fromJson(Map json) { final l$name = json['name']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$SimpleDir( name: (l$name as String), $__typename: (l$$__typename as String), ); } @override final String name; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$SimpleDir || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$SimpleDir on Fragment$DirEntry$$SimpleDir { CopyWith$Fragment$DirEntry$$SimpleDir get copyWith => CopyWith$Fragment$DirEntry$$SimpleDir( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$SimpleDir { factory CopyWith$Fragment$DirEntry$$SimpleDir( Fragment$DirEntry$$SimpleDir instance, TRes Function(Fragment$DirEntry$$SimpleDir) then, ) = _CopyWithImpl$Fragment$DirEntry$$SimpleDir; factory CopyWith$Fragment$DirEntry$$SimpleDir.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$SimpleDir implements CopyWith$Fragment$DirEntry$$SimpleDir { _CopyWithImpl$Fragment$DirEntry$$SimpleDir( this._instance, this._then, ); final Fragment$DirEntry$$SimpleDir _instance; final TRes Function(Fragment$DirEntry$$SimpleDir) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$SimpleDir( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir implements CopyWith$Fragment$DirEntry$$SimpleDir { _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; } class Fragment$DirEntry$$SimpleFile implements Fragment$File$$SimpleFile, Fragment$DirEntry { Fragment$DirEntry$$SimpleFile({ required this.name, required this.size, this.$__typename = 'SimpleFile', }); factory Fragment$DirEntry$$SimpleFile.fromJson(Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$SimpleFile( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final int size; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$SimpleFile || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$SimpleFile on Fragment$DirEntry$$SimpleFile { CopyWith$Fragment$DirEntry$$SimpleFile get copyWith => CopyWith$Fragment$DirEntry$$SimpleFile( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$SimpleFile { factory CopyWith$Fragment$DirEntry$$SimpleFile( Fragment$DirEntry$$SimpleFile instance, TRes Function(Fragment$DirEntry$$SimpleFile) then, ) = _CopyWithImpl$Fragment$DirEntry$$SimpleFile; factory CopyWith$Fragment$DirEntry$$SimpleFile.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$SimpleFile implements CopyWith$Fragment$DirEntry$$SimpleFile { _CopyWithImpl$Fragment$DirEntry$$SimpleFile( this._instance, this._then, ); final Fragment$DirEntry$$SimpleFile _instance; final TRes Function(Fragment$DirEntry$$SimpleFile) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$SimpleFile( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile implements CopyWith$Fragment$DirEntry$$SimpleFile { _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } class Fragment$DirEntry$$TorrentFS implements Fragment$TorrentDir, Fragment$DirEntry { Fragment$DirEntry$$TorrentFS({ required this.name, required this.torrent, this.$__typename = 'TorrentFS', }); factory Fragment$DirEntry$$TorrentFS.fromJson(Map json) { final l$name = json['name']; final l$torrent = json['torrent']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$TorrentFS( name: (l$name as String), torrent: Fragment$DirEntry$$TorrentFS$torrent.fromJson( (l$torrent as Map)), $__typename: (l$$__typename as String), ); } @override final String name; @override final Fragment$DirEntry$$TorrentFS$torrent torrent; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$torrent = torrent; resultData['torrent'] = l$torrent.toJson(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$torrent = torrent; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$torrent, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$TorrentFS || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$torrent = torrent; final lOther$torrent = other.torrent; if (l$torrent != lOther$torrent) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$TorrentFS on Fragment$DirEntry$$TorrentFS { CopyWith$Fragment$DirEntry$$TorrentFS get copyWith => CopyWith$Fragment$DirEntry$$TorrentFS( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$TorrentFS { factory CopyWith$Fragment$DirEntry$$TorrentFS( Fragment$DirEntry$$TorrentFS instance, TRes Function(Fragment$DirEntry$$TorrentFS) then, ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFS; factory CopyWith$Fragment$DirEntry$$TorrentFS.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS; TRes call({ String? name, Fragment$DirEntry$$TorrentFS$torrent? torrent, String? $__typename, }); CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent; } class _CopyWithImpl$Fragment$DirEntry$$TorrentFS implements CopyWith$Fragment$DirEntry$$TorrentFS { _CopyWithImpl$Fragment$DirEntry$$TorrentFS( this._instance, this._then, ); final Fragment$DirEntry$$TorrentFS _instance; final TRes Function(Fragment$DirEntry$$TorrentFS) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? torrent = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$TorrentFS( name: name == _undefined || name == null ? _instance.name : (name as String), torrent: torrent == _undefined || torrent == null ? _instance.torrent : (torrent as Fragment$DirEntry$$TorrentFS$torrent), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); @override CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent { final local$torrent = _instance.torrent; return CopyWith$Fragment$DirEntry$$TorrentFS$torrent( local$torrent, (e) => call(torrent: e)); } } class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS implements CopyWith$Fragment$DirEntry$$TorrentFS { _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS(this._res); final TRes _res; @override call({ String? name, Fragment$DirEntry$$TorrentFS$torrent? torrent, String? $__typename, }) => _res; @override CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent => CopyWith$Fragment$DirEntry$$TorrentFS$torrent.stub(_res); } class Fragment$DirEntry$$TorrentFS$torrent implements Fragment$TorrentDir$torrent { Fragment$DirEntry$$TorrentFS$torrent({ required this.name, required this.infohash, required this.bytesCompleted, required this.torrentFilePath, required this.bytesMissing, this.$__typename = 'Torrent', }); factory Fragment$DirEntry$$TorrentFS$torrent.fromJson( Map json) { final l$name = json['name']; final l$infohash = json['infohash']; final l$bytesCompleted = json['bytesCompleted']; final l$torrentFilePath = json['torrentFilePath']; final l$bytesMissing = json['bytesMissing']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$TorrentFS$torrent( name: (l$name as String), infohash: (l$infohash as String), bytesCompleted: (l$bytesCompleted as int), torrentFilePath: (l$torrentFilePath as String), bytesMissing: (l$bytesMissing as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final String infohash; @override final int bytesCompleted; @override final String torrentFilePath; @override final int bytesMissing; @override final String $__typename; @override 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$torrentFilePath = torrentFilePath; resultData['torrentFilePath'] = l$torrentFilePath; 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$torrentFilePath = torrentFilePath; final l$bytesMissing = bytesMissing; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$infohash, l$bytesCompleted, l$torrentFilePath, l$bytesMissing, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$TorrentFS$torrent || 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$torrentFilePath = torrentFilePath; final lOther$torrentFilePath = other.torrentFilePath; if (l$torrentFilePath != lOther$torrentFilePath) { 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$Fragment$DirEntry$$TorrentFS$torrent on Fragment$DirEntry$$TorrentFS$torrent { CopyWith$Fragment$DirEntry$$TorrentFS$torrent< Fragment$DirEntry$$TorrentFS$torrent> get copyWith => CopyWith$Fragment$DirEntry$$TorrentFS$torrent( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$TorrentFS$torrent { factory CopyWith$Fragment$DirEntry$$TorrentFS$torrent( Fragment$DirEntry$$TorrentFS$torrent instance, TRes Function(Fragment$DirEntry$$TorrentFS$torrent) then, ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent; factory CopyWith$Fragment$DirEntry$$TorrentFS$torrent.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent; TRes call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent implements CopyWith$Fragment$DirEntry$$TorrentFS$torrent { _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent( this._instance, this._then, ); final Fragment$DirEntry$$TorrentFS$torrent _instance; final TRes Function(Fragment$DirEntry$$TorrentFS$torrent) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? infohash = _undefined, Object? bytesCompleted = _undefined, Object? torrentFilePath = _undefined, Object? bytesMissing = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$TorrentFS$torrent( 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), torrentFilePath: torrentFilePath == _undefined || torrentFilePath == null ? _instance.torrentFilePath : (torrentFilePath as String), bytesMissing: bytesMissing == _undefined || bytesMissing == null ? _instance.bytesMissing : (bytesMissing as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent implements CopyWith$Fragment$DirEntry$$TorrentFS$torrent { _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent(this._res); final TRes _res; @override call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }) => _res; } class Fragment$DirEntry$$TorrentFileEntry implements Fragment$File$$TorrentFileEntry, Fragment$DirEntry { Fragment$DirEntry$$TorrentFileEntry({ required this.name, required this.size, this.$__typename = 'TorrentFileEntry', }); factory Fragment$DirEntry$$TorrentFileEntry.fromJson( Map json) { final l$name = json['name']; final l$size = json['size']; final l$$__typename = json['__typename']; return Fragment$DirEntry$$TorrentFileEntry( name: (l$name as String), size: (l$size as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final int size; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$size = size; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$size, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Fragment$DirEntry$$TorrentFileEntry || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Fragment$DirEntry$$TorrentFileEntry on Fragment$DirEntry$$TorrentFileEntry { CopyWith$Fragment$DirEntry$$TorrentFileEntry< Fragment$DirEntry$$TorrentFileEntry> get copyWith => CopyWith$Fragment$DirEntry$$TorrentFileEntry( this, (i) => i, ); } abstract class CopyWith$Fragment$DirEntry$$TorrentFileEntry { factory CopyWith$Fragment$DirEntry$$TorrentFileEntry( Fragment$DirEntry$$TorrentFileEntry instance, TRes Function(Fragment$DirEntry$$TorrentFileEntry) then, ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry; factory CopyWith$Fragment$DirEntry$$TorrentFileEntry.stub(TRes res) = _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry; TRes call({ String? name, int? size, String? $__typename, }); } class _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry implements CopyWith$Fragment$DirEntry$$TorrentFileEntry { _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry( this._instance, this._then, ); final Fragment$DirEntry$$TorrentFileEntry _instance; final TRes Function(Fragment$DirEntry$$TorrentFileEntry) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? size = _undefined, Object? $__typename = _undefined, }) => _then(Fragment$DirEntry$$TorrentFileEntry( name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry implements CopyWith$Fragment$DirEntry$$TorrentFileEntry { _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry(this._res); final TRes _res; @override call({ String? name, int? size, String? $__typename, }) => _res; } class Variables$Query$ListDir { factory Variables$Query$ListDir({required String path}) => Variables$Query$ListDir._({ r'path': path, }); Variables$Query$ListDir._(this._$data); factory Variables$Query$ListDir.fromJson(Map data) { final result$data = {}; final l$path = data['path']; result$data['path'] = (l$path as String); return Variables$Query$ListDir._(result$data); } Map _$data; String get path => (_$data['path'] as String); Map toJson() { final result$data = {}; final l$path = path; result$data['path'] = l$path; return result$data; } CopyWith$Variables$Query$ListDir get copyWith => CopyWith$Variables$Query$ListDir( this, (i) => i, ); @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Variables$Query$ListDir || runtimeType != other.runtimeType) { return false; } final l$path = path; final lOther$path = other.path; if (l$path != lOther$path) { return false; } return true; } @override int get hashCode { final l$path = path; return Object.hashAll([l$path]); } } abstract class CopyWith$Variables$Query$ListDir { factory CopyWith$Variables$Query$ListDir( Variables$Query$ListDir instance, TRes Function(Variables$Query$ListDir) then, ) = _CopyWithImpl$Variables$Query$ListDir; factory CopyWith$Variables$Query$ListDir.stub(TRes res) = _CopyWithStubImpl$Variables$Query$ListDir; TRes call({String? path}); } class _CopyWithImpl$Variables$Query$ListDir implements CopyWith$Variables$Query$ListDir { _CopyWithImpl$Variables$Query$ListDir( this._instance, this._then, ); final Variables$Query$ListDir _instance; final TRes Function(Variables$Query$ListDir) _then; static const _undefined = {}; @override TRes call({Object? path = _undefined}) => _then(Variables$Query$ListDir._({ ..._instance._$data, if (path != _undefined && path != null) 'path': (path as String), })); } class _CopyWithStubImpl$Variables$Query$ListDir implements CopyWith$Variables$Query$ListDir { _CopyWithStubImpl$Variables$Query$ListDir(this._res); final TRes _res; @override call({String? path}) => _res; } class Query$ListDir { Query$ListDir({ this.fsEntry, this.$__typename = 'Query', }); factory Query$ListDir.fromJson(Map json) { final l$fsEntry = json['fsEntry']; final l$$__typename = json['__typename']; return Query$ListDir( fsEntry: l$fsEntry == null ? null : Query$ListDir$fsEntry.fromJson((l$fsEntry as Map)), $__typename: (l$$__typename as String), ); } final Query$ListDir$fsEntry? fsEntry; final String $__typename; Map toJson() { final resultData = {}; final l$fsEntry = fsEntry; resultData['fsEntry'] = l$fsEntry?.toJson(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$fsEntry = fsEntry; final l$$__typename = $__typename; return Object.hashAll([ l$fsEntry, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir || runtimeType != other.runtimeType) { return false; } final l$fsEntry = fsEntry; final lOther$fsEntry = other.fsEntry; if (l$fsEntry != lOther$fsEntry) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Query$ListDir on Query$ListDir { CopyWith$Query$ListDir get copyWith => CopyWith$Query$ListDir( this, (i) => i, ); } abstract class CopyWith$Query$ListDir { factory CopyWith$Query$ListDir( Query$ListDir instance, TRes Function(Query$ListDir) then, ) = _CopyWithImpl$Query$ListDir; factory CopyWith$Query$ListDir.stub(TRes res) = _CopyWithStubImpl$Query$ListDir; TRes call({ Query$ListDir$fsEntry? fsEntry, String? $__typename, }); CopyWith$Query$ListDir$fsEntry get fsEntry; } class _CopyWithImpl$Query$ListDir implements CopyWith$Query$ListDir { _CopyWithImpl$Query$ListDir( this._instance, this._then, ); final Query$ListDir _instance; final TRes Function(Query$ListDir) _then; static const _undefined = {}; @override TRes call({ Object? fsEntry = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListDir( fsEntry: fsEntry == _undefined ? _instance.fsEntry : (fsEntry as Query$ListDir$fsEntry?), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); @override CopyWith$Query$ListDir$fsEntry get fsEntry { final local$fsEntry = _instance.fsEntry; return local$fsEntry == null ? CopyWith$Query$ListDir$fsEntry.stub(_then(_instance)) : CopyWith$Query$ListDir$fsEntry( local$fsEntry, (e) => call(fsEntry: e)); } } class _CopyWithStubImpl$Query$ListDir implements CopyWith$Query$ListDir { _CopyWithStubImpl$Query$ListDir(this._res); final TRes _res; @override call({ Query$ListDir$fsEntry? fsEntry, String? $__typename, }) => _res; @override CopyWith$Query$ListDir$fsEntry get fsEntry => CopyWith$Query$ListDir$fsEntry.stub(_res); } const documentNodeQueryListDir = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, name: NameNode(value: 'ListDir'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'path')), type: NamedTypeNode( name: NameNode(value: 'String'), isNonNull: true, ), defaultValue: DefaultValueNode(value: null), directives: [], ) ], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'fsEntry'), alias: null, arguments: [ ArgumentNode( name: NameNode(value: 'path'), value: VariableNode(name: NameNode(value: 'path')), ) ], directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'name'), alias: null, arguments: [], directives: [], selectionSet: null, ), InlineFragmentNode( typeCondition: TypeConditionNode( on: NamedTypeNode( name: NameNode(value: 'Dir'), isNonNull: false, )), directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( name: NameNode(value: 'entries'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ FragmentSpreadNode( name: NameNode(value: 'DirEntry'), directives: [], ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ), FragmentSpreadNode( name: NameNode(value: 'TorrentDir'), directives: [], ), FragmentSpreadNode( name: NameNode(value: 'ArchiveDir'), directives: [], ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ), FieldNode( name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null, ), ]), ), fragmentDefinitionDirEntry, fragmentDefinitionTorrentDir, fragmentDefinitionArchiveDir, fragmentDefinitionFile, ]); Query$ListDir _parserFn$Query$ListDir(Map data) => Query$ListDir.fromJson(data); typedef OnQueryComplete$Query$ListDir = FutureOr Function( Map?, Query$ListDir?, ); class Options$Query$ListDir extends graphql.QueryOptions { Options$Query$ListDir({ super.operationName, required Variables$Query$ListDir variables, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Query$ListDir? typedOptimisticResult, super.pollInterval, super.context, OnQueryComplete$Query$ListDir? onComplete, super.onError, }) : onCompleteWithParsed = onComplete, super( variables: variables.toJson(), optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), onComplete: onComplete == null ? null : (data) => onComplete( data, data == null ? null : _parserFn$Query$ListDir(data), ), document: documentNodeQueryListDir, parserFn: _parserFn$Query$ListDir, ); final OnQueryComplete$Query$ListDir? onCompleteWithParsed; @override List get properties => [ ...super.onComplete == null ? super.properties : super.properties.where((property) => property != onComplete), onCompleteWithParsed, ]; } class WatchOptions$Query$ListDir extends graphql.WatchQueryOptions { WatchOptions$Query$ListDir({ super.operationName, required Variables$Query$ListDir variables, super.fetchPolicy, super.errorPolicy, super.cacheRereadPolicy, Object? optimisticResult, Query$ListDir? typedOptimisticResult, super.context, super.pollInterval, super.eagerlyFetchResults, super.carryForwardDataOnException, super.fetchResults, }) : super( variables: variables.toJson(), optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), document: documentNodeQueryListDir, parserFn: _parserFn$Query$ListDir, ); } class FetchMoreOptions$Query$ListDir extends graphql.FetchMoreOptions { FetchMoreOptions$Query$ListDir({ required super.updateQuery, required Variables$Query$ListDir variables, }) : super( variables: variables.toJson(), document: documentNodeQueryListDir, ); } extension ClientExtension$Query$ListDir on graphql.GraphQLClient { Future> query$ListDir( Options$Query$ListDir options) async => await query(options); graphql.ObservableQuery watchQuery$ListDir( WatchOptions$Query$ListDir options) => watchQuery(options); void writeQuery$ListDir({ required Query$ListDir data, required Variables$Query$ListDir variables, bool broadcast = true, }) => writeQuery( graphql.Request( operation: const graphql.Operation(document: documentNodeQueryListDir), variables: variables.toJson(), ), data: data.toJson(), broadcast: broadcast, ); Query$ListDir? readQuery$ListDir({ required Variables$Query$ListDir variables, bool optimistic = true, }) { final result = readQuery( graphql.Request( operation: const graphql.Operation(document: documentNodeQueryListDir), variables: variables.toJson(), ), optimistic: optimistic, ); return result == null ? null : Query$ListDir.fromJson(result); } } graphql_flutter.QueryHookResult useQuery$ListDir( Options$Query$ListDir options) => graphql_flutter.useQuery(options); graphql.ObservableQuery useWatchQuery$ListDir( WatchOptions$Query$ListDir options) => graphql_flutter.useWatchQuery(options); class Query$ListDir$Widget extends graphql_flutter.Query { const Query$ListDir$Widget({ super.key, required Options$Query$ListDir super.options, required super.builder, }); } class Query$ListDir$fsEntry { Query$ListDir$fsEntry({ required this.name, required this.$__typename, }); factory Query$ListDir$fsEntry.fromJson(Map json) { switch (json["__typename"] as String) { case "ArchiveFS": return Query$ListDir$fsEntry$$ArchiveFS.fromJson(json); case "ResolverFS": return Query$ListDir$fsEntry$$ResolverFS.fromJson(json); case "SimpleDir": return Query$ListDir$fsEntry$$SimpleDir.fromJson(json); case "TorrentFS": return Query$ListDir$fsEntry$$TorrentFS.fromJson(json); case "SimpleFile": return Query$ListDir$fsEntry$$SimpleFile.fromJson(json); case "TorrentFileEntry": return Query$ListDir$fsEntry$$TorrentFileEntry.fromJson(json); default: final l$name = json['name']; final l$$__typename = json['__typename']; return Query$ListDir$fsEntry( name: (l$name as String), $__typename: (l$$__typename as String), ); } } final String name; final String $__typename; Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry on Query$ListDir$fsEntry { CopyWith$Query$ListDir$fsEntry get copyWith => CopyWith$Query$ListDir$fsEntry( this, (i) => i, ); _T when<_T>({ required _T Function(Query$ListDir$fsEntry$$ArchiveFS) archiveFS, required _T Function(Query$ListDir$fsEntry$$ResolverFS) resolverFS, required _T Function(Query$ListDir$fsEntry$$SimpleDir) simpleDir, required _T Function(Query$ListDir$fsEntry$$TorrentFS) torrentFS, required _T Function(Query$ListDir$fsEntry$$SimpleFile) simpleFile, required _T Function(Query$ListDir$fsEntry$$TorrentFileEntry) torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "ArchiveFS": return archiveFS(this as Query$ListDir$fsEntry$$ArchiveFS); case "ResolverFS": return resolverFS(this as Query$ListDir$fsEntry$$ResolverFS); case "SimpleDir": return simpleDir(this as Query$ListDir$fsEntry$$SimpleDir); case "TorrentFS": return torrentFS(this as Query$ListDir$fsEntry$$TorrentFS); case "SimpleFile": return simpleFile(this as Query$ListDir$fsEntry$$SimpleFile); case "TorrentFileEntry": return torrentFileEntry( this as Query$ListDir$fsEntry$$TorrentFileEntry); default: return orElse(); } } _T maybeWhen<_T>({ _T Function(Query$ListDir$fsEntry$$ArchiveFS)? archiveFS, _T Function(Query$ListDir$fsEntry$$ResolverFS)? resolverFS, _T Function(Query$ListDir$fsEntry$$SimpleDir)? simpleDir, _T Function(Query$ListDir$fsEntry$$TorrentFS)? torrentFS, _T Function(Query$ListDir$fsEntry$$SimpleFile)? simpleFile, _T Function(Query$ListDir$fsEntry$$TorrentFileEntry)? torrentFileEntry, required _T Function() orElse, }) { switch ($__typename) { case "ArchiveFS": if (archiveFS != null) { return archiveFS(this as Query$ListDir$fsEntry$$ArchiveFS); } else { return orElse(); } case "ResolverFS": if (resolverFS != null) { return resolverFS(this as Query$ListDir$fsEntry$$ResolverFS); } else { return orElse(); } case "SimpleDir": if (simpleDir != null) { return simpleDir(this as Query$ListDir$fsEntry$$SimpleDir); } else { return orElse(); } case "TorrentFS": if (torrentFS != null) { return torrentFS(this as Query$ListDir$fsEntry$$TorrentFS); } else { return orElse(); } case "SimpleFile": if (simpleFile != null) { return simpleFile(this as Query$ListDir$fsEntry$$SimpleFile); } else { return orElse(); } case "TorrentFileEntry": if (torrentFileEntry != null) { return torrentFileEntry( this as Query$ListDir$fsEntry$$TorrentFileEntry); } else { return orElse(); } default: return orElse(); } } } abstract class CopyWith$Query$ListDir$fsEntry { factory CopyWith$Query$ListDir$fsEntry( Query$ListDir$fsEntry instance, TRes Function(Query$ListDir$fsEntry) then, ) = _CopyWithImpl$Query$ListDir$fsEntry; factory CopyWith$Query$ListDir$fsEntry.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Query$ListDir$fsEntry implements CopyWith$Query$ListDir$fsEntry { _CopyWithImpl$Query$ListDir$fsEntry( this._instance, this._then, ); final Query$ListDir$fsEntry _instance; final TRes Function(Query$ListDir$fsEntry) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListDir$fsEntry( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Query$ListDir$fsEntry implements CopyWith$Query$ListDir$fsEntry { _CopyWithStubImpl$Query$ListDir$fsEntry(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; } class Query$ListDir$fsEntry$$ArchiveFS implements Fragment$ArchiveDir, Query$ListDir$fsEntry { Query$ListDir$fsEntry$$ArchiveFS({ required this.entries, this.$__typename = 'ArchiveFS', required this.name, required this.size, }); factory Query$ListDir$fsEntry$$ArchiveFS.fromJson(Map json) { final l$entries = json['entries']; final l$$__typename = json['__typename']; final l$name = json['name']; final l$size = json['size']; return Query$ListDir$fsEntry$$ArchiveFS( entries: (l$entries as List) .map((e) => Fragment$DirEntry.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), name: (l$name as String), size: (l$size as int), ); } final List entries; @override final String $__typename; @override final String name; @override final int size; @override Map toJson() { final resultData = {}; final l$entries = entries; resultData['entries'] = l$entries.map((e) => e.toJson()).toList(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; final l$name = name; resultData['name'] = l$name; final l$size = size; resultData['size'] = l$size; return resultData; } @override int get hashCode { final l$entries = entries; final l$$__typename = $__typename; final l$name = name; final l$size = size; return Object.hashAll([ Object.hashAll(l$entries.map((v) => v)), l$$__typename, l$name, l$size, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$ArchiveFS || runtimeType != other.runtimeType) { return false; } final l$entries = entries; final lOther$entries = other.entries; if (l$entries.length != lOther$entries.length) { return false; } for (int i = 0; i < l$entries.length; i++) { final l$entries$entry = l$entries[i]; final lOther$entries$entry = lOther$entries[i]; if (l$entries$entry != lOther$entries$entry) { return false; } } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$size = size; final lOther$size = other.size; if (l$size != lOther$size) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$ArchiveFS on Query$ListDir$fsEntry$$ArchiveFS { CopyWith$Query$ListDir$fsEntry$$ArchiveFS get copyWith => CopyWith$Query$ListDir$fsEntry$$ArchiveFS( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$ArchiveFS { factory CopyWith$Query$ListDir$fsEntry$$ArchiveFS( Query$ListDir$fsEntry$$ArchiveFS instance, TRes Function(Query$ListDir$fsEntry$$ArchiveFS) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$ArchiveFS; factory CopyWith$Query$ListDir$fsEntry$$ArchiveFS.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$ArchiveFS; TRes call({ List? entries, String? $__typename, String? name, int? size, }); TRes entries( Iterable Function( Iterable>) fn); } class _CopyWithImpl$Query$ListDir$fsEntry$$ArchiveFS implements CopyWith$Query$ListDir$fsEntry$$ArchiveFS { _CopyWithImpl$Query$ListDir$fsEntry$$ArchiveFS( this._instance, this._then, ); final Query$ListDir$fsEntry$$ArchiveFS _instance; final TRes Function(Query$ListDir$fsEntry$$ArchiveFS) _then; static const _undefined = {}; @override TRes call({ Object? entries = _undefined, Object? $__typename = _undefined, Object? name = _undefined, Object? size = _undefined, }) => _then(Query$ListDir$fsEntry$$ArchiveFS( entries: entries == _undefined || entries == null ? _instance.entries : (entries as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), name: name == _undefined || name == null ? _instance.name : (name as String), size: size == _undefined || size == null ? _instance.size : (size as int), )); @override TRes entries( Iterable Function( Iterable>) fn) => call( entries: fn(_instance.entries.map((e) => CopyWith$Fragment$DirEntry( e, (i) => i, ))).toList()); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$ArchiveFS implements CopyWith$Query$ListDir$fsEntry$$ArchiveFS { _CopyWithStubImpl$Query$ListDir$fsEntry$$ArchiveFS(this._res); final TRes _res; @override call({ List? entries, String? $__typename, String? name, int? size, }) => _res; @override entries(fn) => _res; } class Query$ListDir$fsEntry$$ResolverFS implements Query$ListDir$fsEntry { Query$ListDir$fsEntry$$ResolverFS({ required this.entries, this.$__typename = 'ResolverFS', required this.name, }); factory Query$ListDir$fsEntry$$ResolverFS.fromJson( Map json) { final l$entries = json['entries']; final l$$__typename = json['__typename']; final l$name = json['name']; return Query$ListDir$fsEntry$$ResolverFS( entries: (l$entries as List) .map((e) => Fragment$DirEntry.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), name: (l$name as String), ); } final List entries; @override final String $__typename; @override final String name; @override Map toJson() { final resultData = {}; final l$entries = entries; resultData['entries'] = l$entries.map((e) => e.toJson()).toList(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; final l$name = name; resultData['name'] = l$name; return resultData; } @override int get hashCode { final l$entries = entries; final l$$__typename = $__typename; final l$name = name; return Object.hashAll([ Object.hashAll(l$entries.map((v) => v)), l$$__typename, l$name, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$ResolverFS || runtimeType != other.runtimeType) { return false; } final l$entries = entries; final lOther$entries = other.entries; if (l$entries.length != lOther$entries.length) { return false; } for (int i = 0; i < l$entries.length; i++) { final l$entries$entry = l$entries[i]; final lOther$entries$entry = lOther$entries[i]; if (l$entries$entry != lOther$entries$entry) { return false; } } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$ResolverFS on Query$ListDir$fsEntry$$ResolverFS { CopyWith$Query$ListDir$fsEntry$$ResolverFS get copyWith => CopyWith$Query$ListDir$fsEntry$$ResolverFS( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$ResolverFS { factory CopyWith$Query$ListDir$fsEntry$$ResolverFS( Query$ListDir$fsEntry$$ResolverFS instance, TRes Function(Query$ListDir$fsEntry$$ResolverFS) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$ResolverFS; factory CopyWith$Query$ListDir$fsEntry$$ResolverFS.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$ResolverFS; TRes call({ List? entries, String? $__typename, String? name, }); TRes entries( Iterable Function( Iterable>) fn); } class _CopyWithImpl$Query$ListDir$fsEntry$$ResolverFS implements CopyWith$Query$ListDir$fsEntry$$ResolverFS { _CopyWithImpl$Query$ListDir$fsEntry$$ResolverFS( this._instance, this._then, ); final Query$ListDir$fsEntry$$ResolverFS _instance; final TRes Function(Query$ListDir$fsEntry$$ResolverFS) _then; static const _undefined = {}; @override TRes call({ Object? entries = _undefined, Object? $__typename = _undefined, Object? name = _undefined, }) => _then(Query$ListDir$fsEntry$$ResolverFS( entries: entries == _undefined || entries == null ? _instance.entries : (entries as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), name: name == _undefined || name == null ? _instance.name : (name as String), )); @override TRes entries( Iterable Function( Iterable>) fn) => call( entries: fn(_instance.entries.map((e) => CopyWith$Fragment$DirEntry( e, (i) => i, ))).toList()); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$ResolverFS implements CopyWith$Query$ListDir$fsEntry$$ResolverFS { _CopyWithStubImpl$Query$ListDir$fsEntry$$ResolverFS(this._res); final TRes _res; @override call({ List? entries, String? $__typename, String? name, }) => _res; @override entries(fn) => _res; } class Query$ListDir$fsEntry$$SimpleDir implements Query$ListDir$fsEntry { Query$ListDir$fsEntry$$SimpleDir({ required this.entries, this.$__typename = 'SimpleDir', required this.name, }); factory Query$ListDir$fsEntry$$SimpleDir.fromJson(Map json) { final l$entries = json['entries']; final l$$__typename = json['__typename']; final l$name = json['name']; return Query$ListDir$fsEntry$$SimpleDir( entries: (l$entries as List) .map((e) => Fragment$DirEntry.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), name: (l$name as String), ); } final List entries; @override final String $__typename; @override final String name; @override Map toJson() { final resultData = {}; final l$entries = entries; resultData['entries'] = l$entries.map((e) => e.toJson()).toList(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; final l$name = name; resultData['name'] = l$name; return resultData; } @override int get hashCode { final l$entries = entries; final l$$__typename = $__typename; final l$name = name; return Object.hashAll([ Object.hashAll(l$entries.map((v) => v)), l$$__typename, l$name, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$SimpleDir || runtimeType != other.runtimeType) { return false; } final l$entries = entries; final lOther$entries = other.entries; if (l$entries.length != lOther$entries.length) { return false; } for (int i = 0; i < l$entries.length; i++) { final l$entries$entry = l$entries[i]; final lOther$entries$entry = lOther$entries[i]; if (l$entries$entry != lOther$entries$entry) { return false; } } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$SimpleDir on Query$ListDir$fsEntry$$SimpleDir { CopyWith$Query$ListDir$fsEntry$$SimpleDir get copyWith => CopyWith$Query$ListDir$fsEntry$$SimpleDir( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$SimpleDir { factory CopyWith$Query$ListDir$fsEntry$$SimpleDir( Query$ListDir$fsEntry$$SimpleDir instance, TRes Function(Query$ListDir$fsEntry$$SimpleDir) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$SimpleDir; factory CopyWith$Query$ListDir$fsEntry$$SimpleDir.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleDir; TRes call({ List? entries, String? $__typename, String? name, }); TRes entries( Iterable Function( Iterable>) fn); } class _CopyWithImpl$Query$ListDir$fsEntry$$SimpleDir implements CopyWith$Query$ListDir$fsEntry$$SimpleDir { _CopyWithImpl$Query$ListDir$fsEntry$$SimpleDir( this._instance, this._then, ); final Query$ListDir$fsEntry$$SimpleDir _instance; final TRes Function(Query$ListDir$fsEntry$$SimpleDir) _then; static const _undefined = {}; @override TRes call({ Object? entries = _undefined, Object? $__typename = _undefined, Object? name = _undefined, }) => _then(Query$ListDir$fsEntry$$SimpleDir( entries: entries == _undefined || entries == null ? _instance.entries : (entries as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), name: name == _undefined || name == null ? _instance.name : (name as String), )); @override TRes entries( Iterable Function( Iterable>) fn) => call( entries: fn(_instance.entries.map((e) => CopyWith$Fragment$DirEntry( e, (i) => i, ))).toList()); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleDir implements CopyWith$Query$ListDir$fsEntry$$SimpleDir { _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleDir(this._res); final TRes _res; @override call({ List? entries, String? $__typename, String? name, }) => _res; @override entries(fn) => _res; } class Query$ListDir$fsEntry$$TorrentFS implements Fragment$TorrentDir, Query$ListDir$fsEntry { Query$ListDir$fsEntry$$TorrentFS({ required this.entries, this.$__typename = 'TorrentFS', required this.name, required this.torrent, }); factory Query$ListDir$fsEntry$$TorrentFS.fromJson(Map json) { final l$entries = json['entries']; final l$$__typename = json['__typename']; final l$name = json['name']; final l$torrent = json['torrent']; return Query$ListDir$fsEntry$$TorrentFS( entries: (l$entries as List) .map((e) => Fragment$DirEntry.fromJson((e as Map))) .toList(), $__typename: (l$$__typename as String), name: (l$name as String), torrent: Query$ListDir$fsEntry$$TorrentFS$torrent.fromJson( (l$torrent as Map)), ); } final List entries; @override final String $__typename; @override final String name; @override final Query$ListDir$fsEntry$$TorrentFS$torrent torrent; @override Map toJson() { final resultData = {}; final l$entries = entries; resultData['entries'] = l$entries.map((e) => e.toJson()).toList(); final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; final l$name = name; resultData['name'] = l$name; final l$torrent = torrent; resultData['torrent'] = l$torrent.toJson(); return resultData; } @override int get hashCode { final l$entries = entries; final l$$__typename = $__typename; final l$name = name; final l$torrent = torrent; return Object.hashAll([ Object.hashAll(l$entries.map((v) => v)), l$$__typename, l$name, l$torrent, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$TorrentFS || runtimeType != other.runtimeType) { return false; } final l$entries = entries; final lOther$entries = other.entries; if (l$entries.length != lOther$entries.length) { return false; } for (int i = 0; i < l$entries.length; i++) { final l$entries$entry = l$entries[i]; final lOther$entries$entry = lOther$entries[i]; if (l$entries$entry != lOther$entries$entry) { return false; } } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$torrent = torrent; final lOther$torrent = other.torrent; if (l$torrent != lOther$torrent) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$TorrentFS on Query$ListDir$fsEntry$$TorrentFS { CopyWith$Query$ListDir$fsEntry$$TorrentFS get copyWith => CopyWith$Query$ListDir$fsEntry$$TorrentFS( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$TorrentFS { factory CopyWith$Query$ListDir$fsEntry$$TorrentFS( Query$ListDir$fsEntry$$TorrentFS instance, TRes Function(Query$ListDir$fsEntry$$TorrentFS) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS; factory CopyWith$Query$ListDir$fsEntry$$TorrentFS.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS; TRes call({ List? entries, String? $__typename, String? name, Query$ListDir$fsEntry$$TorrentFS$torrent? torrent, }); TRes entries( Iterable Function( Iterable>) fn); CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent get torrent; } class _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS implements CopyWith$Query$ListDir$fsEntry$$TorrentFS { _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS( this._instance, this._then, ); final Query$ListDir$fsEntry$$TorrentFS _instance; final TRes Function(Query$ListDir$fsEntry$$TorrentFS) _then; static const _undefined = {}; @override TRes call({ Object? entries = _undefined, Object? $__typename = _undefined, Object? name = _undefined, Object? torrent = _undefined, }) => _then(Query$ListDir$fsEntry$$TorrentFS( entries: entries == _undefined || entries == null ? _instance.entries : (entries as List), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), name: name == _undefined || name == null ? _instance.name : (name as String), torrent: torrent == _undefined || torrent == null ? _instance.torrent : (torrent as Query$ListDir$fsEntry$$TorrentFS$torrent), )); @override TRes entries( Iterable Function( Iterable>) fn) => call( entries: fn(_instance.entries.map((e) => CopyWith$Fragment$DirEntry( e, (i) => i, ))).toList()); @override CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent get torrent { final local$torrent = _instance.torrent; return CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent( local$torrent, (e) => call(torrent: e)); } } class _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS implements CopyWith$Query$ListDir$fsEntry$$TorrentFS { _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS(this._res); final TRes _res; @override call({ List? entries, String? $__typename, String? name, Query$ListDir$fsEntry$$TorrentFS$torrent? torrent, }) => _res; @override entries(fn) => _res; @override CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent get torrent => CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent.stub(_res); } class Query$ListDir$fsEntry$$SimpleFile implements Query$ListDir$fsEntry { Query$ListDir$fsEntry$$SimpleFile({ required this.name, this.$__typename = 'SimpleFile', }); factory Query$ListDir$fsEntry$$SimpleFile.fromJson( Map json) { final l$name = json['name']; final l$$__typename = json['__typename']; return Query$ListDir$fsEntry$$SimpleFile( name: (l$name as String), $__typename: (l$$__typename as String), ); } @override final String name; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$SimpleFile || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$SimpleFile on Query$ListDir$fsEntry$$SimpleFile { CopyWith$Query$ListDir$fsEntry$$SimpleFile get copyWith => CopyWith$Query$ListDir$fsEntry$$SimpleFile( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$SimpleFile { factory CopyWith$Query$ListDir$fsEntry$$SimpleFile( Query$ListDir$fsEntry$$SimpleFile instance, TRes Function(Query$ListDir$fsEntry$$SimpleFile) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$SimpleFile; factory CopyWith$Query$ListDir$fsEntry$$SimpleFile.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleFile; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Query$ListDir$fsEntry$$SimpleFile implements CopyWith$Query$ListDir$fsEntry$$SimpleFile { _CopyWithImpl$Query$ListDir$fsEntry$$SimpleFile( this._instance, this._then, ); final Query$ListDir$fsEntry$$SimpleFile _instance; final TRes Function(Query$ListDir$fsEntry$$SimpleFile) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListDir$fsEntry$$SimpleFile( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleFile implements CopyWith$Query$ListDir$fsEntry$$SimpleFile { _CopyWithStubImpl$Query$ListDir$fsEntry$$SimpleFile(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; } class Query$ListDir$fsEntry$$TorrentFS$torrent implements Fragment$TorrentDir$torrent { Query$ListDir$fsEntry$$TorrentFS$torrent({ required this.name, required this.infohash, required this.bytesCompleted, required this.torrentFilePath, required this.bytesMissing, this.$__typename = 'Torrent', }); factory Query$ListDir$fsEntry$$TorrentFS$torrent.fromJson( Map json) { final l$name = json['name']; final l$infohash = json['infohash']; final l$bytesCompleted = json['bytesCompleted']; final l$torrentFilePath = json['torrentFilePath']; final l$bytesMissing = json['bytesMissing']; final l$$__typename = json['__typename']; return Query$ListDir$fsEntry$$TorrentFS$torrent( name: (l$name as String), infohash: (l$infohash as String), bytesCompleted: (l$bytesCompleted as int), torrentFilePath: (l$torrentFilePath as String), bytesMissing: (l$bytesMissing as int), $__typename: (l$$__typename as String), ); } @override final String name; @override final String infohash; @override final int bytesCompleted; @override final String torrentFilePath; @override final int bytesMissing; @override final String $__typename; @override 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$torrentFilePath = torrentFilePath; resultData['torrentFilePath'] = l$torrentFilePath; 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$torrentFilePath = torrentFilePath; final l$bytesMissing = bytesMissing; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$infohash, l$bytesCompleted, l$torrentFilePath, l$bytesMissing, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$TorrentFS$torrent || 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$torrentFilePath = torrentFilePath; final lOther$torrentFilePath = other.torrentFilePath; if (l$torrentFilePath != lOther$torrentFilePath) { 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$ListDir$fsEntry$$TorrentFS$torrent on Query$ListDir$fsEntry$$TorrentFS$torrent { CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent< Query$ListDir$fsEntry$$TorrentFS$torrent> get copyWith => CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent { factory CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent( Query$ListDir$fsEntry$$TorrentFS$torrent instance, TRes Function(Query$ListDir$fsEntry$$TorrentFS$torrent) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS$torrent; factory CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS$torrent; TRes call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }); } class _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS$torrent implements CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent { _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFS$torrent( this._instance, this._then, ); final Query$ListDir$fsEntry$$TorrentFS$torrent _instance; final TRes Function(Query$ListDir$fsEntry$$TorrentFS$torrent) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? infohash = _undefined, Object? bytesCompleted = _undefined, Object? torrentFilePath = _undefined, Object? bytesMissing = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListDir$fsEntry$$TorrentFS$torrent( 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), torrentFilePath: torrentFilePath == _undefined || torrentFilePath == null ? _instance.torrentFilePath : (torrentFilePath as String), bytesMissing: bytesMissing == _undefined || bytesMissing == null ? _instance.bytesMissing : (bytesMissing as int), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS$torrent implements CopyWith$Query$ListDir$fsEntry$$TorrentFS$torrent { _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFS$torrent(this._res); final TRes _res; @override call({ String? name, String? infohash, int? bytesCompleted, String? torrentFilePath, int? bytesMissing, String? $__typename, }) => _res; } class Query$ListDir$fsEntry$$TorrentFileEntry implements Query$ListDir$fsEntry { Query$ListDir$fsEntry$$TorrentFileEntry({ required this.name, this.$__typename = 'TorrentFileEntry', }); factory Query$ListDir$fsEntry$$TorrentFileEntry.fromJson( Map json) { final l$name = json['name']; final l$$__typename = json['__typename']; return Query$ListDir$fsEntry$$TorrentFileEntry( name: (l$name as String), $__typename: (l$$__typename as String), ); } @override final String name; @override final String $__typename; @override Map toJson() { final resultData = {}; final l$name = name; resultData['name'] = l$name; final l$$__typename = $__typename; resultData['__typename'] = l$$__typename; return resultData; } @override int get hashCode { final l$name = name; final l$$__typename = $__typename; return Object.hashAll([ l$name, l$$__typename, ]); } @override bool operator ==(Object other) { if (identical(this, other)) { return true; } if (other is! Query$ListDir$fsEntry$$TorrentFileEntry || runtimeType != other.runtimeType) { return false; } final l$name = name; final lOther$name = other.name; if (l$name != lOther$name) { return false; } final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) { return false; } return true; } } extension UtilityExtension$Query$ListDir$fsEntry$$TorrentFileEntry on Query$ListDir$fsEntry$$TorrentFileEntry { CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry< Query$ListDir$fsEntry$$TorrentFileEntry> get copyWith => CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry( this, (i) => i, ); } abstract class CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry { factory CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry( Query$ListDir$fsEntry$$TorrentFileEntry instance, TRes Function(Query$ListDir$fsEntry$$TorrentFileEntry) then, ) = _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFileEntry; factory CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry.stub(TRes res) = _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFileEntry; TRes call({ String? name, String? $__typename, }); } class _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFileEntry implements CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry { _CopyWithImpl$Query$ListDir$fsEntry$$TorrentFileEntry( this._instance, this._then, ); final Query$ListDir$fsEntry$$TorrentFileEntry _instance; final TRes Function(Query$ListDir$fsEntry$$TorrentFileEntry) _then; static const _undefined = {}; @override TRes call({ Object? name = _undefined, Object? $__typename = _undefined, }) => _then(Query$ListDir$fsEntry$$TorrentFileEntry( name: name == _undefined || name == null ? _instance.name : (name as String), $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), )); } class _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFileEntry implements CopyWith$Query$ListDir$fsEntry$$TorrentFileEntry { _CopyWithStubImpl$Query$ListDir$fsEntry$$TorrentFileEntry(this._res); final TRes _res; @override call({ String? name, String? $__typename, }) => _res; }