diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql b/lib/logic/api_maps/graphql_maps/schema/backups.graphql new file mode 100644 index 00000000..36177fca --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql @@ -0,0 +1,24 @@ +query BackupConfiguration { + backup { + configuration { + autobackupPeriod + encryptionKey + isInitialized + locationId + locationName + provider + } + } +} + +query AllBackupSnapshots { + backup { + allSnapshots { + ...backupSnapshotFields + service { + displayName + id + } + } + } +} diff --git a/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart new file mode 100644 index 00000000..37ee4109 --- /dev/null +++ b/lib/logic/api_maps/graphql_maps/schema/backups.graphql.dart @@ -0,0 +1,1548 @@ +import 'dart:async'; +import 'package:gql/ast.dart'; +import 'package:graphql/client.dart' as graphql; +import 'package:selfprivacy/utils/scalars.dart'; +import 'schema.graphql.dart'; + +class Query$BackupConfiguration { + Query$BackupConfiguration({ + required this.backup, + this.$__typename = 'Query', + }); + + factory Query$BackupConfiguration.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration( + backup: Query$BackupConfiguration$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$BackupConfiguration$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration + on Query$BackupConfiguration { + CopyWith$Query$BackupConfiguration get copyWith => + CopyWith$Query$BackupConfiguration( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration { + factory CopyWith$Query$BackupConfiguration( + Query$BackupConfiguration instance, + TRes Function(Query$BackupConfiguration) then, + ) = _CopyWithImpl$Query$BackupConfiguration; + + factory CopyWith$Query$BackupConfiguration.stub(TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration; + + TRes call({ + Query$BackupConfiguration$backup? backup, + String? $__typename, + }); + CopyWith$Query$BackupConfiguration$backup get backup; +} + +class _CopyWithImpl$Query$BackupConfiguration + implements CopyWith$Query$BackupConfiguration { + _CopyWithImpl$Query$BackupConfiguration( + this._instance, + this._then, + ); + + final Query$BackupConfiguration _instance; + + final TRes Function(Query$BackupConfiguration) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Query$BackupConfiguration$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$BackupConfiguration$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Query$BackupConfiguration$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Query$BackupConfiguration + implements CopyWith$Query$BackupConfiguration { + _CopyWithStubImpl$Query$BackupConfiguration(this._res); + + TRes _res; + + call({ + Query$BackupConfiguration$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Query$BackupConfiguration$backup get backup => + CopyWith$Query$BackupConfiguration$backup.stub(_res); +} + +const documentNodeQueryBackupConfiguration = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'BackupConfiguration'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'configuration'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'autobackupPeriod'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'encryptionKey'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'isInitialized'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'locationName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'provider'), + 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$BackupConfiguration _parserFn$Query$BackupConfiguration( + Map data) => + Query$BackupConfiguration.fromJson(data); +typedef OnQueryComplete$Query$BackupConfiguration = FutureOr Function( + Map?, + Query$BackupConfiguration?, +); + +class Options$Query$BackupConfiguration + extends graphql.QueryOptions { + Options$Query$BackupConfiguration({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$BackupConfiguration? typedOptimisticResult, + Duration? pollInterval, + graphql.Context? context, + OnQueryComplete$Query$BackupConfiguration? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + pollInterval: pollInterval, + context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$BackupConfiguration(data), + ), + onError: onError, + document: documentNodeQueryBackupConfiguration, + parserFn: _parserFn$Query$BackupConfiguration, + ); + + final OnQueryComplete$Query$BackupConfiguration? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; +} + +class WatchOptions$Query$BackupConfiguration + extends graphql.WatchQueryOptions { + WatchOptions$Query$BackupConfiguration({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$BackupConfiguration? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeQueryBackupConfiguration, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$BackupConfiguration, + ); +} + +class FetchMoreOptions$Query$BackupConfiguration + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$BackupConfiguration( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryBackupConfiguration, + ); +} + +extension ClientExtension$Query$BackupConfiguration on graphql.GraphQLClient { + Future> + query$BackupConfiguration( + [Options$Query$BackupConfiguration? options]) async => + await this.query(options ?? Options$Query$BackupConfiguration()); + graphql.ObservableQuery + watchQuery$BackupConfiguration( + [WatchOptions$Query$BackupConfiguration? options]) => + this.watchQuery(options ?? WatchOptions$Query$BackupConfiguration()); + void writeQuery$BackupConfiguration({ + required Query$BackupConfiguration data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryBackupConfiguration)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$BackupConfiguration? readQuery$BackupConfiguration( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryBackupConfiguration)), + optimistic: optimistic, + ); + return result == null ? null : Query$BackupConfiguration.fromJson(result); + } +} + +class Query$BackupConfiguration$backup { + Query$BackupConfiguration$backup({ + required this.configuration, + this.$__typename = 'Backup', + }); + + factory Query$BackupConfiguration$backup.fromJson(Map json) { + final l$configuration = json['configuration']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration$backup( + configuration: Query$BackupConfiguration$backup$configuration.fromJson( + (l$configuration as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$BackupConfiguration$backup$configuration configuration; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$configuration = configuration; + _resultData['configuration'] = l$configuration.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$configuration = configuration; + final l$$__typename = $__typename; + return Object.hashAll([ + l$configuration, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$configuration = configuration; + final lOther$configuration = other.configuration; + if (l$configuration != lOther$configuration) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration$backup + on Query$BackupConfiguration$backup { + CopyWith$Query$BackupConfiguration$backup + get copyWith => CopyWith$Query$BackupConfiguration$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration$backup { + factory CopyWith$Query$BackupConfiguration$backup( + Query$BackupConfiguration$backup instance, + TRes Function(Query$BackupConfiguration$backup) then, + ) = _CopyWithImpl$Query$BackupConfiguration$backup; + + factory CopyWith$Query$BackupConfiguration$backup.stub(TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration$backup; + + TRes call({ + Query$BackupConfiguration$backup$configuration? configuration, + String? $__typename, + }); + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration; +} + +class _CopyWithImpl$Query$BackupConfiguration$backup + implements CopyWith$Query$BackupConfiguration$backup { + _CopyWithImpl$Query$BackupConfiguration$backup( + this._instance, + this._then, + ); + + final Query$BackupConfiguration$backup _instance; + + final TRes Function(Query$BackupConfiguration$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? configuration = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration$backup( + configuration: configuration == _undefined || configuration == null + ? _instance.configuration + : (configuration as Query$BackupConfiguration$backup$configuration), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration { + final local$configuration = _instance.configuration; + return CopyWith$Query$BackupConfiguration$backup$configuration( + local$configuration, (e) => call(configuration: e)); + } +} + +class _CopyWithStubImpl$Query$BackupConfiguration$backup + implements CopyWith$Query$BackupConfiguration$backup { + _CopyWithStubImpl$Query$BackupConfiguration$backup(this._res); + + TRes _res; + + call({ + Query$BackupConfiguration$backup$configuration? configuration, + String? $__typename, + }) => + _res; + CopyWith$Query$BackupConfiguration$backup$configuration + get configuration => + CopyWith$Query$BackupConfiguration$backup$configuration.stub(_res); +} + +class Query$BackupConfiguration$backup$configuration { + Query$BackupConfiguration$backup$configuration({ + this.autobackupPeriod, + required this.encryptionKey, + required this.isInitialized, + this.locationId, + this.locationName, + required this.provider, + this.$__typename = 'BackupConfiguration', + }); + + factory Query$BackupConfiguration$backup$configuration.fromJson( + Map json) { + final l$autobackupPeriod = json['autobackupPeriod']; + final l$encryptionKey = json['encryptionKey']; + final l$isInitialized = json['isInitialized']; + final l$locationId = json['locationId']; + final l$locationName = json['locationName']; + final l$provider = json['provider']; + final l$$__typename = json['__typename']; + return Query$BackupConfiguration$backup$configuration( + autobackupPeriod: (l$autobackupPeriod as int?), + encryptionKey: (l$encryptionKey as String), + isInitialized: (l$isInitialized as bool), + locationId: (l$locationId as String?), + locationName: (l$locationName as String?), + provider: fromJson$Enum$BackupProvider((l$provider as String)), + $__typename: (l$$__typename as String), + ); + } + + final int? autobackupPeriod; + + final String encryptionKey; + + final bool isInitialized; + + final String? locationId; + + final String? locationName; + + final Enum$BackupProvider provider; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$autobackupPeriod = autobackupPeriod; + _resultData['autobackupPeriod'] = l$autobackupPeriod; + final l$encryptionKey = encryptionKey; + _resultData['encryptionKey'] = l$encryptionKey; + final l$isInitialized = isInitialized; + _resultData['isInitialized'] = l$isInitialized; + final l$locationId = locationId; + _resultData['locationId'] = l$locationId; + final l$locationName = locationName; + _resultData['locationName'] = l$locationName; + final l$provider = provider; + _resultData['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$autobackupPeriod = autobackupPeriod; + final l$encryptionKey = encryptionKey; + final l$isInitialized = isInitialized; + final l$locationId = locationId; + final l$locationName = locationName; + final l$provider = provider; + final l$$__typename = $__typename; + return Object.hashAll([ + l$autobackupPeriod, + l$encryptionKey, + l$isInitialized, + l$locationId, + l$locationName, + l$provider, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$BackupConfiguration$backup$configuration) || + runtimeType != other.runtimeType) { + return false; + } + final l$autobackupPeriod = autobackupPeriod; + final lOther$autobackupPeriod = other.autobackupPeriod; + if (l$autobackupPeriod != lOther$autobackupPeriod) { + return false; + } + final l$encryptionKey = encryptionKey; + final lOther$encryptionKey = other.encryptionKey; + if (l$encryptionKey != lOther$encryptionKey) { + return false; + } + final l$isInitialized = isInitialized; + final lOther$isInitialized = other.isInitialized; + if (l$isInitialized != lOther$isInitialized) { + return false; + } + final l$locationId = locationId; + final lOther$locationId = other.locationId; + if (l$locationId != lOther$locationId) { + return false; + } + final l$locationName = locationName; + final lOther$locationName = other.locationName; + if (l$locationName != lOther$locationName) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$BackupConfiguration$backup$configuration + on Query$BackupConfiguration$backup$configuration { + CopyWith$Query$BackupConfiguration$backup$configuration< + Query$BackupConfiguration$backup$configuration> + get copyWith => CopyWith$Query$BackupConfiguration$backup$configuration( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$BackupConfiguration$backup$configuration { + factory CopyWith$Query$BackupConfiguration$backup$configuration( + Query$BackupConfiguration$backup$configuration instance, + TRes Function(Query$BackupConfiguration$backup$configuration) then, + ) = _CopyWithImpl$Query$BackupConfiguration$backup$configuration; + + factory CopyWith$Query$BackupConfiguration$backup$configuration.stub( + TRes res) = + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration; + + TRes call({ + int? autobackupPeriod, + String? encryptionKey, + bool? isInitialized, + String? locationId, + String? locationName, + Enum$BackupProvider? provider, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$BackupConfiguration$backup$configuration + implements CopyWith$Query$BackupConfiguration$backup$configuration { + _CopyWithImpl$Query$BackupConfiguration$backup$configuration( + this._instance, + this._then, + ); + + final Query$BackupConfiguration$backup$configuration _instance; + + final TRes Function(Query$BackupConfiguration$backup$configuration) _then; + + static const _undefined = {}; + + TRes call({ + Object? autobackupPeriod = _undefined, + Object? encryptionKey = _undefined, + Object? isInitialized = _undefined, + Object? locationId = _undefined, + Object? locationName = _undefined, + Object? provider = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$BackupConfiguration$backup$configuration( + autobackupPeriod: autobackupPeriod == _undefined + ? _instance.autobackupPeriod + : (autobackupPeriod as int?), + encryptionKey: encryptionKey == _undefined || encryptionKey == null + ? _instance.encryptionKey + : (encryptionKey as String), + isInitialized: isInitialized == _undefined || isInitialized == null + ? _instance.isInitialized + : (isInitialized as bool), + locationId: locationId == _undefined + ? _instance.locationId + : (locationId as String?), + locationName: locationName == _undefined + ? _instance.locationName + : (locationName as String?), + provider: provider == _undefined || provider == null + ? _instance.provider + : (provider as Enum$BackupProvider), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration + implements CopyWith$Query$BackupConfiguration$backup$configuration { + _CopyWithStubImpl$Query$BackupConfiguration$backup$configuration(this._res); + + TRes _res; + + call({ + int? autobackupPeriod, + String? encryptionKey, + bool? isInitialized, + String? locationId, + String? locationName, + Enum$BackupProvider? provider, + String? $__typename, + }) => + _res; +} + +class Query$AllBackupSnapshots { + Query$AllBackupSnapshots({ + required this.backup, + this.$__typename = 'Query', + }); + + factory Query$AllBackupSnapshots.fromJson(Map json) { + final l$backup = json['backup']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots( + backup: Query$AllBackupSnapshots$backup.fromJson( + (l$backup as Map)), + $__typename: (l$$__typename as String), + ); + } + + final Query$AllBackupSnapshots$backup backup; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$backup = backup; + _resultData['backup'] = l$backup.toJson(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$backup = backup; + final l$$__typename = $__typename; + return Object.hashAll([ + l$backup, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots) || + runtimeType != other.runtimeType) { + return false; + } + final l$backup = backup; + final lOther$backup = other.backup; + if (l$backup != lOther$backup) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots + on Query$AllBackupSnapshots { + CopyWith$Query$AllBackupSnapshots get copyWith => + CopyWith$Query$AllBackupSnapshots( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots { + factory CopyWith$Query$AllBackupSnapshots( + Query$AllBackupSnapshots instance, + TRes Function(Query$AllBackupSnapshots) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots; + + factory CopyWith$Query$AllBackupSnapshots.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots; + + TRes call({ + Query$AllBackupSnapshots$backup? backup, + String? $__typename, + }); + CopyWith$Query$AllBackupSnapshots$backup get backup; +} + +class _CopyWithImpl$Query$AllBackupSnapshots + implements CopyWith$Query$AllBackupSnapshots { + _CopyWithImpl$Query$AllBackupSnapshots( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots _instance; + + final TRes Function(Query$AllBackupSnapshots) _then; + + static const _undefined = {}; + + TRes call({ + Object? backup = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots( + backup: backup == _undefined || backup == null + ? _instance.backup + : (backup as Query$AllBackupSnapshots$backup), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + CopyWith$Query$AllBackupSnapshots$backup get backup { + final local$backup = _instance.backup; + return CopyWith$Query$AllBackupSnapshots$backup( + local$backup, (e) => call(backup: e)); + } +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots + implements CopyWith$Query$AllBackupSnapshots { + _CopyWithStubImpl$Query$AllBackupSnapshots(this._res); + + TRes _res; + + call({ + Query$AllBackupSnapshots$backup? backup, + String? $__typename, + }) => + _res; + CopyWith$Query$AllBackupSnapshots$backup get backup => + CopyWith$Query$AllBackupSnapshots$backup.stub(_res); +} + +const documentNodeQueryAllBackupSnapshots = DocumentNode(definitions: [ + OperationDefinitionNode( + type: OperationType.query, + name: NameNode(value: 'AllBackupSnapshots'), + variableDefinitions: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'backup'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'allSnapshots'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FragmentSpreadNode( + name: NameNode(value: 'backupSnapshotFields'), + directives: [], + ), + FieldNode( + name: NameNode(value: 'service'), + alias: null, + arguments: [], + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'displayName'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), + ), + fragmentDefinitionbackupSnapshotFields, +]); +Query$AllBackupSnapshots _parserFn$Query$AllBackupSnapshots( + Map data) => + Query$AllBackupSnapshots.fromJson(data); +typedef OnQueryComplete$Query$AllBackupSnapshots = FutureOr Function( + Map?, + Query$AllBackupSnapshots?, +); + +class Options$Query$AllBackupSnapshots + extends graphql.QueryOptions { + Options$Query$AllBackupSnapshots({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$AllBackupSnapshots? typedOptimisticResult, + Duration? pollInterval, + graphql.Context? context, + OnQueryComplete$Query$AllBackupSnapshots? onComplete, + graphql.OnQueryError? onError, + }) : onCompleteWithParsed = onComplete, + super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + pollInterval: pollInterval, + context: context, + onComplete: onComplete == null + ? null + : (data) => onComplete( + data, + data == null + ? null + : _parserFn$Query$AllBackupSnapshots(data), + ), + onError: onError, + document: documentNodeQueryAllBackupSnapshots, + parserFn: _parserFn$Query$AllBackupSnapshots, + ); + + final OnQueryComplete$Query$AllBackupSnapshots? onCompleteWithParsed; + + @override + List get properties => [ + ...super.onComplete == null + ? super.properties + : super.properties.where((property) => property != onComplete), + onCompleteWithParsed, + ]; +} + +class WatchOptions$Query$AllBackupSnapshots + extends graphql.WatchQueryOptions { + WatchOptions$Query$AllBackupSnapshots({ + String? operationName, + graphql.FetchPolicy? fetchPolicy, + graphql.ErrorPolicy? errorPolicy, + graphql.CacheRereadPolicy? cacheRereadPolicy, + Object? optimisticResult, + Query$AllBackupSnapshots? typedOptimisticResult, + graphql.Context? context, + Duration? pollInterval, + bool? eagerlyFetchResults, + bool carryForwardDataOnException = true, + bool fetchResults = false, + }) : super( + operationName: operationName, + fetchPolicy: fetchPolicy, + errorPolicy: errorPolicy, + cacheRereadPolicy: cacheRereadPolicy, + optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(), + context: context, + document: documentNodeQueryAllBackupSnapshots, + pollInterval: pollInterval, + eagerlyFetchResults: eagerlyFetchResults, + carryForwardDataOnException: carryForwardDataOnException, + fetchResults: fetchResults, + parserFn: _parserFn$Query$AllBackupSnapshots, + ); +} + +class FetchMoreOptions$Query$AllBackupSnapshots + extends graphql.FetchMoreOptions { + FetchMoreOptions$Query$AllBackupSnapshots( + {required graphql.UpdateQuery updateQuery}) + : super( + updateQuery: updateQuery, + document: documentNodeQueryAllBackupSnapshots, + ); +} + +extension ClientExtension$Query$AllBackupSnapshots on graphql.GraphQLClient { + Future> + query$AllBackupSnapshots( + [Options$Query$AllBackupSnapshots? options]) async => + await this.query(options ?? Options$Query$AllBackupSnapshots()); + graphql.ObservableQuery + watchQuery$AllBackupSnapshots( + [WatchOptions$Query$AllBackupSnapshots? options]) => + this.watchQuery(options ?? WatchOptions$Query$AllBackupSnapshots()); + void writeQuery$AllBackupSnapshots({ + required Query$AllBackupSnapshots data, + bool broadcast = true, + }) => + this.writeQuery( + graphql.Request( + operation: graphql.Operation( + document: documentNodeQueryAllBackupSnapshots)), + data: data.toJson(), + broadcast: broadcast, + ); + Query$AllBackupSnapshots? readQuery$AllBackupSnapshots( + {bool optimistic = true}) { + final result = this.readQuery( + graphql.Request( + operation: + graphql.Operation(document: documentNodeQueryAllBackupSnapshots)), + optimistic: optimistic, + ); + return result == null ? null : Query$AllBackupSnapshots.fromJson(result); + } +} + +class Query$AllBackupSnapshots$backup { + Query$AllBackupSnapshots$backup({ + required this.allSnapshots, + this.$__typename = 'Backup', + }); + + factory Query$AllBackupSnapshots$backup.fromJson(Map json) { + final l$allSnapshots = json['allSnapshots']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots$backup( + allSnapshots: (l$allSnapshots as List) + .map((e) => Query$AllBackupSnapshots$backup$allSnapshots.fromJson( + (e as Map))) + .toList(), + $__typename: (l$$__typename as String), + ); + } + + final List allSnapshots; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$allSnapshots = allSnapshots; + _resultData['allSnapshots'] = + l$allSnapshots.map((e) => e.toJson()).toList(); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$allSnapshots = allSnapshots; + final l$$__typename = $__typename; + return Object.hashAll([ + Object.hashAll(l$allSnapshots.map((v) => v)), + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup) || + runtimeType != other.runtimeType) { + return false; + } + final l$allSnapshots = allSnapshots; + final lOther$allSnapshots = other.allSnapshots; + if (l$allSnapshots.length != lOther$allSnapshots.length) { + return false; + } + for (int i = 0; i < l$allSnapshots.length; i++) { + final l$allSnapshots$entry = l$allSnapshots[i]; + final lOther$allSnapshots$entry = lOther$allSnapshots[i]; + if (l$allSnapshots$entry != lOther$allSnapshots$entry) { + return false; + } + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots$backup + on Query$AllBackupSnapshots$backup { + CopyWith$Query$AllBackupSnapshots$backup + get copyWith => CopyWith$Query$AllBackupSnapshots$backup( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup { + factory CopyWith$Query$AllBackupSnapshots$backup( + Query$AllBackupSnapshots$backup instance, + TRes Function(Query$AllBackupSnapshots$backup) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup; + + factory CopyWith$Query$AllBackupSnapshots$backup.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup; + + TRes call({ + List? allSnapshots, + String? $__typename, + }); + TRes allSnapshots( + Iterable Function( + Iterable< + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots>>) + _fn); +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup + implements CopyWith$Query$AllBackupSnapshots$backup { + _CopyWithImpl$Query$AllBackupSnapshots$backup( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup _instance; + + final TRes Function(Query$AllBackupSnapshots$backup) _then; + + static const _undefined = {}; + + TRes call({ + Object? allSnapshots = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup( + allSnapshots: allSnapshots == _undefined || allSnapshots == null + ? _instance.allSnapshots + : (allSnapshots + as List), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); + TRes allSnapshots( + Iterable Function( + Iterable< + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots>>) + _fn) => + call( + allSnapshots: _fn(_instance.allSnapshots + .map((e) => CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + e, + (i) => i, + ))).toList()); +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup + implements CopyWith$Query$AllBackupSnapshots$backup { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup(this._res); + + TRes _res; + + call({ + List? allSnapshots, + String? $__typename, + }) => + _res; + allSnapshots(_fn) => _res; +} + +class Query$AllBackupSnapshots$backup$allSnapshots + implements Fragment$backupSnapshotFields { + Query$AllBackupSnapshots$backup$allSnapshots({ + required this.id, + required this.createdAt, + this.$__typename = 'SnapshotInfo', + required this.service, + }); + + factory Query$AllBackupSnapshots$backup$allSnapshots.fromJson( + Map json) { + final l$id = json['id']; + final l$createdAt = json['createdAt']; + final l$$__typename = json['__typename']; + final l$service = json['service']; + return Query$AllBackupSnapshots$backup$allSnapshots( + id: (l$id as String), + createdAt: dateTimeFromJson(l$createdAt), + $__typename: (l$$__typename as String), + service: Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( + (l$service as Map)), + ); + } + + final String id; + + final DateTime createdAt; + + final String $__typename; + + final Query$AllBackupSnapshots$backup$allSnapshots$service service; + + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + final l$service = service; + _resultData['service'] = l$service.toJson(); + return _resultData; + } + + @override + int get hashCode { + final l$id = id; + final l$createdAt = createdAt; + final l$$__typename = $__typename; + final l$service = service; + return Object.hashAll([ + l$id, + l$createdAt, + l$$__typename, + l$service, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup$allSnapshots) || + runtimeType != other.runtimeType) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) { + 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$AllBackupSnapshots$backup$allSnapshots + on Query$AllBackupSnapshots$backup$allSnapshots { + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots< + Query$AllBackupSnapshots$backup$allSnapshots> + get copyWith => CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots( + Query$AllBackupSnapshots$backup$allSnapshots instance, + TRes Function(Query$AllBackupSnapshots$backup$allSnapshots) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots; + + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots.stub(TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots; + + TRes call({ + String? id, + DateTime? createdAt, + String? $__typename, + Query$AllBackupSnapshots$backup$allSnapshots$service? service, + }); + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service; +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots + implements CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup$allSnapshots _instance; + + final TRes Function(Query$AllBackupSnapshots$backup$allSnapshots) _then; + + static const _undefined = {}; + + TRes call({ + Object? id = _undefined, + Object? createdAt = _undefined, + Object? $__typename = _undefined, + Object? service = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup$allSnapshots( + id: id == _undefined || id == null ? _instance.id : (id as String), + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + service: service == _undefined || service == null + ? _instance.service + : (service as Query$AllBackupSnapshots$backup$allSnapshots$service), + )); + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service { + final local$service = _instance.service; + return CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + local$service, (e) => call(service: e)); + } +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots + implements CopyWith$Query$AllBackupSnapshots$backup$allSnapshots { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots(this._res); + + TRes _res; + + call({ + String? id, + DateTime? createdAt, + String? $__typename, + Query$AllBackupSnapshots$backup$allSnapshots$service? service, + }) => + _res; + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service + get service => + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service.stub( + _res); +} + +class Query$AllBackupSnapshots$backup$allSnapshots$service { + Query$AllBackupSnapshots$backup$allSnapshots$service({ + required this.displayName, + required this.id, + this.$__typename = 'Service', + }); + + factory Query$AllBackupSnapshots$backup$allSnapshots$service.fromJson( + Map json) { + final l$displayName = json['displayName']; + final l$id = json['id']; + final l$$__typename = json['__typename']; + return Query$AllBackupSnapshots$backup$allSnapshots$service( + displayName: (l$displayName as String), + id: (l$id as String), + $__typename: (l$$__typename as String), + ); + } + + final String displayName; + + final String id; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$displayName = displayName; + _resultData['displayName'] = l$displayName; + final l$id = id; + _resultData['id'] = l$id; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$displayName = displayName; + final l$id = id; + final l$$__typename = $__typename; + return Object.hashAll([ + l$displayName, + l$id, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Query$AllBackupSnapshots$backup$allSnapshots$service) || + runtimeType != other.runtimeType) { + return false; + } + final l$displayName = displayName; + final lOther$displayName = other.displayName; + if (l$displayName != lOther$displayName) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Query$AllBackupSnapshots$backup$allSnapshots$service + on Query$AllBackupSnapshots$backup$allSnapshots$service { + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service< + Query$AllBackupSnapshots$backup$allSnapshots$service> + get copyWith => + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + this, + (i) => i, + ); +} + +abstract class CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service< + TRes> { + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service( + Query$AllBackupSnapshots$backup$allSnapshots$service instance, + TRes Function(Query$AllBackupSnapshots$backup$allSnapshots$service) then, + ) = _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service; + + factory CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service.stub( + TRes res) = + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service; + + TRes call({ + String? displayName, + String? id, + String? $__typename, + }); +} + +class _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service + implements + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service { + _CopyWithImpl$Query$AllBackupSnapshots$backup$allSnapshots$service( + this._instance, + this._then, + ); + + final Query$AllBackupSnapshots$backup$allSnapshots$service _instance; + + final TRes Function(Query$AllBackupSnapshots$backup$allSnapshots$service) + _then; + + static const _undefined = {}; + + TRes call({ + Object? displayName = _undefined, + Object? id = _undefined, + Object? $__typename = _undefined, + }) => + _then(Query$AllBackupSnapshots$backup$allSnapshots$service( + displayName: displayName == _undefined || displayName == null + ? _instance.displayName + : (displayName as String), + id: id == _undefined || id == null ? _instance.id : (id as String), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service< + TRes> + implements + CopyWith$Query$AllBackupSnapshots$backup$allSnapshots$service { + _CopyWithStubImpl$Query$AllBackupSnapshots$backup$allSnapshots$service( + this._res); + + TRes _res; + + call({ + String? displayName, + String? id, + String? $__typename, + }) => + _res; +} 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 84550cc2..2f62067b 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 @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + 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$$GenericBackupConfigReturn) || + 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$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/schema.graphql b/lib/logic/api_maps/graphql_maps/schema/schema.graphql index 89bc30c8..81f06b06 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql @@ -1,54 +1,54 @@ type Alert { - message: String! severity: Severity! - timestamp: DateTime title: String! + message: String! + timestamp: DateTime } type Api { - devices: [ApiDevice!]! - recoveryKey: ApiRecoveryKeyStatus! version: String! + recoveryKey: ApiRecoveryKeyStatus! + devices: [ApiDevice!]! } type ApiDevice { + name: String! creationDate: DateTime! isCaller: Boolean! - name: String! } type ApiJob { - createdAt: DateTime! - description: String! - error: String - finishedAt: DateTime + uid: String! name: String! - progress: Int - result: String + description: String! status: String! statusText: String - uid: String! + progress: Int + createdAt: DateTime! updatedAt: DateTime! + finishedAt: DateTime + error: String + result: String } type ApiKeyMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! key: String - message: String! - success: Boolean! } type ApiRecoveryKeyStatus { - creationDate: DateTime exists: Boolean! + valid: Boolean! + creationDate: DateTime expirationDate: DateTime usesLeft: Int - valid: Boolean! } type AutoUpgradeOptions { - allowReboot: Boolean! enable: Boolean! + allowReboot: Boolean! } input AutoUpgradeSettingsInput { @@ -57,52 +57,89 @@ input AutoUpgradeSettingsInput { } type AutoUpgradeSettingsMutationReturn implements MutationReturnInterface { - allowReboot: Boolean! + success: Boolean! + message: String! code: Int! enableAutoUpgrade: Boolean! - message: String! - success: Boolean! + allowReboot: Boolean! +} + +type Backup { + configuration: BackupConfiguration! + allSnapshots: [SnapshotInfo!]! +} + +type BackupConfiguration { + provider: BackupProvider! + encryptionKey: String! + isInitialized: Boolean! + autobackupPeriod: Int + locationName: String + locationId: String +} + +enum BackupProvider { + BACKBLAZE + NONE + MEMORY + FILE } """Date with time (isoformat)""" scalar DateTime type DeviceApiTokenMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! token: String } enum DnsProvider { - CLOUDFLARE, + CLOUDFLARE + DIGITALOCEAN DESEC } type DnsRecord { - content: String! - name: String! - priority: Int recordType: String! + name: String! + content: String! ttl: Int! + priority: Int +} + +type GenericBackupConfigReturn implements MutationReturnInterface { + success: Boolean! + message: String! + code: Int! + configuration: BackupConfiguration } type GenericJobButationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! job: ApiJob - message: String! - success: Boolean! } type GenericMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! +} + +input InitializeRepositoryInput { + provider: BackupProvider! + locationId: String! + locationName: String! + login: String! + password: String! } type Job { - getJob(jobId: String!): ApiJob getJobs: [ApiJob!]! + getJob(jobId: String!): ApiJob } input MigrateToBindsInput { @@ -119,52 +156,59 @@ input MoveServiceInput { } type Mutation { - addSshKey(sshInput: SshMutationInput!): UserMutationReturn! - authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! - 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! + useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! refreshDeviceApiToken: DeviceApiTokenMutationReturn! - removeJob(jobId: String!): GenericMutationReturn! - removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! - resizeVolume(name: String!): GenericMutationReturn! - restartService(serviceId: String!): ServiceMutationReturn! + deleteDeviceApiToken(device: String!): GenericMutationReturn! + getNewDeviceApiKey: ApiKeyMutationReturn! + invalidateNewDeviceApiKey: GenericMutationReturn! + authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn! + changeTimezone(timezone: String!): TimezoneMutationReturn! + changeAutoUpgradeSettings(settings: AutoUpgradeSettingsInput!): AutoUpgradeSettingsMutationReturn! runSystemRebuild: GenericMutationReturn! runSystemRollback: GenericMutationReturn! runSystemUpgrade: GenericMutationReturn! - startService(serviceId: String!): ServiceMutationReturn! - stopService(serviceId: String!): ServiceMutationReturn! - testMutation: GenericMutationReturn! - unmountVolume(name: String!): GenericMutationReturn! + rebootSystem: GenericMutationReturn! + pullRepositoryChanges: GenericMutationReturn! + createUser(user: UserMutationInput!): UserMutationReturn! + deleteUser(username: String!): GenericMutationReturn! updateUser(user: UserMutationInput!): UserMutationReturn! - useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn! + addSshKey(sshInput: SshMutationInput!): UserMutationReturn! + removeSshKey(sshInput: SshMutationInput!): UserMutationReturn! + resizeVolume(name: String!): GenericMutationReturn! + mountVolume(name: String!): GenericMutationReturn! + unmountVolume(name: String!): GenericMutationReturn! + migrateToBinds(input: MigrateToBindsInput!): GenericJobButationReturn! + enableService(serviceId: String!): ServiceMutationReturn! + disableService(serviceId: String!): ServiceMutationReturn! + stopService(serviceId: String!): ServiceMutationReturn! + startService(serviceId: String!): ServiceMutationReturn! + restartService(serviceId: String!): ServiceMutationReturn! + moveService(input: MoveServiceInput!): ServiceJobMutationReturn! + removeJob(jobId: String!): GenericMutationReturn! + initializeRepository(repository: InitializeRepositoryInput!): GenericBackupConfigReturn! + removeRepository: GenericBackupConfigReturn! + setAutobackupPeriod(period: Int = null): GenericBackupConfigReturn! + startBackup(serviceId: String = null): GenericJobButationReturn! + restoreBackup(snapshotId: String!): GenericJobButationReturn! + forceSnapshotsReload: GenericMutationReturn! + testMutation: GenericMutationReturn! } interface MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! } type Query { + system: System! api: Api! + users: Users! + storage: Storage! jobs: Job! services: Services! - storage: Storage! - system: System! - users: Users! + backup: Backup! } input RecoveryKeyLimitsInput { @@ -178,49 +222,50 @@ enum ServerProvider { } type Service { - description: String! - displayName: String! - dnsRecords: [DnsRecord!] id: String! - isEnabled: Boolean! + displayName: String! + description: String! + svgIcon: String! isMovable: Boolean! isRequired: Boolean! + isEnabled: Boolean! status: ServiceStatusEnum! - storageUsage: ServiceStorageUsage! - svgIcon: String! url: String + dnsRecords: [DnsRecord!] + storageUsage: ServiceStorageUsage! + backupSnapshots: [SnapshotInfo!] } type ServiceJobMutationReturn implements MutationReturnInterface { + success: Boolean! + message: String! code: Int! job: ApiJob - message: String! service: Service - success: Boolean! } type ServiceMutationReturn implements MutationReturnInterface { - code: Int! - message: String! - service: Service success: Boolean! + message: String! + code: Int! + service: Service } enum ServiceStatusEnum { - ACTIVATING ACTIVE - DEACTIVATING - FAILED - INACTIVE - OFF RELOADING + INACTIVE + FAILED + ACTIVATING + DEACTIVATING + OFF } type ServiceStorageUsage implements StorageUsageInterface { - service: Service - title: String! usedSpace: String! volume: StorageVolume + title: String! + service: Service } type Services { @@ -228,11 +273,17 @@ type Services { } enum Severity { - CRITICAL - ERROR INFO - SUCCESS WARNING + ERROR + CRITICAL + SUCCESS +} + +type SnapshotInfo { + id: String! + service: Service! + createdAt: DateTime! } input SshMutationInput { @@ -251,21 +302,21 @@ type Storage { } interface StorageUsageInterface { - title: String! usedSpace: String! volume: StorageVolume + title: String! } type StorageVolume { - freeSpace: String! - model: String - name: String! - root: Boolean! - serial: String totalSpace: String! + freeSpace: String! + usedSpace: String! + root: Boolean! + name: String! + model: String + serial: String type: String! usages: [StorageUsageInterface!]! - usedSpace: String! } type Subscription { @@ -273,12 +324,12 @@ type Subscription { } type System { - busy: Boolean! + status: Alert! domainInfo: SystemDomainInfo! + settings: SystemSettings! info: SystemInfo! provider: SystemProviderInfo! - settings: SystemSettings! - status: Alert! + busy: Boolean! workingDirectory: String! } @@ -290,14 +341,14 @@ type SystemDomainInfo { } type SystemInfo { - pythonVersion: String! systemVersion: String! + pythonVersion: String! usingBinds: Boolean! } type SystemProviderInfo { - id: String! provider: ServerProvider! + id: String! } type SystemSettings { @@ -307,9 +358,9 @@ type SystemSettings { } type TimezoneMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! timezone: String } @@ -324,9 +375,9 @@ input UseRecoveryKeyInput { } type User { - sshKeys: [String!]! userType: UserType! username: String! + sshKeys: [String!]! } input UserMutationInput { @@ -335,9 +386,9 @@ input UserMutationInput { } type UserMutationReturn implements MutationReturnInterface { - code: Int! - message: String! success: Boolean! + message: String! + code: Int! user: User } @@ -358,4 +409,9 @@ fragment dnsRecordFields on DnsRecord { priority recordType ttl -} \ No newline at end of file +} + +fragment backupSnapshotFields on SnapshotInfo { + id + createdAt +} 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 9325f5cb..ea4947ad 100644 --- a/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/schema.graphql.dart @@ -143,6 +143,190 @@ class _CopyWithStubImpl$Input$AutoUpgradeSettingsInput _res; } +class Input$InitializeRepositoryInput { + factory Input$InitializeRepositoryInput({ + required Enum$BackupProvider provider, + required String locationId, + required String locationName, + required String login, + required String password, + }) => + Input$InitializeRepositoryInput._({ + r'provider': provider, + r'locationId': locationId, + r'locationName': locationName, + r'login': login, + r'password': password, + }); + + Input$InitializeRepositoryInput._(this._$data); + + factory Input$InitializeRepositoryInput.fromJson(Map data) { + final result$data = {}; + final l$provider = data['provider']; + result$data['provider'] = + fromJson$Enum$BackupProvider((l$provider as String)); + final l$locationId = data['locationId']; + result$data['locationId'] = (l$locationId as String); + final l$locationName = data['locationName']; + result$data['locationName'] = (l$locationName as String); + final l$login = data['login']; + result$data['login'] = (l$login as String); + final l$password = data['password']; + result$data['password'] = (l$password as String); + return Input$InitializeRepositoryInput._(result$data); + } + + Map _$data; + + Enum$BackupProvider get provider => + (_$data['provider'] as Enum$BackupProvider); + String get locationId => (_$data['locationId'] as String); + String get locationName => (_$data['locationName'] as String); + String get login => (_$data['login'] as String); + String get password => (_$data['password'] as String); + Map toJson() { + final result$data = {}; + final l$provider = provider; + result$data['provider'] = toJson$Enum$BackupProvider(l$provider); + final l$locationId = locationId; + result$data['locationId'] = l$locationId; + final l$locationName = locationName; + result$data['locationName'] = l$locationName; + final l$login = login; + result$data['login'] = l$login; + final l$password = password; + result$data['password'] = l$password; + return result$data; + } + + CopyWith$Input$InitializeRepositoryInput + get copyWith => CopyWith$Input$InitializeRepositoryInput( + this, + (i) => i, + ); + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Input$InitializeRepositoryInput) || + runtimeType != other.runtimeType) { + return false; + } + final l$provider = provider; + final lOther$provider = other.provider; + if (l$provider != lOther$provider) { + return false; + } + final l$locationId = locationId; + final lOther$locationId = other.locationId; + if (l$locationId != lOther$locationId) { + return false; + } + final l$locationName = locationName; + final lOther$locationName = other.locationName; + if (l$locationName != lOther$locationName) { + return false; + } + final l$login = login; + final lOther$login = other.login; + if (l$login != lOther$login) { + return false; + } + final l$password = password; + final lOther$password = other.password; + if (l$password != lOther$password) { + return false; + } + return true; + } + + @override + int get hashCode { + final l$provider = provider; + final l$locationId = locationId; + final l$locationName = locationName; + final l$login = login; + final l$password = password; + return Object.hashAll([ + l$provider, + l$locationId, + l$locationName, + l$login, + l$password, + ]); + } +} + +abstract class CopyWith$Input$InitializeRepositoryInput { + factory CopyWith$Input$InitializeRepositoryInput( + Input$InitializeRepositoryInput instance, + TRes Function(Input$InitializeRepositoryInput) then, + ) = _CopyWithImpl$Input$InitializeRepositoryInput; + + factory CopyWith$Input$InitializeRepositoryInput.stub(TRes res) = + _CopyWithStubImpl$Input$InitializeRepositoryInput; + + TRes call({ + Enum$BackupProvider? provider, + String? locationId, + String? locationName, + String? login, + String? password, + }); +} + +class _CopyWithImpl$Input$InitializeRepositoryInput + implements CopyWith$Input$InitializeRepositoryInput { + _CopyWithImpl$Input$InitializeRepositoryInput( + this._instance, + this._then, + ); + + final Input$InitializeRepositoryInput _instance; + + final TRes Function(Input$InitializeRepositoryInput) _then; + + static const _undefined = {}; + + TRes call({ + Object? provider = _undefined, + Object? locationId = _undefined, + Object? locationName = _undefined, + Object? login = _undefined, + Object? password = _undefined, + }) => + _then(Input$InitializeRepositoryInput._({ + ..._instance._$data, + if (provider != _undefined && provider != null) + 'provider': (provider as Enum$BackupProvider), + if (locationId != _undefined && locationId != null) + 'locationId': (locationId as String), + if (locationName != _undefined && locationName != null) + 'locationName': (locationName as String), + if (login != _undefined && login != null) 'login': (login as String), + if (password != _undefined && password != null) + 'password': (password as String), + })); +} + +class _CopyWithStubImpl$Input$InitializeRepositoryInput + implements CopyWith$Input$InitializeRepositoryInput { + _CopyWithStubImpl$Input$InitializeRepositoryInput(this._res); + + TRes _res; + + call({ + Enum$BackupProvider? provider, + String? locationId, + String? locationName, + String? login, + String? password, + }) => + _res; +} + class Input$MigrateToBindsInput { factory Input$MigrateToBindsInput({ required String emailBlockDevice, @@ -1096,12 +1280,46 @@ class _CopyWithStubImpl$Input$UserMutationInput _res; } -enum Enum$DnsProvider { CLOUDFLARE, DESEC, $unknown } +enum Enum$BackupProvider { BACKBLAZE, NONE, MEMORY, FILE, $unknown } + +String toJson$Enum$BackupProvider(Enum$BackupProvider e) { + switch (e) { + case Enum$BackupProvider.BACKBLAZE: + return r'BACKBLAZE'; + case Enum$BackupProvider.NONE: + return r'NONE'; + case Enum$BackupProvider.MEMORY: + return r'MEMORY'; + case Enum$BackupProvider.FILE: + return r'FILE'; + case Enum$BackupProvider.$unknown: + return r'$unknown'; + } +} + +Enum$BackupProvider fromJson$Enum$BackupProvider(String value) { + switch (value) { + case r'BACKBLAZE': + return Enum$BackupProvider.BACKBLAZE; + case r'NONE': + return Enum$BackupProvider.NONE; + case r'MEMORY': + return Enum$BackupProvider.MEMORY; + case r'FILE': + return Enum$BackupProvider.FILE; + default: + return Enum$BackupProvider.$unknown; + } +} + +enum Enum$DnsProvider { CLOUDFLARE, DIGITALOCEAN, DESEC, $unknown } String toJson$Enum$DnsProvider(Enum$DnsProvider e) { switch (e) { case Enum$DnsProvider.CLOUDFLARE: return r'CLOUDFLARE'; + case Enum$DnsProvider.DIGITALOCEAN: + return r'DIGITALOCEAN'; case Enum$DnsProvider.DESEC: return r'DESEC'; case Enum$DnsProvider.$unknown: @@ -1113,6 +1331,8 @@ Enum$DnsProvider fromJson$Enum$DnsProvider(String value) { switch (value) { case r'CLOUDFLARE': return Enum$DnsProvider.CLOUDFLARE; + case r'DIGITALOCEAN': + return Enum$DnsProvider.DIGITALOCEAN; case r'DESEC': return Enum$DnsProvider.DESEC; default: @@ -1145,32 +1365,32 @@ Enum$ServerProvider fromJson$Enum$ServerProvider(String value) { } enum Enum$ServiceStatusEnum { - ACTIVATING, ACTIVE, - DEACTIVATING, - FAILED, - INACTIVE, - OFF, RELOADING, + INACTIVE, + FAILED, + ACTIVATING, + DEACTIVATING, + OFF, $unknown } String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { switch (e) { - case Enum$ServiceStatusEnum.ACTIVATING: - return r'ACTIVATING'; case Enum$ServiceStatusEnum.ACTIVE: return r'ACTIVE'; - case Enum$ServiceStatusEnum.DEACTIVATING: - return r'DEACTIVATING'; - case Enum$ServiceStatusEnum.FAILED: - return r'FAILED'; - case Enum$ServiceStatusEnum.INACTIVE: - return r'INACTIVE'; - case Enum$ServiceStatusEnum.OFF: - return r'OFF'; case Enum$ServiceStatusEnum.RELOADING: return r'RELOADING'; + case Enum$ServiceStatusEnum.INACTIVE: + return r'INACTIVE'; + case Enum$ServiceStatusEnum.FAILED: + return r'FAILED'; + case Enum$ServiceStatusEnum.ACTIVATING: + return r'ACTIVATING'; + case Enum$ServiceStatusEnum.DEACTIVATING: + return r'DEACTIVATING'; + case Enum$ServiceStatusEnum.OFF: + return r'OFF'; case Enum$ServiceStatusEnum.$unknown: return r'$unknown'; } @@ -1178,39 +1398,39 @@ String toJson$Enum$ServiceStatusEnum(Enum$ServiceStatusEnum e) { Enum$ServiceStatusEnum fromJson$Enum$ServiceStatusEnum(String value) { switch (value) { - case r'ACTIVATING': - return Enum$ServiceStatusEnum.ACTIVATING; case r'ACTIVE': return Enum$ServiceStatusEnum.ACTIVE; - case r'DEACTIVATING': - return Enum$ServiceStatusEnum.DEACTIVATING; - case r'FAILED': - return Enum$ServiceStatusEnum.FAILED; - case r'INACTIVE': - return Enum$ServiceStatusEnum.INACTIVE; - case r'OFF': - return Enum$ServiceStatusEnum.OFF; case r'RELOADING': return Enum$ServiceStatusEnum.RELOADING; + case r'INACTIVE': + return Enum$ServiceStatusEnum.INACTIVE; + case r'FAILED': + return Enum$ServiceStatusEnum.FAILED; + case r'ACTIVATING': + return Enum$ServiceStatusEnum.ACTIVATING; + case r'DEACTIVATING': + return Enum$ServiceStatusEnum.DEACTIVATING; + case r'OFF': + return Enum$ServiceStatusEnum.OFF; default: return Enum$ServiceStatusEnum.$unknown; } } -enum Enum$Severity { CRITICAL, ERROR, INFO, SUCCESS, WARNING, $unknown } +enum Enum$Severity { INFO, WARNING, ERROR, CRITICAL, SUCCESS, $unknown } String toJson$Enum$Severity(Enum$Severity e) { switch (e) { - case Enum$Severity.CRITICAL: - return r'CRITICAL'; - case Enum$Severity.ERROR: - return r'ERROR'; case Enum$Severity.INFO: return r'INFO'; - case Enum$Severity.SUCCESS: - return r'SUCCESS'; case Enum$Severity.WARNING: return r'WARNING'; + case Enum$Severity.ERROR: + return r'ERROR'; + case Enum$Severity.CRITICAL: + return r'CRITICAL'; + case Enum$Severity.SUCCESS: + return r'SUCCESS'; case Enum$Severity.$unknown: return r'$unknown'; } @@ -1218,16 +1438,16 @@ String toJson$Enum$Severity(Enum$Severity e) { Enum$Severity fromJson$Enum$Severity(String value) { switch (value) { - case r'CRITICAL': - return Enum$Severity.CRITICAL; - case r'ERROR': - return Enum$Severity.ERROR; case r'INFO': return Enum$Severity.INFO; - case r'SUCCESS': - return Enum$Severity.SUCCESS; case r'WARNING': return Enum$Severity.WARNING; + case r'ERROR': + return Enum$Severity.ERROR; + case r'CRITICAL': + return Enum$Severity.CRITICAL; + case r'SUCCESS': + return Enum$Severity.SUCCESS; default: return Enum$Severity.$unknown; } @@ -1555,11 +1775,229 @@ extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient { } } +class Fragment$backupSnapshotFields { + Fragment$backupSnapshotFields({ + required this.id, + required this.createdAt, + this.$__typename = 'SnapshotInfo', + }); + + factory Fragment$backupSnapshotFields.fromJson(Map json) { + final l$id = json['id']; + final l$createdAt = json['createdAt']; + final l$$__typename = json['__typename']; + return Fragment$backupSnapshotFields( + id: (l$id as String), + createdAt: dateTimeFromJson(l$createdAt), + $__typename: (l$$__typename as String), + ); + } + + final String id; + + final DateTime createdAt; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$id = id; + _resultData['id'] = l$id; + final l$createdAt = createdAt; + _resultData['createdAt'] = dateTimeToJson(l$createdAt); + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + int get hashCode { + final l$id = id; + final l$createdAt = createdAt; + final l$$__typename = $__typename; + return Object.hashAll([ + l$id, + l$createdAt, + l$$__typename, + ]); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (!(other is Fragment$backupSnapshotFields) || + runtimeType != other.runtimeType) { + return false; + } + final l$id = id; + final lOther$id = other.id; + if (l$id != lOther$id) { + return false; + } + final l$createdAt = createdAt; + final lOther$createdAt = other.createdAt; + if (l$createdAt != lOther$createdAt) { + return false; + } + final l$$__typename = $__typename; + final lOther$$__typename = other.$__typename; + if (l$$__typename != lOther$$__typename) { + return false; + } + return true; + } +} + +extension UtilityExtension$Fragment$backupSnapshotFields + on Fragment$backupSnapshotFields { + CopyWith$Fragment$backupSnapshotFields + get copyWith => CopyWith$Fragment$backupSnapshotFields( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$backupSnapshotFields { + factory CopyWith$Fragment$backupSnapshotFields( + Fragment$backupSnapshotFields instance, + TRes Function(Fragment$backupSnapshotFields) then, + ) = _CopyWithImpl$Fragment$backupSnapshotFields; + + factory CopyWith$Fragment$backupSnapshotFields.stub(TRes res) = + _CopyWithStubImpl$Fragment$backupSnapshotFields; + + TRes call({ + String? id, + DateTime? createdAt, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$backupSnapshotFields + implements CopyWith$Fragment$backupSnapshotFields { + _CopyWithImpl$Fragment$backupSnapshotFields( + this._instance, + this._then, + ); + + final Fragment$backupSnapshotFields _instance; + + final TRes Function(Fragment$backupSnapshotFields) _then; + + static const _undefined = {}; + + TRes call({ + Object? id = _undefined, + Object? createdAt = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$backupSnapshotFields( + id: id == _undefined || id == null ? _instance.id : (id as String), + createdAt: createdAt == _undefined || createdAt == null + ? _instance.createdAt + : (createdAt as DateTime), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$backupSnapshotFields + implements CopyWith$Fragment$backupSnapshotFields { + _CopyWithStubImpl$Fragment$backupSnapshotFields(this._res); + + TRes _res; + + call({ + String? id, + DateTime? createdAt, + String? $__typename, + }) => + _res; +} + +const fragmentDefinitionbackupSnapshotFields = FragmentDefinitionNode( + name: NameNode(value: 'backupSnapshotFields'), + typeCondition: TypeConditionNode( + on: NamedTypeNode( + name: NameNode(value: 'SnapshotInfo'), + isNonNull: false, + )), + directives: [], + selectionSet: SelectionSetNode(selections: [ + FieldNode( + name: NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + FieldNode( + name: NameNode(value: '__typename'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ]), +); +const documentNodeFragmentbackupSnapshotFields = DocumentNode(definitions: [ + fragmentDefinitionbackupSnapshotFields, +]); + +extension ClientExtension$Fragment$backupSnapshotFields + on graphql.GraphQLClient { + void writeFragment$backupSnapshotFields({ + required Fragment$backupSnapshotFields data, + required Map idFields, + bool broadcast = true, + }) => + this.writeFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'backupSnapshotFields', + document: documentNodeFragmentbackupSnapshotFields, + ), + ), + data: data.toJson(), + broadcast: broadcast, + ); + Fragment$backupSnapshotFields? readFragment$backupSnapshotFields({ + required Map idFields, + bool optimistic = true, + }) { + final result = this.readFragment( + graphql.FragmentRequest( + idFields: idFields, + fragment: const graphql.Fragment( + fragmentName: 'backupSnapshotFields', + document: documentNodeFragmentbackupSnapshotFields, + ), + ), + optimistic: optimistic, + ); + return result == null + ? null + : Fragment$backupSnapshotFields.fromJson(result); + } +} + const possibleTypesMap = >{ 'MutationReturnInterface': { 'ApiKeyMutationReturn', 'AutoUpgradeSettingsMutationReturn', 'DeviceApiTokenMutationReturn', + 'GenericBackupConfigReturn', 'GenericJobButationReturn', 'GenericMutationReturn', 'ServiceJobMutationReturn', 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 f41e841f..cbd77ad0 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 @@ -28,6 +28,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -152,6 +156,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -184,6 +191,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -222,6 +233,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -261,6 +274,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1009,6 +1030,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + 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$$GenericBackupConfigReturn) || + 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$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ 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 index 64738ad8..98e6dd77 100644 --- a/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/server_settings.graphql.dart @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + 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$$GenericBackupConfigReturn) || + 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$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/services.graphql b/lib/logic/api_maps/graphql_maps/schema/services.graphql index 7386c362..7998e5c0 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql @@ -77,4 +77,4 @@ mutation MoveService($input: MoveServiceInput!) { 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 index 616788d8..8ea9cbbc 100644 --- a/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/services.graphql.dart @@ -28,6 +28,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -152,6 +156,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -184,6 +191,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -222,6 +233,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -261,6 +274,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1009,6 +1030,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + 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$$GenericBackupConfigReturn) || + 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$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({ diff --git a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart index 02cde074..1a7d4e98 100644 --- a/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart +++ b/lib/logic/api_maps/graphql_maps/schema/users.graphql.dart @@ -27,6 +27,10 @@ class Fragment$basicMutationReturnFields { return Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn .fromJson(json); + case "GenericBackupConfigReturn": + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + .fromJson(json); + case "GenericJobButationReturn": return Fragment$basicMutationReturnFields$$GenericJobButationReturn .fromJson(json); @@ -151,6 +155,9 @@ extension UtilityExtension$Fragment$basicMutationReturnFields required _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn) deviceApiTokenMutationReturn, + required _T Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + genericBackupConfigReturn, required _T Function( Fragment$basicMutationReturnFields$$GenericJobButationReturn) genericJobButationReturn, @@ -183,6 +190,10 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return deviceApiTokenMutationReturn(this as Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn); + case "GenericBackupConfigReturn": + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + case "GenericJobButationReturn": return genericJobButationReturn(this as Fragment$basicMutationReturnFields$$GenericJobButationReturn); @@ -221,6 +232,8 @@ extension UtilityExtension$Fragment$basicMutationReturnFields _T Function( Fragment$basicMutationReturnFields$$DeviceApiTokenMutationReturn)? deviceApiTokenMutationReturn, + _T Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn)? + genericBackupConfigReturn, _T Function(Fragment$basicMutationReturnFields$$GenericJobButationReturn)? genericJobButationReturn, _T Function(Fragment$basicMutationReturnFields$$GenericMutationReturn)? @@ -260,6 +273,14 @@ extension UtilityExtension$Fragment$basicMutationReturnFields return orElse(); } + case "GenericBackupConfigReturn": + if (genericBackupConfigReturn != null) { + return genericBackupConfigReturn(this + as Fragment$basicMutationReturnFields$$GenericBackupConfigReturn); + } else { + return orElse(); + } + case "GenericJobButationReturn": if (genericJobButationReturn != null) { return genericJobButationReturn(this @@ -1008,6 +1029,186 @@ class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$DeviceApiTokenMutati _res; } +class Fragment$basicMutationReturnFields$$GenericBackupConfigReturn + implements Fragment$basicMutationReturnFields { + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn({ + required this.code, + required this.message, + required this.success, + this.$__typename = 'GenericBackupConfigReturn', + }); + + factory Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.fromJson( + Map json) { + final l$code = json['code']; + final l$message = json['message']; + final l$success = json['success']; + final l$$__typename = json['__typename']; + return Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: (l$code as int), + message: (l$message as String), + success: (l$success as bool), + $__typename: (l$$__typename as String), + ); + } + + final int code; + + final String message; + + final bool success; + + final String $__typename; + + Map toJson() { + final _resultData = {}; + final l$code = code; + _resultData['code'] = l$code; + final l$message = message; + _resultData['message'] = l$message; + final l$success = success; + _resultData['success'] = l$success; + final l$$__typename = $__typename; + _resultData['__typename'] = l$$__typename; + return _resultData; + } + + @override + 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$$GenericBackupConfigReturn) || + 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$$GenericBackupConfigReturn + on Fragment$basicMutationReturnFields$$GenericBackupConfigReturn { + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn> + get copyWith => + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this, + (i) => i, + ); +} + +abstract class CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn instance, + TRes Function(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) + then, + ) = _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + factory CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn.stub( + TRes res) = + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn; + + TRes call({ + int? code, + String? message, + bool? success, + String? $__typename, + }); +} + +class _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._instance, + this._then, + ); + + final Fragment$basicMutationReturnFields$$GenericBackupConfigReturn _instance; + + final TRes Function( + Fragment$basicMutationReturnFields$$GenericBackupConfigReturn) _then; + + static const _undefined = {}; + + TRes call({ + Object? code = _undefined, + Object? message = _undefined, + Object? success = _undefined, + Object? $__typename = _undefined, + }) => + _then(Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + code: + code == _undefined || code == null ? _instance.code : (code as int), + message: message == _undefined || message == null + ? _instance.message + : (message as String), + success: success == _undefined || success == null + ? _instance.success + : (success as bool), + $__typename: $__typename == _undefined || $__typename == null + ? _instance.$__typename + : ($__typename as String), + )); +} + +class _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> + implements + CopyWith$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn< + TRes> { + _CopyWithStubImpl$Fragment$basicMutationReturnFields$$GenericBackupConfigReturn( + this._res); + + TRes _res; + + call({ + int? code, + String? message, + bool? success, + String? $__typename, + }) => + _res; +} + class Fragment$basicMutationReturnFields$$GenericJobButationReturn implements Fragment$basicMutationReturnFields { Fragment$basicMutationReturnFields$$GenericJobButationReturn({