diff --git a/assets/translations/en.json b/assets/translations/en.json index 53fb30d9..52409913 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -256,6 +256,15 @@ "bottom_sheet": { "1": "Openconnect VPN Server. Engine for secure and scalable VPN infrastructure" } + }, + "page": { + "up_and_running": "Up and running", + "resource_usage": "Resource usage", + "disk_used": "{} of disk space used", + "users": "Users", + "controlled_by": "Controlled by {}", + "apps": "Apps", + "settings": "Settings and maintenance" } }, "users": { @@ -395,8 +404,10 @@ }, "modals": { "_comment": "messages in modals", - "1": "Server with such name, already exist", + "1": "Server with such name, already exist.", + "1_1": "Unexpected error during placement from the provider side.", "2": "Destroy server and create a new one?", + "2_2": "Try again?", "3": "Are you sure?", "4": "Purge all authentication keys?", "5": "Yes, purge all my tokens", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index a93e122a..40bb2a9a 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -375,8 +375,10 @@ }, "modals": { "_comment": "messages in modals", - "1": "Сервер с таким именем уже существует", + "1": "Сервер с таким именем уже существует.", + "1.1": "Непредвиденная ошибка при создании со стороны провайдера.", "2": "Уничтожить сервер и создать новый?", + "2.2": "Попробовать ещё раз?", "3": "Подтвердите", "4": "Сбросить все ключи?", "5": "Да, сбросить", diff --git a/lib/config/bloc_config.dart b/lib/config/bloc_config.dart index 3946d3b9..94508aa4 100644 --- a/lib/config/bloc_config.dart +++ b/lib/config/bloc_config.dart @@ -10,6 +10,7 @@ import 'package:selfprivacy/logic/cubit/jobs/jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; +import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; class BlocAndProviderConfig extends StatelessWidget { const BlocAndProviderConfig({final super.key, this.child}); @@ -26,6 +27,7 @@ class BlocAndProviderConfig extends StatelessWidget { final dnsRecordsCubit = DnsRecordsCubit(serverInstallationCubit); final recoveryKeyCubit = RecoveryKeyCubit(serverInstallationCubit); final apiDevicesCubit = ApiDevicesCubit(serverInstallationCubit); + final apiVolumesCubit = ApiVolumesCubit(serverInstallationCubit); return MultiProvider( providers: [ BlocProvider( @@ -60,6 +62,9 @@ class BlocAndProviderConfig extends StatelessWidget { BlocProvider( create: (final _) => apiDevicesCubit..load(), ), + BlocProvider( + create: (final _) => apiVolumesCubit..load(), + ), BlocProvider( create: (final _) => JobsCubit(usersCubit: usersCubit, servicesCubit: servicesCubit), diff --git a/lib/logic/api_maps/graphql_maps/api_map.dart b/lib/logic/api_maps/graphql_maps/api_map.dart index c9240f00..c01f1837 100644 --- a/lib/logic/api_maps/graphql_maps/api_map.dart +++ b/lib/logic/api_maps/graphql_maps/api_map.dart @@ -7,11 +7,12 @@ abstract class ApiMap { 'https://api.$rootAddress/graphql', ); + final String token = _getApiToken(); + final Link graphQLLink = isWithToken ? AuthLink( - getToken: () async => customToken == '' - ? getIt().serverDetails!.apiToken - : customToken, + getToken: () async => + customToken == '' ? 'Bearer $token' : customToken, ).concat(httpLink) : httpLink; @@ -21,6 +22,32 @@ abstract class ApiMap { ); } + Future getSubscriptionClient() async { + final String token = _getApiToken(); + + final WebSocketLink webSocketLink = WebSocketLink( + 'ws://api.$rootAddress/graphql', + config: SocketClientConfig( + autoReconnect: true, + headers: token.isEmpty ? null : {'Authorization': 'Bearer $token'}, + ), + ); + + return GraphQLClient( + cache: GraphQLCache(), + link: webSocketLink, + ); + } + + String _getApiToken() { + String token = ''; + final serverDetails = getIt().serverDetails; + if (serverDetails != null) { + token = getIt().serverDetails!.apiToken; + } + return token; + } + abstract final String? rootAddress; abstract final bool hasLogger; abstract final bool isWithToken; diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql index c85d05d9..a5947f5e 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql @@ -1,4 +1,10 @@ -query GetServerDiskVolumesQuery { +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query GetServerDiskVolumes { storage { volumes { freeSpace @@ -8,31 +14,56 @@ query GetServerDiskVolumesQuery { serial totalSpace type + usages { + title + usedSpace + __typename + ... on ServiceStorageUsage { + service { + id + isMovable + displayName + } + } + } usedSpace } } } -mutation MountVolumeMutation($name: String!) { +mutation MountVolume($name: String!) { mountVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } } -mutation ResizeVolumeMutation($name: String!) { +mutation ResizeVolume($name: String!) { resizeVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } } -mutation UnmountVolumeMutation($name: String!) { +mutation UnmountVolume($name: String!) { unmountVolume(name: $name) { - code - message - success + ...basicMutationReturnFields } -} \ No newline at end of file +} + +mutation MigrateToBinds($input: MigrateToBindsInput!) { + migrateToBinds(input: $input) { + ...basicMutationReturnFields + job { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart index 527b7168..c435da09 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.dart @@ -2,24 +2,156 @@ import 'dart:async'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; part 'disk_volumes.graphql.g.dart'; @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery { - Query$GetServerDiskVolumesQuery( - {required this.storage, required this.$__typename}); +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery.fromJson(Map json) => - _$Query$GetServerDiskVolumesQueryFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); - final Query$GetServerDiskVolumesQuery$storage storage; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQueryToJson(this); + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + 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) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + 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)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes( + {required this.storage, required this.$__typename}); + + @override + factory Query$GetServerDiskVolumes.fromJson(Map json) => + _$Query$GetServerDiskVolumesFromJson(json); + + final Query$GetServerDiskVolumes$storage storage; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetServerDiskVolumesToJson(this); int get hashCode { final l$storage = storage; final l$$__typename = $__typename; @@ -29,7 +161,7 @@ class Query$GetServerDiskVolumesQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery) || + if (!(other is Query$GetServerDiskVolumes) || runtimeType != other.runtimeType) return false; final l$storage = storage; final lOther$storage = other.storage; @@ -41,69 +173,19 @@ class Query$GetServerDiskVolumesQuery { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery - on Query$GetServerDiskVolumesQuery { - CopyWith$Query$GetServerDiskVolumesQuery - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery(this, (i) => i); +extension UtilityExtension$Query$GetServerDiskVolumes + on Query$GetServerDiskVolumes { + Query$GetServerDiskVolumes copyWith( + {Query$GetServerDiskVolumes$storage? storage, String? $__typename}) => + Query$GetServerDiskVolumes( + storage: storage == null ? this.storage : storage, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetServerDiskVolumesQuery { - factory CopyWith$Query$GetServerDiskVolumesQuery( - Query$GetServerDiskVolumesQuery instance, - TRes Function(Query$GetServerDiskVolumesQuery) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery; - - factory CopyWith$Query$GetServerDiskVolumesQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery; - - TRes call( - {Query$GetServerDiskVolumesQuery$storage? storage, String? $__typename}); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage; -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithImpl$Query$GetServerDiskVolumesQuery(this._instance, this._then); - - final Query$GetServerDiskVolumesQuery _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery) _then; - - static const _undefined = {}; - - TRes call({Object? storage = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery( - storage: storage == _undefined || storage == null - ? _instance.storage - : (storage as Query$GetServerDiskVolumesQuery$storage), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage { - final local$storage = _instance.storage; - return CopyWith$Query$GetServerDiskVolumesQuery$storage( - local$storage, (e) => call(storage: e)); - } -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery - implements CopyWith$Query$GetServerDiskVolumesQuery { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery(this._res); - - TRes _res; - - call( - {Query$GetServerDiskVolumesQuery$storage? storage, - String? $__typename}) => - _res; - CopyWith$Query$GetServerDiskVolumesQuery$storage get storage => - CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(_res); -} - -const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ +const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetServerDiskVolumesQuery'), + name: NameNode(value: 'GetServerDiskVolumes'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -161,6 +243,77 @@ const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ arguments: [], directives: [], selectionSet: null), + FieldNode( + name: NameNode(value: 'usages'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + InlineFragmentNode( + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode( + value: 'ServiceStorageUsage'), + isNonNull: false)), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'service'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'displayName'), + 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: 'usedSpace'), alias: null, @@ -189,13 +342,13 @@ const documentNodeQueryGetServerDiskVolumesQuery = DocumentNode(definitions: [ selectionSet: null) ])), ]); -Query$GetServerDiskVolumesQuery _parserFn$Query$GetServerDiskVolumesQuery( +Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes( Map data) => - Query$GetServerDiskVolumesQuery.fromJson(data); + Query$GetServerDiskVolumes.fromJson(data); -class Options$Query$GetServerDiskVolumesQuery - extends graphql.QueryOptions { - Options$Query$GetServerDiskVolumesQuery( +class Options$Query$GetServerDiskVolumes + extends graphql.QueryOptions { + Options$Query$GetServerDiskVolumes( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -211,13 +364,13 @@ class Options$Query$GetServerDiskVolumesQuery optimisticResult: optimisticResult, pollInterval: pollInterval, context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); + document: documentNodeQueryGetServerDiskVolumes, + parserFn: _parserFn$Query$GetServerDiskVolumes); } -class WatchOptions$Query$GetServerDiskVolumesQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetServerDiskVolumesQuery( +class WatchOptions$Query$GetServerDiskVolumes + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetServerDiskVolumes( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -235,74 +388,68 @@ class WatchOptions$Query$GetServerDiskVolumesQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetServerDiskVolumesQuery, + document: documentNodeQueryGetServerDiskVolumes, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetServerDiskVolumesQuery); + parserFn: _parserFn$Query$GetServerDiskVolumes); } -class FetchMoreOptions$Query$GetServerDiskVolumesQuery +class FetchMoreOptions$Query$GetServerDiskVolumes extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetServerDiskVolumesQuery( + FetchMoreOptions$Query$GetServerDiskVolumes( {required graphql.UpdateQuery updateQuery}) : super( updateQuery: updateQuery, - document: documentNodeQueryGetServerDiskVolumesQuery); + document: documentNodeQueryGetServerDiskVolumes); } -extension ClientExtension$Query$GetServerDiskVolumesQuery - on graphql.GraphQLClient { - Future> - query$GetServerDiskVolumesQuery( - [Options$Query$GetServerDiskVolumesQuery? options]) async => - await this - .query(options ?? Options$Query$GetServerDiskVolumesQuery()); - graphql.ObservableQuery - watchQuery$GetServerDiskVolumesQuery( - [WatchOptions$Query$GetServerDiskVolumesQuery? options]) => - this.watchQuery( - options ?? WatchOptions$Query$GetServerDiskVolumesQuery()); - void writeQuery$GetServerDiskVolumesQuery( - {required Query$GetServerDiskVolumesQuery data, - bool broadcast = true}) => +extension ClientExtension$Query$GetServerDiskVolumes on graphql.GraphQLClient { + Future> + query$GetServerDiskVolumes( + [Options$Query$GetServerDiskVolumes? options]) async => + await this.query(options ?? Options$Query$GetServerDiskVolumes()); + graphql.ObservableQuery + watchQuery$GetServerDiskVolumes( + [WatchOptions$Query$GetServerDiskVolumes? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetServerDiskVolumes()); + void writeQuery$GetServerDiskVolumes( + {required Query$GetServerDiskVolumes data, bool broadcast = true}) => this.writeQuery( graphql.Request( operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), + document: documentNodeQueryGetServerDiskVolumes)), data: data.toJson(), broadcast: broadcast); - Query$GetServerDiskVolumesQuery? readQuery$GetServerDiskVolumesQuery( + Query$GetServerDiskVolumes? readQuery$GetServerDiskVolumes( {bool optimistic = true}) { final result = this.readQuery( graphql.Request( operation: graphql.Operation( - document: documentNodeQueryGetServerDiskVolumesQuery)), + document: documentNodeQueryGetServerDiskVolumes)), optimistic: optimistic); - return result == null - ? null - : Query$GetServerDiskVolumesQuery.fromJson(result); + return result == null ? null : Query$GetServerDiskVolumes.fromJson(result); } } @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage { - Query$GetServerDiskVolumesQuery$storage( +class Query$GetServerDiskVolumes$storage { + Query$GetServerDiskVolumes$storage( {required this.volumes, required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery$storage.fromJson( + factory Query$GetServerDiskVolumes$storage.fromJson( Map json) => - _$Query$GetServerDiskVolumesQuery$storageFromJson(json); + _$Query$GetServerDiskVolumes$storageFromJson(json); - final List volumes; + final List volumes; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQuery$storageToJson(this); + _$Query$GetServerDiskVolumes$storageToJson(this); int get hashCode { final l$volumes = volumes; final l$$__typename = $__typename; @@ -313,7 +460,7 @@ class Query$GetServerDiskVolumesQuery$storage { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage) || + if (!(other is Query$GetServerDiskVolumes$storage) || runtimeType != other.runtimeType) return false; final l$volumes = volumes; final lOther$volumes = other.volumes; @@ -331,118 +478,58 @@ class Query$GetServerDiskVolumesQuery$storage { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage - on Query$GetServerDiskVolumesQuery$storage { - CopyWith$Query$GetServerDiskVolumesQuery$storage< - Query$GetServerDiskVolumesQuery$storage> - get copyWith => - CopyWith$Query$GetServerDiskVolumesQuery$storage(this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage( - Query$GetServerDiskVolumesQuery$storage instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage.stub(TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage; - - TRes call( - {List? volumes, - String? $__typename}); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage) _then; - - static const _undefined = {}; - - TRes call({Object? volumes = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage( - volumes: volumes == _undefined || volumes == null - ? _instance.volumes - : (volumes - as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes volumes( - Iterable Function( - Iterable< - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes>>) - _fn) => - call( - volumes: _fn(_instance.volumes.map((e) => - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - e, (i) => i))).toList()); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage - implements CopyWith$Query$GetServerDiskVolumesQuery$storage { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage(this._res); - - TRes _res; - - call( - {List? volumes, +extension UtilityExtension$Query$GetServerDiskVolumes$storage + on Query$GetServerDiskVolumes$storage { + Query$GetServerDiskVolumes$storage copyWith( + {List? volumes, String? $__typename}) => - _res; - volumes(_fn) => _res; + Query$GetServerDiskVolumes$storage( + volumes: volumes == null ? this.volumes : volumes, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetServerDiskVolumesQuery$storage$volumes { - Query$GetServerDiskVolumesQuery$storage$volumes( +class Query$GetServerDiskVolumes$storage$volumes { + Query$GetServerDiskVolumes$storage$volumes( {required this.freeSpace, - required this.model, + this.model, required this.name, required this.root, - required this.serial, + this.serial, required this.totalSpace, required this.type, + required this.usages, required this.usedSpace, required this.$__typename}); @override - factory Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( + factory Query$GetServerDiskVolumes$storage$volumes.fromJson( Map json) => - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson(json); + _$Query$GetServerDiskVolumes$storage$volumesFromJson(json); final String freeSpace; - final String model; + final String? model; final String name; final bool root; - final String serial; + final String? serial; final String totalSpace; final String type; + final List usages; + final String usedSpace; @JsonKey(name: '__typename') final String $__typename; Map toJson() => - _$Query$GetServerDiskVolumesQuery$storage$volumesToJson(this); + _$Query$GetServerDiskVolumes$storage$volumesToJson(this); int get hashCode { final l$freeSpace = freeSpace; final l$model = model; @@ -451,6 +538,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { final l$serial = serial; final l$totalSpace = totalSpace; final l$type = type; + final l$usages = usages; final l$usedSpace = usedSpace; final l$$__typename = $__typename; return Object.hashAll([ @@ -461,6 +549,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { l$serial, l$totalSpace, l$type, + Object.hashAll(l$usages.map((v) => v)), l$usedSpace, l$$__typename ]); @@ -469,7 +558,7 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetServerDiskVolumesQuery$storage$volumes) || + if (!(other is Query$GetServerDiskVolumes$storage$volumes) || runtimeType != other.runtimeType) return false; final l$freeSpace = freeSpace; final lOther$freeSpace = other.freeSpace; @@ -492,6 +581,15 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { final l$type = type; final lOther$type = other.type; if (l$type != lOther$type) return false; + final l$usages = usages; + final lOther$usages = other.usages; + if (l$usages.length != lOther$usages.length) return false; + for (int i = 0; i < l$usages.length; i++) { + final l$usages$entry = l$usages[i]; + final lOther$usages$entry = lOther$usages[i]; + if (l$usages$entry != lOther$usages$entry) return false; + } + final l$usedSpace = usedSpace; final lOther$usedSpace = other.usedSpace; if (l$usedSpace != lOther$usedSpace) return false; @@ -502,119 +600,253 @@ class Query$GetServerDiskVolumesQuery$storage$volumes { } } -extension UtilityExtension$Query$GetServerDiskVolumesQuery$storage$volumes - on Query$GetServerDiskVolumesQuery$storage$volumes { - CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes< - Query$GetServerDiskVolumesQuery$storage$volumes> - get copyWith => CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - this, (i) => i); -} - -abstract class CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes( - Query$GetServerDiskVolumesQuery$storage$volumes instance, - TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) then) = - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - factory CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes.stub( - TRes res) = - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes; - - TRes call( - {String? freeSpace, - String? model, - String? name, - bool? root, - String? serial, - String? totalSpace, - String? type, - String? usedSpace, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithImpl$Query$GetServerDiskVolumesQuery$storage$volumes( - this._instance, this._then); - - final Query$GetServerDiskVolumesQuery$storage$volumes _instance; - - final TRes Function(Query$GetServerDiskVolumesQuery$storage$volumes) _then; - - static const _undefined = {}; - - TRes call( - {Object? freeSpace = _undefined, - Object? model = _undefined, - Object? name = _undefined, - Object? root = _undefined, - Object? serial = _undefined, - Object? totalSpace = _undefined, - Object? type = _undefined, - Object? usedSpace = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetServerDiskVolumesQuery$storage$volumes( - freeSpace: freeSpace == _undefined || freeSpace == null - ? _instance.freeSpace - : (freeSpace as String), - model: model == _undefined || model == null - ? _instance.model - : (model as String), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - root: root == _undefined || root == null - ? _instance.root - : (root as bool), - serial: serial == _undefined || serial == null - ? _instance.serial - : (serial as String), - totalSpace: totalSpace == _undefined || totalSpace == null - ? _instance.totalSpace - : (totalSpace as String), - type: type == _undefined || type == null - ? _instance.type - : (type as String), - usedSpace: usedSpace == _undefined || usedSpace == null - ? _instance.usedSpace - : (usedSpace as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes - implements CopyWith$Query$GetServerDiskVolumesQuery$storage$volumes { - _CopyWithStubImpl$Query$GetServerDiskVolumesQuery$storage$volumes(this._res); - - TRes _res; - - call( +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes + on Query$GetServerDiskVolumes$storage$volumes { + Query$GetServerDiskVolumes$storage$volumes copyWith( {String? freeSpace, - String? model, + String? Function()? model, String? name, bool? root, - String? serial, + String? Function()? serial, String? totalSpace, String? type, + List? usages, String? usedSpace, String? $__typename}) => - _res; + Query$GetServerDiskVolumes$storage$volumes( + freeSpace: freeSpace == null ? this.freeSpace : freeSpace, + model: model == null ? this.model : model(), + name: name == null ? this.name : name, + root: root == null ? this.root : root, + serial: serial == null ? this.serial : serial(), + totalSpace: totalSpace == null ? this.totalSpace : totalSpace, + type: type == null ? this.type : type, + usages: usages == null ? this.usages : usages, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$MountVolumeMutation { - Variables$Mutation$MountVolumeMutation({required this.name}); +class Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages( + {required this.title, + required this.usedSpace, + required this.$__typename}); @override - factory Variables$Mutation$MountVolumeMutation.fromJson( + factory Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + Map json) { + switch (json["__typename"] as String) { + case "ServiceStorageUsage": + return Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + .fromJson(json); + default: + return _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( + json); + } + } + + final String title; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson(this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + return Object.hashAll([l$title, l$usedSpace, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetServerDiskVolumes$storage$volumes$usages) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages + on Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages copyWith( + {String? title, String? usedSpace, String? $__typename}) => + Query$GetServerDiskVolumes$storage$volumes$usages( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + implements Query$GetServerDiskVolumes$storage$volumes$usages { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + {required this.title, + required this.usedSpace, + required this.$__typename, + this.service}); + + @override + factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage.fromJson( Map json) => - _$Variables$Mutation$MountVolumeMutationFromJson(json); + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( + json); + + final String title; + + final String usedSpace; + + @JsonKey(name: '__typename') + final String $__typename; + + final Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + service; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( + this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$$__typename = $__typename; + final l$service = service; + return Object.hashAll([l$title, l$usedSpace, l$$__typename, l$service]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$service = service; + final lOther$service = other.service; + if (l$service != lOther$service) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage copyWith( + {String? title, + String? usedSpace, + String? $__typename, + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service? + Function()? + service}) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + $__typename: $__typename == null ? this.$__typename : $__typename, + service: service == null ? this.service : service()); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + {required this.id, + required this.isMovable, + required this.displayName, + required this.$__typename}); + + @override + factory Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service.fromJson( + Map json) => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( + json); + + final String id; + + final bool isMovable; + + final String displayName; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( + this); + int get hashCode { + final l$id = id; + final l$isMovable = isMovable; + final l$displayName = displayName; + final l$$__typename = $__typename; + return Object.hashAll([l$id, l$isMovable, l$displayName, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service) || + runtimeType != other.runtimeType) return false; + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) return false; + final l$isMovable = isMovable; + final lOther$isMovable = other.isMovable; + if (l$isMovable != lOther$isMovable) return false; + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + on Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service { + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + copyWith( + {String? id, + bool? isMovable, + String? displayName, + String? $__typename}) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: id == null ? this.id : id, + isMovable: isMovable == null ? this.isMovable : isMovable, + displayName: displayName == null ? this.displayName : displayName, + $__typename: + $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MountVolume { + Variables$Mutation$MountVolume({required this.name}); + + @override + factory Variables$Mutation$MountVolume.fromJson(Map json) => + _$Variables$Mutation$MountVolumeFromJson(json); final String name; - Map toJson() => - _$Variables$Mutation$MountVolumeMutationToJson(this); + Map toJson() => _$Variables$Mutation$MountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -623,7 +855,7 @@ class Variables$Mutation$MountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$MountVolumeMutation) || + if (!(other is Variables$Mutation$MountVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -631,66 +863,24 @@ class Variables$Mutation$MountVolumeMutation { return true; } - CopyWith$Variables$Mutation$MountVolumeMutation< - Variables$Mutation$MountVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$MountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$MountVolumeMutation { - factory CopyWith$Variables$Mutation$MountVolumeMutation( - Variables$Mutation$MountVolumeMutation instance, - TRes Function(Variables$Mutation$MountVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$MountVolumeMutation; - - factory CopyWith$Variables$Mutation$MountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$MountVolumeMutation - implements CopyWith$Variables$Mutation$MountVolumeMutation { - _CopyWithImpl$Variables$Mutation$MountVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$MountVolumeMutation _instance; - - final TRes Function(Variables$Mutation$MountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$MountVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation - implements CopyWith$Variables$Mutation$MountVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$MountVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$MountVolume copyWith({String? name}) => + Variables$Mutation$MountVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$MountVolumeMutation { - Mutation$MountVolumeMutation( - {required this.mountVolume, required this.$__typename}); +class Mutation$MountVolume { + Mutation$MountVolume({required this.mountVolume, required this.$__typename}); @override - factory Mutation$MountVolumeMutation.fromJson(Map json) => - _$Mutation$MountVolumeMutationFromJson(json); + factory Mutation$MountVolume.fromJson(Map json) => + _$Mutation$MountVolumeFromJson(json); - final Mutation$MountVolumeMutation$mountVolume mountVolume; + final Mutation$MountVolume$mountVolume mountVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$MountVolumeMutationToJson(this); + Map toJson() => _$Mutation$MountVolumeToJson(this); int get hashCode { final l$mountVolume = mountVolume; final l$$__typename = $__typename; @@ -700,8 +890,8 @@ class Mutation$MountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$MountVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$MountVolume) || runtimeType != other.runtimeType) + return false; final l$mountVolume = mountVolume; final lOther$mountVolume = other.mountVolume; if (l$mountVolume != lOther$mountVolume) return false; @@ -712,72 +902,19 @@ class Mutation$MountVolumeMutation { } } -extension UtilityExtension$Mutation$MountVolumeMutation - on Mutation$MountVolumeMutation { - CopyWith$Mutation$MountVolumeMutation - get copyWith => CopyWith$Mutation$MountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$MountVolumeMutation { - factory CopyWith$Mutation$MountVolumeMutation( - Mutation$MountVolumeMutation instance, - TRes Function(Mutation$MountVolumeMutation) then) = - _CopyWithImpl$Mutation$MountVolumeMutation; - - factory CopyWith$Mutation$MountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$MountVolumeMutation; - - TRes call( - {Mutation$MountVolumeMutation$mountVolume? mountVolume, - String? $__typename}); - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume; -} - -class _CopyWithImpl$Mutation$MountVolumeMutation - implements CopyWith$Mutation$MountVolumeMutation { - _CopyWithImpl$Mutation$MountVolumeMutation(this._instance, this._then); - - final Mutation$MountVolumeMutation _instance; - - final TRes Function(Mutation$MountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? mountVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$MountVolumeMutation( - mountVolume: mountVolume == _undefined || mountVolume == null - ? _instance.mountVolume - : (mountVolume as Mutation$MountVolumeMutation$mountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume { - final local$mountVolume = _instance.mountVolume; - return CopyWith$Mutation$MountVolumeMutation$mountVolume( - local$mountVolume, (e) => call(mountVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$MountVolumeMutation - implements CopyWith$Mutation$MountVolumeMutation { - _CopyWithStubImpl$Mutation$MountVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$MountVolumeMutation$mountVolume? mountVolume, +extension UtilityExtension$Mutation$MountVolume on Mutation$MountVolume { + Mutation$MountVolume copyWith( + {Mutation$MountVolume$mountVolume? mountVolume, String? $__typename}) => - _res; - CopyWith$Mutation$MountVolumeMutation$mountVolume get mountVolume => - CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(_res); + Mutation$MountVolume( + mountVolume: mountVolume == null ? this.mountVolume : mountVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationMountVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'MountVolumeMutation'), + name: NameNode(value: 'MountVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -798,24 +935,9 @@ const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ ], 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), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -830,25 +952,26 @@ const documentNodeMutationMountVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$MountVolumeMutation _parserFn$Mutation$MountVolumeMutation( +Mutation$MountVolume _parserFn$Mutation$MountVolume( Map data) => - Mutation$MountVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$MountVolumeMutation = FutureOr - Function(dynamic, Mutation$MountVolumeMutation?); + Mutation$MountVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$MountVolume = FutureOr Function( + dynamic, Mutation$MountVolume?); -class Options$Mutation$MountVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$MountVolumeMutation( +class Options$Mutation$MountVolume + extends graphql.MutationOptions { + Options$Mutation$MountVolume( {String? operationName, - required Variables$Mutation$MountVolumeMutation variables, + required Variables$Mutation$MountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$MountVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$MountVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -861,17 +984,14 @@ class Options$Mutation$MountVolumeMutation context: context, onCompleted: onCompleted == null ? null - : (data) => onCompleted( - data, - data == null - ? null - : _parserFn$Mutation$MountVolumeMutation(data)), + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$MountVolume(data)), update: update, onError: onError, - document: documentNodeMutationMountVolumeMutation, - parserFn: _parserFn$Mutation$MountVolumeMutation); + document: documentNodeMutationMountVolume, + parserFn: _parserFn$Mutation$MountVolume); - final OnMutationCompleted$Mutation$MountVolumeMutation? onCompletedWithParsed; + final OnMutationCompleted$Mutation$MountVolume? onCompletedWithParsed; @override List get properties => [ @@ -882,11 +1002,11 @@ class Options$Mutation$MountVolumeMutation ]; } -class WatchOptions$Mutation$MountVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$MountVolumeMutation( +class WatchOptions$Mutation$MountVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MountVolume( {String? operationName, - required Variables$Mutation$MountVolumeMutation variables, + required Variables$Mutation$MountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -904,38 +1024,36 @@ class WatchOptions$Mutation$MountVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationMountVolumeMutation, + document: documentNodeMutationMountVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$MountVolumeMutation); + parserFn: _parserFn$Mutation$MountVolume); } -extension ClientExtension$Mutation$MountVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$MountVolumeMutation( - Options$Mutation$MountVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$MountVolumeMutation( - WatchOptions$Mutation$MountVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$MountVolume on graphql.GraphQLClient { + Future> mutate$MountVolume( + Options$Mutation$MountVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MountVolume( + WatchOptions$Mutation$MountVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$MountVolumeMutation$mountVolume { - Mutation$MountVolumeMutation$mountVolume( +class Mutation$MountVolume$mountVolume + implements Fragment$basicMutationReturnFields { + Mutation$MountVolume$mountVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$MountVolumeMutation$mountVolume.fromJson( + factory Mutation$MountVolume$mountVolume.fromJson( Map json) => - _$Mutation$MountVolumeMutation$mountVolumeFromJson(json); + _$Mutation$MountVolume$mountVolumeFromJson(json); final int code; @@ -947,7 +1065,7 @@ class Mutation$MountVolumeMutation$mountVolume { final String $__typename; Map toJson() => - _$Mutation$MountVolumeMutation$mountVolumeToJson(this); + _$Mutation$MountVolume$mountVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -959,7 +1077,7 @@ class Mutation$MountVolumeMutation$mountVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$MountVolumeMutation$mountVolume) || + if (!(other is Mutation$MountVolume$mountVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -977,80 +1095,29 @@ class Mutation$MountVolumeMutation$mountVolume { } } -extension UtilityExtension$Mutation$MountVolumeMutation$mountVolume - on Mutation$MountVolumeMutation$mountVolume { - CopyWith$Mutation$MountVolumeMutation$mountVolume< - Mutation$MountVolumeMutation$mountVolume> - get copyWith => - CopyWith$Mutation$MountVolumeMutation$mountVolume(this, (i) => i); -} - -abstract class CopyWith$Mutation$MountVolumeMutation$mountVolume { - factory CopyWith$Mutation$MountVolumeMutation$mountVolume( - Mutation$MountVolumeMutation$mountVolume instance, - TRes Function(Mutation$MountVolumeMutation$mountVolume) then) = - _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume; - - factory CopyWith$Mutation$MountVolumeMutation$mountVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume; - - TRes call({int? code, String? message, bool? success, String? $__typename}); -} - -class _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume - implements CopyWith$Mutation$MountVolumeMutation$mountVolume { - _CopyWithImpl$Mutation$MountVolumeMutation$mountVolume( - this._instance, this._then); - - final Mutation$MountVolumeMutation$mountVolume _instance; - - final TRes Function(Mutation$MountVolumeMutation$mountVolume) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$MountVolumeMutation$mountVolume( - 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$MountVolumeMutation$mountVolume - implements CopyWith$Mutation$MountVolumeMutation$mountVolume { - _CopyWithStubImpl$Mutation$MountVolumeMutation$mountVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$MountVolume$mountVolume + on Mutation$MountVolume$mountVolume { + Mutation$MountVolume$mountVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$MountVolume$mountVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$ResizeVolumeMutation { - Variables$Mutation$ResizeVolumeMutation({required this.name}); +class Variables$Mutation$ResizeVolume { + Variables$Mutation$ResizeVolume({required this.name}); @override - factory Variables$Mutation$ResizeVolumeMutation.fromJson( - Map json) => - _$Variables$Mutation$ResizeVolumeMutationFromJson(json); + factory Variables$Mutation$ResizeVolume.fromJson(Map json) => + _$Variables$Mutation$ResizeVolumeFromJson(json); final String name; Map toJson() => - _$Variables$Mutation$ResizeVolumeMutationToJson(this); + _$Variables$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -1059,7 +1126,7 @@ class Variables$Mutation$ResizeVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$ResizeVolumeMutation) || + if (!(other is Variables$Mutation$ResizeVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -1067,66 +1134,25 @@ class Variables$Mutation$ResizeVolumeMutation { return true; } - CopyWith$Variables$Mutation$ResizeVolumeMutation< - Variables$Mutation$ResizeVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$ResizeVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$ResizeVolumeMutation { - factory CopyWith$Variables$Mutation$ResizeVolumeMutation( - Variables$Mutation$ResizeVolumeMutation instance, - TRes Function(Variables$Mutation$ResizeVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation; - - factory CopyWith$Variables$Mutation$ResizeVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation - implements CopyWith$Variables$Mutation$ResizeVolumeMutation { - _CopyWithImpl$Variables$Mutation$ResizeVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$ResizeVolumeMutation _instance; - - final TRes Function(Variables$Mutation$ResizeVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$ResizeVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation - implements CopyWith$Variables$Mutation$ResizeVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$ResizeVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$ResizeVolume copyWith({String? name}) => + Variables$Mutation$ResizeVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$ResizeVolumeMutation { - Mutation$ResizeVolumeMutation( +class Mutation$ResizeVolume { + Mutation$ResizeVolume( {required this.resizeVolume, required this.$__typename}); @override - factory Mutation$ResizeVolumeMutation.fromJson(Map json) => - _$Mutation$ResizeVolumeMutationFromJson(json); + factory Mutation$ResizeVolume.fromJson(Map json) => + _$Mutation$ResizeVolumeFromJson(json); - final Mutation$ResizeVolumeMutation$resizeVolume resizeVolume; + final Mutation$ResizeVolume$resizeVolume resizeVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$ResizeVolumeMutationToJson(this); + Map toJson() => _$Mutation$ResizeVolumeToJson(this); int get hashCode { final l$resizeVolume = resizeVolume; final l$$__typename = $__typename; @@ -1136,8 +1162,8 @@ class Mutation$ResizeVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$ResizeVolume) || runtimeType != other.runtimeType) + return false; final l$resizeVolume = resizeVolume; final lOther$resizeVolume = other.resizeVolume; if (l$resizeVolume != lOther$resizeVolume) return false; @@ -1148,72 +1174,19 @@ class Mutation$ResizeVolumeMutation { } } -extension UtilityExtension$Mutation$ResizeVolumeMutation - on Mutation$ResizeVolumeMutation { - CopyWith$Mutation$ResizeVolumeMutation - get copyWith => CopyWith$Mutation$ResizeVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$ResizeVolumeMutation { - factory CopyWith$Mutation$ResizeVolumeMutation( - Mutation$ResizeVolumeMutation instance, - TRes Function(Mutation$ResizeVolumeMutation) then) = - _CopyWithImpl$Mutation$ResizeVolumeMutation; - - factory CopyWith$Mutation$ResizeVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$ResizeVolumeMutation; - - TRes call( - {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, - String? $__typename}); - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume; -} - -class _CopyWithImpl$Mutation$ResizeVolumeMutation - implements CopyWith$Mutation$ResizeVolumeMutation { - _CopyWithImpl$Mutation$ResizeVolumeMutation(this._instance, this._then); - - final Mutation$ResizeVolumeMutation _instance; - - final TRes Function(Mutation$ResizeVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? resizeVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$ResizeVolumeMutation( - resizeVolume: resizeVolume == _undefined || resizeVolume == null - ? _instance.resizeVolume - : (resizeVolume as Mutation$ResizeVolumeMutation$resizeVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume { - final local$resizeVolume = _instance.resizeVolume; - return CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( - local$resizeVolume, (e) => call(resizeVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$ResizeVolumeMutation - implements CopyWith$Mutation$ResizeVolumeMutation { - _CopyWithStubImpl$Mutation$ResizeVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$ResizeVolumeMutation$resizeVolume? resizeVolume, +extension UtilityExtension$Mutation$ResizeVolume on Mutation$ResizeVolume { + Mutation$ResizeVolume copyWith( + {Mutation$ResizeVolume$resizeVolume? resizeVolume, String? $__typename}) => - _res; - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume get resizeVolume => - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(_res); + Mutation$ResizeVolume( + resizeVolume: resizeVolume == null ? this.resizeVolume : resizeVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationResizeVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'ResizeVolumeMutation'), + name: NameNode(value: 'ResizeVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -1234,24 +1207,9 @@ const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ ], 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), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1266,25 +1224,26 @@ const documentNodeMutationResizeVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$ResizeVolumeMutation _parserFn$Mutation$ResizeVolumeMutation( +Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume( Map data) => - Mutation$ResizeVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$ResizeVolumeMutation = FutureOr - Function(dynamic, Mutation$ResizeVolumeMutation?); + Mutation$ResizeVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr Function( + dynamic, Mutation$ResizeVolume?); -class Options$Mutation$ResizeVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$ResizeVolumeMutation( +class Options$Mutation$ResizeVolume + extends graphql.MutationOptions { + Options$Mutation$ResizeVolume( {String? operationName, - required Variables$Mutation$ResizeVolumeMutation variables, + required Variables$Mutation$ResizeVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$ResizeVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$ResizeVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -1301,14 +1260,13 @@ class Options$Mutation$ResizeVolumeMutation data, data == null ? null - : _parserFn$Mutation$ResizeVolumeMutation(data)), + : _parserFn$Mutation$ResizeVolume(data)), update: update, onError: onError, - document: documentNodeMutationResizeVolumeMutation, - parserFn: _parserFn$Mutation$ResizeVolumeMutation); + document: documentNodeMutationResizeVolume, + parserFn: _parserFn$Mutation$ResizeVolume); - final OnMutationCompleted$Mutation$ResizeVolumeMutation? - onCompletedWithParsed; + final OnMutationCompleted$Mutation$ResizeVolume? onCompletedWithParsed; @override List get properties => [ @@ -1319,11 +1277,11 @@ class Options$Mutation$ResizeVolumeMutation ]; } -class WatchOptions$Mutation$ResizeVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$ResizeVolumeMutation( +class WatchOptions$Mutation$ResizeVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ResizeVolume( {String? operationName, - required Variables$Mutation$ResizeVolumeMutation variables, + required Variables$Mutation$ResizeVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -1341,38 +1299,36 @@ class WatchOptions$Mutation$ResizeVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationResizeVolumeMutation, + document: documentNodeMutationResizeVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$ResizeVolumeMutation); + parserFn: _parserFn$Mutation$ResizeVolume); } -extension ClientExtension$Mutation$ResizeVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$ResizeVolumeMutation( - Options$Mutation$ResizeVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$ResizeVolumeMutation( - WatchOptions$Mutation$ResizeVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$ResizeVolume on graphql.GraphQLClient { + Future> mutate$ResizeVolume( + Options$Mutation$ResizeVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$ResizeVolume( + WatchOptions$Mutation$ResizeVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$ResizeVolumeMutation$resizeVolume { - Mutation$ResizeVolumeMutation$resizeVolume( +class Mutation$ResizeVolume$resizeVolume + implements Fragment$basicMutationReturnFields { + Mutation$ResizeVolume$resizeVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + factory Mutation$ResizeVolume$resizeVolume.fromJson( Map json) => - _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson(json); + _$Mutation$ResizeVolume$resizeVolumeFromJson(json); final int code; @@ -1384,7 +1340,7 @@ class Mutation$ResizeVolumeMutation$resizeVolume { final String $__typename; Map toJson() => - _$Mutation$ResizeVolumeMutation$resizeVolumeToJson(this); + _$Mutation$ResizeVolume$resizeVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -1396,7 +1352,7 @@ class Mutation$ResizeVolumeMutation$resizeVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$ResizeVolumeMutation$resizeVolume) || + if (!(other is Mutation$ResizeVolume$resizeVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -1414,80 +1370,30 @@ class Mutation$ResizeVolumeMutation$resizeVolume { } } -extension UtilityExtension$Mutation$ResizeVolumeMutation$resizeVolume - on Mutation$ResizeVolumeMutation$resizeVolume { - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume< - Mutation$ResizeVolumeMutation$resizeVolume> - get copyWith => - CopyWith$Mutation$ResizeVolumeMutation$resizeVolume(this, (i) => i); -} - -abstract class CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume( - Mutation$ResizeVolumeMutation$resizeVolume instance, - TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) then) = - _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume; - - factory CopyWith$Mutation$ResizeVolumeMutation$resizeVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume; - - TRes call({int? code, String? message, bool? success, String? $__typename}); -} - -class _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume - implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - _CopyWithImpl$Mutation$ResizeVolumeMutation$resizeVolume( - this._instance, this._then); - - final Mutation$ResizeVolumeMutation$resizeVolume _instance; - - final TRes Function(Mutation$ResizeVolumeMutation$resizeVolume) _then; - - static const _undefined = {}; - - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$ResizeVolumeMutation$resizeVolume( - 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$ResizeVolumeMutation$resizeVolume - implements CopyWith$Mutation$ResizeVolumeMutation$resizeVolume { - _CopyWithStubImpl$Mutation$ResizeVolumeMutation$resizeVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$ResizeVolume$resizeVolume + on Mutation$ResizeVolume$resizeVolume { + Mutation$ResizeVolume$resizeVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$ResizeVolume$resizeVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Variables$Mutation$UnmountVolumeMutation { - Variables$Mutation$UnmountVolumeMutation({required this.name}); +class Variables$Mutation$UnmountVolume { + Variables$Mutation$UnmountVolume({required this.name}); @override - factory Variables$Mutation$UnmountVolumeMutation.fromJson( + factory Variables$Mutation$UnmountVolume.fromJson( Map json) => - _$Variables$Mutation$UnmountVolumeMutationFromJson(json); + _$Variables$Mutation$UnmountVolumeFromJson(json); final String name; Map toJson() => - _$Variables$Mutation$UnmountVolumeMutationToJson(this); + _$Variables$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$name = name; return Object.hashAll([l$name]); @@ -1496,7 +1402,7 @@ class Variables$Mutation$UnmountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Variables$Mutation$UnmountVolumeMutation) || + if (!(other is Variables$Mutation$UnmountVolume) || runtimeType != other.runtimeType) return false; final l$name = name; final lOther$name = other.name; @@ -1504,66 +1410,25 @@ class Variables$Mutation$UnmountVolumeMutation { return true; } - CopyWith$Variables$Mutation$UnmountVolumeMutation< - Variables$Mutation$UnmountVolumeMutation> - get copyWith => - CopyWith$Variables$Mutation$UnmountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Variables$Mutation$UnmountVolumeMutation { - factory CopyWith$Variables$Mutation$UnmountVolumeMutation( - Variables$Mutation$UnmountVolumeMutation instance, - TRes Function(Variables$Mutation$UnmountVolumeMutation) then) = - _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation; - - factory CopyWith$Variables$Mutation$UnmountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation; - - TRes call({String? name}); -} - -class _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation - implements CopyWith$Variables$Mutation$UnmountVolumeMutation { - _CopyWithImpl$Variables$Mutation$UnmountVolumeMutation( - this._instance, this._then); - - final Variables$Mutation$UnmountVolumeMutation _instance; - - final TRes Function(Variables$Mutation$UnmountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call({Object? name = _undefined}) => - _then(Variables$Mutation$UnmountVolumeMutation( - name: name == _undefined || name == null - ? _instance.name - : (name as String))); -} - -class _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation - implements CopyWith$Variables$Mutation$UnmountVolumeMutation { - _CopyWithStubImpl$Variables$Mutation$UnmountVolumeMutation(this._res); - - TRes _res; - - call({String? name}) => _res; + Variables$Mutation$UnmountVolume copyWith({String? name}) => + Variables$Mutation$UnmountVolume(name: name == null ? this.name : name); } @JsonSerializable(explicitToJson: true) -class Mutation$UnmountVolumeMutation { - Mutation$UnmountVolumeMutation( +class Mutation$UnmountVolume { + Mutation$UnmountVolume( {required this.unmountVolume, required this.$__typename}); @override - factory Mutation$UnmountVolumeMutation.fromJson(Map json) => - _$Mutation$UnmountVolumeMutationFromJson(json); + factory Mutation$UnmountVolume.fromJson(Map json) => + _$Mutation$UnmountVolumeFromJson(json); - final Mutation$UnmountVolumeMutation$unmountVolume unmountVolume; + final Mutation$UnmountVolume$unmountVolume unmountVolume; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Mutation$UnmountVolumeMutationToJson(this); + Map toJson() => _$Mutation$UnmountVolumeToJson(this); int get hashCode { final l$unmountVolume = unmountVolume; final l$$__typename = $__typename; @@ -1573,8 +1438,8 @@ class Mutation$UnmountVolumeMutation { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolumeMutation) || - runtimeType != other.runtimeType) return false; + if (!(other is Mutation$UnmountVolume) || runtimeType != other.runtimeType) + return false; final l$unmountVolume = unmountVolume; final lOther$unmountVolume = other.unmountVolume; if (l$unmountVolume != lOther$unmountVolume) return false; @@ -1585,74 +1450,20 @@ class Mutation$UnmountVolumeMutation { } } -extension UtilityExtension$Mutation$UnmountVolumeMutation - on Mutation$UnmountVolumeMutation { - CopyWith$Mutation$UnmountVolumeMutation - get copyWith => CopyWith$Mutation$UnmountVolumeMutation(this, (i) => i); -} - -abstract class CopyWith$Mutation$UnmountVolumeMutation { - factory CopyWith$Mutation$UnmountVolumeMutation( - Mutation$UnmountVolumeMutation instance, - TRes Function(Mutation$UnmountVolumeMutation) then) = - _CopyWithImpl$Mutation$UnmountVolumeMutation; - - factory CopyWith$Mutation$UnmountVolumeMutation.stub(TRes res) = - _CopyWithStubImpl$Mutation$UnmountVolumeMutation; - - TRes call( - {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, - String? $__typename}); - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume get unmountVolume; -} - -class _CopyWithImpl$Mutation$UnmountVolumeMutation - implements CopyWith$Mutation$UnmountVolumeMutation { - _CopyWithImpl$Mutation$UnmountVolumeMutation(this._instance, this._then); - - final Mutation$UnmountVolumeMutation _instance; - - final TRes Function(Mutation$UnmountVolumeMutation) _then; - - static const _undefined = {}; - - TRes call( - {Object? unmountVolume = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UnmountVolumeMutation( - unmountVolume: unmountVolume == _undefined || unmountVolume == null - ? _instance.unmountVolume - : (unmountVolume as Mutation$UnmountVolumeMutation$unmountVolume), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume - get unmountVolume { - final local$unmountVolume = _instance.unmountVolume; - return CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( - local$unmountVolume, (e) => call(unmountVolume: e)); - } -} - -class _CopyWithStubImpl$Mutation$UnmountVolumeMutation - implements CopyWith$Mutation$UnmountVolumeMutation { - _CopyWithStubImpl$Mutation$UnmountVolumeMutation(this._res); - - TRes _res; - - call( - {Mutation$UnmountVolumeMutation$unmountVolume? unmountVolume, +extension UtilityExtension$Mutation$UnmountVolume on Mutation$UnmountVolume { + Mutation$UnmountVolume copyWith( + {Mutation$UnmountVolume$unmountVolume? unmountVolume, String? $__typename}) => - _res; - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume - get unmountVolume => - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(_res); + Mutation$UnmountVolume( + unmountVolume: + unmountVolume == null ? this.unmountVolume : unmountVolume, + $__typename: $__typename == null ? this.$__typename : $__typename); } -const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ +const documentNodeMutationUnmountVolume = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.mutation, - name: NameNode(value: 'UnmountVolumeMutation'), + name: NameNode(value: 'UnmountVolume'), variableDefinitions: [ VariableDefinitionNode( variable: VariableNode(name: NameNode(value: 'name')), @@ -1673,24 +1484,9 @@ const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ ], 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), + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), FieldNode( name: NameNode(value: '__typename'), alias: null, @@ -1705,25 +1501,26 @@ const documentNodeMutationUnmountVolumeMutation = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Mutation$UnmountVolumeMutation _parserFn$Mutation$UnmountVolumeMutation( +Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume( Map data) => - Mutation$UnmountVolumeMutation.fromJson(data); -typedef OnMutationCompleted$Mutation$UnmountVolumeMutation = FutureOr - Function(dynamic, Mutation$UnmountVolumeMutation?); + Mutation$UnmountVolume.fromJson(data); +typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr Function( + dynamic, Mutation$UnmountVolume?); -class Options$Mutation$UnmountVolumeMutation - extends graphql.MutationOptions { - Options$Mutation$UnmountVolumeMutation( +class Options$Mutation$UnmountVolume + extends graphql.MutationOptions { + Options$Mutation$UnmountVolume( {String? operationName, - required Variables$Mutation$UnmountVolumeMutation variables, + required Variables$Mutation$UnmountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, graphql.Context? context, - OnMutationCompleted$Mutation$UnmountVolumeMutation? onCompleted, - graphql.OnMutationUpdate? update, + OnMutationCompleted$Mutation$UnmountVolume? onCompleted, + graphql.OnMutationUpdate? update, graphql.OnError? onError}) : onCompletedWithParsed = onCompleted, super( @@ -1740,14 +1537,13 @@ class Options$Mutation$UnmountVolumeMutation data, data == null ? null - : _parserFn$Mutation$UnmountVolumeMutation(data)), + : _parserFn$Mutation$UnmountVolume(data)), update: update, onError: onError, - document: documentNodeMutationUnmountVolumeMutation, - parserFn: _parserFn$Mutation$UnmountVolumeMutation); + document: documentNodeMutationUnmountVolume, + parserFn: _parserFn$Mutation$UnmountVolume); - final OnMutationCompleted$Mutation$UnmountVolumeMutation? - onCompletedWithParsed; + final OnMutationCompleted$Mutation$UnmountVolume? onCompletedWithParsed; @override List get properties => [ @@ -1758,11 +1554,11 @@ class Options$Mutation$UnmountVolumeMutation ]; } -class WatchOptions$Mutation$UnmountVolumeMutation - extends graphql.WatchQueryOptions { - WatchOptions$Mutation$UnmountVolumeMutation( +class WatchOptions$Mutation$UnmountVolume + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UnmountVolume( {String? operationName, - required Variables$Mutation$UnmountVolumeMutation variables, + required Variables$Mutation$UnmountVolume variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, @@ -1780,38 +1576,36 @@ class WatchOptions$Mutation$UnmountVolumeMutation cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeMutationUnmountVolumeMutation, + document: documentNodeMutationUnmountVolume, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Mutation$UnmountVolumeMutation); + parserFn: _parserFn$Mutation$UnmountVolume); } -extension ClientExtension$Mutation$UnmountVolumeMutation - on graphql.GraphQLClient { - Future> - mutate$UnmountVolumeMutation( - Options$Mutation$UnmountVolumeMutation options) async => - await this.mutate(options); - graphql.ObservableQuery - watchMutation$UnmountVolumeMutation( - WatchOptions$Mutation$UnmountVolumeMutation options) => - this.watchMutation(options); +extension ClientExtension$Mutation$UnmountVolume on graphql.GraphQLClient { + Future> mutate$UnmountVolume( + Options$Mutation$UnmountVolume options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$UnmountVolume( + WatchOptions$Mutation$UnmountVolume options) => + this.watchMutation(options); } @JsonSerializable(explicitToJson: true) -class Mutation$UnmountVolumeMutation$unmountVolume { - Mutation$UnmountVolumeMutation$unmountVolume( +class Mutation$UnmountVolume$unmountVolume + implements Fragment$basicMutationReturnFields { + Mutation$UnmountVolume$unmountVolume( {required this.code, required this.message, required this.success, required this.$__typename}); @override - factory Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + factory Mutation$UnmountVolume$unmountVolume.fromJson( Map json) => - _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson(json); + _$Mutation$UnmountVolume$unmountVolumeFromJson(json); final int code; @@ -1823,7 +1617,7 @@ class Mutation$UnmountVolumeMutation$unmountVolume { final String $__typename; Map toJson() => - _$Mutation$UnmountVolumeMutation$unmountVolumeToJson(this); + _$Mutation$UnmountVolume$unmountVolumeToJson(this); int get hashCode { final l$code = code; final l$message = message; @@ -1835,7 +1629,7 @@ class Mutation$UnmountVolumeMutation$unmountVolume { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Mutation$UnmountVolumeMutation$unmountVolume) || + if (!(other is Mutation$UnmountVolume$unmountVolume) || runtimeType != other.runtimeType) return false; final l$code = code; final lOther$code = other.code; @@ -1853,63 +1647,544 @@ class Mutation$UnmountVolumeMutation$unmountVolume { } } -extension UtilityExtension$Mutation$UnmountVolumeMutation$unmountVolume - on Mutation$UnmountVolumeMutation$unmountVolume { - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume< - Mutation$UnmountVolumeMutation$unmountVolume> - get copyWith => - CopyWith$Mutation$UnmountVolumeMutation$unmountVolume(this, (i) => i); +extension UtilityExtension$Mutation$UnmountVolume$unmountVolume + on Mutation$UnmountVolume$unmountVolume { + Mutation$UnmountVolume$unmountVolume copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$UnmountVolume$unmountVolume( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume( - Mutation$UnmountVolumeMutation$unmountVolume instance, - TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) then) = - _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume; +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MigrateToBinds { + Variables$Mutation$MigrateToBinds({required this.input}); - factory CopyWith$Mutation$UnmountVolumeMutation$unmountVolume.stub(TRes res) = - _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume; + @override + factory Variables$Mutation$MigrateToBinds.fromJson( + Map json) => + _$Variables$Mutation$MigrateToBindsFromJson(json); - TRes call({int? code, String? message, bool? success, String? $__typename}); + final Input$MigrateToBindsInput input; + + Map toJson() => + _$Variables$Mutation$MigrateToBindsToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$MigrateToBinds) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$MigrateToBinds copyWith( + {Input$MigrateToBindsInput? input}) => + Variables$Mutation$MigrateToBinds( + input: input == null ? this.input : input); } -class _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume - implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - _CopyWithImpl$Mutation$UnmountVolumeMutation$unmountVolume( - this._instance, this._then); +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds { + Mutation$MigrateToBinds( + {required this.migrateToBinds, required this.$__typename}); - final Mutation$UnmountVolumeMutation$unmountVolume _instance; + @override + factory Mutation$MigrateToBinds.fromJson(Map json) => + _$Mutation$MigrateToBindsFromJson(json); - final TRes Function(Mutation$UnmountVolumeMutation$unmountVolume) _then; + final Mutation$MigrateToBinds$migrateToBinds migrateToBinds; - static const _undefined = {}; + @JsonKey(name: '__typename') + final String $__typename; - TRes call( - {Object? code = _undefined, - Object? message = _undefined, - Object? success = _undefined, - Object? $__typename = _undefined}) => - _then(Mutation$UnmountVolumeMutation$unmountVolume( - 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))); + Map toJson() => _$Mutation$MigrateToBindsToJson(this); + int get hashCode { + final l$migrateToBinds = migrateToBinds; + final l$$__typename = $__typename; + return Object.hashAll([l$migrateToBinds, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds) || runtimeType != other.runtimeType) + return false; + final l$migrateToBinds = migrateToBinds; + final lOther$migrateToBinds = other.migrateToBinds; + if (l$migrateToBinds != lOther$migrateToBinds) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } } -class _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume - implements CopyWith$Mutation$UnmountVolumeMutation$unmountVolume { - _CopyWithStubImpl$Mutation$UnmountVolumeMutation$unmountVolume(this._res); - - TRes _res; - - call({int? code, String? message, bool? success, String? $__typename}) => - _res; +extension UtilityExtension$Mutation$MigrateToBinds on Mutation$MigrateToBinds { + Mutation$MigrateToBinds copyWith( + {Mutation$MigrateToBinds$migrateToBinds? migrateToBinds, + String? $__typename}) => + Mutation$MigrateToBinds( + migrateToBinds: + migrateToBinds == null ? this.migrateToBinds : migrateToBinds, + $__typename: $__typename == null ? this.$__typename : $__typename); } + +const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'MigrateToBinds'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MigrateToBindsInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'migrateToBinds'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + 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, +]); +Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds( + Map data) => + Mutation$MigrateToBinds.fromJson(data); +typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr Function( + dynamic, Mutation$MigrateToBinds?); + +class Options$Mutation$MigrateToBinds + extends graphql.MutationOptions { + Options$Mutation$MigrateToBinds( + {String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MigrateToBinds? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$MigrateToBinds(data)), + update: update, + onError: onError, + document: documentNodeMutationMigrateToBinds, + parserFn: _parserFn$Mutation$MigrateToBinds); + + final OnMutationCompleted$Mutation$MigrateToBinds? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$MigrateToBinds + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MigrateToBinds( + {String? operationName, + required Variables$Mutation$MigrateToBinds variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMigrateToBinds, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MigrateToBinds); +} + +extension ClientExtension$Mutation$MigrateToBinds on graphql.GraphQLClient { + Future> mutate$MigrateToBinds( + Options$Mutation$MigrateToBinds options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MigrateToBinds( + WatchOptions$Mutation$MigrateToBinds options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds$migrateToBinds + implements Fragment$basicMutationReturnFields { + Mutation$MigrateToBinds$migrateToBinds( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job}); + + @override + factory Mutation$MigrateToBinds$migrateToBinds.fromJson( + Map json) => + _$Mutation$MigrateToBinds$migrateToBindsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$MigrateToBinds$migrateToBinds$job? job; + + Map toJson() => + _$Mutation$MigrateToBinds$migrateToBindsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$job = job; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds$migrateToBinds) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds + on Mutation$MigrateToBinds$migrateToBinds { + Mutation$MigrateToBinds$migrateToBinds copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MigrateToBinds$migrateToBinds$job? Function()? job}) => + Mutation$MigrateToBinds$migrateToBinds( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + job: job == null ? this.job : job()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MigrateToBinds$migrateToBinds$job { + Mutation$MigrateToBinds$migrateToBinds$job( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + Map json) => + _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$MigrateToBinds$migrateToBinds$jobToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job + on Mutation$MigrateToBinds$migrateToBinds$job { + Mutation$MigrateToBinds$migrateToBinds$job copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart index 49a749fe..c1ab4fba 100644 --- a/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/disk_volumes.graphql.g.dart @@ -6,57 +6,78 @@ part of 'disk_volumes.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Query$GetServerDiskVolumesQuery _$Query$GetServerDiskVolumesQueryFromJson( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( Map json) => - Query$GetServerDiskVolumesQuery( - storage: Query$GetServerDiskVolumesQuery$storage.fromJson( + 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) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumes _$Query$GetServerDiskVolumesFromJson( + Map json) => + Query$GetServerDiskVolumes( + storage: Query$GetServerDiskVolumes$storage.fromJson( json['storage'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetServerDiskVolumesQueryToJson( - Query$GetServerDiskVolumesQuery instance) => +Map _$Query$GetServerDiskVolumesToJson( + Query$GetServerDiskVolumes instance) => { 'storage': instance.storage.toJson(), '__typename': instance.$__typename, }; -Query$GetServerDiskVolumesQuery$storage - _$Query$GetServerDiskVolumesQuery$storageFromJson( - Map json) => - Query$GetServerDiskVolumesQuery$storage( - volumes: (json['volumes'] as List) - .map((e) => - Query$GetServerDiskVolumesQuery$storage$volumes.fromJson( - e as Map)) - .toList(), - $__typename: json['__typename'] as String, - ); +Query$GetServerDiskVolumes$storage _$Query$GetServerDiskVolumes$storageFromJson( + Map json) => + Query$GetServerDiskVolumes$storage( + volumes: (json['volumes'] as List) + .map((e) => Query$GetServerDiskVolumes$storage$volumes.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); -Map _$Query$GetServerDiskVolumesQuery$storageToJson( - Query$GetServerDiskVolumesQuery$storage instance) => +Map _$Query$GetServerDiskVolumes$storageToJson( + Query$GetServerDiskVolumes$storage instance) => { 'volumes': instance.volumes.map((e) => e.toJson()).toList(), '__typename': instance.$__typename, }; -Query$GetServerDiskVolumesQuery$storage$volumes - _$Query$GetServerDiskVolumesQuery$storage$volumesFromJson( +Query$GetServerDiskVolumes$storage$volumes + _$Query$GetServerDiskVolumes$storage$volumesFromJson( Map json) => - Query$GetServerDiskVolumesQuery$storage$volumes( + Query$GetServerDiskVolumes$storage$volumes( freeSpace: json['freeSpace'] as String, - model: json['model'] as String, + model: json['model'] as String?, name: json['name'] as String, root: json['root'] as bool, - serial: json['serial'] as String, + serial: json['serial'] as String?, totalSpace: json['totalSpace'] as String, type: json['type'] as String, + usages: (json['usages'] as List) + .map((e) => + Query$GetServerDiskVolumes$storage$volumes$usages.fromJson( + e as Map)) + .toList(), usedSpace: json['usedSpace'] as String, $__typename: json['__typename'] as String, ); -Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( - Query$GetServerDiskVolumesQuery$storage$volumes instance) => +Map _$Query$GetServerDiskVolumes$storage$volumesToJson( + Query$GetServerDiskVolumes$storage$volumes instance) => { 'freeSpace': instance.freeSpace, 'model': instance.model, @@ -65,50 +86,111 @@ Map _$Query$GetServerDiskVolumesQuery$storage$volumesToJson( 'serial': instance.serial, 'totalSpace': instance.totalSpace, 'type': instance.type, + 'usages': instance.usages.map((e) => e.toJson()).toList(), 'usedSpace': instance.usedSpace, '__typename': instance.$__typename, }; -Variables$Mutation$MountVolumeMutation - _$Variables$Mutation$MountVolumeMutationFromJson( +Query$GetServerDiskVolumes$storage$volumes$usages + _$Query$GetServerDiskVolumes$storage$volumes$usagesFromJson( Map json) => - Variables$Mutation$MountVolumeMutation( - name: json['name'] as String, + Query$GetServerDiskVolumes$storage$volumes$usages( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, ); -Map _$Variables$Mutation$MountVolumeMutationToJson( - Variables$Mutation$MountVolumeMutation instance) => +Map _$Query$GetServerDiskVolumes$storage$volumes$usagesToJson( + Query$GetServerDiskVolumes$storage$volumes$usages instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + }; + +Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageFromJson( + Map json) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + $__typename: json['__typename'] as String, + service: json['service'] == null + ? null + : Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + .fromJson(json['service'] as Map), + ); + +Map + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsageToJson( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage + instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + '__typename': instance.$__typename, + 'service': instance.service?.toJson(), + }; + +Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceFromJson( + Map json) => + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service( + id: json['id'] as String, + isMovable: json['isMovable'] as bool, + displayName: json['displayName'] as String, + $__typename: json['__typename'] as String, + ); + +Map + _$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$serviceToJson( + Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage$service + instance) => + { + 'id': instance.id, + 'isMovable': instance.isMovable, + 'displayName': instance.displayName, + '__typename': instance.$__typename, + }; + +Variables$Mutation$MountVolume _$Variables$Mutation$MountVolumeFromJson( + Map json) => + Variables$Mutation$MountVolume( + name: json['name'] as String, + ); + +Map _$Variables$Mutation$MountVolumeToJson( + Variables$Mutation$MountVolume instance) => { 'name': instance.name, }; -Mutation$MountVolumeMutation _$Mutation$MountVolumeMutationFromJson( +Mutation$MountVolume _$Mutation$MountVolumeFromJson( Map json) => - Mutation$MountVolumeMutation( - mountVolume: Mutation$MountVolumeMutation$mountVolume.fromJson( + Mutation$MountVolume( + mountVolume: Mutation$MountVolume$mountVolume.fromJson( json['mountVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$MountVolumeMutationToJson( - Mutation$MountVolumeMutation instance) => +Map _$Mutation$MountVolumeToJson( + Mutation$MountVolume instance) => { 'mountVolume': instance.mountVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$MountVolumeMutation$mountVolume - _$Mutation$MountVolumeMutation$mountVolumeFromJson( - Map json) => - Mutation$MountVolumeMutation$mountVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); +Mutation$MountVolume$mountVolume _$Mutation$MountVolume$mountVolumeFromJson( + Map json) => + Mutation$MountVolume$mountVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); -Map _$Mutation$MountVolumeMutation$mountVolumeToJson( - Mutation$MountVolumeMutation$mountVolume instance) => +Map _$Mutation$MountVolume$mountVolumeToJson( + Mutation$MountVolume$mountVolume instance) => { 'code': instance.code, 'message': instance.message, @@ -116,46 +198,44 @@ Map _$Mutation$MountVolumeMutation$mountVolumeToJson( '__typename': instance.$__typename, }; -Variables$Mutation$ResizeVolumeMutation - _$Variables$Mutation$ResizeVolumeMutationFromJson( - Map json) => - Variables$Mutation$ResizeVolumeMutation( - name: json['name'] as String, - ); +Variables$Mutation$ResizeVolume _$Variables$Mutation$ResizeVolumeFromJson( + Map json) => + Variables$Mutation$ResizeVolume( + name: json['name'] as String, + ); -Map _$Variables$Mutation$ResizeVolumeMutationToJson( - Variables$Mutation$ResizeVolumeMutation instance) => +Map _$Variables$Mutation$ResizeVolumeToJson( + Variables$Mutation$ResizeVolume instance) => { 'name': instance.name, }; -Mutation$ResizeVolumeMutation _$Mutation$ResizeVolumeMutationFromJson( +Mutation$ResizeVolume _$Mutation$ResizeVolumeFromJson( Map json) => - Mutation$ResizeVolumeMutation( - resizeVolume: Mutation$ResizeVolumeMutation$resizeVolume.fromJson( + Mutation$ResizeVolume( + resizeVolume: Mutation$ResizeVolume$resizeVolume.fromJson( json['resizeVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$ResizeVolumeMutationToJson( - Mutation$ResizeVolumeMutation instance) => +Map _$Mutation$ResizeVolumeToJson( + Mutation$ResizeVolume instance) => { 'resizeVolume': instance.resizeVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$ResizeVolumeMutation$resizeVolume - _$Mutation$ResizeVolumeMutation$resizeVolumeFromJson( - Map json) => - Mutation$ResizeVolumeMutation$resizeVolume( - code: json['code'] as int, - message: json['message'] as String, - success: json['success'] as bool, - $__typename: json['__typename'] as String, - ); +Mutation$ResizeVolume$resizeVolume _$Mutation$ResizeVolume$resizeVolumeFromJson( + Map json) => + Mutation$ResizeVolume$resizeVolume( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); -Map _$Mutation$ResizeVolumeMutation$resizeVolumeToJson( - Mutation$ResizeVolumeMutation$resizeVolume instance) => +Map _$Mutation$ResizeVolume$resizeVolumeToJson( + Mutation$ResizeVolume$resizeVolume instance) => { 'code': instance.code, 'message': instance.message, @@ -163,49 +243,134 @@ Map _$Mutation$ResizeVolumeMutation$resizeVolumeToJson( '__typename': instance.$__typename, }; -Variables$Mutation$UnmountVolumeMutation - _$Variables$Mutation$UnmountVolumeMutationFromJson( - Map json) => - Variables$Mutation$UnmountVolumeMutation( - name: json['name'] as String, - ); +Variables$Mutation$UnmountVolume _$Variables$Mutation$UnmountVolumeFromJson( + Map json) => + Variables$Mutation$UnmountVolume( + name: json['name'] as String, + ); -Map _$Variables$Mutation$UnmountVolumeMutationToJson( - Variables$Mutation$UnmountVolumeMutation instance) => +Map _$Variables$Mutation$UnmountVolumeToJson( + Variables$Mutation$UnmountVolume instance) => { 'name': instance.name, }; -Mutation$UnmountVolumeMutation _$Mutation$UnmountVolumeMutationFromJson( +Mutation$UnmountVolume _$Mutation$UnmountVolumeFromJson( Map json) => - Mutation$UnmountVolumeMutation( - unmountVolume: Mutation$UnmountVolumeMutation$unmountVolume.fromJson( + Mutation$UnmountVolume( + unmountVolume: Mutation$UnmountVolume$unmountVolume.fromJson( json['unmountVolume'] as Map), $__typename: json['__typename'] as String, ); -Map _$Mutation$UnmountVolumeMutationToJson( - Mutation$UnmountVolumeMutation instance) => +Map _$Mutation$UnmountVolumeToJson( + Mutation$UnmountVolume instance) => { 'unmountVolume': instance.unmountVolume.toJson(), '__typename': instance.$__typename, }; -Mutation$UnmountVolumeMutation$unmountVolume - _$Mutation$UnmountVolumeMutation$unmountVolumeFromJson( - Map json) => - Mutation$UnmountVolumeMutation$unmountVolume( +Mutation$UnmountVolume$unmountVolume + _$Mutation$UnmountVolume$unmountVolumeFromJson(Map json) => + Mutation$UnmountVolume$unmountVolume( code: json['code'] as int, message: json['message'] as String, success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Mutation$UnmountVolumeMutation$unmountVolumeToJson( - Mutation$UnmountVolumeMutation$unmountVolume instance) => +Map _$Mutation$UnmountVolume$unmountVolumeToJson( + Mutation$UnmountVolume$unmountVolume instance) => { 'code': instance.code, 'message': instance.message, 'success': instance.success, '__typename': instance.$__typename, }; + +Variables$Mutation$MigrateToBinds _$Variables$Mutation$MigrateToBindsFromJson( + Map json) => + Variables$Mutation$MigrateToBinds( + input: Input$MigrateToBindsInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$MigrateToBindsToJson( + Variables$Mutation$MigrateToBinds instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$MigrateToBinds _$Mutation$MigrateToBindsFromJson( + Map json) => + Mutation$MigrateToBinds( + migrateToBinds: Mutation$MigrateToBinds$migrateToBinds.fromJson( + json['migrateToBinds'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MigrateToBindsToJson( + Mutation$MigrateToBinds instance) => + { + 'migrateToBinds': instance.migrateToBinds.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$MigrateToBinds$migrateToBinds + _$Mutation$MigrateToBinds$migrateToBindsFromJson( + Map json) => + Mutation$MigrateToBinds$migrateToBinds( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + job: json['job'] == null + ? null + : Mutation$MigrateToBinds$migrateToBinds$job.fromJson( + json['job'] as Map), + ); + +Map _$Mutation$MigrateToBinds$migrateToBindsToJson( + Mutation$MigrateToBinds$migrateToBinds instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'job': instance.job?.toJson(), + }; + +Mutation$MigrateToBinds$migrateToBinds$job + _$Mutation$MigrateToBinds$migrateToBinds$jobFromJson( + Map json) => + Mutation$MigrateToBinds$migrateToBinds$job( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MigrateToBinds$migrateToBinds$jobToJson( + Mutation$MigrateToBinds$migrateToBinds$job instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 81ab4bc5..2f60c969 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -1,63 +1,76 @@ -scalar DateTime - type Alert { - severity: Severity! - title: String! message: String! + severity: Severity! timestamp: DateTime -} - -type StorageVolume { - freeSpace: String! - model: String! - name: String! - root: Boolean! - serial: String! - totalSpace: String! - type: String! - usedSpace: String! -} - -type Storage { - volumes: [StorageVolume!]! + title: String! } type Api { - version: String! devices: [ApiDevice!]! recoveryKey: ApiRecoveryKeyStatus! + version: String! } type ApiDevice { - name: String! creationDate: DateTime! isCaller: Boolean! + name: String! +} + +type ApiJob { + createdAt: DateTime! + description: String! + error: String + finishedAt: DateTime + name: String! + progress: Int + result: String + status: String! + statusText: String + uid: String! + updatedAt: DateTime! } type ApiKeyMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! code: Int! key: String + message: String! + success: Boolean! } type ApiRecoveryKeyStatus { - exists: Boolean! - valid: Boolean! creationDate: DateTime + exists: Boolean! expirationDate: DateTime usesLeft: Int + valid: Boolean! } type AutoUpgradeOptions { - enable: Boolean! allowReboot: Boolean! + enable: Boolean! } -type DeviceApiTokenMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! +input AutoUpgradeSettingsInput { + enableAutoUpgrade: Boolean = null + allowReboot: Boolean = null +} + +type AutoUpgradeSettingsMutationReturn implements MutationReturnInterface { + allowReboot: Boolean! code: Int! + enableAutoUpgrade: Boolean! + message: String! + success: Boolean! +} + +"""Date with time (isoformat)""" +scalar DateTime + +type DeviceApiTokenMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! token: String } @@ -66,59 +79,163 @@ enum DnsProvider { } type DnsRecord { - recordType: String! - name: String! content: String! - ttl: Int! + name: String! priority: Int + recordType: String! + ttl: Int! +} + +type GenericJobButationReturn implements MutationReturnInterface { + code: Int! + job: ApiJob + message: String! + success: Boolean! } type GenericMutationReturn implements MutationReturnInterface { - success: Boolean! - message: String! code: Int! + message: String! + success: Boolean! +} + +type Job { + getJob(jobId: String!): ApiJob + getJobs: [ApiJob!]! +} + +input MigrateToBindsInput { + emailBlockDevice: String! + bitwardenBlockDevice: String! + giteaBlockDevice: String! + nextcloudBlockDevice: String! + pleromaBlockDevice: String! +} + +input MoveServiceInput { + serviceId: String! + location: String! } type Mutation { - getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput!): ApiKeyMutationReturn! - useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! - refreshDeviceApiToken: DeviceApiTokenMutationReturn! - deleteDeviceApiToken(device: String!): GenericMutationReturn! - getNewDeviceApiKey: ApiKeyMutationReturn! - invalidateNewDeviceApiKey: GenericMutationReturn! + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! - resizeVolume(name: String!): GenericMutationReturn! - unmountVolume(name: String!): GenericMutationReturn! + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! + changeTimezone(timezone: String!): TimezoneMutationReturn! + createUser(user: UserMutationInput!): UserMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + deleteUser(username: String!): GenericMutationReturn! + disableService(serviceId: String!): ServiceMutationReturn! + enableService(serviceId: String!): ServiceMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput = null): ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! mountVolume(name: String!): GenericMutationReturn! + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! + pullRepositoryChanges: GenericMutationReturn! + rebootSystem: GenericMutationReturn! + refreshDeviceApiToken: DeviceApiTokenMutationReturn! + removeJob(jobId: String!): GenericMutationReturn! + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! + resizeVolume(name: String!): GenericMutationReturn! + restartService(serviceId: String!): ServiceMutationReturn! + runSystemRebuild: GenericMutationReturn! + runSystemRollback: GenericMutationReturn! + runSystemUpgrade: GenericMutationReturn! + startService(serviceId: String!): ServiceMutationReturn! + stopService(serviceId: String!): ServiceMutationReturn! + testMutation: GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + updateUser(user: UserMutationInput!): UserMutationReturn! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! } interface MutationReturnInterface { - success: Boolean! - message: String! code: Int! + message: String! + success: Boolean! } type Query { - system: System! - storage: Storage! api: Api! + jobs: Job! + services: Services! + storage: Storage! + system: System! + users: Users! } input RecoveryKeyLimitsInput { - expirationDate: DateTime - uses: Int + expirationDate: DateTime = null + uses: Int = null } enum ServerProvider { HETZNER } +type Service { + description: String! + displayName: String! + dnsRecords: [DnsRecord!] + id: String! + isEnabled: Boolean! + isMovable: Boolean! + isRequired: Boolean! + status: ServiceStatusEnum! + storageUsage: ServiceStorageUsage! + svgIcon: String! + url: String +} + +type ServiceJobMutationReturn implements MutationReturnInterface { + code: Int! + job: ApiJob + message: String! + service: Service + success: Boolean! +} + +type ServiceMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + service: Service + success: Boolean! +} + +enum ServiceStatusEnum { + ACTIVATING + ACTIVE + DEACTIVATING + FAILED + INACTIVE + OFF + RELOADING +} + +type ServiceStorageUsage implements StorageUsageInterface { + service: Service + title: String! + usedSpace: String! + volume: StorageVolume +} + +type Services { + allServices: [Service!]! +} + enum Severity { - INFO - WARNING - ERROR CRITICAL + ERROR + INFO SUCCESS + WARNING +} + +input SshMutationInput { + username: String! + sshKey: String! } type SshSettings { @@ -127,13 +244,40 @@ type SshSettings { rootSshKeys: [String!]! } +type Storage { + volumes: [StorageVolume!]! +} + +interface StorageUsageInterface { + title: String! + usedSpace: String! + volume: StorageVolume +} + +type StorageVolume { + freeSpace: String! + model: String + name: String! + root: Boolean! + serial: String + totalSpace: String! + type: String! + usages: [StorageUsageInterface!]! + usedSpace: String! +} + +type Subscription { + count(target: Int! = 100): Int! +} + type System { - status: Alert! - domain: SystemDomainInfo! - settings: SystemSettings! + busy: Boolean! + domainInfo: SystemDomainInfo! info: SystemInfo! provider: SystemProviderInfo! - busy: Boolean! + settings: SystemSettings! + status: Alert! + workingDirectory: String! } type SystemDomainInfo { @@ -144,13 +288,14 @@ type SystemDomainInfo { } type SystemInfo { - systemVersion: String! pythonVersion: String! + systemVersion: String! + usingBinds: Boolean! } type SystemProviderInfo { - provider: ServerProvider! id: String! + provider: ServerProvider! } type SystemSettings { @@ -159,6 +304,13 @@ type SystemSettings { timezone: String! } +type TimezoneMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! + timezone: String +} + input UseNewDeviceKeyInput { key: String! deviceName: String! @@ -167,4 +319,33 @@ input UseNewDeviceKeyInput { input UseRecoveryKeyInput { key: String! deviceName: String! +} + +type User { + sshKeys: [String!]! + userType: UserType! + username: String! +} + +input UserMutationInput { + username: String! + password: String! +} + +type UserMutationReturn implements MutationReturnInterface { + code: Int! + message: String! + success: Boolean! + user: User +} + +enum UserType { + NORMAL + PRIMARY + ROOT +} + +type Users { + allUsers: [User!]! + getUser(username: String!): User } \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart index 27f902e2..cd86d73a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -2,6 +2,174 @@ import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; part 'schema.graphql.g.dart'; +@JsonSerializable(explicitToJson: true) +class Input$AutoUpgradeSettingsInput { + Input$AutoUpgradeSettingsInput({this.enableAutoUpgrade, this.allowReboot}); + + @override + factory Input$AutoUpgradeSettingsInput.fromJson(Map json) => + _$Input$AutoUpgradeSettingsInputFromJson(json); + + final bool? enableAutoUpgrade; + + final bool? allowReboot; + + Map toJson() => _$Input$AutoUpgradeSettingsInputToJson(this); + int get hashCode { + final l$enableAutoUpgrade = enableAutoUpgrade; + final l$allowReboot = allowReboot; + return Object.hashAll([l$enableAutoUpgrade, l$allowReboot]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$AutoUpgradeSettingsInput) || + runtimeType != other.runtimeType) return false; + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + return true; + } + + Input$AutoUpgradeSettingsInput copyWith( + {bool? Function()? enableAutoUpgrade, + bool? Function()? allowReboot}) => + Input$AutoUpgradeSettingsInput( + enableAutoUpgrade: enableAutoUpgrade == null + ? this.enableAutoUpgrade + : enableAutoUpgrade(), + allowReboot: allowReboot == null ? this.allowReboot : allowReboot()); +} + +@JsonSerializable(explicitToJson: true) +class Input$MigrateToBindsInput { + Input$MigrateToBindsInput( + {required this.emailBlockDevice, + required this.bitwardenBlockDevice, + required this.giteaBlockDevice, + required this.nextcloudBlockDevice, + required this.pleromaBlockDevice}); + + @override + factory Input$MigrateToBindsInput.fromJson(Map json) => + _$Input$MigrateToBindsInputFromJson(json); + + final String emailBlockDevice; + + final String bitwardenBlockDevice; + + final String giteaBlockDevice; + + final String nextcloudBlockDevice; + + final String pleromaBlockDevice; + + Map toJson() => _$Input$MigrateToBindsInputToJson(this); + int get hashCode { + final l$emailBlockDevice = emailBlockDevice; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final l$giteaBlockDevice = giteaBlockDevice; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final l$pleromaBlockDevice = pleromaBlockDevice; + return Object.hashAll([ + l$emailBlockDevice, + l$bitwardenBlockDevice, + l$giteaBlockDevice, + l$nextcloudBlockDevice, + l$pleromaBlockDevice + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$MigrateToBindsInput) || + runtimeType != other.runtimeType) return false; + final l$emailBlockDevice = emailBlockDevice; + final lOther$emailBlockDevice = other.emailBlockDevice; + if (l$emailBlockDevice != lOther$emailBlockDevice) return false; + final l$bitwardenBlockDevice = bitwardenBlockDevice; + final lOther$bitwardenBlockDevice = other.bitwardenBlockDevice; + if (l$bitwardenBlockDevice != lOther$bitwardenBlockDevice) return false; + final l$giteaBlockDevice = giteaBlockDevice; + final lOther$giteaBlockDevice = other.giteaBlockDevice; + if (l$giteaBlockDevice != lOther$giteaBlockDevice) return false; + final l$nextcloudBlockDevice = nextcloudBlockDevice; + final lOther$nextcloudBlockDevice = other.nextcloudBlockDevice; + if (l$nextcloudBlockDevice != lOther$nextcloudBlockDevice) return false; + final l$pleromaBlockDevice = pleromaBlockDevice; + final lOther$pleromaBlockDevice = other.pleromaBlockDevice; + if (l$pleromaBlockDevice != lOther$pleromaBlockDevice) return false; + return true; + } + + Input$MigrateToBindsInput copyWith( + {String? emailBlockDevice, + String? bitwardenBlockDevice, + String? giteaBlockDevice, + String? nextcloudBlockDevice, + String? pleromaBlockDevice}) => + Input$MigrateToBindsInput( + emailBlockDevice: emailBlockDevice == null + ? this.emailBlockDevice + : emailBlockDevice, + bitwardenBlockDevice: bitwardenBlockDevice == null + ? this.bitwardenBlockDevice + : bitwardenBlockDevice, + giteaBlockDevice: giteaBlockDevice == null + ? this.giteaBlockDevice + : giteaBlockDevice, + nextcloudBlockDevice: nextcloudBlockDevice == null + ? this.nextcloudBlockDevice + : nextcloudBlockDevice, + pleromaBlockDevice: pleromaBlockDevice == null + ? this.pleromaBlockDevice + : pleromaBlockDevice); +} + +@JsonSerializable(explicitToJson: true) +class Input$MoveServiceInput { + Input$MoveServiceInput({required this.serviceId, required this.location}); + + @override + factory Input$MoveServiceInput.fromJson(Map json) => + _$Input$MoveServiceInputFromJson(json); + + final String serviceId; + + final String location; + + Map toJson() => _$Input$MoveServiceInputToJson(this); + int get hashCode { + final l$serviceId = serviceId; + final l$location = location; + return Object.hashAll([l$serviceId, l$location]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$MoveServiceInput) || runtimeType != other.runtimeType) + return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + final l$location = location; + final lOther$location = other.location; + if (l$location != lOther$location) return false; + return true; + } + + Input$MoveServiceInput copyWith({String? serviceId, String? location}) => + Input$MoveServiceInput( + serviceId: serviceId == null ? this.serviceId : serviceId, + location: location == null ? this.location : location); +} + @JsonSerializable(explicitToJson: true) class Input$RecoveryKeyLimitsInput { Input$RecoveryKeyLimitsInput({this.expirationDate, this.uses}); @@ -37,47 +205,51 @@ class Input$RecoveryKeyLimitsInput { return true; } - CopyWith$Input$RecoveryKeyLimitsInput - get copyWith => CopyWith$Input$RecoveryKeyLimitsInput(this, (i) => i); + Input$RecoveryKeyLimitsInput copyWith( + {DateTime? Function()? expirationDate, int? Function()? uses}) => + Input$RecoveryKeyLimitsInput( + expirationDate: + expirationDate == null ? this.expirationDate : expirationDate(), + uses: uses == null ? this.uses : uses()); } -abstract class CopyWith$Input$RecoveryKeyLimitsInput { - factory CopyWith$Input$RecoveryKeyLimitsInput( - Input$RecoveryKeyLimitsInput instance, - TRes Function(Input$RecoveryKeyLimitsInput) then) = - _CopyWithImpl$Input$RecoveryKeyLimitsInput; +@JsonSerializable(explicitToJson: true) +class Input$SshMutationInput { + Input$SshMutationInput({required this.username, required this.sshKey}); - factory CopyWith$Input$RecoveryKeyLimitsInput.stub(TRes res) = - _CopyWithStubImpl$Input$RecoveryKeyLimitsInput; + @override + factory Input$SshMutationInput.fromJson(Map json) => + _$Input$SshMutationInputFromJson(json); - TRes call({DateTime? expirationDate, int? uses}); -} + final String username; -class _CopyWithImpl$Input$RecoveryKeyLimitsInput - implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithImpl$Input$RecoveryKeyLimitsInput(this._instance, this._then); + final String sshKey; - final Input$RecoveryKeyLimitsInput _instance; + Map toJson() => _$Input$SshMutationInputToJson(this); + int get hashCode { + final l$username = username; + final l$sshKey = sshKey; + return Object.hashAll([l$username, l$sshKey]); + } - final TRes Function(Input$RecoveryKeyLimitsInput) _then; + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$SshMutationInput) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$sshKey = sshKey; + final lOther$sshKey = other.sshKey; + if (l$sshKey != lOther$sshKey) return false; + return true; + } - static const _undefined = {}; - - TRes call({Object? expirationDate = _undefined, Object? uses = _undefined}) => - _then(Input$RecoveryKeyLimitsInput( - expirationDate: expirationDate == _undefined - ? _instance.expirationDate - : (expirationDate as DateTime?), - uses: uses == _undefined ? _instance.uses : (uses as int?))); -} - -class _CopyWithStubImpl$Input$RecoveryKeyLimitsInput - implements CopyWith$Input$RecoveryKeyLimitsInput { - _CopyWithStubImpl$Input$RecoveryKeyLimitsInput(this._res); - - TRes _res; - - call({DateTime? expirationDate, int? uses}) => _res; + Input$SshMutationInput copyWith({String? username, String? sshKey}) => + Input$SshMutationInput( + username: username == null ? this.username : username, + sshKey: sshKey == null ? this.sshKey : sshKey); } @JsonSerializable(explicitToJson: true) @@ -113,49 +285,10 @@ class Input$UseNewDeviceKeyInput { return true; } - CopyWith$Input$UseNewDeviceKeyInput - get copyWith => CopyWith$Input$UseNewDeviceKeyInput(this, (i) => i); -} - -abstract class CopyWith$Input$UseNewDeviceKeyInput { - factory CopyWith$Input$UseNewDeviceKeyInput( - Input$UseNewDeviceKeyInput instance, - TRes Function(Input$UseNewDeviceKeyInput) then) = - _CopyWithImpl$Input$UseNewDeviceKeyInput; - - factory CopyWith$Input$UseNewDeviceKeyInput.stub(TRes res) = - _CopyWithStubImpl$Input$UseNewDeviceKeyInput; - - TRes call({String? key, String? deviceName}); -} - -class _CopyWithImpl$Input$UseNewDeviceKeyInput - implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithImpl$Input$UseNewDeviceKeyInput(this._instance, this._then); - - final Input$UseNewDeviceKeyInput _instance; - - final TRes Function(Input$UseNewDeviceKeyInput) _then; - - static const _undefined = {}; - - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseNewDeviceKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); -} - -class _CopyWithStubImpl$Input$UseNewDeviceKeyInput - implements CopyWith$Input$UseNewDeviceKeyInput { - _CopyWithStubImpl$Input$UseNewDeviceKeyInput(this._res); - - TRes _res; - - call({String? key, String? deviceName}) => _res; + Input$UseNewDeviceKeyInput copyWith({String? key, String? deviceName}) => + Input$UseNewDeviceKeyInput( + key: key == null ? this.key : key, + deviceName: deviceName == null ? this.deviceName : deviceName); } @JsonSerializable(explicitToJson: true) @@ -191,48 +324,49 @@ class Input$UseRecoveryKeyInput { return true; } - CopyWith$Input$UseRecoveryKeyInput get copyWith => - CopyWith$Input$UseRecoveryKeyInput(this, (i) => i); + Input$UseRecoveryKeyInput copyWith({String? key, String? deviceName}) => + Input$UseRecoveryKeyInput( + key: key == null ? this.key : key, + deviceName: deviceName == null ? this.deviceName : deviceName); } -abstract class CopyWith$Input$UseRecoveryKeyInput { - factory CopyWith$Input$UseRecoveryKeyInput(Input$UseRecoveryKeyInput instance, - TRes Function(Input$UseRecoveryKeyInput) then) = - _CopyWithImpl$Input$UseRecoveryKeyInput; +@JsonSerializable(explicitToJson: true) +class Input$UserMutationInput { + Input$UserMutationInput({required this.username, required this.password}); - factory CopyWith$Input$UseRecoveryKeyInput.stub(TRes res) = - _CopyWithStubImpl$Input$UseRecoveryKeyInput; + @override + factory Input$UserMutationInput.fromJson(Map json) => + _$Input$UserMutationInputFromJson(json); - TRes call({String? key, String? deviceName}); -} + final String username; -class _CopyWithImpl$Input$UseRecoveryKeyInput - implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithImpl$Input$UseRecoveryKeyInput(this._instance, this._then); + final String password; - final Input$UseRecoveryKeyInput _instance; + Map toJson() => _$Input$UserMutationInputToJson(this); + int get hashCode { + final l$username = username; + final l$password = password; + return Object.hashAll([l$username, l$password]); + } - final TRes Function(Input$UseRecoveryKeyInput) _then; + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Input$UserMutationInput) || runtimeType != other.runtimeType) + return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) return false; + return true; + } - static const _undefined = {}; - - TRes call({Object? key = _undefined, Object? deviceName = _undefined}) => - _then(Input$UseRecoveryKeyInput( - key: key == _undefined || key == null - ? _instance.key - : (key as String), - deviceName: deviceName == _undefined || deviceName == null - ? _instance.deviceName - : (deviceName as String))); -} - -class _CopyWithStubImpl$Input$UseRecoveryKeyInput - implements CopyWith$Input$UseRecoveryKeyInput { - _CopyWithStubImpl$Input$UseRecoveryKeyInput(this._res); - - TRes _res; - - call({String? key, String? deviceName}) => _res; + Input$UserMutationInput copyWith({String? username, String? password}) => + Input$UserMutationInput( + username: username == null ? this.username : username, + password: password == null ? this.password : password); } enum Enum$DnsProvider { @@ -247,26 +381,61 @@ enum Enum$ServerProvider { $unknown } +enum Enum$ServiceStatusEnum { + @JsonValue('ACTIVATING') + ACTIVATING, + @JsonValue('ACTIVE') + ACTIVE, + @JsonValue('DEACTIVATING') + DEACTIVATING, + @JsonValue('FAILED') + FAILED, + @JsonValue('INACTIVE') + INACTIVE, + @JsonValue('OFF') + OFF, + @JsonValue('RELOADING') + RELOADING, + $unknown +} + enum Enum$Severity { - @JsonValue('INFO') - INFO, - @JsonValue('WARNING') - WARNING, - @JsonValue('ERROR') - ERROR, @JsonValue('CRITICAL') CRITICAL, + @JsonValue('ERROR') + ERROR, + @JsonValue('INFO') + INFO, @JsonValue('SUCCESS') SUCCESS, + @JsonValue('WARNING') + WARNING, + $unknown +} + +enum Enum$UserType { + @JsonValue('NORMAL') + NORMAL, + @JsonValue('PRIMARY') + PRIMARY, + @JsonValue('ROOT') + ROOT, $unknown } const possibleTypesMap = { 'MutationReturnInterface': { 'ApiKeyMutationReturn', + 'AutoUpgradeSettingsMutationReturn', 'DeviceApiTokenMutationReturn', - 'GenericMutationReturn' - } + 'GenericJobButationReturn', + 'GenericMutationReturn', + 'ServiceJobMutationReturn', + 'ServiceMutationReturn', + 'TimezoneMutationReturn', + 'UserMutationReturn' + }, + 'StorageUsageInterface': {'ServiceStorageUsage'} }; DateTime? _nullable$dateTimeFromJson(dynamic data) => data == null ? null : dateTimeFromJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart index 9002a8e1..d3008d30 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.g.dart @@ -6,6 +6,54 @@ part of 'schema.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** +Input$AutoUpgradeSettingsInput _$Input$AutoUpgradeSettingsInputFromJson( + Map json) => + Input$AutoUpgradeSettingsInput( + enableAutoUpgrade: json['enableAutoUpgrade'] as bool?, + allowReboot: json['allowReboot'] as bool?, + ); + +Map _$Input$AutoUpgradeSettingsInputToJson( + Input$AutoUpgradeSettingsInput instance) => + { + 'enableAutoUpgrade': instance.enableAutoUpgrade, + 'allowReboot': instance.allowReboot, + }; + +Input$MigrateToBindsInput _$Input$MigrateToBindsInputFromJson( + Map json) => + Input$MigrateToBindsInput( + emailBlockDevice: json['emailBlockDevice'] as String, + bitwardenBlockDevice: json['bitwardenBlockDevice'] as String, + giteaBlockDevice: json['giteaBlockDevice'] as String, + nextcloudBlockDevice: json['nextcloudBlockDevice'] as String, + pleromaBlockDevice: json['pleromaBlockDevice'] as String, + ); + +Map _$Input$MigrateToBindsInputToJson( + Input$MigrateToBindsInput instance) => + { + 'emailBlockDevice': instance.emailBlockDevice, + 'bitwardenBlockDevice': instance.bitwardenBlockDevice, + 'giteaBlockDevice': instance.giteaBlockDevice, + 'nextcloudBlockDevice': instance.nextcloudBlockDevice, + 'pleromaBlockDevice': instance.pleromaBlockDevice, + }; + +Input$MoveServiceInput _$Input$MoveServiceInputFromJson( + Map json) => + Input$MoveServiceInput( + serviceId: json['serviceId'] as String, + location: json['location'] as String, + ); + +Map _$Input$MoveServiceInputToJson( + Input$MoveServiceInput instance) => + { + 'serviceId': instance.serviceId, + 'location': instance.location, + }; + Input$RecoveryKeyLimitsInput _$Input$RecoveryKeyLimitsInputFromJson( Map json) => Input$RecoveryKeyLimitsInput( @@ -20,6 +68,20 @@ Map _$Input$RecoveryKeyLimitsInputToJson( 'uses': instance.uses, }; +Input$SshMutationInput _$Input$SshMutationInputFromJson( + Map json) => + Input$SshMutationInput( + username: json['username'] as String, + sshKey: json['sshKey'] as String, + ); + +Map _$Input$SshMutationInputToJson( + Input$SshMutationInput instance) => + { + 'username': instance.username, + 'sshKey': instance.sshKey, + }; + Input$UseNewDeviceKeyInput _$Input$UseNewDeviceKeyInputFromJson( Map json) => Input$UseNewDeviceKeyInput( @@ -47,3 +109,17 @@ Map _$Input$UseRecoveryKeyInputToJson( 'key': instance.key, 'deviceName': instance.deviceName, }; + +Input$UserMutationInput _$Input$UserMutationInputFromJson( + Map json) => + Input$UserMutationInput( + username: json['username'] as String, + password: json['password'] as String, + ); + +Map _$Input$UserMutationInputToJson( + Input$UserMutationInput instance) => + { + 'username': instance.username, + 'password': instance.password, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server.dart b/lib/logic/api_maps/graphql_maps/schema/server.dart index 4b419a15..794cff51 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server.dart @@ -3,9 +3,11 @@ 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/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/services.graphql.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; class ServerApi extends ApiMap { ServerApi({ @@ -25,13 +27,35 @@ class ServerApi extends ApiMap { @override String? rootAddress; + Future _commonBoolRequest(final Function graphQLMethod) async { + QueryResult response; + bool result = false; + + try { + response = await graphQLMethod(); + if (response.hasException) { + print(response.exception.toString()); + result = false; + } else { + result = true; + } + } catch (e) { + print(e); + } + + return result; + } + Future getApiVersion() async { QueryResult response; String? apiVersion; - final GraphQLClient client = await getClient(); try { - response = await client.query$GetApiVersionQuery(); + final GraphQLClient client = await getClient(); + response = await client.query$GetApiVersion(); + if (response.hasException) { + print(response.exception.toString()); + } apiVersion = response.data!['api']['version']; } catch (e) { print(e); @@ -45,7 +69,10 @@ class ServerApi extends ApiMap { try { final GraphQLClient client = await getClient(); - response = await client.query$GetApiTokensQuery(); + response = await client.query$GetApiTokens(); + if (response.hasException) { + print(response.exception.toString()); + } tokens = response.data!['api']['devices'] .map((final e) => ApiToken.fromJson(e)) .toList(); @@ -62,7 +89,10 @@ class ServerApi extends ApiMap { try { final GraphQLClient client = await getClient(); - response = await client.query$GetServerDiskVolumesQuery(); + response = await client.query$GetServerDiskVolumes(); + if (response.hasException) { + print(response.exception.toString()); + } volumes = response.data!['storage']['volumes'] .map((final e) => ServerDiskVolume.fromJson(e)) .toList(); @@ -76,11 +106,10 @@ class ServerApi extends ApiMap { Future mountVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$MountVolumeMutation(name: volumeName); + final variables = Variables$Mutation$MountVolume(name: volumeName); final mountVolumeMutation = - Options$Mutation$MountVolumeMutation(variables: variables); - await client.mutate$MountVolumeMutation(mountVolumeMutation); + Options$Mutation$MountVolume(variables: variables); + await client.mutate$MountVolume(mountVolumeMutation); } catch (e) { print(e); } @@ -89,11 +118,10 @@ class ServerApi extends ApiMap { Future unmountVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$UnmountVolumeMutation(name: volumeName); + final variables = Variables$Mutation$UnmountVolume(name: volumeName); final unmountVolumeMutation = - Options$Mutation$UnmountVolumeMutation(variables: variables); - await client.mutate$UnmountVolumeMutation(unmountVolumeMutation); + Options$Mutation$UnmountVolume(variables: variables); + await client.mutate$UnmountVolume(unmountVolumeMutation); } catch (e) { print(e); } @@ -102,11 +130,104 @@ class ServerApi extends ApiMap { Future resizeVolume(final String volumeName) async { try { final GraphQLClient client = await getClient(); - final variables = - Variables$Mutation$ResizeVolumeMutation(name: volumeName); + final variables = Variables$Mutation$ResizeVolume(name: volumeName); final resizeVolumeMutation = - Options$Mutation$ResizeVolumeMutation(variables: variables); - await client.mutate$ResizeVolumeMutation(resizeVolumeMutation); + Options$Mutation$ResizeVolume(variables: variables); + await client.mutate$ResizeVolume(resizeVolumeMutation); + } catch (e) { + print(e); + } + } + + Future> getServerJobs() async { + QueryResult response; + List jobs = []; + + try { + final GraphQLClient client = await getClient(); + response = await client.query$GetApiJobs(); + if (response.hasException) { + print(response.exception.toString()); + } + jobs = response.data!['jobs'] + .map((final e) => ServerJob.fromJson(e)) + .toList(); + } catch (e) { + print(e); + } + + return jobs; + } + + Future removeApiJob(final String uid) async { + try { + final GraphQLClient client = await getClient(); + //await client.query$GetApiJobsQuery(); + } catch (e) { + print(e); + } + } + + Future reboot() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RebootSystem(); + }, + ); + } catch (e) { + return false; + } + } + + Future pullConfigurationUpdate() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$PullRepositoryChanges(); + }, + ); + } catch (e) { + return false; + } + } + + Future upgrade() async { + try { + final GraphQLClient client = await getClient(); + return await _commonBoolRequest( + () async { + await client.mutate$RunSystemUpgrade(); + }, + ); + } catch (e) { + return false; + } + } + + Future switchService(final String uid, final bool needTurnOn) async { + try { + final GraphQLClient client = await getClient(); + if (needTurnOn) { + final variables = Variables$Mutation$EnableService(serviceId: uid); + final mutation = Options$Mutation$EnableService(variables: variables); + await client.mutate$EnableService(mutation); + } else { + final variables = Variables$Mutation$DisableService(serviceId: uid); + final mutation = Options$Mutation$DisableService(variables: variables); + await client.mutate$DisableService(mutation); + } + } catch (e) { + print(e); + } + } + + Future apply() async { + try { + final GraphQLClient client = await getClient(); + await client.mutate$RunSystemRebuild(); } catch (e) { print(e); } diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql index f88b3346..96374fad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql @@ -1,4 +1,70 @@ -query GetApiTokensQuery { +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query GetApiVersion { + api { + version + } +} + +query GetApiJobs { + jobs { + getJobs { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} + +mutation RemoveJob($jobId: String!) { + removeJob(jobId: $jobId) { + ...basicMutationReturnFields + } +} + +mutation RunSystemRebuild { + runSystemRebuild { + ...basicMutationReturnFields + } +} + +mutation RunSystemRollback { + runSystemRollback { + ...basicMutationReturnFields + } +} + +mutation RunSystemUpgrade { + runSystemUpgrade { + ...basicMutationReturnFields + } +} + +mutation PullRepositoryChanges { + pullRepositoryChanges { + ...basicMutationReturnFields + } +} + +mutation RebootSystem { + rebootSystem { + ...basicMutationReturnFields + } +} + +query GetApiTokens { api { devices { creationDate @@ -8,8 +74,61 @@ query GetApiTokensQuery { } } -query GetApiVersionQuery { +query RecoveryKey { api { - version + recoveryKey { + creationDate + exists + expirationDate + usesLeft + valid + } } -} \ No newline at end of file +} + +mutation GetNewRecoveryApiKey($limits: RecoveryKeyLimitsInput) { + getNewRecoveryApiKey(limits: $limits) { + ...basicMutationReturnFields + key + } +} + +mutation UseRecoveryApiKey($input: UseRecoveryKeyInput!) { + useRecoveryApiKey(input: $input) { + ...basicMutationReturnFields + token + } +} + +mutation RefreshDeviceApiToken { + refreshDeviceApiToken { + ...basicMutationReturnFields + token + } +} + +mutation DeleteDeviceApiToken($device: String!) { + deleteDeviceApiToken(device: $device) { + ...basicMutationReturnFields + } +} + +mutation GetNewDeviceApiKey { + getNewDeviceApiKey { + ...basicMutationReturnFields + key + } +} + +mutation InvalidateNewDeviceApiKey { + invalidateNewDeviceApiKey { + ...basicMutationReturnFields + } +} + +mutation AuthorizeWithNewDeviceApiKey($input: UseNewDeviceKeyInput!) { + authorizeWithNewDeviceApiKey(input: $input) { + ...basicMutationReturnFields + token + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart index 2394d113..c9d6fe1a 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.dart @@ -1,23 +1,157 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; import 'package:gql/ast.dart'; import 'package:graphql/client.dart' as graphql; import 'package:json_annotation/json_annotation.dart'; import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; part 'server_api.graphql.g.dart'; @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery { - Query$GetApiTokensQuery({required this.api, required this.$__typename}); +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); @override - factory Query$GetApiTokensQuery.fromJson(Map json) => - _$Query$GetApiTokensQueryFromJson(json); + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); - final Query$GetApiTokensQuery$api api; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensQueryToJson(this); + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + 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) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + 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)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersion { + Query$GetApiVersion({required this.api, required this.$__typename}); + + @override + factory Query$GetApiVersion.fromJson(Map json) => + _$Query$GetApiVersionFromJson(json); + + final Query$GetApiVersion$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersionToJson(this); int get hashCode { final l$api = api; final l$$__typename = $__typename; @@ -27,7 +161,7 @@ class Query$GetApiTokensQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery) || runtimeType != other.runtimeType) + if (!(other is Query$GetApiVersion) || runtimeType != other.runtimeType) return false; final l$api = api; final lOther$api = other.api; @@ -39,62 +173,2091 @@ class Query$GetApiTokensQuery { } } -extension UtilityExtension$Query$GetApiTokensQuery on Query$GetApiTokensQuery { - CopyWith$Query$GetApiTokensQuery get copyWith => - CopyWith$Query$GetApiTokensQuery(this, (i) => i); +extension UtilityExtension$Query$GetApiVersion on Query$GetApiVersion { + Query$GetApiVersion copyWith( + {Query$GetApiVersion$api? api, String? $__typename}) => + Query$GetApiVersion( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiTokensQuery { - factory CopyWith$Query$GetApiTokensQuery(Query$GetApiTokensQuery instance, - TRes Function(Query$GetApiTokensQuery) then) = - _CopyWithImpl$Query$GetApiTokensQuery; +const documentNodeQueryGetApiVersion = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiVersion'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'api'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'version'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiVersion _parserFn$Query$GetApiVersion(Map data) => + Query$GetApiVersion.fromJson(data); - factory CopyWith$Query$GetApiTokensQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery; - - TRes call({Query$GetApiTokensQuery$api? api, String? $__typename}); - CopyWith$Query$GetApiTokensQuery$api get api; +class Options$Query$GetApiVersion + extends graphql.QueryOptions { + Options$Query$GetApiVersion( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiVersion, + parserFn: _parserFn$Query$GetApiVersion); } -class _CopyWithImpl$Query$GetApiTokensQuery - implements CopyWith$Query$GetApiTokensQuery { - _CopyWithImpl$Query$GetApiTokensQuery(this._instance, this._then); +class WatchOptions$Query$GetApiVersion + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiVersion( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiVersion, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiVersion); +} - final Query$GetApiTokensQuery _instance; +class FetchMoreOptions$Query$GetApiVersion extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiVersion( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, document: documentNodeQueryGetApiVersion); +} - final TRes Function(Query$GetApiTokensQuery) _then; - - static const _undefined = {}; - - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiTokensQuery$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetApiTokensQuery$api get api { - final local$api = _instance.api; - return CopyWith$Query$GetApiTokensQuery$api(local$api, (e) => call(api: e)); +extension ClientExtension$Query$GetApiVersion on graphql.GraphQLClient { + Future> query$GetApiVersion( + [Options$Query$GetApiVersion? options]) async => + await this.query(options ?? Options$Query$GetApiVersion()); + graphql.ObservableQuery watchQuery$GetApiVersion( + [WatchOptions$Query$GetApiVersion? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiVersion()); + void writeQuery$GetApiVersion( + {required Query$GetApiVersion data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiVersion? readQuery$GetApiVersion({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiVersion)), + optimistic: optimistic); + return result == null ? null : Query$GetApiVersion.fromJson(result); } } -class _CopyWithStubImpl$Query$GetApiTokensQuery - implements CopyWith$Query$GetApiTokensQuery { - _CopyWithStubImpl$Query$GetApiTokensQuery(this._res); +@JsonSerializable(explicitToJson: true) +class Query$GetApiVersion$api { + Query$GetApiVersion$api({required this.version, required this.$__typename}); - TRes _res; + @override + factory Query$GetApiVersion$api.fromJson(Map json) => + _$Query$GetApiVersion$apiFromJson(json); - call({Query$GetApiTokensQuery$api? api, String? $__typename}) => _res; - CopyWith$Query$GetApiTokensQuery$api get api => - CopyWith$Query$GetApiTokensQuery$api.stub(_res); + final String version; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiVersion$apiToJson(this); + int get hashCode { + final l$version = version; + final l$$__typename = $__typename; + return Object.hashAll([l$version, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiVersion$api) || runtimeType != other.runtimeType) + return false; + final l$version = version; + final lOther$version = other.version; + if (l$version != lOther$version) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } } -const documentNodeQueryGetApiTokensQuery = DocumentNode(definitions: [ +extension UtilityExtension$Query$GetApiVersion$api on Query$GetApiVersion$api { + Query$GetApiVersion$api copyWith({String? version, String? $__typename}) => + Query$GetApiVersion$api( + version: version == null ? this.version : version, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs { + Query$GetApiJobs({required this.jobs, required this.$__typename}); + + @override + factory Query$GetApiJobs.fromJson(Map json) => + _$Query$GetApiJobsFromJson(json); + + final Query$GetApiJobs$jobs jobs; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobsToJson(this); + int get hashCode { + final l$jobs = jobs; + final l$$__typename = $__typename; + return Object.hashAll([l$jobs, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs) || runtimeType != other.runtimeType) + return false; + final l$jobs = jobs; + final lOther$jobs = other.jobs; + if (l$jobs != lOther$jobs) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs on Query$GetApiJobs { + Query$GetApiJobs copyWith( + {Query$GetApiJobs$jobs? jobs, String? $__typename}) => + Query$GetApiJobs( + jobs: jobs == null ? this.jobs : jobs, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetApiJobs = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetApiTokensQuery'), + name: NameNode(value: 'GetApiJobs'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'jobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getJobs'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetApiJobs _parserFn$Query$GetApiJobs(Map data) => + Query$GetApiJobs.fromJson(data); + +class Options$Query$GetApiJobs extends graphql.QueryOptions { + Options$Query$GetApiJobs( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetApiJobs, + parserFn: _parserFn$Query$GetApiJobs); +} + +class WatchOptions$Query$GetApiJobs + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiJobs( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetApiJobs, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetApiJobs); +} + +class FetchMoreOptions$Query$GetApiJobs extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiJobs({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryGetApiJobs); +} + +extension ClientExtension$Query$GetApiJobs on graphql.GraphQLClient { + Future> query$GetApiJobs( + [Options$Query$GetApiJobs? options]) async => + await this.query(options ?? Options$Query$GetApiJobs()); + graphql.ObservableQuery watchQuery$GetApiJobs( + [WatchOptions$Query$GetApiJobs? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiJobs()); + void writeQuery$GetApiJobs( + {required Query$GetApiJobs data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiJobs)), + data: data.toJson(), + broadcast: broadcast); + Query$GetApiJobs? readQuery$GetApiJobs({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryGetApiJobs)), + optimistic: optimistic); + return result == null ? null : Query$GetApiJobs.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs$jobs { + Query$GetApiJobs$jobs({required this.getJobs, required this.$__typename}); + + @override + factory Query$GetApiJobs$jobs.fromJson(Map json) => + _$Query$GetApiJobs$jobsFromJson(json); + + final List getJobs; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobs$jobsToJson(this); + int get hashCode { + final l$getJobs = getJobs; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$getJobs.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs$jobs) || runtimeType != other.runtimeType) + return false; + final l$getJobs = getJobs; + final lOther$getJobs = other.getJobs; + if (l$getJobs.length != lOther$getJobs.length) return false; + for (int i = 0; i < l$getJobs.length; i++) { + final l$getJobs$entry = l$getJobs[i]; + final lOther$getJobs$entry = lOther$getJobs[i]; + if (l$getJobs$entry != lOther$getJobs$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs$jobs on Query$GetApiJobs$jobs { + Query$GetApiJobs$jobs copyWith( + {List? getJobs, + String? $__typename}) => + Query$GetApiJobs$jobs( + getJobs: getJobs == null ? this.getJobs : getJobs, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiJobs$jobs$getJobs { + Query$GetApiJobs$jobs$getJobs( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Query$GetApiJobs$jobs$getJobs.fromJson(Map json) => + _$Query$GetApiJobs$jobs$getJobsFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiJobs$jobs$getJobsToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiJobs$jobs$getJobs) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiJobs$jobs$getJobs + on Query$GetApiJobs$jobs$getJobs { + Query$GetApiJobs$jobs$getJobs copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Query$GetApiJobs$jobs$getJobs( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RemoveJob { + Variables$Mutation$RemoveJob({required this.jobId}); + + @override + factory Variables$Mutation$RemoveJob.fromJson(Map json) => + _$Variables$Mutation$RemoveJobFromJson(json); + + final String jobId; + + Map toJson() => _$Variables$Mutation$RemoveJobToJson(this); + int get hashCode { + final l$jobId = jobId; + return Object.hashAll([l$jobId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RemoveJob) || + runtimeType != other.runtimeType) return false; + final l$jobId = jobId; + final lOther$jobId = other.jobId; + if (l$jobId != lOther$jobId) return false; + return true; + } + + Variables$Mutation$RemoveJob copyWith({String? jobId}) => + Variables$Mutation$RemoveJob(jobId: jobId == null ? this.jobId : jobId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveJob { + Mutation$RemoveJob({required this.removeJob, required this.$__typename}); + + @override + factory Mutation$RemoveJob.fromJson(Map json) => + _$Mutation$RemoveJobFromJson(json); + + final Mutation$RemoveJob$removeJob removeJob; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveJobToJson(this); + int get hashCode { + final l$removeJob = removeJob; + final l$$__typename = $__typename; + return Object.hashAll([l$removeJob, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveJob) || runtimeType != other.runtimeType) + return false; + final l$removeJob = removeJob; + final lOther$removeJob = other.removeJob; + if (l$removeJob != lOther$removeJob) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveJob on Mutation$RemoveJob { + Mutation$RemoveJob copyWith( + {Mutation$RemoveJob$removeJob? removeJob, String? $__typename}) => + Mutation$RemoveJob( + removeJob: removeJob == null ? this.removeJob : removeJob, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRemoveJob = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveJob'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'jobId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeJob'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'jobId'), + value: VariableNode(name: NameNode(value: 'jobId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RemoveJob _parserFn$Mutation$RemoveJob(Map data) => + Mutation$RemoveJob.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveJob = FutureOr Function( + dynamic, Mutation$RemoveJob?); + +class Options$Mutation$RemoveJob + extends graphql.MutationOptions { + Options$Mutation$RemoveJob( + {String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveJob? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$RemoveJob(data)), + update: update, + onError: onError, + document: documentNodeMutationRemoveJob, + parserFn: _parserFn$Mutation$RemoveJob); + + final OnMutationCompleted$Mutation$RemoveJob? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RemoveJob + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveJob( + {String? operationName, + required Variables$Mutation$RemoveJob variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveJob, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveJob); +} + +extension ClientExtension$Mutation$RemoveJob on graphql.GraphQLClient { + Future> mutate$RemoveJob( + Options$Mutation$RemoveJob options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RemoveJob( + WatchOptions$Mutation$RemoveJob options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveJob$removeJob + implements Fragment$basicMutationReturnFields { + Mutation$RemoveJob$removeJob( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RemoveJob$removeJob.fromJson(Map json) => + _$Mutation$RemoveJob$removeJobFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveJob$removeJobToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveJob$removeJob) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveJob$removeJob + on Mutation$RemoveJob$removeJob { + Mutation$RemoveJob$removeJob copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RemoveJob$removeJob( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRebuild { + Mutation$RunSystemRebuild( + {required this.runSystemRebuild, required this.$__typename}); + + @override + factory Mutation$RunSystemRebuild.fromJson(Map json) => + _$Mutation$RunSystemRebuildFromJson(json); + + final Mutation$RunSystemRebuild$runSystemRebuild runSystemRebuild; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemRebuildToJson(this); + int get hashCode { + final l$runSystemRebuild = runSystemRebuild; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemRebuild, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRebuild) || + runtimeType != other.runtimeType) return false; + final l$runSystemRebuild = runSystemRebuild; + final lOther$runSystemRebuild = other.runSystemRebuild; + if (l$runSystemRebuild != lOther$runSystemRebuild) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRebuild + on Mutation$RunSystemRebuild { + Mutation$RunSystemRebuild copyWith( + {Mutation$RunSystemRebuild$runSystemRebuild? runSystemRebuild, + String? $__typename}) => + Mutation$RunSystemRebuild( + runSystemRebuild: runSystemRebuild == null + ? this.runSystemRebuild + : runSystemRebuild, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemRebuild = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRebuild'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRebuild'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemRebuild _parserFn$Mutation$RunSystemRebuild( + Map data) => + Mutation$RunSystemRebuild.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemRebuild = FutureOr Function( + dynamic, Mutation$RunSystemRebuild?); + +class Options$Mutation$RunSystemRebuild + extends graphql.MutationOptions { + Options$Mutation$RunSystemRebuild( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRebuild? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemRebuild(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRebuild, + parserFn: _parserFn$Mutation$RunSystemRebuild); + + final OnMutationCompleted$Mutation$RunSystemRebuild? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemRebuild + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemRebuild( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRebuild, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRebuild); +} + +extension ClientExtension$Mutation$RunSystemRebuild on graphql.GraphQLClient { + Future> + mutate$RunSystemRebuild( + [Options$Mutation$RunSystemRebuild? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemRebuild()); + graphql.ObservableQuery< + Mutation$RunSystemRebuild> watchMutation$RunSystemRebuild( + [WatchOptions$Mutation$RunSystemRebuild? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRebuild()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRebuild$runSystemRebuild + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemRebuild$runSystemRebuild( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + Map json) => + _$Mutation$RunSystemRebuild$runSystemRebuildFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemRebuild$runSystemRebuildToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRebuild$runSystemRebuild) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRebuild$runSystemRebuild + on Mutation$RunSystemRebuild$runSystemRebuild { + Mutation$RunSystemRebuild$runSystemRebuild copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemRebuild$runSystemRebuild( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRollback { + Mutation$RunSystemRollback( + {required this.runSystemRollback, required this.$__typename}); + + @override + factory Mutation$RunSystemRollback.fromJson(Map json) => + _$Mutation$RunSystemRollbackFromJson(json); + + final Mutation$RunSystemRollback$runSystemRollback runSystemRollback; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemRollbackToJson(this); + int get hashCode { + final l$runSystemRollback = runSystemRollback; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemRollback, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRollback) || + runtimeType != other.runtimeType) return false; + final l$runSystemRollback = runSystemRollback; + final lOther$runSystemRollback = other.runSystemRollback; + if (l$runSystemRollback != lOther$runSystemRollback) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRollback + on Mutation$RunSystemRollback { + Mutation$RunSystemRollback copyWith( + {Mutation$RunSystemRollback$runSystemRollback? runSystemRollback, + String? $__typename}) => + Mutation$RunSystemRollback( + runSystemRollback: runSystemRollback == null + ? this.runSystemRollback + : runSystemRollback, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemRollback = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemRollback'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemRollback'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemRollback _parserFn$Mutation$RunSystemRollback( + Map data) => + Mutation$RunSystemRollback.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemRollback = FutureOr + Function(dynamic, Mutation$RunSystemRollback?); + +class Options$Mutation$RunSystemRollback + extends graphql.MutationOptions { + Options$Mutation$RunSystemRollback( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemRollback? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemRollback(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemRollback, + parserFn: _parserFn$Mutation$RunSystemRollback); + + final OnMutationCompleted$Mutation$RunSystemRollback? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemRollback + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemRollback( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemRollback, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemRollback); +} + +extension ClientExtension$Mutation$RunSystemRollback on graphql.GraphQLClient { + Future> + mutate$RunSystemRollback( + [Options$Mutation$RunSystemRollback? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemRollback()); + graphql.ObservableQuery< + Mutation$RunSystemRollback> watchMutation$RunSystemRollback( + [WatchOptions$Mutation$RunSystemRollback? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemRollback()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemRollback$runSystemRollback + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemRollback$runSystemRollback( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemRollback$runSystemRollback.fromJson( + Map json) => + _$Mutation$RunSystemRollback$runSystemRollbackFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemRollback$runSystemRollbackToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemRollback$runSystemRollback) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemRollback$runSystemRollback + on Mutation$RunSystemRollback$runSystemRollback { + Mutation$RunSystemRollback$runSystemRollback copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemRollback$runSystemRollback( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemUpgrade { + Mutation$RunSystemUpgrade( + {required this.runSystemUpgrade, required this.$__typename}); + + @override + factory Mutation$RunSystemUpgrade.fromJson(Map json) => + _$Mutation$RunSystemUpgradeFromJson(json); + + final Mutation$RunSystemUpgrade$runSystemUpgrade runSystemUpgrade; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RunSystemUpgradeToJson(this); + int get hashCode { + final l$runSystemUpgrade = runSystemUpgrade; + final l$$__typename = $__typename; + return Object.hashAll([l$runSystemUpgrade, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemUpgrade) || + runtimeType != other.runtimeType) return false; + final l$runSystemUpgrade = runSystemUpgrade; + final lOther$runSystemUpgrade = other.runSystemUpgrade; + if (l$runSystemUpgrade != lOther$runSystemUpgrade) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemUpgrade + on Mutation$RunSystemUpgrade { + Mutation$RunSystemUpgrade copyWith( + {Mutation$RunSystemUpgrade$runSystemUpgrade? runSystemUpgrade, + String? $__typename}) => + Mutation$RunSystemUpgrade( + runSystemUpgrade: runSystemUpgrade == null + ? this.runSystemUpgrade + : runSystemUpgrade, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRunSystemUpgrade = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RunSystemUpgrade'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'runSystemUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RunSystemUpgrade _parserFn$Mutation$RunSystemUpgrade( + Map data) => + Mutation$RunSystemUpgrade.fromJson(data); +typedef OnMutationCompleted$Mutation$RunSystemUpgrade = FutureOr Function( + dynamic, Mutation$RunSystemUpgrade?); + +class Options$Mutation$RunSystemUpgrade + extends graphql.MutationOptions { + Options$Mutation$RunSystemUpgrade( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RunSystemUpgrade? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RunSystemUpgrade(data)), + update: update, + onError: onError, + document: documentNodeMutationRunSystemUpgrade, + parserFn: _parserFn$Mutation$RunSystemUpgrade); + + final OnMutationCompleted$Mutation$RunSystemUpgrade? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RunSystemUpgrade + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RunSystemUpgrade( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRunSystemUpgrade, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RunSystemUpgrade); +} + +extension ClientExtension$Mutation$RunSystemUpgrade on graphql.GraphQLClient { + Future> + mutate$RunSystemUpgrade( + [Options$Mutation$RunSystemUpgrade? options]) async => + await this.mutate(options ?? Options$Mutation$RunSystemUpgrade()); + graphql.ObservableQuery< + Mutation$RunSystemUpgrade> watchMutation$RunSystemUpgrade( + [WatchOptions$Mutation$RunSystemUpgrade? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RunSystemUpgrade()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RunSystemUpgrade$runSystemUpgrade + implements Fragment$basicMutationReturnFields { + Mutation$RunSystemUpgrade$runSystemUpgrade( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + Map json) => + _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RunSystemUpgrade$runSystemUpgrade) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RunSystemUpgrade$runSystemUpgrade + on Mutation$RunSystemUpgrade$runSystemUpgrade { + Mutation$RunSystemUpgrade$runSystemUpgrade copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RunSystemUpgrade$runSystemUpgrade( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$PullRepositoryChanges { + Mutation$PullRepositoryChanges( + {required this.pullRepositoryChanges, required this.$__typename}); + + @override + factory Mutation$PullRepositoryChanges.fromJson(Map json) => + _$Mutation$PullRepositoryChangesFromJson(json); + + final Mutation$PullRepositoryChanges$pullRepositoryChanges + pullRepositoryChanges; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$PullRepositoryChangesToJson(this); + int get hashCode { + final l$pullRepositoryChanges = pullRepositoryChanges; + final l$$__typename = $__typename; + return Object.hashAll([l$pullRepositoryChanges, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$PullRepositoryChanges) || + runtimeType != other.runtimeType) return false; + final l$pullRepositoryChanges = pullRepositoryChanges; + final lOther$pullRepositoryChanges = other.pullRepositoryChanges; + if (l$pullRepositoryChanges != lOther$pullRepositoryChanges) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$PullRepositoryChanges + on Mutation$PullRepositoryChanges { + Mutation$PullRepositoryChanges copyWith( + {Mutation$PullRepositoryChanges$pullRepositoryChanges? + pullRepositoryChanges, + String? $__typename}) => + Mutation$PullRepositoryChanges( + pullRepositoryChanges: pullRepositoryChanges == null + ? this.pullRepositoryChanges + : pullRepositoryChanges, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationPullRepositoryChanges = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'PullRepositoryChanges'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'pullRepositoryChanges'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$PullRepositoryChanges _parserFn$Mutation$PullRepositoryChanges( + Map data) => + Mutation$PullRepositoryChanges.fromJson(data); +typedef OnMutationCompleted$Mutation$PullRepositoryChanges = FutureOr + Function(dynamic, Mutation$PullRepositoryChanges?); + +class Options$Mutation$PullRepositoryChanges + extends graphql.MutationOptions { + Options$Mutation$PullRepositoryChanges( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$PullRepositoryChanges? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$PullRepositoryChanges(data)), + update: update, + onError: onError, + document: documentNodeMutationPullRepositoryChanges, + parserFn: _parserFn$Mutation$PullRepositoryChanges); + + final OnMutationCompleted$Mutation$PullRepositoryChanges? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$PullRepositoryChanges + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$PullRepositoryChanges( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationPullRepositoryChanges, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$PullRepositoryChanges); +} + +extension ClientExtension$Mutation$PullRepositoryChanges + on graphql.GraphQLClient { + Future> + mutate$PullRepositoryChanges( + [Options$Mutation$PullRepositoryChanges? options]) async => + await this + .mutate(options ?? Options$Mutation$PullRepositoryChanges()); + graphql.ObservableQuery + watchMutation$PullRepositoryChanges( + [WatchOptions$Mutation$PullRepositoryChanges? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$PullRepositoryChanges()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$PullRepositoryChanges$pullRepositoryChanges + implements Fragment$basicMutationReturnFields { + Mutation$PullRepositoryChanges$pullRepositoryChanges( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + Map json) => + _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$PullRepositoryChanges$pullRepositoryChanges) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$PullRepositoryChanges$pullRepositoryChanges + on Mutation$PullRepositoryChanges$pullRepositoryChanges { + Mutation$PullRepositoryChanges$pullRepositoryChanges copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RebootSystem { + Mutation$RebootSystem( + {required this.rebootSystem, required this.$__typename}); + + @override + factory Mutation$RebootSystem.fromJson(Map json) => + _$Mutation$RebootSystemFromJson(json); + + final Mutation$RebootSystem$rebootSystem rebootSystem; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RebootSystemToJson(this); + int get hashCode { + final l$rebootSystem = rebootSystem; + final l$$__typename = $__typename; + return Object.hashAll([l$rebootSystem, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RebootSystem) || runtimeType != other.runtimeType) + return false; + final l$rebootSystem = rebootSystem; + final lOther$rebootSystem = other.rebootSystem; + if (l$rebootSystem != lOther$rebootSystem) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RebootSystem on Mutation$RebootSystem { + Mutation$RebootSystem copyWith( + {Mutation$RebootSystem$rebootSystem? rebootSystem, + String? $__typename}) => + Mutation$RebootSystem( + rebootSystem: rebootSystem == null ? this.rebootSystem : rebootSystem, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRebootSystem = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RebootSystem'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'rebootSystem'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RebootSystem _parserFn$Mutation$RebootSystem( + Map data) => + Mutation$RebootSystem.fromJson(data); +typedef OnMutationCompleted$Mutation$RebootSystem = FutureOr Function( + dynamic, Mutation$RebootSystem?); + +class Options$Mutation$RebootSystem + extends graphql.MutationOptions { + Options$Mutation$RebootSystem( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RebootSystem? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RebootSystem(data)), + update: update, + onError: onError, + document: documentNodeMutationRebootSystem, + parserFn: _parserFn$Mutation$RebootSystem); + + final OnMutationCompleted$Mutation$RebootSystem? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RebootSystem + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RebootSystem( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRebootSystem, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RebootSystem); +} + +extension ClientExtension$Mutation$RebootSystem on graphql.GraphQLClient { + Future> mutate$RebootSystem( + [Options$Mutation$RebootSystem? options]) async => + await this.mutate(options ?? Options$Mutation$RebootSystem()); + graphql.ObservableQuery watchMutation$RebootSystem( + [WatchOptions$Mutation$RebootSystem? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$RebootSystem()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RebootSystem$rebootSystem + implements Fragment$basicMutationReturnFields { + Mutation$RebootSystem$rebootSystem( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RebootSystem$rebootSystem.fromJson( + Map json) => + _$Mutation$RebootSystem$rebootSystemFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RebootSystem$rebootSystemToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RebootSystem$rebootSystem) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RebootSystem$rebootSystem + on Mutation$RebootSystem$rebootSystem { + Mutation$RebootSystem$rebootSystem copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RebootSystem$rebootSystem( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetApiTokens { + Query$GetApiTokens({required this.api, required this.$__typename}); + + @override + factory Query$GetApiTokens.fromJson(Map json) => + _$Query$GetApiTokensFromJson(json); + + final Query$GetApiTokens$api api; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetApiTokensToJson(this); + int get hashCode { + final l$api = api; + final l$$__typename = $__typename; + return Object.hashAll([l$api, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetApiTokens) || runtimeType != other.runtimeType) + return false; + final l$api = api; + final lOther$api = other.api; + if (l$api != lOther$api) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetApiTokens on Query$GetApiTokens { + Query$GetApiTokens copyWith( + {Query$GetApiTokens$api? api, String? $__typename}) => + Query$GetApiTokens( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetApiTokens = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetApiTokens'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -150,13 +2313,12 @@ const documentNodeQueryGetApiTokensQuery = DocumentNode(definitions: [ selectionSet: null) ])), ]); -Query$GetApiTokensQuery _parserFn$Query$GetApiTokensQuery( - Map data) => - Query$GetApiTokensQuery.fromJson(data); +Query$GetApiTokens _parserFn$Query$GetApiTokens(Map data) => + Query$GetApiTokens.fromJson(data); -class Options$Query$GetApiTokensQuery - extends graphql.QueryOptions { - Options$Query$GetApiTokensQuery( +class Options$Query$GetApiTokens + extends graphql.QueryOptions { + Options$Query$GetApiTokens( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -172,13 +2334,13 @@ class Options$Query$GetApiTokensQuery optimisticResult: optimisticResult, pollInterval: pollInterval, context: context, - document: documentNodeQueryGetApiTokensQuery, - parserFn: _parserFn$Query$GetApiTokensQuery); + document: documentNodeQueryGetApiTokens, + parserFn: _parserFn$Query$GetApiTokens); } -class WatchOptions$Query$GetApiTokensQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiTokensQuery( +class WatchOptions$Query$GetApiTokens + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetApiTokens( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -196,64 +2358,60 @@ class WatchOptions$Query$GetApiTokensQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetApiTokensQuery, + document: documentNodeQueryGetApiTokens, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiTokensQuery); + parserFn: _parserFn$Query$GetApiTokens); } -class FetchMoreOptions$Query$GetApiTokensQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetApiTokensQuery( +class FetchMoreOptions$Query$GetApiTokens extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetApiTokens( {required graphql.UpdateQuery updateQuery}) : super( - updateQuery: updateQuery, - document: documentNodeQueryGetApiTokensQuery); + updateQuery: updateQuery, document: documentNodeQueryGetApiTokens); } -extension ClientExtension$Query$GetApiTokensQuery on graphql.GraphQLClient { - Future> query$GetApiTokensQuery( - [Options$Query$GetApiTokensQuery? options]) async => - await this.query(options ?? Options$Query$GetApiTokensQuery()); - graphql.ObservableQuery watchQuery$GetApiTokensQuery( - [WatchOptions$Query$GetApiTokensQuery? options]) => - this.watchQuery(options ?? WatchOptions$Query$GetApiTokensQuery()); - void writeQuery$GetApiTokensQuery( - {required Query$GetApiTokensQuery data, bool broadcast = true}) => +extension ClientExtension$Query$GetApiTokens on graphql.GraphQLClient { + Future> query$GetApiTokens( + [Options$Query$GetApiTokens? options]) async => + await this.query(options ?? Options$Query$GetApiTokens()); + graphql.ObservableQuery watchQuery$GetApiTokens( + [WatchOptions$Query$GetApiTokens? options]) => + this.watchQuery(options ?? WatchOptions$Query$GetApiTokens()); + void writeQuery$GetApiTokens( + {required Query$GetApiTokens data, bool broadcast = true}) => this.writeQuery( graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiTokensQuery)), + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), data: data.toJson(), broadcast: broadcast); - Query$GetApiTokensQuery? readQuery$GetApiTokensQuery( - {bool optimistic = true}) { + Query$GetApiTokens? readQuery$GetApiTokens({bool optimistic = true}) { final result = this.readQuery( graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiTokensQuery)), + operation: + graphql.Operation(document: documentNodeQueryGetApiTokens)), optimistic: optimistic); - return result == null ? null : Query$GetApiTokensQuery.fromJson(result); + return result == null ? null : Query$GetApiTokens.fromJson(result); } } @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery$api { - Query$GetApiTokensQuery$api( - {required this.devices, required this.$__typename}); +class Query$GetApiTokens$api { + Query$GetApiTokens$api({required this.devices, required this.$__typename}); @override - factory Query$GetApiTokensQuery$api.fromJson(Map json) => - _$Query$GetApiTokensQuery$apiFromJson(json); + factory Query$GetApiTokens$api.fromJson(Map json) => + _$Query$GetApiTokens$apiFromJson(json); - final List devices; + final List devices; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiTokensQuery$apiToJson(this); + Map toJson() => _$Query$GetApiTokens$apiToJson(this); int get hashCode { final l$devices = devices; final l$$__typename = $__typename; @@ -264,8 +2422,8 @@ class Query$GetApiTokensQuery$api { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery$api) || - runtimeType != other.runtimeType) return false; + if (!(other is Query$GetApiTokens$api) || runtimeType != other.runtimeType) + return false; final l$devices = devices; final lOther$devices = other.devices; if (l$devices.length != lOther$devices.length) return false; @@ -282,87 +2440,26 @@ class Query$GetApiTokensQuery$api { } } -extension UtilityExtension$Query$GetApiTokensQuery$api - on Query$GetApiTokensQuery$api { - CopyWith$Query$GetApiTokensQuery$api - get copyWith => CopyWith$Query$GetApiTokensQuery$api(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiTokensQuery$api { - factory CopyWith$Query$GetApiTokensQuery$api( - Query$GetApiTokensQuery$api instance, - TRes Function(Query$GetApiTokensQuery$api) then) = - _CopyWithImpl$Query$GetApiTokensQuery$api; - - factory CopyWith$Query$GetApiTokensQuery$api.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery$api; - - TRes call( - {List? devices, - String? $__typename}); - TRes devices( - Iterable Function( - Iterable< - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices>>) - _fn); -} - -class _CopyWithImpl$Query$GetApiTokensQuery$api - implements CopyWith$Query$GetApiTokensQuery$api { - _CopyWithImpl$Query$GetApiTokensQuery$api(this._instance, this._then); - - final Query$GetApiTokensQuery$api _instance; - - final TRes Function(Query$GetApiTokensQuery$api) _then; - - static const _undefined = {}; - - TRes call({Object? devices = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery$api( - devices: devices == _undefined || devices == null - ? _instance.devices - : (devices as List), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - TRes devices( - Iterable Function( - Iterable< - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices>>) - _fn) => - call( - devices: _fn(_instance.devices.map((e) => - CopyWith$Query$GetApiTokensQuery$api$devices(e, (i) => i))) - .toList()); -} - -class _CopyWithStubImpl$Query$GetApiTokensQuery$api - implements CopyWith$Query$GetApiTokensQuery$api { - _CopyWithStubImpl$Query$GetApiTokensQuery$api(this._res); - - TRes _res; - - call( - {List? devices, +extension UtilityExtension$Query$GetApiTokens$api on Query$GetApiTokens$api { + Query$GetApiTokens$api copyWith( + {List? devices, String? $__typename}) => - _res; - devices(_fn) => _res; + Query$GetApiTokens$api( + devices: devices == null ? this.devices : devices, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetApiTokensQuery$api$devices { - Query$GetApiTokensQuery$api$devices( +class Query$GetApiTokens$api$devices { + Query$GetApiTokens$api$devices( {required this.creationDate, required this.isCaller, required this.name, required this.$__typename}); @override - factory Query$GetApiTokensQuery$api$devices.fromJson( - Map json) => - _$Query$GetApiTokensQuery$api$devicesFromJson(json); + factory Query$GetApiTokens$api$devices.fromJson(Map json) => + _$Query$GetApiTokens$api$devicesFromJson(json); @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) final DateTime creationDate; @@ -374,8 +2471,7 @@ class Query$GetApiTokensQuery$api$devices { @JsonKey(name: '__typename') final String $__typename; - Map toJson() => - _$Query$GetApiTokensQuery$api$devicesToJson(this); + Map toJson() => _$Query$GetApiTokens$api$devicesToJson(this); int get hashCode { final l$creationDate = creationDate; final l$isCaller = isCaller; @@ -387,7 +2483,7 @@ class Query$GetApiTokensQuery$api$devices { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiTokensQuery$api$devices) || + if (!(other is Query$GetApiTokens$api$devices) || runtimeType != other.runtimeType) return false; final l$creationDate = creationDate; final lOther$creationDate = other.creationDate; @@ -405,88 +2501,34 @@ class Query$GetApiTokensQuery$api$devices { } } -extension UtilityExtension$Query$GetApiTokensQuery$api$devices - on Query$GetApiTokensQuery$api$devices { - CopyWith$Query$GetApiTokensQuery$api$devices< - Query$GetApiTokensQuery$api$devices> - get copyWith => - CopyWith$Query$GetApiTokensQuery$api$devices(this, (i) => i); -} - -abstract class CopyWith$Query$GetApiTokensQuery$api$devices { - factory CopyWith$Query$GetApiTokensQuery$api$devices( - Query$GetApiTokensQuery$api$devices instance, - TRes Function(Query$GetApiTokensQuery$api$devices) then) = - _CopyWithImpl$Query$GetApiTokensQuery$api$devices; - - factory CopyWith$Query$GetApiTokensQuery$api$devices.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices; - - TRes call( - {DateTime? creationDate, - bool? isCaller, - String? name, - String? $__typename}); -} - -class _CopyWithImpl$Query$GetApiTokensQuery$api$devices - implements CopyWith$Query$GetApiTokensQuery$api$devices { - _CopyWithImpl$Query$GetApiTokensQuery$api$devices(this._instance, this._then); - - final Query$GetApiTokensQuery$api$devices _instance; - - final TRes Function(Query$GetApiTokensQuery$api$devices) _then; - - static const _undefined = {}; - - TRes call( - {Object? creationDate = _undefined, - Object? isCaller = _undefined, - Object? name = _undefined, - Object? $__typename = _undefined}) => - _then(Query$GetApiTokensQuery$api$devices( - creationDate: creationDate == _undefined || creationDate == null - ? _instance.creationDate - : (creationDate as DateTime), - isCaller: isCaller == _undefined || isCaller == null - ? _instance.isCaller - : (isCaller as bool), - name: name == _undefined || name == null - ? _instance.name - : (name as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); -} - -class _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices - implements CopyWith$Query$GetApiTokensQuery$api$devices { - _CopyWithStubImpl$Query$GetApiTokensQuery$api$devices(this._res); - - TRes _res; - - call( +extension UtilityExtension$Query$GetApiTokens$api$devices + on Query$GetApiTokens$api$devices { + Query$GetApiTokens$api$devices copyWith( {DateTime? creationDate, bool? isCaller, String? name, String? $__typename}) => - _res; + Query$GetApiTokens$api$devices( + creationDate: creationDate == null ? this.creationDate : creationDate, + isCaller: isCaller == null ? this.isCaller : isCaller, + name: name == null ? this.name : name, + $__typename: $__typename == null ? this.$__typename : $__typename); } @JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery { - Query$GetApiVersionQuery({required this.api, required this.$__typename}); +class Query$RecoveryKey { + Query$RecoveryKey({required this.api, required this.$__typename}); @override - factory Query$GetApiVersionQuery.fromJson(Map json) => - _$Query$GetApiVersionQueryFromJson(json); + factory Query$RecoveryKey.fromJson(Map json) => + _$Query$RecoveryKeyFromJson(json); - final Query$GetApiVersionQuery$api api; + final Query$RecoveryKey$api api; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionQueryToJson(this); + Map toJson() => _$Query$RecoveryKeyToJson(this); int get hashCode { final l$api = api; final l$$__typename = $__typename; @@ -496,8 +2538,8 @@ class Query$GetApiVersionQuery { @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery) || - runtimeType != other.runtimeType) return false; + if (!(other is Query$RecoveryKey) || runtimeType != other.runtimeType) + return false; final l$api = api; final lOther$api = other.api; if (l$api != lOther$api) return false; @@ -508,64 +2550,18 @@ class Query$GetApiVersionQuery { } } -extension UtilityExtension$Query$GetApiVersionQuery - on Query$GetApiVersionQuery { - CopyWith$Query$GetApiVersionQuery get copyWith => - CopyWith$Query$GetApiVersionQuery(this, (i) => i); +extension UtilityExtension$Query$RecoveryKey on Query$RecoveryKey { + Query$RecoveryKey copyWith( + {Query$RecoveryKey$api? api, String? $__typename}) => + Query$RecoveryKey( + api: api == null ? this.api : api, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiVersionQuery { - factory CopyWith$Query$GetApiVersionQuery(Query$GetApiVersionQuery instance, - TRes Function(Query$GetApiVersionQuery) then) = - _CopyWithImpl$Query$GetApiVersionQuery; - - factory CopyWith$Query$GetApiVersionQuery.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery; - - TRes call({Query$GetApiVersionQuery$api? api, String? $__typename}); - CopyWith$Query$GetApiVersionQuery$api get api; -} - -class _CopyWithImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithImpl$Query$GetApiVersionQuery(this._instance, this._then); - - final Query$GetApiVersionQuery _instance; - - final TRes Function(Query$GetApiVersionQuery) _then; - - static const _undefined = {}; - - TRes call({Object? api = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery( - api: api == _undefined || api == null - ? _instance.api - : (api as Query$GetApiVersionQuery$api), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); - CopyWith$Query$GetApiVersionQuery$api get api { - final local$api = _instance.api; - return CopyWith$Query$GetApiVersionQuery$api( - local$api, (e) => call(api: e)); - } -} - -class _CopyWithStubImpl$Query$GetApiVersionQuery - implements CopyWith$Query$GetApiVersionQuery { - _CopyWithStubImpl$Query$GetApiVersionQuery(this._res); - - TRes _res; - - call({Query$GetApiVersionQuery$api? api, String? $__typename}) => _res; - CopyWith$Query$GetApiVersionQuery$api get api => - CopyWith$Query$GetApiVersionQuery$api.stub(_res); -} - -const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ +const documentNodeQueryRecoveryKey = DocumentNode(definitions: [ OperationDefinitionNode( type: OperationType.query, - name: NameNode(value: 'GetApiVersionQuery'), + name: NameNode(value: 'RecoveryKey'), variableDefinitions: [], directives: [], selectionSet: SelectionSetNode(selections: [ @@ -576,7 +2572,402 @@ const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ directives: [], selectionSet: SelectionSetNode(selections: [ FieldNode( - name: NameNode(value: 'version'), + name: NameNode(value: 'recoveryKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'creationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'exists'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'expirationDate'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usesLeft'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'valid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$RecoveryKey _parserFn$Query$RecoveryKey(Map data) => + Query$RecoveryKey.fromJson(data); + +class Options$Query$RecoveryKey + extends graphql.QueryOptions { + Options$Query$RecoveryKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryRecoveryKey, + parserFn: _parserFn$Query$RecoveryKey); +} + +class WatchOptions$Query$RecoveryKey + extends graphql.WatchQueryOptions { + WatchOptions$Query$RecoveryKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryRecoveryKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$RecoveryKey); +} + +class FetchMoreOptions$Query$RecoveryKey extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$RecoveryKey({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryRecoveryKey); +} + +extension ClientExtension$Query$RecoveryKey on graphql.GraphQLClient { + Future> query$RecoveryKey( + [Options$Query$RecoveryKey? options]) async => + await this.query(options ?? Options$Query$RecoveryKey()); + graphql.ObservableQuery watchQuery$RecoveryKey( + [WatchOptions$Query$RecoveryKey? options]) => + this.watchQuery(options ?? WatchOptions$Query$RecoveryKey()); + void writeQuery$RecoveryKey( + {required Query$RecoveryKey data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryRecoveryKey)), + data: data.toJson(), + broadcast: broadcast); + Query$RecoveryKey? readQuery$RecoveryKey({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryRecoveryKey)), + optimistic: optimistic); + return result == null ? null : Query$RecoveryKey.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$RecoveryKey$api { + Query$RecoveryKey$api({required this.recoveryKey, required this.$__typename}); + + @override + factory Query$RecoveryKey$api.fromJson(Map json) => + _$Query$RecoveryKey$apiFromJson(json); + + final Query$RecoveryKey$api$recoveryKey recoveryKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$RecoveryKey$apiToJson(this); + int get hashCode { + final l$recoveryKey = recoveryKey; + final l$$__typename = $__typename; + return Object.hashAll([l$recoveryKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$RecoveryKey$api) || runtimeType != other.runtimeType) + return false; + final l$recoveryKey = recoveryKey; + final lOther$recoveryKey = other.recoveryKey; + if (l$recoveryKey != lOther$recoveryKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$RecoveryKey$api on Query$RecoveryKey$api { + Query$RecoveryKey$api copyWith( + {Query$RecoveryKey$api$recoveryKey? recoveryKey, + String? $__typename}) => + Query$RecoveryKey$api( + recoveryKey: recoveryKey == null ? this.recoveryKey : recoveryKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$RecoveryKey$api$recoveryKey { + Query$RecoveryKey$api$recoveryKey( + {this.creationDate, + required this.exists, + this.expirationDate, + this.usesLeft, + required this.valid, + required this.$__typename}); + + @override + factory Query$RecoveryKey$api$recoveryKey.fromJson( + Map json) => + _$Query$RecoveryKey$api$recoveryKeyFromJson(json); + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? creationDate; + + final bool exists; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? expirationDate; + + final int? usesLeft; + + final bool valid; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$RecoveryKey$api$recoveryKeyToJson(this); + int get hashCode { + final l$creationDate = creationDate; + final l$exists = exists; + final l$expirationDate = expirationDate; + final l$usesLeft = usesLeft; + final l$valid = valid; + final l$$__typename = $__typename; + return Object.hashAll([ + l$creationDate, + l$exists, + l$expirationDate, + l$usesLeft, + l$valid, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$RecoveryKey$api$recoveryKey) || + runtimeType != other.runtimeType) return false; + final l$creationDate = creationDate; + final lOther$creationDate = other.creationDate; + if (l$creationDate != lOther$creationDate) return false; + final l$exists = exists; + final lOther$exists = other.exists; + if (l$exists != lOther$exists) return false; + final l$expirationDate = expirationDate; + final lOther$expirationDate = other.expirationDate; + if (l$expirationDate != lOther$expirationDate) return false; + final l$usesLeft = usesLeft; + final lOther$usesLeft = other.usesLeft; + if (l$usesLeft != lOther$usesLeft) return false; + final l$valid = valid; + final lOther$valid = other.valid; + if (l$valid != lOther$valid) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$RecoveryKey$api$recoveryKey + on Query$RecoveryKey$api$recoveryKey { + Query$RecoveryKey$api$recoveryKey copyWith( + {DateTime? Function()? creationDate, + bool? exists, + DateTime? Function()? expirationDate, + int? Function()? usesLeft, + bool? valid, + String? $__typename}) => + Query$RecoveryKey$api$recoveryKey( + creationDate: + creationDate == null ? this.creationDate : creationDate(), + exists: exists == null ? this.exists : exists, + expirationDate: + expirationDate == null ? this.expirationDate : expirationDate(), + usesLeft: usesLeft == null ? this.usesLeft : usesLeft(), + valid: valid == null ? this.valid : valid, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$GetNewRecoveryApiKey { + Variables$Mutation$GetNewRecoveryApiKey({this.limits}); + + @override + factory Variables$Mutation$GetNewRecoveryApiKey.fromJson( + Map json) => + _$Variables$Mutation$GetNewRecoveryApiKeyFromJson(json); + + final Input$RecoveryKeyLimitsInput? limits; + + Map toJson() => + _$Variables$Mutation$GetNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$limits = limits; + return Object.hashAll([l$limits]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$limits = limits; + final lOther$limits = other.limits; + if (l$limits != lOther$limits) return false; + return true; + } + + Variables$Mutation$GetNewRecoveryApiKey copyWith( + {Input$RecoveryKeyLimitsInput? Function()? limits}) => + Variables$Mutation$GetNewRecoveryApiKey( + limits: limits == null ? this.limits : limits()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey( + {required this.getNewRecoveryApiKey, required this.$__typename}); + + @override + factory Mutation$GetNewRecoveryApiKey.fromJson(Map json) => + _$Mutation$GetNewRecoveryApiKeyFromJson(json); + + final Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey getNewRecoveryApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$GetNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$getNewRecoveryApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$getNewRecoveryApiKey = getNewRecoveryApiKey; + final lOther$getNewRecoveryApiKey = other.getNewRecoveryApiKey; + if (l$getNewRecoveryApiKey != lOther$getNewRecoveryApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewRecoveryApiKey + on Mutation$GetNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey copyWith( + {Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey? + getNewRecoveryApiKey, + String? $__typename}) => + Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: getNewRecoveryApiKey == null + ? this.getNewRecoveryApiKey + : getNewRecoveryApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationGetNewRecoveryApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'GetNewRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'limits')), + type: NamedTypeNode( + name: NameNode(value: 'RecoveryKeyLimitsInput'), + isNonNull: false), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'limits'), + value: VariableNode(name: NameNode(value: 'limits'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'key'), alias: null, arguments: [], directives: [], @@ -595,36 +2986,623 @@ const documentNodeQueryGetApiVersionQuery = DocumentNode(definitions: [ directives: [], selectionSet: null) ])), + fragmentDefinitionbasicMutationReturnFields, ]); -Query$GetApiVersionQuery _parserFn$Query$GetApiVersionQuery( +Mutation$GetNewRecoveryApiKey _parserFn$Mutation$GetNewRecoveryApiKey( Map data) => - Query$GetApiVersionQuery.fromJson(data); + Mutation$GetNewRecoveryApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$GetNewRecoveryApiKey = FutureOr + Function(dynamic, Mutation$GetNewRecoveryApiKey?); -class Options$Query$GetApiVersionQuery - extends graphql.QueryOptions { - Options$Query$GetApiVersionQuery( +class Options$Mutation$GetNewRecoveryApiKey + extends graphql.MutationOptions { + Options$Mutation$GetNewRecoveryApiKey( {String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, graphql.CacheRereadPolicy? cacheRereadPolicy, Object? optimisticResult, - Duration? pollInterval, - graphql.Context? context}) - : super( + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables?.toJson() ?? {}, operationName: operationName, fetchPolicy: fetchPolicy, errorPolicy: errorPolicy, cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, - pollInterval: pollInterval, context: context, - document: documentNodeQueryGetApiVersionQuery, - parserFn: _parserFn$Query$GetApiVersionQuery); + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$GetNewRecoveryApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationGetNewRecoveryApiKey, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); + + final OnMutationCompleted$Mutation$GetNewRecoveryApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class WatchOptions$Query$GetApiVersionQuery - extends graphql.WatchQueryOptions { - WatchOptions$Query$GetApiVersionQuery( +class WatchOptions$Mutation$GetNewRecoveryApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$GetNewRecoveryApiKey( + {String? operationName, + Variables$Mutation$GetNewRecoveryApiKey? variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables?.toJson() ?? {}, + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewRecoveryApiKey); +} + +extension ClientExtension$Mutation$GetNewRecoveryApiKey + on graphql.GraphQLClient { + Future> + mutate$GetNewRecoveryApiKey( + [Options$Mutation$GetNewRecoveryApiKey? options]) async => + await this.mutate(options ?? Options$Mutation$GetNewRecoveryApiKey()); + graphql.ObservableQuery + watchMutation$GetNewRecoveryApiKey( + [WatchOptions$Mutation$GetNewRecoveryApiKey? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$GetNewRecoveryApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + implements Fragment$basicMutationReturnFields { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key}); + + @override + factory Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + Map json) => + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? key; + + Map toJson() => + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$key = key; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + on Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey { + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? key}) => + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + key: key == null ? this.key : key()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$UseRecoveryApiKey { + Variables$Mutation$UseRecoveryApiKey({required this.input}); + + @override + factory Variables$Mutation$UseRecoveryApiKey.fromJson( + Map json) => + _$Variables$Mutation$UseRecoveryApiKeyFromJson(json); + + final Input$UseRecoveryKeyInput input; + + Map toJson() => + _$Variables$Mutation$UseRecoveryApiKeyToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$UseRecoveryApiKey copyWith( + {Input$UseRecoveryKeyInput? input}) => + Variables$Mutation$UseRecoveryApiKey( + input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UseRecoveryApiKey { + Mutation$UseRecoveryApiKey( + {required this.useRecoveryApiKey, required this.$__typename}); + + @override + factory Mutation$UseRecoveryApiKey.fromJson(Map json) => + _$Mutation$UseRecoveryApiKeyFromJson(json); + + final Mutation$UseRecoveryApiKey$useRecoveryApiKey useRecoveryApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$UseRecoveryApiKeyToJson(this); + int get hashCode { + final l$useRecoveryApiKey = useRecoveryApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$useRecoveryApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UseRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$useRecoveryApiKey = useRecoveryApiKey; + final lOther$useRecoveryApiKey = other.useRecoveryApiKey; + if (l$useRecoveryApiKey != lOther$useRecoveryApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UseRecoveryApiKey + on Mutation$UseRecoveryApiKey { + Mutation$UseRecoveryApiKey copyWith( + {Mutation$UseRecoveryApiKey$useRecoveryApiKey? useRecoveryApiKey, + String? $__typename}) => + Mutation$UseRecoveryApiKey( + useRecoveryApiKey: useRecoveryApiKey == null + ? this.useRecoveryApiKey + : useRecoveryApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationUseRecoveryApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'UseRecoveryApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseRecoveryKeyInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'useRecoveryApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + 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$UseRecoveryApiKey _parserFn$Mutation$UseRecoveryApiKey( + Map data) => + Mutation$UseRecoveryApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$UseRecoveryApiKey = FutureOr + Function(dynamic, Mutation$UseRecoveryApiKey?); + +class Options$Mutation$UseRecoveryApiKey + extends graphql.MutationOptions { + Options$Mutation$UseRecoveryApiKey( + {String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$UseRecoveryApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationUseRecoveryApiKey, + parserFn: _parserFn$Mutation$UseRecoveryApiKey); + + final OnMutationCompleted$Mutation$UseRecoveryApiKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$UseRecoveryApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UseRecoveryApiKey( + {String? operationName, + required Variables$Mutation$UseRecoveryApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUseRecoveryApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UseRecoveryApiKey); +} + +extension ClientExtension$Mutation$UseRecoveryApiKey on graphql.GraphQLClient { + Future> + mutate$UseRecoveryApiKey( + Options$Mutation$UseRecoveryApiKey options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$UseRecoveryApiKey( + WatchOptions$Mutation$UseRecoveryApiKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UseRecoveryApiKey$useRecoveryApiKey + implements Fragment$basicMutationReturnFields { + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); + + @override + factory Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + Map json) => + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? token; + + Map toJson() => + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UseRecoveryApiKey$useRecoveryApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UseRecoveryApiKey$useRecoveryApiKey + on Mutation$UseRecoveryApiKey$useRecoveryApiKey { + Mutation$UseRecoveryApiKey$useRecoveryApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RefreshDeviceApiToken { + Mutation$RefreshDeviceApiToken( + {required this.refreshDeviceApiToken, required this.$__typename}); + + @override + factory Mutation$RefreshDeviceApiToken.fromJson(Map json) => + _$Mutation$RefreshDeviceApiTokenFromJson(json); + + final Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + refreshDeviceApiToken; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RefreshDeviceApiTokenToJson(this); + int get hashCode { + final l$refreshDeviceApiToken = refreshDeviceApiToken; + final l$$__typename = $__typename; + return Object.hashAll([l$refreshDeviceApiToken, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RefreshDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$refreshDeviceApiToken = refreshDeviceApiToken; + final lOther$refreshDeviceApiToken = other.refreshDeviceApiToken; + if (l$refreshDeviceApiToken != lOther$refreshDeviceApiToken) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RefreshDeviceApiToken + on Mutation$RefreshDeviceApiToken { + Mutation$RefreshDeviceApiToken copyWith( + {Mutation$RefreshDeviceApiToken$refreshDeviceApiToken? + refreshDeviceApiToken, + String? $__typename}) => + Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: refreshDeviceApiToken == null + ? this.refreshDeviceApiToken + : refreshDeviceApiToken, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRefreshDeviceApiToken = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RefreshDeviceApiToken'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'refreshDeviceApiToken'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + 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$RefreshDeviceApiToken _parserFn$Mutation$RefreshDeviceApiToken( + Map data) => + Mutation$RefreshDeviceApiToken.fromJson(data); +typedef OnMutationCompleted$Mutation$RefreshDeviceApiToken = FutureOr + Function(dynamic, Mutation$RefreshDeviceApiToken?); + +class Options$Mutation$RefreshDeviceApiToken + extends graphql.MutationOptions { + Options$Mutation$RefreshDeviceApiToken( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RefreshDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RefreshDeviceApiToken(data)), + update: update, + onError: onError, + document: documentNodeMutationRefreshDeviceApiToken, + parserFn: _parserFn$Mutation$RefreshDeviceApiToken); + + final OnMutationCompleted$Mutation$RefreshDeviceApiToken? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RefreshDeviceApiToken + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RefreshDeviceApiToken( {String? operationName, graphql.FetchPolicy? fetchPolicy, graphql.ErrorPolicy? errorPolicy, @@ -642,80 +3620,169 @@ class WatchOptions$Query$GetApiVersionQuery cacheRereadPolicy: cacheRereadPolicy, optimisticResult: optimisticResult, context: context, - document: documentNodeQueryGetApiVersionQuery, + document: documentNodeMutationRefreshDeviceApiToken, pollInterval: pollInterval, eagerlyFetchResults: eagerlyFetchResults, carryForwardDataOnException: carryForwardDataOnException, fetchResults: fetchResults, - parserFn: _parserFn$Query$GetApiVersionQuery); + parserFn: _parserFn$Mutation$RefreshDeviceApiToken); } -class FetchMoreOptions$Query$GetApiVersionQuery - extends graphql.FetchMoreOptions { - FetchMoreOptions$Query$GetApiVersionQuery( - {required graphql.UpdateQuery updateQuery}) - : super( - updateQuery: updateQuery, - document: documentNodeQueryGetApiVersionQuery); -} - -extension ClientExtension$Query$GetApiVersionQuery on graphql.GraphQLClient { - Future> - query$GetApiVersionQuery( - [Options$Query$GetApiVersionQuery? options]) async => - await this.query(options ?? Options$Query$GetApiVersionQuery()); - graphql.ObservableQuery - watchQuery$GetApiVersionQuery( - [WatchOptions$Query$GetApiVersionQuery? options]) => - this.watchQuery(options ?? WatchOptions$Query$GetApiVersionQuery()); - void writeQuery$GetApiVersionQuery( - {required Query$GetApiVersionQuery data, bool broadcast = true}) => - this.writeQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - data: data.toJson(), - broadcast: broadcast); - Query$GetApiVersionQuery? readQuery$GetApiVersionQuery( - {bool optimistic = true}) { - final result = this.readQuery( - graphql.Request( - operation: graphql.Operation( - document: documentNodeQueryGetApiVersionQuery)), - optimistic: optimistic); - return result == null ? null : Query$GetApiVersionQuery.fromJson(result); - } +extension ClientExtension$Mutation$RefreshDeviceApiToken + on graphql.GraphQLClient { + Future> + mutate$RefreshDeviceApiToken( + [Options$Mutation$RefreshDeviceApiToken? options]) async => + await this + .mutate(options ?? Options$Mutation$RefreshDeviceApiToken()); + graphql.ObservableQuery + watchMutation$RefreshDeviceApiToken( + [WatchOptions$Mutation$RefreshDeviceApiToken? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$RefreshDeviceApiToken()); } @JsonSerializable(explicitToJson: true) -class Query$GetApiVersionQuery$api { - Query$GetApiVersionQuery$api( - {required this.version, required this.$__typename}); +class Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + implements Fragment$basicMutationReturnFields { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); @override - factory Query$GetApiVersionQuery$api.fromJson(Map json) => - _$Query$GetApiVersionQuery$apiFromJson(json); + factory Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + Map json) => + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson(json); - final String version; + final int code; + + final String message; + + final bool success; @JsonKey(name: '__typename') final String $__typename; - Map toJson() => _$Query$GetApiVersionQuery$apiToJson(this); + final String? token; + + Map toJson() => + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson(this); int get hashCode { - final l$version = version; + final l$code = code; + final l$message = message; + final l$success = success; final l$$__typename = $__typename; - return Object.hashAll([l$version, l$$__typename]); + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); } @override bool operator ==(Object other) { if (identical(this, other)) return true; - if (!(other is Query$GetApiVersionQuery$api) || + if (!(other is Mutation$RefreshDeviceApiToken$refreshDeviceApiToken) || runtimeType != other.runtimeType) return false; - final l$version = version; - final lOther$version = other.version; - if (l$version != lOther$version) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + on Mutation$RefreshDeviceApiToken$refreshDeviceApiToken { + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DeleteDeviceApiToken { + Variables$Mutation$DeleteDeviceApiToken({required this.device}); + + @override + factory Variables$Mutation$DeleteDeviceApiToken.fromJson( + Map json) => + _$Variables$Mutation$DeleteDeviceApiTokenFromJson(json); + + final String device; + + Map toJson() => + _$Variables$Mutation$DeleteDeviceApiTokenToJson(this); + int get hashCode { + final l$device = device; + return Object.hashAll([l$device]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$device = device; + final lOther$device = other.device; + if (l$device != lOther$device) return false; + return true; + } + + Variables$Mutation$DeleteDeviceApiToken copyWith({String? device}) => + Variables$Mutation$DeleteDeviceApiToken( + device: device == null ? this.device : device); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteDeviceApiToken { + Mutation$DeleteDeviceApiToken( + {required this.deleteDeviceApiToken, required this.$__typename}); + + @override + factory Mutation$DeleteDeviceApiToken.fromJson(Map json) => + _$Mutation$DeleteDeviceApiTokenFromJson(json); + + final Mutation$DeleteDeviceApiToken$deleteDeviceApiToken deleteDeviceApiToken; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteDeviceApiTokenToJson(this); + int get hashCode { + final l$deleteDeviceApiToken = deleteDeviceApiToken; + final l$$__typename = $__typename; + return Object.hashAll([l$deleteDeviceApiToken, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$deleteDeviceApiToken = deleteDeviceApiToken; + final lOther$deleteDeviceApiToken = other.deleteDeviceApiToken; + if (l$deleteDeviceApiToken != lOther$deleteDeviceApiToken) return false; final l$$__typename = $__typename; final lOther$$__typename = other.$__typename; if (l$$__typename != lOther$$__typename) return false; @@ -723,49 +3790,1035 @@ class Query$GetApiVersionQuery$api { } } -extension UtilityExtension$Query$GetApiVersionQuery$api - on Query$GetApiVersionQuery$api { - CopyWith$Query$GetApiVersionQuery$api - get copyWith => CopyWith$Query$GetApiVersionQuery$api(this, (i) => i); +extension UtilityExtension$Mutation$DeleteDeviceApiToken + on Mutation$DeleteDeviceApiToken { + Mutation$DeleteDeviceApiToken copyWith( + {Mutation$DeleteDeviceApiToken$deleteDeviceApiToken? + deleteDeviceApiToken, + String? $__typename}) => + Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: deleteDeviceApiToken == null + ? this.deleteDeviceApiToken + : deleteDeviceApiToken, + $__typename: $__typename == null ? this.$__typename : $__typename); } -abstract class CopyWith$Query$GetApiVersionQuery$api { - factory CopyWith$Query$GetApiVersionQuery$api( - Query$GetApiVersionQuery$api instance, - TRes Function(Query$GetApiVersionQuery$api) then) = - _CopyWithImpl$Query$GetApiVersionQuery$api; +const documentNodeMutationDeleteDeviceApiToken = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DeleteDeviceApiToken'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'device')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteDeviceApiToken'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'device'), + value: VariableNode(name: NameNode(value: 'device'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DeleteDeviceApiToken _parserFn$Mutation$DeleteDeviceApiToken( + Map data) => + Mutation$DeleteDeviceApiToken.fromJson(data); +typedef OnMutationCompleted$Mutation$DeleteDeviceApiToken = FutureOr + Function(dynamic, Mutation$DeleteDeviceApiToken?); - factory CopyWith$Query$GetApiVersionQuery$api.stub(TRes res) = - _CopyWithStubImpl$Query$GetApiVersionQuery$api; +class Options$Mutation$DeleteDeviceApiToken + extends graphql.MutationOptions { + Options$Mutation$DeleteDeviceApiToken( + {String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteDeviceApiToken? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$DeleteDeviceApiToken(data)), + update: update, + onError: onError, + document: documentNodeMutationDeleteDeviceApiToken, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken); - TRes call({String? version, String? $__typename}); + final OnMutationCompleted$Mutation$DeleteDeviceApiToken? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; } -class _CopyWithImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithImpl$Query$GetApiVersionQuery$api(this._instance, this._then); - - final Query$GetApiVersionQuery$api _instance; - - final TRes Function(Query$GetApiVersionQuery$api) _then; - - static const _undefined = {}; - - TRes call({Object? version = _undefined, Object? $__typename = _undefined}) => - _then(Query$GetApiVersionQuery$api( - version: version == _undefined || version == null - ? _instance.version - : (version as String), - $__typename: $__typename == _undefined || $__typename == null - ? _instance.$__typename - : ($__typename as String))); +class WatchOptions$Mutation$DeleteDeviceApiToken + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DeleteDeviceApiToken( + {String? operationName, + required Variables$Mutation$DeleteDeviceApiToken variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteDeviceApiToken, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteDeviceApiToken); } -class _CopyWithStubImpl$Query$GetApiVersionQuery$api - implements CopyWith$Query$GetApiVersionQuery$api { - _CopyWithStubImpl$Query$GetApiVersionQuery$api(this._res); - - TRes _res; - - call({String? version, String? $__typename}) => _res; +extension ClientExtension$Mutation$DeleteDeviceApiToken + on graphql.GraphQLClient { + Future> + mutate$DeleteDeviceApiToken( + Options$Mutation$DeleteDeviceApiToken options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$DeleteDeviceApiToken( + WatchOptions$Mutation$DeleteDeviceApiToken options) => + this.watchMutation(options); } + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + implements Fragment$basicMutationReturnFields { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + Map json) => + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DeleteDeviceApiToken$deleteDeviceApiToken) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + on Mutation$DeleteDeviceApiToken$deleteDeviceApiToken { + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewDeviceApiKey { + Mutation$GetNewDeviceApiKey( + {required this.getNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$GetNewDeviceApiKey.fromJson(Map json) => + _$Mutation$GetNewDeviceApiKeyFromJson(json); + + final Mutation$GetNewDeviceApiKey$getNewDeviceApiKey getNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$GetNewDeviceApiKeyToJson(this); + int get hashCode { + final l$getNewDeviceApiKey = getNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$getNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$getNewDeviceApiKey = getNewDeviceApiKey; + final lOther$getNewDeviceApiKey = other.getNewDeviceApiKey; + if (l$getNewDeviceApiKey != lOther$getNewDeviceApiKey) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewDeviceApiKey + on Mutation$GetNewDeviceApiKey { + Mutation$GetNewDeviceApiKey copyWith( + {Mutation$GetNewDeviceApiKey$getNewDeviceApiKey? getNewDeviceApiKey, + String? $__typename}) => + Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: getNewDeviceApiKey == null + ? this.getNewDeviceApiKey + : getNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationGetNewDeviceApiKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'GetNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'key'), + 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$GetNewDeviceApiKey _parserFn$Mutation$GetNewDeviceApiKey( + Map data) => + Mutation$GetNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$GetNewDeviceApiKey = FutureOr + Function(dynamic, Mutation$GetNewDeviceApiKey?); + +class Options$Mutation$GetNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$GetNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$GetNewDeviceApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationGetNewDeviceApiKey, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey); + + final OnMutationCompleted$Mutation$GetNewDeviceApiKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$GetNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$GetNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationGetNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$GetNewDeviceApiKey); +} + +extension ClientExtension$Mutation$GetNewDeviceApiKey on graphql.GraphQLClient { + Future> + mutate$GetNewDeviceApiKey( + [Options$Mutation$GetNewDeviceApiKey? options]) async => + await this.mutate(options ?? Options$Mutation$GetNewDeviceApiKey()); + graphql.ObservableQuery< + Mutation$GetNewDeviceApiKey> watchMutation$GetNewDeviceApiKey( + [WatchOptions$Mutation$GetNewDeviceApiKey? options]) => + this.watchMutation(options ?? WatchOptions$Mutation$GetNewDeviceApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.key}); + + @override + factory Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? key; + + Map toJson() => + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$key = key; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$key]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$GetNewDeviceApiKey$getNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$key = key; + final lOther$key = other.key; + if (l$key != lOther$key) return false; + return true; + } +} + +extension UtilityExtension$Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + on Mutation$GetNewDeviceApiKey$getNewDeviceApiKey { + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? key}) => + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + key: key == null ? this.key : key()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$InvalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey( + {required this.invalidateNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$InvalidateNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$InvalidateNewDeviceApiKeyFromJson(json); + + final Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + invalidateNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$InvalidateNewDeviceApiKeyToJson(this); + int get hashCode { + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$invalidateNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$InvalidateNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$invalidateNewDeviceApiKey = invalidateNewDeviceApiKey; + final lOther$invalidateNewDeviceApiKey = other.invalidateNewDeviceApiKey; + if (l$invalidateNewDeviceApiKey != lOther$invalidateNewDeviceApiKey) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey + on Mutation$InvalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey copyWith( + {Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey? + invalidateNewDeviceApiKey, + String? $__typename}) => + Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: invalidateNewDeviceApiKey == null + ? this.invalidateNewDeviceApiKey + : invalidateNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationInvalidateNewDeviceApiKey = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'InvalidateNewDeviceApiKey'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'invalidateNewDeviceApiKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$InvalidateNewDeviceApiKey _parserFn$Mutation$InvalidateNewDeviceApiKey( + Map data) => + Mutation$InvalidateNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey = FutureOr + Function(dynamic, Mutation$InvalidateNewDeviceApiKey?); + +class Options$Mutation$InvalidateNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$InvalidateNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$InvalidateNewDeviceApiKey(data)), + update: update, + onError: onError, + document: documentNodeMutationInvalidateNewDeviceApiKey, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); + + final OnMutationCompleted$Mutation$InvalidateNewDeviceApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$InvalidateNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$InvalidateNewDeviceApiKey( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationInvalidateNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$InvalidateNewDeviceApiKey); +} + +extension ClientExtension$Mutation$InvalidateNewDeviceApiKey + on graphql.GraphQLClient { + Future> + mutate$InvalidateNewDeviceApiKey( + [Options$Mutation$InvalidateNewDeviceApiKey? options]) async => + await this + .mutate(options ?? Options$Mutation$InvalidateNewDeviceApiKey()); + graphql.ObservableQuery + watchMutation$InvalidateNewDeviceApiKey( + [WatchOptions$Mutation$InvalidateNewDeviceApiKey? options]) => + this.watchMutation( + options ?? WatchOptions$Mutation$InvalidateNewDeviceApiKey()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + on Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey { + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$AuthorizeWithNewDeviceApiKey { + Variables$Mutation$AuthorizeWithNewDeviceApiKey({required this.input}); + + @override + factory Variables$Mutation$AuthorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + + final Input$UseNewDeviceKeyInput input; + + Map toJson() => + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$AuthorizeWithNewDeviceApiKey copyWith( + {Input$UseNewDeviceKeyInput? input}) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AuthorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey( + {required this.authorizeWithNewDeviceApiKey, required this.$__typename}); + + @override + factory Mutation$AuthorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson(json); + + final Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + authorizeWithNewDeviceApiKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$AuthorizeWithNewDeviceApiKeyToJson(this); + int get hashCode { + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + final l$$__typename = $__typename; + return Object.hashAll([l$authorizeWithNewDeviceApiKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AuthorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$authorizeWithNewDeviceApiKey = authorizeWithNewDeviceApiKey; + final lOther$authorizeWithNewDeviceApiKey = + other.authorizeWithNewDeviceApiKey; + if (l$authorizeWithNewDeviceApiKey != lOther$authorizeWithNewDeviceApiKey) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey + on Mutation$AuthorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey copyWith( + {Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey? + authorizeWithNewDeviceApiKey, + String? $__typename}) => + Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: authorizeWithNewDeviceApiKey == null + ? this.authorizeWithNewDeviceApiKey + : authorizeWithNewDeviceApiKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationAuthorizeWithNewDeviceApiKey = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'AuthorizeWithNewDeviceApiKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'UseNewDeviceKeyInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'authorizeWithNewDeviceApiKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'token'), + 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$AuthorizeWithNewDeviceApiKey + _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( + Map data) => + Mutation$AuthorizeWithNewDeviceApiKey.fromJson(data); +typedef OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey + = FutureOr Function(dynamic, Mutation$AuthorizeWithNewDeviceApiKey?); + +class Options$Mutation$AuthorizeWithNewDeviceApiKey + extends graphql.MutationOptions { + Options$Mutation$AuthorizeWithNewDeviceApiKey( + {String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$AuthorizeWithNewDeviceApiKey( + data)), + update: update, + onError: onError, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); + + final OnMutationCompleted$Mutation$AuthorizeWithNewDeviceApiKey? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey( + {String? operationName, + required Variables$Mutation$AuthorizeWithNewDeviceApiKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAuthorizeWithNewDeviceApiKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AuthorizeWithNewDeviceApiKey); +} + +extension ClientExtension$Mutation$AuthorizeWithNewDeviceApiKey + on graphql.GraphQLClient { + Future> + mutate$AuthorizeWithNewDeviceApiKey( + Options$Mutation$AuthorizeWithNewDeviceApiKey options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$AuthorizeWithNewDeviceApiKey( + WatchOptions$Mutation$AuthorizeWithNewDeviceApiKey options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + implements Fragment$basicMutationReturnFields { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.token}); + + @override + factory Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey.fromJson( + Map json) => + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? token; + + Map toJson() => + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$token = token; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$token]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$token = token; + final lOther$token = other.token; + if (l$token != lOther$token) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + on Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey { + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? token}) => + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + token: token == null ? this.token : token()); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart index dcb8ba01..525f8d64 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_api.graphql.g.dart @@ -6,49 +6,370 @@ part of 'server_api.graphql.dart'; // JsonSerializableGenerator // ************************************************************************** -Query$GetApiTokensQuery _$Query$GetApiTokensQueryFromJson( +Fragment$basicMutationReturnFields _$Fragment$basicMutationReturnFieldsFromJson( Map json) => - Query$GetApiTokensQuery( - api: Query$GetApiTokensQuery$api.fromJson( - json['api'] as Map), + Fragment$basicMutationReturnFields( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, $__typename: json['__typename'] as String, ); -Map _$Query$GetApiTokensQueryToJson( - Query$GetApiTokensQuery instance) => +Map _$Fragment$basicMutationReturnFieldsToJson( + Fragment$basicMutationReturnFields instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetApiVersion _$Query$GetApiVersionFromJson(Map json) => + Query$GetApiVersion( + api: + Query$GetApiVersion$api.fromJson(json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersionToJson( + Query$GetApiVersion instance) => { 'api': instance.api.toJson(), '__typename': instance.$__typename, }; -Query$GetApiTokensQuery$api _$Query$GetApiTokensQuery$apiFromJson( +Query$GetApiVersion$api _$Query$GetApiVersion$apiFromJson( Map json) => - Query$GetApiTokensQuery$api( + Query$GetApiVersion$api( + version: json['version'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiVersion$apiToJson( + Query$GetApiVersion$api instance) => + { + 'version': instance.version, + '__typename': instance.$__typename, + }; + +Query$GetApiJobs _$Query$GetApiJobsFromJson(Map json) => + Query$GetApiJobs( + jobs: + Query$GetApiJobs$jobs.fromJson(json['jobs'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobsToJson(Query$GetApiJobs instance) => + { + 'jobs': instance.jobs.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetApiJobs$jobs _$Query$GetApiJobs$jobsFromJson( + Map json) => + Query$GetApiJobs$jobs( + getJobs: (json['getJobs'] as List) + .map((e) => + Query$GetApiJobs$jobs$getJobs.fromJson(e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobs$jobsToJson( + Query$GetApiJobs$jobs instance) => + { + 'getJobs': instance.getJobs.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$GetApiJobs$jobs$getJobs _$Query$GetApiJobs$jobs$getJobsFromJson( + Map json) => + Query$GetApiJobs$jobs$getJobs( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiJobs$jobs$getJobsToJson( + Query$GetApiJobs$jobs$getJobs instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; + +Variables$Mutation$RemoveJob _$Variables$Mutation$RemoveJobFromJson( + Map json) => + Variables$Mutation$RemoveJob( + jobId: json['jobId'] as String, + ); + +Map _$Variables$Mutation$RemoveJobToJson( + Variables$Mutation$RemoveJob instance) => + { + 'jobId': instance.jobId, + }; + +Mutation$RemoveJob _$Mutation$RemoveJobFromJson(Map json) => + Mutation$RemoveJob( + removeJob: Mutation$RemoveJob$removeJob.fromJson( + json['removeJob'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveJobToJson(Mutation$RemoveJob instance) => + { + 'removeJob': instance.removeJob.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RemoveJob$removeJob _$Mutation$RemoveJob$removeJobFromJson( + Map json) => + Mutation$RemoveJob$removeJob( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveJob$removeJobToJson( + Mutation$RemoveJob$removeJob instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRebuild _$Mutation$RunSystemRebuildFromJson( + Map json) => + Mutation$RunSystemRebuild( + runSystemRebuild: Mutation$RunSystemRebuild$runSystemRebuild.fromJson( + json['runSystemRebuild'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRebuildToJson( + Mutation$RunSystemRebuild instance) => + { + 'runSystemRebuild': instance.runSystemRebuild.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRebuild$runSystemRebuild + _$Mutation$RunSystemRebuild$runSystemRebuildFromJson( + Map json) => + Mutation$RunSystemRebuild$runSystemRebuild( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRebuild$runSystemRebuildToJson( + Mutation$RunSystemRebuild$runSystemRebuild instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRollback _$Mutation$RunSystemRollbackFromJson( + Map json) => + Mutation$RunSystemRollback( + runSystemRollback: Mutation$RunSystemRollback$runSystemRollback.fromJson( + json['runSystemRollback'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRollbackToJson( + Mutation$RunSystemRollback instance) => + { + 'runSystemRollback': instance.runSystemRollback.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemRollback$runSystemRollback + _$Mutation$RunSystemRollback$runSystemRollbackFromJson( + Map json) => + Mutation$RunSystemRollback$runSystemRollback( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemRollback$runSystemRollbackToJson( + Mutation$RunSystemRollback$runSystemRollback instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RunSystemUpgrade _$Mutation$RunSystemUpgradeFromJson( + Map json) => + Mutation$RunSystemUpgrade( + runSystemUpgrade: Mutation$RunSystemUpgrade$runSystemUpgrade.fromJson( + json['runSystemUpgrade'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemUpgradeToJson( + Mutation$RunSystemUpgrade instance) => + { + 'runSystemUpgrade': instance.runSystemUpgrade.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RunSystemUpgrade$runSystemUpgrade + _$Mutation$RunSystemUpgrade$runSystemUpgradeFromJson( + Map json) => + Mutation$RunSystemUpgrade$runSystemUpgrade( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RunSystemUpgrade$runSystemUpgradeToJson( + Mutation$RunSystemUpgrade$runSystemUpgrade instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$PullRepositoryChanges _$Mutation$PullRepositoryChangesFromJson( + Map json) => + Mutation$PullRepositoryChanges( + pullRepositoryChanges: + Mutation$PullRepositoryChanges$pullRepositoryChanges.fromJson( + json['pullRepositoryChanges'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$PullRepositoryChangesToJson( + Mutation$PullRepositoryChanges instance) => + { + 'pullRepositoryChanges': instance.pullRepositoryChanges.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$PullRepositoryChanges$pullRepositoryChanges + _$Mutation$PullRepositoryChanges$pullRepositoryChangesFromJson( + Map json) => + Mutation$PullRepositoryChanges$pullRepositoryChanges( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map + _$Mutation$PullRepositoryChanges$pullRepositoryChangesToJson( + Mutation$PullRepositoryChanges$pullRepositoryChanges instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$RebootSystem _$Mutation$RebootSystemFromJson( + Map json) => + Mutation$RebootSystem( + rebootSystem: Mutation$RebootSystem$rebootSystem.fromJson( + json['rebootSystem'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RebootSystemToJson( + Mutation$RebootSystem instance) => + { + 'rebootSystem': instance.rebootSystem.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RebootSystem$rebootSystem _$Mutation$RebootSystem$rebootSystemFromJson( + Map json) => + Mutation$RebootSystem$rebootSystem( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RebootSystem$rebootSystemToJson( + Mutation$RebootSystem$rebootSystem instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$GetApiTokens _$Query$GetApiTokensFromJson(Map json) => + Query$GetApiTokens( + api: Query$GetApiTokens$api.fromJson(json['api'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetApiTokensToJson(Query$GetApiTokens instance) => + { + 'api': instance.api.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetApiTokens$api _$Query$GetApiTokens$apiFromJson( + Map json) => + Query$GetApiTokens$api( devices: (json['devices'] as List) - .map((e) => Query$GetApiTokensQuery$api$devices.fromJson( + .map((e) => Query$GetApiTokens$api$devices.fromJson( e as Map)) .toList(), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiTokensQuery$apiToJson( - Query$GetApiTokensQuery$api instance) => +Map _$Query$GetApiTokens$apiToJson( + Query$GetApiTokens$api instance) => { 'devices': instance.devices.map((e) => e.toJson()).toList(), '__typename': instance.$__typename, }; -Query$GetApiTokensQuery$api$devices - _$Query$GetApiTokensQuery$api$devicesFromJson(Map json) => - Query$GetApiTokensQuery$api$devices( - creationDate: dateTimeFromJson(json['creationDate']), - isCaller: json['isCaller'] as bool, - name: json['name'] as String, - $__typename: json['__typename'] as String, - ); +Query$GetApiTokens$api$devices _$Query$GetApiTokens$api$devicesFromJson( + Map json) => + Query$GetApiTokens$api$devices( + creationDate: dateTimeFromJson(json['creationDate']), + isCaller: json['isCaller'] as bool, + name: json['name'] as String, + $__typename: json['__typename'] as String, + ); -Map _$Query$GetApiTokensQuery$api$devicesToJson( - Query$GetApiTokensQuery$api$devices instance) => +Map _$Query$GetApiTokens$api$devicesToJson( + Query$GetApiTokens$api$devices instance) => { 'creationDate': dateTimeToJson(instance.creationDate), 'isCaller': instance.isCaller, @@ -56,31 +377,369 @@ Map _$Query$GetApiTokensQuery$api$devicesToJson( '__typename': instance.$__typename, }; -Query$GetApiVersionQuery _$Query$GetApiVersionQueryFromJson( - Map json) => - Query$GetApiVersionQuery( - api: Query$GetApiVersionQuery$api.fromJson( - json['api'] as Map), +Query$RecoveryKey _$Query$RecoveryKeyFromJson(Map json) => + Query$RecoveryKey( + api: Query$RecoveryKey$api.fromJson(json['api'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiVersionQueryToJson( - Query$GetApiVersionQuery instance) => +Map _$Query$RecoveryKeyToJson(Query$RecoveryKey instance) => { 'api': instance.api.toJson(), '__typename': instance.$__typename, }; -Query$GetApiVersionQuery$api _$Query$GetApiVersionQuery$apiFromJson( +Query$RecoveryKey$api _$Query$RecoveryKey$apiFromJson( Map json) => - Query$GetApiVersionQuery$api( - version: json['version'] as String, + Query$RecoveryKey$api( + recoveryKey: Query$RecoveryKey$api$recoveryKey.fromJson( + json['recoveryKey'] as Map), $__typename: json['__typename'] as String, ); -Map _$Query$GetApiVersionQuery$apiToJson( - Query$GetApiVersionQuery$api instance) => +Map _$Query$RecoveryKey$apiToJson( + Query$RecoveryKey$api instance) => { - 'version': instance.version, + 'recoveryKey': instance.recoveryKey.toJson(), '__typename': instance.$__typename, }; + +Query$RecoveryKey$api$recoveryKey _$Query$RecoveryKey$api$recoveryKeyFromJson( + Map json) => + Query$RecoveryKey$api$recoveryKey( + creationDate: _nullable$dateTimeFromJson(json['creationDate']), + exists: json['exists'] as bool, + expirationDate: _nullable$dateTimeFromJson(json['expirationDate']), + usesLeft: json['usesLeft'] as int?, + valid: json['valid'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Query$RecoveryKey$api$recoveryKeyToJson( + Query$RecoveryKey$api$recoveryKey instance) => + { + 'creationDate': _nullable$dateTimeToJson(instance.creationDate), + 'exists': instance.exists, + 'expirationDate': _nullable$dateTimeToJson(instance.expirationDate), + 'usesLeft': instance.usesLeft, + 'valid': instance.valid, + '__typename': instance.$__typename, + }; + +Variables$Mutation$GetNewRecoveryApiKey + _$Variables$Mutation$GetNewRecoveryApiKeyFromJson( + Map json) => + Variables$Mutation$GetNewRecoveryApiKey( + limits: json['limits'] == null + ? null + : Input$RecoveryKeyLimitsInput.fromJson( + json['limits'] as Map), + ); + +Map _$Variables$Mutation$GetNewRecoveryApiKeyToJson( + Variables$Mutation$GetNewRecoveryApiKey instance) => + { + 'limits': instance.limits?.toJson(), + }; + +Mutation$GetNewRecoveryApiKey _$Mutation$GetNewRecoveryApiKeyFromJson( + Map json) => + Mutation$GetNewRecoveryApiKey( + getNewRecoveryApiKey: + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey.fromJson( + json['getNewRecoveryApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$GetNewRecoveryApiKeyToJson( + Mutation$GetNewRecoveryApiKey instance) => + { + 'getNewRecoveryApiKey': instance.getNewRecoveryApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey + _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyFromJson( + Map json) => + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + key: json['key'] as String?, + ); + +Map _$Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKeyToJson( + Mutation$GetNewRecoveryApiKey$getNewRecoveryApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'key': instance.key, + }; + +Variables$Mutation$UseRecoveryApiKey + _$Variables$Mutation$UseRecoveryApiKeyFromJson(Map json) => + Variables$Mutation$UseRecoveryApiKey( + input: Input$UseRecoveryKeyInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$UseRecoveryApiKeyToJson( + Variables$Mutation$UseRecoveryApiKey instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$UseRecoveryApiKey _$Mutation$UseRecoveryApiKeyFromJson( + Map json) => + Mutation$UseRecoveryApiKey( + useRecoveryApiKey: Mutation$UseRecoveryApiKey$useRecoveryApiKey.fromJson( + json['useRecoveryApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UseRecoveryApiKeyToJson( + Mutation$UseRecoveryApiKey instance) => + { + 'useRecoveryApiKey': instance.useRecoveryApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$UseRecoveryApiKey$useRecoveryApiKey + _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyFromJson( + Map json) => + Mutation$UseRecoveryApiKey$useRecoveryApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map _$Mutation$UseRecoveryApiKey$useRecoveryApiKeyToJson( + Mutation$UseRecoveryApiKey$useRecoveryApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; + +Mutation$RefreshDeviceApiToken _$Mutation$RefreshDeviceApiTokenFromJson( + Map json) => + Mutation$RefreshDeviceApiToken( + refreshDeviceApiToken: + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken.fromJson( + json['refreshDeviceApiToken'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RefreshDeviceApiTokenToJson( + Mutation$RefreshDeviceApiToken instance) => + { + 'refreshDeviceApiToken': instance.refreshDeviceApiToken.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RefreshDeviceApiToken$refreshDeviceApiToken + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenFromJson( + Map json) => + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map + _$Mutation$RefreshDeviceApiToken$refreshDeviceApiTokenToJson( + Mutation$RefreshDeviceApiToken$refreshDeviceApiToken instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; + +Variables$Mutation$DeleteDeviceApiToken + _$Variables$Mutation$DeleteDeviceApiTokenFromJson( + Map json) => + Variables$Mutation$DeleteDeviceApiToken( + device: json['device'] as String, + ); + +Map _$Variables$Mutation$DeleteDeviceApiTokenToJson( + Variables$Mutation$DeleteDeviceApiToken instance) => + { + 'device': instance.device, + }; + +Mutation$DeleteDeviceApiToken _$Mutation$DeleteDeviceApiTokenFromJson( + Map json) => + Mutation$DeleteDeviceApiToken( + deleteDeviceApiToken: + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken.fromJson( + json['deleteDeviceApiToken'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteDeviceApiTokenToJson( + Mutation$DeleteDeviceApiToken instance) => + { + 'deleteDeviceApiToken': instance.deleteDeviceApiToken.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$DeleteDeviceApiToken$deleteDeviceApiToken + _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenFromJson( + Map json) => + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteDeviceApiToken$deleteDeviceApiTokenToJson( + Mutation$DeleteDeviceApiToken$deleteDeviceApiToken instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Mutation$GetNewDeviceApiKey _$Mutation$GetNewDeviceApiKeyFromJson( + Map json) => + Mutation$GetNewDeviceApiKey( + getNewDeviceApiKey: + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey.fromJson( + json['getNewDeviceApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$GetNewDeviceApiKeyToJson( + Mutation$GetNewDeviceApiKey instance) => + { + 'getNewDeviceApiKey': instance.getNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$GetNewDeviceApiKey$getNewDeviceApiKey + _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyFromJson( + Map json) => + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + key: json['key'] as String?, + ); + +Map _$Mutation$GetNewDeviceApiKey$getNewDeviceApiKeyToJson( + Mutation$GetNewDeviceApiKey$getNewDeviceApiKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'key': instance.key, + }; + +Mutation$InvalidateNewDeviceApiKey _$Mutation$InvalidateNewDeviceApiKeyFromJson( + Map json) => + Mutation$InvalidateNewDeviceApiKey( + invalidateNewDeviceApiKey: + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey.fromJson( + json['invalidateNewDeviceApiKey'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$InvalidateNewDeviceApiKeyToJson( + Mutation$InvalidateNewDeviceApiKey instance) => + { + 'invalidateNewDeviceApiKey': instance.invalidateNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyFromJson( + Map json) => + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map + _$Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKeyToJson( + Mutation$InvalidateNewDeviceApiKey$invalidateNewDeviceApiKey + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$AuthorizeWithNewDeviceApiKey + _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( + Map json) => + Variables$Mutation$AuthorizeWithNewDeviceApiKey( + input: Input$UseNewDeviceKeyInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$AuthorizeWithNewDeviceApiKeyToJson( + Variables$Mutation$AuthorizeWithNewDeviceApiKey instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$AuthorizeWithNewDeviceApiKey + _$Mutation$AuthorizeWithNewDeviceApiKeyFromJson( + Map json) => + Mutation$AuthorizeWithNewDeviceApiKey( + authorizeWithNewDeviceApiKey: + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + .fromJson(json['authorizeWithNewDeviceApiKey'] + as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AuthorizeWithNewDeviceApiKeyToJson( + Mutation$AuthorizeWithNewDeviceApiKey instance) => + { + 'authorizeWithNewDeviceApiKey': + instance.authorizeWithNewDeviceApiKey.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyFromJson( + Map json) => + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + token: json['token'] as String?, + ); + +Map + _$Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKeyToJson( + Mutation$AuthorizeWithNewDeviceApiKey$authorizeWithNewDeviceApiKey + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'token': instance.token, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql new file mode 100644 index 00000000..75d36d0a --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql @@ -0,0 +1,54 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query SystemSettings { + system { + settings { + autoUpgrade { + allowReboot + enable + } + ssh { + enable + passwordAuthentication + rootSshKeys + } + timezone + } + } +} + +query DomainInfo { + system { + domainInfo { + domain + hostname + provider + requiredDnsRecords { + content + name + priority + recordType + ttl + } + } + } +} + +mutation ChangeTimezone($timezone: String!) { + changeTimezone(timezone: $timezone) { + ...basicMutationReturnFields + timezone + } +} + +mutation ChangeAutoUpgradeSettings($settings: AutoUpgradeSettingsInput!) { + changeAutoUpgradeSettings(settings: $settings) { + ...basicMutationReturnFields + allowReboot + enableAutoUpgrade + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart new file mode 100644 index 00000000..c37a1a9c --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -0,0 +1,1707 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'schema.graphql.dart'; +part 'server_settings.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + 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) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + 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)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings { + Query$SystemSettings({required this.system, required this.$__typename}); + + @override + factory Query$SystemSettings.fromJson(Map json) => + _$Query$SystemSettingsFromJson(json); + + final Query$SystemSettings$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemSettingsToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings) || runtimeType != other.runtimeType) + return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings on Query$SystemSettings { + Query$SystemSettings copyWith( + {Query$SystemSettings$system? system, String? $__typename}) => + Query$SystemSettings( + system: system == null ? this.system : system, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQuerySystemSettings = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'SystemSettings'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'settings'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'autoUpgrade'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'ssh'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'passwordAuthentication'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'rootSshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'timezone'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$SystemSettings _parserFn$Query$SystemSettings( + Map data) => + Query$SystemSettings.fromJson(data); + +class Options$Query$SystemSettings + extends graphql.QueryOptions { + Options$Query$SystemSettings( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQuerySystemSettings, + parserFn: _parserFn$Query$SystemSettings); +} + +class WatchOptions$Query$SystemSettings + extends graphql.WatchQueryOptions { + WatchOptions$Query$SystemSettings( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQuerySystemSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$SystemSettings); +} + +class FetchMoreOptions$Query$SystemSettings extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$SystemSettings( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQuerySystemSettings); +} + +extension ClientExtension$Query$SystemSettings on graphql.GraphQLClient { + Future> query$SystemSettings( + [Options$Query$SystemSettings? options]) async => + await this.query(options ?? Options$Query$SystemSettings()); + graphql.ObservableQuery watchQuery$SystemSettings( + [WatchOptions$Query$SystemSettings? options]) => + this.watchQuery(options ?? WatchOptions$Query$SystemSettings()); + void writeQuery$SystemSettings( + {required Query$SystemSettings data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + data: data.toJson(), + broadcast: broadcast); + Query$SystemSettings? readQuery$SystemSettings({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQuerySystemSettings)), + optimistic: optimistic); + return result == null ? null : Query$SystemSettings.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system { + Query$SystemSettings$system( + {required this.settings, required this.$__typename}); + + @override + factory Query$SystemSettings$system.fromJson(Map json) => + _$Query$SystemSettings$systemFromJson(json); + + final Query$SystemSettings$system$settings settings; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$SystemSettings$systemToJson(this); + int get hashCode { + final l$settings = settings; + final l$$__typename = $__typename; + return Object.hashAll([l$settings, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system) || + runtimeType != other.runtimeType) return false; + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system + on Query$SystemSettings$system { + Query$SystemSettings$system copyWith( + {Query$SystemSettings$system$settings? settings, + String? $__typename}) => + Query$SystemSettings$system( + settings: settings == null ? this.settings : settings, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings { + Query$SystemSettings$system$settings( + {required this.autoUpgrade, + required this.ssh, + required this.timezone, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings.fromJson( + Map json) => + _$Query$SystemSettings$system$settingsFromJson(json); + + final Query$SystemSettings$system$settings$autoUpgrade autoUpgrade; + + final Query$SystemSettings$system$settings$ssh ssh; + + final String timezone; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settingsToJson(this); + int get hashCode { + final l$autoUpgrade = autoUpgrade; + final l$ssh = ssh; + final l$timezone = timezone; + final l$$__typename = $__typename; + return Object.hashAll([l$autoUpgrade, l$ssh, l$timezone, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings) || + runtimeType != other.runtimeType) return false; + final l$autoUpgrade = autoUpgrade; + final lOther$autoUpgrade = other.autoUpgrade; + if (l$autoUpgrade != lOther$autoUpgrade) return false; + final l$ssh = ssh; + final lOther$ssh = other.ssh; + if (l$ssh != lOther$ssh) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings + on Query$SystemSettings$system$settings { + Query$SystemSettings$system$settings copyWith( + {Query$SystemSettings$system$settings$autoUpgrade? autoUpgrade, + Query$SystemSettings$system$settings$ssh? ssh, + String? timezone, + String? $__typename}) => + Query$SystemSettings$system$settings( + autoUpgrade: autoUpgrade == null ? this.autoUpgrade : autoUpgrade, + ssh: ssh == null ? this.ssh : ssh, + timezone: timezone == null ? this.timezone : timezone, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings$autoUpgrade { + Query$SystemSettings$system$settings$autoUpgrade( + {required this.allowReboot, + required this.enable, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings$autoUpgrade.fromJson( + Map json) => + _$Query$SystemSettings$system$settings$autoUpgradeFromJson(json); + + final bool allowReboot; + + final bool enable; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settings$autoUpgradeToJson(this); + int get hashCode { + final l$allowReboot = allowReboot; + final l$enable = enable; + final l$$__typename = $__typename; + return Object.hashAll([l$allowReboot, l$enable, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings$autoUpgrade) || + runtimeType != other.runtimeType) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + final l$enable = enable; + final lOther$enable = other.enable; + if (l$enable != lOther$enable) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings$autoUpgrade + on Query$SystemSettings$system$settings$autoUpgrade { + Query$SystemSettings$system$settings$autoUpgrade copyWith( + {bool? allowReboot, bool? enable, String? $__typename}) => + Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: allowReboot == null ? this.allowReboot : allowReboot, + enable: enable == null ? this.enable : enable, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$SystemSettings$system$settings$ssh { + Query$SystemSettings$system$settings$ssh( + {required this.enable, + required this.passwordAuthentication, + required this.rootSshKeys, + required this.$__typename}); + + @override + factory Query$SystemSettings$system$settings$ssh.fromJson( + Map json) => + _$Query$SystemSettings$system$settings$sshFromJson(json); + + final bool enable; + + final bool passwordAuthentication; + + final List rootSshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$SystemSettings$system$settings$sshToJson(this); + int get hashCode { + final l$enable = enable; + final l$passwordAuthentication = passwordAuthentication; + final l$rootSshKeys = rootSshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$enable, + l$passwordAuthentication, + Object.hashAll(l$rootSshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$SystemSettings$system$settings$ssh) || + runtimeType != other.runtimeType) return false; + final l$enable = enable; + final lOther$enable = other.enable; + if (l$enable != lOther$enable) return false; + final l$passwordAuthentication = passwordAuthentication; + final lOther$passwordAuthentication = other.passwordAuthentication; + if (l$passwordAuthentication != lOther$passwordAuthentication) return false; + final l$rootSshKeys = rootSshKeys; + final lOther$rootSshKeys = other.rootSshKeys; + if (l$rootSshKeys.length != lOther$rootSshKeys.length) return false; + for (int i = 0; i < l$rootSshKeys.length; i++) { + final l$rootSshKeys$entry = l$rootSshKeys[i]; + final lOther$rootSshKeys$entry = lOther$rootSshKeys[i]; + if (l$rootSshKeys$entry != lOther$rootSshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$SystemSettings$system$settings$ssh + on Query$SystemSettings$system$settings$ssh { + Query$SystemSettings$system$settings$ssh copyWith( + {bool? enable, + bool? passwordAuthentication, + List? rootSshKeys, + String? $__typename}) => + Query$SystemSettings$system$settings$ssh( + enable: enable == null ? this.enable : enable, + passwordAuthentication: passwordAuthentication == null + ? this.passwordAuthentication + : passwordAuthentication, + rootSshKeys: rootSshKeys == null ? this.rootSshKeys : rootSshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo { + Query$DomainInfo({required this.system, required this.$__typename}); + + @override + factory Query$DomainInfo.fromJson(Map json) => + _$Query$DomainInfoFromJson(json); + + final Query$DomainInfo$system system; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$DomainInfoToJson(this); + int get hashCode { + final l$system = system; + final l$$__typename = $__typename; + return Object.hashAll([l$system, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo) || runtimeType != other.runtimeType) + return false; + final l$system = system; + final lOther$system = other.system; + if (l$system != lOther$system) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo on Query$DomainInfo { + Query$DomainInfo copyWith( + {Query$DomainInfo$system? system, String? $__typename}) => + Query$DomainInfo( + system: system == null ? this.system : system, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryDomainInfo = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'DomainInfo'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'system'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domainInfo'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'domain'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'hostname'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'provider'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'requiredDnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'ttl'), + 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) + ])), +]); +Query$DomainInfo _parserFn$Query$DomainInfo(Map data) => + Query$DomainInfo.fromJson(data); + +class Options$Query$DomainInfo extends graphql.QueryOptions { + Options$Query$DomainInfo( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryDomainInfo, + parserFn: _parserFn$Query$DomainInfo); +} + +class WatchOptions$Query$DomainInfo + extends graphql.WatchQueryOptions { + WatchOptions$Query$DomainInfo( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryDomainInfo, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$DomainInfo); +} + +class FetchMoreOptions$Query$DomainInfo extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$DomainInfo({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryDomainInfo); +} + +extension ClientExtension$Query$DomainInfo on graphql.GraphQLClient { + Future> query$DomainInfo( + [Options$Query$DomainInfo? options]) async => + await this.query(options ?? Options$Query$DomainInfo()); + graphql.ObservableQuery watchQuery$DomainInfo( + [WatchOptions$Query$DomainInfo? options]) => + this.watchQuery(options ?? WatchOptions$Query$DomainInfo()); + void writeQuery$DomainInfo( + {required Query$DomainInfo data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryDomainInfo)), + data: data.toJson(), + broadcast: broadcast); + Query$DomainInfo? readQuery$DomainInfo({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryDomainInfo)), + optimistic: optimistic); + return result == null ? null : Query$DomainInfo.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system { + Query$DomainInfo$system( + {required this.domainInfo, required this.$__typename}); + + @override + factory Query$DomainInfo$system.fromJson(Map json) => + _$Query$DomainInfo$systemFromJson(json); + + final Query$DomainInfo$system$domainInfo domainInfo; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$DomainInfo$systemToJson(this); + int get hashCode { + final l$domainInfo = domainInfo; + final l$$__typename = $__typename; + return Object.hashAll([l$domainInfo, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system) || runtimeType != other.runtimeType) + return false; + final l$domainInfo = domainInfo; + final lOther$domainInfo = other.domainInfo; + if (l$domainInfo != lOther$domainInfo) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system on Query$DomainInfo$system { + Query$DomainInfo$system copyWith( + {Query$DomainInfo$system$domainInfo? domainInfo, + String? $__typename}) => + Query$DomainInfo$system( + domainInfo: domainInfo == null ? this.domainInfo : domainInfo, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system$domainInfo { + Query$DomainInfo$system$domainInfo( + {required this.domain, + required this.hostname, + required this.provider, + required this.requiredDnsRecords, + required this.$__typename}); + + @override + factory Query$DomainInfo$system$domainInfo.fromJson( + Map json) => + _$Query$DomainInfo$system$domainInfoFromJson(json); + + final String domain; + + final String hostname; + + @JsonKey(unknownEnumValue: Enum$DnsProvider.$unknown) + final Enum$DnsProvider provider; + + final List + requiredDnsRecords; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$DomainInfo$system$domainInfoToJson(this); + int get hashCode { + final l$domain = domain; + final l$hostname = hostname; + final l$provider = provider; + final l$requiredDnsRecords = requiredDnsRecords; + final l$$__typename = $__typename; + return Object.hashAll([ + l$domain, + l$hostname, + l$provider, + Object.hashAll(l$requiredDnsRecords.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system$domainInfo) || + runtimeType != other.runtimeType) return false; + final l$domain = domain; + final lOther$domain = other.domain; + if (l$domain != lOther$domain) return false; + final l$hostname = hostname; + final lOther$hostname = other.hostname; + if (l$hostname != lOther$hostname) return false; + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) return false; + final l$requiredDnsRecords = requiredDnsRecords; + final lOther$requiredDnsRecords = other.requiredDnsRecords; + if (l$requiredDnsRecords.length != lOther$requiredDnsRecords.length) + return false; + for (int i = 0; i < l$requiredDnsRecords.length; i++) { + final l$requiredDnsRecords$entry = l$requiredDnsRecords[i]; + final lOther$requiredDnsRecords$entry = lOther$requiredDnsRecords[i]; + if (l$requiredDnsRecords$entry != lOther$requiredDnsRecords$entry) + return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system$domainInfo + on Query$DomainInfo$system$domainInfo { + Query$DomainInfo$system$domainInfo copyWith( + {String? domain, + String? hostname, + Enum$DnsProvider? provider, + List? + requiredDnsRecords, + String? $__typename}) => + Query$DomainInfo$system$domainInfo( + domain: domain == null ? this.domain : domain, + hostname: hostname == null ? this.hostname : hostname, + provider: provider == null ? this.provider : provider, + requiredDnsRecords: requiredDnsRecords == null + ? this.requiredDnsRecords + : requiredDnsRecords, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$DomainInfo$system$domainInfo$requiredDnsRecords { + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + {required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename}); + + @override + factory Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( + Map json) => + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson(json); + + final String content; + + final String name; + + final int? priority; + + final String recordType; + + final int ttl; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson(this); + int get hashCode { + final l$content = content; + final l$name = name; + final l$priority = priority; + final l$recordType = recordType; + final l$ttl = ttl; + final l$$__typename = $__typename; + return Object.hashAll( + [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$DomainInfo$system$domainInfo$requiredDnsRecords) || + runtimeType != other.runtimeType) return false; + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) return false; + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) return false; + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$DomainInfo$system$domainInfo$requiredDnsRecords + on Query$DomainInfo$system$domainInfo$requiredDnsRecords { + Query$DomainInfo$system$domainInfo$requiredDnsRecords copyWith( + {String? content, + String? name, + int? Function()? priority, + String? recordType, + int? ttl, + String? $__typename}) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + content: content == null ? this.content : content, + name: name == null ? this.name : name, + priority: priority == null ? this.priority : priority(), + recordType: recordType == null ? this.recordType : recordType, + ttl: ttl == null ? this.ttl : ttl, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$ChangeTimezone { + Variables$Mutation$ChangeTimezone({required this.timezone}); + + @override + factory Variables$Mutation$ChangeTimezone.fromJson( + Map json) => + _$Variables$Mutation$ChangeTimezoneFromJson(json); + + final String timezone; + + Map toJson() => + _$Variables$Mutation$ChangeTimezoneToJson(this); + int get hashCode { + final l$timezone = timezone; + return Object.hashAll([l$timezone]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$ChangeTimezone) || + runtimeType != other.runtimeType) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + return true; + } + + Variables$Mutation$ChangeTimezone copyWith({String? timezone}) => + Variables$Mutation$ChangeTimezone( + timezone: timezone == null ? this.timezone : timezone); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeTimezone { + Mutation$ChangeTimezone( + {required this.changeTimezone, required this.$__typename}); + + @override + factory Mutation$ChangeTimezone.fromJson(Map json) => + _$Mutation$ChangeTimezoneFromJson(json); + + final Mutation$ChangeTimezone$changeTimezone changeTimezone; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$ChangeTimezoneToJson(this); + int get hashCode { + final l$changeTimezone = changeTimezone; + final l$$__typename = $__typename; + return Object.hashAll([l$changeTimezone, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeTimezone) || runtimeType != other.runtimeType) + return false; + final l$changeTimezone = changeTimezone; + final lOther$changeTimezone = other.changeTimezone; + if (l$changeTimezone != lOther$changeTimezone) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeTimezone on Mutation$ChangeTimezone { + Mutation$ChangeTimezone copyWith( + {Mutation$ChangeTimezone$changeTimezone? changeTimezone, + String? $__typename}) => + Mutation$ChangeTimezone( + changeTimezone: + changeTimezone == null ? this.changeTimezone : changeTimezone, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ChangeTimezone'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'timezone')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeTimezone'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'timezone'), + value: VariableNode(name: NameNode(value: 'timezone'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'timezone'), + 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$ChangeTimezone _parserFn$Mutation$ChangeTimezone( + Map data) => + Mutation$ChangeTimezone.fromJson(data); +typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr Function( + dynamic, Mutation$ChangeTimezone?); + +class Options$Mutation$ChangeTimezone + extends graphql.MutationOptions { + Options$Mutation$ChangeTimezone( + {String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeTimezone? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ChangeTimezone(data)), + update: update, + onError: onError, + document: documentNodeMutationChangeTimezone, + parserFn: _parserFn$Mutation$ChangeTimezone); + + final OnMutationCompleted$Mutation$ChangeTimezone? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$ChangeTimezone + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ChangeTimezone( + {String? operationName, + required Variables$Mutation$ChangeTimezone variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeTimezone, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeTimezone); +} + +extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient { + Future> mutate$ChangeTimezone( + Options$Mutation$ChangeTimezone options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$ChangeTimezone( + WatchOptions$Mutation$ChangeTimezone options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeTimezone$changeTimezone + implements Fragment$basicMutationReturnFields { + Mutation$ChangeTimezone$changeTimezone( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.timezone}); + + @override + factory Mutation$ChangeTimezone$changeTimezone.fromJson( + Map json) => + _$Mutation$ChangeTimezone$changeTimezoneFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final String? timezone; + + Map toJson() => + _$Mutation$ChangeTimezone$changeTimezoneToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$timezone = timezone; + return Object.hashAll( + [l$code, l$message, l$success, l$$__typename, l$timezone]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeTimezone$changeTimezone) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$timezone = timezone; + final lOther$timezone = other.timezone; + if (l$timezone != lOther$timezone) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone + on Mutation$ChangeTimezone$changeTimezone { + Mutation$ChangeTimezone$changeTimezone copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + String? Function()? timezone}) => + Mutation$ChangeTimezone$changeTimezone( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + timezone: timezone == null ? this.timezone : timezone()); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$ChangeAutoUpgradeSettings { + Variables$Mutation$ChangeAutoUpgradeSettings({required this.settings}); + + @override + factory Variables$Mutation$ChangeAutoUpgradeSettings.fromJson( + Map json) => + _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + + final Input$AutoUpgradeSettingsInput settings; + + Map toJson() => + _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson(this); + int get hashCode { + final l$settings = settings; + return Object.hashAll([l$settings]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$settings = settings; + final lOther$settings = other.settings; + if (l$settings != lOther$settings) return false; + return true; + } + + Variables$Mutation$ChangeAutoUpgradeSettings copyWith( + {Input$AutoUpgradeSettingsInput? settings}) => + Variables$Mutation$ChangeAutoUpgradeSettings( + settings: settings == null ? this.settings : settings); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings( + {required this.changeAutoUpgradeSettings, required this.$__typename}); + + @override + factory Mutation$ChangeAutoUpgradeSettings.fromJson( + Map json) => + _$Mutation$ChangeAutoUpgradeSettingsFromJson(json); + + final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + changeAutoUpgradeSettings; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$ChangeAutoUpgradeSettingsToJson(this); + int get hashCode { + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + final l$$__typename = $__typename; + return Object.hashAll([l$changeAutoUpgradeSettings, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$ChangeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; + final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings; + if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) + return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings + on Mutation$ChangeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings copyWith( + {Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? + changeAutoUpgradeSettings, + String? $__typename}) => + Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: changeAutoUpgradeSettings == null + ? this.changeAutoUpgradeSettings + : changeAutoUpgradeSettings, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationChangeAutoUpgradeSettings = + DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'ChangeAutoUpgradeSettings'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'settings')), + type: NamedTypeNode( + name: NameNode(value: 'AutoUpgradeSettingsInput'), + isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'changeAutoUpgradeSettings'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'settings'), + value: VariableNode(name: NameNode(value: 'settings'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'allowReboot'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'enableAutoUpgrade'), + 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$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings( + Map data) => + Mutation$ChangeAutoUpgradeSettings.fromJson(data); +typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr + Function(dynamic, Mutation$ChangeAutoUpgradeSettings?); + +class Options$Mutation$ChangeAutoUpgradeSettings + extends graphql.MutationOptions { + Options$Mutation$ChangeAutoUpgradeSettings( + {String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$ChangeAutoUpgradeSettings(data)), + update: update, + onError: onError, + document: documentNodeMutationChangeAutoUpgradeSettings, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); + + final OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings? + onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$ChangeAutoUpgradeSettings + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$ChangeAutoUpgradeSettings( + {String? operationName, + required Variables$Mutation$ChangeAutoUpgradeSettings variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationChangeAutoUpgradeSettings, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$ChangeAutoUpgradeSettings); +} + +extension ClientExtension$Mutation$ChangeAutoUpgradeSettings + on graphql.GraphQLClient { + Future> + mutate$ChangeAutoUpgradeSettings( + Options$Mutation$ChangeAutoUpgradeSettings options) async => + await this.mutate(options); + graphql.ObservableQuery + watchMutation$ChangeAutoUpgradeSettings( + WatchOptions$Mutation$ChangeAutoUpgradeSettings options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + implements Fragment$basicMutationReturnFields { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + required this.allowReboot, + required this.enableAutoUpgrade}); + + @override + factory Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + Map json) => + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( + json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final bool allowReboot; + + final bool enableAutoUpgrade; + + Map toJson() => + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( + this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$allowReboot = allowReboot; + final l$enableAutoUpgrade = enableAutoUpgrade; + return Object.hashAll([ + l$code, + l$message, + l$success, + l$$__typename, + l$allowReboot, + l$enableAutoUpgrade + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$allowReboot = allowReboot; + final lOther$allowReboot = other.allowReboot; + if (l$allowReboot != lOther$allowReboot) return false; + final l$enableAutoUpgrade = enableAutoUpgrade; + final lOther$enableAutoUpgrade = other.enableAutoUpgrade; + if (l$enableAutoUpgrade != lOther$enableAutoUpgrade) return false; + return true; + } +} + +extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + on Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings { + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + bool? allowReboot, + bool? enableAutoUpgrade}) => + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + allowReboot: allowReboot == null ? this.allowReboot : allowReboot, + enableAutoUpgrade: enableAutoUpgrade == null + ? this.enableAutoUpgrade + : enableAutoUpgrade); +} diff --git a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart new file mode 100644 index 00000000..bbca8052 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.g.dart @@ -0,0 +1,300 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'server_settings.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +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) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$SystemSettings _$Query$SystemSettingsFromJson( + Map json) => + Query$SystemSettings( + system: Query$SystemSettings$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettingsToJson( + Query$SystemSettings instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system _$Query$SystemSettings$systemFromJson( + Map json) => + Query$SystemSettings$system( + settings: Query$SystemSettings$system$settings.fromJson( + json['settings'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$systemToJson( + Query$SystemSettings$system instance) => + { + 'settings': instance.settings.toJson(), + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings + _$Query$SystemSettings$system$settingsFromJson(Map json) => + Query$SystemSettings$system$settings( + autoUpgrade: + Query$SystemSettings$system$settings$autoUpgrade.fromJson( + json['autoUpgrade'] as Map), + ssh: Query$SystemSettings$system$settings$ssh.fromJson( + json['ssh'] as Map), + timezone: json['timezone'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settingsToJson( + Query$SystemSettings$system$settings instance) => + { + 'autoUpgrade': instance.autoUpgrade.toJson(), + 'ssh': instance.ssh.toJson(), + 'timezone': instance.timezone, + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings$autoUpgrade + _$Query$SystemSettings$system$settings$autoUpgradeFromJson( + Map json) => + Query$SystemSettings$system$settings$autoUpgrade( + allowReboot: json['allowReboot'] as bool, + enable: json['enable'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settings$autoUpgradeToJson( + Query$SystemSettings$system$settings$autoUpgrade instance) => + { + 'allowReboot': instance.allowReboot, + 'enable': instance.enable, + '__typename': instance.$__typename, + }; + +Query$SystemSettings$system$settings$ssh + _$Query$SystemSettings$system$settings$sshFromJson( + Map json) => + Query$SystemSettings$system$settings$ssh( + enable: json['enable'] as bool, + passwordAuthentication: json['passwordAuthentication'] as bool, + rootSshKeys: (json['rootSshKeys'] as List) + .map((e) => e as String) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$SystemSettings$system$settings$sshToJson( + Query$SystemSettings$system$settings$ssh instance) => + { + 'enable': instance.enable, + 'passwordAuthentication': instance.passwordAuthentication, + 'rootSshKeys': instance.rootSshKeys, + '__typename': instance.$__typename, + }; + +Query$DomainInfo _$Query$DomainInfoFromJson(Map json) => + Query$DomainInfo( + system: Query$DomainInfo$system.fromJson( + json['system'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfoToJson(Query$DomainInfo instance) => + { + 'system': instance.system.toJson(), + '__typename': instance.$__typename, + }; + +Query$DomainInfo$system _$Query$DomainInfo$systemFromJson( + Map json) => + Query$DomainInfo$system( + domainInfo: Query$DomainInfo$system$domainInfo.fromJson( + json['domainInfo'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfo$systemToJson( + Query$DomainInfo$system instance) => + { + 'domainInfo': instance.domainInfo.toJson(), + '__typename': instance.$__typename, + }; + +Query$DomainInfo$system$domainInfo _$Query$DomainInfo$system$domainInfoFromJson( + Map json) => + Query$DomainInfo$system$domainInfo( + domain: json['domain'] as String, + hostname: json['hostname'] as String, + provider: $enumDecode(_$Enum$DnsProviderEnumMap, json['provider'], + unknownValue: Enum$DnsProvider.$unknown), + requiredDnsRecords: (json['requiredDnsRecords'] as List) + .map((e) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$DomainInfo$system$domainInfoToJson( + Query$DomainInfo$system$domainInfo instance) => + { + 'domain': instance.domain, + 'hostname': instance.hostname, + 'provider': _$Enum$DnsProviderEnumMap[instance.provider], + 'requiredDnsRecords': + instance.requiredDnsRecords.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +const _$Enum$DnsProviderEnumMap = { + Enum$DnsProvider.CLOUDFLARE: 'CLOUDFLARE', + Enum$DnsProvider.$unknown: r'$unknown', +}; + +Query$DomainInfo$system$domainInfo$requiredDnsRecords + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsFromJson( + Map json) => + Query$DomainInfo$system$domainInfo$requiredDnsRecords( + content: json['content'] as String, + name: json['name'] as String, + priority: json['priority'] as int?, + recordType: json['recordType'] as String, + ttl: json['ttl'] as int, + $__typename: json['__typename'] as String, + ); + +Map + _$Query$DomainInfo$system$domainInfo$requiredDnsRecordsToJson( + Query$DomainInfo$system$domainInfo$requiredDnsRecords instance) => + { + 'content': instance.content, + 'name': instance.name, + 'priority': instance.priority, + 'recordType': instance.recordType, + 'ttl': instance.ttl, + '__typename': instance.$__typename, + }; + +Variables$Mutation$ChangeTimezone _$Variables$Mutation$ChangeTimezoneFromJson( + Map json) => + Variables$Mutation$ChangeTimezone( + timezone: json['timezone'] as String, + ); + +Map _$Variables$Mutation$ChangeTimezoneToJson( + Variables$Mutation$ChangeTimezone instance) => + { + 'timezone': instance.timezone, + }; + +Mutation$ChangeTimezone _$Mutation$ChangeTimezoneFromJson( + Map json) => + Mutation$ChangeTimezone( + changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( + json['changeTimezone'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ChangeTimezoneToJson( + Mutation$ChangeTimezone instance) => + { + 'changeTimezone': instance.changeTimezone.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$ChangeTimezone$changeTimezone + _$Mutation$ChangeTimezone$changeTimezoneFromJson( + Map json) => + Mutation$ChangeTimezone$changeTimezone( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + timezone: json['timezone'] as String?, + ); + +Map _$Mutation$ChangeTimezone$changeTimezoneToJson( + Mutation$ChangeTimezone$changeTimezone instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'timezone': instance.timezone, + }; + +Variables$Mutation$ChangeAutoUpgradeSettings + _$Variables$Mutation$ChangeAutoUpgradeSettingsFromJson( + Map json) => + Variables$Mutation$ChangeAutoUpgradeSettings( + settings: Input$AutoUpgradeSettingsInput.fromJson( + json['settings'] as Map), + ); + +Map _$Variables$Mutation$ChangeAutoUpgradeSettingsToJson( + Variables$Mutation$ChangeAutoUpgradeSettings instance) => + { + 'settings': instance.settings.toJson(), + }; + +Mutation$ChangeAutoUpgradeSettings _$Mutation$ChangeAutoUpgradeSettingsFromJson( + Map json) => + Mutation$ChangeAutoUpgradeSettings( + changeAutoUpgradeSettings: + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( + json['changeAutoUpgradeSettings'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$ChangeAutoUpgradeSettingsToJson( + Mutation$ChangeAutoUpgradeSettings instance) => + { + 'changeAutoUpgradeSettings': instance.changeAutoUpgradeSettings.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsFromJson( + Map json) => + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + allowReboot: json['allowReboot'] as bool, + enableAutoUpgrade: json['enableAutoUpgrade'] as bool, + ); + +Map + _$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettingsToJson( + Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings + instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'allowReboot': instance.allowReboot, + 'enableAutoUpgrade': instance.enableAutoUpgrade, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql new file mode 100644 index 00000000..ce464426 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -0,0 +1,84 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + +query AllServices { + services { + allServices { + description + displayName + dnsRecords { + content + name + priority + recordType + ttl + } + id + isEnabled + isMovable + isRequired + status + storageUsage { + title + usedSpace + volume { + name + } + } + svgIcon + url + } + } +} + +mutation EnableService($serviceId: String!) { + enableService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation DisableService($serviceId: String!) { + disableService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation StopService($serviceId: String!) { + stopService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation StartService($serviceId: String!) { + startService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation RestartService($serviceId: String!) { + restartService(serviceId: $serviceId) { + ...basicMutationReturnFields + } +} + +mutation MoveService($input: MoveServiceInput!) { + moveService(input: $input) { + ...basicMutationReturnFields + job { + createdAt + description + error + finishedAt + name + progress + result + status + statusText + uid + updatedAt + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart new file mode 100644 index 00000000..2a415115 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -0,0 +1,2771 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; +part 'services.graphql.g.dart'; + +@JsonSerializable(explicitToJson: true) +class Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + 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) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + 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)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices { + Query$AllServices({required this.services, required this.$__typename}); + + @override + factory Query$AllServices.fromJson(Map json) => + _$Query$AllServicesFromJson(json); + + final Query$AllServices$services services; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllServicesToJson(this); + int get hashCode { + final l$services = services; + final l$$__typename = $__typename; + return Object.hashAll([l$services, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices) || runtimeType != other.runtimeType) + return false; + final l$services = services; + final lOther$services = other.services; + if (l$services != lOther$services) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices on Query$AllServices { + Query$AllServices copyWith( + {Query$AllServices$services? services, String? $__typename}) => + Query$AllServices( + services: services == null ? this.services : services, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryAllServices = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllServices'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'services'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allServices'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'dnsRecords'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'content'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'priority'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'recordType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'ttl'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isEnabled'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isMovable'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'isRequired'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'storageUsage'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'title'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'usedSpace'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'volume'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'name'), + 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: 'svgIcon'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'url'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$AllServices _parserFn$Query$AllServices(Map data) => + Query$AllServices.fromJson(data); + +class Options$Query$AllServices + extends graphql.QueryOptions { + Options$Query$AllServices( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllServices, + parserFn: _parserFn$Query$AllServices); +} + +class WatchOptions$Query$AllServices + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllServices( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllServices, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllServices); +} + +class FetchMoreOptions$Query$AllServices extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllServices({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryAllServices); +} + +extension ClientExtension$Query$AllServices on graphql.GraphQLClient { + Future> query$AllServices( + [Options$Query$AllServices? options]) async => + await this.query(options ?? Options$Query$AllServices()); + graphql.ObservableQuery watchQuery$AllServices( + [WatchOptions$Query$AllServices? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllServices()); + void writeQuery$AllServices( + {required Query$AllServices data, bool broadcast = true}) => + this.writeQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllServices)), + data: data.toJson(), + broadcast: broadcast); + Query$AllServices? readQuery$AllServices({bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllServices)), + optimistic: optimistic); + return result == null ? null : Query$AllServices.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services { + Query$AllServices$services( + {required this.allServices, required this.$__typename}); + + @override + factory Query$AllServices$services.fromJson(Map json) => + _$Query$AllServices$servicesFromJson(json); + + final List allServices; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllServices$servicesToJson(this); + int get hashCode { + final l$allServices = allServices; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$allServices.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services) || + runtimeType != other.runtimeType) return false; + final l$allServices = allServices; + final lOther$allServices = other.allServices; + if (l$allServices.length != lOther$allServices.length) return false; + for (int i = 0; i < l$allServices.length; i++) { + final l$allServices$entry = l$allServices[i]; + final lOther$allServices$entry = lOther$allServices[i]; + if (l$allServices$entry != lOther$allServices$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services + on Query$AllServices$services { + Query$AllServices$services copyWith( + {List? allServices, + String? $__typename}) => + Query$AllServices$services( + allServices: allServices == null ? this.allServices : allServices, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices { + Query$AllServices$services$allServices( + {required this.description, + required this.displayName, + this.dnsRecords, + required this.id, + required this.isEnabled, + required this.isMovable, + required this.isRequired, + required this.status, + required this.storageUsage, + required this.svgIcon, + this.url, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices.fromJson( + Map json) => + _$Query$AllServices$services$allServicesFromJson(json); + + final String description; + + final String displayName; + + final List? dnsRecords; + + final String id; + + final bool isEnabled; + + final bool isMovable; + + final bool isRequired; + + @JsonKey(unknownEnumValue: Enum$ServiceStatusEnum.$unknown) + final Enum$ServiceStatusEnum status; + + final Query$AllServices$services$allServices$storageUsage storageUsage; + + final String svgIcon; + + final String? url; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServicesToJson(this); + int get hashCode { + final l$description = description; + final l$displayName = displayName; + final l$dnsRecords = dnsRecords; + final l$id = id; + final l$isEnabled = isEnabled; + final l$isMovable = isMovable; + final l$isRequired = isRequired; + final l$status = status; + final l$storageUsage = storageUsage; + final l$svgIcon = svgIcon; + final l$url = url; + final l$$__typename = $__typename; + return Object.hashAll([ + l$description, + l$displayName, + l$dnsRecords == null ? null : Object.hashAll(l$dnsRecords.map((v) => v)), + l$id, + l$isEnabled, + l$isMovable, + l$isRequired, + l$status, + l$storageUsage, + l$svgIcon, + l$url, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices) || + runtimeType != other.runtimeType) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) return false; + final l$dnsRecords = dnsRecords; + final lOther$dnsRecords = other.dnsRecords; + if (l$dnsRecords != null && lOther$dnsRecords != null) { + if (l$dnsRecords.length != lOther$dnsRecords.length) return false; + for (int i = 0; i < l$dnsRecords.length; i++) { + final l$dnsRecords$entry = l$dnsRecords[i]; + final lOther$dnsRecords$entry = lOther$dnsRecords[i]; + if (l$dnsRecords$entry != lOther$dnsRecords$entry) return false; + } + } else if (l$dnsRecords != lOther$dnsRecords) { + return false; + } + + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) return false; + final l$isEnabled = isEnabled; + final lOther$isEnabled = other.isEnabled; + if (l$isEnabled != lOther$isEnabled) return false; + final l$isMovable = isMovable; + final lOther$isMovable = other.isMovable; + if (l$isMovable != lOther$isMovable) return false; + final l$isRequired = isRequired; + final lOther$isRequired = other.isRequired; + if (l$isRequired != lOther$isRequired) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$storageUsage = storageUsage; + final lOther$storageUsage = other.storageUsage; + if (l$storageUsage != lOther$storageUsage) return false; + final l$svgIcon = svgIcon; + final lOther$svgIcon = other.svgIcon; + if (l$svgIcon != lOther$svgIcon) return false; + final l$url = url; + final lOther$url = other.url; + if (l$url != lOther$url) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices + on Query$AllServices$services$allServices { + Query$AllServices$services$allServices copyWith( + {String? description, + String? displayName, + List? Function()? + dnsRecords, + String? id, + bool? isEnabled, + bool? isMovable, + bool? isRequired, + Enum$ServiceStatusEnum? status, + Query$AllServices$services$allServices$storageUsage? storageUsage, + String? svgIcon, + String? Function()? url, + String? $__typename}) => + Query$AllServices$services$allServices( + description: description == null ? this.description : description, + displayName: displayName == null ? this.displayName : displayName, + dnsRecords: dnsRecords == null ? this.dnsRecords : dnsRecords(), + id: id == null ? this.id : id, + isEnabled: isEnabled == null ? this.isEnabled : isEnabled, + isMovable: isMovable == null ? this.isMovable : isMovable, + isRequired: isRequired == null ? this.isRequired : isRequired, + status: status == null ? this.status : status, + storageUsage: storageUsage == null ? this.storageUsage : storageUsage, + svgIcon: svgIcon == null ? this.svgIcon : svgIcon, + url: url == null ? this.url : url(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$dnsRecords { + Query$AllServices$services$allServices$dnsRecords( + {required this.content, + required this.name, + this.priority, + required this.recordType, + required this.ttl, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$dnsRecords.fromJson( + Map json) => + _$Query$AllServices$services$allServices$dnsRecordsFromJson(json); + + final String content; + + final String name; + + final int? priority; + + final String recordType; + + final int ttl; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$dnsRecordsToJson(this); + int get hashCode { + final l$content = content; + final l$name = name; + final l$priority = priority; + final l$recordType = recordType; + final l$ttl = ttl; + final l$$__typename = $__typename; + return Object.hashAll( + [l$content, l$name, l$priority, l$recordType, l$ttl, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices$dnsRecords) || + runtimeType != other.runtimeType) return false; + final l$content = content; + final lOther$content = other.content; + if (l$content != lOther$content) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$priority = priority; + final lOther$priority = other.priority; + if (l$priority != lOther$priority) return false; + final l$recordType = recordType; + final lOther$recordType = other.recordType; + if (l$recordType != lOther$recordType) return false; + final l$ttl = ttl; + final lOther$ttl = other.ttl; + if (l$ttl != lOther$ttl) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$dnsRecords + on Query$AllServices$services$allServices$dnsRecords { + Query$AllServices$services$allServices$dnsRecords copyWith( + {String? content, + String? name, + int? Function()? priority, + String? recordType, + int? ttl, + String? $__typename}) => + Query$AllServices$services$allServices$dnsRecords( + content: content == null ? this.content : content, + name: name == null ? this.name : name, + priority: priority == null ? this.priority : priority(), + recordType: recordType == null ? this.recordType : recordType, + ttl: ttl == null ? this.ttl : ttl, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$storageUsage { + Query$AllServices$services$allServices$storageUsage( + {required this.title, + required this.usedSpace, + this.volume, + required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$storageUsage.fromJson( + Map json) => + _$Query$AllServices$services$allServices$storageUsageFromJson(json); + + final String title; + + final String usedSpace; + + final Query$AllServices$services$allServices$storageUsage$volume? volume; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$storageUsageToJson(this); + int get hashCode { + final l$title = title; + final l$usedSpace = usedSpace; + final l$volume = volume; + final l$$__typename = $__typename; + return Object.hashAll([l$title, l$usedSpace, l$volume, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllServices$services$allServices$storageUsage) || + runtimeType != other.runtimeType) return false; + final l$title = title; + final lOther$title = other.title; + if (l$title != lOther$title) return false; + final l$usedSpace = usedSpace; + final lOther$usedSpace = other.usedSpace; + if (l$usedSpace != lOther$usedSpace) return false; + final l$volume = volume; + final lOther$volume = other.volume; + if (l$volume != lOther$volume) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$storageUsage + on Query$AllServices$services$allServices$storageUsage { + Query$AllServices$services$allServices$storageUsage copyWith( + {String? title, + String? usedSpace, + Query$AllServices$services$allServices$storageUsage$volume? + Function()? + volume, + String? $__typename}) => + Query$AllServices$services$allServices$storageUsage( + title: title == null ? this.title : title, + usedSpace: usedSpace == null ? this.usedSpace : usedSpace, + volume: volume == null ? this.volume : volume(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllServices$services$allServices$storageUsage$volume { + Query$AllServices$services$allServices$storageUsage$volume( + {required this.name, required this.$__typename}); + + @override + factory Query$AllServices$services$allServices$storageUsage$volume.fromJson( + Map json) => + _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( + json); + + final String name; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Query$AllServices$services$allServices$storageUsage$volumeToJson(this); + int get hashCode { + final l$name = name; + final l$$__typename = $__typename; + return Object.hashAll([l$name, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other + is Query$AllServices$services$allServices$storageUsage$volume) || + runtimeType != other.runtimeType) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllServices$services$allServices$storageUsage$volume + on Query$AllServices$services$allServices$storageUsage$volume { + Query$AllServices$services$allServices$storageUsage$volume copyWith( + {String? name, String? $__typename}) => + Query$AllServices$services$allServices$storageUsage$volume( + name: name == null ? this.name : name, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$EnableService { + Variables$Mutation$EnableService({required this.serviceId}); + + @override + factory Variables$Mutation$EnableService.fromJson( + Map json) => + _$Variables$Mutation$EnableServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$EnableServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$EnableService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$EnableService copyWith({String? serviceId}) => + Variables$Mutation$EnableService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$EnableService { + Mutation$EnableService( + {required this.enableService, required this.$__typename}); + + @override + factory Mutation$EnableService.fromJson(Map json) => + _$Mutation$EnableServiceFromJson(json); + + final Mutation$EnableService$enableService enableService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$EnableServiceToJson(this); + int get hashCode { + final l$enableService = enableService; + final l$$__typename = $__typename; + return Object.hashAll([l$enableService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$EnableService) || runtimeType != other.runtimeType) + return false; + final l$enableService = enableService; + final lOther$enableService = other.enableService; + if (l$enableService != lOther$enableService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$EnableService on Mutation$EnableService { + Mutation$EnableService copyWith( + {Mutation$EnableService$enableService? enableService, + String? $__typename}) => + Mutation$EnableService( + enableService: + enableService == null ? this.enableService : enableService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationEnableService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'EnableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'enableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$EnableService _parserFn$Mutation$EnableService( + Map data) => + Mutation$EnableService.fromJson(data); +typedef OnMutationCompleted$Mutation$EnableService = FutureOr Function( + dynamic, Mutation$EnableService?); + +class Options$Mutation$EnableService + extends graphql.MutationOptions { + Options$Mutation$EnableService( + {String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$EnableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$EnableService(data)), + update: update, + onError: onError, + document: documentNodeMutationEnableService, + parserFn: _parserFn$Mutation$EnableService); + + final OnMutationCompleted$Mutation$EnableService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$EnableService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$EnableService( + {String? operationName, + required Variables$Mutation$EnableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationEnableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$EnableService); +} + +extension ClientExtension$Mutation$EnableService on graphql.GraphQLClient { + Future> mutate$EnableService( + Options$Mutation$EnableService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$EnableService( + WatchOptions$Mutation$EnableService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$EnableService$enableService + implements Fragment$basicMutationReturnFields { + Mutation$EnableService$enableService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$EnableService$enableService.fromJson( + Map json) => + _$Mutation$EnableService$enableServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$EnableService$enableServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$EnableService$enableService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$EnableService$enableService + on Mutation$EnableService$enableService { + Mutation$EnableService$enableService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$EnableService$enableService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DisableService { + Variables$Mutation$DisableService({required this.serviceId}); + + @override + factory Variables$Mutation$DisableService.fromJson( + Map json) => + _$Variables$Mutation$DisableServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$DisableServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$DisableService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$DisableService copyWith({String? serviceId}) => + Variables$Mutation$DisableService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DisableService { + Mutation$DisableService( + {required this.disableService, required this.$__typename}); + + @override + factory Mutation$DisableService.fromJson(Map json) => + _$Mutation$DisableServiceFromJson(json); + + final Mutation$DisableService$disableService disableService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DisableServiceToJson(this); + int get hashCode { + final l$disableService = disableService; + final l$$__typename = $__typename; + return Object.hashAll([l$disableService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DisableService) || runtimeType != other.runtimeType) + return false; + final l$disableService = disableService; + final lOther$disableService = other.disableService; + if (l$disableService != lOther$disableService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DisableService on Mutation$DisableService { + Mutation$DisableService copyWith( + {Mutation$DisableService$disableService? disableService, + String? $__typename}) => + Mutation$DisableService( + disableService: + disableService == null ? this.disableService : disableService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationDisableService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DisableService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'disableService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DisableService _parserFn$Mutation$DisableService( + Map data) => + Mutation$DisableService.fromJson(data); +typedef OnMutationCompleted$Mutation$DisableService = FutureOr Function( + dynamic, Mutation$DisableService?); + +class Options$Mutation$DisableService + extends graphql.MutationOptions { + Options$Mutation$DisableService( + {String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DisableService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$DisableService(data)), + update: update, + onError: onError, + document: documentNodeMutationDisableService, + parserFn: _parserFn$Mutation$DisableService); + + final OnMutationCompleted$Mutation$DisableService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$DisableService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DisableService( + {String? operationName, + required Variables$Mutation$DisableService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDisableService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DisableService); +} + +extension ClientExtension$Mutation$DisableService on graphql.GraphQLClient { + Future> mutate$DisableService( + Options$Mutation$DisableService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$DisableService( + WatchOptions$Mutation$DisableService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DisableService$disableService + implements Fragment$basicMutationReturnFields { + Mutation$DisableService$disableService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$DisableService$disableService.fromJson( + Map json) => + _$Mutation$DisableService$disableServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$DisableService$disableServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$DisableService$disableService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DisableService$disableService + on Mutation$DisableService$disableService { + Mutation$DisableService$disableService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DisableService$disableService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$StopService { + Variables$Mutation$StopService({required this.serviceId}); + + @override + factory Variables$Mutation$StopService.fromJson(Map json) => + _$Variables$Mutation$StopServiceFromJson(json); + + final String serviceId; + + Map toJson() => _$Variables$Mutation$StopServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$StopService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$StopService copyWith({String? serviceId}) => + Variables$Mutation$StopService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StopService { + Mutation$StopService({required this.stopService, required this.$__typename}); + + @override + factory Mutation$StopService.fromJson(Map json) => + _$Mutation$StopServiceFromJson(json); + + final Mutation$StopService$stopService stopService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$StopServiceToJson(this); + int get hashCode { + final l$stopService = stopService; + final l$$__typename = $__typename; + return Object.hashAll([l$stopService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StopService) || runtimeType != other.runtimeType) + return false; + final l$stopService = stopService; + final lOther$stopService = other.stopService; + if (l$stopService != lOther$stopService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StopService on Mutation$StopService { + Mutation$StopService copyWith( + {Mutation$StopService$stopService? stopService, + String? $__typename}) => + Mutation$StopService( + stopService: stopService == null ? this.stopService : stopService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationStopService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'StopService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'stopService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$StopService _parserFn$Mutation$StopService( + Map data) => + Mutation$StopService.fromJson(data); +typedef OnMutationCompleted$Mutation$StopService = FutureOr Function( + dynamic, Mutation$StopService?); + +class Options$Mutation$StopService + extends graphql.MutationOptions { + Options$Mutation$StopService( + {String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StopService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$StopService(data)), + update: update, + onError: onError, + document: documentNodeMutationStopService, + parserFn: _parserFn$Mutation$StopService); + + final OnMutationCompleted$Mutation$StopService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$StopService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$StopService( + {String? operationName, + required Variables$Mutation$StopService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStopService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StopService); +} + +extension ClientExtension$Mutation$StopService on graphql.GraphQLClient { + Future> mutate$StopService( + Options$Mutation$StopService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$StopService( + WatchOptions$Mutation$StopService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StopService$stopService + implements Fragment$basicMutationReturnFields { + Mutation$StopService$stopService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$StopService$stopService.fromJson( + Map json) => + _$Mutation$StopService$stopServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$StopService$stopServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StopService$stopService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StopService$stopService + on Mutation$StopService$stopService { + Mutation$StopService$stopService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$StopService$stopService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$StartService { + Variables$Mutation$StartService({required this.serviceId}); + + @override + factory Variables$Mutation$StartService.fromJson(Map json) => + _$Variables$Mutation$StartServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$StartServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$StartService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$StartService copyWith({String? serviceId}) => + Variables$Mutation$StartService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StartService { + Mutation$StartService( + {required this.startService, required this.$__typename}); + + @override + factory Mutation$StartService.fromJson(Map json) => + _$Mutation$StartServiceFromJson(json); + + final Mutation$StartService$startService startService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$StartServiceToJson(this); + int get hashCode { + final l$startService = startService; + final l$$__typename = $__typename; + return Object.hashAll([l$startService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StartService) || runtimeType != other.runtimeType) + return false; + final l$startService = startService; + final lOther$startService = other.startService; + if (l$startService != lOther$startService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StartService on Mutation$StartService { + Mutation$StartService copyWith( + {Mutation$StartService$startService? startService, + String? $__typename}) => + Mutation$StartService( + startService: startService == null ? this.startService : startService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationStartService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'StartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'startService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$StartService _parserFn$Mutation$StartService( + Map data) => + Mutation$StartService.fromJson(data); +typedef OnMutationCompleted$Mutation$StartService = FutureOr Function( + dynamic, Mutation$StartService?); + +class Options$Mutation$StartService + extends graphql.MutationOptions { + Options$Mutation$StartService( + {String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$StartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$StartService(data)), + update: update, + onError: onError, + document: documentNodeMutationStartService, + parserFn: _parserFn$Mutation$StartService); + + final OnMutationCompleted$Mutation$StartService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$StartService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$StartService( + {String? operationName, + required Variables$Mutation$StartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationStartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$StartService); +} + +extension ClientExtension$Mutation$StartService on graphql.GraphQLClient { + Future> mutate$StartService( + Options$Mutation$StartService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$StartService( + WatchOptions$Mutation$StartService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$StartService$startService + implements Fragment$basicMutationReturnFields { + Mutation$StartService$startService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$StartService$startService.fromJson( + Map json) => + _$Mutation$StartService$startServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$StartService$startServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$StartService$startService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$StartService$startService + on Mutation$StartService$startService { + Mutation$StartService$startService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$StartService$startService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RestartService { + Variables$Mutation$RestartService({required this.serviceId}); + + @override + factory Variables$Mutation$RestartService.fromJson( + Map json) => + _$Variables$Mutation$RestartServiceFromJson(json); + + final String serviceId; + + Map toJson() => + _$Variables$Mutation$RestartServiceToJson(this); + int get hashCode { + final l$serviceId = serviceId; + return Object.hashAll([l$serviceId]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$RestartService) || + runtimeType != other.runtimeType) return false; + final l$serviceId = serviceId; + final lOther$serviceId = other.serviceId; + if (l$serviceId != lOther$serviceId) return false; + return true; + } + + Variables$Mutation$RestartService copyWith({String? serviceId}) => + Variables$Mutation$RestartService( + serviceId: serviceId == null ? this.serviceId : serviceId); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RestartService { + Mutation$RestartService( + {required this.restartService, required this.$__typename}); + + @override + factory Mutation$RestartService.fromJson(Map json) => + _$Mutation$RestartServiceFromJson(json); + + final Mutation$RestartService$restartService restartService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RestartServiceToJson(this); + int get hashCode { + final l$restartService = restartService; + final l$$__typename = $__typename; + return Object.hashAll([l$restartService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RestartService) || runtimeType != other.runtimeType) + return false; + final l$restartService = restartService; + final lOther$restartService = other.restartService; + if (l$restartService != lOther$restartService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RestartService on Mutation$RestartService { + Mutation$RestartService copyWith( + {Mutation$RestartService$restartService? restartService, + String? $__typename}) => + Mutation$RestartService( + restartService: + restartService == null ? this.restartService : restartService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRestartService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RestartService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'serviceId')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'restartService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'serviceId'), + value: VariableNode(name: NameNode(value: 'serviceId'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + 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) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$RestartService _parserFn$Mutation$RestartService( + Map data) => + Mutation$RestartService.fromJson(data); +typedef OnMutationCompleted$Mutation$RestartService = FutureOr Function( + dynamic, Mutation$RestartService?); + +class Options$Mutation$RestartService + extends graphql.MutationOptions { + Options$Mutation$RestartService( + {String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RestartService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RestartService(data)), + update: update, + onError: onError, + document: documentNodeMutationRestartService, + parserFn: _parserFn$Mutation$RestartService); + + final OnMutationCompleted$Mutation$RestartService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RestartService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RestartService( + {String? operationName, + required Variables$Mutation$RestartService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRestartService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RestartService); +} + +extension ClientExtension$Mutation$RestartService on graphql.GraphQLClient { + Future> mutate$RestartService( + Options$Mutation$RestartService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$RestartService( + WatchOptions$Mutation$RestartService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RestartService$restartService + implements Fragment$basicMutationReturnFields { + Mutation$RestartService$restartService( + {required this.code, + required this.message, + required this.success, + required this.$__typename}); + + @override + factory Mutation$RestartService$restartService.fromJson( + Map json) => + _$Mutation$RestartService$restartServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RestartService$restartServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RestartService$restartService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RestartService$restartService + on Mutation$RestartService$restartService { + Mutation$RestartService$restartService copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$RestartService$restartService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$MoveService { + Variables$Mutation$MoveService({required this.input}); + + @override + factory Variables$Mutation$MoveService.fromJson(Map json) => + _$Variables$Mutation$MoveServiceFromJson(json); + + final Input$MoveServiceInput input; + + Map toJson() => _$Variables$Mutation$MoveServiceToJson(this); + int get hashCode { + final l$input = input; + return Object.hashAll([l$input]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Variables$Mutation$MoveService) || + runtimeType != other.runtimeType) return false; + final l$input = input; + final lOther$input = other.input; + if (l$input != lOther$input) return false; + return true; + } + + Variables$Mutation$MoveService copyWith({Input$MoveServiceInput? input}) => + Variables$Mutation$MoveService(input: input == null ? this.input : input); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService { + Mutation$MoveService({required this.moveService, required this.$__typename}); + + @override + factory Mutation$MoveService.fromJson(Map json) => + _$Mutation$MoveServiceFromJson(json); + + final Mutation$MoveService$moveService moveService; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$MoveServiceToJson(this); + int get hashCode { + final l$moveService = moveService; + final l$$__typename = $__typename; + return Object.hashAll([l$moveService, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService) || runtimeType != other.runtimeType) + return false; + final l$moveService = moveService; + final lOther$moveService = other.moveService; + if (l$moveService != lOther$moveService) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService on Mutation$MoveService { + Mutation$MoveService copyWith( + {Mutation$MoveService$moveService? moveService, + String? $__typename}) => + Mutation$MoveService( + moveService: moveService == null ? this.moveService : moveService, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationMoveService = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'MoveService'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'input')), + type: NamedTypeNode( + name: NameNode(value: 'MoveServiceInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'moveService'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'input'), + value: VariableNode(name: NameNode(value: 'input'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'job'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'description'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'error'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'finishedAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'progress'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'result'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'statusText'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'uid'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'updatedAt'), + 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, +]); +Mutation$MoveService _parserFn$Mutation$MoveService( + Map data) => + Mutation$MoveService.fromJson(data); +typedef OnMutationCompleted$Mutation$MoveService = FutureOr Function( + dynamic, Mutation$MoveService?); + +class Options$Mutation$MoveService + extends graphql.MutationOptions { + Options$Mutation$MoveService( + {String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$MoveService? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$MoveService(data)), + update: update, + onError: onError, + document: documentNodeMutationMoveService, + parserFn: _parserFn$Mutation$MoveService); + + final OnMutationCompleted$Mutation$MoveService? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$MoveService + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$MoveService( + {String? operationName, + required Variables$Mutation$MoveService variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationMoveService, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$MoveService); +} + +extension ClientExtension$Mutation$MoveService on graphql.GraphQLClient { + Future> mutate$MoveService( + Options$Mutation$MoveService options) async => + await this.mutate(options); + graphql.ObservableQuery watchMutation$MoveService( + WatchOptions$Mutation$MoveService options) => + this.watchMutation(options); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService$moveService + implements Fragment$basicMutationReturnFields { + Mutation$MoveService$moveService( + {required this.code, + required this.message, + required this.success, + required this.$__typename, + this.job}); + + @override + factory Mutation$MoveService$moveService.fromJson( + Map json) => + _$Mutation$MoveService$moveServiceFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$MoveService$moveService$job? job; + + Map toJson() => + _$Mutation$MoveService$moveServiceToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + final l$job = job; + return Object.hashAll([l$code, l$message, l$success, l$$__typename, l$job]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService$moveService) || + runtimeType != other.runtimeType) return false; + final l$code = code; + final lOther$code = other.code; + if (l$code != lOther$code) return false; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$job = job; + final lOther$job = other.job; + if (l$job != lOther$job) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService$moveService + on Mutation$MoveService$moveService { + Mutation$MoveService$moveService copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$MoveService$moveService$job? Function()? job}) => + Mutation$MoveService$moveService( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + job: job == null ? this.job : job()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$MoveService$moveService$job { + Mutation$MoveService$moveService$job( + {required this.createdAt, + required this.description, + this.error, + this.finishedAt, + required this.name, + this.progress, + this.result, + required this.status, + this.statusText, + required this.uid, + required this.updatedAt, + required this.$__typename}); + + @override + factory Mutation$MoveService$moveService$job.fromJson( + Map json) => + _$Mutation$MoveService$moveService$jobFromJson(json); + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime createdAt; + + final String description; + + final String? error; + + @JsonKey( + fromJson: _nullable$dateTimeFromJson, toJson: _nullable$dateTimeToJson) + final DateTime? finishedAt; + + final String name; + + final int? progress; + + final String? result; + + final String status; + + final String? statusText; + + final String uid; + + @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) + final DateTime updatedAt; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$MoveService$moveService$jobToJson(this); + int get hashCode { + final l$createdAt = createdAt; + final l$description = description; + final l$error = error; + final l$finishedAt = finishedAt; + final l$name = name; + final l$progress = progress; + final l$result = result; + final l$status = status; + final l$statusText = statusText; + final l$uid = uid; + final l$updatedAt = updatedAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$createdAt, + l$description, + l$error, + l$finishedAt, + l$name, + l$progress, + l$result, + l$status, + l$statusText, + l$uid, + l$updatedAt, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$MoveService$moveService$job) || + runtimeType != other.runtimeType) return false; + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) return false; + final l$description = description; + final lOther$description = other.description; + if (l$description != lOther$description) return false; + final l$error = error; + final lOther$error = other.error; + if (l$error != lOther$error) return false; + final l$finishedAt = finishedAt; + final lOther$finishedAt = other.finishedAt; + if (l$finishedAt != lOther$finishedAt) return false; + final l$name = name; + final lOther$name = other.name; + if (l$name != lOther$name) return false; + final l$progress = progress; + final lOther$progress = other.progress; + if (l$progress != lOther$progress) return false; + final l$result = result; + final lOther$result = other.result; + if (l$result != lOther$result) return false; + final l$status = status; + final lOther$status = other.status; + if (l$status != lOther$status) return false; + final l$statusText = statusText; + final lOther$statusText = other.statusText; + if (l$statusText != lOther$statusText) return false; + final l$uid = uid; + final lOther$uid = other.uid; + if (l$uid != lOther$uid) return false; + final l$updatedAt = updatedAt; + final lOther$updatedAt = other.updatedAt; + if (l$updatedAt != lOther$updatedAt) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$MoveService$moveService$job + on Mutation$MoveService$moveService$job { + Mutation$MoveService$moveService$job copyWith( + {DateTime? createdAt, + String? description, + String? Function()? error, + DateTime? Function()? finishedAt, + String? name, + int? Function()? progress, + String? Function()? result, + String? status, + String? Function()? statusText, + String? uid, + DateTime? updatedAt, + String? $__typename}) => + Mutation$MoveService$moveService$job( + createdAt: createdAt == null ? this.createdAt : createdAt, + description: description == null ? this.description : description, + error: error == null ? this.error : error(), + finishedAt: finishedAt == null ? this.finishedAt : finishedAt(), + name: name == null ? this.name : name, + progress: progress == null ? this.progress : progress(), + result: result == null ? this.result : result(), + status: status == null ? this.status : status, + statusText: statusText == null ? this.statusText : statusText(), + uid: uid == null ? this.uid : uid, + updatedAt: updatedAt == null ? this.updatedAt : updatedAt, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +DateTime? _nullable$dateTimeFromJson(dynamic data) => + data == null ? null : dateTimeFromJson(data); +dynamic _nullable$dateTimeToJson(DateTime? data) => + data == null ? null : dateTimeToJson(data); diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart new file mode 100644 index 00000000..c88900b1 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.g.dart @@ -0,0 +1,482 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'services.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +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) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Query$AllServices _$Query$AllServicesFromJson(Map json) => + Query$AllServices( + services: Query$AllServices$services.fromJson( + json['services'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServicesToJson(Query$AllServices instance) => + { + 'services': instance.services.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services _$Query$AllServices$servicesFromJson( + Map json) => + Query$AllServices$services( + allServices: (json['allServices'] as List) + .map((e) => Query$AllServices$services$allServices.fromJson( + e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$servicesToJson( + Query$AllServices$services instance) => + { + 'allServices': instance.allServices.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices + _$Query$AllServices$services$allServicesFromJson( + Map json) => + Query$AllServices$services$allServices( + description: json['description'] as String, + displayName: json['displayName'] as String, + dnsRecords: (json['dnsRecords'] as List?) + ?.map((e) => + Query$AllServices$services$allServices$dnsRecords.fromJson( + e as Map)) + .toList(), + id: json['id'] as String, + isEnabled: json['isEnabled'] as bool, + isMovable: json['isMovable'] as bool, + isRequired: json['isRequired'] as bool, + status: $enumDecode(_$Enum$ServiceStatusEnumEnumMap, json['status'], + unknownValue: Enum$ServiceStatusEnum.$unknown), + storageUsage: + Query$AllServices$services$allServices$storageUsage.fromJson( + json['storageUsage'] as Map), + svgIcon: json['svgIcon'] as String, + url: json['url'] as String?, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServicesToJson( + Query$AllServices$services$allServices instance) => + { + 'description': instance.description, + 'displayName': instance.displayName, + 'dnsRecords': instance.dnsRecords?.map((e) => e.toJson()).toList(), + 'id': instance.id, + 'isEnabled': instance.isEnabled, + 'isMovable': instance.isMovable, + 'isRequired': instance.isRequired, + 'status': _$Enum$ServiceStatusEnumEnumMap[instance.status], + 'storageUsage': instance.storageUsage.toJson(), + 'svgIcon': instance.svgIcon, + 'url': instance.url, + '__typename': instance.$__typename, + }; + +const _$Enum$ServiceStatusEnumEnumMap = { + Enum$ServiceStatusEnum.ACTIVATING: 'ACTIVATING', + Enum$ServiceStatusEnum.ACTIVE: 'ACTIVE', + Enum$ServiceStatusEnum.DEACTIVATING: 'DEACTIVATING', + Enum$ServiceStatusEnum.FAILED: 'FAILED', + Enum$ServiceStatusEnum.INACTIVE: 'INACTIVE', + Enum$ServiceStatusEnum.OFF: 'OFF', + Enum$ServiceStatusEnum.RELOADING: 'RELOADING', + Enum$ServiceStatusEnum.$unknown: r'$unknown', +}; + +Query$AllServices$services$allServices$dnsRecords + _$Query$AllServices$services$allServices$dnsRecordsFromJson( + Map json) => + Query$AllServices$services$allServices$dnsRecords( + content: json['content'] as String, + name: json['name'] as String, + priority: json['priority'] as int?, + recordType: json['recordType'] as String, + ttl: json['ttl'] as int, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServices$dnsRecordsToJson( + Query$AllServices$services$allServices$dnsRecords instance) => + { + 'content': instance.content, + 'name': instance.name, + 'priority': instance.priority, + 'recordType': instance.recordType, + 'ttl': instance.ttl, + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices$storageUsage + _$Query$AllServices$services$allServices$storageUsageFromJson( + Map json) => + Query$AllServices$services$allServices$storageUsage( + title: json['title'] as String, + usedSpace: json['usedSpace'] as String, + volume: json['volume'] == null + ? null + : Query$AllServices$services$allServices$storageUsage$volume + .fromJson(json['volume'] as Map), + $__typename: json['__typename'] as String, + ); + +Map + _$Query$AllServices$services$allServices$storageUsageToJson( + Query$AllServices$services$allServices$storageUsage instance) => + { + 'title': instance.title, + 'usedSpace': instance.usedSpace, + 'volume': instance.volume?.toJson(), + '__typename': instance.$__typename, + }; + +Query$AllServices$services$allServices$storageUsage$volume + _$Query$AllServices$services$allServices$storageUsage$volumeFromJson( + Map json) => + Query$AllServices$services$allServices$storageUsage$volume( + name: json['name'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllServices$services$allServices$storageUsage$volumeToJson( + Query$AllServices$services$allServices$storageUsage$volume instance) => + { + 'name': instance.name, + '__typename': instance.$__typename, + }; + +Variables$Mutation$EnableService _$Variables$Mutation$EnableServiceFromJson( + Map json) => + Variables$Mutation$EnableService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$EnableServiceToJson( + Variables$Mutation$EnableService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$EnableService _$Mutation$EnableServiceFromJson( + Map json) => + Mutation$EnableService( + enableService: Mutation$EnableService$enableService.fromJson( + json['enableService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$EnableServiceToJson( + Mutation$EnableService instance) => + { + 'enableService': instance.enableService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$EnableService$enableService + _$Mutation$EnableService$enableServiceFromJson(Map json) => + Mutation$EnableService$enableService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$EnableService$enableServiceToJson( + Mutation$EnableService$enableService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$DisableService _$Variables$Mutation$DisableServiceFromJson( + Map json) => + Variables$Mutation$DisableService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$DisableServiceToJson( + Variables$Mutation$DisableService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$DisableService _$Mutation$DisableServiceFromJson( + Map json) => + Mutation$DisableService( + disableService: Mutation$DisableService$disableService.fromJson( + json['disableService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DisableServiceToJson( + Mutation$DisableService instance) => + { + 'disableService': instance.disableService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$DisableService$disableService + _$Mutation$DisableService$disableServiceFromJson( + Map json) => + Mutation$DisableService$disableService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DisableService$disableServiceToJson( + Mutation$DisableService$disableService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$StopService _$Variables$Mutation$StopServiceFromJson( + Map json) => + Variables$Mutation$StopService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$StopServiceToJson( + Variables$Mutation$StopService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$StopService _$Mutation$StopServiceFromJson( + Map json) => + Mutation$StopService( + stopService: Mutation$StopService$stopService.fromJson( + json['stopService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StopServiceToJson( + Mutation$StopService instance) => + { + 'stopService': instance.stopService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$StopService$stopService _$Mutation$StopService$stopServiceFromJson( + Map json) => + Mutation$StopService$stopService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StopService$stopServiceToJson( + Mutation$StopService$stopService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$StartService _$Variables$Mutation$StartServiceFromJson( + Map json) => + Variables$Mutation$StartService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$StartServiceToJson( + Variables$Mutation$StartService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$StartService _$Mutation$StartServiceFromJson( + Map json) => + Mutation$StartService( + startService: Mutation$StartService$startService.fromJson( + json['startService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StartServiceToJson( + Mutation$StartService instance) => + { + 'startService': instance.startService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$StartService$startService _$Mutation$StartService$startServiceFromJson( + Map json) => + Mutation$StartService$startService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$StartService$startServiceToJson( + Mutation$StartService$startService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$RestartService _$Variables$Mutation$RestartServiceFromJson( + Map json) => + Variables$Mutation$RestartService( + serviceId: json['serviceId'] as String, + ); + +Map _$Variables$Mutation$RestartServiceToJson( + Variables$Mutation$RestartService instance) => + { + 'serviceId': instance.serviceId, + }; + +Mutation$RestartService _$Mutation$RestartServiceFromJson( + Map json) => + Mutation$RestartService( + restartService: Mutation$RestartService$restartService.fromJson( + json['restartService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RestartServiceToJson( + Mutation$RestartService instance) => + { + 'restartService': instance.restartService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$RestartService$restartService + _$Mutation$RestartService$restartServiceFromJson( + Map json) => + Mutation$RestartService$restartService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RestartService$restartServiceToJson( + Mutation$RestartService$restartService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +Variables$Mutation$MoveService _$Variables$Mutation$MoveServiceFromJson( + Map json) => + Variables$Mutation$MoveService( + input: Input$MoveServiceInput.fromJson( + json['input'] as Map), + ); + +Map _$Variables$Mutation$MoveServiceToJson( + Variables$Mutation$MoveService instance) => + { + 'input': instance.input.toJson(), + }; + +Mutation$MoveService _$Mutation$MoveServiceFromJson( + Map json) => + Mutation$MoveService( + moveService: Mutation$MoveService$moveService.fromJson( + json['moveService'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MoveServiceToJson( + Mutation$MoveService instance) => + { + 'moveService': instance.moveService.toJson(), + '__typename': instance.$__typename, + }; + +Mutation$MoveService$moveService _$Mutation$MoveService$moveServiceFromJson( + Map json) => + Mutation$MoveService$moveService( + code: json['code'] as int, + message: json['message'] as String, + success: json['success'] as bool, + $__typename: json['__typename'] as String, + job: json['job'] == null + ? null + : Mutation$MoveService$moveService$job.fromJson( + json['job'] as Map), + ); + +Map _$Mutation$MoveService$moveServiceToJson( + Mutation$MoveService$moveService instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'job': instance.job?.toJson(), + }; + +Mutation$MoveService$moveService$job + _$Mutation$MoveService$moveService$jobFromJson(Map json) => + Mutation$MoveService$moveService$job( + createdAt: dateTimeFromJson(json['createdAt']), + description: json['description'] as String, + error: json['error'] as String?, + finishedAt: _nullable$dateTimeFromJson(json['finishedAt']), + name: json['name'] as String, + progress: json['progress'] as int?, + result: json['result'] as String?, + status: json['status'] as String, + statusText: json['statusText'] as String?, + uid: json['uid'] as String, + updatedAt: dateTimeFromJson(json['updatedAt']), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$MoveService$moveService$jobToJson( + Mutation$MoveService$moveService$job instance) => + { + 'createdAt': dateTimeToJson(instance.createdAt), + 'description': instance.description, + 'error': instance.error, + 'finishedAt': _nullable$dateTimeToJson(instance.finishedAt), + 'name': instance.name, + 'progress': instance.progress, + 'result': instance.result, + 'status': instance.status, + 'statusText': instance.statusText, + 'uid': instance.uid, + 'updatedAt': dateTimeToJson(instance.updatedAt), + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql b/lib/logic/api_maps/graphql_maps/schema/users.graphql new file mode 100644 index 00000000..cfe01820 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql @@ -0,0 +1,76 @@ +fragment basicMutationReturnFields on MutationReturnInterface{ + code + message + success +} + + +mutation CreateUser($user: UserMutationInput!) { + createUser(user: $user) { + ...basicMutationReturnFields + user { + username + userType + sshKeys + } + } +} + +query AllUsers { + users { + allUsers { + userType + username + sshKeys + } + } +} + +mutation AddSshKey($sshInput: SshMutationInput!) { + addSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} + +query GetUser($username: String!) { + users { + getUser(username: $username) { + sshKeys + userType + username + } + } +} + +mutation RemoveSshKey($sshInput: SshMutationInput!) { + removeSshKey(sshInput: $sshInput) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} + +mutation DeleteUser($username: String!) { + deleteUser(username: $username) { + ...basicMutationReturnFields + } +} + +mutation UpdateUser($user: UserMutationInput!) { + updateUser(user: $user) { + ...basicMutationReturnFields + user { + sshKeys + userType + username + } + } +} \ No newline at end of file diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart new file mode 100644 index 00000000..81f3fd8c --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -0,0 +1,2642 @@ +import 'dart:async'; +import 'disk_volumes.graphql.dart'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:json_annotation/json_annotation.dart'; +import 'schema.graphql.dart'; +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}); + + @override + factory Fragment$basicMutationReturnFields.fromJson( + Map json) => + _$Fragment$basicMutationReturnFieldsFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Fragment$basicMutationReturnFieldsToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Fragment$basicMutationReturnFields + on Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Fragment$basicMutationReturnFields( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const fragmentDefinitionbasicMutationReturnFields = FragmentDefinitionNode( + name: NameNode(value: 'basicMutationReturnFields'), + 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) + ])); +const documentNodeFragmentbasicMutationReturnFields = + DocumentNode(definitions: [ + fragmentDefinitionbasicMutationReturnFields, +]); + +extension ClientExtension$Fragment$basicMutationReturnFields + on graphql.GraphQLClient { + void writeFragment$basicMutationReturnFields( + {required Fragment$basicMutationReturnFields data, + required Map idFields, + bool broadcast = true}) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'basicMutationReturnFields', + document: documentNodeFragmentbasicMutationReturnFields)), + data: data.toJson(), + broadcast: broadcast); + 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)), + optimistic: optimistic); + return result == null + ? null + : Fragment$basicMutationReturnFields.fromJson(result); + } +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$CreateUser { + Variables$Mutation$CreateUser({required this.user}); + + @override + factory Variables$Mutation$CreateUser.fromJson(Map json) => + _$Variables$Mutation$CreateUserFromJson(json); + + final Input$UserMutationInput user; + + Map toJson() => _$Variables$Mutation$CreateUserToJson(this); + int get hashCode { + final l$user = user; + return Object.hashAll([l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Mutation$CreateUser copyWith({Input$UserMutationInput? user}) => + Variables$Mutation$CreateUser(user: user == null ? this.user : user); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$CreateUser { + Mutation$CreateUser({required this.createUser, required this.$__typename}); + + @override + factory Mutation$CreateUser.fromJson(Map json) => + _$Mutation$CreateUserFromJson(json); + + final Mutation$CreateUser$createUser createUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$CreateUserToJson(this); + int get hashCode { + final l$createUser = createUser; + final l$$__typename = $__typename; + return Object.hashAll([l$createUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser on Mutation$CreateUser { + Mutation$CreateUser copyWith( + {Mutation$CreateUser$createUser? createUser, String? $__typename}) => + Mutation$CreateUser( + createUser: createUser == null ? this.createUser : createUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationCreateUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'CreateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'createUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + 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: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$CreateUser _parserFn$Mutation$CreateUser(Map data) => + Mutation$CreateUser.fromJson(data); +typedef OnMutationCompleted$Mutation$CreateUser = FutureOr Function( + dynamic, Mutation$CreateUser?); + +class Options$Mutation$CreateUser + extends graphql.MutationOptions { + Options$Mutation$CreateUser( + {String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$CreateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$CreateUser(data)), + update: update, + onError: onError, + document: documentNodeMutationCreateUser, + parserFn: _parserFn$Mutation$CreateUser); + + final OnMutationCompleted$Mutation$CreateUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$CreateUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$CreateUser( + {String? operationName, + required Variables$Mutation$CreateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationCreateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$CreateUser); +} + +extension ClientExtension$Mutation$CreateUser on graphql.GraphQLClient { + Future> mutate$CreateUser( + Options$Mutation$CreateUser options) async => + await this.mutate(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}); + + @override + factory Mutation$CreateUser$createUser.fromJson(Map json) => + _$Mutation$CreateUser$createUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$CreateUser$createUser$user? user; + + Map toJson() => _$Mutation$CreateUser$createUserToJson(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]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser$createUser + on Mutation$CreateUser$createUser { + Mutation$CreateUser$createUser copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$CreateUser$createUser$user? Function()? user}) => + Mutation$CreateUser$createUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$CreateUser$createUser$user { + Mutation$CreateUser$createUser$user( + {required this.username, + required this.userType, + required this.sshKeys, + required this.$__typename}); + + @override + factory Mutation$CreateUser$createUser$user.fromJson( + Map json) => + _$Mutation$CreateUser$createUser$userFromJson(json); + + final String username; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final List sshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$CreateUser$createUser$userToJson(this); + int get hashCode { + final l$username = username; + 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 + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$CreateUser$createUser$user) || + runtimeType != other.runtimeType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$CreateUser$createUser$user + on Mutation$CreateUser$createUser$user { + Mutation$CreateUser$createUser$user copyWith( + {String? username, + Enum$UserType? userType, + List? sshKeys, + String? $__typename}) => + Mutation$CreateUser$createUser$user( + username: username == null ? this.username : username, + userType: userType == null ? this.userType : userType, + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers { + Query$AllUsers({required this.users, required this.$__typename}); + + @override + factory Query$AllUsers.fromJson(Map json) => + _$Query$AllUsersFromJson(json); + + final Query$AllUsers$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsersToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers on Query$AllUsers { + Query$AllUsers copyWith({Query$AllUsers$users? users, String? $__typename}) => + Query$AllUsers( + users: users == null ? this.users : users, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryAllUsers = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllUsers'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allUsers'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + 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: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$AllUsers _parserFn$Query$AllUsers(Map data) => + Query$AllUsers.fromJson(data); + +class Options$Query$AllUsers extends graphql.QueryOptions { + Options$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryAllUsers, + parserFn: _parserFn$Query$AllUsers); +} + +class WatchOptions$Query$AllUsers + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllUsers( + {String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryAllUsers, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllUsers); +} + +class FetchMoreOptions$Query$AllUsers extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllUsers({required graphql.UpdateQuery updateQuery}) + : super(updateQuery: updateQuery, document: documentNodeQueryAllUsers); +} + +extension ClientExtension$Query$AllUsers on graphql.GraphQLClient { + Future> query$AllUsers( + [Options$Query$AllUsers? options]) async => + await this.query(options ?? Options$Query$AllUsers()); + 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); + Query$AllUsers? readQuery$AllUsers({bool optimistic = true}) { + 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, required this.$__typename}); + + @override + factory Query$AllUsers$users.fromJson(Map json) => + _$Query$AllUsers$usersFromJson(json); + + final List allUsers; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsers$usersToJson(this); + int get hashCode { + final l$allUsers = allUsers; + final l$$__typename = $__typename; + return Object.hashAll( + [Object.hashAll(l$allUsers.map((v) => v)), l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + for (int i = 0; i < l$allUsers.length; i++) { + final l$allUsers$entry = l$allUsers[i]; + final lOther$allUsers$entry = lOther$allUsers[i]; + if (l$allUsers$entry != lOther$allUsers$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers$users on Query$AllUsers$users { + Query$AllUsers$users copyWith( + {List? allUsers, + String? $__typename}) => + Query$AllUsers$users( + allUsers: allUsers == null ? this.allUsers : allUsers, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$AllUsers$users$allUsers { + Query$AllUsers$users$allUsers( + {required this.userType, + required this.username, + required this.sshKeys, + required this.$__typename}); + + @override + factory Query$AllUsers$users$allUsers.fromJson(Map json) => + _$Query$AllUsers$users$allUsersFromJson(json); + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + final List sshKeys; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$AllUsers$users$allUsersToJson(this); + int get hashCode { + final l$userType = userType; + final l$username = username; + final l$sshKeys = sshKeys; + final l$$__typename = $__typename; + return Object.hashAll([ + l$userType, + l$username, + Object.hashAll(l$sshKeys.map((v) => v)), + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$AllUsers$users$allUsers) || + runtimeType != other.runtimeType) return false; + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$AllUsers$users$allUsers + on Query$AllUsers$users$allUsers { + Query$AllUsers$users$allUsers copyWith( + {Enum$UserType? userType, + String? username, + List? sshKeys, + String? $__typename}) => + Query$AllUsers$users$allUsers( + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$AddSshKey { + Variables$Mutation$AddSshKey({required this.sshInput}); + + @override + factory Variables$Mutation$AddSshKey.fromJson(Map json) => + _$Variables$Mutation$AddSshKeyFromJson(json); + + final Input$SshMutationInput sshInput; + + Map toJson() => _$Variables$Mutation$AddSshKeyToJson(this); + int get hashCode { + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Mutation$AddSshKey copyWith({Input$SshMutationInput? sshInput}) => + Variables$Mutation$AddSshKey( + sshInput: sshInput == null ? this.sshInput : sshInput); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey { + Mutation$AddSshKey({required this.addSshKey, required this.$__typename}); + + @override + factory Mutation$AddSshKey.fromJson(Map json) => + _$Mutation$AddSshKeyFromJson(json); + + final Mutation$AddSshKey$addSshKey addSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$AddSshKeyToJson(this); + int get hashCode { + final l$addSshKey = addSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$addSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey on Mutation$AddSshKey { + Mutation$AddSshKey copyWith( + {Mutation$AddSshKey$addSshKey? addSshKey, String? $__typename}) => + Mutation$AddSshKey( + addSshKey: addSshKey == null ? this.addSshKey : addSshKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationAddSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'AddSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'addSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + 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, +]); +Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map data) => + Mutation$AddSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr Function( + dynamic, Mutation$AddSshKey?); + +class Options$Mutation$AddSshKey + extends graphql.MutationOptions { + Options$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$AddSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$AddSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationAddSshKey, + parserFn: _parserFn$Mutation$AddSshKey); + + final OnMutationCompleted$Mutation$AddSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$AddSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$AddSshKey( + {String? operationName, + required Variables$Mutation$AddSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationAddSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$AddSshKey); +} + +extension ClientExtension$Mutation$AddSshKey on graphql.GraphQLClient { + Future> mutate$AddSshKey( + Options$Mutation$AddSshKey options) async => + await this.mutate(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}); + + @override + factory Mutation$AddSshKey$addSshKey.fromJson(Map json) => + _$Mutation$AddSshKey$addSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$AddSshKey$addSshKey$user? user; + + Map toJson() => _$Mutation$AddSshKey$addSshKeyToJson(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]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey$addSshKey + on Mutation$AddSshKey$addSshKey { + Mutation$AddSshKey$addSshKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$AddSshKey$addSshKey$user? Function()? user}) => + Mutation$AddSshKey$addSshKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$AddSshKey$addSshKey$user { + Mutation$AddSshKey$addSshKey$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$AddSshKey$addSshKey$user.fromJson( + Map json) => + _$Mutation$AddSshKey$addSshKey$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$AddSshKey$addSshKey$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$AddSshKey$addSshKey$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$AddSshKey$addSshKey$user + on Mutation$AddSshKey$addSshKey$user { + Mutation$AddSshKey$addSshKey$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$AddSshKey$addSshKey$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Query$GetUser { + Variables$Query$GetUser({required this.username}); + + @override + factory Variables$Query$GetUser.fromJson(Map json) => + _$Variables$Query$GetUserFromJson(json); + + final String username; + + Map toJson() => _$Variables$Query$GetUserToJson(this); + int get hashCode { + final l$username = username; + return Object.hashAll([l$username]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Query$GetUser copyWith({String? username}) => + Variables$Query$GetUser( + username: username == null ? this.username : username); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser { + Query$GetUser({required this.users, required this.$__typename}); + + @override + factory Query$GetUser.fromJson(Map json) => + _$Query$GetUserFromJson(json); + + final Query$GetUser$users users; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUserToJson(this); + int get hashCode { + final l$users = users; + final l$$__typename = $__typename; + return Object.hashAll([l$users, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser on Query$GetUser { + Query$GetUser copyWith({Query$GetUser$users? users, String? $__typename}) => + Query$GetUser( + users: users == null ? this.users : users, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeQueryGetUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'GetUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'users'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'getUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'username'), + value: VariableNode(name: NameNode(value: 'username'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), +]); +Query$GetUser _parserFn$Query$GetUser(Map data) => + Query$GetUser.fromJson(data); + +class Options$Query$GetUser extends graphql.QueryOptions { + Options$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Duration? pollInterval, + graphql.Context? context}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + pollInterval: pollInterval, + context: context, + document: documentNodeQueryGetUser, + parserFn: _parserFn$Query$GetUser); +} + +class WatchOptions$Query$GetUser + extends graphql.WatchQueryOptions { + WatchOptions$Query$GetUser( + {String? operationName, + required Variables$Query$GetUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeQueryGetUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$GetUser); +} + +class FetchMoreOptions$Query$GetUser extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$GetUser( + {required graphql.UpdateQuery updateQuery, + required Variables$Query$GetUser variables}) + : super( + updateQuery: updateQuery, + variables: variables.toJson(), + document: documentNodeQueryGetUser); +} + +extension ClientExtension$Query$GetUser on graphql.GraphQLClient { + Future> query$GetUser( + Options$Query$GetUser options) async => + await this.query(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); + 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); + } +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser$users { + Query$GetUser$users({this.getUser, required this.$__typename}); + + @override + factory Query$GetUser$users.fromJson(Map json) => + _$Query$GetUser$usersFromJson(json); + + final Query$GetUser$users$getUser? getUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUser$usersToJson(this); + int get hashCode { + final l$getUser = getUser; + final l$$__typename = $__typename; + return Object.hashAll([l$getUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser$users on Query$GetUser$users { + Query$GetUser$users copyWith( + {Query$GetUser$users$getUser? Function()? getUser, + String? $__typename}) => + Query$GetUser$users( + getUser: getUser == null ? this.getUser : getUser(), + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Query$GetUser$users$getUser { + Query$GetUser$users$getUser( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Query$GetUser$users$getUser.fromJson(Map json) => + _$Query$GetUser$users$getUserFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Query$GetUser$users$getUserToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Query$GetUser$users$getUser) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Query$GetUser$users$getUser + on Query$GetUser$users$getUser { + Query$GetUser$users$getUser copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Query$GetUser$users$getUser( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$RemoveSshKey { + Variables$Mutation$RemoveSshKey({required this.sshInput}); + + @override + factory Variables$Mutation$RemoveSshKey.fromJson(Map json) => + _$Variables$Mutation$RemoveSshKeyFromJson(json); + + final Input$SshMutationInput sshInput; + + Map toJson() => + _$Variables$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$sshInput = sshInput; + return Object.hashAll([l$sshInput]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Mutation$RemoveSshKey copyWith( + {Input$SshMutationInput? sshInput}) => + Variables$Mutation$RemoveSshKey( + sshInput: sshInput == null ? this.sshInput : sshInput); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey { + Mutation$RemoveSshKey( + {required this.removeSshKey, required this.$__typename}); + + @override + factory Mutation$RemoveSshKey.fromJson(Map json) => + _$Mutation$RemoveSshKeyFromJson(json); + + final Mutation$RemoveSshKey$removeSshKey removeSshKey; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$RemoveSshKeyToJson(this); + int get hashCode { + final l$removeSshKey = removeSshKey; + final l$$__typename = $__typename; + return Object.hashAll([l$removeSshKey, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey on Mutation$RemoveSshKey { + Mutation$RemoveSshKey copyWith( + {Mutation$RemoveSshKey$removeSshKey? removeSshKey, + String? $__typename}) => + Mutation$RemoveSshKey( + removeSshKey: removeSshKey == null ? this.removeSshKey : removeSshKey, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationRemoveSshKey = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'RemoveSshKey'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'sshInput')), + type: NamedTypeNode( + name: NameNode(value: 'SshMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'removeSshKey'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'sshInput'), + value: VariableNode(name: NameNode(value: 'sshInput'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + 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, +]); +Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey( + Map data) => + Mutation$RemoveSshKey.fromJson(data); +typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr Function( + dynamic, Mutation$RemoveSshKey?); + +class Options$Mutation$RemoveSshKey + extends graphql.MutationOptions { + Options$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$RemoveSshKey? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted( + data, + data == null + ? null + : _parserFn$Mutation$RemoveSshKey(data)), + update: update, + onError: onError, + document: documentNodeMutationRemoveSshKey, + parserFn: _parserFn$Mutation$RemoveSshKey); + + final OnMutationCompleted$Mutation$RemoveSshKey? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$RemoveSshKey + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$RemoveSshKey( + {String? operationName, + required Variables$Mutation$RemoveSshKey variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationRemoveSshKey, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$RemoveSshKey); +} + +extension ClientExtension$Mutation$RemoveSshKey on graphql.GraphQLClient { + Future> mutate$RemoveSshKey( + Options$Mutation$RemoveSshKey options) async => + await this.mutate(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}); + + @override + factory Mutation$RemoveSshKey$removeSshKey.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKeyFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$RemoveSshKey$removeSshKey$user? user; + + 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]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey + on Mutation$RemoveSshKey$removeSshKey { + Mutation$RemoveSshKey$removeSshKey copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$RemoveSshKey$removeSshKey$user? Function()? user}) => + Mutation$RemoveSshKey$removeSshKey( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$RemoveSshKey$removeSshKey$user { + Mutation$RemoveSshKey$removeSshKey$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$RemoveSshKey$removeSshKey$user.fromJson( + Map json) => + _$Mutation$RemoveSshKey$removeSshKey$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$RemoveSshKey$removeSshKey$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$RemoveSshKey$removeSshKey$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$RemoveSshKey$removeSshKey$user + on Mutation$RemoveSshKey$removeSshKey$user { + Mutation$RemoveSshKey$removeSshKey$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$RemoveSshKey$removeSshKey$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$DeleteUser { + Variables$Mutation$DeleteUser({required this.username}); + + @override + factory Variables$Mutation$DeleteUser.fromJson(Map json) => + _$Variables$Mutation$DeleteUserFromJson(json); + + final String username; + + Map toJson() => _$Variables$Mutation$DeleteUserToJson(this); + int get hashCode { + final l$username = username; + return Object.hashAll([l$username]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Mutation$DeleteUser copyWith({String? username}) => + Variables$Mutation$DeleteUser( + username: username == null ? this.username : username); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$DeleteUser { + Mutation$DeleteUser({required this.deleteUser, required this.$__typename}); + + @override + factory Mutation$DeleteUser.fromJson(Map json) => + _$Mutation$DeleteUserFromJson(json); + + final Mutation$DeleteUser$deleteUser deleteUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteUserToJson(this); + int get hashCode { + final l$deleteUser = deleteUser; + final l$$__typename = $__typename; + return Object.hashAll([l$deleteUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteUser on Mutation$DeleteUser { + Mutation$DeleteUser copyWith( + {Mutation$DeleteUser$deleteUser? deleteUser, String? $__typename}) => + Mutation$DeleteUser( + deleteUser: deleteUser == null ? this.deleteUser : deleteUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationDeleteUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'DeleteUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'username')), + type: + NamedTypeNode(name: NameNode(value: 'String'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'deleteUser'), + alias: null, + 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) + ])), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])), + fragmentDefinitionbasicMutationReturnFields, +]); +Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map data) => + Mutation$DeleteUser.fromJson(data); +typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr Function( + dynamic, Mutation$DeleteUser?); + +class Options$Mutation$DeleteUser + extends graphql.MutationOptions { + Options$Mutation$DeleteUser( + {String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$DeleteUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$DeleteUser(data)), + update: update, + onError: onError, + document: documentNodeMutationDeleteUser, + parserFn: _parserFn$Mutation$DeleteUser); + + final OnMutationCompleted$Mutation$DeleteUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$DeleteUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$DeleteUser( + {String? operationName, + required Variables$Mutation$DeleteUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationDeleteUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$DeleteUser); +} + +extension ClientExtension$Mutation$DeleteUser on graphql.GraphQLClient { + Future> mutate$DeleteUser( + Options$Mutation$DeleteUser options) async => + await this.mutate(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}); + + @override + factory Mutation$DeleteUser$deleteUser.fromJson(Map json) => + _$Mutation$DeleteUser$deleteUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$DeleteUser$deleteUserToJson(this); + int get hashCode { + final l$code = code; + final l$message = message; + final l$success = success; + final l$$__typename = $__typename; + return Object.hashAll([l$code, l$message, l$success, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$DeleteUser$deleteUser + on Mutation$DeleteUser$deleteUser { + Mutation$DeleteUser$deleteUser copyWith( + {int? code, String? message, bool? success, String? $__typename}) => + Mutation$DeleteUser$deleteUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +@JsonSerializable(explicitToJson: true) +class Variables$Mutation$UpdateUser { + Variables$Mutation$UpdateUser({required this.user}); + + @override + factory Variables$Mutation$UpdateUser.fromJson(Map json) => + _$Variables$Mutation$UpdateUserFromJson(json); + + final Input$UserMutationInput user; + + Map toJson() => _$Variables$Mutation$UpdateUserToJson(this); + int get hashCode { + final l$user = user; + return Object.hashAll([l$user]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + } + + Variables$Mutation$UpdateUser copyWith({Input$UserMutationInput? user}) => + Variables$Mutation$UpdateUser(user: user == null ? this.user : user); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UpdateUser { + Mutation$UpdateUser({required this.updateUser, required this.$__typename}); + + @override + factory Mutation$UpdateUser.fromJson(Map json) => + _$Mutation$UpdateUserFromJson(json); + + final Mutation$UpdateUser$updateUser updateUser; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => _$Mutation$UpdateUserToJson(this); + int get hashCode { + final l$updateUser = updateUser; + final l$$__typename = $__typename; + return Object.hashAll([l$updateUser, l$$__typename]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser on Mutation$UpdateUser { + Mutation$UpdateUser copyWith( + {Mutation$UpdateUser$updateUser? updateUser, String? $__typename}) => + Mutation$UpdateUser( + updateUser: updateUser == null ? this.updateUser : updateUser, + $__typename: $__typename == null ? this.$__typename : $__typename); +} + +const documentNodeMutationUpdateUser = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.mutation, + name: NameNode(value: 'UpdateUser'), + variableDefinitions: [ + VariableDefinitionNode( + variable: VariableNode(name: NameNode(value: 'user')), + type: NamedTypeNode( + name: NameNode(value: 'UserMutationInput'), isNonNull: true), + defaultValue: DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'updateUser'), + alias: null, + arguments: [ + ArgumentNode( + name: NameNode(value: 'user'), + value: VariableNode(name: NameNode(value: 'user'))) + ], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'basicMutationReturnFields'), + directives: []), + FieldNode( + name: NameNode(value: 'user'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'sshKeys'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'userType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + FieldNode( + name: NameNode(value: 'username'), + 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, +]); +Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map data) => + Mutation$UpdateUser.fromJson(data); +typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr Function( + dynamic, Mutation$UpdateUser?); + +class Options$Mutation$UpdateUser + extends graphql.MutationOptions { + Options$Mutation$UpdateUser( + {String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + OnMutationCompleted$Mutation$UpdateUser? onCompleted, + graphql.OnMutationUpdate? update, + graphql.OnError? onError}) + : onCompletedWithParsed = onCompleted, + super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + onCompleted: onCompleted == null + ? null + : (data) => onCompleted(data, + data == null ? null : _parserFn$Mutation$UpdateUser(data)), + update: update, + onError: onError, + document: documentNodeMutationUpdateUser, + parserFn: _parserFn$Mutation$UpdateUser); + + final OnMutationCompleted$Mutation$UpdateUser? onCompletedWithParsed; + + @override + List get properties => [ + ...super.onCompleted == null + ? super.properties + : super.properties.where((property) => property != onCompleted), + onCompletedWithParsed + ]; +} + +class WatchOptions$Mutation$UpdateUser + extends graphql.WatchQueryOptions { + WatchOptions$Mutation$UpdateUser( + {String? operationName, + required Variables$Mutation$UpdateUser variables, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false}) + : super( + variables: variables.toJson(), + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult, + context: context, + document: documentNodeMutationUpdateUser, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Mutation$UpdateUser); +} + +extension ClientExtension$Mutation$UpdateUser on graphql.GraphQLClient { + Future> mutate$UpdateUser( + Options$Mutation$UpdateUser options) async => + await this.mutate(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}); + + @override + factory Mutation$UpdateUser$updateUser.fromJson(Map json) => + _$Mutation$UpdateUser$updateUserFromJson(json); + + final int code; + + final String message; + + final bool success; + + @JsonKey(name: '__typename') + final String $__typename; + + final Mutation$UpdateUser$updateUser$user? user; + + Map toJson() => _$Mutation$UpdateUser$updateUserToJson(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]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + 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; + final l$message = message; + final lOther$message = other.message; + if (l$message != lOther$message) return false; + final l$success = success; + final lOther$success = other.success; + if (l$success != lOther$success) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + final l$user = user; + final lOther$user = other.user; + if (l$user != lOther$user) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser$updateUser + on Mutation$UpdateUser$updateUser { + Mutation$UpdateUser$updateUser copyWith( + {int? code, + String? message, + bool? success, + String? $__typename, + Mutation$UpdateUser$updateUser$user? Function()? user}) => + Mutation$UpdateUser$updateUser( + code: code == null ? this.code : code, + message: message == null ? this.message : message, + success: success == null ? this.success : success, + $__typename: $__typename == null ? this.$__typename : $__typename, + user: user == null ? this.user : user()); +} + +@JsonSerializable(explicitToJson: true) +class Mutation$UpdateUser$updateUser$user { + Mutation$UpdateUser$updateUser$user( + {required this.sshKeys, + required this.userType, + required this.username, + required this.$__typename}); + + @override + factory Mutation$UpdateUser$updateUser$user.fromJson( + Map json) => + _$Mutation$UpdateUser$updateUser$userFromJson(json); + + final List sshKeys; + + @JsonKey(unknownEnumValue: Enum$UserType.$unknown) + final Enum$UserType userType; + + final String username; + + @JsonKey(name: '__typename') + final String $__typename; + + Map toJson() => + _$Mutation$UpdateUser$updateUser$userToJson(this); + int get hashCode { + final l$sshKeys = sshKeys; + final l$userType = userType; + final l$username = username; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$sshKeys.map((v) => v)), + l$userType, + l$username, + l$$__typename + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + if (!(other is Mutation$UpdateUser$updateUser$user) || + runtimeType != other.runtimeType) return false; + final l$sshKeys = sshKeys; + final lOther$sshKeys = other.sshKeys; + if (l$sshKeys.length != lOther$sshKeys.length) return false; + for (int i = 0; i < l$sshKeys.length; i++) { + final l$sshKeys$entry = l$sshKeys[i]; + final lOther$sshKeys$entry = lOther$sshKeys[i]; + if (l$sshKeys$entry != lOther$sshKeys$entry) return false; + } + + final l$userType = userType; + final lOther$userType = other.userType; + if (l$userType != lOther$userType) return false; + final l$username = username; + final lOther$username = other.username; + if (l$username != lOther$username) return false; + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) return false; + return true; + } +} + +extension UtilityExtension$Mutation$UpdateUser$updateUser$user + on Mutation$UpdateUser$updateUser$user { + Mutation$UpdateUser$updateUser$user copyWith( + {List? sshKeys, + Enum$UserType? userType, + String? username, + String? $__typename}) => + Mutation$UpdateUser$updateUser$user( + sshKeys: sshKeys == null ? this.sshKeys : sshKeys, + userType: userType == null ? this.userType : userType, + username: username == null ? this.username : username, + $__typename: $__typename == null ? this.$__typename : $__typename); +} 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 new file mode 100644 index 00000000..411cbfad --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.g.dart @@ -0,0 +1,471 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'users.graphql.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +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) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + }; + +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) => + { + 'user': instance.user.toJson(), + }; + +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) => + { + 'createUser': instance.createUser.toJson(), + '__typename': instance.$__typename, + }; + +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 + : Mutation$CreateUser$createUser$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$CreateUser$createUserToJson( + Mutation$CreateUser$createUser instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$CreateUser$createUser$user + _$Mutation$CreateUser$createUser$userFromJson(Map json) => + Mutation$CreateUser$createUser$user( + 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(), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$CreateUser$createUser$userToJson( + Mutation$CreateUser$createUser$user instance) => + { + 'username': instance.username, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'sshKeys': instance.sshKeys, + '__typename': instance.$__typename, + }; + +const _$Enum$UserTypeEnumMap = { + Enum$UserType.NORMAL: 'NORMAL', + Enum$UserType.PRIMARY: 'PRIMARY', + Enum$UserType.ROOT: 'ROOT', + Enum$UserType.$unknown: r'$unknown', +}; + +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) => + { + '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) => + Query$AllUsers$users$allUsers.fromJson(e as Map)) + .toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsers$usersToJson( + Query$AllUsers$users instance) => + { + 'allUsers': instance.allUsers.map((e) => e.toJson()).toList(), + '__typename': instance.$__typename, + }; + +Query$AllUsers$users$allUsers _$Query$AllUsers$users$allUsersFromJson( + Map json) => + Query$AllUsers$users$allUsers( + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + $__typename: json['__typename'] as String, + ); + +Map _$Query$AllUsers$users$allUsersToJson( + Query$AllUsers$users$allUsers instance) => + { + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + 'sshKeys': instance.sshKeys, + '__typename': instance.$__typename, + }; + +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) => + { + 'sshInput': instance.sshInput.toJson(), + }; + +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) => + { + 'addSshKey': instance.addSshKey.toJson(), + '__typename': instance.$__typename, + }; + +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 + : Mutation$AddSshKey$addSshKey$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$AddSshKey$addSshKeyToJson( + Mutation$AddSshKey$addSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$AddSshKey$addSshKey$user _$Mutation$AddSshKey$addSshKey$userFromJson( + Map json) => + Mutation$AddSshKey$addSshKey$user( + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$AddSshKey$addSshKey$userToJson( + Mutation$AddSshKey$addSshKey$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +Variables$Query$GetUser _$Variables$Query$GetUserFromJson( + Map json) => + Variables$Query$GetUser( + username: json['username'] as String, + ); + +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), + $__typename: json['__typename'] as String, + ); + +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 + : Query$GetUser$users$getUser.fromJson( + json['getUser'] as Map), + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUser$usersToJson( + Query$GetUser$users instance) => + { + 'getUser': instance.getUser?.toJson(), + '__typename': instance.$__typename, + }; + +Query$GetUser$users$getUser _$Query$GetUser$users$getUserFromJson( + Map json) => + Query$GetUser$users$getUser( + sshKeys: + (json['sshKeys'] as List).map((e) => e as String).toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Query$GetUser$users$getUserToJson( + Query$GetUser$users$getUser instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +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) => + { + 'sshInput': instance.sshInput.toJson(), + }; + +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) => + { + 'removeSshKey': instance.removeSshKey.toJson(), + '__typename': instance.$__typename, + }; + +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 + : Mutation$RemoveSshKey$removeSshKey$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$RemoveSshKey$removeSshKeyToJson( + Mutation$RemoveSshKey$removeSshKey instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$RemoveSshKey$removeSshKey$user + _$Mutation$RemoveSshKey$removeSshKey$userFromJson( + Map json) => + Mutation$RemoveSshKey$removeSshKey$user( + sshKeys: (json['sshKeys'] as List) + .map((e) => e as String) + .toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$RemoveSshKey$removeSshKey$userToJson( + Mutation$RemoveSshKey$removeSshKey$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; + +Variables$Mutation$DeleteUser _$Variables$Mutation$DeleteUserFromJson( + Map json) => + Variables$Mutation$DeleteUser( + username: json['username'] as String, + ); + +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), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$DeleteUserToJson( + Mutation$DeleteUser instance) => + { + 'deleteUser': instance.deleteUser.toJson(), + '__typename': instance.$__typename, + }; + +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) => + { + '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), + ); + +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), + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UpdateUserToJson( + Mutation$UpdateUser instance) => + { + 'updateUser': instance.updateUser.toJson(), + '__typename': instance.$__typename, + }; + +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 + : Mutation$UpdateUser$updateUser$user.fromJson( + json['user'] as Map), + ); + +Map _$Mutation$UpdateUser$updateUserToJson( + Mutation$UpdateUser$updateUser instance) => + { + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + '__typename': instance.$__typename, + 'user': instance.user?.toJson(), + }; + +Mutation$UpdateUser$updateUser$user + _$Mutation$UpdateUser$updateUser$userFromJson(Map json) => + Mutation$UpdateUser$updateUser$user( + sshKeys: (json['sshKeys'] as List) + .map((e) => e as String) + .toList(), + userType: $enumDecode(_$Enum$UserTypeEnumMap, json['userType'], + unknownValue: Enum$UserType.$unknown), + username: json['username'] as String, + $__typename: json['__typename'] as String, + ); + +Map _$Mutation$UpdateUser$updateUser$userToJson( + Mutation$UpdateUser$updateUser$user instance) => + { + 'sshKeys': instance.sshKeys, + 'userType': _$Enum$UserTypeEnumMap[instance.userType], + 'username': instance.username, + '__typename': instance.$__typename, + }; diff --git a/lib/logic/api_maps/rest_maps/server.dart b/lib/logic/api_maps/rest_maps/server.dart index b16d46d3..17c1cbb2 100644 --- a/lib/logic/api_maps/rest_maps/server.dart +++ b/lib/logic/api_maps/rest_maps/server.dart @@ -105,8 +105,8 @@ class ServerApi extends ApiMap { try { response = await client.get('/services/status'); res = response.statusCode == HttpStatus.ok; - } on DioError catch (e) { - print(e.message); + } catch (e) { + print(e); } finally { close(client); } diff --git a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart index c28bfa5f..088f82d5 100644 --- a/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart +++ b/lib/logic/api_maps/rest_maps/server_providers/hetzner/hetzner.dart @@ -81,11 +81,11 @@ class HetznerApi extends ServerProviderApi with VolumeProviderApi { final Response dbGetResponse; final Dio client = await getClient(); try { - dbGetResponse = await client.post('/pricing'); + dbGetResponse = await client.get('/pricing'); final volume = dbGetResponse.data['pricing']['volume']; final volumePrice = volume['price_per_gb_month']['gross']; - price = volumePrice as double; + price = double.parse(volumePrice); } catch (e) { print(e); } finally { diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index 8485621f..486770c0 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -1,11 +1,14 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/logic/api_maps/rest_maps/server.dart'; +import 'package:selfprivacy/logic/api_maps/graphql_maps/schema/server.dart'; import 'package:selfprivacy/logic/cubit/services/services_cubit.dart'; import 'package:selfprivacy/logic/cubit/users/users_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; +import 'package:selfprivacy/logic/models/json/server_job.dart'; export 'package:provider/provider.dart'; @@ -15,20 +18,21 @@ class JobsCubit extends Cubit { JobsCubit({ required this.usersCubit, required this.servicesCubit, - }) : super(JobsStateEmpty()); + }) : super(const JobsStateEmpty([])); final ServerApi api = ServerApi(); final UsersCubit usersCubit; final ServicesCubit servicesCubit; - void addJob(final Job job) { - final List newJobsList = []; + void addJob(final ClientJob job) { + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + final JobsStateWithJobs jobsState = state as JobsStateWithJobs; + newJobsList.addAll(jobsState.clientJobList); } newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } void removeJob(final String id) { @@ -37,51 +41,51 @@ class JobsCubit extends Cubit { } void createOrRemoveServiceToggleJob(final ToggleJob job) { - final List newJobsList = []; + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + newJobsList.addAll((state as JobsStateWithJobs).clientJobList); } final bool needToRemoveJob = newJobsList .any((final el) => el is ServiceToggleJob && el.type == job.type); if (needToRemoveJob) { - final Job removingJob = newJobsList.firstWhere( + final ClientJob removingJob = newJobsList.firstWhere( (final el) => el is ServiceToggleJob && el.type == job.type, ); removeJob(removingJob.id); } else { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } } void createShhJobIfNotExist(final CreateSSHKeyJob job) { - final List newJobsList = []; + final List newJobsList = []; if (state is JobsStateWithJobs) { - newJobsList.addAll((state as JobsStateWithJobs).jobList); + newJobsList.addAll((state as JobsStateWithJobs).clientJobList); } final bool isExistInJobList = newJobsList.any((final el) => el is CreateSSHKeyJob); if (!isExistInJobList) { newJobsList.add(job); getIt().showSnackBar('jobs.jobAdded'.tr()); - emit(JobsStateWithJobs(newJobsList)); + emit(JobsStateWithJobs(newJobsList, state.serverJobList)); } } Future rebootServer() async { - emit(JobsStateLoading()); + emit(JobsStateLoading(state.serverJobList)); final bool isSuccessful = await api.reboot(); if (isSuccessful) { getIt().showSnackBar('jobs.rebootSuccess'.tr()); } else { getIt().showSnackBar('jobs.rebootFailed'.tr()); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } Future upgradeServer() async { - emit(JobsStateLoading()); + emit(JobsStateLoading(state.serverJobList)); final bool isPullSuccessful = await api.pullConfigurationUpdate(); final bool isSuccessful = await api.upgrade(); if (isSuccessful) { @@ -93,15 +97,15 @@ class JobsCubit extends Cubit { } else { getIt().showSnackBar('jobs.upgradeFailed'.tr()); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } Future applyAll() async { if (state is JobsStateWithJobs) { - final List jobs = (state as JobsStateWithJobs).jobList; - emit(JobsStateLoading()); + final List jobs = (state as JobsStateWithJobs).clientJobList; + emit(JobsStateLoading(state.serverJobList)); bool hasServiceJobs = false; - for (final Job job in jobs) { + for (final ClientJob job in jobs) { if (job is CreateUserJob) { await usersCubit.createUser(job.user); } @@ -122,11 +126,45 @@ class JobsCubit extends Cubit { await api.pullConfigurationUpdate(); await api.apply(); + if (hasServiceJobs) { await servicesCubit.load(); } - emit(JobsStateEmpty()); + emit(JobsStateEmpty(state.serverJobList)); } } + + Future resetRequestsTimer() async { + const duration = Duration(seconds: 1); + Timer.periodic( + duration, + (final timer) async { + if (timer.tick >= 10) { + final List serverJobs = await api.getServerJobs(); + final List newServerJobs = []; + for (final ServerJob job in serverJobs) { + if (job.status == 'FINISHED') { + await api.removeApiJob(job.uid); + } else { + newServerJobs.add(job); + } + } + + if (state is JobsStateWithJobs) { + emit( + JobsStateWithJobs( + (state as JobsStateWithJobs).clientJobList, + newServerJobs, + ), + ); + } else { + emit( + JobsStateEmpty(newServerJobs), + ); + } + } + }, + ); + } } diff --git a/lib/logic/cubit/jobs/jobs_state.dart b/lib/logic/cubit/jobs/jobs_state.dart index dbcf968e..3737cb5d 100644 --- a/lib/logic/cubit/jobs/jobs_state.dart +++ b/lib/logic/cubit/jobs/jobs_state.dart @@ -1,28 +1,34 @@ part of 'jobs_cubit.dart'; abstract class JobsState extends Equatable { + const JobsState(this.serverJobList); + final List serverJobList; @override - List get props => []; + List get props => [serverJobList]; } -class JobsStateLoading extends JobsState {} +class JobsStateLoading extends JobsState { + const JobsStateLoading(super.serverJobList); +} -class JobsStateEmpty extends JobsState {} +class JobsStateEmpty extends JobsState { + const JobsStateEmpty(super.serverJobList); +} class JobsStateWithJobs extends JobsState { - JobsStateWithJobs(this.jobList); - final List jobList; + const JobsStateWithJobs(this.clientJobList, super.serverJobList); + final List clientJobList; JobsState removeById(final String id) { - final List newJobsList = - jobList.where((final element) => element.id != id).toList(); + final List newJobsList = + clientJobList.where((final element) => element.id != id).toList(); if (newJobsList.isEmpty) { - return JobsStateEmpty(); + return JobsStateEmpty(serverJobList); } - return JobsStateWithJobs(newJobsList); + return JobsStateWithJobs(newJobsList, serverJobList); } @override - List get props => jobList; + List get props => [...super.props, clientJobList]; } diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index e19b61ff..cbf9ec61 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -292,6 +292,43 @@ class ServerInstallationRepository { ], ), ); + } else if (e.response!.data['error']['code'] == 'resource_unavailable') { + final NavigationService nav = getIt.get(); + nav.showPopUpDialog( + BrandAlert( + title: 'modals.1_1'.tr(), + contentText: 'modals.2_2'.tr(), + actions: [ + ActionButton( + text: 'modals.7'.tr(), + isRed: true, + onPressed: () async { + ServerHostingDetails? serverDetails; + try { + serverDetails = await api.createServer( + dnsApiToken: cloudFlareKey, + rootUser: rootUser, + domainName: domainName, + ); + } catch (e) { + print(e); + } + + if (serverDetails == null) { + print('Server is not initialized!'); + return; + } + await saveServerDetails(serverDetails); + onSuccess(serverDetails); + }, + ), + ActionButton( + text: 'basis.cancel'.tr(), + onPressed: onCancel, + ), + ], + ), + ); } } } diff --git a/lib/logic/cubit/volumes/volumes_cubit.dart b/lib/logic/cubit/volumes/volumes_cubit.dart index c4f74df5..c6c522a9 100644 --- a/lib/logic/cubit/volumes/volumes_cubit.dart +++ b/lib/logic/cubit/volumes/volumes_cubit.dart @@ -12,12 +12,16 @@ part 'volumes_state.dart'; class ApiVolumesCubit extends ServerInstallationDependendCubit { ApiVolumesCubit(final ServerInstallationCubit serverInstallationCubit) - : super(serverInstallationCubit, const ApiVolumesState.initial()); + : super(serverInstallationCubit, const ApiVolumesState.initial()) { + final serverDetails = getIt().serverDetails; + providerApi = serverDetails == null + ? null + : VolumeApiFactoryCreator.createVolumeProviderApiFactory( + getIt().serverDetails!.provider, + ); + } - final VolumeProviderApiFactory providerApi = - VolumeApiFactoryCreator.createVolumeProviderApiFactory( - getIt().serverDetails!.provider, - ); + VolumeProviderApiFactory? providerApi; @override Future load() async { @@ -26,8 +30,16 @@ class ApiVolumesCubit } } + Future> getVolumes() async { + if (providerApi == null) { + return []; + } + + return providerApi!.getVolumeProvider().getVolumes(); + } + Future getPricePerGb() async => - providerApi.getVolumeProvider().getPricePerGb(); + providerApi!.getVolumeProvider().getPricePerGb(); Future refresh() async { emit(const ApiVolumesState([], LoadingStatus.refreshing)); @@ -35,8 +47,7 @@ class ApiVolumesCubit } Future _refetch() async { - final List volumes = - await providerApi.getVolumeProvider().getVolumes(); + final List volumes = await getVolumes(); if (volumes.isNotEmpty) { emit(ApiVolumesState(volumes, LoadingStatus.success)); } else { @@ -46,12 +57,12 @@ class ApiVolumesCubit Future attachVolume(final ServerVolume volume) async { final ServerHostingDetails server = getIt().serverDetails!; - await providerApi.getVolumeProvider().attachVolume(volume.id, server.id); + await providerApi!.getVolumeProvider().attachVolume(volume.id, server.id); refresh(); } Future detachVolume(final ServerVolume volume) async { - await providerApi.getVolumeProvider().detachVolume(volume.id); + await providerApi!.getVolumeProvider().detachVolume(volume.id); refresh(); } @@ -60,7 +71,7 @@ class ApiVolumesCubit final int newSizeGb, ) async { final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - final bool resized = await providerApi.getVolumeProvider().resizeVolume( + final bool resized = await providerApi!.getVolumeProvider().resizeVolume( providerVolume!.id, newSizeGb, ); @@ -76,7 +87,7 @@ class ApiVolumesCubit Future createVolume() async { final ServerVolume? volume = - await providerApi.getVolumeProvider().createVolume(); + await providerApi!.getVolumeProvider().createVolume(); await attachVolume(volume!); await Future.delayed(const Duration(seconds: 10)); @@ -88,7 +99,7 @@ class ApiVolumesCubit Future deleteVolume(final ServerDiskVolume volume) async { final ServerVolume? providerVolume = await fetchProdiverVolume(volume); - await providerApi.getVolumeProvider().deleteVolume(providerVolume!.id); + await providerApi!.getVolumeProvider().deleteVolume(providerVolume!.id); refresh(); } @@ -102,7 +113,7 @@ class ApiVolumesCubit ) async { ServerVolume? fetchedVolume; final List volumes = - await providerApi.getVolumeProvider().getVolumes(); + await providerApi!.getVolumeProvider().getVolumes(); for (final ServerVolume providerVolume in volumes) { if (providerVolume.linuxDevice == null) { diff --git a/lib/logic/models/disk_size.dart b/lib/logic/models/disk_size.dart new file mode 100644 index 00000000..a8d7a28d --- /dev/null +++ b/lib/logic/models/disk_size.dart @@ -0,0 +1,9 @@ +class DiskSize { + DiskSize({final this.byte = 0}); + + double asKb() => byte / 1000.0; + double asMb() => byte / 1000000.0; + double asGb() => byte / 1000000000.0; + + int byte; +} diff --git a/lib/logic/models/job.dart b/lib/logic/models/job.dart index b04d7d05..9e694597 100644 --- a/lib/logic/models/job.dart +++ b/lib/logic/models/job.dart @@ -7,8 +7,8 @@ import 'package:selfprivacy/utils/password_generator.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; @immutable -class Job extends Equatable { - Job({ +class ClientJob extends Equatable { + ClientJob({ required this.title, final String? id, }) : id = id ?? StringGenerators.simpleId(); @@ -20,7 +20,7 @@ class Job extends Equatable { List get props => [id, title]; } -class CreateUserJob extends Job { +class CreateUserJob extends ClientJob { CreateUserJob({ required this.user, }) : super(title: '${"jobs.createUser".tr()} ${user.login}'); @@ -31,7 +31,7 @@ class CreateUserJob extends Job { List get props => [id, title, user]; } -class DeleteUserJob extends Job { +class DeleteUserJob extends ClientJob { DeleteUserJob({ required this.user, }) : super(title: '${"jobs.deleteUser".tr()} ${user.login}'); @@ -42,7 +42,7 @@ class DeleteUserJob extends Job { List get props => [id, title, user]; } -class ToggleJob extends Job { +class ToggleJob extends ClientJob { ToggleJob({ required this.type, required final super.title, @@ -66,7 +66,7 @@ class ServiceToggleJob extends ToggleJob { final bool needToTurnOn; } -class CreateSSHKeyJob extends Job { +class CreateSSHKeyJob extends ClientJob { CreateSSHKeyJob({ required this.user, required this.publicKey, @@ -79,7 +79,7 @@ class CreateSSHKeyJob extends Job { List get props => [id, title, user, publicKey]; } -class DeleteSSHKeyJob extends Job { +class DeleteSSHKeyJob extends ClientJob { DeleteSSHKeyJob({ required this.user, required this.publicKey, diff --git a/lib/logic/models/json/backup.g.dart b/lib/logic/models/json/backup.g.dart index dea4847d..eff513f0 100644 --- a/lib/logic/models/json/backup.g.dart +++ b/lib/logic/models/json/backup.g.dart @@ -24,7 +24,7 @@ BackupStatus _$BackupStatusFromJson(Map json) => BackupStatus( Map _$BackupStatusToJson(BackupStatus instance) => { - 'status': _$BackupStatusEnumEnumMap[instance.status]!, + 'status': _$BackupStatusEnumEnumMap[instance.status], 'progress': instance.progress, 'error_message': instance.errorMessage, }; diff --git a/lib/logic/models/json/hetzner_server_info.g.dart b/lib/logic/models/json/hetzner_server_info.g.dart index 6c178ea4..7d6ecd29 100644 --- a/lib/logic/models/json/hetzner_server_info.g.dart +++ b/lib/logic/models/json/hetzner_server_info.g.dart @@ -23,7 +23,7 @@ Map _$HetznerServerInfoToJson(HetznerServerInfo instance) => { 'id': instance.id, 'name': instance.name, - 'status': _$ServerStatusEnumMap[instance.status]!, + 'status': _$ServerStatusEnumMap[instance.status], 'created': instance.created.toIso8601String(), 'volumes': instance.volumes, 'server_type': instance.serverType, diff --git a/lib/logic/models/json/server_job.dart b/lib/logic/models/json/server_job.dart new file mode 100644 index 00000000..0a6454c1 --- /dev/null +++ b/lib/logic/models/json/server_job.dart @@ -0,0 +1,39 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'server_job.g.dart'; + +@JsonSerializable() +class ServerJob { + factory ServerJob.fromJson(final Map json) => + _$ServerJobFromJson(json); + ServerJob({ + required this.name, + required this.description, + required this.status, + required this.uid, + required this.updatedAt, + required this.createdAt, + final this.error, + final this.progress, + final this.result, + final this.statusText, + final this.finishedAt, + }); + + final String name; + final String description; + final String status; + final String uid; + @JsonKey(name: 'updated_at') + final String updatedAt; + @JsonKey(name: 'created_at') + final DateTime createdAt; + + final String? error; + final int? progress; + final String? result; + @JsonKey(name: 'status_text') + final String? statusText; + @JsonKey(name: 'finished_at') + final String? finishedAt; +} diff --git a/lib/logic/models/json/server_job.g.dart b/lib/logic/models/json/server_job.g.dart new file mode 100644 index 00000000..2af5358a --- /dev/null +++ b/lib/logic/models/json/server_job.g.dart @@ -0,0 +1,35 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'server_job.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ServerJob _$ServerJobFromJson(Map json) => ServerJob( + name: json['name'] as String, + description: json['description'] as String, + status: json['status'] as String, + uid: json['uid'] as String, + updatedAt: json['updated_at'] as String, + createdAt: DateTime.parse(json['created_at'] as String), + error: json['error'] as String?, + progress: json['progress'] as int?, + result: json['result'] as String?, + statusText: json['status_text'] as String?, + finishedAt: json['finished_at'] as String?, + ); + +Map _$ServerJobToJson(ServerJob instance) => { + 'name': instance.name, + 'description': instance.description, + 'status': instance.status, + 'uid': instance.uid, + 'updated_at': instance.updatedAt, + 'created_at': instance.createdAt.toIso8601String(), + 'error': instance.error, + 'progress': instance.progress, + 'result': instance.result, + 'status_text': instance.statusText, + 'finished_at': instance.finishedAt, + }; diff --git a/lib/ui/components/brand_button/outlined_button.dart b/lib/ui/components/brand_button/outlined_button.dart new file mode 100644 index 00000000..6284943a --- /dev/null +++ b/lib/ui/components/brand_button/outlined_button.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class BrandOutlinedButton extends StatelessWidget { + const BrandOutlinedButton({ + final super.key, + this.onPressed, + this.title, + this.child, + this.disabled = false, + }); + + final VoidCallback? onPressed; + final String? title; + final Widget? child; + final bool disabled; + + @override + Widget build(final BuildContext context) => ConstrainedBox( + constraints: const BoxConstraints( + minHeight: 40, + minWidth: double.infinity, + ), + child: OutlinedButton( + onPressed: onPressed, + child: child ?? + Text( + title ?? '', + style: Theme.of(context).textTheme.button?.copyWith( + color: Theme.of(context).colorScheme.primary, + ), + ), + ), + ); +} diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/components/jobs_content/jobs_content.dart index bd8166de..b4cf3a89 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/components/jobs_content/jobs_content.dart @@ -67,7 +67,7 @@ class JobsContent extends StatelessWidget { ]; } else if (state is JobsStateWithJobs) { widgets = [ - ...state.jobList + ...state.clientJobList .map( (final j) => Row( children: [ diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/components/progress_bar/progress_bar.dart index 4de729f7..36c6d029 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/components/progress_bar/progress_bar.dart @@ -83,10 +83,14 @@ class _ProgressBarState extends State { height: 5, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), - gradient: const LinearGradient( + color: Theme.of(context).colorScheme.surfaceVariant, + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - colors: BrandColors.stableGradientColors, + colors: [ + Theme.of(context).colorScheme.primary, + Theme.of(context).colorScheme.secondary + ], ), ), duration: const Duration( @@ -122,15 +126,7 @@ class _ProgressBarState extends State { text: TextSpan( style: progressTextStyleLight, children: [ - if (checked) - const WidgetSpan( - child: Padding( - padding: EdgeInsets.only(bottom: 2, right: 2), - child: Icon(BrandIcons.check, size: 11), - ), - ) - else - TextSpan(text: '${index + 1}.', style: style), + TextSpan(text: '${index + 1}.', style: style), TextSpan(text: step, style: style) ], ), diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index fa231c45..4e99fab5 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -5,6 +5,9 @@ import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; +import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/logic/models/provider.dart'; import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart'; @@ -18,6 +21,7 @@ import 'package:selfprivacy/ui/pages/backup_details/backup_details.dart'; import 'package:selfprivacy/ui/pages/dns_details/dns_details.dart'; import 'package:selfprivacy/ui/pages/providers/storage_card.dart'; import 'package:selfprivacy/ui/pages/server_details/server_details_screen.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; GlobalKey navigatorKey = GlobalKey(); @@ -73,15 +77,21 @@ class _ProvidersPageState extends State { Padding( padding: const EdgeInsets.only(bottom: 30), child: FutureBuilder( - future: - context.read().getServerDiskVolumes(), + future: Future.wait([ + context.read().getServerDiskVolumes(), + context.read().getVolumes(), + ]), builder: ( final BuildContext context, - final AsyncSnapshot snapshot, + final AsyncSnapshot> snapshot, ) => StorageCard( - volumes: - snapshot.hasData ? snapshot.data as List : [], + diskStatus: snapshot.hasData + ? toDiskStatus( + snapshot.data![0] as List, + snapshot.data![1] as List, + ) + : DiskStatus(), ), ), ), @@ -105,6 +115,60 @@ class _ProvidersPageState extends State { ), ); } + + DiskStatus toDiskStatus( + final List serverVolumes, + final List providerVolumes, + ) { + final DiskStatus diskStatus = DiskStatus(); + diskStatus.isDiskOkay = true; + + if (providerVolumes.isEmpty || serverVolumes.isEmpty) { + diskStatus.isDiskOkay = false; + } + + diskStatus.diskVolumes = serverVolumes.map(( + final ServerDiskVolume volume, + ) { + final DiskVolume diskVolume = DiskVolume(); + diskVolume.sizeUsed = DiskSize( + byte: volume.usedSpace == 'None' ? 0 : int.parse(volume.usedSpace), + ); + diskVolume.sizeTotal = DiskSize( + byte: volume.totalSpace == 'None' ? 0 : int.parse(volume.totalSpace), + ); + diskVolume.serverDiskVolume = volume; + + for (final ServerVolume providerVolume in providerVolumes) { + if (providerVolume.linuxDevice == null || + volume.model == null || + volume.serial == null) { + continue; + } + + final String deviceId = providerVolume.linuxDevice!.split('/').last; + if (deviceId.contains(volume.model!) && + deviceId.contains(volume.serial!)) { + diskVolume.providerVolume = providerVolume; + break; + } + } + + diskVolume.name = volume.name; + diskVolume.root = volume.root; + diskVolume.percentage = + volume.usedSpace != 'None' && volume.totalSpace != 'None' + ? 1.0 / diskVolume.sizeTotal.byte * diskVolume.sizeUsed.byte + : 0.0; + if (diskVolume.percentage >= 0.8 || + diskVolume.sizeTotal.asGb() - diskVolume.sizeUsed.asGb() <= 2.0) { + diskStatus.isDiskOkay = false; + } + return diskVolume; + }).toList(); + + return diskStatus; + } } class _Card extends StatelessWidget { @@ -137,8 +201,9 @@ class _Card extends StatelessWidget { break; case ProviderType.domain: title = 'providers.domain.screen_title'.tr(); - message = - appConfig.isDomainFilled ? appConfig.serverDomain!.domainName : ''; + message = appConfig.isDomainSelected + ? appConfig.serverDomain!.domainName + : ''; stableText = 'providers.domain.status'.tr(); onTap = () => Navigator.of(context).push( @@ -168,12 +233,17 @@ class _Card extends StatelessWidget { status: provider.state, child: Icon(provider.icon, size: 30, color: Colors.white), ), - const SizedBox(height: 10), - BrandText.h2(title), - const SizedBox(height: 10), + const SizedBox(height: 16), + Text( + title, + style: Theme.of(context).textTheme.titleLarge, + ), if (message != null) ...[ - BrandText.body2(message), - const SizedBox(height: 10), + Text( + message, + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 16), ], if (provider.state == StateType.stable) BrandText.body2(stableText), ], diff --git a/lib/ui/pages/providers/storage_card.dart b/lib/ui/pages/providers/storage_card.dart index 74e0770f..f2facd21 100644 --- a/lib/ui/pages/providers/storage_card.dart +++ b/lib/ui/pages/providers/storage_card.dart @@ -1,67 +1,47 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/providers/providers_cubit.dart'; -import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/server_storage.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class StorageCard extends StatelessWidget { - const StorageCard({required this.volumes, final super.key}); + const StorageCard({ + required final this.diskStatus, + final super.key, + }); - final List volumes; + final DiskStatus diskStatus; @override Widget build(final BuildContext context) { - final DiskStatus diskStatus = toDiskStatus(volumes); - final List sections = []; for (final DiskVolume volume in diskStatus.diskVolumes) { sections.add( const SizedBox(height: 16), ); sections.add( - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - ); - sections.add( - const SizedBox(height: 4), - ); - sections.add( - BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ); - sections.add( - const SizedBox(height: 4), - ); - sections.add( - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, + ServerStorageListItem( + volume: volume, + dense: true, + showIcon: false, ), ); } + StateType state = context.watch().state + is ServerInstallationFinished + ? StateType.stable + : StateType.uninitialized; + + if (state == StateType.stable && !diskStatus.isDiskOkay) { + state = StateType.error; + } + return GestureDetector( onTap: () => Navigator.of(context).push( materialRoute( @@ -77,24 +57,25 @@ class StorageCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - const IconStatusMask( - status: StateType.stable, - child: Icon( + IconStatusMask( + status: state, + child: const Icon( Icons.storage_outlined, size: 30, color: Colors.white, ), ), - IconStatusMask( - status: StateType.stable, - child: Icon( - diskStatus.isDiskOkay - ? Icons.check_circle_outline - : Icons.error_outline, - size: 24, - color: Colors.white, + if (state != StateType.uninitialized) + IconStatusMask( + status: state, + child: Icon( + diskStatus.isDiskOkay + ? Icons.check_circle_outline + : Icons.error_outline, + size: 24, + color: Colors.white, + ), ), - ), ], ), const SizedBox(height: 16), @@ -102,12 +83,13 @@ class StorageCard extends StatelessWidget { 'providers.storage.card_title'.tr(), style: Theme.of(context).textTheme.titleLarge, ), - Text( - diskStatus.isDiskOkay - ? 'providers.storage.status_ok'.tr() - : 'providers.storage.status_error'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), + if (state != StateType.uninitialized) + Text( + diskStatus.isDiskOkay + ? 'providers.storage.status_ok'.tr() + : 'providers.storage.status_error'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), ...sections, const SizedBox(height: 8), ], @@ -115,34 +97,4 @@ class StorageCard extends StatelessWidget { ), ); } - - DiskStatus toDiskStatus(final List status) { - final DiskStatus diskStatus = DiskStatus(); - diskStatus.isDiskOkay = true; - - diskStatus.diskVolumes = status.map(( - final ServerDiskVolume volume, - ) { - final DiskVolume diskVolume = DiskVolume(); - diskVolume.gbUsed = volume.usedSpace == 'None' - ? 0 - : int.parse(volume.usedSpace) ~/ 1000000000; - diskVolume.gbTotal = volume.totalSpace == 'None' - ? 0 - : int.parse(volume.totalSpace) ~/ 1000000000; - diskVolume.name = volume.name; - diskVolume.root = volume.root; - diskVolume.percentage = - volume.usedSpace != 'None' && volume.totalSpace != 'None' - ? 1.0 / int.parse(volume.totalSpace) * int.parse(volume.usedSpace) - : 0.0; - if (diskVolume.percentage >= 0.8 || - diskVolume.gbTotal - diskVolume.gbUsed <= 2) { - diskStatus.isDiskOkay = false; - } - return diskVolume; - }).toList(); - - return diskStatus; - } } diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 8523ce1d..b8fc158f 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -1,134 +1,46 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; -import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; -import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; -class ServerStoragePage extends StatefulWidget { - const ServerStoragePage({required this.diskStatus, final super.key}); +class DataMigrationPage extends StatefulWidget { + const DataMigrationPage({ + required this.diskVolumeToResize, + required this.diskStatus, + required this.resizeTarget, + final super.key, + }); + final DiskVolume diskVolumeToResize; final DiskStatus diskStatus; + final DiskSize resizeTarget; @override - State createState() => _ServerStoragePageState(); + State createState() => _DataMigrationPageState(); } -class _ServerStoragePageState extends State { - List _expandedSections = []; - +class _DataMigrationPageState extends State { @override Widget build(final BuildContext context) { - final bool isReady = context.watch().state - is ServerInstallationFinished; - - if (!isReady) { - return BrandHeroScreen( - hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), - children: const [], - ); - } - - /// The first section is expanded, the rest are hidden by default. - /// ( true, false, false, etc... ) - _expandedSections = [ - true, - ...List.filled( - widget.diskStatus.diskVolumes.length - 1, - false, - ), - ]; - - int sectionId = 0; - final List sections = []; - for (final DiskVolume volume in widget.diskStatus.diskVolumes) { - sections.add( - const SizedBox(height: 16), - ); - sections.add( - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Icon( - Icons.storage_outlined, - size: 24, - color: Colors.white, - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - Expanded( - child: BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: - Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ), - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - ], - ), - ), - ); - sections.add( - AnimatedCrossFade( - duration: const Duration(milliseconds: 200), - crossFadeState: _expandedSections[sectionId] - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: FilledButton( - title: 'providers.extend_volume_button.title'.tr(), - onPressed: () => Navigator.of(context).push( - materialRoute( - ExtendingVolumePage( - diskVolume: volume, - ), - ), - ), - ), - secondChild: Container(), - ), - ); - - ++sectionId; - } - + int a = 0; return BrandHeroScreen( hasBackButton: true, - heroTitle: 'providers.storage.card_title'.tr(), + heroTitle: 'providers.storage.data_migration_title'.tr(), children: [ - ...sections, - const SizedBox(height: 8), + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageListItem( + volume: volume, + ), + const SizedBox(height: 16), + ], + ), + ) + .toList(), ], ); } diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index ec2d2872..2c00097b 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -1,8 +1,15 @@ +import 'package:selfprivacy/logic/models/disk_size.dart'; +import 'package:selfprivacy/logic/models/hive/server_details.dart'; +import 'package:selfprivacy/logic/models/json/server_disk_volume.dart'; + class DiskVolume { - int gbUsed = 0; - int gbTotal = 0; + DiskSize sizeUsed = DiskSize(); + DiskSize sizeTotal = DiskSize(); String name = ''; bool root = false; + bool isResizable = true; + ServerDiskVolume? serverDiskVolume; + ServerVolume? providerVolume; /// from 0.0 to 1.0 double percentage = 0.0; diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index 43ad38c2..e232bac4 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -1,55 +1,40 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/volumes/volumes_cubit.dart'; +import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; class ExtendingVolumePage extends StatefulWidget { - const ExtendingVolumePage({required this.diskVolume, final super.key}); + const ExtendingVolumePage({ + required this.diskVolumeToResize, + required this.diskStatus, + final super.key, + }); - final DiskVolume diskVolume; + final DiskVolume diskVolumeToResize; + final DiskStatus diskStatus; @override State createState() => _ExtendingVolumePageState(); } class _ExtendingVolumePageState extends State { - bool _isSizeError = false; - bool _isPriceError = false; + bool _isError = false; - double _currentSliderGbValue = 20.0; + double _currentSliderGbValue = -1; double _euroPerGb = 1.0; - final double maxGb = 500.0; - double minGb = 0.0; + final DiskSize maxSize = DiskSize(byte: 500000000000); + DiskSize minSize = DiskSize(); final TextEditingController _sizeController = TextEditingController(); - late final TextEditingController _priceController; - - void _updateByPrice() { - final double price = double.parse(_priceController.text); - _currentSliderGbValue = price / _euroPerGb; - _sizeController.text = _currentSliderGbValue.round.toString(); - - /// Now we need to convert size back to price to round - /// it properly and display it in text field as well, - /// because size in GB can ONLY(!) be discrete. - _updateBySize(); - } - - void _updateBySize() { - final double size = double.parse(_sizeController.text); - _priceController.text = (size * _euroPerGb).toString(); - _updateErrorStatuses(); - } + final TextEditingController _priceController = TextEditingController(); void _updateErrorStatuses() { - final bool error = minGb > _currentSliderGbValue; - _isSizeError = error; - _isPriceError = error; + _isError = minSize.asGb() > _currentSliderGbValue; } @override @@ -59,15 +44,26 @@ class _ExtendingVolumePageState extends State { final BuildContext context, final AsyncSnapshot snapshot, ) { + if (!snapshot.hasData) { + return BrandHeroScreen( + hasBackButton: true, + heroTitle: 'providers.storage.extending_volume_title'.tr(), + heroSubtitle: + 'providers.storage.extending_volume_description'.tr(), + children: const [ + SizedBox(height: 16), + ], + ); + } _euroPerGb = snapshot.data as double; - _sizeController.text = _currentSliderGbValue.toString(); + _sizeController.text = _currentSliderGbValue.truncate().toString(); _priceController.text = - (_euroPerGb * double.parse(_sizeController.text)).toString(); - _sizeController.addListener(_updateBySize); - _priceController.addListener(_updateByPrice); - minGb = widget.diskVolume.gbTotal + 1 < maxGb - ? widget.diskVolume.gbTotal + 1 - : maxGb; + (_euroPerGb * double.parse(_sizeController.text)) + .toStringAsPrecision(2); + minSize = widget.diskVolumeToResize.sizeTotal; + if (_currentSliderGbValue < 0) { + _currentSliderGbValue = minSize.asGb(); + } return BrandHeroScreen( hasBackButton: true, @@ -76,47 +72,48 @@ class _ExtendingVolumePageState extends State { children: [ const SizedBox(height: 16), Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - TextField( - textInputAction: TextInputAction.next, - enabled: true, - controller: _sizeController, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: _isSizeError ? ' ' : null, - labelText: 'providers.storage.size'.tr(), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: TextField( + readOnly: true, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: _sizeController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isError ? ' ' : null, + labelText: 'providers.storage.size'.tr(), + ), ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], // Only numbers can be entered ), - const SizedBox(height: 16), - TextField( - textInputAction: TextInputAction.next, - enabled: true, - controller: _priceController, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: _isPriceError ? ' ' : null, - labelText: 'providers.storage.euro'.tr(), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: TextField( + readOnly: true, + textAlign: TextAlign.start, + textInputAction: TextInputAction.next, + enabled: true, + controller: _priceController, + decoration: InputDecoration( + border: const OutlineInputBorder(), + errorText: _isError ? ' ' : null, + labelText: 'providers.storage.euro'.tr(), + ), ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], // Only numbers can be entered ), ], ), const SizedBox(height: 16), Slider( - min: minGb, - value: widget.diskVolume.gbTotal + 5 < maxGb - ? widget.diskVolume.gbTotal + 5 - : maxGb, - max: maxGb, - divisions: 1, - label: _currentSliderGbValue.round().toString(), + min: minSize.asGb(), + value: _currentSliderGbValue, + max: maxSize.asGb(), onChanged: (final double value) { setState(() { _currentSliderGbValue = value; @@ -126,15 +123,22 @@ class _ExtendingVolumePageState extends State { ), const SizedBox(height: 16), FilledButton( - title: 'providers.extend_volume_button.title'.tr(), + title: 'providers.storage.extend_volume_button.title'.tr(), onPressed: null, + disabled: _isError, ), const SizedBox(height: 16), const Divider( height: 1.0, ), const SizedBox(height: 16), - const Icon(Icons.info_outlined, size: 24), + const Align( + alignment: Alignment.centerLeft, + child: Icon( + Icons.info_outlined, + size: 24, + ), + ), const SizedBox(height: 16), Text('providers.storage.extending_volume_price_info'.tr()), const SizedBox(height: 16), diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 8523ce1d..766440be 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -1,11 +1,11 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; import 'package:selfprivacy/ui/pages/server_storage/extending_volume.dart'; +import 'package:selfprivacy/ui/pages/server_storage/server_storage_list_item.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; class ServerStoragePage extends StatefulWidget { @@ -18,8 +18,6 @@ class ServerStoragePage extends StatefulWidget { } class _ServerStoragePageState extends State { - List _expandedSections = []; - @override Widget build(final BuildContext context) { final bool isReady = context.watch().state @@ -33,103 +31,62 @@ class _ServerStoragePageState extends State { ); } - /// The first section is expanded, the rest are hidden by default. - /// ( true, false, false, etc... ) - _expandedSections = [ - true, - ...List.filled( - widget.diskStatus.diskVolumes.length - 1, - false, - ), - ]; - - int sectionId = 0; - final List sections = []; - for (final DiskVolume volume in widget.diskStatus.diskVolumes) { - sections.add( - const SizedBox(height: 16), - ); - sections.add( - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Icon( - Icons.storage_outlined, - size: 24, - color: Colors.white, - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - 'providers.storage.disk_usage'.tr( - args: [ - volume.gbUsed.toString(), - ], - ), - style: Theme.of(context).textTheme.titleMedium, - ), - Expanded( - child: BrandLinearIndicator( - value: volume.percentage, - color: volume.root - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.secondary, - backgroundColor: - Theme.of(context).colorScheme.surfaceVariant, - height: 14.0, - ), - ), - Text( - 'providers.storage.disk_total'.tr( - args: [ - volume.gbTotal.toString(), - volume.name, - ], - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - ], - ), - ), - ); - sections.add( - AnimatedCrossFade( - duration: const Duration(milliseconds: 200), - crossFadeState: _expandedSections[sectionId] - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - firstChild: FilledButton( - title: 'providers.extend_volume_button.title'.tr(), - onPressed: () => Navigator.of(context).push( - materialRoute( - ExtendingVolumePage( - diskVolume: volume, - ), - ), - ), - ), - secondChild: Container(), - ), - ); - - ++sectionId; - } - return BrandHeroScreen( hasBackButton: true, heroTitle: 'providers.storage.card_title'.tr(), children: [ - ...sections, + // ...sections, + ...widget.diskStatus.diskVolumes + .map( + (final volume) => Column( + children: [ + ServerStorageSection( + volume: volume, + diskStatus: widget.diskStatus, + ), + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ], + ), + ) + .toList(), const SizedBox(height: 8), ], ); } } + +class ServerStorageSection extends StatelessWidget { + const ServerStorageSection({ + required this.volume, + required this.diskStatus, + final super.key, + }); + + final DiskVolume volume; + final DiskStatus diskStatus; + + @override + Widget build(final BuildContext context) => Column( + children: [ + ServerStorageListItem( + volume: volume, + ), + if (volume.isResizable) ...[ + const SizedBox(height: 16), + BrandOutlinedButton( + title: 'providers.storage.extend_volume_button.title'.tr(), + onPressed: () => Navigator.of(context).push( + materialRoute( + ExtendingVolumePage( + diskVolumeToResize: volume, + diskStatus: diskStatus, + ), + ), + ), + ), + ], + ], + ); +} diff --git a/lib/ui/pages/server_storage/server_storage_list_item.dart b/lib/ui/pages/server_storage/server_storage_list_item.dart new file mode 100644 index 00000000..b6db282d --- /dev/null +++ b/lib/ui/pages/server_storage/server_storage_list_item.dart @@ -0,0 +1,74 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/pages/server_storage/disk_status.dart'; + +class ServerStorageListItem extends StatelessWidget { + const ServerStorageListItem({ + required this.volume, + final this.showIcon = true, + final this.dense = false, + final super.key, + }); + + final DiskVolume volume; + final bool showIcon; + final bool dense; + + @override + Widget build(final BuildContext context) { + final TextStyle? titleStyle = dense + ? Theme.of(context).textTheme.titleMedium + : Theme.of(context).textTheme.titleLarge; + + final TextStyle? subtitleStyle = dense + ? Theme.of(context).textTheme.bodySmall + : Theme.of(context).textTheme.bodyMedium; + + return Row( + children: [ + if (showIcon) + const Icon( + Icons.storage_outlined, + size: 24, + color: Colors.white, + ), + if (showIcon) const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'providers.storage.disk_usage'.tr( + args: [ + volume.sizeUsed.asGb().toStringAsPrecision(3), + ], + ), + style: titleStyle, + ), + const SizedBox(height: 4), + BrandLinearIndicator( + value: volume.percentage, + color: volume.root + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.surfaceVariant, + height: 14.0, + ), + const SizedBox(height: 4), + Text( + 'providers.storage.disk_total'.tr( + args: [ + volume.sizeTotal.asGb().toStringAsPrecision(3), + volume.name, + ], + ), + style: subtitleStyle, + ), + ], + ), + ), + ], + ); + } +} diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart new file mode 100644 index 00000000..19a22c2c --- /dev/null +++ b/lib/ui/pages/services/service_page.dart @@ -0,0 +1,87 @@ +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_button/filled_button.dart'; +import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; + +class ServicePage extends StatefulWidget { + const ServicePage({final super.key}); + + @override + State createState() => _ServicePageState(); +} + +class _ServicePageState extends State { + @override + Widget build(final BuildContext context) { + int a; + return BrandHeroScreen( + hasBackButton: true, + children: [ + const SizedBox(height: 16), + Container( + alignment: Alignment.center, + child: const Icon( + Icons.question_mark_outlined, + size: 48, + ), + ), + const SizedBox(height: 16), + Text( + 'My Incredible Service', + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + const SizedBox(height: 16), + BrandCards.outlined( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.check_box_outlined, + size: 24, + ), + ), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text(''), + ), + ], + ), + ), + const SizedBox(height: 16), + const Divider(), + const SizedBox(height: 16), + ElevatedButton( + onPressed: null, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 24), + child: const Icon( + Icons.language_outlined, + size: 24, + ), + ), + const SizedBox(width: 16), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 130), + child: const Text('Your Cool Domain'), + ), + ], + ), + ), + const SizedBox(height: 16), + ], + ); + } +} diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 0b8ea12d..0a2b7db4 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -106,7 +106,7 @@ class _Card extends StatelessWidget { final switchableService = switchableServices.contains(serviceType); final hasSwitchJob = switchableService && jobState is JobsStateWithJobs && - jobState.jobList.any( + jobState.clientJobList.any( (final el) => el is ServiceToggleJob && el.type == serviceType, ); @@ -150,7 +150,7 @@ class _Card extends StatelessWidget { builder: (final context) { late bool isActive; if (hasSwitchJob) { - isActive = (jobState.jobList.firstWhere( + isActive = (jobState.clientJobList.firstWhere( (final el) => el is ServiceToggleJob && el.type == serviceType, ) as ServiceToggleJob) diff --git a/lib/ui/pages/setup/initializing.dart b/lib/ui/pages/setup/initializing.dart index 2cde89ce..ab6e456e 100644 --- a/lib/ui/pages/setup/initializing.dart +++ b/lib/ui/pages/setup/initializing.dart @@ -72,7 +72,7 @@ class InitializingPage extends StatelessWidget { 'Domain', 'User', 'Server', - '✅ Check', + 'Check', ], activeIndex: cubit.state.porgressBar, ), diff --git a/lib/ui/pages/ssh_keys/new_ssh_key.dart b/lib/ui/pages/ssh_keys/new_ssh_key.dart index 247590b7..fc558be2 100644 --- a/lib/ui/pages/ssh_keys/new_ssh_key.dart +++ b/lib/ui/pages/ssh_keys/new_ssh_key.dart @@ -11,7 +11,7 @@ class _NewSshKey extends StatelessWidget { final jobCubit = context.read(); final jobState = jobCubit.state; if (jobState is JobsStateWithJobs) { - final jobs = jobState.jobList; + final jobs = jobState.clientJobList; for (final job in jobs) { if (job is CreateSSHKeyJob && job.user.login == user.login) { user.sshKeys.add(job.publicKey); diff --git a/lib/ui/pages/users/new_user.dart b/lib/ui/pages/users/new_user.dart index 72cb6387..38ec74b7 100644 --- a/lib/ui/pages/users/new_user.dart +++ b/lib/ui/pages/users/new_user.dart @@ -18,7 +18,7 @@ class NewUser extends StatelessWidget { final users = []; users.addAll(context.read().state.users); if (jobState is JobsStateWithJobs) { - final jobs = jobState.jobList; + final jobs = jobState.clientJobList; for (final job in jobs) { if (job is CreateUserJob) { users.add(job.user);