diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 5d0e5d63..7200c167 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -10,10 +10,16 @@ part 'users.graphql.g.dart'; @JsonSerializable(explicitToJson: true) class Fragment$basicMutationReturnFields { - Fragment$basicMutationReturnFields({required this.code, required this.message, required this.success, required this.$__typename}); + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Fragment$basicMutationReturnFields.fromJson(Map json) => _$Fragment$basicMutationReturnFieldsFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); final int code; @@ -24,7 +30,8 @@ class Fragment$basicMutationReturnFields { @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Fragment$basicMutationReturnFieldsToJson(this); + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -36,7 +43,8 @@ class Fragment$basicMutationReturnFields { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$basicMutationReturnFields) || runtimeType != other.runtimeType) return false; + if (!(other is Fragment$basicMutationReturnFields) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -53,22 +61,28 @@ class Fragment$basicMutationReturnFields { } } -extension UtilityExtension$Fragment$basicMutationReturnFields on Fragment$basicMutationReturnFields { - CopyWith$Fragment$basicMutationReturnFields get copyWith => - CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + CopyWith$Fragment$basicMutationReturnFields< + Fragment$basicMutationReturnFields> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields(this, (i) => i); } abstract class CopyWith$Fragment$basicMutationReturnFields { factory CopyWith$Fragment$basicMutationReturnFields( - Fragment$basicMutationReturnFields instance, TRes Function(Fragment$basicMutationReturnFields) then) = + Fragment$basicMutationReturnFields instance, + TRes Function(Fragment$basicMutationReturnFields) then) = _CopyWithImpl$Fragment$basicMutationReturnFields; - factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = _CopyWithStubImpl$Fragment$basicMutationReturnFields; + factory CopyWith$Fragment$basicMutationReturnFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithImpl$Fragment$basicMutationReturnFields(this._instance, this._then); final Fragment$basicMutationReturnFields _instance; @@ -77,62 +91,115 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields implements CopyWith static const _undefined = {}; - TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => _then(Fragment$basicMutationReturnFields( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$basicMutationReturnFields implements CopyWith$Fragment$basicMutationReturnFields { +class _CopyWithStubImpl$Fragment$basicMutationReturnFields + implements CopyWith$Fragment$basicMutationReturnFields { _CopyWithStubImpl$Fragment$basicMutationReturnFields(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => _res; + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( name: NameNode(value: 'basicMutationReturnFields'), - typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'MutationReturnInterface'), isNonNull: false)), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'MutationReturnInterface'), + isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode(name: NameNode(value: 'code'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'message'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'success'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: 'code'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'success'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])); -const documentNodeFragmentbasicMutationReturnFields = DocumentNode(definitions: [ +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ fragmentDefinitionbasicMutationReturnFields, ]); -extension ClientExtension$Fragment$basicMutationReturnFields on graphql.GraphQLClient { +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { void writeFragment$basicMutationReturnFields( - {required Fragment$basicMutationReturnFields data, required Map idFields, bool broadcast = true}) => + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => this.writeFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), data: data.toJson(), broadcast: broadcast); - Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields({required Map idFields, bool optimistic = true}) { + Fragment$basicMutationReturnFields? readFragment$basicMutationReturnFields( + {required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( idFields: idFields, - fragment: const graphql.Fragment(fragmentName: 'basicMutationReturnFields', document: documentNodeFragmentbasicMutationReturnFields)), + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), optimistic: optimistic); - return result == null ? null : Fragment$basicMutationReturnFields.fromJson(result); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Fragment$userFields { - Fragment$userFields({required this.username, required this.userType, required this.sshKeys, required this.$__typename}); + Fragment$userFields( + {required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename}); @override - factory Fragment$userFields.fromJson(Map json) => _$Fragment$userFieldsFromJson(json); + factory Fragment$userFields.fromJson(Map json) => + _$Fragment$userFieldsFromJson(json); final String username; @@ -150,13 +217,19 @@ class Fragment$userFields { final l$userType = userType; final l$sshKeys = sshKeys; final l$$__typename = $__typename; - return Object.hashAll([l$username, l$userType, Object.hashAll(l$sshKeys.map((v) => v)), l$$__typename]); + return Object.hashAll([ + l$username, + l$userType, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) return false; + if (!(other is Fragment$userFields) || runtimeType != other.runtimeType) + return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; @@ -180,18 +253,27 @@ class Fragment$userFields { } extension UtilityExtension$Fragment$userFields on Fragment$userFields { - CopyWith$Fragment$userFields get copyWith => CopyWith$Fragment$userFields(this, (i) => i); + CopyWith$Fragment$userFields get copyWith => + CopyWith$Fragment$userFields(this, (i) => i); } abstract class CopyWith$Fragment$userFields { - factory CopyWith$Fragment$userFields(Fragment$userFields instance, TRes Function(Fragment$userFields) then) = _CopyWithImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields(Fragment$userFields instance, + TRes Function(Fragment$userFields) then) = + _CopyWithImpl$Fragment$userFields; - factory CopyWith$Fragment$userFields.stub(TRes res) = _CopyWithStubImpl$Fragment$userFields; + factory CopyWith$Fragment$userFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$userFields; - TRes call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}); + TRes call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}); } -class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userFields { +class _CopyWithImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { _CopyWithImpl$Fragment$userFields(this._instance, this._then); final Fragment$userFields _instance; @@ -200,48 +282,97 @@ class _CopyWithImpl$Fragment$userFields implements CopyWith$Fragment$userF static const _undefined = {}; - TRes call({Object? username = _undefined, Object? userType = _undefined, Object? sshKeys = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? username = _undefined, + Object? userType = _undefined, + Object? sshKeys = _undefined, + Object? $__typename = _undefined}) => _then(Fragment$userFields( - username: username == _undefined || username == null ? _instance.username : (username as String), - userType: userType == _undefined || userType == null ? _instance.userType : (userType as Enum$UserType), - sshKeys: sshKeys == _undefined || sshKeys == null ? _instance.sshKeys : (sshKeys as List), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + username: username == _undefined || username == null + ? _instance.username + : (username as String), + userType: userType == _undefined || userType == null + ? _instance.userType + : (userType as Enum$UserType), + sshKeys: sshKeys == _undefined || sshKeys == null + ? _instance.sshKeys + : (sshKeys as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Fragment$userFields implements CopyWith$Fragment$userFields { +class _CopyWithStubImpl$Fragment$userFields + implements CopyWith$Fragment$userFields { _CopyWithStubImpl$Fragment$userFields(this._res); TRes _res; - call({String? username, Enum$UserType? userType, List? sshKeys, String? $__typename}) => _res; + call( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}) => + _res; } const fragmentDefinitionuserFields = FragmentDefinitionNode( name: NameNode(value: 'userFields'), - typeCondition: TypeConditionNode(on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), + typeCondition: TypeConditionNode( + on: NamedTypeNode(name: NameNode(value: 'User'), isNonNull: false)), directives: [], selectionSet: SelectionSetNode(selections: [ - FieldNode(name: NameNode(value: 'username'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'userType'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: 'sshKeys'), alias: null, arguments: [], directives: [], selectionSet: null), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])); const documentNodeFragmentuserFields = DocumentNode(definitions: [ fragmentDefinitionuserFields, ]); extension ClientExtension$Fragment$userFields on graphql.GraphQLClient { - void writeFragment$userFields({required Fragment$userFields data, required Map idFields, bool broadcast = true}) => this - .writeFragment( + void writeFragment$userFields( + {required Fragment$userFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( graphql.FragmentRequest( - idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), data: data.toJson(), broadcast: broadcast); - Fragment$userFields? readFragment$userFields({required Map idFields, bool optimistic = true}) { + Fragment$userFields? readFragment$userFields( + {required Map idFields, bool optimistic = true}) { final result = this.readFragment( graphql.FragmentRequest( - idFields: idFields, fragment: const graphql.Fragment(fragmentName: 'userFields', document: documentNodeFragmentuserFields)), + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'userFields', + document: documentNodeFragmentuserFields)), optimistic: optimistic); return result == null ? null : Fragment$userFields.fromJson(result); } @@ -252,7 +383,8 @@ class Query$AllUsers { Query$AllUsers({required this.users, required this.$__typename}); @override - factory Query$AllUsers.fromJson(Map json) => _$Query$AllUsersFromJson(json); + factory Query$AllUsers.fromJson(Map json) => + _$Query$AllUsersFromJson(json); final Query$AllUsers$users users; @@ -269,7 +401,8 @@ class Query$AllUsers { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) return false; + if (!(other is Query$AllUsers) || runtimeType != other.runtimeType) + return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -281,19 +414,24 @@ class Query$AllUsers { } extension UtilityExtension$Query$AllUsers on Query$AllUsers { - CopyWith$Query$AllUsers get copyWith => CopyWith$Query$AllUsers(this, (i) => i); + CopyWith$Query$AllUsers get copyWith => + CopyWith$Query$AllUsers(this, (i) => i); } abstract class CopyWith$Query$AllUsers { - factory CopyWith$Query$AllUsers(Query$AllUsers instance, TRes Function(Query$AllUsers) then) = _CopyWithImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers( + Query$AllUsers instance, TRes Function(Query$AllUsers) then) = + _CopyWithImpl$Query$AllUsers; - factory CopyWith$Query$AllUsers.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers; + factory CopyWith$Query$AllUsers.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers; TRes call({Query$AllUsers$users? users, String? $__typename}); CopyWith$Query$AllUsers$users get users; } -class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers { +class _CopyWithImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { _CopyWithImpl$Query$AllUsers(this._instance, this._then); final Query$AllUsers _instance; @@ -302,9 +440,14 @@ class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers _then(Query$AllUsers( - users: users == _undefined || users == null ? _instance.users : (users as Query$AllUsers$users), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$AllUsers( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$AllUsers$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Query$AllUsers$users get users { final local$users = _instance.users; @@ -312,14 +455,16 @@ class _CopyWithImpl$Query$AllUsers implements CopyWith$Query$AllUsers implements CopyWith$Query$AllUsers { +class _CopyWithStubImpl$Query$AllUsers + implements CopyWith$Query$AllUsers { _CopyWithStubImpl$Query$AllUsers(this._res); TRes _res; call({Query$AllUsers$users? users, String? $__typename}) => _res; - CopyWith$Query$AllUsers$users get users => CopyWith$Query$AllUsers$users.stub(_res); + CopyWith$Query$AllUsers$users get users => + CopyWith$Query$AllUsers$users.stub(_res); } const documentNodeQueryAllUsers = DocumentNode(definitions: [ @@ -341,26 +486,53 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), FieldNode( name: NameNode(value: 'getUser'), alias: NameNode(value: 'rootUser'), - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: StringValueNode(value: 'root', isBlock: false))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: StringValueNode(value: 'root', isBlock: false)) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$AllUsers _parserFn$Query$AllUsers(Map data) => Query$AllUsers.fromJson(data); +Query$AllUsers _parserFn$Query$AllUsers(Map data) => + Query$AllUsers.fromJson(data); class Options$Query$AllUsers extends graphql.QueryOptions { Options$Query$AllUsers( @@ -383,7 +555,8 @@ class Options$Query$AllUsers extends graphql.QueryOptions { parserFn: _parserFn$Query$AllUsers); } -class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions { +class WatchOptions$Query$AllUsers + extends graphql.WatchQueryOptions { WatchOptions$Query$AllUsers( {String? operationName, graphql.FetchPolicy? fetchPolicy, @@ -411,31 +584,45 @@ class WatchOptions$Query$AllUsers extends graphql.WatchQueryOptions> query$AllUsers([Options$Query$AllUsers? options]) async => + Future> query$AllUsers( + [Options$Query$AllUsers? options]) async => await this.query(options ?? Options$Query$AllUsers()); - graphql.ObservableQuery watchQuery$AllUsers([WatchOptions$Query$AllUsers? options]) => + graphql.ObservableQuery watchQuery$AllUsers( + [WatchOptions$Query$AllUsers? options]) => this.watchQuery(options ?? WatchOptions$Query$AllUsers()); - void writeQuery$AllUsers({required Query$AllUsers data, bool broadcast = true}) => - this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), data: data.toJson(), broadcast: broadcast); + void writeQuery$AllUsers( + {required Query$AllUsers data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllUsers)), + data: data.toJson(), + broadcast: broadcast); Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { - final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryAllUsers)), optimistic: optimistic); + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryAllUsers)), + optimistic: optimistic); return result == null ? null : Query$AllUsers.fromJson(result); } } @JsonSerializable(explicitToJson: true) class Query$AllUsers$users { - Query$AllUsers$users({required this.allUsers, this.rootUser, required this.$__typename}); + Query$AllUsers$users( + {required this.allUsers, this.rootUser, required this.$__typename}); @override - factory Query$AllUsers$users.fromJson(Map json) => _$Query$AllUsers$usersFromJson(json); + factory Query$AllUsers$users.fromJson(Map json) => + _$Query$AllUsers$usersFromJson(json); final List allUsers; @@ -450,13 +637,15 @@ class Query$AllUsers$users { final l$allUsers = allUsers; final l$rootUser = rootUser; final l$$__typename = $__typename; - return Object.hashAll([Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); + return Object.hashAll( + [Object.hashAll(l$allUsers.map((v) => v)), l$rootUser, l$$__typename]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) return false; + if (!(other is Query$AllUsers$users) || runtimeType != other.runtimeType) + return false; final l$allUsers = allUsers; final lOther$allUsers = other.allUsers; if (l$allUsers.length != lOther$allUsers.length) return false; @@ -477,22 +666,33 @@ class Query$AllUsers$users { } extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { - CopyWith$Query$AllUsers$users get copyWith => CopyWith$Query$AllUsers$users(this, (i) => i); + CopyWith$Query$AllUsers$users get copyWith => + CopyWith$Query$AllUsers$users(this, (i) => i); } abstract class CopyWith$Query$AllUsers$users { - factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, TRes Function(Query$AllUsers$users) then) = _CopyWithImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users(Query$AllUsers$users instance, + TRes Function(Query$AllUsers$users) then) = + _CopyWithImpl$Query$AllUsers$users; - factory CopyWith$Query$AllUsers$users.stub(TRes res) = _CopyWithStubImpl$Query$AllUsers$users; + factory CopyWith$Query$AllUsers$users.stub(TRes res) = + _CopyWithStubImpl$Query$AllUsers$users; - TRes call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}); + TRes call( + {List? allUsers, + Fragment$userFields? rootUser, + String? $__typename}); - TRes allUsers(Iterable Function(Iterable>) _fn); + TRes allUsers( + Iterable Function( + Iterable>) + _fn); CopyWith$Fragment$userFields get rootUser; } -class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { +class _CopyWithImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { _CopyWithImpl$Query$AllUsers$users(this._instance, this._then); final Query$AllUsers$users _instance; @@ -501,32 +701,54 @@ class _CopyWithImpl$Query$AllUsers$users implements CopyWith$Query$AllUser static const _undefined = {}; - TRes call({Object? allUsers = _undefined, Object? rootUser = _undefined, Object? $__typename = _undefined}) => _then(Query$AllUsers$users( - allUsers: allUsers == _undefined || allUsers == null ? _instance.allUsers : (allUsers as List), - rootUser: rootUser == _undefined ? _instance.rootUser : (rootUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? allUsers = _undefined, + Object? rootUser = _undefined, + Object? $__typename = _undefined}) => + _then(Query$AllUsers$users( + allUsers: allUsers == _undefined || allUsers == null + ? _instance.allUsers + : (allUsers as List), + rootUser: rootUser == _undefined + ? _instance.rootUser + : (rootUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); - TRes allUsers(Iterable Function(Iterable>) _fn) => - call(allUsers: _fn(_instance.allUsers.map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); + TRes allUsers( + Iterable Function( + Iterable>) + _fn) => + call( + allUsers: _fn(_instance.allUsers + .map((e) => CopyWith$Fragment$userFields(e, (i) => i))).toList()); CopyWith$Fragment$userFields get rootUser { final local$rootUser = _instance.rootUser; return local$rootUser == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) - : CopyWith$Fragment$userFields(local$rootUser, (e) => call(rootUser: e)); + : CopyWith$Fragment$userFields( + local$rootUser, (e) => call(rootUser: e)); } } -class _CopyWithStubImpl$Query$AllUsers$users implements CopyWith$Query$AllUsers$users { +class _CopyWithStubImpl$Query$AllUsers$users + implements CopyWith$Query$AllUsers$users { _CopyWithStubImpl$Query$AllUsers$users(this._res); TRes _res; - call({List? allUsers, Fragment$userFields? rootUser, String? $__typename}) => _res; + call( + {List? allUsers, + Fragment$userFields? rootUser, + String? $__typename}) => + _res; allUsers(_fn) => _res; - CopyWith$Fragment$userFields get rootUser => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get rootUser => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -534,7 +756,8 @@ class Variables$Query$GetUser { Variables$Query$GetUser({required this.username}); @override - factory Variables$Query$GetUser.fromJson(Map json) => _$Variables$Query$GetUserFromJson(json); + factory Variables$Query$GetUser.fromJson(Map json) => + _$Variables$Query$GetUserFromJson(json); final String username; @@ -547,26 +770,31 @@ class Variables$Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Query$GetUser) || runtimeType != other.runtimeType) + return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Query$GetUser get copyWith => CopyWith$Variables$Query$GetUser(this, (i) => i); + CopyWith$Variables$Query$GetUser get copyWith => + CopyWith$Variables$Query$GetUser(this, (i) => i); } abstract class CopyWith$Variables$Query$GetUser { - factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, TRes Function(Variables$Query$GetUser) then) = + factory CopyWith$Variables$Query$GetUser(Variables$Query$GetUser instance, + TRes Function(Variables$Query$GetUser) then) = _CopyWithImpl$Variables$Query$GetUser; - factory CopyWith$Variables$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Variables$Query$GetUser; + factory CopyWith$Variables$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Query$GetUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { +class _CopyWithImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { _CopyWithImpl$Variables$Query$GetUser(this._instance, this._then); final Variables$Query$GetUser _instance; @@ -575,11 +803,14 @@ class _CopyWithImpl$Variables$Query$GetUser implements CopyWith$Variables$ static const _undefined = {}; - TRes call({Object? username = _undefined}) => - _then(Variables$Query$GetUser(username: username == _undefined || username == null ? _instance.username : (username as String))); + TRes call({Object? username = _undefined}) => _then(Variables$Query$GetUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); } -class _CopyWithStubImpl$Variables$Query$GetUser implements CopyWith$Variables$Query$GetUser { +class _CopyWithStubImpl$Variables$Query$GetUser + implements CopyWith$Variables$Query$GetUser { _CopyWithStubImpl$Variables$Query$GetUser(this._res); TRes _res; @@ -592,7 +823,8 @@ class Query$GetUser { Query$GetUser({required this.users, required this.$__typename}); @override - factory Query$GetUser.fromJson(Map json) => _$Query$GetUserFromJson(json); + factory Query$GetUser.fromJson(Map json) => + _$Query$GetUserFromJson(json); final Query$GetUser$users users; @@ -609,7 +841,8 @@ class Query$GetUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser) || runtimeType != other.runtimeType) return false; + if (!(other is Query$GetUser) || runtimeType != other.runtimeType) + return false; final l$users = users; final lOther$users = other.users; if (l$users != lOther$users) return false; @@ -621,19 +854,24 @@ class Query$GetUser { } extension UtilityExtension$Query$GetUser on Query$GetUser { - CopyWith$Query$GetUser get copyWith => CopyWith$Query$GetUser(this, (i) => i); + CopyWith$Query$GetUser get copyWith => + CopyWith$Query$GetUser(this, (i) => i); } abstract class CopyWith$Query$GetUser { - factory CopyWith$Query$GetUser(Query$GetUser instance, TRes Function(Query$GetUser) then) = _CopyWithImpl$Query$GetUser; + factory CopyWith$Query$GetUser( + Query$GetUser instance, TRes Function(Query$GetUser) then) = + _CopyWithImpl$Query$GetUser; - factory CopyWith$Query$GetUser.stub(TRes res) = _CopyWithStubImpl$Query$GetUser; + factory CopyWith$Query$GetUser.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser; TRes call({Query$GetUser$users? users, String? $__typename}); CopyWith$Query$GetUser$users get users; } -class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser { +class _CopyWithImpl$Query$GetUser + implements CopyWith$Query$GetUser { _CopyWithImpl$Query$GetUser(this._instance, this._then); final Query$GetUser _instance; @@ -642,9 +880,14 @@ class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser static const _undefined = {}; - TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser( - users: users == _undefined || users == null ? _instance.users : (users as Query$GetUser$users), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? users = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser( + users: users == _undefined || users == null + ? _instance.users + : (users as Query$GetUser$users), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Query$GetUser$users get users { final local$users = _instance.users; @@ -652,14 +895,16 @@ class _CopyWithImpl$Query$GetUser implements CopyWith$Query$GetUser } } -class _CopyWithStubImpl$Query$GetUser implements CopyWith$Query$GetUser { +class _CopyWithStubImpl$Query$GetUser + implements CopyWith$Query$GetUser { _CopyWithStubImpl$Query$GetUser(this._res); TRes _res; call({Query$GetUser$users? users, String? $__typename}) => _res; - CopyWith$Query$GetUser$users get users => CopyWith$Query$GetUser$users.stub(_res); + CopyWith$Query$GetUser$users get users => + CopyWith$Query$GetUser$users.stub(_res); } const documentNodeQueryGetUser = DocumentNode(definitions: [ @@ -669,7 +914,8 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -684,20 +930,41 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'getUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionuserFields, ]); -Query$GetUser _parserFn$Query$GetUser(Map data) => Query$GetUser.fromJson(data); +Query$GetUser _parserFn$Query$GetUser(Map data) => + Query$GetUser.fromJson(data); class Options$Query$GetUser extends graphql.QueryOptions { Options$Query$GetUser( @@ -722,7 +989,8 @@ class Options$Query$GetUser extends graphql.QueryOptions { parserFn: _parserFn$Query$GetUser); } -class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions { +class WatchOptions$Query$GetUser + extends graphql.WatchQueryOptions { WatchOptions$Query$GetUser( {String? operationName, required Variables$Query$GetUser variables, @@ -752,21 +1020,41 @@ class WatchOptions$Query$GetUser extends graphql.WatchQueryOptions> query$GetUser(Options$Query$GetUser options) async => await this.query(options); + Future> query$GetUser( + Options$Query$GetUser options) async => + await this.query(options); - graphql.ObservableQuery watchQuery$GetUser(WatchOptions$Query$GetUser options) => this.watchQuery(options); + graphql.ObservableQuery watchQuery$GetUser( + WatchOptions$Query$GetUser options) => + this.watchQuery(options); - void writeQuery$GetUser({required Query$GetUser data, required Variables$Query$GetUser variables, bool broadcast = true}) => - this.writeQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), - data: data.toJson(), broadcast: broadcast); + void writeQuery$GetUser( + {required Query$GetUser data, + required Variables$Query$GetUser variables, + bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), + data: data.toJson(), + broadcast: broadcast); - Query$GetUser? readQuery$GetUser({required Variables$Query$GetUser variables, bool optimistic = true}) { - final result = this.readQuery(graphql.Request(operation: graphql.Operation(document: documentNodeQueryGetUser), variables: variables.toJson()), + Query$GetUser? readQuery$GetUser( + {required Variables$Query$GetUser variables, bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation(document: documentNodeQueryGetUser), + variables: variables.toJson()), optimistic: optimistic); return result == null ? null : Query$GetUser.fromJson(result); } @@ -777,7 +1065,8 @@ class Query$GetUser$users { Query$GetUser$users({this.getUser, required this.$__typename}); @override - factory Query$GetUser$users.fromJson(Map json) => _$Query$GetUser$usersFromJson(json); + factory Query$GetUser$users.fromJson(Map json) => + _$Query$GetUser$usersFromJson(json); final Fragment$userFields? getUser; @@ -794,7 +1083,8 @@ class Query$GetUser$users { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) return false; + if (!(other is Query$GetUser$users) || runtimeType != other.runtimeType) + return false; final l$getUser = getUser; final lOther$getUser = other.getUser; if (l$getUser != lOther$getUser) return false; @@ -806,19 +1096,24 @@ class Query$GetUser$users { } extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { - CopyWith$Query$GetUser$users get copyWith => CopyWith$Query$GetUser$users(this, (i) => i); + CopyWith$Query$GetUser$users get copyWith => + CopyWith$Query$GetUser$users(this, (i) => i); } abstract class CopyWith$Query$GetUser$users { - factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, TRes Function(Query$GetUser$users) then) = _CopyWithImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users(Query$GetUser$users instance, + TRes Function(Query$GetUser$users) then) = + _CopyWithImpl$Query$GetUser$users; - factory CopyWith$Query$GetUser$users.stub(TRes res) = _CopyWithStubImpl$Query$GetUser$users; + factory CopyWith$Query$GetUser$users.stub(TRes res) = + _CopyWithStubImpl$Query$GetUser$users; TRes call({Fragment$userFields? getUser, String? $__typename}); CopyWith$Fragment$userFields get getUser; } -class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { +class _CopyWithImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { _CopyWithImpl$Query$GetUser$users(this._instance, this._then); final Query$GetUser$users _instance; @@ -827,9 +1122,14 @@ class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$ static const _undefined = {}; - TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => _then(Query$GetUser$users( - getUser: getUser == _undefined ? _instance.getUser : (getUser as Fragment$userFields?), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call({Object? getUser = _undefined, Object? $__typename = _undefined}) => + _then(Query$GetUser$users( + getUser: getUser == _undefined + ? _instance.getUser + : (getUser as Fragment$userFields?), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Fragment$userFields get getUser { final local$getUser = _instance.getUser; @@ -839,14 +1139,16 @@ class _CopyWithImpl$Query$GetUser$users implements CopyWith$Query$GetUser$ } } -class _CopyWithStubImpl$Query$GetUser$users implements CopyWith$Query$GetUser$users { +class _CopyWithStubImpl$Query$GetUser$users + implements CopyWith$Query$GetUser$users { _CopyWithStubImpl$Query$GetUser$users(this._res); TRes _res; call({Fragment$userFields? getUser, String? $__typename}) => _res; - CopyWith$Fragment$userFields get getUser => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get getUser => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -854,7 +1156,8 @@ class Variables$Mutation$CreateUser { Variables$Mutation$CreateUser({required this.user}); @override - factory Variables$Mutation$CreateUser.fromJson(Map json) => _$Variables$Mutation$CreateUserFromJson(json); + factory Variables$Mutation$CreateUser.fromJson(Map json) => + _$Variables$Mutation$CreateUserFromJson(json); final Input$UserMutationInput user; @@ -867,26 +1170,32 @@ class Variables$Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$CreateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$CreateUser) || + runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$CreateUser get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); + CopyWith$Variables$Mutation$CreateUser + get copyWith => CopyWith$Variables$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$CreateUser { - factory CopyWith$Variables$Mutation$CreateUser(Variables$Mutation$CreateUser instance, TRes Function(Variables$Mutation$CreateUser) then) = + factory CopyWith$Variables$Mutation$CreateUser( + Variables$Mutation$CreateUser instance, + TRes Function(Variables$Mutation$CreateUser) then) = _CopyWithImpl$Variables$Mutation$CreateUser; - factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$CreateUser; + factory CopyWith$Variables$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$CreateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { _CopyWithImpl$Variables$Mutation$CreateUser(this._instance, this._then); final Variables$Mutation$CreateUser _instance; @@ -895,11 +1204,14 @@ class _CopyWithImpl$Variables$Mutation$CreateUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? user = _undefined}) => - _then(Variables$Mutation$CreateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$CreateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$CreateUser implements CopyWith$Variables$Mutation$CreateUser { +class _CopyWithStubImpl$Variables$Mutation$CreateUser + implements CopyWith$Variables$Mutation$CreateUser { _CopyWithStubImpl$Variables$Mutation$CreateUser(this._res); TRes _res; @@ -912,7 +1224,8 @@ class Mutation$CreateUser { Mutation$CreateUser({required this.createUser, required this.$__typename}); @override - factory Mutation$CreateUser.fromJson(Map json) => _$Mutation$CreateUserFromJson(json); + factory Mutation$CreateUser.fromJson(Map json) => + _$Mutation$CreateUserFromJson(json); final Mutation$CreateUser$createUser createUser; @@ -929,7 +1242,8 @@ class Mutation$CreateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$CreateUser) || runtimeType != other.runtimeType) + return false; final l$createUser = createUser; final lOther$createUser = other.createUser; if (l$createUser != lOther$createUser) return false; @@ -941,19 +1255,24 @@ class Mutation$CreateUser { } extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { - CopyWith$Mutation$CreateUser get copyWith => CopyWith$Mutation$CreateUser(this, (i) => i); + CopyWith$Mutation$CreateUser get copyWith => + CopyWith$Mutation$CreateUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser { - factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, TRes Function(Mutation$CreateUser) then) = _CopyWithImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser(Mutation$CreateUser instance, + TRes Function(Mutation$CreateUser) then) = + _CopyWithImpl$Mutation$CreateUser; - factory CopyWith$Mutation$CreateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser; + factory CopyWith$Mutation$CreateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser; TRes call({Mutation$CreateUser$createUser? createUser, String? $__typename}); CopyWith$Mutation$CreateUser$createUser get createUser; } -class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { +class _CopyWithImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { _CopyWithImpl$Mutation$CreateUser(this._instance, this._then); final Mutation$CreateUser _instance; @@ -962,24 +1281,35 @@ class _CopyWithImpl$Mutation$CreateUser implements CopyWith$Mutation$Creat static const _undefined = {}; - TRes call({Object? createUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$CreateUser( - createUser: createUser == _undefined || createUser == null ? _instance.createUser : (createUser as Mutation$CreateUser$createUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? createUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$CreateUser( + createUser: createUser == _undefined || createUser == null + ? _instance.createUser + : (createUser as Mutation$CreateUser$createUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$CreateUser$createUser get createUser { final local$createUser = _instance.createUser; - return CopyWith$Mutation$CreateUser$createUser(local$createUser, (e) => call(createUser: e)); + return CopyWith$Mutation$CreateUser$createUser( + local$createUser, (e) => call(createUser: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser implements CopyWith$Mutation$CreateUser { +class _CopyWithStubImpl$Mutation$CreateUser + implements CopyWith$Mutation$CreateUser { _CopyWithStubImpl$Mutation$CreateUser(this._res); TRes _res; - call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => _res; + call({Mutation$CreateUser$createUser? createUser, String? $__typename}) => + _res; - CopyWith$Mutation$CreateUser$createUser get createUser => CopyWith$Mutation$CreateUser$createUser.stub(_res); + CopyWith$Mutation$CreateUser$createUser get createUser => + CopyWith$Mutation$CreateUser$createUser.stub(_res); } const documentNodeMutationCreateUser = DocumentNode(definitions: [ @@ -989,7 +1319,8 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -998,32 +1329,57 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'createUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => Mutation$CreateUser.fromJson(data); +Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => + Mutation$CreateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function(dynamic, Mutation$CreateUser?); +typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( + dynamic, Mutation$CreateUser?); -class Options$Mutation$CreateUser extends graphql.MutationOptions { +class Options$Mutation$CreateUser + extends graphql.MutationOptions { Options$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1044,7 +1400,10 @@ class Options$Mutation$CreateUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$CreateUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$CreateUser(data)), update: update, onError: onError, document: documentNodeMutationCreateUser, @@ -1053,11 +1412,16 @@ class Options$Mutation$CreateUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$CreateUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$CreateUser( {String? operationName, required Variables$Mutation$CreateUser variables, @@ -1087,17 +1451,28 @@ class WatchOptions$Mutation$CreateUser extends graphql.WatchQueryOptions> mutate$CreateUser(Options$Mutation$CreateUser options) async => await this.mutate(options); + Future> mutate$CreateUser( + Options$Mutation$CreateUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$CreateUser(WatchOptions$Mutation$CreateUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$CreateUser( + WatchOptions$Mutation$CreateUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFields { - Mutation$CreateUser$createUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$CreateUser$createUser + implements Fragment$basicMutationReturnFields { + Mutation$CreateUser$createUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$CreateUser$createUser.fromJson(Map json) => _$Mutation$CreateUser$createUserFromJson(json); + factory Mutation$CreateUser$createUser.fromJson(Map json) => + _$Mutation$CreateUser$createUserFromJson(json); final int code; @@ -1117,13 +1492,15 @@ class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFiel final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$CreateUser$createUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$CreateUser$createUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1143,21 +1520,32 @@ class Mutation$CreateUser$createUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$CreateUser$createUser on Mutation$CreateUser$createUser { - CopyWith$Mutation$CreateUser$createUser get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); +extension UtilityExtension$Mutation$CreateUser$createUser + on Mutation$CreateUser$createUser { + CopyWith$Mutation$CreateUser$createUser + get copyWith => CopyWith$Mutation$CreateUser$createUser(this, (i) => i); } abstract class CopyWith$Mutation$CreateUser$createUser { - factory CopyWith$Mutation$CreateUser$createUser(Mutation$CreateUser$createUser instance, TRes Function(Mutation$CreateUser$createUser) then) = + factory CopyWith$Mutation$CreateUser$createUser( + Mutation$CreateUser$createUser instance, + TRes Function(Mutation$CreateUser$createUser) then) = _CopyWithImpl$Mutation$CreateUser$createUser; - factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = _CopyWithStubImpl$Mutation$CreateUser$createUser; + factory CopyWith$Mutation$CreateUser$createUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$CreateUser$createUser; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { _CopyWithImpl$Mutation$CreateUser$createUser(this._instance, this._then); final Mutation$CreateUser$createUser _instance; @@ -1173,25 +1561,45 @@ class _CopyWithImpl$Mutation$CreateUser$createUser implements CopyWith$Mut Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$CreateUser$createUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$CreateUser$createUser implements CopyWith$Mutation$CreateUser$createUser { +class _CopyWithStubImpl$Mutation$CreateUser$createUser + implements CopyWith$Mutation$CreateUser$createUser { _CopyWithStubImpl$Mutation$CreateUser$createUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1199,7 +1607,8 @@ class Variables$Mutation$DeleteUser { Variables$Mutation$DeleteUser({required this.username}); @override - factory Variables$Mutation$DeleteUser.fromJson(Map json) => _$Variables$Mutation$DeleteUserFromJson(json); + factory Variables$Mutation$DeleteUser.fromJson(Map json) => + _$Variables$Mutation$DeleteUserFromJson(json); final String username; @@ -1212,26 +1621,32 @@ class Variables$Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$DeleteUser) || + runtimeType != other.runtimeType) return false; final l$username = username; final lOther$username = other.username; if (l$username != lOther$username) return false; return true; } - CopyWith$Variables$Mutation$DeleteUser get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); + CopyWith$Variables$Mutation$DeleteUser + get copyWith => CopyWith$Variables$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$DeleteUser { - factory CopyWith$Variables$Mutation$DeleteUser(Variables$Mutation$DeleteUser instance, TRes Function(Variables$Mutation$DeleteUser) then) = + factory CopyWith$Variables$Mutation$DeleteUser( + Variables$Mutation$DeleteUser instance, + TRes Function(Variables$Mutation$DeleteUser) then) = _CopyWithImpl$Variables$Mutation$DeleteUser; - factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$DeleteUser; + factory CopyWith$Variables$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$DeleteUser; TRes call({String? username}); } -class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithImpl$Variables$Mutation$DeleteUser(this._instance, this._then); final Variables$Mutation$DeleteUser _instance; @@ -1240,11 +1655,15 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? username = _undefined}) => - _then(Variables$Mutation$DeleteUser(username: username == _undefined || username == null ? _instance.username : (username as String))); + TRes call({Object? username = _undefined}) => _then( + Variables$Mutation$DeleteUser( + username: username == _undefined || username == null + ? _instance.username + : (username as String))); } -class _CopyWithStubImpl$Variables$Mutation$DeleteUser implements CopyWith$Variables$Mutation$DeleteUser { +class _CopyWithStubImpl$Variables$Mutation$DeleteUser + implements CopyWith$Variables$Mutation$DeleteUser { _CopyWithStubImpl$Variables$Mutation$DeleteUser(this._res); TRes _res; @@ -1257,7 +1676,8 @@ class Mutation$DeleteUser { Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); @override - factory Mutation$DeleteUser.fromJson(Map json) => _$Mutation$DeleteUserFromJson(json); + factory Mutation$DeleteUser.fromJson(Map json) => + _$Mutation$DeleteUserFromJson(json); final Mutation$DeleteUser$deleteUser deleteUser; @@ -1274,7 +1694,8 @@ class Mutation$DeleteUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$DeleteUser) || runtimeType != other.runtimeType) + return false; final l$deleteUser = deleteUser; final lOther$deleteUser = other.deleteUser; if (l$deleteUser != lOther$deleteUser) return false; @@ -1286,19 +1707,24 @@ class Mutation$DeleteUser { } extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { - CopyWith$Mutation$DeleteUser get copyWith => CopyWith$Mutation$DeleteUser(this, (i) => i); + CopyWith$Mutation$DeleteUser get copyWith => + CopyWith$Mutation$DeleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser { - factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, TRes Function(Mutation$DeleteUser) then) = _CopyWithImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser(Mutation$DeleteUser instance, + TRes Function(Mutation$DeleteUser) then) = + _CopyWithImpl$Mutation$DeleteUser; - factory CopyWith$Mutation$DeleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser; + factory CopyWith$Mutation$DeleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser; TRes call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser; } -class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { +class _CopyWithImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { _CopyWithImpl$Mutation$DeleteUser(this._instance, this._then); final Mutation$DeleteUser _instance; @@ -1307,24 +1733,35 @@ class _CopyWithImpl$Mutation$DeleteUser implements CopyWith$Mutation$Delet static const _undefined = {}; - TRes call({Object? deleteUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$DeleteUser( - deleteUser: deleteUser == _undefined || deleteUser == null ? _instance.deleteUser : (deleteUser as Mutation$DeleteUser$deleteUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? deleteUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$DeleteUser( + deleteUser: deleteUser == _undefined || deleteUser == null + ? _instance.deleteUser + : (deleteUser as Mutation$DeleteUser$deleteUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$DeleteUser$deleteUser get deleteUser { final local$deleteUser = _instance.deleteUser; - return CopyWith$Mutation$DeleteUser$deleteUser(local$deleteUser, (e) => call(deleteUser: e)); + return CopyWith$Mutation$DeleteUser$deleteUser( + local$deleteUser, (e) => call(deleteUser: e)); } } -class _CopyWithStubImpl$Mutation$DeleteUser implements CopyWith$Mutation$DeleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser + implements CopyWith$Mutation$DeleteUser { _CopyWithStubImpl$Mutation$DeleteUser(this._res); TRes _res; - call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => _res; + call({Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + _res; - CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); + CopyWith$Mutation$DeleteUser$deleteUser get deleteUser => + CopyWith$Mutation$DeleteUser$deleteUser.stub(_res); } const documentNodeMutationDeleteUser = DocumentNode(definitions: [ @@ -1334,7 +1771,8 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'username')), - type: NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1343,22 +1781,41 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'deleteUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'username'), value: VariableNode(name: NameNode(value: 'username')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => Mutation$DeleteUser.fromJson(data); +Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => + Mutation$DeleteUser.fromJson(data); -typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function(dynamic, Mutation$DeleteUser?); +typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( + dynamic, Mutation$DeleteUser?); -class Options$Mutation$DeleteUser extends graphql.MutationOptions { +class Options$Mutation$DeleteUser + extends graphql.MutationOptions { Options$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1379,7 +1836,10 @@ class Options$Mutation$DeleteUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$DeleteUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$DeleteUser(data)), update: update, onError: onError, document: documentNodeMutationDeleteUser, @@ -1388,11 +1848,16 @@ class Options$Mutation$DeleteUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$DeleteUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$DeleteUser( {String? operationName, required Variables$Mutation$DeleteUser variables, @@ -1422,17 +1887,27 @@ class WatchOptions$Mutation$DeleteUser extends graphql.WatchQueryOptions> mutate$DeleteUser(Options$Mutation$DeleteUser options) async => await this.mutate(options); + Future> mutate$DeleteUser( + Options$Mutation$DeleteUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$DeleteUser(WatchOptions$Mutation$DeleteUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$DeleteUser( + WatchOptions$Mutation$DeleteUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFields { - Mutation$DeleteUser$deleteUser({required this.code, required this.message, required this.success, required this.$__typename}); +class Mutation$DeleteUser$deleteUser + implements Fragment$basicMutationReturnFields { + Mutation$DeleteUser$deleteUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => _$Mutation$DeleteUser$deleteUserFromJson(json); + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => + _$Mutation$DeleteUser$deleteUserFromJson(json); final int code; @@ -1455,7 +1930,8 @@ class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFiel @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$DeleteUser$deleteUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$DeleteUser$deleteUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1472,20 +1948,26 @@ class Mutation$DeleteUser$deleteUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$DeleteUser$deleteUser on Mutation$DeleteUser$deleteUser { - CopyWith$Mutation$DeleteUser$deleteUser get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); +extension UtilityExtension$Mutation$DeleteUser$deleteUser + on Mutation$DeleteUser$deleteUser { + CopyWith$Mutation$DeleteUser$deleteUser + get copyWith => CopyWith$Mutation$DeleteUser$deleteUser(this, (i) => i); } abstract class CopyWith$Mutation$DeleteUser$deleteUser { - factory CopyWith$Mutation$DeleteUser$deleteUser(Mutation$DeleteUser$deleteUser instance, TRes Function(Mutation$DeleteUser$deleteUser) then) = + factory CopyWith$Mutation$DeleteUser$deleteUser( + Mutation$DeleteUser$deleteUser instance, + TRes Function(Mutation$DeleteUser$deleteUser) then) = _CopyWithImpl$Mutation$DeleteUser$deleteUser; - factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; + factory CopyWith$Mutation$DeleteUser$deleteUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$DeleteUser$deleteUser; TRes call({int? code, String? message, bool? success, String? $__typename}); } -class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithImpl$Mutation$DeleteUser$deleteUser(this._instance, this._then); final Mutation$DeleteUser$deleteUser _instance; @@ -1494,20 +1976,34 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mut static const _undefined = {}; - TRes call({Object? code = _undefined, Object? message = _undefined, Object? success = _undefined, Object? $__typename = _undefined}) => + TRes call( + {Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined}) => _then(Mutation$DeleteUser$deleteUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); } -class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser implements CopyWith$Mutation$DeleteUser$deleteUser { +class _CopyWithStubImpl$Mutation$DeleteUser$deleteUser + implements CopyWith$Mutation$DeleteUser$deleteUser { _CopyWithStubImpl$Mutation$DeleteUser$deleteUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename}) => _res; + call({int? code, String? message, bool? success, String? $__typename}) => + _res; } @JsonSerializable(explicitToJson: true) @@ -1515,7 +2011,8 @@ class Variables$Mutation$UpdateUser { Variables$Mutation$UpdateUser({required this.user}); @override - factory Variables$Mutation$UpdateUser.fromJson(Map json) => _$Variables$Mutation$UpdateUserFromJson(json); + factory Variables$Mutation$UpdateUser.fromJson(Map json) => + _$Variables$Mutation$UpdateUserFromJson(json); final Input$UserMutationInput user; @@ -1528,26 +2025,32 @@ class Variables$Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$UpdateUser) || + runtimeType != other.runtimeType) return false; final l$user = user; final lOther$user = other.user; if (l$user != lOther$user) return false; return true; } - CopyWith$Variables$Mutation$UpdateUser get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); + CopyWith$Variables$Mutation$UpdateUser + get copyWith => CopyWith$Variables$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Variables$Mutation$UpdateUser { - factory CopyWith$Variables$Mutation$UpdateUser(Variables$Mutation$UpdateUser instance, TRes Function(Variables$Mutation$UpdateUser) then) = + factory CopyWith$Variables$Mutation$UpdateUser( + Variables$Mutation$UpdateUser instance, + TRes Function(Variables$Mutation$UpdateUser) then) = _CopyWithImpl$Variables$Mutation$UpdateUser; - factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$UpdateUser; + factory CopyWith$Variables$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$UpdateUser; TRes call({Input$UserMutationInput? user}); } -class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithImpl$Variables$Mutation$UpdateUser(this._instance, this._then); final Variables$Mutation$UpdateUser _instance; @@ -1556,11 +2059,14 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser implements CopyWith$Vari static const _undefined = {}; - TRes call({Object? user = _undefined}) => - _then(Variables$Mutation$UpdateUser(user: user == _undefined || user == null ? _instance.user : (user as Input$UserMutationInput))); + TRes call({Object? user = _undefined}) => _then(Variables$Mutation$UpdateUser( + user: user == _undefined || user == null + ? _instance.user + : (user as Input$UserMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$UpdateUser implements CopyWith$Variables$Mutation$UpdateUser { +class _CopyWithStubImpl$Variables$Mutation$UpdateUser + implements CopyWith$Variables$Mutation$UpdateUser { _CopyWithStubImpl$Variables$Mutation$UpdateUser(this._res); TRes _res; @@ -1573,7 +2079,8 @@ class Mutation$UpdateUser { Mutation$UpdateUser({required this.updateUser, required this.$__typename}); @override - factory Mutation$UpdateUser.fromJson(Map json) => _$Mutation$UpdateUserFromJson(json); + factory Mutation$UpdateUser.fromJson(Map json) => + _$Mutation$UpdateUserFromJson(json); final Mutation$UpdateUser$updateUser updateUser; @@ -1590,7 +2097,8 @@ class Mutation$UpdateUser { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UpdateUser) || runtimeType != other.runtimeType) + return false; final l$updateUser = updateUser; final lOther$updateUser = other.updateUser; if (l$updateUser != lOther$updateUser) return false; @@ -1602,19 +2110,24 @@ class Mutation$UpdateUser { } extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { - CopyWith$Mutation$UpdateUser get copyWith => CopyWith$Mutation$UpdateUser(this, (i) => i); + CopyWith$Mutation$UpdateUser get copyWith => + CopyWith$Mutation$UpdateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser { - factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, TRes Function(Mutation$UpdateUser) then) = _CopyWithImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser(Mutation$UpdateUser instance, + TRes Function(Mutation$UpdateUser) then) = + _CopyWithImpl$Mutation$UpdateUser; - factory CopyWith$Mutation$UpdateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser; + factory CopyWith$Mutation$UpdateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser; TRes call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}); CopyWith$Mutation$UpdateUser$updateUser get updateUser; } -class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { +class _CopyWithImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { _CopyWithImpl$Mutation$UpdateUser(this._instance, this._then); final Mutation$UpdateUser _instance; @@ -1623,24 +2136,35 @@ class _CopyWithImpl$Mutation$UpdateUser implements CopyWith$Mutation$Updat static const _undefined = {}; - TRes call({Object? updateUser = _undefined, Object? $__typename = _undefined}) => _then(Mutation$UpdateUser( - updateUser: updateUser == _undefined || updateUser == null ? _instance.updateUser : (updateUser as Mutation$UpdateUser$updateUser), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? updateUser = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$UpdateUser( + updateUser: updateUser == _undefined || updateUser == null + ? _instance.updateUser + : (updateUser as Mutation$UpdateUser$updateUser), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$UpdateUser$updateUser get updateUser { final local$updateUser = _instance.updateUser; - return CopyWith$Mutation$UpdateUser$updateUser(local$updateUser, (e) => call(updateUser: e)); + return CopyWith$Mutation$UpdateUser$updateUser( + local$updateUser, (e) => call(updateUser: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser implements CopyWith$Mutation$UpdateUser { +class _CopyWithStubImpl$Mutation$UpdateUser + implements CopyWith$Mutation$UpdateUser { _CopyWithStubImpl$Mutation$UpdateUser(this._res); TRes _res; - call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => _res; + call({Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + _res; - CopyWith$Mutation$UpdateUser$updateUser get updateUser => CopyWith$Mutation$UpdateUser$updateUser.stub(_res); + CopyWith$Mutation$UpdateUser$updateUser get updateUser => + CopyWith$Mutation$UpdateUser$updateUser.stub(_res); } const documentNodeMutationUpdateUser = DocumentNode(definitions: [ @@ -1650,7 +2174,8 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'user')), - type: NamedTypeNode(name: NameNode(value: 'UserMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -1659,32 +2184,57 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'updateUser'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'user'), value: VariableNode(name: NameNode(value: 'user')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => Mutation$UpdateUser.fromJson(data); +Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => + Mutation$UpdateUser.fromJson(data); -typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function(dynamic, Mutation$UpdateUser?); +typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( + dynamic, Mutation$UpdateUser?); -class Options$Mutation$UpdateUser extends graphql.MutationOptions { +class Options$Mutation$UpdateUser + extends graphql.MutationOptions { Options$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -1705,7 +2255,10 @@ class Options$Mutation$UpdateUser extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$UpdateUser(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$UpdateUser(data)), update: update, onError: onError, document: documentNodeMutationUpdateUser, @@ -1714,11 +2267,16 @@ class Options$Mutation$UpdateUser extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$UpdateUser + extends graphql.WatchQueryOptions { WatchOptions$Mutation$UpdateUser( {String? operationName, required Variables$Mutation$UpdateUser variables, @@ -1748,17 +2306,28 @@ class WatchOptions$Mutation$UpdateUser extends graphql.WatchQueryOptions> mutate$UpdateUser(Options$Mutation$UpdateUser options) async => await this.mutate(options); + Future> mutate$UpdateUser( + Options$Mutation$UpdateUser options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$UpdateUser(WatchOptions$Mutation$UpdateUser options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$UpdateUser( + WatchOptions$Mutation$UpdateUser options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFields { - Mutation$UpdateUser$updateUser({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$UpdateUser$updateUser + implements Fragment$basicMutationReturnFields { + Mutation$UpdateUser$updateUser( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$UpdateUser$updateUser.fromJson(Map json) => _$Mutation$UpdateUser$updateUserFromJson(json); + factory Mutation$UpdateUser$updateUser.fromJson(Map json) => + _$Mutation$UpdateUser$updateUserFromJson(json); final int code; @@ -1778,13 +2347,15 @@ class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFiel final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UpdateUser$updateUser) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UpdateUser$updateUser) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -1804,21 +2375,32 @@ class Mutation$UpdateUser$updateUser implements Fragment$basicMutationReturnFiel } } -extension UtilityExtension$Mutation$UpdateUser$updateUser on Mutation$UpdateUser$updateUser { - CopyWith$Mutation$UpdateUser$updateUser get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); +extension UtilityExtension$Mutation$UpdateUser$updateUser + on Mutation$UpdateUser$updateUser { + CopyWith$Mutation$UpdateUser$updateUser + get copyWith => CopyWith$Mutation$UpdateUser$updateUser(this, (i) => i); } abstract class CopyWith$Mutation$UpdateUser$updateUser { - factory CopyWith$Mutation$UpdateUser$updateUser(Mutation$UpdateUser$updateUser instance, TRes Function(Mutation$UpdateUser$updateUser) then) = + factory CopyWith$Mutation$UpdateUser$updateUser( + Mutation$UpdateUser$updateUser instance, + TRes Function(Mutation$UpdateUser$updateUser) then) = _CopyWithImpl$Mutation$UpdateUser$updateUser; - factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = _CopyWithStubImpl$Mutation$UpdateUser$updateUser; + factory CopyWith$Mutation$UpdateUser$updateUser.stub(TRes res) = + _CopyWithStubImpl$Mutation$UpdateUser$updateUser; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithImpl$Mutation$UpdateUser$updateUser(this._instance, this._then); final Mutation$UpdateUser$updateUser _instance; @@ -1834,25 +2416,45 @@ class _CopyWithImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mut Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$UpdateUser$updateUser( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$UpdateUser$updateUser implements CopyWith$Mutation$UpdateUser$updateUser { +class _CopyWithStubImpl$Mutation$UpdateUser$updateUser + implements CopyWith$Mutation$UpdateUser$updateUser { _CopyWithStubImpl$Mutation$UpdateUser$updateUser(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -1860,7 +2462,8 @@ class Variables$Mutation$AddSshKey { Variables$Mutation$AddSshKey({required this.sshInput}); @override - factory Variables$Mutation$AddSshKey.fromJson(Map json) => _$Variables$Mutation$AddSshKeyFromJson(json); + factory Variables$Mutation$AddSshKey.fromJson(Map json) => + _$Variables$Mutation$AddSshKeyFromJson(json); final Input$SshMutationInput sshInput; @@ -1873,26 +2476,32 @@ class Variables$Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$AddSshKey) || + runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$AddSshKey get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); + CopyWith$Variables$Mutation$AddSshKey + get copyWith => CopyWith$Variables$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$AddSshKey { - factory CopyWith$Variables$Mutation$AddSshKey(Variables$Mutation$AddSshKey instance, TRes Function(Variables$Mutation$AddSshKey) then) = + factory CopyWith$Variables$Mutation$AddSshKey( + Variables$Mutation$AddSshKey instance, + TRes Function(Variables$Mutation$AddSshKey) then) = _CopyWithImpl$Variables$Mutation$AddSshKey; - factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$AddSshKey; + factory CopyWith$Variables$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$AddSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithImpl$Variables$Mutation$AddSshKey(this._instance, this._then); final Variables$Mutation$AddSshKey _instance; @@ -1901,11 +2510,15 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey implements CopyWith$Varia static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => _then( - Variables$Mutation$AddSshKey(sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$AddSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$AddSshKey implements CopyWith$Variables$Mutation$AddSshKey { +class _CopyWithStubImpl$Variables$Mutation$AddSshKey + implements CopyWith$Variables$Mutation$AddSshKey { _CopyWithStubImpl$Variables$Mutation$AddSshKey(this._res); TRes _res; @@ -1918,7 +2531,8 @@ class Mutation$AddSshKey { Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); @override - factory Mutation$AddSshKey.fromJson(Map json) => _$Mutation$AddSshKeyFromJson(json); + factory Mutation$AddSshKey.fromJson(Map json) => + _$Mutation$AddSshKeyFromJson(json); final Mutation$AddSshKey$addSshKey addSshKey; @@ -1935,7 +2549,8 @@ class Mutation$AddSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$AddSshKey) || runtimeType != other.runtimeType) + return false; final l$addSshKey = addSshKey; final lOther$addSshKey = other.addSshKey; if (l$addSshKey != lOther$addSshKey) return false; @@ -1947,19 +2562,24 @@ class Mutation$AddSshKey { } extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { - CopyWith$Mutation$AddSshKey get copyWith => CopyWith$Mutation$AddSshKey(this, (i) => i); + CopyWith$Mutation$AddSshKey get copyWith => + CopyWith$Mutation$AddSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey { - factory CopyWith$Mutation$AddSshKey(Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = _CopyWithImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey( + Mutation$AddSshKey instance, TRes Function(Mutation$AddSshKey) then) = + _CopyWithImpl$Mutation$AddSshKey; - factory CopyWith$Mutation$AddSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey; + factory CopyWith$Mutation$AddSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey; TRes call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey; } -class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { +class _CopyWithImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { _CopyWithImpl$Mutation$AddSshKey(this._instance, this._then); final Mutation$AddSshKey _instance; @@ -1968,24 +2588,33 @@ class _CopyWithImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSsh static const _undefined = {}; - TRes call({Object? addSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$AddSshKey( - addSshKey: addSshKey == _undefined || addSshKey == null ? _instance.addSshKey : (addSshKey as Mutation$AddSshKey$addSshKey), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? addSshKey = _undefined, Object? $__typename = _undefined}) => + _then(Mutation$AddSshKey( + addSshKey: addSshKey == _undefined || addSshKey == null + ? _instance.addSshKey + : (addSshKey as Mutation$AddSshKey$addSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$AddSshKey$addSshKey get addSshKey { final local$addSshKey = _instance.addSshKey; - return CopyWith$Mutation$AddSshKey$addSshKey(local$addSshKey, (e) => call(addSshKey: e)); + return CopyWith$Mutation$AddSshKey$addSshKey( + local$addSshKey, (e) => call(addSshKey: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey implements CopyWith$Mutation$AddSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey + implements CopyWith$Mutation$AddSshKey { _CopyWithStubImpl$Mutation$AddSshKey(this._res); TRes _res; call({Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => _res; - CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); + CopyWith$Mutation$AddSshKey$addSshKey get addSshKey => + CopyWith$Mutation$AddSshKey$addSshKey.stub(_res); } const documentNodeMutationAddSshKey = DocumentNode(definitions: [ @@ -1995,7 +2624,8 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2004,32 +2634,57 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'addSshKey'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => Mutation$AddSshKey.fromJson(data); +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => + Mutation$AddSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function(dynamic, Mutation$AddSshKey?); +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( + dynamic, Mutation$AddSshKey?); -class Options$Mutation$AddSshKey extends graphql.MutationOptions { +class Options$Mutation$AddSshKey + extends graphql.MutationOptions { Options$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2050,7 +2705,10 @@ class Options$Mutation$AddSshKey extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$AddSshKey(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$AddSshKey(data)), update: update, onError: onError, document: documentNodeMutationAddSshKey, @@ -2059,11 +2717,16 @@ class Options$Mutation$AddSshKey extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$AddSshKey + extends graphql.WatchQueryOptions { WatchOptions$Mutation$AddSshKey( {String? operationName, required Variables$Mutation$AddSshKey variables, @@ -2093,17 +2756,28 @@ class WatchOptions$Mutation$AddSshKey extends graphql.WatchQueryOptions> mutate$AddSshKey(Options$Mutation$AddSshKey options) async => await this.mutate(options); + Future> mutate$AddSshKey( + Options$Mutation$AddSshKey options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$AddSshKey(WatchOptions$Mutation$AddSshKey options) => this.watchMutation(options); + graphql.ObservableQuery watchMutation$AddSshKey( + WatchOptions$Mutation$AddSshKey options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields { - Mutation$AddSshKey$addSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$AddSshKey$addSshKey + implements Fragment$basicMutationReturnFields { + Mutation$AddSshKey$addSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => _$Mutation$AddSshKey$addSshKeyFromJson(json); + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => + _$Mutation$AddSshKey$addSshKeyFromJson(json); final int code; @@ -2123,13 +2797,15 @@ class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$AddSshKey$addSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$AddSshKey$addSshKey) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2149,21 +2825,32 @@ class Mutation$AddSshKey$addSshKey implements Fragment$basicMutationReturnFields } } -extension UtilityExtension$Mutation$AddSshKey$addSshKey on Mutation$AddSshKey$addSshKey { - CopyWith$Mutation$AddSshKey$addSshKey get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); +extension UtilityExtension$Mutation$AddSshKey$addSshKey + on Mutation$AddSshKey$addSshKey { + CopyWith$Mutation$AddSshKey$addSshKey + get copyWith => CopyWith$Mutation$AddSshKey$addSshKey(this, (i) => i); } abstract class CopyWith$Mutation$AddSshKey$addSshKey { - factory CopyWith$Mutation$AddSshKey$addSshKey(Mutation$AddSshKey$addSshKey instance, TRes Function(Mutation$AddSshKey$addSshKey) then) = + factory CopyWith$Mutation$AddSshKey$addSshKey( + Mutation$AddSshKey$addSshKey instance, + TRes Function(Mutation$AddSshKey$addSshKey) then) = _CopyWithImpl$Mutation$AddSshKey$addSshKey; - factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; + factory CopyWith$Mutation$AddSshKey$addSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$AddSshKey$addSshKey; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithImpl$Mutation$AddSshKey$addSshKey(this._instance, this._then); final Mutation$AddSshKey$addSshKey _instance; @@ -2179,25 +2866,45 @@ class _CopyWithImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutat Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$AddSshKey$addSshKey( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey implements CopyWith$Mutation$AddSshKey$addSshKey { +class _CopyWithStubImpl$Mutation$AddSshKey$addSshKey + implements CopyWith$Mutation$AddSshKey$addSshKey { _CopyWithStubImpl$Mutation$AddSshKey$addSshKey(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } @JsonSerializable(explicitToJson: true) @@ -2205,11 +2912,13 @@ class Variables$Mutation$RemoveSshKey { Variables$Mutation$RemoveSshKey({required this.sshInput}); @override - factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => _$Variables$Mutation$RemoveSshKeyFromJson(json); + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => + _$Variables$Mutation$RemoveSshKeyFromJson(json); final Input$SshMutationInput sshInput; - Map toJson() => _$Variables$Mutation$RemoveSshKeyToJson(this); + Map toJson() => + _$Variables$Mutation$RemoveSshKeyToJson(this); int get hashCode { final l$sshInput = sshInput; return Object.hashAll([l$sshInput]); @@ -2218,26 +2927,32 @@ class Variables$Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Variables$Mutation$RemoveSshKey) || + runtimeType != other.runtimeType) return false; final l$sshInput = sshInput; final lOther$sshInput = other.sshInput; if (l$sshInput != lOther$sshInput) return false; return true; } - CopyWith$Variables$Mutation$RemoveSshKey get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Variables$Mutation$RemoveSshKey + get copyWith => CopyWith$Variables$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Variables$Mutation$RemoveSshKey { - factory CopyWith$Variables$Mutation$RemoveSshKey(Variables$Mutation$RemoveSshKey instance, TRes Function(Variables$Mutation$RemoveSshKey) then) = + factory CopyWith$Variables$Mutation$RemoveSshKey( + Variables$Mutation$RemoveSshKey instance, + TRes Function(Variables$Mutation$RemoveSshKey) then) = _CopyWithImpl$Variables$Mutation$RemoveSshKey; - factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; + factory CopyWith$Variables$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Variables$Mutation$RemoveSshKey; TRes call({Input$SshMutationInput? sshInput}); } -class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithImpl$Variables$Mutation$RemoveSshKey(this._instance, this._then); final Variables$Mutation$RemoveSshKey _instance; @@ -2246,11 +2961,15 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Va static const _undefined = {}; - TRes call({Object? sshInput = _undefined}) => _then(Variables$Mutation$RemoveSshKey( - sshInput: sshInput == _undefined || sshInput == null ? _instance.sshInput : (sshInput as Input$SshMutationInput))); + TRes call({Object? sshInput = _undefined}) => + _then(Variables$Mutation$RemoveSshKey( + sshInput: sshInput == _undefined || sshInput == null + ? _instance.sshInput + : (sshInput as Input$SshMutationInput))); } -class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey implements CopyWith$Variables$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey + implements CopyWith$Variables$Mutation$RemoveSshKey { _CopyWithStubImpl$Variables$Mutation$RemoveSshKey(this._res); TRes _res; @@ -2260,10 +2979,12 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey implements CopyWit @JsonSerializable(explicitToJson: true) class Mutation$RemoveSshKey { - Mutation$RemoveSshKey({required this.removeSshKey, required this.$__typename}); + Mutation$RemoveSshKey( + {required this.removeSshKey, required this.$__typename}); @override - factory Mutation$RemoveSshKey.fromJson(Map json) => _$Mutation$RemoveSshKeyFromJson(json); + factory Mutation$RemoveSshKey.fromJson(Map json) => + _$Mutation$RemoveSshKeyFromJson(json); final Mutation$RemoveSshKey$removeSshKey removeSshKey; @@ -2280,7 +3001,8 @@ class Mutation$RemoveSshKey { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$RemoveSshKey) || runtimeType != other.runtimeType) + return false; final l$removeSshKey = removeSshKey; final lOther$removeSshKey = other.removeSshKey; if (l$removeSshKey != lOther$removeSshKey) return false; @@ -2292,20 +3014,25 @@ class Mutation$RemoveSshKey { } extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { - CopyWith$Mutation$RemoveSshKey get copyWith => CopyWith$Mutation$RemoveSshKey(this, (i) => i); + CopyWith$Mutation$RemoveSshKey get copyWith => + CopyWith$Mutation$RemoveSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey { - factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, TRes Function(Mutation$RemoveSshKey) then) = + factory CopyWith$Mutation$RemoveSshKey(Mutation$RemoveSshKey instance, + TRes Function(Mutation$RemoveSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey; - factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey; + factory CopyWith$Mutation$RemoveSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey; - TRes call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); + TRes call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey; } -class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { _CopyWithImpl$Mutation$RemoveSshKey(this._instance, this._then); final Mutation$RemoveSshKey _instance; @@ -2314,25 +3041,37 @@ class _CopyWithImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$Rem static const _undefined = {}; - TRes call({Object? removeSshKey = _undefined, Object? $__typename = _undefined}) => _then(Mutation$RemoveSshKey( - removeSshKey: - removeSshKey == _undefined || removeSshKey == null ? _instance.removeSshKey : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String))); + TRes call( + {Object? removeSshKey = _undefined, + Object? $__typename = _undefined}) => + _then(Mutation$RemoveSshKey( + removeSshKey: removeSshKey == _undefined || removeSshKey == null + ? _instance.removeSshKey + : (removeSshKey as Mutation$RemoveSshKey$removeSshKey), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String))); CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey { final local$removeSshKey = _instance.removeSshKey; - return CopyWith$Mutation$RemoveSshKey$removeSshKey(local$removeSshKey, (e) => call(removeSshKey: e)); + return CopyWith$Mutation$RemoveSshKey$removeSshKey( + local$removeSshKey, (e) => call(removeSshKey: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey implements CopyWith$Mutation$RemoveSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey + implements CopyWith$Mutation$RemoveSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey(this._res); TRes _res; - call({Mutation$RemoveSshKey$removeSshKey? removeSshKey, String? $__typename}) => _res; + call( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename}) => + _res; - CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); + CopyWith$Mutation$RemoveSshKey$removeSshKey get removeSshKey => + CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(_res); } const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ @@ -2342,7 +3081,8 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'sshInput')), - type: NamedTypeNode(name: NameNode(value: 'SshMutationInput'), isNonNull: true), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), defaultValue: DefaultValueNode(value: null), directives: []) ], @@ -2351,32 +3091,58 @@ const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ FieldNode( name: NameNode(value: 'removeSshKey'), alias: null, - arguments: [ArgumentNode(name: NameNode(value: 'sshInput'), value: VariableNode(name: NameNode(value: 'sshInput')))], + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'basicMutationReturnFields'), directives: []), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: 'user'), alias: null, arguments: [], directives: [], selectionSet: SelectionSetNode(selections: [ - FragmentSpreadNode(name: NameNode(value: 'userFields'), directives: []), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FragmentSpreadNode( + name: NameNode(value: 'userFields'), directives: []), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), - FieldNode(name: NameNode(value: '__typename'), alias: null, arguments: [], directives: [], selectionSet: null) + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) ])), fragmentDefinitionbasicMutationReturnFields, fragmentDefinitionuserFields, ]); -Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey(Map data) => Mutation$RemoveSshKey.fromJson(data); +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( + Map data) => + Mutation$RemoveSshKey.fromJson(data); -typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function(dynamic, Mutation$RemoveSshKey?); +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( + dynamic, Mutation$RemoveSshKey?); -class Options$Mutation$RemoveSshKey extends graphql.MutationOptions { +class Options$Mutation$RemoveSshKey + extends graphql.MutationOptions { Options$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -2397,7 +3163,13 @@ class Options$Mutation$RemoveSshKey extends graphql.MutationOptions onCompleted(data, data == null ? null : _parserFn$Mutation$RemoveSshKey(data)), + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveSshKey(data)), update: update, onError: onError, document: documentNodeMutationRemoveSshKey, @@ -2406,11 +3178,16 @@ class Options$Mutation$RemoveSshKey extends graphql.MutationOptions get properties => - [...super.onCompleted == null ? super.properties : super.properties.where((property) => property != onCompleted), onCompletedWithParsed]; + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions { +class WatchOptions$Mutation$RemoveSshKey + extends graphql.WatchQueryOptions { WatchOptions$Mutation$RemoveSshKey( {String? operationName, required Variables$Mutation$RemoveSshKey variables, @@ -2440,18 +3217,29 @@ class WatchOptions$Mutation$RemoveSshKey extends graphql.WatchQueryOptions> mutate$RemoveSshKey(Options$Mutation$RemoveSshKey options) async => await this.mutate(options); + Future> mutate$RemoveSshKey( + Options$Mutation$RemoveSshKey options) async => + await this.mutate(options); - graphql.ObservableQuery watchMutation$RemoveSshKey(WatchOptions$Mutation$RemoveSshKey options) => + graphql.ObservableQuery watchMutation$RemoveSshKey( + WatchOptions$Mutation$RemoveSshKey options) => this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturnFields { - Mutation$RemoveSshKey$removeSshKey({required this.code, required this.message, required this.success, required this.$__typename, this.user}); +class Mutation$RemoveSshKey$removeSshKey + implements Fragment$basicMutationReturnFields { + Mutation$RemoveSshKey$removeSshKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.user}); @override - factory Mutation$RemoveSshKey$removeSshKey.fromJson(Map json) => _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + factory Mutation$RemoveSshKey$removeSshKey.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); final int code; @@ -2464,20 +3252,23 @@ class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturn final Fragment$userFields? user; - Map toJson() => _$Mutation$RemoveSshKey$removeSshKeyToJson(this); + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKeyToJson(this); int get hashCode { final l$code = code; final l$message = message; final l$success = success; final l$$__typename = $__typename; final l$user = user; - return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$user]); + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$user]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$RemoveSshKey$removeSshKey) || runtimeType != other.runtimeType) return false; + if (!(other is Mutation$RemoveSshKey$removeSshKey) || + runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; if (l$code != lOther$code) return false; @@ -2497,23 +3288,34 @@ class Mutation$RemoveSshKey$removeSshKey implements Fragment$basicMutationReturn } } -extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey on Mutation$RemoveSshKey$removeSshKey { - CopyWith$Mutation$RemoveSshKey$removeSshKey get copyWith => - CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey + on Mutation$RemoveSshKey$removeSshKey { + CopyWith$Mutation$RemoveSshKey$removeSshKey< + Mutation$RemoveSshKey$removeSshKey> + get copyWith => + CopyWith$Mutation$RemoveSshKey$removeSshKey(this, (i) => i); } abstract class CopyWith$Mutation$RemoveSshKey$removeSshKey { factory CopyWith$Mutation$RemoveSshKey$removeSshKey( - Mutation$RemoveSshKey$removeSshKey instance, TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = + Mutation$RemoveSshKey$removeSshKey instance, + TRes Function(Mutation$RemoveSshKey$removeSshKey) then) = _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey; - factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; + factory CopyWith$Mutation$RemoveSshKey$removeSshKey.stub(TRes res) = + _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey; - TRes call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}); + TRes call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}); CopyWith$Fragment$userFields get user; } -class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey(this._instance, this._then); final Mutation$RemoveSshKey$removeSshKey _instance; @@ -2529,23 +3331,43 @@ class _CopyWithImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith Object? $__typename = _undefined, Object? user = _undefined}) => _then(Mutation$RemoveSshKey$removeSshKey( - code: code == _undefined || code == null ? _instance.code : (code as int), - message: message == _undefined || message == null ? _instance.message : (message as String), - success: success == _undefined || success == null ? _instance.success : (success as bool), - $__typename: $__typename == _undefined || $__typename == null ? _instance.$__typename : ($__typename as String), - user: user == _undefined ? _instance.user : (user as Fragment$userFields?))); + code: code == _undefined || code == null + ? _instance.code + : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + user: user == _undefined + ? _instance.user + : (user as Fragment$userFields?))); CopyWith$Fragment$userFields get user { final local$user = _instance.user; - return local$user == null ? CopyWith$Fragment$userFields.stub(_then(_instance)) : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); + return local$user == null + ? CopyWith$Fragment$userFields.stub(_then(_instance)) + : CopyWith$Fragment$userFields(local$user, (e) => call(user: e)); } } -class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey implements CopyWith$Mutation$RemoveSshKey$removeSshKey { +class _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey + implements CopyWith$Mutation$RemoveSshKey$removeSshKey { _CopyWithStubImpl$Mutation$RemoveSshKey$removeSshKey(this._res); TRes _res; - call({int? code, String? message, bool? success, String? $__typename, Fragment$userFields? user}) => _res; + call( + {int? code, + String? message, + bool? success, + String? $__typename, + Fragment$userFields? user}) => + _res; - CopyWith$Fragment$userFields get user => CopyWith$Fragment$userFields.stub(_res); + CopyWith$Fragment$userFields get user => + CopyWith$Fragment$userFields.stub(_res); } diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart index a9dfff53..7fb93e4e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -6,28 +6,37 @@ part of 'users.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson(Map json) => Fragment$basicMutationReturnFields( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( + Map json) => + Fragment$basicMutationReturnFields( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Fragment$basicMutationReturnFieldsToJson(Fragment$basicMutationReturnFields instance) => { +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => Fragment$userFields( +Fragment$userFields _$Fragment$userFieldsFromJson(Map json) => + Fragment$userFields( username: json['username'] as String, - userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], unknownValue: Enum$UserType.$unknown), - sshKeys: (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), $__typename: json['__typename'] as String, ); -Map _$Fragment$userFieldsToJson(Fragment$userFields instance) => { +Map _$Fragment$userFieldsToJson( + Fragment$userFields instance) => + { 'username': instance.username, 'userType': _$Enum$UserTypeEnumMap[instance.userType]!, 'sshKeys': instance.sshKeys, @@ -41,83 +50,123 @@ const _$Enum$UserTypeEnumMap = { Enum$UserType.$unknown: r'$unknown', }; -Query$AllUsers _$Query$AllUsersFromJson(Map json) => Query$AllUsers( - users: Query$AllUsers$users.fromJson(json['users'] as Map), +Query$AllUsers _$Query$AllUsersFromJson(Map json) => + Query$AllUsers( + users: + Query$AllUsers$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsersToJson(Query$AllUsers instance) => { +Map _$Query$AllUsersToJson(Query$AllUsers instance) => + { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$AllUsers$users _$Query$AllUsers$usersFromJson(Map json) => Query$AllUsers$users( - allUsers: (json['allUsers'] as List).map((e) => Fragment$userFields.fromJson(e as Map)).toList(), - rootUser: json['rootUser'] == null ? null : Fragment$userFields.fromJson(json['rootUser'] as Map), +Query$AllUsers$users _$Query$AllUsers$usersFromJson( + Map json) => + Query$AllUsers$users( + allUsers: (json['allUsers'] as List) + .map((e) => Fragment$userFields.fromJson(e as Map)) + .toList(), + rootUser: json['rootUser'] == null + ? null + : Fragment$userFields.fromJson( + json['rootUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$AllUsers$usersToJson(Query$AllUsers$users instance) => { +Map _$Query$AllUsers$usersToJson( + Query$AllUsers$users instance) => + { 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), 'rootUser': instance.rootUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Query$GetUser _$Variables$Query$GetUserFromJson(Map json) => Variables$Query$GetUser( +Variables$Query$GetUser _$Variables$Query$GetUserFromJson( + Map json) => + Variables$Query$GetUser( username: json['username'] as String, ); -Map _$Variables$Query$GetUserToJson(Variables$Query$GetUser instance) => { +Map _$Variables$Query$GetUserToJson( + Variables$Query$GetUser instance) => + { 'username': instance.username, }; -Query$GetUser _$Query$GetUserFromJson(Map json) => Query$GetUser( - users: Query$GetUser$users.fromJson(json['users'] as Map), +Query$GetUser _$Query$GetUserFromJson(Map json) => + Query$GetUser( + users: + Query$GetUser$users.fromJson(json['users'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUserToJson(Query$GetUser instance) => { +Map _$Query$GetUserToJson(Query$GetUser instance) => + { 'users': instance.users.toJson(), '__typename': instance.$__typename, }; -Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => Query$GetUser$users( - getUser: json['getUser'] == null ? null : Fragment$userFields.fromJson(json['getUser'] as Map), +Query$GetUser$users _$Query$GetUser$usersFromJson(Map json) => + Query$GetUser$users( + getUser: json['getUser'] == null + ? null + : Fragment$userFields.fromJson( + json['getUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetUser$usersToJson(Query$GetUser$users instance) => { +Map _$Query$GetUser$usersToJson( + Query$GetUser$users instance) => + { 'getUser': instance.getUser?.toJson(), '__typename': instance.$__typename, }; -Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson(Map json) => Variables$Mutation$CreateUser( - user: Input$UserMutationInput.fromJson(json['user'] as Map), +Variables$Mutation$CreateUser _$Variables$Mutation$CreateUserFromJson( + Map json) => + Variables$Mutation$CreateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), ); -Map _$Variables$Mutation$CreateUserToJson(Variables$Mutation$CreateUser instance) => { +Map _$Variables$Mutation$CreateUserToJson( + Variables$Mutation$CreateUser instance) => + { 'user': instance.user.toJson(), }; -Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => Mutation$CreateUser( - createUser: Mutation$CreateUser$createUser.fromJson(json['createUser'] as Map), +Mutation$CreateUser _$Mutation$CreateUserFromJson(Map json) => + Mutation$CreateUser( + createUser: Mutation$CreateUser$createUser.fromJson( + json['createUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$CreateUserToJson(Mutation$CreateUser instance) => { +Map _$Mutation$CreateUserToJson( + Mutation$CreateUser instance) => + { 'createUser': instance.createUser.toJson(), '__typename': instance.$__typename, }; -Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson(Map json) => Mutation$CreateUser$createUser( +Mutation$CreateUser$createUser _$Mutation$CreateUser$createUserFromJson( + Map json) => + Mutation$CreateUser$createUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$CreateUser$createUserToJson(Mutation$CreateUser$createUser instance) => { +Map _$Mutation$CreateUser$createUserToJson( + Mutation$CreateUser$createUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -125,65 +174,92 @@ Map _$Mutation$CreateUser$createUserToJson(Mutation$CreateUser$ 'user': instance.user?.toJson(), }; -Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson(Map json) => Variables$Mutation$DeleteUser( +Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( + Map json) => + Variables$Mutation$DeleteUser( username: json['username'] as String, ); -Map _$Variables$Mutation$DeleteUserToJson(Variables$Mutation$DeleteUser instance) => { +Map _$Variables$Mutation$DeleteUserToJson( + Variables$Mutation$DeleteUser instance) => + { 'username': instance.username, }; -Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => Mutation$DeleteUser( - deleteUser: Mutation$DeleteUser$deleteUser.fromJson(json['deleteUser'] as Map), +Mutation$DeleteUser _$Mutation$DeleteUserFromJson(Map json) => + Mutation$DeleteUser( + deleteUser: Mutation$DeleteUser$deleteUser.fromJson( + json['deleteUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUserToJson(Mutation$DeleteUser instance) => { +Map _$Mutation$DeleteUserToJson( + Mutation$DeleteUser instance) => + { 'deleteUser': instance.deleteUser.toJson(), '__typename': instance.$__typename, }; -Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson(Map json) => Mutation$DeleteUser$deleteUser( +Mutation$DeleteUser$deleteUser _$Mutation$DeleteUser$deleteUserFromJson( + Map json) => + Mutation$DeleteUser$deleteUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Mutation$DeleteUser$deleteUserToJson(Mutation$DeleteUser$deleteUser instance) => { +Map _$Mutation$DeleteUser$deleteUserToJson( + Mutation$DeleteUser$deleteUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; -Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson(Map json) => Variables$Mutation$UpdateUser( - user: Input$UserMutationInput.fromJson(json['user'] as Map), +Variables$Mutation$UpdateUser _$Variables$Mutation$UpdateUserFromJson( + Map json) => + Variables$Mutation$UpdateUser( + user: Input$UserMutationInput.fromJson( + json['user'] as Map), ); -Map _$Variables$Mutation$UpdateUserToJson(Variables$Mutation$UpdateUser instance) => { +Map _$Variables$Mutation$UpdateUserToJson( + Variables$Mutation$UpdateUser instance) => + { 'user': instance.user.toJson(), }; -Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => Mutation$UpdateUser( - updateUser: Mutation$UpdateUser$updateUser.fromJson(json['updateUser'] as Map), +Mutation$UpdateUser _$Mutation$UpdateUserFromJson(Map json) => + Mutation$UpdateUser( + updateUser: Mutation$UpdateUser$updateUser.fromJson( + json['updateUser'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$UpdateUserToJson(Mutation$UpdateUser instance) => { +Map _$Mutation$UpdateUserToJson( + Mutation$UpdateUser instance) => + { 'updateUser': instance.updateUser.toJson(), '__typename': instance.$__typename, }; -Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson(Map json) => Mutation$UpdateUser$updateUser( +Mutation$UpdateUser$updateUser _$Mutation$UpdateUser$updateUserFromJson( + Map json) => + Mutation$UpdateUser$updateUser( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$UpdateUser$updateUserToJson(Mutation$UpdateUser$updateUser instance) => { +Map _$Mutation$UpdateUser$updateUserToJson( + Mutation$UpdateUser$updateUser instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -191,33 +267,47 @@ Map _$Mutation$UpdateUser$updateUserToJson(Mutation$UpdateUser$ 'user': instance.user?.toJson(), }; -Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson(Map json) => Variables$Mutation$AddSshKey( - sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), +Variables$Mutation$AddSshKey _$Variables$Mutation$AddSshKeyFromJson( + Map json) => + Variables$Mutation$AddSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), ); -Map _$Variables$Mutation$AddSshKeyToJson(Variables$Mutation$AddSshKey instance) => { +Map _$Variables$Mutation$AddSshKeyToJson( + Variables$Mutation$AddSshKey instance) => + { 'sshInput': instance.sshInput.toJson(), }; -Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => Mutation$AddSshKey( - addSshKey: Mutation$AddSshKey$addSshKey.fromJson(json['addSshKey'] as Map), +Mutation$AddSshKey _$Mutation$AddSshKeyFromJson(Map json) => + Mutation$AddSshKey( + addSshKey: Mutation$AddSshKey$addSshKey.fromJson( + json['addSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => { +Map _$Mutation$AddSshKeyToJson(Mutation$AddSshKey instance) => + { 'addSshKey': instance.addSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson(Map json) => Mutation$AddSshKey$addSshKey( +Mutation$AddSshKey$addSshKey _$Mutation$AddSshKey$addSshKeyFromJson( + Map json) => + Mutation$AddSshKey$addSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$AddSshKey$addSshKeyToJson(Mutation$AddSshKey$addSshKey instance) => { +Map _$Mutation$AddSshKey$addSshKeyToJson( + Mutation$AddSshKey$addSshKey instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, @@ -225,33 +315,49 @@ Map _$Mutation$AddSshKey$addSshKeyToJson(Mutation$AddSshKey$add 'user': instance.user?.toJson(), }; -Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson(Map json) => Variables$Mutation$RemoveSshKey( - sshInput: Input$SshMutationInput.fromJson(json['sshInput'] as Map), +Variables$Mutation$RemoveSshKey _$Variables$Mutation$RemoveSshKeyFromJson( + Map json) => + Variables$Mutation$RemoveSshKey( + sshInput: Input$SshMutationInput.fromJson( + json['sshInput'] as Map), ); -Map _$Variables$Mutation$RemoveSshKeyToJson(Variables$Mutation$RemoveSshKey instance) => { +Map _$Variables$Mutation$RemoveSshKeyToJson( + Variables$Mutation$RemoveSshKey instance) => + { 'sshInput': instance.sshInput.toJson(), }; -Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson(Map json) => Mutation$RemoveSshKey( - removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson(json['removeSshKey'] as Map), +Mutation$RemoveSshKey _$Mutation$RemoveSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey( + removeSshKey: Mutation$RemoveSshKey$removeSshKey.fromJson( + json['removeSshKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$RemoveSshKeyToJson(Mutation$RemoveSshKey instance) => { +Map _$Mutation$RemoveSshKeyToJson( + Mutation$RemoveSshKey instance) => + { 'removeSshKey': instance.removeSshKey.toJson(), '__typename': instance.$__typename, }; -Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson(Map json) => Mutation$RemoveSshKey$removeSshKey( +Mutation$RemoveSshKey$removeSshKey _$Mutation$RemoveSshKey$removeSshKeyFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, - user: json['user'] == null ? null : Fragment$userFields.fromJson(json['user'] as Map), + user: json['user'] == null + ? null + : Fragment$userFields.fromJson(json['user'] as Map), ); -Map _$Mutation$RemoveSshKey$removeSshKeyToJson(Mutation$RemoveSshKey$removeSshKey instance) => { +Map _$Mutation$RemoveSshKey$removeSshKeyToJson( + Mutation$RemoveSshKey$removeSshKey instance) => + { 'code': instance.code, 'message': instance.message, 'success': instance.success, diff --git a/lib/logic/api_maps/graphql_maps/server_api/server.dart b/lib/logic/api_maps/graphql_maps/server_api/server.dart index 77241653..b8739f04 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/server.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/server.dart @@ -1,10 +1,10 @@ import 'package:graphql/client.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/api_map.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; -import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/schema.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_api.graphql.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/services.graphql.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/users.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; @@ -14,11 +14,11 @@ import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -part 'volume_api.dart'; part 'jobs_api.dart'; part 'server_actions_api.dart'; part 'services_api.dart'; part 'users_api.dart'; +part 'volume_api.dart'; class GenericMutationResult { GenericMutationResult({ @@ -42,7 +42,7 @@ class GenericJobMutationReturn extends GenericMutationResult { } class ServerApi extends ApiMap - with VolumeApi, JobsApi, ServerActionsApi, ServicesApi { + with VolumeApi, JobsApi, ServerActionsApi, ServicesApi, UsersApi { ServerApi({ this.hasLogger = false, this.isWithToken = true, diff --git a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart index d224f08f..359967b7 100644 --- a/lib/logic/api_maps/graphql_maps/server_api/users_api.dart +++ b/lib/logic/api_maps/graphql_maps/server_api/users_api.dart @@ -7,6 +7,7 @@ class UserMutationResult extends GenericMutationResult { final super.message, this.user, }); + final User? user; } @@ -20,13 +21,17 @@ mixin UsersApi on ApiMap { if (response.hasException) { print(response.exception.toString()); } - users = response.parsedData?.users.allUsers.map((final user) => User.fromGraphQL(user)).toList() ?? []; + users = response.parsedData?.users.allUsers + .map((final user) => User.fromGraphQL(user)) + .toList() ?? + []; final rootUser = response.parsedData?.users.rootUser; if (rootUser != null) { users.add(User.fromGraphQL(rootUser)); } } catch (e) { print(e); + print("Could not"); } return users; } @@ -37,7 +42,8 @@ mixin UsersApi on ApiMap { try { final GraphQLClient client = await getClient(); final variables = Variables$Query$GetUser(username: login); - response = await client.query$GetUser(Options$Query$GetUser(variables: variables)); + response = await client + .query$GetUser(Options$Query$GetUser(variables: variables)); if (response.hasException) { print(response.exception.toString()); } @@ -66,7 +72,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.createUser.success ?? false, code: response.parsedData?.createUser.code ?? 500, message: response.parsedData?.createUser.message, - user: response.parsedData?.createUser.user != null ? User.fromGraphQL(response.parsedData!.createUser.user!) : null, + user: response.parsedData?.createUser.user != null + ? User.fromGraphQL(response.parsedData!.createUser.user!) + : null, ); } catch (e) { print(e); @@ -116,7 +124,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.updateUser.success ?? false, code: response.parsedData?.updateUser.code ?? 500, message: response.parsedData?.updateUser.message, - user: response.parsedData?.updateUser.user != null ? User.fromGraphQL(response.parsedData!.updateUser.user!) : null, + user: response.parsedData?.updateUser.user != null + ? User.fromGraphQL(response.parsedData!.updateUser.user!) + : null, ); } catch (e) { print(e); @@ -146,7 +156,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.addSshKey.success ?? false, code: response.parsedData?.addSshKey.code ?? 500, message: response.parsedData?.addSshKey.message, - user: response.parsedData?.addSshKey.user != null ? User.fromGraphQL(response.parsedData!.addSshKey.user!) : null, + user: response.parsedData?.addSshKey.user != null + ? User.fromGraphQL(response.parsedData!.addSshKey.user!) + : null, ); } catch (e) { print(e); @@ -176,7 +188,9 @@ mixin UsersApi on ApiMap { success: response.parsedData?.removeSshKey.success ?? false, code: response.parsedData?.removeSshKey.code ?? 500, message: response.parsedData?.removeSshKey.message, - user: response.parsedData?.removeSshKey.user != null ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) : null, + user: response.parsedData?.removeSshKey.user != null + ? User.fromGraphQL(response.parsedData!.removeSshKey.user!) + : null, ); } catch (e) { print(e); diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index 5c94d990..edffda09 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -70,7 +70,9 @@ class ServerApi extends ApiMap { baseUrl: 'https://api.$overrideDomain', connectTimeout: 10000, receiveTimeout: 10000, - headers: customToken != null ? {'Authorization': 'Bearer $customToken'} : null, + headers: customToken != null + ? {'Authorization': 'Bearer $customToken'} + : null, ); } @@ -141,7 +143,8 @@ class ServerApi extends ApiMap { bool isFoundOnServer = false; int code = 0; - final bool isUserCreated = (response.statusCode != null) && (response.statusCode == HttpStatus.created); + final bool isUserCreated = (response.statusCode != null) && + (response.statusCode == HttpStatus.created); if (isUserCreated) { isFoundOnServer = true; @@ -271,7 +274,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/ssh/keys/${user.login}'); - res = (response.data as List).map((final e) => e as String).toList(); + res = (response.data as List) + .map((final e) => e as String) + .toList(); } on DioError catch (e) { print(e.message); return ApiResponse>( @@ -330,7 +335,9 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, data: null, - errorMessage: response.data?.containsKey('error') ?? false ? response.data['error'] : null, + errorMessage: response.data?.containsKey('error') ?? false + ? response.data['error'] + : null, ); } @@ -341,7 +348,8 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.delete('/users/${user.login}'); - res = response.statusCode == HttpStatus.ok || response.statusCode == HttpStatus.notFound; + res = response.statusCode == HttpStatus.ok || + response.statusCode == HttpStatus.notFound; } on DioError catch (e) { print(e.message); res = false; @@ -352,7 +360,8 @@ class ServerApi extends ApiMap { } @override - String get rootAddress => throw UnimplementedError('not used in with implementation'); + String get rootAddress => + throw UnimplementedError('not used in with implementation'); Future apply() async { bool res = false; @@ -445,7 +454,8 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/services/restic/backup/list'); - backups = response.data.map((final e) => Backup.fromJson(e)).toList(); + backups = + response.data.map((final e) => Backup.fromJson(e)).toList(); } on DioError catch (e) { print(e.message); } catch (e) { @@ -508,7 +518,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/pull'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -524,7 +536,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/reboot'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -540,7 +554,9 @@ class ServerApi extends ApiMap { final Dio client = await getClient(); try { response = await client.get('/system/configuration/upgrade'); - result = (response.statusCode != null) ? (response.statusCode == HttpStatus.ok) : false; + result = (response.statusCode != null) + ? (response.statusCode == HttpStatus.ok) + : false; } on DioError catch (e) { print(e.message); } finally { @@ -589,7 +605,8 @@ class ServerApi extends ApiMap { Future getServerTimezone() async { // I am not sure how to initialize TimeZoneSettings with default value... final Dio client = await getClient(); - final Response response = await client.get('/system/configuration/timezone'); + final Response response = + await client.get('/system/configuration/timezone'); close(client); return TimeZoneSettings.fromString(response.data); @@ -616,7 +633,11 @@ class ServerApi extends ApiMap { try { response = await client.get('/services/mailserver/dkim'); final Codec base64toString = utf8.fuse(base64); - dkim = base64toString.decode(response.data).split('(')[1].split(')')[0].replaceAll('"', ''); + dkim = base64toString + .decode(response.data) + .split('(')[1] + .split(')')[0] + .replaceAll('"', ''); } on DioError catch (e) { print(e.message); } finally { @@ -647,7 +668,9 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: response.data != null ? RecoveryKeyStatus.fromJson(response.data) : null, + data: response.data != null + ? RecoveryKeyStatus.fromJson(response.data) + : null, ); } @@ -817,7 +840,11 @@ class ServerApi extends ApiMap { return ApiResponse( statusCode: code, - data: (response.data != null) ? response.data.map((final e) => ApiToken.fromJson(e)).toList() : [], + data: (response.data != null) + ? response.data + .map((final e) => ApiToken.fromJson(e)) + .toList() + : [], ); } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 91c09714..0df91227 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -40,10 +40,12 @@ class ServerAuthorizationException implements Exception { class ServerInstallationRepository { Box box = Hive.box(BNames.serverInstallationBox); Box usersBox = Hive.box(BNames.usersBox); - ServerProviderApiFactory? serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + ServerProviderApiFactory? serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( ServerProvider.hetzner, // TODO: HARDCODE FOR NOW!!! ); // TODO: Remove when provider selection is implemented. - DnsProviderApiFactory? dnsProviderApiFactory = ApiFactoryCreator.createDnsProviderApiFactory( + DnsProviderApiFactory? dnsProviderApiFactory = + ApiFactoryCreator.createDnsProviderApiFactory( DnsProvider.cloudflare, // TODO: HARDCODE FOR NOW!!! ); @@ -51,11 +53,15 @@ class ServerInstallationRepository { final String? providerApiToken = getIt().hetznerKey; final String? cloudflareToken = getIt().cloudFlareKey; final ServerDomain? serverDomain = getIt().serverDomain; - final BackblazeCredential? backblazeCredential = getIt().backblazeCredential; - final ServerHostingDetails? serverDetails = getIt().serverDetails; + final BackblazeCredential? backblazeCredential = + getIt().backblazeCredential; + final ServerHostingDetails? serverDetails = + getIt().serverDetails; - if (serverDetails != null && serverDetails.provider != ServerProvider.unknown) { - serverProviderApiFactory = ApiFactoryCreator.createServerProviderApiFactory( + if (serverDetails != null && + serverDetails.provider != ServerProvider.unknown) { + serverProviderApiFactory = + ApiFactoryCreator.createServerProviderApiFactory( serverDetails.provider, ); } @@ -75,12 +81,15 @@ class ServerInstallationRepository { serverDetails: serverDetails!, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), ); } - if (box.get(BNames.isRecoveringServer, defaultValue: false) && serverDomain != null) { + if (box.get(BNames.isRecoveringServer, defaultValue: false) && + serverDomain != null) { return ServerInstallationRecovery( providerApiToken: providerApiToken, cloudFlareKey: cloudflareToken, @@ -106,8 +115,10 @@ class ServerInstallationRepository { serverDetails: serverDetails, rootUser: box.get(BNames.rootUser), isServerStarted: box.get(BNames.isServerStarted, defaultValue: false), - isServerResetedFirstTime: box.get(BNames.isServerResetedFirstTime, defaultValue: false), - isServerResetedSecondTime: box.get(BNames.isServerResetedSecondTime, defaultValue: false), + isServerResetedFirstTime: + box.get(BNames.isServerResetedFirstTime, defaultValue: false), + isServerResetedSecondTime: + box.get(BNames.isServerResetedSecondTime, defaultValue: false), isLoading: box.get(BNames.isLoading, defaultValue: false), dnsMatches: null, ); @@ -171,7 +182,13 @@ class ServerInstallationRepository { final String? ip4, final Map skippedMatches, ) async { - final List addresses = ['$domainName', 'api.$domainName', 'cloud.$domainName', 'meet.$domainName', 'password.$domainName']; + final List addresses = [ + '$domainName', + 'api.$domainName', + 'cloud.$domainName', + 'meet.$domainName', + 'password.$domainName' + ]; final Map matches = {}; @@ -187,15 +204,19 @@ class ServerInstallationRepository { ); getIt.get().addMessage( Message( - text: 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', + text: + 'DnsLookup: address: $address, $RRecordType, provider: CLOUDFLARE, ip4: $ip4', ), ); getIt.get().addMessage( Message( - text: 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', + text: + 'DnsLookup: ${lookupRecordRes == null ? 'empty' : (lookupRecordRes[0].data != ip4 ? 'wrong ip4' : 'right ip4')}', ), ); - if (lookupRecordRes == null || lookupRecordRes.isEmpty || lookupRecordRes[0].data != ip4) { + if (lookupRecordRes == null || + lookupRecordRes.isEmpty || + lookupRecordRes[0].data != ip4) { matches[address] = false; } else { matches[address] = true; @@ -211,7 +232,8 @@ class ServerInstallationRepository { final String cloudFlareKey, final BackblazeCredential backblazeCredential, { required final void Function() onCancel, - required final Future Function(ServerHostingDetails serverDetails) onSuccess, + required final Future Function(ServerHostingDetails serverDetails) + onSuccess, }) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); try { @@ -315,8 +337,10 @@ class ServerInstallationRepository { final ServerDomain domain, { required final void Function() onCancel, }) async { - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); - final ServerProviderApi serverApi = serverProviderApiFactory!.getServerProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); + final ServerProviderApi serverApi = + serverProviderApiFactory!.getServerProvider(); await dnsProviderApi.removeSimilarRecords( ip4: serverDetails.ip4, @@ -332,7 +356,9 @@ class ServerInstallationRepository { final NavigationService nav = getIt.get(); nav.showPopUpDialog( BrandAlert( - title: e.response!.data['errors'][0]['code'] == 1038 ? 'modals.10'.tr() : 'providers.domain.states.error'.tr(), + title: e.response!.data['errors'][0]['code'] == 1038 + ? 'modals.10'.tr() + : 'providers.domain.states.error'.tr(), contentText: 'modals.6'.tr(), actions: [ ActionButton( @@ -365,7 +391,8 @@ class ServerInstallationRepository { } Future createDkimRecord(final ServerDomain cloudFlareDomain) async { - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); final ServerApi api = ServerApi(); String dkimRecordString = ''; @@ -432,25 +459,31 @@ class ServerInstallationRepository { final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); if (kIsWeb) { return deviceInfo.webBrowserInfo.then( - (final WebBrowserInfo value) => '${value.browserName} ${value.platform}', + (final WebBrowserInfo value) => + '${value.browserName} ${value.platform}', ); } else { if (Platform.isAndroid) { return deviceInfo.androidInfo.then( - (final AndroidDeviceInfo value) => '${value.model} ${value.version.release}', + (final AndroidDeviceInfo value) => + '${value.model} ${value.version.release}', ); } else if (Platform.isIOS) { return deviceInfo.iosInfo.then( - (final IosDeviceInfo value) => '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', + (final IosDeviceInfo value) => + '${value.utsname.machine} ${value.systemName} ${value.systemVersion}', ); } else if (Platform.isLinux) { - return deviceInfo.linuxInfo.then((final LinuxDeviceInfo value) => value.prettyName); + return deviceInfo.linuxInfo + .then((final LinuxDeviceInfo value) => value.prettyName); } else if (Platform.isMacOS) { return deviceInfo.macOsInfo.then( - (final MacOsDeviceInfo value) => '${value.hostName} ${value.computerName}', + (final MacOsDeviceInfo value) => + '${value.hostName} ${value.computerName}', ); } else if (Platform.isWindows) { - return deviceInfo.windowsInfo.then((final WindowsDeviceInfo value) => value.computerName); + return deviceInfo.windowsInfo + .then((final WindowsDeviceInfo value) => value.computerName); } } return 'Unidentified'; @@ -542,7 +575,8 @@ class ServerInstallationRepository { ); final String serverIp = await getServerIpFromDomain(serverDomain); if (recoveryCapabilities == ServerRecoveryCapabilities.legacy) { - final Map apiResponse = await serverApi.servicesPowerCheck(); + final Map apiResponse = + await serverApi.servicesPowerCheck(); if (apiResponse.isNotEmpty) { return ServerHostingDetails( apiToken: apiToken, @@ -565,7 +599,8 @@ class ServerInstallationRepository { ); } } - final ApiResponse deviceAuthKey = await serverApi.createDeviceToken(); + final ApiResponse deviceAuthKey = + await serverApi.createDeviceToken(); final ApiResponse apiResponse = await serverApi.authorizeDevice( DeviceToken(device: await getDeviceName(), token: deviceAuthKey.data), ); @@ -604,7 +639,8 @@ class ServerInstallationRepository { ); final String? serverApiVersion = await serverApi.getApiVersion(); - final ApiResponse> users = await serverApi.getUsersList(withMainUser: true); + final ApiResponse> users = + await serverApi.getUsersList(withMainUser: true); if (serverApiVersion == null || !users.isSuccess) { return fallbackUser; } @@ -704,7 +740,8 @@ class ServerInstallationRepository { Future deleteServer(final ServerDomain serverDomain) async { final ServerProviderApi api = serverProviderApiFactory!.getServerProvider(); - final DnsProviderApi dnsProviderApi = dnsProviderApiFactory!.getDnsProvider(); + final DnsProviderApi dnsProviderApi = + dnsProviderApiFactory!.getDnsProvider(); await api.deleteServer( domainName: serverDomain.domainName, diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart index 353786c2..752347c2 100644 --- a/lib/logic/cubit/services/services_state.dart +++ b/lib/logic/cubit/services/services_state.dart @@ -8,14 +8,30 @@ class ServicesState extends ServerInstallationDependendState { const ServicesState.empty() : this(services: const []); final List services; - bool get isPasswordManagerEnable => services.firstWhere((final service) => service.id == 'bitwarden', orElse: () => Service.empty).isEnabled; - bool get isCloudEnable => services.firstWhere((final service) => service.id == 'nextcloud', orElse: () => Service.empty).isEnabled; - bool get isGitEnable => services.firstWhere((final service) => service.id == 'gitea', orElse: () => Service.empty).isEnabled; - bool get isSocialNetworkEnable => services.firstWhere((final service) => service.id == 'pleroma', orElse: () => Service.empty).isEnabled; - bool get isVpnEnable => services.firstWhere((final service) => service.id == 'ocserv', orElse: () => Service.empty).isEnabled; + bool get isPasswordManagerEnable => services + .firstWhere((final service) => service.id == 'bitwarden', + orElse: () => Service.empty) + .isEnabled; + bool get isCloudEnable => services + .firstWhere((final service) => service.id == 'nextcloud', + orElse: () => Service.empty) + .isEnabled; + bool get isGitEnable => services + .firstWhere((final service) => service.id == 'gitea', + orElse: () => Service.empty) + .isEnabled; + bool get isSocialNetworkEnable => services + .firstWhere((final service) => service.id == 'pleroma', + orElse: () => Service.empty) + .isEnabled; + bool get isVpnEnable => services + .firstWhere((final service) => service.id == 'ocserv', + orElse: () => Service.empty) + .isEnabled; Service? getServiceById(final String id) { - final service = services.firstWhere((final service) => service.id == id, orElse: () => Service.empty); + final service = services.firstWhere((final service) => service.id == id, + orElse: () => Service.empty); if (service.id == 'empty') { return null; } diff --git a/lib/logic/cubit/users/users_cubit.dart b/lib/logic/cubit/users/users_cubit.dart index 442b2ed8..c9f8e804 100644 --- a/lib/logic/cubit/users/users_cubit.dart +++ b/lib/logic/cubit/users/users_cubit.dart @@ -55,25 +55,30 @@ class UsersCubit extends ServerInstallationDependendCubit { box.clear(); box.addAll(usersFromServer); } else { - getIt().showSnackBar('users.could_not_fetch_users'.tr()); + getIt() + .showSnackBar('users.could_not_fetch_users'.tr()); } } Future createUser(final User user) async { // If user exists on server, do nothing - if (state.users.any((final User u) => u.login == user.login && u.isFoundOnServer)) { + if (state.users + .any((final User u) => u.login == user.login && u.isFoundOnServer)) { return; } final String? password = user.password; if (password == null) { - getIt().showSnackBar('users.could_not_create_user'.tr()); + getIt() + .showSnackBar('users.could_not_create_user'.tr()); return; } // If API returned error, do nothing - final UserMutationResult result = await api.createUser(user.login, password); + final UserMutationResult result = + await api.createUser(user.login, password); final User? createdUser = result.user; if (!result.success || createdUser == null) { - getIt().showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_create_user'.tr()); return; } @@ -87,7 +92,8 @@ class UsersCubit extends ServerInstallationDependendCubit { Future deleteUser(final User user) async { // If user is primary or root, don't delete if (user.type != UserType.normal) { - getIt().showSnackBar('users.could_not_delete_user'.tr()); + getIt() + .showSnackBar('users.could_not_delete_user'.tr()); return; } final List loadedUsers = List.from(state.users); @@ -98,23 +104,29 @@ class UsersCubit extends ServerInstallationDependendCubit { await box.addAll(loadedUsers); emit(state.copyWith(users: loadedUsers)); } else { - getIt().showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_delete_user'.tr()); } } - Future changeUserPassword(final User user, final String newPassword) async { + Future changeUserPassword( + final User user, final String newPassword) async { if (user.type == UserType.root) { - getIt().showSnackBar('users.could_not_change_password'.tr()); + getIt() + .showSnackBar('users.could_not_change_password'.tr()); return; } - final UserMutationResult result = await api.updateUser(user.login, newPassword); + final UserMutationResult result = + await api.updateUser(user.login, newPassword); if (!result.success) { - getIt().showSnackBar(result.message ?? 'users.could_not_change_password'.tr()); + getIt().showSnackBar( + result.message ?? 'users.could_not_change_password'.tr()); } } Future addSshKey(final User user, final String publicKey) async { - final UserMutationResult result = await api.addSshKey(user.login, publicKey); + final UserMutationResult result = + await api.addSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; await box.putAt(box.values.toList().indexOf(user), updatedUser); @@ -124,12 +136,14 @@ class UsersCubit extends ServerInstallationDependendCubit { ), ); } else { - getIt().showSnackBar(result.message ?? 'users.could_not_add_ssh_key'.tr()); + getIt() + .showSnackBar(result.message ?? 'users.could_not_add_ssh_key'.tr()); } } Future deleteSshKey(final User user, final String publicKey) async { - final UserMutationResult result = await api.removeSshKey(user.login, publicKey); + final UserMutationResult result = + await api.removeSshKey(user.login, publicKey); if (result.success) { final User updatedUser = result.user!; await box.putAt(box.values.toList().indexOf(user), updatedUser); diff --git a/lib/logic/cubit/users/users_state.dart b/lib/logic/cubit/users/users_state.dart index 41227447..1065afc0 100644 --- a/lib/logic/cubit/users/users_state.dart +++ b/lib/logic/cubit/users/users_state.dart @@ -5,11 +5,14 @@ class UsersState extends ServerInstallationDependendState { final List users; - User get rootUser => users.firstWhere((final user) => user.type == UserType.root); + User get rootUser => + users.firstWhere((final user) => user.type == UserType.root); - User get primaryUser => users.firstWhere((final user) => user.type == UserType.primary); + User get primaryUser => + users.firstWhere((final user) => user.type == UserType.primary); - List get normalUsers => users.where((final user) => user.type == UserType.normal).toList(); + List get normalUsers => + users.where((final user) => user.type == UserType.normal).toList(); @override List get props => [users]; @@ -21,7 +24,8 @@ class UsersState extends ServerInstallationDependendState { users ?? this.users, ); - bool isLoginRegistered(final String login) => users.any((final User user) => user.login == login); + bool isLoginRegistered(final String login) => + users.any((final User user) => user.login == login); bool get isEmpty => users.isEmpty; } diff --git a/lib/logic/models/hive/user.dart b/lib/logic/models/hive/user.dart index 042b2485..48c121b7 100644 --- a/lib/logic/models/hive/user.dart +++ b/lib/logic/models/hive/user.dart @@ -51,7 +51,8 @@ class User extends Equatable { Color get color => stringToColor(login); @override - String toString() => '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; + String toString() => + '$login, ${isFoundOnServer ? 'found' : 'not found'}, ${sshKeys.length} ssh keys, note: $note'; } @HiveType(typeId: 102) diff --git a/lib/logic/models/hive/user.g.dart b/lib/logic/models/hive/user.g.dart index 8076f3bb..8f5b7b20 100644 --- a/lib/logic/models/hive/user.g.dart +++ b/lib/logic/models/hive/user.g.dart @@ -48,7 +48,11 @@ class UserAdapter extends TypeAdapter { int get hashCode => typeId.hashCode; @override - bool operator ==(Object other) => identical(this, other) || other is UserAdapter && runtimeType == other.runtimeType && typeId == other.typeId; + bool operator ==(Object other) => + identical(this, other) || + other is UserAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; } class UserTypeAdapter extends TypeAdapter { @@ -88,5 +92,9 @@ class UserTypeAdapter extends TypeAdapter { int get hashCode => typeId.hashCode; @override - bool operator ==(Object other) => identical(this, other) || other is UserTypeAdapter && runtimeType == other.runtimeType && typeId == other.typeId; + bool operator ==(Object other) => + identical(this, other) || + other is UserTypeAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; } diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index f3273e7a..91737885 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -96,10 +96,11 @@ class _FilledCard extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(12)), ), clipBehavior: Clip.antiAlias, - color: error ? Theme.of(context).colorScheme.errorContainer + color: error + ? Theme.of(context).colorScheme.errorContainer : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, child: child, ); }